error Matlab function for accessing the Stanford POS tagger

조회 수: 1 (최근 30일)
bita hallajian
bita hallajian 2017년 12월 2일
편집: bita hallajian 2017년 12월 3일
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
Walter Roberson 2017년 12월 2일
편집: Walter Roberson 2017년 12월 2일
I found a download for the software at https://stanfordnlp.github.io/CoreNLP/
... 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
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 CenterFile Exchange에서 String Parsing에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by