简体   繁体   中英

POS tagger in SharpNLP

I am using SharpNLP 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

:)

对于POS标记,请确保不仅使用nbin文件而且还使用tagdict文件初始化PosTagger对象。

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

http://www.codeplex.com/sharpnlp下载模型文件,然后使用mModelPath指向您下载的模型。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM