error Matlab function for accessing the Stanford POS tagger
1 次查看(过去 30 天)
显示 更早的评论
I used bellow function in MATLAB for Stanford POS tagging :
function result = PosTaggerM(str)
% The imports are probably a one time requirement, and add no overhead.
import java.io.*;
import edu.stanford.nlp.tagger.maxent.MaxentTagger;
tagger = MaxentTagger('./english-left3words-distsim.tagger');
result = java.util.ArrayList();
sentences = MaxentTagger.tokenizeText(StringReader(str));
for ii = 1:size(sentences)
tSentence = tagger.tagSentence(sentences.get(ii-1));
result.addAll(tSentence);
end
end
But I received this error:
"Arguments to IMPORT must either end with ".*" or else specify a fully qualified class name:"edu.stanford.nlp.tagger.maxent.MaxentTagger" fails this test."
I'll be very grateful if someone gives me some helpful suggestions and advice to eliminate the error? Thanks
2 个评论
Walter Roberson
2017-12-2
编辑:Walter Roberson
2017-12-2
... but OS-X javac complains about a lot of problems in the code.
... and the apache tools to rebuild it don't work for me...
Sigh.
Walter Roberson
2017-12-2
Which MATLAB release are you using? There were some difficulties with import in some of the older versions.
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Introduction to Installation and Licensing 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!