removing words from texts with 'removeWords' ???
4 次查看(过去 30 天)
显示 更早的评论
hi
i want to remove 150 words from 2226 texts (1x150 and 1x2226 matrixes)
i googled it and this came up
this is the code: newDocuments = removeWords(documents,words)
but when i use it in matlab it says: Undefined function or variable 'removeWords'.
i also cant find it on my matlabs search tab
is this for another version?
is there another code?
if not can you help me pelase
thank you
2 个评论
dpb
2021-5-2
As the link indicates by containing the folder "textanalytics", this is a function in the <Text Analytics Toolbox>
You must have a license for the Toolbox to use the function.
You can do such operations with the builtin string handling functions; if we had actual sample of your dataset would be far easier to suggest specific code for the purpose.
回答(1 个)
KSSV
2021-5-3
str1 = 'Hello world, how are you?' ;
str2 = 'how are you?' ;
str=setdiff(strsplit(str1),strsplit(str2))
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Environment and Settings 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!