You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ar...@apache.org on 2018/07/07 15:04:45 UTC
[5/7] lucene-solr:master: SOLR-11694: Remove outdated UIMA module
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/b7d14c50/solr/contrib/uima/build.xml
----------------------------------------------------------------------
diff --git a/solr/contrib/uima/build.xml b/solr/contrib/uima/build.xml
deleted file mode 100644
index ee56422..0000000
--- a/solr/contrib/uima/build.xml
+++ /dev/null
@@ -1,63 +0,0 @@
-<?xml version="1.0"?>
-
-<!--
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- -->
-
-<project name="solr-uima" default="default">
-
- <description>
- Solr Integration with UIMA for extracting metadata from arbitrary (text) fields and enrich document with features
- extracted from UIMA types (language, sentences, concepts, named entities, etc.)
- </description>
-
- <import file="../contrib-build.xml"/>
-
- <path id="uima.lucene.libs">
- <pathelement path="${analyzers-uima.jar}"/>
- </path>
-
- <path id="classpath">
- <path refid="uima.lucene.libs"/>
- <path refid="solr.base.classpath"/>
- </path>
-
- <target name="module-jars-to-solr"
- depends="-module-jars-to-solr-not-for-package,-module-jars-to-solr-package"/>
- <target name="-module-jars-to-solr-not-for-package" unless="called.from.create-package">
- <antcall target="jar-analyzers-uima" inheritall="true"/>
- <property name="analyzers-uima.uptodate" value="true"/>
- <mkdir dir="${build.dir}/lucene-libs"/>
- <copy todir="${build.dir}/lucene-libs" preservelastmodified="true" flatten="true" failonerror="true" overwrite="true">
- <fileset file="${analyzers-uima.jar}"/>
- </copy>
- </target>
- <target name="-module-jars-to-solr-package" if="called.from.create-package">
- <antcall target="-unpack-lucene-tgz" inheritall="true"/>
- <pathconvert property="relative.uima.lucene.libs" pathsep=",">
- <path refid="uima.lucene.libs"/>
- <globmapper from="${common.build.dir}/*" to="*" handledirsep="true"/>
- </pathconvert>
- <mkdir dir="${build.dir}/lucene-libs"/>
- <copy todir="${build.dir}/lucene-libs" preservelastmodified="true" flatten="true" failonerror="true" overwrite="true">
- <fileset dir="${lucene.tgz.unpack.dir}/lucene-${version}" includes="${relative.uima.lucene.libs}"/>
- </copy>
- </target>
-
- <target name="compile-core" depends="jar-analyzers-uima, solr-contrib-build.compile-core"/>
- <target name="dist" depends="module-jars-to-solr, common-solr.dist"/>
-
-</project>
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/b7d14c50/solr/contrib/uima/ivy.xml
----------------------------------------------------------------------
diff --git a/solr/contrib/uima/ivy.xml b/solr/contrib/uima/ivy.xml
deleted file mode 100644
index fbe3331..0000000
--- a/solr/contrib/uima/ivy.xml
+++ /dev/null
@@ -1,35 +0,0 @@
-<!--
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
--->
-<ivy-module version="2.0">
- <info organisation="org.apache.solr" module="uima"/>
- <configurations defaultconfmapping="compile->master;test->master">
- <conf name="compile" transitive="false"/>
- <conf name="test" transitive="false"/>
- </configurations>
- <dependencies>
- <dependency org="commons-digester" name="commons-digester" rev="${/commons-digester/commons-digester}" conf="compile"/>
- <dependency org="org.apache.uima" name="AlchemyAPIAnnotator" rev="${/org.apache.uima/AlchemyAPIAnnotator}" conf="compile"/>
- <dependency org="org.apache.uima" name="OpenCalaisAnnotator" rev="${/org.apache.uima/OpenCalaisAnnotator}" conf="compile"/>
- <dependency org="org.apache.uima" name="Tagger" rev="${/org.apache.uima/Tagger}" conf="compile"/>
- <dependency org="org.apache.uima" name="WhitespaceTokenizer" rev="${/org.apache.uima/WhitespaceTokenizer}" conf="compile"/>
- <dependency org="org.apache.uima" name="uimaj-core" rev="${/org.apache.uima/uimaj-core}" conf="compile"/>
-
- <exclude org="*" ext="*" matcher="regexp" type="${ivy.exclude.types}"/>
- </dependencies>
-</ivy-module>
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/b7d14c50/solr/contrib/uima/src/java/org/apache/solr/uima/processor/FieldMappingException.java
----------------------------------------------------------------------
diff --git a/solr/contrib/uima/src/java/org/apache/solr/uima/processor/FieldMappingException.java b/solr/contrib/uima/src/java/org/apache/solr/uima/processor/FieldMappingException.java
deleted file mode 100644
index 801d128..0000000
--- a/solr/contrib/uima/src/java/org/apache/solr/uima/processor/FieldMappingException.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.solr.uima.processor;
-
-/**
- * Exception thrown when an error happening while mapping UIMA CAS model to Solr fields
- */
-@SuppressWarnings("serial")
-public class FieldMappingException extends Exception {
- public FieldMappingException(Exception e) {
- super(e);
- }
-}
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/b7d14c50/solr/contrib/uima/src/java/org/apache/solr/uima/processor/SolrUIMAConfiguration.java
----------------------------------------------------------------------
diff --git a/solr/contrib/uima/src/java/org/apache/solr/uima/processor/SolrUIMAConfiguration.java b/solr/contrib/uima/src/java/org/apache/solr/uima/processor/SolrUIMAConfiguration.java
deleted file mode 100644
index ae8bc6c..0000000
--- a/solr/contrib/uima/src/java/org/apache/solr/uima/processor/SolrUIMAConfiguration.java
+++ /dev/null
@@ -1,117 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.solr.uima.processor;
-
-import java.util.Map;
-
-/**
- * Configuration holding all the configurable parameters for calling UIMA inside Solr
- *
- *
- */
-public class SolrUIMAConfiguration {
-
- private final String[] fieldsToAnalyze;
-
- private final boolean fieldsMerging;
-
- private final Map<String, Map<String, MapField>> typesFeaturesFieldsMapping;
-
- private final String aePath;
-
- private final Map<String, Object> runtimeParameters;
-
- private final boolean ignoreErrors;
-
- private final String logField;
-
- SolrUIMAConfiguration(String aePath, String[] fieldsToAnalyze, boolean fieldsMerging,
- Map<String, Map<String, MapField>> typesFeaturesFieldsMapping,
- Map<String, Object> runtimeParameters, boolean ignoreErrors, String logField) {
- this.aePath = aePath;
- this.fieldsToAnalyze = fieldsToAnalyze;
- this.fieldsMerging = fieldsMerging;
- this.runtimeParameters = runtimeParameters;
- this.typesFeaturesFieldsMapping = typesFeaturesFieldsMapping;
- this.ignoreErrors = ignoreErrors;
- this.logField = logField;
- }
-
- public String[] getFieldsToAnalyze() {
- return fieldsToAnalyze;
- }
-
- public boolean isFieldsMerging() {
- return fieldsMerging;
- }
-
- public Map<String, Map<String, MapField>> getTypesFeaturesFieldsMapping() {
- return typesFeaturesFieldsMapping;
- }
-
- public String getAePath() {
- return aePath;
- }
-
- public Map<String, Object> getRuntimeParameters() {
- return runtimeParameters;
- }
-
- public boolean isIgnoreErrors() {
- return ignoreErrors;
- }
-
- public String getLogField(){
- return logField;
- }
-
- public static final class MapField {
-
- private String fieldName;
- private final String fieldNameFeature;
- private boolean prefix; // valid if dynamicField == true
- // false: *_s, true: s_*
-
- MapField(String fieldName, String fieldNameFeature){
- this.fieldName = fieldName;
- this.fieldNameFeature = fieldNameFeature;
- if(fieldNameFeature != null){
- if(fieldName.startsWith("*")){
- prefix = false;
- this.fieldName = fieldName.substring(1);
- }
- else if(fieldName.endsWith("*")){
- prefix = true;
- this.fieldName = fieldName.substring(0, fieldName.length() - 1);
- }
- else
- throw new RuntimeException("static field name cannot be used for dynamicField");
- }
- }
-
- public String getFieldNameFeature(){
- return fieldNameFeature;
- }
-
- public String getFieldName(String featureValue){
- if(fieldNameFeature != null){
- return prefix ? fieldName + featureValue : featureValue + fieldName;
- }
- return fieldName;
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/b7d14c50/solr/contrib/uima/src/java/org/apache/solr/uima/processor/SolrUIMAConfigurationReader.java
----------------------------------------------------------------------
diff --git a/solr/contrib/uima/src/java/org/apache/solr/uima/processor/SolrUIMAConfigurationReader.java b/solr/contrib/uima/src/java/org/apache/solr/uima/processor/SolrUIMAConfigurationReader.java
deleted file mode 100644
index 6094465..0000000
--- a/solr/contrib/uima/src/java/org/apache/solr/uima/processor/SolrUIMAConfigurationReader.java
+++ /dev/null
@@ -1,116 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.solr.uima.processor;
-
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.apache.solr.common.util.NamedList;
-import org.apache.solr.uima.processor.SolrUIMAConfiguration.MapField;
-
-/**
- * Read configuration for Solr-UIMA integration
- *
- *
- *
- */
-public class SolrUIMAConfigurationReader {
-
- private final NamedList<Object> args;
-
- public SolrUIMAConfigurationReader(NamedList<Object> args) {
- this.args = args;
- }
-
- public SolrUIMAConfiguration readSolrUIMAConfiguration() {
- return new SolrUIMAConfiguration(readAEPath(), readFieldsToAnalyze(), readFieldsMerging(),
- readTypesFeaturesFieldsMapping(), readAEOverridingParameters(), readIgnoreErrors(),
- readLogField());
- }
-
- private String readAEPath() {
- return (String) args.get("analysisEngine");
- }
-
- @SuppressWarnings("rawtypes")
- private NamedList getAnalyzeFields() {
- return (NamedList) args.get("analyzeFields");
- }
-
- @SuppressWarnings("unchecked")
- private String[] readFieldsToAnalyze() {
- List<String> fields = (List<String>) getAnalyzeFields().get("fields");
- return fields.toArray(new String[fields.size()]);
- }
-
- private boolean readFieldsMerging() {
- return (Boolean) getAnalyzeFields().get("merge");
- }
-
- @SuppressWarnings("rawtypes")
- private Map<String, Map<String, MapField>> readTypesFeaturesFieldsMapping() {
- Map<String, Map<String, MapField>> map = new HashMap<>();
-
- NamedList fieldMappings = (NamedList) args.get("fieldMappings");
- /* iterate over UIMA types */
- for (int i = 0; i < fieldMappings.size(); i++) {
- NamedList type = (NamedList) fieldMappings.get("type", i);
- String typeName = (String)type.get("name");
-
- Map<String, MapField> subMap = new HashMap<>();
- /* iterate over mapping definitions */
- for(int j = 0; j < type.size() - 1; j++){
- NamedList mapping = (NamedList) type.get("mapping", j + 1);
- String featureName = (String) mapping.get("feature");
- String fieldNameFeature = null;
- String mappedFieldName = (String) mapping.get("field");
- if(mappedFieldName == null){
- fieldNameFeature = (String) mapping.get("fieldNameFeature");
- mappedFieldName = (String) mapping.get("dynamicField");
- }
- if(mappedFieldName == null)
- throw new RuntimeException("either of field or dynamicField should be defined for feature " + featureName);
- MapField mapField = new MapField(mappedFieldName, fieldNameFeature);
- subMap.put(featureName, mapField);
- }
- map.put(typeName, subMap);
- }
- return map;
- }
-
- @SuppressWarnings("rawtypes")
- private Map<String, Object> readAEOverridingParameters() {
- Map<String, Object> runtimeParameters = new HashMap<>();
- NamedList runtimeParams = (NamedList) args.get("runtimeParameters");
- for (int i = 0; i < runtimeParams.size(); i++) {
- String name = runtimeParams.getName(i);
- Object value = runtimeParams.getVal(i);
- runtimeParameters.put(name, value);
- }
- return runtimeParameters;
- }
-
- private boolean readIgnoreErrors() {
- Object ignoreErrors = args.get("ignoreErrors");
- return ignoreErrors == null ? false : (Boolean)ignoreErrors;
- }
-
- private String readLogField() {
- return (String)args.get("logField");
- }
-}
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/b7d14c50/solr/contrib/uima/src/java/org/apache/solr/uima/processor/UIMAToSolrMapper.java
----------------------------------------------------------------------
diff --git a/solr/contrib/uima/src/java/org/apache/solr/uima/processor/UIMAToSolrMapper.java b/solr/contrib/uima/src/java/org/apache/solr/uima/processor/UIMAToSolrMapper.java
deleted file mode 100644
index ec08ee8..0000000
--- a/solr/contrib/uima/src/java/org/apache/solr/uima/processor/UIMAToSolrMapper.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.solr.uima.processor;
-
-import org.apache.solr.common.SolrInputDocument;
-import org.apache.solr.uima.processor.SolrUIMAConfiguration.MapField;
-import org.apache.uima.cas.FSIterator;
-import org.apache.uima.cas.FeatureStructure;
-import org.apache.uima.cas.Type;
-import org.apache.uima.jcas.JCas;
-import org.apache.uima.jcas.tcas.Annotation;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.lang.invoke.MethodHandles;
-import java.util.Map;
-
-/**
- * Map UIMA types and features over fields of a Solr document
- *
- *
- */
-public class UIMAToSolrMapper {
-
- private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
-
- private final SolrInputDocument document;
-
- private final JCas cas;
-
- public UIMAToSolrMapper(SolrInputDocument document, JCas cas) {
- this.document = document;
- this.cas = cas;
- }
-
- /**
- * map features of a certain UIMA type to corresponding Solr fields based on the mapping
- *
- * @param typeName name of UIMA type to map
- */
- void map(String typeName, Map<String, MapField> featureFieldsmapping) throws FieldMappingException {
- try {
- Type type = cas.getTypeSystem().getType(typeName);
- for (FSIterator<FeatureStructure> iterator = cas.getFSIndexRepository().getAllIndexedFS(type); iterator
- .hasNext(); ) {
- FeatureStructure fs = iterator.next();
- for (String featureName : featureFieldsmapping.keySet()) {
- MapField mapField = featureFieldsmapping.get(featureName);
- String fieldNameFeature = mapField.getFieldNameFeature();
- String fieldNameFeatureValue = fieldNameFeature == null ? null :
- fs.getFeatureValueAsString(type.getFeatureByBaseName(fieldNameFeature));
- String fieldName = mapField.getFieldName(fieldNameFeatureValue);
- if (log.isInfoEnabled()) {
- log.info("mapping {}@{} to {}", new Object[]{typeName, featureName, fieldName});
- }
- String featureValue;
- if (fs instanceof Annotation && "coveredText".equals(featureName)) {
- featureValue = ((Annotation) fs).getCoveredText();
- } else {
- featureValue = fs.getFeatureValueAsString(type.getFeatureByBaseName(featureName));
- }
- if (log.isDebugEnabled()) {
- log.debug("writing {} in {}", new Object[]{featureValue, fieldName});
- }
- document.addField(fieldName, featureValue);
- }
- }
- } catch (Exception e) {
- throw new FieldMappingException(e);
- }
- }
-
-}
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/b7d14c50/solr/contrib/uima/src/java/org/apache/solr/uima/processor/UIMAUpdateRequestProcessor.java
----------------------------------------------------------------------
diff --git a/solr/contrib/uima/src/java/org/apache/solr/uima/processor/UIMAUpdateRequestProcessor.java b/solr/contrib/uima/src/java/org/apache/solr/uima/processor/UIMAUpdateRequestProcessor.java
deleted file mode 100644
index 6bfda41..0000000
--- a/solr/contrib/uima/src/java/org/apache/solr/uima/processor/UIMAUpdateRequestProcessor.java
+++ /dev/null
@@ -1,189 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.solr.uima.processor;
-
-import java.io.IOException;
-import java.lang.invoke.MethodHandles;
-import java.util.Map;
-import java.util.Map.Entry;
-
-import org.apache.solr.common.SolrException;
-import org.apache.solr.common.SolrException.ErrorCode;
-import org.apache.solr.common.SolrInputDocument;
-import org.apache.solr.schema.SchemaField;
-import org.apache.solr.uima.processor.SolrUIMAConfiguration.MapField;
-import org.apache.solr.update.AddUpdateCommand;
-import org.apache.solr.update.processor.UpdateRequestProcessor;
-import org.apache.uima.analysis_engine.AnalysisEngine;
-import org.apache.uima.analysis_engine.AnalysisEngineProcessException;
-import org.apache.uima.jcas.JCas;
-import org.apache.uima.resource.ResourceInitializationException;
-import org.apache.uima.util.JCasPool;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Update document(s) to be indexed with UIMA extracted information
- *
- */
-public class UIMAUpdateRequestProcessor extends UpdateRequestProcessor {
-
- private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
-
- private SolrUIMAConfiguration solrUIMAConfiguration;
-
- private AnalysisEngine ae;
-
- private JCasPool pool;
-
- public UIMAUpdateRequestProcessor(UpdateRequestProcessor next,
- String coreName, SolrUIMAConfiguration config, AnalysisEngine ae,
- JCasPool pool) {
- super(next);
- this.ae = ae;
- this.pool = pool;
- solrUIMAConfiguration = config;
- }
-
- @Override
- public void processAdd(AddUpdateCommand cmd) throws IOException {
- String text = null;
- try {
- /* get Solr document */
- SolrInputDocument solrInputDocument = cmd.getSolrInputDocument();
-
- /* get the fields to analyze */
- String[] texts = getTextsToAnalyze(solrInputDocument);
- for (String currentText : texts) {
- text = currentText;
- if (text != null && text.length() > 0) {
- /* create a JCas which contain the text to analyze */
- JCas jcas = pool.getJCas(0);
- try {
- /* process the text value */
- processText(text, jcas);
-
- UIMAToSolrMapper uimaToSolrMapper = new UIMAToSolrMapper(
- solrInputDocument, jcas);
- /* get field mapping from config */
- Map<String,Map<String,MapField>> typesAndFeaturesFieldsMap = solrUIMAConfiguration
- .getTypesFeaturesFieldsMapping();
- /* map type features on fields */
- for (Entry<String,Map<String,MapField>> entry : typesAndFeaturesFieldsMap
- .entrySet()) {
- uimaToSolrMapper.map(entry.getKey(), entry.getValue());
- }
- } finally {
- pool.releaseJCas(jcas);
- }
- }
- }
- } catch (Exception e) {
- String logField = solrUIMAConfiguration.getLogField();
- if (logField == null) {
- SchemaField uniqueKeyField = cmd.getReq().getSchema()
- .getUniqueKeyField();
- if (uniqueKeyField != null) {
- logField = uniqueKeyField.getName();
- }
- }
- String optionalFieldInfo = logField == null ? "." : ". " + logField + "=" + cmd.getSolrInputDocument().
- getField(logField).getValue() + ", ";
- int len;
- String debugString;
- if (text != null && text.length() > 0) {
- len = Math.min(text.length(), 100);
- debugString = " text=\"" + text.substring(0, len) + "...\"";
- } else {
- debugString = " null text";
- }
- if (solrUIMAConfiguration.isIgnoreErrors()) {
- log.warn(
- "skip the text processing due to {}",
- new StringBuilder().append(e.getLocalizedMessage())
- .append(optionalFieldInfo).append(debugString));
- } else {
- throw new SolrException(ErrorCode.SERVER_ERROR, "processing error " + e.getLocalizedMessage() +
- optionalFieldInfo + debugString, e);
- }
- }
- super.processAdd(cmd);
- }
-
- /*
- * get the texts to analyze from the corresponding fields
- */
- private String[] getTextsToAnalyze(SolrInputDocument solrInputDocument) {
- String[] fieldsToAnalyze = solrUIMAConfiguration.getFieldsToAnalyze();
- boolean merge = solrUIMAConfiguration.isFieldsMerging();
- String[] textVals;
- if (merge) {
- StringBuilder unifiedText = new StringBuilder("");
- for (String aFieldsToAnalyze : fieldsToAnalyze) {
- if (solrInputDocument.getFieldValues(aFieldsToAnalyze) != null) {
- Object[] Values = solrInputDocument.getFieldValues(aFieldsToAnalyze).toArray();
- for (Object Value : Values) {
- if (unifiedText.length() > 0) {
- unifiedText.append(' ');
- }
- unifiedText.append(Value.toString());
- }
- }
- }
- textVals = new String[1];
- textVals[0] = unifiedText.toString();
- } else {
- textVals = new String[fieldsToAnalyze.length];
- for (int i = 0; i < fieldsToAnalyze.length; i++) {
- if (solrInputDocument.getFieldValues(fieldsToAnalyze[i]) != null) {
- Object[] Values = solrInputDocument.getFieldValues(fieldsToAnalyze[i]).toArray();
- for (Object Value : Values) {
- textVals[i] += Value.toString();
- }
- }
- }
- }
- return textVals;
- }
-
- /*
- * process a field value executing UIMA on the JCas containing it as document
- * text
- */
- private void processText(String textFieldValue, JCas jcas)
- throws ResourceInitializationException, AnalysisEngineProcessException {
- if (log.isDebugEnabled()) {
- log.debug("Analyzing text");
- }
-
- jcas.setDocumentText(textFieldValue);
-
- /* perform analysis on text field */
- ae.process(jcas);
- if (log.isDebugEnabled()) {
- log.debug("Text processing completed");
- }
- }
-
- /**
- * @return the configuration object for this request processor
- */
- public SolrUIMAConfiguration getConfiguration()
- {
- return solrUIMAConfiguration;
- }
-}
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/b7d14c50/solr/contrib/uima/src/java/org/apache/solr/uima/processor/UIMAUpdateRequestProcessorFactory.java
----------------------------------------------------------------------
diff --git a/solr/contrib/uima/src/java/org/apache/solr/uima/processor/UIMAUpdateRequestProcessorFactory.java b/solr/contrib/uima/src/java/org/apache/solr/uima/processor/UIMAUpdateRequestProcessorFactory.java
deleted file mode 100644
index 363f22b..0000000
--- a/solr/contrib/uima/src/java/org/apache/solr/uima/processor/UIMAUpdateRequestProcessorFactory.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.solr.uima.processor;
-
-import org.apache.lucene.analysis.uima.ae.AEProvider;
-import org.apache.lucene.analysis.uima.ae.AEProviderFactory;
-import org.apache.solr.common.SolrException;
-import org.apache.solr.common.util.NamedList;
-import org.apache.solr.request.SolrQueryRequest;
-import org.apache.solr.response.SolrQueryResponse;
-import org.apache.solr.update.processor.UpdateRequestProcessor;
-import org.apache.solr.update.processor.UpdateRequestProcessorFactory;
-import org.apache.uima.analysis_engine.AnalysisEngine;
-import org.apache.uima.resource.ResourceInitializationException;
-import org.apache.uima.util.JCasPool;
-
-/**
- * Factory for {@link UIMAUpdateRequestProcessor}
- *
- * @since 3.1.0
- */
-public class UIMAUpdateRequestProcessorFactory extends
- UpdateRequestProcessorFactory {
-
- private NamedList<Object> args;
- private AnalysisEngine ae;
- private JCasPool pool;
-
- @SuppressWarnings("unchecked")
- @Override
- public void init(@SuppressWarnings("rawtypes") NamedList args) {
- this.args = (NamedList<Object>) args.get("uimaConfig");
- }
-
- @Override
- public UpdateRequestProcessor getInstance(SolrQueryRequest req,
- SolrQueryResponse rsp, UpdateRequestProcessor next) {
- SolrUIMAConfiguration configuration = new SolrUIMAConfigurationReader(args)
- .readSolrUIMAConfiguration();
- synchronized (this) {
- if (ae == null && pool == null) {
- AEProvider aeProvider = AEProviderFactory.getInstance().getAEProvider(
- req.getCore().getName(), configuration.getAePath(),
- configuration.getRuntimeParameters());
- try {
- ae = aeProvider.getAE();
- pool = new JCasPool(10, ae);
- } catch (ResourceInitializationException e) {
- throw new SolrException(SolrException.ErrorCode.SERVER_ERROR, e);
- }
- }
- }
-
- return new UIMAUpdateRequestProcessor(next, req.getCore().getName(),
- configuration, ae, pool);
- }
-
-}
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/b7d14c50/solr/contrib/uima/src/java/org/apache/solr/uima/processor/package-info.java
----------------------------------------------------------------------
diff --git a/solr/contrib/uima/src/java/org/apache/solr/uima/processor/package-info.java b/solr/contrib/uima/src/java/org/apache/solr/uima/processor/package-info.java
deleted file mode 100644
index 4525c33..0000000
--- a/solr/contrib/uima/src/java/org/apache/solr/uima/processor/package-info.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/**
- * {@link org.apache.solr.uima.processor.UIMAUpdateRequestProcessorFactory} and related code.
- */
-package org.apache.solr.uima.processor;
-
-
-
-
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/b7d14c50/solr/contrib/uima/src/java/overview.html
----------------------------------------------------------------------
diff --git a/solr/contrib/uima/src/java/overview.html b/solr/contrib/uima/src/java/overview.html
deleted file mode 100644
index 1b78ffc..0000000
--- a/solr/contrib/uima/src/java/overview.html
+++ /dev/null
@@ -1,21 +0,0 @@
-<!--
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<html>
-<body>
-Apache Solr Search Server: Solr UIMA contrib
-</body>
-</html>
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/b7d14c50/solr/contrib/uima/src/resources/org/apache/uima/desc/AggregateSentenceAE.xml
----------------------------------------------------------------------
diff --git a/solr/contrib/uima/src/resources/org/apache/uima/desc/AggregateSentenceAE.xml b/solr/contrib/uima/src/resources/org/apache/uima/desc/AggregateSentenceAE.xml
deleted file mode 100644
index 75ae50e..0000000
--- a/solr/contrib/uima/src/resources/org/apache/uima/desc/AggregateSentenceAE.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<analysisEngineDescription xmlns="http://uima.apache.org/resourceSpecifier">
- <frameworkImplementation>org.apache.uima.java</frameworkImplementation>
- <primitive>false</primitive>
- <delegateAnalysisEngineSpecifiers>
- <delegateAnalysisEngine key="HmmTagger">
- <import name="HmmTagger"/>
- </delegateAnalysisEngine>
- <delegateAnalysisEngine key="WhitespaceTokenizer">
- <import name="WhitespaceTokenizer"/>
- </delegateAnalysisEngine>
- </delegateAnalysisEngineSpecifiers>
- <analysisEngineMetaData>
- <name>AggregateSentenceAE</name>
- <description/>
- <version>1.0</version>
- <vendor/>
- <configurationParameters/>
- <configurationParameterSettings/>
- <flowConstraints>
- <fixedFlow>
- <node>WhitespaceTokenizer</node>
- <node>HmmTagger</node>
- </fixedFlow>
- </flowConstraints>
- <fsIndexCollection/>
- <capabilities>
- <capability>
- <inputs/>
- <outputs/>
- <languagesSupported/>
- </capability>
- </capabilities>
- <operationalProperties>
- <modifiesCas>true</modifiesCas>
- <multipleDeploymentAllowed>true</multipleDeploymentAllowed>
- <outputsNewCASes>false</outputsNewCASes>
- </operationalProperties>
- </analysisEngineMetaData>
- <resourceManagerConfiguration/>
-</analysisEngineDescription>
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/b7d14c50/solr/contrib/uima/src/resources/org/apache/uima/desc/HmmTagger.xml
----------------------------------------------------------------------
diff --git a/solr/contrib/uima/src/resources/org/apache/uima/desc/HmmTagger.xml b/solr/contrib/uima/src/resources/org/apache/uima/desc/HmmTagger.xml
deleted file mode 100644
index d0f55a4..0000000
--- a/solr/contrib/uima/src/resources/org/apache/uima/desc/HmmTagger.xml
+++ /dev/null
@@ -1,121 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
--->
-<analysisEngineDescription xmlns="http://uima.apache.org/resourceSpecifier">
- <frameworkImplementation>org.apache.uima.java</frameworkImplementation>
- <primitive>true</primitive>
- <annotatorImplementationName>org.apache.uima.examples.tagger.HMMTagger</annotatorImplementationName>
- <analysisEngineMetaData>
- <name>Hidden Markov Model - Part of Speech Tagger</name>
- <description>A configuration of the HmmTaggerAnnotator that looks for
- parts of speech of identified tokens within existing
- Sentence and Token annotations. See also
- WhitespaceTokenizer.xml.</description>
- <version>1.0</version>
- <vendor>The Apache Software Foundation</vendor>
- <configurationParameters>
- <configurationParameter>
- <name>NGRAM_SIZE</name>
- <type>Integer</type>
- <multiValued>false</multiValued>
- <mandatory>true</mandatory>
- </configurationParameter>
- </configurationParameters>
- <configurationParameterSettings>
- <nameValuePair>
- <name>NGRAM_SIZE</name>
- <value>
- <integer>3</integer>
- </value>
- </nameValuePair>
- </configurationParameterSettings>
- <typeSystemDescription>
- <types>
- <typeDescription>
- <name>org.apache.uima.TokenAnnotation</name>
- <description>Single token annotation</description>
- <supertypeName>uima.tcas.Annotation</supertypeName>
- <features>
- <featureDescription>
- <name>posTag</name>
- <description>contains part-of-speech of a
- corresponding token</description>
- <rangeTypeName>uima.cas.String</rangeTypeName>
- </featureDescription>
- </features>
- </typeDescription>
- <typeDescription>
- <name>org.apache.uima.SentenceAnnotation</name>
- <description>sentence annotation</description>
- <supertypeName>uima.tcas.Annotation</supertypeName>
- </typeDescription>
- </types>
- </typeSystemDescription>
- <typePriorities/>
- <fsIndexCollection/>
- <capabilities>
- <capability>
- <inputs>
- <type>org.apache.uima.TokenAnnotation</type>
- <type allAnnotatorFeatures="true">org.apache.uima.SentenceAnnotation</type>
- <feature>org.apache.uima.TokenAnnotation:end</feature>
- <feature>org.apache.uima.TokenAnnotation:begin</feature>
- </inputs>
- <outputs>
- <type>org.apache.uima.TokenAnnotation</type>
- <feature>org.apache.uima.TokenAnnotation:posTag</feature>
- <feature>org.apache.uima.TokenAnnotation:end</feature>
- <feature>org.apache.uima.TokenAnnotation:begin</feature>
- </outputs>
- <languagesSupported/>
- </capability>
- </capabilities>
- <operationalProperties>
- <modifiesCas>true</modifiesCas>
- <multipleDeploymentAllowed>true</multipleDeploymentAllowed>
- <outputsNewCASes>false</outputsNewCASes>
- </operationalProperties>
- </analysisEngineMetaData>
- <externalResourceDependencies>
- <externalResourceDependency>
- <key>Model</key>
- <description>HMM Tagger model file</description>
- <interfaceName>org.apache.uima.examples.tagger.IModelResource</interfaceName>
- <optional>false</optional>
- </externalResourceDependency>
- </externalResourceDependencies>
- <resourceManagerConfiguration>
- <externalResources>
- <externalResource>
- <name>ModelFile</name>
- <description>HMM Tagger model file</description>
- <fileResourceSpecifier>
- <fileUrl>file:english/BrownModel.dat</fileUrl>
- </fileResourceSpecifier>
- <implementationName>org.apache.uima.examples.tagger.ModelResource</implementationName>
- </externalResource>
- </externalResources>
- <externalResourceBindings>
- <externalResourceBinding>
- <key>Model</key>
- <resourceName>ModelFile</resourceName>
- </externalResourceBinding>
- </externalResourceBindings>
- </resourceManagerConfiguration>
-</analysisEngineDescription>
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/b7d14c50/solr/contrib/uima/src/resources/org/apache/uima/desc/OpenCalaisAnnotator.xml
----------------------------------------------------------------------
diff --git a/solr/contrib/uima/src/resources/org/apache/uima/desc/OpenCalaisAnnotator.xml b/solr/contrib/uima/src/resources/org/apache/uima/desc/OpenCalaisAnnotator.xml
deleted file mode 100644
index e7b0c07..0000000
--- a/solr/contrib/uima/src/resources/org/apache/uima/desc/OpenCalaisAnnotator.xml
+++ /dev/null
@@ -1,194 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<analysisEngineDescription xmlns="http://uima.apache.org/resourceSpecifier">
- <frameworkImplementation>org.apache.uima.java</frameworkImplementation>
- <primitive>true</primitive>
- <annotatorImplementationName>org.apache.uima.annotator.calais.OpenCalaisAnnotator</annotatorImplementationName>
- <analysisEngineMetaData>
- <name>OpenCalaisAnnotator</name>
- <description/>
- <configurationParameters>
- <configurationParameter>
- <name>allowDistribution</name>
- <description/>
- <type>Boolean</type>
- <multiValued>false</multiValued>
- <mandatory>true</mandatory>
- </configurationParameter>
- <configurationParameter>
- <name>allowSearch</name>
- <description/>
- <type>Boolean</type>
- <multiValued>false</multiValued>
- <mandatory>true</mandatory>
- </configurationParameter>
- <configurationParameter>
- <name>submitter</name>
- <description/>
- <type>String</type>
- <multiValued>false</multiValued>
- <mandatory>true</mandatory>
- </configurationParameter>
- <configurationParameter>
- <name>licenseID</name>
- <description/>
- <type>String</type>
- <multiValued>false</multiValued>
- <mandatory>true</mandatory>
- </configurationParameter>
- </configurationParameters>
- <configurationParameterSettings>
- <nameValuePair>
- <name>allowDistribution</name>
- <value>
- <boolean>false</boolean>
- </value>
- </nameValuePair>
- <nameValuePair>
- <name>allowSearch</name>
- <value>
- <boolean>false</boolean>
- </value>
- </nameValuePair>
- <nameValuePair>
- <name>submitter</name>
- <value>
- <string/>
- </value>
- </nameValuePair>
- <nameValuePair>
- <name>licenseID</name>
- <value>
- <string>OC_LICENSE_ID</string>
- </value>
- </nameValuePair>
- </configurationParameterSettings>
- <typeSystemDescription>
- <types>
- <typeDescription>
- <name>org.apache.uima.calais.Person</name>
- <description/>
- <supertypeName>org.apache.uima.calais.BaseType</supertypeName>
- </typeDescription>
- <typeDescription>
- <name>org.apache.uima.calais.Anniversary</name>
- <description/>
- <supertypeName>org.apache.uima.calais.BaseType</supertypeName>
- </typeDescription>
- <typeDescription>
- <name>org.apache.uima.calais.City</name>
- <description/>
- <supertypeName>org.apache.uima.calais.BaseType</supertypeName>
- </typeDescription>
- <typeDescription>
- <name>org.apache.uima.calais.Company</name>
- <description/>
- <supertypeName>org.apache.uima.calais.BaseType</supertypeName>
- </typeDescription>
- <typeDescription>
- <name>org.apache.uima.calais.Continent</name>
- <description/>
- <supertypeName>org.apache.uima.calais.BaseType</supertypeName>
- </typeDescription>
- <typeDescription>
- <name>org.apache.uima.calais.Country</name>
- <description/>
- <supertypeName>org.apache.uima.calais.BaseType</supertypeName>
- </typeDescription>
- <typeDescription>
- <name>org.apache.uima.calais.Currency</name>
- <description/>
- <supertypeName>org.apache.uima.calais.BaseType</supertypeName>
- </typeDescription>
- <typeDescription>
- <name>org.apache.uima.calais.EmailAddress</name>
- <description/>
- <supertypeName>org.apache.uima.calais.BaseType</supertypeName>
- </typeDescription>
- <typeDescription>
- <name>org.apache.uima.calais.Facility</name>
- <description/>
- <supertypeName>org.apache.uima.calais.BaseType</supertypeName>
- </typeDescription>
- <typeDescription>
- <name>org.apache.uima.calais.FaxNumber</name>
- <description/>
- <supertypeName>org.apache.uima.calais.BaseType</supertypeName>
- </typeDescription>
- <typeDescription>
- <name>org.apache.uima.calais.Holiday</name>
- <description/>
- <supertypeName>org.apache.uima.calais.BaseType</supertypeName>
- </typeDescription>
- <typeDescription>
- <name>org.apache.uima.calais.IndustryTerm</name>
- <description/>
- <supertypeName>org.apache.uima.calais.BaseType</supertypeName>
- </typeDescription>
- <typeDescription>
- <name>org.apache.uima.calais.NaturalDisaster</name>
- <description/>
- <supertypeName>org.apache.uima.calais.BaseType</supertypeName>
- </typeDescription>
- <typeDescription>
- <name>org.apache.uima.calais.NaturalFeature</name>
- <description/>
- <supertypeName>org.apache.uima.calais.BaseType</supertypeName>
- </typeDescription>
- <typeDescription>
- <name>org.apache.uima.calais.Organization</name>
- <description/>
- <supertypeName>org.apache.uima.calais.BaseType</supertypeName>
- </typeDescription>
- <typeDescription>
- <name>org.apache.uima.calais.PhoneNumber</name>
- <description/>
- <supertypeName>org.apache.uima.calais.BaseType</supertypeName>
- </typeDescription>
- <typeDescription>
- <name>org.apache.uima.calais.ProviceOrState</name>
- <description/>
- <supertypeName>org.apache.uima.calais.BaseType</supertypeName>
- </typeDescription>
- <typeDescription>
- <name>org.apache.uima.calais.Region</name>
- <description/>
- <supertypeName>org.apache.uima.calais.BaseType</supertypeName>
- </typeDescription>
- <typeDescription>
- <name>org.apache.uima.calais.Technology</name>
- <description/>
- <supertypeName>org.apache.uima.calais.BaseType</supertypeName>
- </typeDescription>
- <typeDescription>
- <name>org.apache.uima.calais.URL</name>
- <description/>
- <supertypeName>org.apache.uima.calais.BaseType</supertypeName>
- </typeDescription>
- <typeDescription>
- <name>org.apache.uima.calais.BaseType</name>
- <description/>
- <supertypeName>uima.tcas.Annotation</supertypeName>
- <features>
- <featureDescription>
- <name>calaisType</name>
- <description>OpenCalais type</description>
- <rangeTypeName>uima.cas.String</rangeTypeName>
- </featureDescription>
- </features>
- </typeDescription>
- </types>
- </typeSystemDescription>
- <capabilities>
- <capability>
- <inputs/>
- <outputs/>
- <languagesSupported/>
- </capability>
- </capabilities>
- <operationalProperties>
- <modifiesCas>true</modifiesCas>
- <multipleDeploymentAllowed>true</multipleDeploymentAllowed>
- <outputsNewCASes>false</outputsNewCASes>
- </operationalProperties>
- </analysisEngineMetaData>
-</analysisEngineDescription>
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/b7d14c50/solr/contrib/uima/src/resources/org/apache/uima/desc/OverridingParamsExtServicesAE.xml
----------------------------------------------------------------------
diff --git a/solr/contrib/uima/src/resources/org/apache/uima/desc/OverridingParamsExtServicesAE.xml b/solr/contrib/uima/src/resources/org/apache/uima/desc/OverridingParamsExtServicesAE.xml
deleted file mode 100644
index 81bd402..0000000
--- a/solr/contrib/uima/src/resources/org/apache/uima/desc/OverridingParamsExtServicesAE.xml
+++ /dev/null
@@ -1,147 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<analysisEngineDescription xmlns="http://uima.apache.org/resourceSpecifier">
- <frameworkImplementation>org.apache.uima.java</frameworkImplementation>
- <primitive>false</primitive>
- <delegateAnalysisEngineSpecifiers>
- <delegateAnalysisEngine key="TextKeywordExtractionAEDescriptor">
- <import name="TextKeywordExtractionAEDescriptor"/>
- </delegateAnalysisEngine>
- <delegateAnalysisEngine key="TextConceptTaggingAEDescriptor">
- <import name="TextConceptTaggingAEDescriptor"/>
- </delegateAnalysisEngine>
- <delegateAnalysisEngine key="OpenCalaisAnnotator">
- <import name="OpenCalaisAnnotator"/>
- </delegateAnalysisEngine>
- <delegateAnalysisEngine key="TextLanguageDetectionAEDescriptor">
- <import name="TextLanguageDetectionAEDescriptor"/>
- </delegateAnalysisEngine>
- <delegateAnalysisEngine key="TextCategorizationAEDescriptor">
- <import name="TextCategorizationAEDescriptor"/>
- </delegateAnalysisEngine>
- <delegateAnalysisEngine key="AggregateSentenceAE">
- <import location="AggregateSentenceAE.xml"/>
- </delegateAnalysisEngine>
- <delegateAnalysisEngine key="TextRankedEntityExtractionAEDescriptor">
- <import name="TextRankedEntityExtractionAEDescriptor"/>
- </delegateAnalysisEngine>
- </delegateAnalysisEngineSpecifiers>
- <analysisEngineMetaData>
- <name>ExtServicesAE</name>
- <description/>
- <version>1.0</version>
- <vendor/>
- <configurationParameters searchStrategy="language_fallback">
- <configurationParameter>
- <name>oc_licenseID</name>
- <type>String</type>
- <multiValued>false</multiValued>
- <mandatory>true</mandatory>
- <overrides>
- <parameter>OpenCalaisAnnotator/licenseID</parameter>
- </overrides>
- </configurationParameter>
- <configurationParameter>
- <name>keyword_apikey</name>
- <type>String</type>
- <multiValued>false</multiValued>
- <mandatory>true</mandatory>
- <overrides>
- <parameter>TextKeywordExtractionAEDescriptor/apikey</parameter>
- </overrides>
- </configurationParameter>
- <configurationParameter>
- <name>concept_apikey</name>
- <type>String</type>
- <multiValued>false</multiValued>
- <mandatory>true</mandatory>
- <overrides>
- <parameter>TextConceptTaggingAEDescriptor/apikey</parameter>
- </overrides>
- </configurationParameter>
- <configurationParameter>
- <name>lang_apikey</name>
- <type>String</type>
- <multiValued>false</multiValued>
- <mandatory>true</mandatory>
- <overrides>
- <parameter>TextLanguageDetectionAEDescriptor/apikey</parameter>
- </overrides>
- </configurationParameter>
- <configurationParameter>
- <name>cat_apikey</name>
- <type>String</type>
- <multiValued>false</multiValued>
- <mandatory>true</mandatory>
- <overrides>
- <parameter>TextCategorizationAEDescriptor/apikey</parameter>
- </overrides>
- </configurationParameter>
- <configurationParameter>
- <name>entities_apikey</name>
- <type>String</type>
- <multiValued>false</multiValued>
- <mandatory>true</mandatory>
- <overrides>
- <parameter>TextRankedEntityExtractionAEDescriptor/apikey</parameter>
- </overrides>
- </configurationParameter>
- </configurationParameters>
- <configurationParameterSettings>
- <nameValuePair>
- <name>oc_licenseID</name>
- <value>
- <string>licenseid</string>
- </value>
- </nameValuePair>
- <nameValuePair>
- <name>keyword_apikey</name>
- <value>
- <string>apikey</string>
- </value>
- </nameValuePair>
- <nameValuePair>
- <name>concept_apikey</name>
- <value>
- <string>apikey</string>
- </value>
- </nameValuePair>
- <nameValuePair>
- <name>lang_apikey</name>
- <value>
- <string>apikey</string>
- </value>
- </nameValuePair>
- <nameValuePair>
- <name>cat_apikey</name>
- <value>
- <string>apikey</string>
- </value>
- </nameValuePair>
- </configurationParameterSettings>
- <flowConstraints>
- <fixedFlow>
- <node>AggregateSentenceAE</node>
- <node>OpenCalaisAnnotator</node>
- <node>TextKeywordExtractionAEDescriptor</node>
- <node>TextLanguageDetectionAEDescriptor</node>
- <node>TextCategorizationAEDescriptor</node>
- <node>TextConceptTaggingAEDescriptor</node>
- <node>TextRankedEntityExtractionAEDescriptor</node>
- </fixedFlow>
- </flowConstraints>
- <fsIndexCollection/>
- <capabilities>
- <capability>
- <inputs/>
- <outputs/>
- <languagesSupported/>
- </capability>
- </capabilities>
- <operationalProperties>
- <modifiesCas>true</modifiesCas>
- <multipleDeploymentAllowed>true</multipleDeploymentAllowed>
- <outputsNewCASes>false</outputsNewCASes>
- </operationalProperties>
- </analysisEngineMetaData>
- <resourceManagerConfiguration/>
-</analysisEngineDescription>
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/b7d14c50/solr/contrib/uima/src/resources/org/apache/uima/desc/TextCategorizationAEDescriptor.xml
----------------------------------------------------------------------
diff --git a/solr/contrib/uima/src/resources/org/apache/uima/desc/TextCategorizationAEDescriptor.xml b/solr/contrib/uima/src/resources/org/apache/uima/desc/TextCategorizationAEDescriptor.xml
deleted file mode 100644
index 45b7bef..0000000
--- a/solr/contrib/uima/src/resources/org/apache/uima/desc/TextCategorizationAEDescriptor.xml
+++ /dev/null
@@ -1,102 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
-
--->
-<analysisEngineDescription xmlns="http://uima.apache.org/resourceSpecifier">
- <frameworkImplementation>org.apache.uima.java</frameworkImplementation>
- <primitive>true</primitive>
- <annotatorImplementationName>org.apache.uima.alchemy.annotator.TextCategorizationAnnotator</annotatorImplementationName>
- <analysisEngineMetaData>
- <name>TextCategorizationAEDescriptor</name>
- <description/>
- <version>1.0</version>
- <vendor/>
- <configurationParameters>
- <configurationParameter>
- <name>apikey</name>
- <type>String</type>
- <multiValued>false</multiValued>
- <mandatory>true</mandatory>
- </configurationParameter>
- <configurationParameter>
- <name>outputMode</name>
- <type>String</type>
- <multiValued>false</multiValued>
- <mandatory>true</mandatory>
- </configurationParameter>
- <configurationParameter>
- <name>baseUrl</name>
- <type>String</type>
- <multiValued>false</multiValued>
- <mandatory>false</mandatory>
- </configurationParameter>
- </configurationParameters>
- <configurationParameterSettings>
- <nameValuePair>
- <name>outputMode</name>
- <value>
- <string>xml</string>
- </value>
- </nameValuePair>
- <nameValuePair>
- <name>apikey</name>
- <value>
- <string>AA_API_KEY</string>
- </value>
- </nameValuePair>
- </configurationParameterSettings>
- <typeSystemDescription>
- <types>
- <typeDescription>
- <name>org.apache.uima.alchemy.ts.categorization.Category</name>
- <description/>
- <supertypeName>uima.cas.TOP</supertypeName>
- <features>
- <featureDescription>
- <name>score</name>
- <description/>
- <rangeTypeName>uima.cas.String</rangeTypeName>
- </featureDescription>
- <featureDescription>
- <name>text</name>
- <description/>
- <rangeTypeName>uima.cas.String</rangeTypeName>
- </featureDescription>
- </features>
- </typeDescription>
- </types>
- </typeSystemDescription>
- <typePriorities/>
- <fsIndexCollection/>
- <capabilities>
- <capability>
- <inputs/>
- <outputs/>
- <languagesSupported/>
- </capability>
- </capabilities>
- <operationalProperties>
- <modifiesCas>true</modifiesCas>
- <multipleDeploymentAllowed>true</multipleDeploymentAllowed>
- <outputsNewCASes>false</outputsNewCASes>
- </operationalProperties>
- </analysisEngineMetaData>
- <resourceManagerConfiguration/>
-</analysisEngineDescription>
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/b7d14c50/solr/contrib/uima/src/resources/org/apache/uima/desc/TextConceptTaggingAEDescriptor.xml
----------------------------------------------------------------------
diff --git a/solr/contrib/uima/src/resources/org/apache/uima/desc/TextConceptTaggingAEDescriptor.xml b/solr/contrib/uima/src/resources/org/apache/uima/desc/TextConceptTaggingAEDescriptor.xml
deleted file mode 100644
index ee9166c..0000000
--- a/solr/contrib/uima/src/resources/org/apache/uima/desc/TextConceptTaggingAEDescriptor.xml
+++ /dev/null
@@ -1,196 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
--->
-<analysisEngineDescription xmlns="http://uima.apache.org/resourceSpecifier">
- <frameworkImplementation>org.apache.uima.java</frameworkImplementation>
- <primitive>true</primitive>
- <annotatorImplementationName>org.apache.uima.alchemy.annotator.TextConceptTaggingAnnotator</annotatorImplementationName>
- <analysisEngineMetaData>
- <name>TextConceptTaggingAEDescriptor</name>
- <description/>
- <version>1.0</version>
- <vendor/>
- <configurationParameters>
- <configurationParameter>
- <name>apikey</name>
- <type>String</type>
- <multiValued>false</multiValued>
- <mandatory>true</mandatory>
- </configurationParameter>
- <configurationParameter>
- <name>outputMode</name>
- <type>String</type>
- <multiValued>false</multiValued>
- <mandatory>true</mandatory>
- </configurationParameter>
- <configurationParameter>
- <name>linkedData</name>
- <type>String</type>
- <multiValued>false</multiValued>
- <mandatory>false</mandatory>
- </configurationParameter>
- <configurationParameter>
- <name>showSourceText</name>
- <type>Integer</type>
- <multiValued>false</multiValued>
- <mandatory>true</mandatory>
- </configurationParameter>
- <configurationParameter>
- <name>maxRetrieve</name>
- <type>String</type>
- <multiValued>false</multiValued>
- <mandatory>false</mandatory>
- </configurationParameter>
- <configurationParameter>
- <name>url</name>
- <type>String</type>
- <multiValued>false</multiValued>
- <mandatory>false</mandatory>
- </configurationParameter>
- </configurationParameters>
- <configurationParameterSettings>
- <nameValuePair>
- <name>apikey</name>
- <value>
- <string/>
- </value>
- </nameValuePair>
- <nameValuePair>
- <name>outputMode</name>
- <value>
- <string>xml</string>
- </value>
- </nameValuePair>
- <nameValuePair>
- <name>linkedData</name>
- <value>
- <string>1</string>
- </value>
- </nameValuePair>
- <nameValuePair>
- <name>showSourceText</name>
- <value>
- <integer>0</integer>
- </value>
- </nameValuePair>
- <nameValuePair>
- <name>maxRetrieve</name>
- <value>
- <string>8</string>
- </value>
- </nameValuePair>
- </configurationParameterSettings>
- <typeSystemDescription>
- <types>
- <typeDescription>
- <name>org.apache.uima.alchemy.ts.concept.ConceptFS</name>
- <description>a concept tag</description>
- <supertypeName>uima.cas.TOP</supertypeName>
- <features>
- <featureDescription>
- <name>text</name>
- <description/>
- <rangeTypeName>uima.cas.String</rangeTypeName>
- </featureDescription>
- <featureDescription>
- <name>relevance</name>
- <description/>
- <rangeTypeName>uima.cas.String</rangeTypeName>
- </featureDescription>
- <featureDescription>
- <name>website</name>
- <description/>
- <rangeTypeName>uima.cas.String</rangeTypeName>
- </featureDescription>
- <featureDescription>
- <name>geo</name>
- <description/>
- <rangeTypeName>uima.cas.String</rangeTypeName>
- </featureDescription>
- <featureDescription>
- <name>dbpedia</name>
- <description/>
- <rangeTypeName>uima.cas.String</rangeTypeName>
- </featureDescription>
- <featureDescription>
- <name>yago</name>
- <description/>
- <rangeTypeName>uima.cas.String</rangeTypeName>
- </featureDescription>
- <featureDescription>
- <name>opencyc</name>
- <description/>
- <rangeTypeName>uima.cas.String</rangeTypeName>
- </featureDescription>
- <featureDescription>
- <name>freebase</name>
- <description/>
- <rangeTypeName>uima.cas.String</rangeTypeName>
- </featureDescription>
- <featureDescription>
- <name>ciaFactbook</name>
- <description/>
- <rangeTypeName>uima.cas.String</rangeTypeName>
- </featureDescription>
- <featureDescription>
- <name>census</name>
- <description/>
- <rangeTypeName>uima.cas.String</rangeTypeName>
- </featureDescription>
- <featureDescription>
- <name>geonames</name>
- <description/>
- <rangeTypeName>uima.cas.String</rangeTypeName>
- </featureDescription>
- <featureDescription>
- <name>musicBrainz</name>
- <description/>
- <rangeTypeName>uima.cas.String</rangeTypeName>
- </featureDescription>
- <featureDescription>
- <name>crunchbase</name>
- <description/>
- <rangeTypeName>uima.cas.String</rangeTypeName>
- </featureDescription>
- <featureDescription>
- <name>semanticCrunchbase</name>
- <description/>
- <rangeTypeName>uima.cas.String</rangeTypeName>
- </featureDescription>
- </features>
- </typeDescription>
- </types>
- </typeSystemDescription>
- <typePriorities/>
- <fsIndexCollection/>
- <capabilities>
- <capability>
- <inputs/>
- <outputs/>
- <languagesSupported/>
- </capability>
- </capabilities>
- <operationalProperties>
- <modifiesCas>true</modifiesCas>
- <multipleDeploymentAllowed>true</multipleDeploymentAllowed>
- <outputsNewCASes>false</outputsNewCASes>
- </operationalProperties>
- </analysisEngineMetaData>
- <resourceManagerConfiguration/>
-</analysisEngineDescription>
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/b7d14c50/solr/contrib/uima/src/resources/org/apache/uima/desc/TextKeywordExtractionAEDescriptor.xml
----------------------------------------------------------------------
diff --git a/solr/contrib/uima/src/resources/org/apache/uima/desc/TextKeywordExtractionAEDescriptor.xml b/solr/contrib/uima/src/resources/org/apache/uima/desc/TextKeywordExtractionAEDescriptor.xml
deleted file mode 100644
index af6a512..0000000
--- a/solr/contrib/uima/src/resources/org/apache/uima/desc/TextKeywordExtractionAEDescriptor.xml
+++ /dev/null
@@ -1,107 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<analysisEngineDescription xmlns="http://uima.apache.org/resourceSpecifier">
- <frameworkImplementation>org.apache.uima.java</frameworkImplementation>
- <primitive>true</primitive>
- <annotatorImplementationName>org.apache.uima.alchemy.annotator.TextKeywordExtractionAnnotator</annotatorImplementationName>
- <analysisEngineMetaData>
- <name>TextKeywordExtractionAEDescriptor</name>
- <description/>
- <version>1.0</version>
- <vendor/>
- <configurationParameters>
- <configurationParameter>
- <name>apikey</name>
- <type>String</type>
- <multiValued>false</multiValued>
- <mandatory>true</mandatory>
- </configurationParameter>
- <configurationParameter>
- <name>outputMode</name>
- <type>String</type>
- <multiValued>false</multiValued>
- <mandatory>true</mandatory>
- </configurationParameter>
- <configurationParameter>
- <name>baseUrl</name>
- <type>String</type>
- <multiValued>false</multiValued>
- <mandatory>false</mandatory>
- </configurationParameter>
- <configurationParameter>
- <name>url</name>
- <type>String</type>
- <multiValued>false</multiValued>
- <mandatory>false</mandatory>
- </configurationParameter>
- <configurationParameter>
- <name>maxRetrieve</name>
- <type>Integer</type>
- <multiValued>false</multiValued>
- <mandatory>false</mandatory>
- </configurationParameter>
- <configurationParameter>
- <name>showSourceText</name>
- <type>Integer</type>
- <multiValued>false</multiValued>
- <mandatory>false</mandatory>
- </configurationParameter>
- </configurationParameters>
- <configurationParameterSettings>
- <nameValuePair>
- <name>outputMode</name>
- <value>
- <string>xml</string>
- </value>
- </nameValuePair>
- <nameValuePair>
- <name>apikey</name>
- <value>
- <string>04490000a72fe7ec5cb3497f14e77f338c86f2fe</string>
- </value>
- </nameValuePair>
- <nameValuePair>
- <name>maxRetrieve</name>
- <value>
- <integer>10</integer>
- </value>
- </nameValuePair>
- <nameValuePair>
- <name>showSourceText</name>
- <value>
- <integer>0</integer>
- </value>
- </nameValuePair>
- </configurationParameterSettings>
- <typeSystemDescription>
- <types>
- <typeDescription>
- <name>org.apache.uima.alchemy.ts.keywords.KeywordFS</name>
- <description/>
- <supertypeName>uima.cas.TOP</supertypeName>
- <features>
- <featureDescription>
- <name>text</name>
- <description/>
- <rangeTypeName>uima.cas.String</rangeTypeName>
- </featureDescription>
- </features>
- </typeDescription>
- </types>
- </typeSystemDescription>
- <typePriorities/>
- <fsIndexCollection/>
- <capabilities>
- <capability>
- <inputs/>
- <outputs/>
- <languagesSupported/>
- </capability>
- </capabilities>
- <operationalProperties>
- <modifiesCas>true</modifiesCas>
- <multipleDeploymentAllowed>true</multipleDeploymentAllowed>
- <outputsNewCASes>false</outputsNewCASes>
- </operationalProperties>
- </analysisEngineMetaData>
- <resourceManagerConfiguration/>
-</analysisEngineDescription>
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/b7d14c50/solr/contrib/uima/src/resources/org/apache/uima/desc/TextLanguageDetectionAEDescriptor.xml
----------------------------------------------------------------------
diff --git a/solr/contrib/uima/src/resources/org/apache/uima/desc/TextLanguageDetectionAEDescriptor.xml b/solr/contrib/uima/src/resources/org/apache/uima/desc/TextLanguageDetectionAEDescriptor.xml
deleted file mode 100644
index 6f9fb98..0000000
--- a/solr/contrib/uima/src/resources/org/apache/uima/desc/TextLanguageDetectionAEDescriptor.xml
+++ /dev/null
@@ -1,107 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<analysisEngineDescription xmlns="http://uima.apache.org/resourceSpecifier">
- <frameworkImplementation>org.apache.uima.java</frameworkImplementation>
- <primitive>true</primitive>
- <annotatorImplementationName>org.apache.uima.alchemy.annotator.TextLanguageDetectionAnnotator</annotatorImplementationName>
- <analysisEngineMetaData>
- <name>TextLanguageDetectionAEDescriptor</name>
- <description/>
- <version>1.0</version>
- <vendor/>
- <configurationParameters>
- <configurationParameter>
- <name>apikey</name>
- <type>String</type>
- <multiValued>false</multiValued>
- <mandatory>true</mandatory>
- </configurationParameter>
- <configurationParameter>
- <name>outputMode</name>
- <type>String</type>
- <multiValued>false</multiValued>
- <mandatory>true</mandatory>
- </configurationParameter>
- <configurationParameter>
- <name>url</name>
- <type>String</type>
- <multiValued>false</multiValued>
- <mandatory>false</mandatory>
- </configurationParameter>
- </configurationParameters>
- <configurationParameterSettings>
- <nameValuePair>
- <name>outputMode</name>
- <value>
- <string>xml</string>
- </value>
- </nameValuePair>
- <nameValuePair>
- <name>apikey</name>
- <value>
- <string>AA_API_KEY</string>
- </value>
- </nameValuePair>
- </configurationParameterSettings>
- <typeSystemDescription>
- <types>
- <typeDescription>
- <name>org.apache.uima.alchemy.ts.language.LanguageFS</name>
- <description/>
- <supertypeName>uima.cas.TOP</supertypeName>
- <features>
- <featureDescription>
- <name>language</name>
- <description/>
- <rangeTypeName>uima.cas.String</rangeTypeName>
- </featureDescription>
- <featureDescription>
- <name>iso6391</name>
- <description/>
- <rangeTypeName>uima.cas.String</rangeTypeName>
- </featureDescription>
- <featureDescription>
- <name>iso6392</name>
- <description/>
- <rangeTypeName>uima.cas.String</rangeTypeName>
- </featureDescription>
- <featureDescription>
- <name>iso6393</name>
- <description/>
- <rangeTypeName>uima.cas.String</rangeTypeName>
- </featureDescription>
- <featureDescription>
- <name>ethnologue</name>
- <description/>
- <rangeTypeName>uima.cas.String</rangeTypeName>
- </featureDescription>
- <featureDescription>
- <name>nativeSpeakers</name>
- <description/>
- <rangeTypeName>uima.cas.String</rangeTypeName>
- </featureDescription>
- <featureDescription>
- <name>wikipedia</name>
- <description/>
- <rangeTypeName>uima.cas.String</rangeTypeName>
- </featureDescription>
- </features>
- </typeDescription>
- </types>
- </typeSystemDescription>
- <typePriorities/>
- <fsIndexCollection/>
- <capabilities>
- <capability>
- <inputs/>
- <outputs/>
- <languagesSupported/>
- </capability>
- </capabilities>
- <operationalProperties>
- <modifiesCas>true</modifiesCas>
- <multipleDeploymentAllowed>true</multipleDeploymentAllowed>
- <outputsNewCASes>false</outputsNewCASes>
- </operationalProperties>
- </analysisEngineMetaData>
- <resourceManagerConfiguration/>
-</analysisEngineDescription>