Example for Stanford NLP Classifier

会有一股神秘感。 提交于 2019-12-10 09:47:28

问题


I am trying to learn the Stanford NLP Classifier and would like to work on the problem of document classification. Can anyone suggest a place where I can find a working example? I was also looking at the Open NLP libraries and was able to find many working examples, like

http://tharindu-rusira.blogspot.com/2013/12/opennlp-text-classifier.html

So, as we can see here, it is quite easy to figure out what's going on and create a small working prototype. However, I can't find a simple example for stanford NLP which will show me

  1. How to specify training data for a classifier.
  2. How to train a model.
  3. How to ingest test data and run the model.

Any suggestions?


回答1:


For 1 and 2, have you looked at the examples on the Wiki page http://nlp.stanford.edu/wiki/Software/Classifier ?

For 3, that page also covers testing from the command line. For use in code, the example code in ClassifierDemo.java included in the download should help you get started.



来源:https://stackoverflow.com/questions/32085525/example-for-stanford-nlp-classifier

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!