Why is it showing: Undefined function or variable 'removeStopWords'.

3 ビュー (過去 30 日間)
Saugata Bose
Saugata Bose 2018 年 11 月 5 日
コメント済み: Christopher Creutzig 2018 年 11 月 26 日
Dear I am using R2017B with text analytics software installed(I have checked by searching get add-ons). I have written a simpole function which is following:
function x=test()
s='i am a boy and u r a grl';
And it shows the following error:
Undefined function or variable 'removeStopWords'.
Would you please shed light on this issue explaining why is this happening?

回答 (2 件)

Walter Roberson
Walter Roberson 2018 年 11 月 5 日
Introduced in R2018b

madhan ravi
madhan ravi 2018 年 11 月 5 日
編集済み: madhan ravi 2018 年 11 月 5 日
An example of the correct usage as documented
function x=test() %EDITED
s= tokenizedDocument([ 'i am a boy and u r a grl']);
  11 件のコメント
Christopher Creutzig
Christopher Creutzig 2018 年 11 月 26 日
removeStopWords does not work on strings or char vectors, only on tokenizedDocument.
The way MATLAB searches for functions means that it will only find removeStopWords if you have a tokenizedDocument in your workspace.
>> clear all
>> which removeStopWords
'removeStopWords' not found.
>> td = tokenizedDocument;
>> which removeStopWords
[..]/matlab/toolbox/textanalytics/textanalytics/tokenizedDocument.m % tokenizedDocument method



Help Center および File ExchangeSimulink Coder についてさらに検索




Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by