1.6.9 UIMA Integration

Source: Internet
Author: User

1. UIMA Integration

You can use SOLR to integrate Apache's unstructured Information Management Architecture (UIMA). Uima lets you define your own analysis engine channel and incrementally add metadata to the document's annotations.

For more information about the SOLR Uima, refer to Https://wiki.apache.org/solr/SolrUIMA.

1.1 Configuring UIMA

SOLR Uima's updaterequestprocessor is a custom update request processor. Send them to the Uima pipeline and return the document with rich metadata. Follow the steps below to configure the Uima:

1. Solrconfig.xml, copy the/solr-4.x.y/dist/solr-uima-4.x.y.jar package and its contrib/uima/lib below the class library to the SOLR class library directory.

<dir= ".. /.. /contrib/uima/lib "/><dir=". /.. /dist/"  regex=" Solr-uima-\d.*\.jar "/>

2.schema.xml, add the metadata field:

<Fieldname= "Language"type= "string"indexed= "true"stored= "true"Required= "false" /><Fieldname= "Concept"type= "string"indexed= "true"stored= "true"multivalued= "true"Required= "false" /><Fieldname= "sentence"type= "text"indexed= "true"stored= "true"multivalued= "true"Required= "false" />

3. Add the following fragment to the Solrconfig.xml:

<Updaterequestprocessorchainname= "Uima">    <Processorclass= "Org.apache.solr.uima.processor.UIMAUpdateRequestProcessorFactory">        <LSTname= "Uimaconfig">            <LSTname= "Runtimeparameters">                <Strname= "Keyword_apikey">Valid_alchemyapi_key</Str>                <Strname= "Concept_apikey">Valid_alchemyapi_key</Str>                <Strname= "Lang_apikey">Valid_alchemyapi_key</Str>                <Strname= "Cat_apikey">Valid_alchemyapi_key</Str>                <Strname= "Entities_apikey">Valid_alchemyapi_key</Str>                <Strname= "Oc_licenseid">Valid_opencalais_key</Str>            </LST>            <Strname= "Analysisengine">/org/apache/uima/desc/overridingparamsextservicesae.xml</Str>                <!--Set to True if the want to continue indexing even if text processing fails. Default is false. That's, Solr throws runtimeexception and never indexed documents entirely in your session.  -                <BOOLname= "Ignoreerrors">True</BOOL>                <!--This is optional.                     It is used for logging when text processing fails. If Logfield is not specified, UniqueKey'll be used as Logfield. <str name= "Logfield" >id</str> -                <LSTname= "Analyzefields">                    <BOOLname= "Merge">False</BOOL>                    <arrname= "Fields">                        <Str>Text</Str>                    </arr>                </LST>                <LSTname= "Fieldmappings">                    <LSTname= "type">                        <Strname= "Name">Org.apache.uima.alchemy.ts.concept.ConceptFS</Str>                        <LSTname= "Mapping">                            <Strname= "feature">Text</Str>                            <Strname= "Field">Concept</Str>                        </LST>                    </LST>                    <LSTname= "type">                        <Strname= "Name">Org.apache.uima.alchemy.ts.language.LanguageFS</Str>                        <LSTname= "Mapping">                            <Strname= "feature">Language</Str>                            <Strname= "Field">Language</Str>                        </LST>                    </LST>                    <LSTname= "type">                        <Strname= "Name">Org.apache.uima.SentenceAnnotation</Str>                        <LSTname= "Mapping">                            <Strname= "feature">Coveredtext</Str>                            <Strname= "Field">Sentence</Str>                        </LST>                    </LST>                </LST>        </LST>    </Processor>    <Processorclass= "SOLR." Logupdateprocessorfactory " />    <Processorclass= "SOLR." Runupdateprocessorfactory " /></Updaterequestprocessorchain>

1.6.9 UIMA Integration

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.