集成solr和openNLP

时间:2014-06-02 13:55:08

标签: solr lucene

我按照此链接整合https://wiki.apache.org/solr/OpenNLP

  

安装

     

英语语言测试:LUCENE-2899承诺:

     
      
  1. 拉最新的trunk或4.0分支

  2.   
  3. 应用最新的LUCENE-2899补丁

  4.   
  5. 做'ant compile'

  6.   
  7. cd solr / contrib / opennlp / src / test-files / training

  8.   

我执行了前两个步骤,但在执行第三个点时出现以下错误

common.compile-core:
[javac] Compiling 10 source files to /home/biginfolabs/solrtest/solr-lucene-trunk3/lucene/build/analysis/opennlp/classes/java

[javac] warning: [path] bad path element "/home/biginfolabs/solrtest/solr-lucene-trunk3/lucene/analysis/opennlp/lib/jwnl-1.3.3.jar": no such file or directory

[javac] /home/biginfolabs/solrtest/solr-lucene-trunk3/lucene/analysis/opennlp/src/java/org/apache/lucene/analysis/opennlp/FilterPayloadsFilter.java:43: error: cannot find symbol

[javac]     super(Version.LUCENE_44, input);

[javac]                  ^
[javac]   symbol:   variable LUCENE_44
[javac]   location: class Version
[javac] /home/biginfolabs/solrtest/solr-lucene-trunk3/lucene/analysis/opennlp/src/java/org/apache/lucene/analysis/opennlp/OpenNLPTokenizer.java:56: error: no suitable constructor found for Tokenizer(Reader)
[javac]     super(input);
[javac]     ^
[javac]     constructor Tokenizer.Tokenizer(AttributeFactory) is not applicable
[javac]       (actual argument Reader cannot be converted to AttributeFactory by method invocation conversion)
[javac]     constructor Tokenizer.Tokenizer() is not applicable
[javac]       (actual and formal argument lists differ in length)
[javac] 2 errors
[javac] 1 warning

我真的被困在如何完成这一步。我浪费了我的全部来解决这个问题但是无法移动一点。请有人帮帮我..?

1 个答案:

答案 0 :(得分:0)

由于补丁似乎是针对Lucence 4.0编写的。您还应该尝试将该补丁与Lucene 4.0源一起使用。这些可以在the SVN tags of Lucene's repository

上找到

4.0源代码将在http://svn.apache.org/repos/asf/lucene/dev/tags/lucene_solr_4_0_0/

中找到