partial word search text analytics toolbox
조회 수: 1 (최근 30일)
이전 댓글 표시
how do I undertake a partial word search in the text analysis toolbox, so for example I am seacrhing for 'wind' using context, but also want 'winds' or 'windspeed'
댓글 수: 0
답변 (1개)
Christopher Creutzig
2020년 3월 9일
You could compute those words and then feed them into context:
documents = tokenizedDocument(["A long winding road"; "The winds from the east"]);
words = documents.Vocabulary;
for word=words(startsWith(words,"wind"))
context(documents,word)
end
To get a single table, you can use arrayfun and vertcat on the resulting tables:
documents = tokenizedDocument(["A long winding road"; "The winds from the east"]);
words = documents.Vocabulary;
words = words(startsWith(words,"wind"));
ctx = arrayfun(@(word) context(documents,word), words,'UniformOutput',false);
vertcat(ctx{:})
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Characters and Strings에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!