0
votes

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

:)

2

2 Answers

0
votes

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

0
votes

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");