Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/327.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java v1.7.x版OpenNLP解析器培训API_Java_Nlp_Opennlp - Fatal编程技术网

Java v1.7.x版OpenNLP解析器培训API

Java v1.7.x版OpenNLP解析器培训API,java,nlp,opennlp,Java,Nlp,Opennlp,我试着在ApacheOpenNLP中所述的一些语料库上训练解析器,但在创建Headlules对象时遇到了困难 static HeadRules createHeadRules(TrainerToolParams params) throws IOException { ArtifactSerializer headRulesSerializer = null; /* * Some code here */ Objec

我试着在ApacheOpenNLP中所述的一些语料库上训练解析器,但在创建Headlules对象时遇到了困难

static HeadRules createHeadRules(TrainerToolParams params) throws IOException {
    ArtifactSerializer headRulesSerializer = null;
          /*
           * Some code here
           */
    Object headRulesObject = headRulesSerializer.create(new FileInputStream(params.getHeadRules()));
    return (HeadRules) headRulesObject;

}
我在OpenNLPTools API中找不到
TrainerToolParams

有人能详细地指导我如何创建HeadRules对象来训练解析器吗。 我是openNLP的新手,所以请详细指导我