开发者

POS tagger in SharpNLP

I am using S开发者_如何学JAVAharpNLP for my POS tagging:

EnglishMaximumEntropyPosTagger posTagger =
  new EnglishMaximumEntropyPosTagger(mModelPath);
            String tagSentence = posTagger.TagSentence(question);

I only have 3 tags. How can I load a set of Penn treebank or some other tagging tree banks to use?

Thanks

:)


Download the model files from http://www.codeplex.com/sharpnlp, and use mModelPath to point to the models you downloaded.


For POS Tagging, be sure to initialize the PosTagger object not just with the nbin file, but also with the tagdict file.

mPosTagger = new OpenNLP.Tools.PosTagger.EnglishMaximumEntropyPosTagger(mModelPath + "EnglishPOS.nbin", mModelPath + @"\Parser\tagdict");
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜