无法将UIMA要素类型索引到Solr字段中

时间:2017-04-12 05:57:08

标签: solr nlp opennlp uima

我正在尝试将UIMA与Solr集成。我能够做同样的事情。但是一些UIMA字段没有被索引到solr而其他字段如pos,ChukType正在被索引。 我正在使用openNLP-UIMA进行文本分析。 当我尝试索引UIMA字段进行位置提取时,该字段在solr索引中不存在。

LocationNameFinder.xml :用于提取位置的描述符文件

<analysisEngineDescription xmlns="http://uima.apache.org/resourceSpecifier">
        <frameworkImplementation>org.apache.uima.java</frameworkImplementation>
        <primitive>true</primitive>
        <annotatorImplementationName>opennlp.uima.namefind.NameFinder</annotatorImplementationName>
        <analysisEngineMetaData>
                <name>Location Name Finder</name>
                <description></description>
                <version>${pom.version}</version>
                <vendor>Apache Software Foundation</vendor>
                <configurationParameters>

                        <configurationParameter>
                                <name>opennlp.uima.SentenceType</name>
                                <type>String</type>
                                <multiValued>false</multiValued>
                                <mandatory>true</mandatory>
                        </configurationParameter>

                        <configurationParameter>
                                <name>opennlp.uima.TokenType</name>
                                <type>String</type>
                                <multiValued>false</multiValued>
                                <mandatory>true</mandatory>
                        </configurationParameter>

                        <configurationParameter>
                                <name>opennlp.uima.NameType</name>
                                <type>String</type>
                                <multiValued>false</multiValued>
                                <mandatory>true</mandatory>
                        </configurationParameter>
                </configurationParameters>

                <configurationParameterSettings>

                        <nameValuePair>
                                <name>opennlp.uima.SentenceType</name>
                                <value>
                                        <string>uima.tcas.DocumentAnnotation</string>
                                </value>
                        </nameValuePair>

                        <nameValuePair>
                                <name>opennlp.uima.TokenType</name>
                                <value>
                                        <string>opennlp.uima.Token</string>
                                </value>
                        </nameValuePair>

                        <nameValuePair>
                                <name>opennlp.uima.NameType</name>
                                <value>
                                        <string>opennlp.uima.Location</string>
                                </value>
                        </nameValuePair>
                </configurationParameterSettings>

                <typeSystemDescription>
                        <imports>
                                <import location="TypeSystem.xml" />
                        </imports>
                </typeSystemDescription>

                <capabilities>
                        <capability>
                                <inputs />
                                <outputs />
                                <languagesSupported>
                                        <language>en</language>
                                </languagesSupported>
                        </capability>
                </capabilities>
        </analysisEngineMetaData>

        <externalResourceDependencies>
                <externalResourceDependency>
                        <key>opennlp.uima.ModelName</key>
                        <interfaceName>opennlp.uima.namefind.TokenNameFinderModelResource</interfaceName>
                </externalResourceDependency>
        </externalResourceDependencies>

        <resourceManagerConfiguration />
</analysisEngineDescription>

位置的类型说明:

TypeSystem.xml:

                     <typeDescription>
                        <name>opennlp.uima.Location</name>
                        <supertypeName>uima.tcas.Annotation</supertypeName>
                        <features>
                                <featureDescription>
                                        <name>location</name>
                                        <description></description>
                                        <rangeTypeName>uima.cas.String</rangeTypeName>
                                </featureDescription>
                        </features>
                </typeDescription>

在Solr中,我在UpdateRequestHandler中提供了位置映射。

谢谢和问候

0 个答案:

没有答案