斯坦福NLP分类器的示例 [英] Example for Stanford NLP Classifier

查看:169
本文介绍了斯坦福NLP分类器的示例的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试学习斯坦福NLP分类器,并希望解决文档分类问题。任何人都可以建议我找到一个有效的例子吗?我也在查看Open NLP库,并且能够找到许多工作示例,例如

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

因此,正如我们在这里看到的,很容易找出正在发生的事情并创建一个小型工作原型。但是,我找不到stanford NLP的一个简单示例,它将向我显示

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. 如何为分类器指定训练数据。

  2. 如何训练模型。

  3. 如何摄取测试数据并运行模型。

有什么建议吗?

推荐答案

对于1和2,你看过上面的例子吗?维基页面 http://nlp.stanford.edu/wiki/Software/Classifier

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

对于3,该页面还包括从命令行进行的测试。要在代码中使用,下载中包含的 ClassifierDemo.java 中的示例代码应该可以帮助您入门。

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.

这篇关于斯坦福NLP分类器的示例的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆