POS Tagging using Matlab MaxentTagger Class Import problem

sadia iqbal
sadia iqbal used Ask the Experts™
on
twitter sentiment analysis using Matlab   , kindly tell me whenever i import MaxentTagger class , i generate error that *. is must fot import statement..

Even i put *. but still MaxentTagger methods are not imoported in my program.....    



function result = PosTaggerM(str)
     
     
      import java.io.*;
      import edu.stanford.nlp.tagger.maxent.MaxentTagger.*;

      %
      % This initialization is expensive.
        % It is better to create the tagger once and then reuse it.
      %
      tagger = MaxentTagger('C:/Program Files/MATLAB/R2017a/bin/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

ERROR GENERATED on RUN     Undefined function or variable 'MaxentTagger'.

Error in PosTaggerM (line 40)
      tagger = MaxentTagger('C:/Program Files/MATLAB/R2017a/bin/english-left3words-distsim.tagger');
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial