You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@clerezza.apache.org by to...@apache.org on 2011/06/03 18:13:34 UTC
svn commit: r1131087 - in /incubator/clerezza/trunk/parent/uima:
uima.concept-tagging/
uima.concept-tagging/src/main/java/org/apache/clerezza/uima/concept/
uima.concept-tagging/src/main/resources/
uima.concept-tagging/src/main/resources/META-INF/ uima....
Author: tommaso
Date: Fri Jun 3 16:13:33 2011
New Revision: 1131087
URL: http://svn.apache.org/viewvc?rev=1131087&view=rev
Log:
[CLEREZZA-558] - added builder pattern to AEProvider (including possiblity to define delegate classloader as a parameter) that is used in UIMAExecutorFactory to create a UIMAExecutor accordingly
Added:
incubator/clerezza/trunk/parent/uima/uima.concept-tagging/src/main/resources/META-INF/
incubator/clerezza/trunk/parent/uima/uima.concept-tagging/src/main/resources/META-INF/AggregateResourceTaggerAE.xml
incubator/clerezza/trunk/parent/uima/uima.concept-tagging/src/main/resources/META-INF/ClerezzaCASConsumerDescriptor.xml
incubator/clerezza/trunk/parent/uima/uima.concept-tagging/src/main/resources/META-INF/UrlConceptTaggingAEDescriptor.xml
incubator/clerezza/trunk/parent/uima/uima.concept-tagging/src/test/java/org/
incubator/clerezza/trunk/parent/uima/uima.concept-tagging/src/test/java/org/apache/
incubator/clerezza/trunk/parent/uima/uima.concept-tagging/src/test/java/org/apache/clerezza/
incubator/clerezza/trunk/parent/uima/uima.concept-tagging/src/test/java/org/apache/clerezza/uima/
incubator/clerezza/trunk/parent/uima/uima.concept-tagging/src/test/java/org/apache/clerezza/uima/concept/
incubator/clerezza/trunk/parent/uima/uima.utils/src/main/java/org/apache/clerezza/uima/utils/UIMAExecutorFactory.java
incubator/clerezza/trunk/parent/uima/uima.utils/src/main/resources/META-INF/
incubator/clerezza/trunk/parent/uima/uima.utils/src/main/resources/META-INF/ExtServicesAE.xml
incubator/clerezza/trunk/parent/uima/uima.utils/src/main/resources/META-INF/OpenCalaisAnnotator.xml
incubator/clerezza/trunk/parent/uima/uima.utils/src/main/resources/META-INF/TextCategorizationAEDescriptor.xml
incubator/clerezza/trunk/parent/uima/uima.utils/src/main/resources/META-INF/TextConceptTaggingAEDescriptor.xml
incubator/clerezza/trunk/parent/uima/uima.utils/src/main/resources/META-INF/TextKeywordExtractionAEDescriptor.xml
incubator/clerezza/trunk/parent/uima/uima.utils/src/main/resources/META-INF/TextLanguageDetectionAEDescriptor.xml
Removed:
incubator/clerezza/trunk/parent/uima/uima.concept-tagging/src/main/resources/AggregateResourceTaggerAE.xml
incubator/clerezza/trunk/parent/uima/uima.concept-tagging/src/main/resources/ClerezzaCASConsumerDescriptor.xml
incubator/clerezza/trunk/parent/uima/uima.concept-tagging/src/main/resources/UrlConceptTaggingAEDescriptor.xml
incubator/clerezza/trunk/parent/uima/uima.utils/src/main/java/org/apache/clerezza/uima/utils/exception/ExecutionWithoutResultsException.java
incubator/clerezza/trunk/parent/uima/uima.utils/src/main/resources/ExtServicesAE.xml
incubator/clerezza/trunk/parent/uima/uima.utils/src/main/resources/OpenCalaisAnnotator.xml
incubator/clerezza/trunk/parent/uima/uima.utils/src/main/resources/TextCategorizationAEDescriptor.xml
incubator/clerezza/trunk/parent/uima/uima.utils/src/main/resources/TextConceptTaggingAEDescriptor.xml
incubator/clerezza/trunk/parent/uima/uima.utils/src/main/resources/TextKeywordExtractionAEDescriptor.xml
incubator/clerezza/trunk/parent/uima/uima.utils/src/main/resources/TextLanguageDetectionAEDescriptor.xml
Modified:
incubator/clerezza/trunk/parent/uima/uima.concept-tagging/pom.xml
incubator/clerezza/trunk/parent/uima/uima.concept-tagging/src/main/java/org/apache/clerezza/uima/concept/UIMARemoteResourceTaggerService.java
incubator/clerezza/trunk/parent/uima/uima.metadata-generator/pom.xml
incubator/clerezza/trunk/parent/uima/uima.metadata-generator/src/main/java/org/apache/clerezza/uima/metadatagenerator/UIMABaseMetadataGenerator.java
incubator/clerezza/trunk/parent/uima/uima.utils/src/main/java/org/apache/clerezza/uima/utils/AEProvider.java
incubator/clerezza/trunk/parent/uima/uima.utils/src/main/java/org/apache/clerezza/uima/utils/ExternalServicesFacade.java
incubator/clerezza/trunk/parent/uima/uima.utils/src/main/java/org/apache/clerezza/uima/utils/UIMAExecutor.java
incubator/clerezza/trunk/parent/uima/uima.utils/src/test/java/org/apache/clerezza/uima/utils/AEProviderTest.java
incubator/clerezza/trunk/parent/uima/uima.utils/src/test/java/org/apache/clerezza/uima/utils/UIMAExecutorTest.java
Modified: incubator/clerezza/trunk/parent/uima/uima.concept-tagging/pom.xml
URL: http://svn.apache.org/viewvc/incubator/clerezza/trunk/parent/uima/uima.concept-tagging/pom.xml?rev=1131087&r1=1131086&r2=1131087&view=diff
==============================================================================
--- incubator/clerezza/trunk/parent/uima/uima.concept-tagging/pom.xml (original)
+++ incubator/clerezza/trunk/parent/uima/uima.concept-tagging/pom.xml Fri Jun 3 16:13:33 2011
@@ -5,8 +5,7 @@
<artifactId>uima.concept-tagging</artifactId>
<version>0.1-incubating-SNAPSHOT</version>
<packaging>bundle</packaging>
- <name>Apache Clerezza UIMA extension for concept tagging</name>
- <description>Apache Clerezza UIMA extension for concept (SKOS) tagging</description>
+ <name> Clerezza - Apache UIMA extension for concept tagging</name>
<parent>
<groupId>org.apache.clerezza</groupId>
<artifactId>uima</artifactId>
@@ -24,6 +23,10 @@
</dependency>
<dependency>
<groupId>org.apache.clerezza</groupId>
+ <artifactId>triaxrs</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.clerezza</groupId>
<artifactId>uima.casconsumer</artifactId>
<version>0.1-incubating-SNAPSHOT</version>
<scope>runtime</scope>
@@ -37,10 +40,20 @@
<artifactId>alchemy-annotator-osgi</artifactId>
<version>2.3.1-SNAPSHOT</version>
</dependency>
- <dependency>
- <groupId>org.apache.uima</groupId>
- <artifactId>OpenCalaisAnnotator-osgi</artifactId>
- <version>2.3.1-SNAPSHOT</version>
- </dependency>
</dependencies>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>maven-bundle-plugin</artifactId>
+ <extensions>true</extensions>
+ <configuration>
+ <instructions>
+ <Import-Package>org.slf4j.*;resolution:=optional,*</Import-Package>
+ <Export-Package>org.apache.clerezza.uima.concept.*</Export-Package>
+ </instructions>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
</project>
Modified: incubator/clerezza/trunk/parent/uima/uima.concept-tagging/src/main/java/org/apache/clerezza/uima/concept/UIMARemoteResourceTaggerService.java
URL: http://svn.apache.org/viewvc/incubator/clerezza/trunk/parent/uima/uima.concept-tagging/src/main/java/org/apache/clerezza/uima/concept/UIMARemoteResourceTaggerService.java?rev=1131087&r1=1131086&r2=1131087&view=diff
==============================================================================
--- incubator/clerezza/trunk/parent/uima/uima.concept-tagging/src/main/java/org/apache/clerezza/uima/concept/UIMARemoteResourceTaggerService.java (original)
+++ incubator/clerezza/trunk/parent/uima/uima.concept-tagging/src/main/java/org/apache/clerezza/uima/concept/UIMARemoteResourceTaggerService.java Fri Jun 3 16:13:33 2011
@@ -1,18 +1,34 @@
+/*
+ * 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.clerezza.uima.concept;
import org.apache.clerezza.rdf.core.Graph;
import org.apache.clerezza.rdf.core.UriRef;
import org.apache.clerezza.rdf.core.access.TcManager;
import org.apache.clerezza.uima.utils.UIMAExecutor;
+import org.apache.clerezza.uima.utils.UIMAExecutorFactory;
import org.apache.felix.scr.annotations.Component;
import org.apache.felix.scr.annotations.Property;
import org.apache.felix.scr.annotations.Service;
-import org.apache.uima.analysis_engine.AnalysisEngineProcessException;
import javax.ws.rs.*;
import javax.ws.rs.core.Response;
-import java.io.File;
-import java.net.MalformedURLException;
import java.util.HashMap;
import java.util.Map;
@@ -26,30 +42,25 @@ import java.util.Map;
@Path("/resourcetagger")
public class UIMARemoteResourceTaggerService {
- private static final String PATH = "/AggregateResourceTaggerAE.xml";
+ private static final String PATH = "META-INF/AggregateResourceTaggerAE.xml";
+ private static final String OUTPUTGRAPH = "outputgraph";
+ private static final String ALCHEMYKEY = "alchemykey";
@GET
@Path("tag")
@Produces("application/rdf+xml")
public Graph tagUri(@QueryParam("uri") String uri, @QueryParam("key") String key) {
-
if (uri == null || uri.length() == 0)
throw new WebApplicationException(Response.status(
Response.Status.BAD_REQUEST).entity(new StringBuilder("No URI specified").toString()).build());
- try {
- System.err.println(new File(PATH).toURI().toURL());
- } catch (MalformedURLException e) {
- e.printStackTrace();
- }
- UIMAExecutor executor = new UIMAExecutor(PATH).withResults();
+ UIMAExecutor executor = UIMAExecutorFactory.getInstance().createUIMAExecutor(getClass().getClassLoader());
Map<String, Object> parameters = new HashMap<String, Object>();
- parameters.put("outputgraph",uri);
- parameters.put("alchemykey", key);
+ parameters.put(OUTPUTGRAPH, uri);
+ parameters.put(ALCHEMYKEY, key);
try {
- executor.analyzeDocument("/AggregateResourceTaggerAE.xml", uri, parameters);
- } catch (AnalysisEngineProcessException e) {
- e.printStackTrace();
+ executor.analyzeDocument(uri, PATH, parameters);
+ } catch (Exception e) {
throw new WebApplicationException(Response.status(
Response.Status.INTERNAL_SERVER_ERROR).entity(new StringBuilder("Failed UIMA execution on URI ").
append(uri).append(" due to \n").append(e.getLocalizedMessage()).toString()).build());
Added: incubator/clerezza/trunk/parent/uima/uima.concept-tagging/src/main/resources/META-INF/AggregateResourceTaggerAE.xml
URL: http://svn.apache.org/viewvc/incubator/clerezza/trunk/parent/uima/uima.concept-tagging/src/main/resources/META-INF/AggregateResourceTaggerAE.xml?rev=1131087&view=auto
==============================================================================
--- incubator/clerezza/trunk/parent/uima/uima.concept-tagging/src/main/resources/META-INF/AggregateResourceTaggerAE.xml (added)
+++ incubator/clerezza/trunk/parent/uima/uima.concept-tagging/src/main/resources/META-INF/AggregateResourceTaggerAE.xml Fri Jun 3 16:13:33 2011
@@ -0,0 +1,73 @@
+<?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="UrlConceptTaggingAEDescriptor">
+ <import location="UrlConceptTaggingAEDescriptor.xml"/>
+ </delegateAnalysisEngine>
+ <delegateAnalysisEngine key="ClerezzaCASConsumerDescriptor">
+ <import location="ClerezzaCASConsumerDescriptor.xml"/>
+ </delegateAnalysisEngine>
+ </delegateAnalysisEngineSpecifiers>
+ <analysisEngineMetaData>
+ <name>AggregateResourceTaggerAE</name>
+ <description/>
+ <version>1.0</version>
+ <vendor/>
+ <configurationParameters>
+ <configurationParameter>
+ <name>outputgraph</name>
+ <type>String</type>
+ <multiValued>false</multiValued>
+ <mandatory>true</mandatory>
+ <overrides>
+ <parameter>ClerezzaCASConsumerDescriptor/graphName</parameter>
+ </overrides>
+ </configurationParameter>
+ <configurationParameter>
+ <name>alchemykey</name>
+ <type>String</type>
+ <multiValued>false</multiValued>
+ <mandatory>true</mandatory>
+ <overrides>
+ <parameter>UrlConceptTaggingAEDescriptor/apikey</parameter>
+ </overrides>
+ </configurationParameter>
+ </configurationParameters>
+ <configurationParameterSettings>
+ <nameValuePair>
+ <name>outputgraph</name>
+ <value>
+ <string></string>
+ </value>
+ </nameValuePair>
+ <nameValuePair>
+ <name>alchemykey</name>
+ <value>
+ <string></string>
+ </value>
+ </nameValuePair>
+ </configurationParameterSettings>>
+ <flowConstraints>
+ <fixedFlow>
+ <node>UrlConceptTaggingAEDescriptor</node>
+ <node>ClerezzaCASConsumerDescriptor</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>
Added: incubator/clerezza/trunk/parent/uima/uima.concept-tagging/src/main/resources/META-INF/ClerezzaCASConsumerDescriptor.xml
URL: http://svn.apache.org/viewvc/incubator/clerezza/trunk/parent/uima/uima.concept-tagging/src/main/resources/META-INF/ClerezzaCASConsumerDescriptor.xml?rev=1131087&view=auto
==============================================================================
--- incubator/clerezza/trunk/parent/uima/uima.concept-tagging/src/main/resources/META-INF/ClerezzaCASConsumerDescriptor.xml (added)
+++ incubator/clerezza/trunk/parent/uima/uima.concept-tagging/src/main/resources/META-INF/ClerezzaCASConsumerDescriptor.xml Fri Jun 3 16:13:33 2011
@@ -0,0 +1,79 @@
+<?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.clerezza.uima.casconsumer.ClerezzaCASConsumer</annotatorImplementationName>
+ <analysisEngineMetaData>
+ <name>ClerezzaCASConsumerDescriptor</name>
+ <description>CAS Consumer to produce Clerezza graphs</description>
+ <version>1.0</version>
+ <vendor/>
+ <configurationParameters>
+ <configurationParameter>
+ <name>graphName</name>
+ <type>String</type>
+ <multiValued>false</multiValued>
+ <mandatory>true</mandatory>
+ </configurationParameter>
+ <configurationParameter>
+ <name>casModelFile</name>
+ <type>String</type>
+ <multiValued>false</multiValued>
+ <mandatory>true</mandatory>
+ </configurationParameter>
+ </configurationParameters>
+ <configurationParameterSettings>
+ <nameValuePair>
+ <name>graphName</name>
+ <value>
+ <string></string>
+ </value>
+ </nameValuePair>
+ <nameValuePair>
+ <name>casModelFile</name>
+ <value>
+ <string></string>
+ </value>
+ </nameValuePair>
+ </configurationParameterSettings>
+ <typeSystemDescription>
+ <types>
+ </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>
Added: incubator/clerezza/trunk/parent/uima/uima.concept-tagging/src/main/resources/META-INF/UrlConceptTaggingAEDescriptor.xml
URL: http://svn.apache.org/viewvc/incubator/clerezza/trunk/parent/uima/uima.concept-tagging/src/main/resources/META-INF/UrlConceptTaggingAEDescriptor.xml?rev=1131087&view=auto
==============================================================================
--- incubator/clerezza/trunk/parent/uima/uima.concept-tagging/src/main/resources/META-INF/UrlConceptTaggingAEDescriptor.xml (added)
+++ incubator/clerezza/trunk/parent/uima/uima.concept-tagging/src/main/resources/META-INF/UrlConceptTaggingAEDescriptor.xml Fri Jun 3 16:13:33 2011
@@ -0,0 +1,196 @@
+<?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.URLConceptTaggingAnnotator</annotatorImplementationName>
+ <analysisEngineMetaData>
+ <name>UrlConceptTaggingAEDescriptor</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>
Modified: incubator/clerezza/trunk/parent/uima/uima.metadata-generator/pom.xml
URL: http://svn.apache.org/viewvc/incubator/clerezza/trunk/parent/uima/uima.metadata-generator/pom.xml?rev=1131087&r1=1131086&r2=1131087&view=diff
==============================================================================
--- incubator/clerezza/trunk/parent/uima/uima.metadata-generator/pom.xml (original)
+++ incubator/clerezza/trunk/parent/uima/uima.metadata-generator/pom.xml Fri Jun 3 16:13:33 2011
@@ -5,8 +5,7 @@
<artifactId>uima.metadata-generator</artifactId>
<version>0.1-incubating-SNAPSHOT</version>
<packaging>bundle</packaging>
- <name>Clerezza - Apache Clerezza UIMA extension for metadata generation</name>
- <description>Apache Clerezza UIMA extension for metadata generation</description>
+ <name>Clerezza - Apache UIMA extension for metadata generation</name>
<parent>
<groupId>org.apache.clerezza</groupId>
<artifactId>uima</artifactId>
Modified: incubator/clerezza/trunk/parent/uima/uima.metadata-generator/src/main/java/org/apache/clerezza/uima/metadatagenerator/UIMABaseMetadataGenerator.java
URL: http://svn.apache.org/viewvc/incubator/clerezza/trunk/parent/uima/uima.metadata-generator/src/main/java/org/apache/clerezza/uima/metadatagenerator/UIMABaseMetadataGenerator.java?rev=1131087&r1=1131086&r2=1131087&view=diff
==============================================================================
--- incubator/clerezza/trunk/parent/uima/uima.metadata-generator/src/main/java/org/apache/clerezza/uima/metadatagenerator/UIMABaseMetadataGenerator.java (original)
+++ incubator/clerezza/trunk/parent/uima/uima.metadata-generator/src/main/java/org/apache/clerezza/uima/metadatagenerator/UIMABaseMetadataGenerator.java Fri Jun 3 16:13:33 2011
@@ -117,14 +117,14 @@ public class UIMABaseMetadataGenerator i
private void addCategory(GraphNode node, String data) throws UIMAException {
// get category to bind it to the node
- FeatureStructure categoryFS = this.facade.getCategory(data);
+ FeatureStructure categoryFS = facade.getCategory(data);
String category = categoryFS.getStringValue(categoryFS.getType().getFeatureByBaseName("text"));
node.addPropertyValue(DC.subject, category);
}
private void addLanguage(GraphNode node, String data) throws UIMAException {
// get language to bind it to the node
- FeatureStructure languageFS = this.facade.getLanguage(data);
+ FeatureStructure languageFS = facade.getLanguage(data);
String language = languageFS.getStringValue(languageFS.getType().getFeatureByBaseName("language"));
node.addPropertyValue(DCTERMS.language, language);
}
@@ -139,7 +139,7 @@ public class UIMABaseMetadataGenerator i
private void addTags(GraphNode existingNode, String data) throws UIMAException {
// analyze document text and get the corresponding AlchemyAPI Tags
- List<FeatureStructure> alchemyAPITags = this.facade.getTags(data);
+ List<FeatureStructure> alchemyAPITags = facade.getTags(data);
// convert tags to nodes inside the current graph
UIMAUtils.enhanceNode(existingNode, alchemyAPITags);
}
Modified: incubator/clerezza/trunk/parent/uima/uima.utils/src/main/java/org/apache/clerezza/uima/utils/AEProvider.java
URL: http://svn.apache.org/viewvc/incubator/clerezza/trunk/parent/uima/uima.utils/src/main/java/org/apache/clerezza/uima/utils/AEProvider.java?rev=1131087&r1=1131086&r2=1131087&view=diff
==============================================================================
--- incubator/clerezza/trunk/parent/uima/uima.utils/src/main/java/org/apache/clerezza/uima/utils/AEProvider.java (original)
+++ incubator/clerezza/trunk/parent/uima/uima.utils/src/main/java/org/apache/clerezza/uima/utils/AEProvider.java Fri Jun 3 16:13:33 2011
@@ -26,8 +26,8 @@ import org.apache.uima.resource.Resource
import org.apache.uima.util.XMLInputSource;
import java.io.File;
+import java.net.MalformedURLException;
import java.net.URL;
-import java.rmi.activation.Activator;
import java.util.Map;
/**
@@ -37,17 +37,20 @@ import java.util.Map;
public class AEProvider {
private static String defaultXMLPath;
+ private ClassLoader delegateClassloader;
public AEProvider() {
- defaultXMLPath = "/ExtServicesAE.xml";
+ defaultXMLPath = "/META-INF/ExtServicesAE.xml"; // if no default is specified use the bundled ext services descriptor
}
- public AEProvider(String xmlDescriptorPath) {
+ public AEProvider withDefaultDescriptor(String xmlDescriptorPath) {
defaultXMLPath = xmlDescriptorPath;
+ return this;
}
- public String getDefaultXMLPath() {
- return defaultXMLPath;
+ public AEProvider withDelegateClassloader(ClassLoader classLoader) {
+ delegateClassloader = classLoader;
+ return this;
}
/**
@@ -85,22 +88,27 @@ public class AEProvider {
return ae;
}
- private URL createURLFromPath(String filePath) {
- System.err.println(filePath);
- try {
+ private URL createURLFromPath(String filePath) throws MalformedURLException {
+ URL url;
+ // try classpath
+ if (delegateClassloader != null)
+ url = delegateClassloader.getResource(filePath);
+ else
+ url = getClass().getResource(filePath);
+
+ // else try file
+ if (url == null) {
File f = new File(filePath);
- if (f.exists())
- return f.toURI().toURL();
- else
- return Activator.class.getResource(filePath);
- }
- catch (Exception e) {
- return Activator.class.getResource(filePath);
+ if (f.exists()) {
+ url = f.toURI().toURL();
+ } else
+ throw new MalformedURLException();
}
+ return url;
}
public AnalysisEngine getAE(String filePath, Map<String, Object> parameterSettings) throws ResourceInitializationException {
- AnalysisEngine ae = null;
+ AnalysisEngine ae;
// get Resource Specifier from XML file
try {
URL url = createURLFromPath(filePath);
@@ -109,13 +117,12 @@ public class AEProvider {
// eventually add/override descriptor's configuration parameters
AnalysisEngineDescription desc = UIMAFramework.getXMLParser().parseAnalysisEngineDescription(in);
for (String parameter : parameterSettings.keySet()) {
- if (desc.getAnalysisEngineMetaData().getConfigurationParameterSettings().getParameterValue(parameter)!=null)
- desc.getAnalysisEngineMetaData().getConfigurationParameterSettings().setParameterValue(parameter,parameterSettings.get(parameter));
+ if (desc.getAnalysisEngineMetaData().getConfigurationParameterSettings().getParameterValue(parameter) != null)
+ desc.getAnalysisEngineMetaData().getConfigurationParameterSettings().setParameterValue(parameter, parameterSettings.get(parameter));
}
// create AE here
ae = UIMAFramework.produceAnalysisEngine(desc);
-
} catch (Exception e) {
throw new ResourceInitializationException(e);
}
Modified: incubator/clerezza/trunk/parent/uima/uima.utils/src/main/java/org/apache/clerezza/uima/utils/ExternalServicesFacade.java
URL: http://svn.apache.org/viewvc/incubator/clerezza/trunk/parent/uima/uima.utils/src/main/java/org/apache/clerezza/uima/utils/ExternalServicesFacade.java?rev=1131087&r1=1131086&r2=1131087&view=diff
==============================================================================
--- incubator/clerezza/trunk/parent/uima/uima.utils/src/main/java/org/apache/clerezza/uima/utils/ExternalServicesFacade.java (original)
+++ incubator/clerezza/trunk/parent/uima/uima.utils/src/main/java/org/apache/clerezza/uima/utils/ExternalServicesFacade.java Fri Jun 3 16:13:33 2011
@@ -41,7 +41,7 @@ public class ExternalServicesFacade impl
private Map<String, Object> parameterSetting = new HashMap<String, Object>();
public ExternalServicesFacade() {
- this.uimaExecutor = new UIMAExecutor("/ExtServicesAE.xml").withResults();
+ this.uimaExecutor = UIMAExecutorFactory.getInstance().createUIMAExecutor();
}
public List<FeatureStructure> getTags(String document) throws UIMAException {
@@ -50,10 +50,7 @@ public class ExternalServicesFacade impl
try {
// analyze the document
- uimaExecutor.analyzeDocument(document, "/TextKeywordExtractionAEDescriptor.xml", getParameterSetting());
-
- // get execution results
- JCas jcas = uimaExecutor.getResults();
+ JCas jcas = uimaExecutor.analyzeDocument(document, "/TextKeywordExtractionAEDescriptor.xml", getParameterSetting());
// get AlchemyAPI keywords extracted using UIMA
keywords.addAll(UIMAUtils.getAllFSofType(KeywordFS.type, jcas));
@@ -72,10 +69,7 @@ public class ExternalServicesFacade impl
try {
// analyze the document
- uimaExecutor.analyzeDocument(document, "/TextLanguageDetectionAEDescriptor.xml", getParameterSetting());
-
- // get execution results
- JCas jcas = uimaExecutor.getResults();
+ JCas jcas =uimaExecutor.analyzeDocument(document, "/TextLanguageDetectionAEDescriptor.xml", getParameterSetting());
// extract language Feature Structure using AlchemyAPI Annotator
languageFS = UIMAUtils.getSingletonFeatureStructure(LanguageFS.type, jcas);
@@ -94,10 +88,7 @@ public class ExternalServicesFacade impl
try {
// analyze the document
- uimaExecutor.analyzeDocument(document, "/OpenCalaisAnnotator.xml", getParameterSetting());
-
- // get execution results
- JCas jcas = uimaExecutor.getResults();
+ JCas jcas = uimaExecutor.analyzeDocument(document, "/OpenCalaisAnnotator.xml", getParameterSetting());
// extract entities using OpenCalaisAnnotator
calaisAnnotations.addAll(UIMAUtils.getAllAnnotationsOfType(org.apache.uima.calais.BaseType.type, jcas));
@@ -113,10 +104,7 @@ public class ExternalServicesFacade impl
try {
// analyze the document
- uimaExecutor.analyzeDocument(document, "/TextCategorizationAEDescriptor.xml", getParameterSetting());
-
- // get execution results
- JCas jcas = uimaExecutor.getResults();
+ JCas jcas = uimaExecutor.analyzeDocument(document, "/TextCategorizationAEDescriptor.xml", getParameterSetting());
// extract category Feature Structure using AlchemyAPI Annotator
categoryFS = UIMAUtils.getSingletonFeatureStructure(Category.type, jcas);
@@ -134,10 +122,7 @@ public class ExternalServicesFacade impl
try {
// analyze the document
- uimaExecutor.analyzeDocument(document, "/TextConceptTaggingAEDescriptor.xml", getParameterSetting());
-
- // get execution results
- JCas jcas = uimaExecutor.getResults();
+ JCas jcas = uimaExecutor.analyzeDocument(document, "/TextConceptTaggingAEDescriptor.xml", getParameterSetting());
// get AlchemyAPI concepts extracted using UIMA
concepts.addAll(UIMAUtils.getAllFSofType(ConceptFS.type, jcas));
Modified: incubator/clerezza/trunk/parent/uima/uima.utils/src/main/java/org/apache/clerezza/uima/utils/UIMAExecutor.java
URL: http://svn.apache.org/viewvc/incubator/clerezza/trunk/parent/uima/uima.utils/src/main/java/org/apache/clerezza/uima/utils/UIMAExecutor.java?rev=1131087&r1=1131086&r2=1131087&view=diff
==============================================================================
--- incubator/clerezza/trunk/parent/uima/uima.utils/src/main/java/org/apache/clerezza/uima/utils/UIMAExecutor.java (original)
+++ incubator/clerezza/trunk/parent/uima/uima.utils/src/main/java/org/apache/clerezza/uima/utils/UIMAExecutor.java Fri Jun 3 16:13:33 2011
@@ -18,7 +18,6 @@
*/
package org.apache.clerezza.uima.utils;
-import org.apache.clerezza.uima.utils.exception.ExecutionWithoutResultsException;
import org.apache.uima.analysis_engine.AnalysisEngine;
import org.apache.uima.analysis_engine.AnalysisEngineProcessException;
import org.apache.uima.jcas.JCas;
@@ -27,105 +26,62 @@ import org.apache.uima.resource.Resource
import java.util.Map;
/**
- * Executes a UIMA pipeline eventually collecting results in a {@link JCas}
- *
+ * Executes UIMA pipelines collecting results in a {@link JCas}
*/
public class UIMAExecutor {
- private transient final AEProvider aeProvider;
+ private AEProvider aeProvider;
- private boolean withResults;
+ public UIMAExecutor(AEProvider aeProvider) {
+ this.aeProvider = aeProvider;
+ }
+
+ /**
+ * analyze a text document using with this executor
+ *
+ * @param doc
+ * @throws AnalysisEngineProcessException
+ */
+ public void analyzeDocument(String doc) throws AnalysisEngineProcessException {
+ analyzeDocument(doc);
+ }
- private JCas results;
+ /**
+ * analyze a text document specifying a different Analysis Engine descriptor path
+ *
+ * @param doc
+ * @param xmlPath
+ * @throws AnalysisEngineProcessException,
+ * ResourceInitializationException
+ */
+ public JCas analyzeDocument(String doc, String xmlPath) throws AnalysisEngineProcessException, ResourceInitializationException {
+ return executeAE(aeProvider.getAE(xmlPath), doc);
+ }
- @SuppressWarnings("unused")
- private UIMAExecutor() {
- // cannot instantiate without arguments
- aeProvider = null;
- }
-
- public UIMAExecutor(String xmlDescriptorPath) {
- withResults = false;
- aeProvider = new AEProvider(xmlDescriptorPath);
- }
-
- public UIMAExecutor withResults() {
- this.withResults = true;
- return this;
- }
-
- /**
- * analyze a text document using with this executor
- *
- * @param doc
- * @throws AnalysisEngineProcessException
- */
- public void analyzeDocument(String doc) throws AnalysisEngineProcessException {
- analyzeDocument(doc, aeProvider.getDefaultXMLPath());
- }
-
- /**
- * analyze a text document specifying a different Analysis Engine descriptor path
- *
- * @param doc
- * @param xmlPath
- * @throws AnalysisEngineProcessException
- */
- public void analyzeDocument(String doc, String xmlPath) throws AnalysisEngineProcessException {
- try {
- this.executeAE(aeProvider.getAE(xmlPath), doc);
- } catch (ResourceInitializationException e) {
- throw new AnalysisEngineProcessException(e);
- }
- }
-
- /**
- * analyze a text document specifying a different Analysis Engine descriptor path and specific Analysis Engine parameter settings
- *
- * @param doc
- * @param xmlPath
- * @param aeParameterSettings
- * @throws AnalysisEngineProcessException
- */
- public void analyzeDocument(String doc, String xmlPath, Map<String, Object> aeParameterSettings) throws AnalysisEngineProcessException {
- try {
- AnalysisEngine engine = aeProvider.getAE(xmlPath,aeParameterSettings);
- this.executeAE(engine, doc);
- } catch (ResourceInitializationException e) {
- throw new AnalysisEngineProcessException(e);
- }
- }
-
- private void executeAE(AnalysisEngine ae, String docText) throws AnalysisEngineProcessException {
- try {
- // create a JCas, given an Analysis Engine (ae)
- JCas jcas = ae.newJCas();
-
- // analyze a document
- jcas.setDocumentText(docText);
-
- ae.process(jcas);
-
- if (withResults) {
- setResults(jcas);
- } else
- jcas.reset();
- } catch (Exception e) {
- throw new AnalysisEngineProcessException(e);
- }
-
- }
-
-
- public JCas getResults() {
- if (!withResults)
- throw new ExecutionWithoutResultsException();
- return results;
- }
+ /**
+ * analyze a text document specifying a different Analysis Engine descriptor path and specific Analysis Engine parameter settings
+ *
+ * @param doc
+ * @param xmlPath
+ * @param aeParameterSettings
+ * @throws AnalysisEngineProcessException,
+ * ResourceInitializationException
+ */
+ public JCas analyzeDocument(String doc, String xmlPath, Map<String, Object> aeParameterSettings) throws AnalysisEngineProcessException, ResourceInitializationException {
+ AnalysisEngine engine = aeProvider.getAE(xmlPath, aeParameterSettings);
+ return executeAE(engine, doc);
+ }
- private void setResults(JCas jcas) {
- this.results = jcas;
+ private JCas executeAE(AnalysisEngine ae, String docText) throws AnalysisEngineProcessException, ResourceInitializationException {
+ // create a JCas, given an Analysis Engine (ae)
+ JCas jcas = ae.newJCas();
+
+ // analyze a document text
+ jcas.setDocumentText(docText);
+ ae.process(jcas);
+ return jcas;
}
+
}
Added: incubator/clerezza/trunk/parent/uima/uima.utils/src/main/java/org/apache/clerezza/uima/utils/UIMAExecutorFactory.java
URL: http://svn.apache.org/viewvc/incubator/clerezza/trunk/parent/uima/uima.utils/src/main/java/org/apache/clerezza/uima/utils/UIMAExecutorFactory.java?rev=1131087&view=auto
==============================================================================
--- incubator/clerezza/trunk/parent/uima/uima.utils/src/main/java/org/apache/clerezza/uima/utils/UIMAExecutorFactory.java (added)
+++ incubator/clerezza/trunk/parent/uima/uima.utils/src/main/java/org/apache/clerezza/uima/utils/UIMAExecutorFactory.java Fri Jun 3 16:13:33 2011
@@ -0,0 +1,56 @@
+/*
+ * 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.clerezza.uima.utils;
+
+/**
+ * Factory class for {@link UIMAExecutor}
+ */
+public class UIMAExecutorFactory {
+
+ private static UIMAExecutorFactory instance;
+
+ private UIMAExecutorFactory() {
+ }
+
+ public static UIMAExecutorFactory getInstance() {
+ if (instance == null)
+ instance = new UIMAExecutorFactory();
+ return instance;
+ }
+
+ public UIMAExecutor createUIMAExecutor() {
+ AEProvider aeProvider = new AEProvider();
+ return new UIMAExecutor(aeProvider);
+ }
+
+ public UIMAExecutor createUIMAExecutor(ClassLoader classLoader) {
+ AEProvider aeProvider = new AEProvider().withDelegateClassloader(classLoader);
+ return new UIMAExecutor(aeProvider);
+ }
+
+ public UIMAExecutor createUIMAExecutor(String defaultXMLPath) {
+ AEProvider aeProvider = new AEProvider().withDefaultDescriptor(defaultXMLPath);
+ return new UIMAExecutor(aeProvider);
+ }
+
+ public UIMAExecutor createUIMAExecutor(ClassLoader classLoader, String defaultXMLPath) {
+ AEProvider aeProvider = new AEProvider().withDefaultDescriptor(defaultXMLPath).withDelegateClassloader(classLoader);
+ return new UIMAExecutor(aeProvider);
+ }
+}
Added: incubator/clerezza/trunk/parent/uima/uima.utils/src/main/resources/META-INF/ExtServicesAE.xml
URL: http://svn.apache.org/viewvc/incubator/clerezza/trunk/parent/uima/uima.utils/src/main/resources/META-INF/ExtServicesAE.xml?rev=1131087&view=auto
==============================================================================
--- incubator/clerezza/trunk/parent/uima/uima.utils/src/main/resources/META-INF/ExtServicesAE.xml (added)
+++ incubator/clerezza/trunk/parent/uima/uima.utils/src/main/resources/META-INF/ExtServicesAE.xml Fri Jun 3 16:13:33 2011
@@ -0,0 +1,49 @@
+<?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 location="TextKeywordExtractionAEDescriptor.xml"/>
+ </delegateAnalysisEngine>
+ <delegateAnalysisEngine key="OpenCalaisAnnotator">
+ <import location="OpenCalaisAnnotator.xml"/>
+ </delegateAnalysisEngine>
+ <delegateAnalysisEngine key="TextLanguageDetectionAEDescriptor">
+ <import location="TextLanguageDetectionAEDescriptor.xml"/>
+ </delegateAnalysisEngine>
+ <delegateAnalysisEngine key="TextCategorizationAEDescriptor">
+ <import location="TextCategorizationAEDescriptor.xml"/>
+ </delegateAnalysisEngine>
+ </delegateAnalysisEngineSpecifiers>
+ <analysisEngineMetaData>
+ <name>ExtServicesAE</name>
+ <description/>
+ <version>1.0</version>
+ <vendor/>
+ <configurationParameters/>
+ <configurationParameterSettings/>
+ <flowConstraints>
+ <fixedFlow>
+ <node>OpenCalaisAnnotator</node>
+ <node>TextKeywordExtractionAEDescriptor</node>
+ <node>TextLanguageDetectionAEDescriptor</node>
+ <node>TextCategorizationAEDescriptor</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>
Added: incubator/clerezza/trunk/parent/uima/uima.utils/src/main/resources/META-INF/OpenCalaisAnnotator.xml
URL: http://svn.apache.org/viewvc/incubator/clerezza/trunk/parent/uima/uima.utils/src/main/resources/META-INF/OpenCalaisAnnotator.xml?rev=1131087&view=auto
==============================================================================
--- incubator/clerezza/trunk/parent/uima/uima.utils/src/main/resources/META-INF/OpenCalaisAnnotator.xml (added)
+++ incubator/clerezza/trunk/parent/uima/uima.utils/src/main/resources/META-INF/OpenCalaisAnnotator.xml Fri Jun 3 16:13:33 2011
@@ -0,0 +1,194 @@
+<?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>
Added: incubator/clerezza/trunk/parent/uima/uima.utils/src/main/resources/META-INF/TextCategorizationAEDescriptor.xml
URL: http://svn.apache.org/viewvc/incubator/clerezza/trunk/parent/uima/uima.utils/src/main/resources/META-INF/TextCategorizationAEDescriptor.xml?rev=1131087&view=auto
==============================================================================
--- incubator/clerezza/trunk/parent/uima/uima.utils/src/main/resources/META-INF/TextCategorizationAEDescriptor.xml (added)
+++ incubator/clerezza/trunk/parent/uima/uima.utils/src/main/resources/META-INF/TextCategorizationAEDescriptor.xml Fri Jun 3 16:13:33 2011
@@ -0,0 +1,102 @@
+<?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>
Added: incubator/clerezza/trunk/parent/uima/uima.utils/src/main/resources/META-INF/TextConceptTaggingAEDescriptor.xml
URL: http://svn.apache.org/viewvc/incubator/clerezza/trunk/parent/uima/uima.utils/src/main/resources/META-INF/TextConceptTaggingAEDescriptor.xml?rev=1131087&view=auto
==============================================================================
--- incubator/clerezza/trunk/parent/uima/uima.utils/src/main/resources/META-INF/TextConceptTaggingAEDescriptor.xml (added)
+++ incubator/clerezza/trunk/parent/uima/uima.utils/src/main/resources/META-INF/TextConceptTaggingAEDescriptor.xml Fri Jun 3 16:13:33 2011
@@ -0,0 +1,196 @@
+<?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>
Added: incubator/clerezza/trunk/parent/uima/uima.utils/src/main/resources/META-INF/TextKeywordExtractionAEDescriptor.xml
URL: http://svn.apache.org/viewvc/incubator/clerezza/trunk/parent/uima/uima.utils/src/main/resources/META-INF/TextKeywordExtractionAEDescriptor.xml?rev=1131087&view=auto
==============================================================================
--- incubator/clerezza/trunk/parent/uima/uima.utils/src/main/resources/META-INF/TextKeywordExtractionAEDescriptor.xml (added)
+++ incubator/clerezza/trunk/parent/uima/uima.utils/src/main/resources/META-INF/TextKeywordExtractionAEDescriptor.xml Fri Jun 3 16:13:33 2011
@@ -0,0 +1,107 @@
+<?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>AA_API_KEY</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>
Added: incubator/clerezza/trunk/parent/uima/uima.utils/src/main/resources/META-INF/TextLanguageDetectionAEDescriptor.xml
URL: http://svn.apache.org/viewvc/incubator/clerezza/trunk/parent/uima/uima.utils/src/main/resources/META-INF/TextLanguageDetectionAEDescriptor.xml?rev=1131087&view=auto
==============================================================================
--- incubator/clerezza/trunk/parent/uima/uima.utils/src/main/resources/META-INF/TextLanguageDetectionAEDescriptor.xml (added)
+++ incubator/clerezza/trunk/parent/uima/uima.utils/src/main/resources/META-INF/TextLanguageDetectionAEDescriptor.xml Fri Jun 3 16:13:33 2011
@@ -0,0 +1,107 @@
+<?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>
Modified: incubator/clerezza/trunk/parent/uima/uima.utils/src/test/java/org/apache/clerezza/uima/utils/AEProviderTest.java
URL: http://svn.apache.org/viewvc/incubator/clerezza/trunk/parent/uima/uima.utils/src/test/java/org/apache/clerezza/uima/utils/AEProviderTest.java?rev=1131087&r1=1131086&r2=1131087&view=diff
==============================================================================
--- incubator/clerezza/trunk/parent/uima/uima.utils/src/test/java/org/apache/clerezza/uima/utils/AEProviderTest.java (original)
+++ incubator/clerezza/trunk/parent/uima/uima.utils/src/test/java/org/apache/clerezza/uima/utils/AEProviderTest.java Fri Jun 3 16:13:33 2011
@@ -51,7 +51,7 @@ public class AEProviderTest {
@Test
public void testGetAEWithPathNotNull() {
try {
- AnalysisEngine ae = this.aeProvider.getAE("/ExtServicesAE.xml");
+ AnalysisEngine ae = this.aeProvider.getAE("/META-INF/ExtServicesAE.xml");
assertTrue(ae != null);
} catch (Throwable e) {
fail(e.getLocalizedMessage());
Modified: incubator/clerezza/trunk/parent/uima/uima.utils/src/test/java/org/apache/clerezza/uima/utils/UIMAExecutorTest.java
URL: http://svn.apache.org/viewvc/incubator/clerezza/trunk/parent/uima/uima.utils/src/test/java/org/apache/clerezza/uima/utils/UIMAExecutorTest.java?rev=1131087&r1=1131086&r2=1131087&view=diff
==============================================================================
--- incubator/clerezza/trunk/parent/uima/uima.utils/src/test/java/org/apache/clerezza/uima/utils/UIMAExecutorTest.java (original)
+++ incubator/clerezza/trunk/parent/uima/uima.utils/src/test/java/org/apache/clerezza/uima/utils/UIMAExecutorTest.java Fri Jun 3 16:13:33 2011
@@ -25,28 +25,47 @@ import static org.junit.Assert.fail;
/**
* Testcase for {@link UIMAExecutor}
- *
*/
public class UIMAExecutorTest {
@Test
public void testDefaultConstructor() {
try {
- UIMAExecutor uimaExecutor = new UIMAExecutor("ExtServicesAE.xml");
+ UIMAExecutor uimaExecutor = UIMAExecutorFactory.getInstance().createUIMAExecutor();
assertTrue(uimaExecutor != null);
} catch (Throwable e) {
fail(e.getLocalizedMessage());
}
}
-
+
+ @Test
+ public void testCLConstructor() {
+ try {
+ UIMAExecutor uimaExecutor = UIMAExecutorFactory.getInstance().createUIMAExecutor(this.getClass().getClassLoader());
+ assertTrue(uimaExecutor != null);
+ } catch (Throwable e) {
+ fail(e.getLocalizedMessage());
+ }
+ }
+
@Test
- public void testWithResultsConstructor() {
+ public void testPathConstructor() {
try {
- UIMAExecutor uimaExecutor = new UIMAExecutor("ExtServicesAE.xml").withResults();
+ UIMAExecutor uimaExecutor = UIMAExecutorFactory.getInstance().createUIMAExecutor("/META-INF/ExtServicesAE.xml");
assertTrue(uimaExecutor != null);
} catch (Throwable e) {
fail(e.getLocalizedMessage());
}
}
+ @Test
+ public void testPathCLConstructor() {
+ try {
+ UIMAExecutor uimaExecutor = UIMAExecutorFactory.getInstance().createUIMAExecutor(this.getClass().getClassLoader(),
+ "/META-INF/ExtServicesAE.xml");
+ assertTrue(uimaExecutor != null);
+ } catch (Throwable e) {
+ fail(e.getLocalizedMessage());
+ }
+ }
}