partial word search text analytics toolbox
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Bjoern Elsaesser
el 22 de Jul. de 2019
Respondida: Christopher Creutzig
el 9 de Mzo. de 2020
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 comentarios
Respuestas (1)
Christopher Creutzig
el 9 de Mzo. de 2020
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 comentarios
Ver también
Categorías
Más información sobre Characters and Strings en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!