我收到错误typeLoadeException被用户代码取消了

时间:2016-11-26 06:32:24

标签: stanford-nlp pos-tagger

public void TagText(){     var jarRoot =" C:/ Users / vi005 / Documents / Visual Studio 2010 / WebSites / mongodb / stanford-postagger-full-2015-12-09 / stanford-postagger-full-2015-12-09" ;     var modelsDirectory = jarRoot +" / models&#34 ;;

// Loading POS Tagger
var tagger = new MaxentTagger(modelsDirectory + "/wsj-0-18-bidirectional-nodistsim.tagger");

// Text for tagging
var text = "A Part-Of-Speech Tagger (POS Tagger) is a piece of software that reads text" + "in some language and assigns parts of speech to each word (and other token)," + 
" such as noun, verb, adjective, etc., although generally computational " + "applications use more fine-grained POS tags like 'noun-plural'.";

var sentences = MaxentTagger.tokenizeText(new StringReader(text)).toArray();

foreach(ArrayList sentence in sentences){

      var taggedSentence = tagger.tagSentence(sentence);
      Response.Write(Sentence.listToString(taggedSentence, false));

  }

}

0 个答案:

没有答案