You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by rm...@apache.org on 2011/03/22 02:01:27 UTC
svn commit: r1084045 - in /lucene/dev/trunk/solr/contrib/uima: ./
src/main/java/org/apache/solr/uima/processor/
src/main/java/org/apache/solr/uima/processor/ae/
src/test/java/org/apache/solr/uima/processor/
src/test/java/org/apache/solr/uima/processor/...
Author: rmuir
Date: Tue Mar 22 01:01:26 2011
New Revision: 1084045
URL: http://svn.apache.org/viewvc?rev=1084045&view=rev
Log:
SOLR-2387: stabilize UIMA tests, so they use mock objects instead of remote calls
Added:
lucene/dev/trunk/solr/contrib/uima/src/test/java/org/apache/solr/uima/processor/an/
lucene/dev/trunk/solr/contrib/uima/src/test/java/org/apache/solr/uima/processor/an/DummyEntityAnnotator.java (with props)
lucene/dev/trunk/solr/contrib/uima/src/test/java/org/apache/solr/uima/processor/an/DummySentimentAnnotator.java (with props)
lucene/dev/trunk/solr/contrib/uima/src/test/java/org/apache/solr/uima/ts/
lucene/dev/trunk/solr/contrib/uima/src/test/java/org/apache/solr/uima/ts/EntityAnnotation.java (with props)
lucene/dev/trunk/solr/contrib/uima/src/test/java/org/apache/solr/uima/ts/EntityAnnotation_Type.java (with props)
lucene/dev/trunk/solr/contrib/uima/src/test/java/org/apache/solr/uima/ts/SentimentAnnotation.java (with props)
lucene/dev/trunk/solr/contrib/uima/src/test/java/org/apache/solr/uima/ts/SentimentAnnotation_Type.java (with props)
lucene/dev/trunk/solr/contrib/uima/src/test/resources/DummyEntityAEDescriptor.xml (with props)
lucene/dev/trunk/solr/contrib/uima/src/test/resources/DummySentimentAnalysisAEDescriptor.xml (with props)
Removed:
lucene/dev/trunk/solr/contrib/uima/src/test/resources/OpenCalaisAnnotator.xml
lucene/dev/trunk/solr/contrib/uima/src/test/resources/TextCategorizationAEDescriptor.xml
Modified:
lucene/dev/trunk/solr/contrib/uima/CHANGES.txt
lucene/dev/trunk/solr/contrib/uima/src/main/java/org/apache/solr/uima/processor/SolrUIMAConfiguration.java
lucene/dev/trunk/solr/contrib/uima/src/main/java/org/apache/solr/uima/processor/SolrUIMAConfigurationReader.java
lucene/dev/trunk/solr/contrib/uima/src/main/java/org/apache/solr/uima/processor/ae/AEProviderFactory.java
lucene/dev/trunk/solr/contrib/uima/src/main/java/org/apache/solr/uima/processor/ae/OverridingParamsAEProvider.java
lucene/dev/trunk/solr/contrib/uima/src/test/java/org/apache/solr/uima/processor/UIMAUpdateRequestProcessorTest.java
lucene/dev/trunk/solr/contrib/uima/src/test/resources/AggregateSentenceAE.xml
lucene/dev/trunk/solr/contrib/uima/src/test/resources/TestAE.xml
lucene/dev/trunk/solr/contrib/uima/src/test/resources/solr-uima/conf/schema.xml
lucene/dev/trunk/solr/contrib/uima/src/test/resources/solr-uima/conf/solrconfig.xml
Modified: lucene/dev/trunk/solr/contrib/uima/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/contrib/uima/CHANGES.txt?rev=1084045&r1=1084044&r2=1084045&view=diff
==============================================================================
--- lucene/dev/trunk/solr/contrib/uima/CHANGES.txt (original)
+++ lucene/dev/trunk/solr/contrib/uima/CHANGES.txt Tue Mar 22 01:01:26 2011
@@ -18,3 +18,14 @@ AlchemyAPIAnnotator v2.3.1-SNAPSHOT rev.
WhitespaceTokenizer v2.3.1-SNAPSHOT rev. 1076132
$Id$
+
+================== 3.2.0-dev ==================
+
+Test Cases:
+
+ * SOLR-2387: add mock annotators for improved testing,
+ (Tommaso Teofili via rmuir)
+
+================== 3.1.0-dev ==================
+
+Initial Release
Modified: lucene/dev/trunk/solr/contrib/uima/src/main/java/org/apache/solr/uima/processor/SolrUIMAConfiguration.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/contrib/uima/src/main/java/org/apache/solr/uima/processor/SolrUIMAConfiguration.java?rev=1084045&r1=1084044&r2=1084045&view=diff
==============================================================================
--- lucene/dev/trunk/solr/contrib/uima/src/main/java/org/apache/solr/uima/processor/SolrUIMAConfiguration.java (original)
+++ lucene/dev/trunk/solr/contrib/uima/src/main/java/org/apache/solr/uima/processor/SolrUIMAConfiguration.java Tue Mar 22 01:01:26 2011
@@ -34,11 +34,11 @@ public class SolrUIMAConfiguration {
private String aePath;
- private Map<String, String> runtimeParameters;
+ private Map<String, Object> runtimeParameters;
public SolrUIMAConfiguration(String aePath, String[] fieldsToAnalyze, boolean fieldsMerging,
Map<String, Map<String, String>> typesFeaturesFieldsMapping,
- Map<String, String> runtimeParameters) {
+ Map<String, Object> runtimeParameters) {
this.aePath = aePath;
this.fieldsToAnalyze = fieldsToAnalyze;
this.fieldsMerging = fieldsMerging;
@@ -62,7 +62,7 @@ public class SolrUIMAConfiguration {
return aePath;
}
- public Map<String, String> getRuntimeParameters() {
+ public Map<String, Object> getRuntimeParameters() {
return runtimeParameters;
}
Modified: lucene/dev/trunk/solr/contrib/uima/src/main/java/org/apache/solr/uima/processor/SolrUIMAConfigurationReader.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/contrib/uima/src/main/java/org/apache/solr/uima/processor/SolrUIMAConfigurationReader.java?rev=1084045&r1=1084044&r2=1084045&view=diff
==============================================================================
--- lucene/dev/trunk/solr/contrib/uima/src/main/java/org/apache/solr/uima/processor/SolrUIMAConfigurationReader.java (original)
+++ lucene/dev/trunk/solr/contrib/uima/src/main/java/org/apache/solr/uima/processor/SolrUIMAConfigurationReader.java Tue Mar 22 01:01:26 2011
@@ -105,15 +105,15 @@ public class SolrUIMAConfigurationReader
return map;
}
- private Map<String, String> readAEOverridingParameters() {
- Map<String, String> runtimeParameters = new HashMap<String, String>();
+ private Map<String, Object> readAEOverridingParameters() {
+ Map<String, Object> runtimeParameters = new HashMap<String, Object>();
Node uimaConfigNode = solrConfig.getNode(AE_RUNTIME_PARAMETERS_NODE_PATH, true);
if (uimaConfigNode.hasChildNodes()) {
NodeList overridingNodes = uimaConfigNode.getChildNodes();
for (int i = 0; i < overridingNodes.getLength(); i++) {
Node overridingNode = overridingNodes.item(i);
- if (overridingNode.getNodeType() != Node.TEXT_NODE) {
+ if (overridingNode.getNodeType() != Node.TEXT_NODE && overridingNode.getNodeType() != Node.COMMENT_NODE) {
runtimeParameters.put(overridingNode.getNodeName(), overridingNode.getTextContent());
}
}
Modified: lucene/dev/trunk/solr/contrib/uima/src/main/java/org/apache/solr/uima/processor/ae/AEProviderFactory.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/contrib/uima/src/main/java/org/apache/solr/uima/processor/ae/AEProviderFactory.java?rev=1084045&r1=1084044&r2=1084045&view=diff
==============================================================================
--- lucene/dev/trunk/solr/contrib/uima/src/main/java/org/apache/solr/uima/processor/ae/AEProviderFactory.java (original)
+++ lucene/dev/trunk/solr/contrib/uima/src/main/java/org/apache/solr/uima/processor/ae/AEProviderFactory.java Tue Mar 22 01:01:26 2011
@@ -43,7 +43,7 @@ public class AEProviderFactory {
}
public synchronized AEProvider getAEProvider(String core, String aePath,
- Map<String, String> runtimeParameters) {
+ Map<String, Object> runtimeParameters) {
String key = new StringBuilder(core).append(aePath).toString();
if (providerCache.get(key) == null) {
providerCache.put(key, new OverridingParamsAEProvider(aePath, runtimeParameters));
Modified: lucene/dev/trunk/solr/contrib/uima/src/main/java/org/apache/solr/uima/processor/ae/OverridingParamsAEProvider.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/contrib/uima/src/main/java/org/apache/solr/uima/processor/ae/OverridingParamsAEProvider.java?rev=1084045&r1=1084044&r2=1084045&view=diff
==============================================================================
--- lucene/dev/trunk/solr/contrib/uima/src/main/java/org/apache/solr/uima/processor/ae/OverridingParamsAEProvider.java (original)
+++ lucene/dev/trunk/solr/contrib/uima/src/main/java/org/apache/solr/uima/processor/ae/OverridingParamsAEProvider.java Tue Mar 22 01:01:26 2011
@@ -43,9 +43,9 @@ public class OverridingParamsAEProvider
private AnalysisEngine cachedAE;
- private Map<String, String> runtimeParameters;
+ private Map<String, Object> runtimeParameters;
- public OverridingParamsAEProvider(String aeFilePath, Map<String, String> runtimeParameters) {
+ public OverridingParamsAEProvider(String aeFilePath, Map<String, Object> runtimeParameters) {
this.aeFilePath = aeFilePath;
this.runtimeParameters = runtimeParameters;
}
@@ -63,9 +63,11 @@ public class OverridingParamsAEProvider
/* iterate over each AE (to set runtime parameters) */
for (String attributeName : runtimeParameters.keySet()) {
+ Object val = getRuntimeValue(desc, attributeName);
desc.getAnalysisEngineMetaData().getConfigurationParameterSettings().setParameterValue(
- attributeName, runtimeParameters.get(attributeName));
- log.info(new StringBuilder("setting ").append(attributeName).append(" : ").append(
+ attributeName, val);
+ if (log.isDebugEnabled())
+ log.debug(new StringBuilder("setting ").append(attributeName).append(" : ").append(
runtimeParameters.get(attributeName)).toString());
}
// create AE here
@@ -86,4 +88,30 @@ public class OverridingParamsAEProvider
return cachedAE;
}
+ /* create the value to inject in the runtime parameter depending on its declared type */
+ private Object getRuntimeValue(AnalysisEngineDescription desc, String attributeName)
+ throws ClassNotFoundException {
+ String type = desc.getAnalysisEngineMetaData().getConfigurationParameterDeclarations().
+ getConfigurationParameter(null, attributeName).getType();
+ // TODO : do it via reflection ? i.e. Class paramType = Class.forName(type)...
+ Object val = null;
+ Object runtimeValue = runtimeParameters.get(attributeName);
+ if (runtimeValue!=null) {
+ if ("String".equals(type)) {
+ val = String.valueOf(runtimeValue);
+ }
+ else if ("Integer".equals(type)) {
+ val = Integer.valueOf(runtimeValue.toString());
+ }
+ else if ("Boolean".equals(type)) {
+ val = Boolean.valueOf(runtimeValue.toString());
+ }
+ else if ("Float".equals(type)) {
+ val = Float.valueOf(runtimeValue.toString());
+ }
+ }
+
+ return val;
+ }
+
}
\ No newline at end of file
Modified: lucene/dev/trunk/solr/contrib/uima/src/test/java/org/apache/solr/uima/processor/UIMAUpdateRequestProcessorTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/contrib/uima/src/test/java/org/apache/solr/uima/processor/UIMAUpdateRequestProcessorTest.java?rev=1084045&r1=1084044&r2=1084045&view=diff
==============================================================================
--- lucene/dev/trunk/solr/contrib/uima/src/test/java/org/apache/solr/uima/processor/UIMAUpdateRequestProcessorTest.java (original)
+++ lucene/dev/trunk/solr/contrib/uima/src/test/java/org/apache/solr/uima/processor/UIMAUpdateRequestProcessorTest.java Tue Mar 22 01:01:26 2011
@@ -70,8 +70,6 @@ public class UIMAUpdateRequestProcessorT
@Test
public void testProcessing() throws Exception {
- // this test requires an internet connection (e.g. opencalais api)
- checkInternetConnection();
addDoc(adoc(
"id",
@@ -83,26 +81,29 @@ public class UIMAUpdateRequestProcessorT
+ " attached if you need it, but it is also committed to trunk and 3_x branch."
+ " Last Lucene European Conference has been held in Prague."));
assertU(commit());
- assertQ(req("suggested_category:*"), "//*[@numFound='1']");
+ assertQ(req("sentence:*"), "//*[@numFound='1']");
+ assertQ(req("sentiment:*"), "//*[@numFound='0']");
+ assertQ(req("entity:Prague"), "//*[@numFound='1']");
}
@Test
public void testTwoUpdates() throws Exception {
- // this test requires an internet connection (e.g. opencalais api)
- checkInternetConnection();
addDoc(adoc("id", "1", "text", "The Apache Software Foundation is happy to announce "
+ "BarCampApache Sydney, Australia, the first ASF-backed event in the Southern "
+ "Hemisphere!"));
assertU(commit());
- assertQ(req("suggested_category:*"), "//*[@numFound='1']");
+ assertQ(req("sentence:*"), "//*[@numFound='1']");
addDoc(adoc("id", "2", "text", "Taking place 11th December 2010 at the University "
+ "of Sydney's Darlington Centre, the BarCampApache \"unconference\" will be"
+ " attendee-driven, facilitated by members of the Apache community and will "
+ "focus on the Apache..."));
assertU(commit());
- assertQ(req("suggested_category:*"), "//*[@numFound='2']");
+ assertQ(req("sentence:*"), "//*[@numFound='2']");
+
+ assertQ(req("sentiment:positive"), "//*[@numFound='1']");
+ assertQ(req("entity:Apache"), "//*[@numFound='2']");
}
private void addDoc(String doc) throws Exception {
@@ -120,14 +121,4 @@ public class UIMAUpdateRequestProcessorT
handler.handleRequestBody(req, new SolrQueryResponse());
}
- private void checkInternetConnection() {
- try {
- URLConnection conn = new URL("http://www.apache.org/").openConnection();
- conn.setConnectTimeout(5000);
- conn.setReadTimeout(5000);
- conn.connect();
- } catch (Exception ex) {
- assumeNoException("This test requires an internet connection", ex);
- }
- }
}
Added: lucene/dev/trunk/solr/contrib/uima/src/test/java/org/apache/solr/uima/processor/an/DummyEntityAnnotator.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/contrib/uima/src/test/java/org/apache/solr/uima/processor/an/DummyEntityAnnotator.java?rev=1084045&view=auto
==============================================================================
--- lucene/dev/trunk/solr/contrib/uima/src/test/java/org/apache/solr/uima/processor/an/DummyEntityAnnotator.java (added)
+++ lucene/dev/trunk/solr/contrib/uima/src/test/java/org/apache/solr/uima/processor/an/DummyEntityAnnotator.java Tue Mar 22 01:01:26 2011
@@ -0,0 +1,42 @@
+package org.apache.solr.uima.processor.an;
+
+import org.apache.solr.uima.ts.EntityAnnotation;
+import org.apache.uima.TokenAnnotation;
+import org.apache.uima.analysis_component.JCasAnnotator_ImplBase;
+import org.apache.uima.analysis_engine.AnalysisEngineProcessException;
+import org.apache.uima.jcas.JCas;
+import org.apache.uima.jcas.tcas.Annotation;
+
+/**
+ * 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.
+ */
+
+public class DummyEntityAnnotator extends JCasAnnotator_ImplBase{
+
+ @Override
+ public void process(JCas jcas) throws AnalysisEngineProcessException {
+ for (Annotation annotation : jcas.getAnnotationIndex(TokenAnnotation.type)) {
+ String tokenPOS = ((TokenAnnotation) annotation).getPosTag();
+ if ("np".equals(tokenPOS) || "nps".equals(tokenPOS)) {
+ EntityAnnotation entityAnnotation = new EntityAnnotation(jcas);
+ entityAnnotation.setBegin(annotation.getBegin());
+ entityAnnotation.setEnd(annotation.getEnd());
+ entityAnnotation.addToIndexes();
+ }
+ }
+ }
+
+}
Added: lucene/dev/trunk/solr/contrib/uima/src/test/java/org/apache/solr/uima/processor/an/DummySentimentAnnotator.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/contrib/uima/src/test/java/org/apache/solr/uima/processor/an/DummySentimentAnnotator.java?rev=1084045&view=auto
==============================================================================
--- lucene/dev/trunk/solr/contrib/uima/src/test/java/org/apache/solr/uima/processor/an/DummySentimentAnnotator.java (added)
+++ lucene/dev/trunk/solr/contrib/uima/src/test/java/org/apache/solr/uima/processor/an/DummySentimentAnnotator.java Tue Mar 22 01:01:26 2011
@@ -0,0 +1,61 @@
+package org.apache.solr.uima.processor.an;
+
+import java.util.Arrays;
+
+import org.apache.solr.uima.ts.SentimentAnnotation;
+import org.apache.uima.TokenAnnotation;
+import org.apache.uima.analysis_component.JCasAnnotator_ImplBase;
+import org.apache.uima.analysis_engine.AnalysisEngineProcessException;
+import org.apache.uima.jcas.JCas;
+import org.apache.uima.jcas.tcas.Annotation;
+
+/**
+ * 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.
+ */
+
+public class DummySentimentAnnotator extends JCasAnnotator_ImplBase{
+
+ private static final String[] positiveAdj = {"happy","cool","nice"};
+
+ private static final String[] negativeAdj = {"bad","sad","ugly"};
+
+ @Override
+ public void process(JCas jcas) throws AnalysisEngineProcessException {
+ for (Annotation annotation : jcas.getAnnotationIndex(TokenAnnotation.type)) {
+ String tokenPOS = ((TokenAnnotation) annotation).getPosTag();
+ if ("jj".equals(tokenPOS)) {
+ if (Arrays.asList(positiveAdj).contains(annotation.getCoveredText())) {
+ SentimentAnnotation sentimentAnnotation = createSentimentAnnotation(jcas, annotation);
+ sentimentAnnotation.setMood("positive");
+ sentimentAnnotation.addToIndexes();
+ }
+ else if (Arrays.asList(negativeAdj).contains(annotation.getCoveredText())) {
+ SentimentAnnotation sentimentAnnotation = createSentimentAnnotation(jcas, annotation);
+ sentimentAnnotation.setMood("negative");
+ sentimentAnnotation.addToIndexes();
+ }
+ }
+ }
+ }
+
+ private SentimentAnnotation createSentimentAnnotation(JCas jcas, Annotation annotation) {
+ SentimentAnnotation sentimentAnnotation = new SentimentAnnotation(jcas);
+ sentimentAnnotation.setBegin(annotation.getBegin());
+ sentimentAnnotation.setEnd(annotation.getEnd());
+ return sentimentAnnotation;
+ }
+
+}
Added: lucene/dev/trunk/solr/contrib/uima/src/test/java/org/apache/solr/uima/ts/EntityAnnotation.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/contrib/uima/src/test/java/org/apache/solr/uima/ts/EntityAnnotation.java?rev=1084045&view=auto
==============================================================================
--- lucene/dev/trunk/solr/contrib/uima/src/test/java/org/apache/solr/uima/ts/EntityAnnotation.java (added)
+++ lucene/dev/trunk/solr/contrib/uima/src/test/java/org/apache/solr/uima/ts/EntityAnnotation.java Tue Mar 22 01:01:26 2011
@@ -0,0 +1,62 @@
+
+
+/* First created by JCasGen Fri Mar 04 12:48:08 CET 2011 */
+package org.apache.solr.uima.ts;
+
+import org.apache.uima.jcas.JCas;
+import org.apache.uima.jcas.JCasRegistry;
+import org.apache.uima.jcas.cas.TOP_Type;
+
+import org.apache.uima.jcas.tcas.Annotation;
+
+
+/**
+ * Updated by JCasGen Fri Mar 04 12:50:14 CET 2011
+ * XML source: /Users/tommasoteofili/Documents/workspaces/lucene_workspace/lucene_dev/solr/contrib/uima/src/test/resources/DummyEntityAEDescriptor.xml
+ * @generated */
+public class EntityAnnotation extends Annotation {
+ /** @generated
+ * @ordered
+ */
+ public final static int typeIndexID = JCasRegistry.register(EntityAnnotation.class);
+ /** @generated
+ * @ordered
+ */
+ public final static int type = typeIndexID;
+ /** @generated */
+ public int getTypeIndexID() {return typeIndexID;}
+
+ /** Never called. Disable default constructor
+ * @generated */
+ protected EntityAnnotation() {}
+
+ /** Internal - constructor used by generator
+ * @generated */
+ public EntityAnnotation(int addr, TOP_Type type) {
+ super(addr, type);
+ readObject();
+ }
+
+ /** @generated */
+ public EntityAnnotation(JCas jcas) {
+ super(jcas);
+ readObject();
+ }
+
+ /** @generated */
+ public EntityAnnotation(JCas jcas, int begin, int end) {
+ super(jcas);
+ setBegin(begin);
+ setEnd(end);
+ readObject();
+ }
+
+ /** <!-- begin-user-doc -->
+ * Write your own initialization here
+ * <!-- end-user-doc -->
+ @generated modifiable */
+ private void readObject() {}
+
+}
+
+
\ No newline at end of file
Added: lucene/dev/trunk/solr/contrib/uima/src/test/java/org/apache/solr/uima/ts/EntityAnnotation_Type.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/contrib/uima/src/test/java/org/apache/solr/uima/ts/EntityAnnotation_Type.java?rev=1084045&view=auto
==============================================================================
--- lucene/dev/trunk/solr/contrib/uima/src/test/java/org/apache/solr/uima/ts/EntityAnnotation_Type.java (added)
+++ lucene/dev/trunk/solr/contrib/uima/src/test/java/org/apache/solr/uima/ts/EntityAnnotation_Type.java Tue Mar 22 01:01:26 2011
@@ -0,0 +1,55 @@
+
+/* First created by JCasGen Fri Mar 04 12:48:08 CET 2011 */
+package org.apache.solr.uima.ts;
+
+import org.apache.uima.jcas.JCas;
+import org.apache.uima.jcas.JCasRegistry;
+import org.apache.uima.cas.impl.CASImpl;
+import org.apache.uima.cas.impl.FSGenerator;
+import org.apache.uima.cas.FeatureStructure;
+import org.apache.uima.cas.impl.TypeImpl;
+import org.apache.uima.cas.Type;
+import org.apache.uima.jcas.tcas.Annotation_Type;
+
+/**
+ * Updated by JCasGen Fri Mar 04 12:50:14 CET 2011
+ * @generated */
+public class EntityAnnotation_Type extends Annotation_Type {
+ /** @generated */
+ protected FSGenerator getFSGenerator() {return fsGenerator;}
+ /** @generated */
+ private final FSGenerator fsGenerator =
+ new FSGenerator() {
+ public FeatureStructure createFS(int addr, CASImpl cas) {
+ if (EntityAnnotation_Type.this.useExistingInstance) {
+ // Return eq fs instance if already created
+ FeatureStructure fs = EntityAnnotation_Type.this.jcas.getJfsFromCaddr(addr);
+ if (null == fs) {
+ fs = new EntityAnnotation(addr, EntityAnnotation_Type.this);
+ EntityAnnotation_Type.this.jcas.putJfsFromCaddr(addr, fs);
+ return fs;
+ }
+ return fs;
+ } else return new EntityAnnotation(addr, EntityAnnotation_Type.this);
+ }
+ };
+ /** @generated */
+ public final static int typeIndexID = EntityAnnotation.typeIndexID;
+ /** @generated
+ @modifiable */
+ public final static boolean featOkTst = JCasRegistry.getFeatOkTst("org.apache.solr.uima.ts.EntityAnnotation");
+
+
+
+ /** initialize variables to correspond with Cas Type and Features
+ * @generated */
+ public EntityAnnotation_Type(JCas jcas, Type casType) {
+ super(jcas, casType);
+ casImpl.getFSClassRegistry().addGeneratorForType((TypeImpl)this.casType, getFSGenerator());
+
+ }
+}
+
+
+
+
\ No newline at end of file
Added: lucene/dev/trunk/solr/contrib/uima/src/test/java/org/apache/solr/uima/ts/SentimentAnnotation.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/contrib/uima/src/test/java/org/apache/solr/uima/ts/SentimentAnnotation.java?rev=1084045&view=auto
==============================================================================
--- lucene/dev/trunk/solr/contrib/uima/src/test/java/org/apache/solr/uima/ts/SentimentAnnotation.java (added)
+++ lucene/dev/trunk/solr/contrib/uima/src/test/java/org/apache/solr/uima/ts/SentimentAnnotation.java Tue Mar 22 01:01:26 2011
@@ -0,0 +1,80 @@
+
+
+/* First created by JCasGen Fri Mar 04 13:08:40 CET 2011 */
+package org.apache.solr.uima.ts;
+
+import org.apache.uima.jcas.JCas;
+import org.apache.uima.jcas.JCasRegistry;
+import org.apache.uima.jcas.cas.TOP_Type;
+
+import org.apache.uima.jcas.tcas.Annotation;
+
+
+/**
+ * Updated by JCasGen Fri Mar 04 13:08:40 CET 2011
+ * XML source: /Users/tommasoteofili/Documents/workspaces/lucene_workspace/lucene_dev/solr/contrib/uima/src/test/resources/DummySentimentAnalysisAEDescriptor.xml
+ * @generated */
+public class SentimentAnnotation extends Annotation {
+ /** @generated
+ * @ordered
+ */
+ public final static int typeIndexID = JCasRegistry.register(SentimentAnnotation.class);
+ /** @generated
+ * @ordered
+ */
+ public final static int type = typeIndexID;
+ /** @generated */
+ public int getTypeIndexID() {return typeIndexID;}
+
+ /** Never called. Disable default constructor
+ * @generated */
+ protected SentimentAnnotation() {}
+
+ /** Internal - constructor used by generator
+ * @generated */
+ public SentimentAnnotation(int addr, TOP_Type type) {
+ super(addr, type);
+ readObject();
+ }
+
+ /** @generated */
+ public SentimentAnnotation(JCas jcas) {
+ super(jcas);
+ readObject();
+ }
+
+ /** @generated */
+ public SentimentAnnotation(JCas jcas, int begin, int end) {
+ super(jcas);
+ setBegin(begin);
+ setEnd(end);
+ readObject();
+ }
+
+ /** <!-- begin-user-doc -->
+ * Write your own initialization here
+ * <!-- end-user-doc -->
+ @generated modifiable */
+ private void readObject() {}
+
+
+
+ //*--------------*
+ //* Feature: mood
+
+ /** getter for mood - gets
+ * @generated */
+ public String getMood() {
+ if (SentimentAnnotation_Type.featOkTst && ((SentimentAnnotation_Type)jcasType).casFeat_mood == null)
+ jcasType.jcas.throwFeatMissing("mood", "org.apache.solr.uima.ts.SentimentAnnotation");
+ return jcasType.ll_cas.ll_getStringValue(addr, ((SentimentAnnotation_Type)jcasType).casFeatCode_mood);}
+
+ /** setter for mood - sets
+ * @generated */
+ public void setMood(String v) {
+ if (SentimentAnnotation_Type.featOkTst && ((SentimentAnnotation_Type)jcasType).casFeat_mood == null)
+ jcasType.jcas.throwFeatMissing("mood", "org.apache.solr.uima.ts.SentimentAnnotation");
+ jcasType.ll_cas.ll_setStringValue(addr, ((SentimentAnnotation_Type)jcasType).casFeatCode_mood, v);}
+ }
+
+
\ No newline at end of file
Added: lucene/dev/trunk/solr/contrib/uima/src/test/java/org/apache/solr/uima/ts/SentimentAnnotation_Type.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/contrib/uima/src/test/java/org/apache/solr/uima/ts/SentimentAnnotation_Type.java?rev=1084045&view=auto
==============================================================================
--- lucene/dev/trunk/solr/contrib/uima/src/test/java/org/apache/solr/uima/ts/SentimentAnnotation_Type.java (added)
+++ lucene/dev/trunk/solr/contrib/uima/src/test/java/org/apache/solr/uima/ts/SentimentAnnotation_Type.java Tue Mar 22 01:01:26 2011
@@ -0,0 +1,79 @@
+
+/* First created by JCasGen Fri Mar 04 13:08:40 CET 2011 */
+package org.apache.solr.uima.ts;
+
+import org.apache.uima.jcas.JCas;
+import org.apache.uima.jcas.JCasRegistry;
+import org.apache.uima.cas.impl.CASImpl;
+import org.apache.uima.cas.impl.FSGenerator;
+import org.apache.uima.cas.FeatureStructure;
+import org.apache.uima.cas.impl.TypeImpl;
+import org.apache.uima.cas.Type;
+import org.apache.uima.cas.impl.FeatureImpl;
+import org.apache.uima.cas.Feature;
+import org.apache.uima.jcas.tcas.Annotation_Type;
+
+/**
+ * Updated by JCasGen Fri Mar 04 13:08:40 CET 2011
+ * @generated */
+public class SentimentAnnotation_Type extends Annotation_Type {
+ /** @generated */
+ protected FSGenerator getFSGenerator() {return fsGenerator;}
+ /** @generated */
+ private final FSGenerator fsGenerator =
+ new FSGenerator() {
+ public FeatureStructure createFS(int addr, CASImpl cas) {
+ if (SentimentAnnotation_Type.this.useExistingInstance) {
+ // Return eq fs instance if already created
+ FeatureStructure fs = SentimentAnnotation_Type.this.jcas.getJfsFromCaddr(addr);
+ if (null == fs) {
+ fs = new SentimentAnnotation(addr, SentimentAnnotation_Type.this);
+ SentimentAnnotation_Type.this.jcas.putJfsFromCaddr(addr, fs);
+ return fs;
+ }
+ return fs;
+ } else return new SentimentAnnotation(addr, SentimentAnnotation_Type.this);
+ }
+ };
+ /** @generated */
+ public final static int typeIndexID = SentimentAnnotation.typeIndexID;
+ /** @generated
+ @modifiable */
+ public final static boolean featOkTst = JCasRegistry.getFeatOkTst("org.apache.solr.uima.ts.SentimentAnnotation");
+
+ /** @generated */
+ final Feature casFeat_mood;
+ /** @generated */
+ final int casFeatCode_mood;
+ /** @generated */
+ public String getMood(int addr) {
+ if (featOkTst && casFeat_mood == null)
+ jcas.throwFeatMissing("mood", "org.apache.solr.uima.ts.SentimentAnnotation");
+ return ll_cas.ll_getStringValue(addr, casFeatCode_mood);
+ }
+ /** @generated */
+ public void setMood(int addr, String v) {
+ if (featOkTst && casFeat_mood == null)
+ jcas.throwFeatMissing("mood", "org.apache.solr.uima.ts.SentimentAnnotation");
+ ll_cas.ll_setStringValue(addr, casFeatCode_mood, v);}
+
+
+
+
+
+ /** initialize variables to correspond with Cas Type and Features
+ * @generated */
+ public SentimentAnnotation_Type(JCas jcas, Type casType) {
+ super(jcas, casType);
+ casImpl.getFSClassRegistry().addGeneratorForType((TypeImpl)this.casType, getFSGenerator());
+
+
+ casFeat_mood = jcas.getRequiredFeatureDE(casType, "mood", "uima.cas.String", featOkTst);
+ casFeatCode_mood = (null == casFeat_mood) ? JCas.INVALID_FEATURE_CODE : ((FeatureImpl)casFeat_mood).getCode();
+
+ }
+}
+
+
+
+
\ No newline at end of file
Modified: lucene/dev/trunk/solr/contrib/uima/src/test/resources/AggregateSentenceAE.xml
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/contrib/uima/src/test/resources/AggregateSentenceAE.xml?rev=1084045&r1=1084044&r2=1084045&view=diff
==============================================================================
--- lucene/dev/trunk/solr/contrib/uima/src/test/resources/AggregateSentenceAE.xml (original)
+++ lucene/dev/trunk/solr/contrib/uima/src/test/resources/AggregateSentenceAE.xml Tue Mar 22 01:01:26 2011
@@ -14,25 +14,34 @@
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>false</primitive>
<delegateAnalysisEngineSpecifiers>
- <delegateAnalysisEngine key="HmmTagger">
- <import name="HmmTagger"/>
- </delegateAnalysisEngine>
<delegateAnalysisEngine key="WhitespaceTokenizer">
<import name="WhitespaceTokenizer"/>
</delegateAnalysisEngine>
+ <delegateAnalysisEngine key="HmmTagger">
+ <import name="HmmTagger"/>
+ </delegateAnalysisEngine>
</delegateAnalysisEngineSpecifiers>
<analysisEngineMetaData>
<name>AggregateSentenceAE</name>
<description/>
<version>1.0</version>
<vendor/>
- <configurationParameters/>
+ <configurationParameters>
+ <configurationParameter>
+ <name>ngramsize</name>
+ <type>Integer</type>
+ <multiValued>false</multiValued>
+ <mandatory>false</mandatory>
+ <overrides>
+ <parameter>HmmTagger/NGRAM_SIZE</parameter>
+ </overrides>
+ </configurationParameter>
+ </configurationParameters>
<configurationParameterSettings/>
<flowConstraints>
<fixedFlow>
@@ -44,7 +53,10 @@
<capabilities>
<capability>
<inputs/>
- <outputs/>
+ <outputs>
+ <type allAnnotatorFeatures="true">org.apache.uima.SentenceAnnotation</type>
+ <type allAnnotatorFeatures="true">org.apache.uima.TokenAnnotation</type>
+ </outputs>
<languagesSupported/>
</capability>
</capabilities>
Added: lucene/dev/trunk/solr/contrib/uima/src/test/resources/DummyEntityAEDescriptor.xml
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/contrib/uima/src/test/resources/DummyEntityAEDescriptor.xml?rev=1084045&view=auto
==============================================================================
--- lucene/dev/trunk/solr/contrib/uima/src/test/resources/DummyEntityAEDescriptor.xml (added)
+++ lucene/dev/trunk/solr/contrib/uima/src/test/resources/DummyEntityAEDescriptor.xml Tue Mar 22 01:01:26 2011
@@ -0,0 +1,56 @@
+<?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.solr.uima.processor.an.DummyEntityAnnotator</annotatorImplementationName>
+ <analysisEngineMetaData>
+ <name>DummyEntityAEDescriptor</name>
+ <description/>
+ <version>1.0</version>
+ <vendor>ASF</vendor>
+ <configurationParameters/>
+ <configurationParameterSettings/>
+ <typeSystemDescription>
+ <types>
+ <typeDescription>
+ <name>org.apache.solr.uima.ts.EntityAnnotation</name>
+ <description/>
+ <supertypeName>uima.tcas.Annotation</supertypeName>
+ </typeDescription>
+ </types>
+ </typeSystemDescription>
+ <typePriorities/>
+ <fsIndexCollection/>
+ <capabilities>
+ <capability>
+ <inputs/>
+ <outputs>
+ <type allAnnotatorFeatures="true">org.apache.solr.uima.ts.EntityAnnotation</type>
+ </outputs>
+ <languagesSupported/>
+ </capability>
+ </capabilities>
+ <operationalProperties>
+ <modifiesCas>true</modifiesCas>
+ <multipleDeploymentAllowed>true</multipleDeploymentAllowed>
+ <outputsNewCASes>false</outputsNewCASes>
+ </operationalProperties>
+ </analysisEngineMetaData>
+ <resourceManagerConfiguration/>
+</analysisEngineDescription>
Added: lucene/dev/trunk/solr/contrib/uima/src/test/resources/DummySentimentAnalysisAEDescriptor.xml
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/contrib/uima/src/test/resources/DummySentimentAnalysisAEDescriptor.xml?rev=1084045&view=auto
==============================================================================
--- lucene/dev/trunk/solr/contrib/uima/src/test/resources/DummySentimentAnalysisAEDescriptor.xml (added)
+++ lucene/dev/trunk/solr/contrib/uima/src/test/resources/DummySentimentAnalysisAEDescriptor.xml Tue Mar 22 01:01:26 2011
@@ -0,0 +1,60 @@
+<?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.solr.uima.processor.an.DummySentimentAnnotator</annotatorImplementationName>
+ <analysisEngineMetaData>
+ <name>DummySentimentAnalysisAEDescriptor</name>
+ <description/>
+ <version>1.0</version>
+ <vendor>ASF</vendor>
+ <configurationParameters/>
+ <configurationParameterSettings/>
+ <typeSystemDescription>
+ <types>
+ <typeDescription>
+ <name>org.apache.solr.uima.ts.SentimentAnnotation</name>
+ <description/>
+ <supertypeName>uima.tcas.Annotation</supertypeName>
+ <features>
+ <featureDescription>
+ <name>mood</name>
+ <description/>
+ <rangeTypeName>uima.cas.String</rangeTypeName>
+ </featureDescription>
+ </features>
+ </typeDescription>
+ </types>
+ </typeSystemDescription>
+ <typePriorities/>
+ <fsIndexCollection/>
+ <capabilities>
+ <capability>
+ <inputs/>
+ <outputs/>
+ </capability>
+ </capabilities>
+ <operationalProperties>
+ <modifiesCas>true</modifiesCas>
+ <multipleDeploymentAllowed>true</multipleDeploymentAllowed>
+ <outputsNewCASes>false</outputsNewCASes>
+ </operationalProperties>
+ </analysisEngineMetaData>
+ <resourceManagerConfiguration/>
+</analysisEngineDescription>
Modified: lucene/dev/trunk/solr/contrib/uima/src/test/resources/TestAE.xml
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/contrib/uima/src/test/resources/TestAE.xml?rev=1084045&r1=1084044&r2=1084045&view=diff
==============================================================================
--- lucene/dev/trunk/solr/contrib/uima/src/test/resources/TestAE.xml (original)
+++ lucene/dev/trunk/solr/contrib/uima/src/test/resources/TestAE.xml Tue Mar 22 01:01:26 2011
@@ -20,126 +20,38 @@
<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 key="DummyEntityAEDescriptor">
+ <import location="DummyEntityAEDescriptor.xml"/>
+ </delegateAnalysisEngine>
+ <delegateAnalysisEngine key="DummySentimentAnalysisAEDescriptor">
+ <import location="DummySentimentAnalysisAEDescriptor.xml"/>
</delegateAnalysisEngine>
</delegateAnalysisEngineSpecifiers>
<analysisEngineMetaData>
- <name>ExtServicesAE</name>
+ <name>TestAE</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>
+ <configurationParameters>
<configurationParameter>
- <name>entities_apikey</name>
- <type>String</type>
+ <name>ngramsize</name>
+ <type>Integer</type>
<multiValued>false</multiValued>
- <mandatory>true</mandatory>
+ <mandatory>false</mandatory>
<overrides>
- <parameter>TextRankedEntityExtractionAEDescriptor/apikey</parameter>
+ <parameter>AggregateSentenceAE/ngramsize</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>
+ <configurationParameterSettings/>
<flowConstraints>
<fixedFlow>
<node>AggregateSentenceAE</node>
- <node>OpenCalaisAnnotator</node>
- <node>TextCategorizationAEDescriptor</node>
+ <node>DummyEntityAEDescriptor</node>
+ <node>DummySentimentAnalysisAEDescriptor</node>
</fixedFlow>
</flowConstraints>
<fsIndexCollection/>
Modified: lucene/dev/trunk/solr/contrib/uima/src/test/resources/solr-uima/conf/schema.xml
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/contrib/uima/src/test/resources/solr-uima/conf/schema.xml?rev=1084045&r1=1084044&r2=1084045&view=diff
==============================================================================
--- lucene/dev/trunk/solr/contrib/uima/src/test/resources/solr-uima/conf/schema.xml (original)
+++ lucene/dev/trunk/solr/contrib/uima/src/test/resources/solr-uima/conf/schema.xml Tue Mar 22 01:01:26 2011
@@ -562,11 +562,9 @@
-->
<field name="language" type="string" indexed="true" stored="true" required="false"/>
- <field name="concept" type="string" indexed="true" stored="true" multiValued="true" required="false"/>
- <field name="keyword" type="string" indexed="true" stored="true" multiValued="true" required="false"/>
- <field name="suggested_category" type="string" indexed="true" stored="true" multiValued="false" required="false"/>
<field name="sentence" type="text" indexed="true" stored="true" multiValued="true" required="false" />
- <dynamicField name="entity*" type="text" indexed="true" stored="true" multiValued="true"/>
+ <field name="sentiment" type="string" indexed="true" stored="true" multiValued="true"/>
+ <field name="entity" type="text" indexed="true" stored="true" multiValued="true"/>
<!--
Dynamic field definitions. If a field name is not found,
Modified: lucene/dev/trunk/solr/contrib/uima/src/test/resources/solr-uima/conf/solrconfig.xml
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/contrib/uima/src/test/resources/solr-uima/conf/solrconfig.xml?rev=1084045&r1=1084044&r2=1084045&view=diff
==============================================================================
--- lucene/dev/trunk/solr/contrib/uima/src/test/resources/solr-uima/conf/solrconfig.xml (original)
+++ lucene/dev/trunk/solr/contrib/uima/src/test/resources/solr-uima/conf/solrconfig.xml Tue Mar 22 01:01:26 2011
@@ -1064,38 +1064,21 @@
<uimaConfig>
<runtimeParameters>
- <keyword_apikey>04490000a72fe7ec5cb3497f14e77f338c86f2fe</keyword_apikey>
- <concept_apikey>04490000a72fe7ec5cb3497f14e77f338c86f2fe</concept_apikey>
- <lang_apikey>04490000a72fe7ec5cb3497f14e77f338c86f2fe</lang_apikey>
- <cat_apikey>04490000a72fe7ec5cb3497f14e77f338c86f2fe</cat_apikey>
- <entities_apikey>04490000a72fe7ec5cb3497f14e77f338c86f2fe</entities_apikey>
- <oc_licenseID>g6h9zamsdtwhb93nc247ecrs</oc_licenseID>
+ <ngramsize>3</ngramsize>
</runtimeParameters>
<analysisEngine>/TestAE.xml</analysisEngine>
<analyzeFields merge="false">text</analyzeFields>
<fieldMapping>
- <type name="org.apache.uima.alchemy.ts.categorization.Category">
- <map feature="text" field="suggested_category"/>
- </type>
- <type name="org.apache.uima.alchemy.ts.concept.ConceptFS">
- <map feature="text" field="concept"/>
+ <type name="org.apache.uima.SentenceAnnotation">
+ <map feature="coveredText" field="sentence"/>
</type>
- <type name="org.apache.uima.alchemy.ts.entity.BaseEntity">
- <map feature="text" field="entity"/>
+ <type name="org.apache.solr.uima.ts.SentimentAnnotation">
+ <map feature="mood" field="sentiment"/>
</type>
- <type name="org.apache.uima.calais.BaseType">
+ <type name="org.apache.solr.uima.ts.EntityAnnotation">
<map feature="coveredText" field="entity"/>
</type>
- <type name="org.apache.uima.alchemy.ts.keywords.KeywordFS">
- <map feature="text" field="keyword"/>
- </type>
- <type name="org.apache.uima.alchemy.ts.language.LanguageFS">
- <map feature="language" field="language"/>
- </type>
- <type name="org.apache.uima.SentenceAnnotation">
- <map feature="coveredText" field="sentence"/>
- </type>
</fieldMapping>
</uimaConfig>
-
+
</config>