Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/solr/3.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
Apache Solr+;OpenNLP柠檬化_Solr_Search Engine_Nutch_Opennlp_Lemmatization - Fatal编程技术网

Apache Solr+;OpenNLP柠檬化

Apache Solr+;OpenNLP柠檬化,solr,search-engine,nutch,opennlp,lemmatization,Solr,Search Engine,Nutch,Opennlp,Lemmatization,我正在用ApacheNutch和Solr构建一个搜索引擎 现在,我正在尝试将Solr与OpenNLP柠檬化集成,因为我希望我的搜索引擎检索一个包含单词“create”的文档,即使用户搜索单词“created”或“create” 我遇到的问题是,柠檬化似乎不起作用,因为当我搜索单词“created”时,Solr没有找到任何结果(当我搜索“create”时,它确实找到了) 字段类型定义: <fieldType name="text_lemma" class="solr.TextField"

我正在用ApacheNutch和Solr构建一个搜索引擎

现在,我正在尝试将Solr与OpenNLP柠檬化集成,因为我希望我的搜索引擎检索一个包含单词“create”的文档,即使用户搜索单词“created”或“create”

我遇到的问题是,柠檬化似乎不起作用,因为当我搜索单词“created”时,Solr没有找到任何结果(当我搜索“create”时,它确实找到了)

字段类型定义:

<fieldType name="text_lemma" class="solr.TextField"
        positionIncrementGap="100">
        <analyzer>
            <tokenizer class="solr.OpenNLPTokenizerFactory"
                    sentenceModel="en-sent.bin"
                    tokenizerModel="en-token.bin"/>
            <filter class="solr.OpenNLPPOSFilterFactory" posTaggerModel="en-pos-maxent.bin"/>
            <filter class="solr.OpenNLPLemmatizerFilterFactory"
                    dictionary="en-lemmatizer.txt"/>                        
            <filter class="solr.TypeTokenFilterFactory" types="stop.pos.txt"/>
        </analyzer>
    </fieldType>
<field name="content" type="text_lemma" stored="true" indexed="true"/>

)?


我真的很感激能得到的任何帮助

首先,使用Solr Admin UI分析页面()了解您的分析器和标记器是否(以及如何)工作。您需要选择相应的字段类型(
text\u引理
),并放置一些虚拟文本以测试标记器和分析器是否真正工作。更改为
字段类型后是否重新索引了数据?谢谢!它真的帮助我找到了我的问题!我没有在solr.OpenNLPLemmatizerFilterFactory过滤器中使用正确的词典,因此单词没有被引理化。嘿,我正在尝试将opennlp与solr一起使用。您能发送文件en-lemmatizer.txt、stop.pos.txt吗?我没有把他们带到任何地方。如果你能帮我,我将不胜感激。
<copyField source="content" dest="text"/>
<lib dir="${solr.install.dir:../../../..}/contrib/analysis-extras/lucene-libs" regex=".*\.jar" />
<lib dir="${solr.install.dir:../../../..}/contrib/analysis-extras/lib" regex="opennlp-.*\.jar" />