You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@uima.apache.org by sc...@apache.org on 2009/09/29 18:24:12 UTC

svn commit: r820015 - in /incubator/uima/sandbox/trunk/ConfigurableFeatureExtractor: ./ src/test/ src/test/java/ src/test/java/example/ src/test/java/org/ src/test/java/org/apache/ src/test/java/org/apache/uima/ src/test/java/org/apache/uima/tools/ src...

Author: schor
Date: Tue Sep 29 16:24:11 2009
New Revision: 820015

URL: http://svn.apache.org/viewvc?rev=820015&view=rev
Log:
UIMA-1065 check in test case (not yet working)

Added:
    incubator/uima/sandbox/trunk/ConfigurableFeatureExtractor/src/test/
    incubator/uima/sandbox/trunk/ConfigurableFeatureExtractor/src/test/java/
    incubator/uima/sandbox/trunk/ConfigurableFeatureExtractor/src/test/java/example/
    incubator/uima/sandbox/trunk/ConfigurableFeatureExtractor/src/test/java/example/PersonTitle.java
    incubator/uima/sandbox/trunk/ConfigurableFeatureExtractor/src/test/java/example/PersonTitle_Type.java
    incubator/uima/sandbox/trunk/ConfigurableFeatureExtractor/src/test/java/org/
    incubator/uima/sandbox/trunk/ConfigurableFeatureExtractor/src/test/java/org/apache/
    incubator/uima/sandbox/trunk/ConfigurableFeatureExtractor/src/test/java/org/apache/uima/
    incubator/uima/sandbox/trunk/ConfigurableFeatureExtractor/src/test/java/org/apache/uima/tools/
    incubator/uima/sandbox/trunk/ConfigurableFeatureExtractor/src/test/java/org/apache/uima/tools/cfe/
    incubator/uima/sandbox/trunk/ConfigurableFeatureExtractor/src/test/java/org/apache/uima/tools/cfe/test/
    incubator/uima/sandbox/trunk/ConfigurableFeatureExtractor/src/test/java/org/apache/uima/tools/cfe/test/CFEtest.java
    incubator/uima/sandbox/trunk/ConfigurableFeatureExtractor/src/test/resources/
    incubator/uima/sandbox/trunk/ConfigurableFeatureExtractor/src/test/resources/CFEConfig.xml
    incubator/uima/sandbox/trunk/ConfigurableFeatureExtractor/src/test/resources/PersonTitleAnnotator.xml
    incubator/uima/sandbox/trunk/ConfigurableFeatureExtractor/src/test/resources/PersonTitlePlusFeatureExtraction.xml
    incubator/uima/sandbox/trunk/ConfigurableFeatureExtractor/src/test/resources/UIMAFeatureConsumer.xml
    incubator/uima/sandbox/trunk/ConfigurableFeatureExtractor/src/test/resources/testData.txt
Removed:
    incubator/uima/sandbox/trunk/ConfigurableFeatureExtractor/test/
Modified:
    incubator/uima/sandbox/trunk/ConfigurableFeatureExtractor/pom.xml

Modified: incubator/uima/sandbox/trunk/ConfigurableFeatureExtractor/pom.xml
URL: http://svn.apache.org/viewvc/incubator/uima/sandbox/trunk/ConfigurableFeatureExtractor/pom.xml?rev=820015&r1=820014&r2=820015&view=diff
==============================================================================
--- incubator/uima/sandbox/trunk/ConfigurableFeatureExtractor/pom.xml (original)
+++ incubator/uima/sandbox/trunk/ConfigurableFeatureExtractor/pom.xml Tue Sep 29 16:24:11 2009
@@ -77,11 +77,36 @@
       <artifactId>ecore</artifactId>
       <version>2.3.0-v200706262000</version>
     </dependency>
-    <!--dependency>
-      <groupId>stax</groupId>
-      <artifactId>stax-api</artifactId>
-      <version>1.0.1</version>
-    </dependency-->
+
+    <!-- testing resources -->
+    <dependency>
+      <groupId>org.apache.uima</groupId>
+      <artifactId>uimaj-core</artifactId>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.uima</groupId>
+      <artifactId>uimaj-test-util</artifactId>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.uima</groupId>
+      <artifactId>uimaj-component-test-util</artifactId>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.uima</groupId>
+      <artifactId>uimaj-examples</artifactId>
+      <scope>test</scope>
+    </dependency> 
+
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <version>4.0</version>
+      <scope>test</scope>
+    </dependency>
+
   </dependencies>
     
 	<build>
@@ -170,6 +195,7 @@
               <excludes>
                 <exclude>docs/html/images/*.svg</exclude> <!-- generated image files for docbook -->
                 <exclude>cfeModelGen/*</exclude> <!-- generated EMF model files -->
+                <exclude>src/test/resources/testData.txt</exclude>
               </excludes>
             </configuration>
           </execution>

Added: incubator/uima/sandbox/trunk/ConfigurableFeatureExtractor/src/test/java/example/PersonTitle.java
URL: http://svn.apache.org/viewvc/incubator/uima/sandbox/trunk/ConfigurableFeatureExtractor/src/test/java/example/PersonTitle.java?rev=820015&view=auto
==============================================================================
--- incubator/uima/sandbox/trunk/ConfigurableFeatureExtractor/src/test/java/example/PersonTitle.java (added)
+++ incubator/uima/sandbox/trunk/ConfigurableFeatureExtractor/src/test/java/example/PersonTitle.java Tue Sep 29 16:24:11 2009
@@ -0,0 +1,80 @@
+
+
+/* First created by JCasGen Mon Sep 28 09:59:34 EDT 2009 */
+package example;
+
+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;
+
+
+/** A Personal Title.
+ * Updated by JCasGen Mon Sep 28 09:59:34 EDT 2009
+ * XML source: C:/a/Eclipse/apache/ConfigurableFeatureExtractor/src/test/resources/aeDescriptor.xml
+ * @generated */
+public class PersonTitle extends Annotation {
+  /** @generated
+   * @ordered 
+   */
+  public final static int typeIndexID = JCasRegistry.register(PersonTitle.class);
+  /** @generated
+   * @ordered 
+   */
+  public final static int type = typeIndexID;
+  /** @generated  */
+  public              int getTypeIndexID() {return typeIndexID;}
+ 
+  /** Never called.  Disable default constructor
+   * @generated */
+  protected PersonTitle() {}
+    
+  /** Internal - constructor used by generator 
+   * @generated */
+  public PersonTitle(int addr, TOP_Type type) {
+    super(addr, type);
+    readObject();
+  }
+  
+  /** @generated */
+  public PersonTitle(JCas jcas) {
+    super(jcas);
+    readObject();   
+  } 
+
+  /** @generated */  
+  public PersonTitle(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: Kind
+
+  /** getter for Kind - gets The kind of title - Civilian, Military, or Government.
+   * @generated */
+  public String getKind() {
+    if (PersonTitle_Type.featOkTst && ((PersonTitle_Type)jcasType).casFeat_Kind == null)
+      jcasType.jcas.throwFeatMissing("Kind", "example.PersonTitle");
+    return jcasType.ll_cas.ll_getStringValue(addr, ((PersonTitle_Type)jcasType).casFeatCode_Kind);}
+    
+  /** setter for Kind - sets The kind of title - Civilian, Military, or Government. 
+   * @generated */
+  public void setKind(String v) {
+    if (PersonTitle_Type.featOkTst && ((PersonTitle_Type)jcasType).casFeat_Kind == null)
+      jcasType.jcas.throwFeatMissing("Kind", "example.PersonTitle");
+    jcasType.ll_cas.ll_setStringValue(addr, ((PersonTitle_Type)jcasType).casFeatCode_Kind, v);}    
+  }
+
+    
\ No newline at end of file

Added: incubator/uima/sandbox/trunk/ConfigurableFeatureExtractor/src/test/java/example/PersonTitle_Type.java
URL: http://svn.apache.org/viewvc/incubator/uima/sandbox/trunk/ConfigurableFeatureExtractor/src/test/java/example/PersonTitle_Type.java?rev=820015&view=auto
==============================================================================
--- incubator/uima/sandbox/trunk/ConfigurableFeatureExtractor/src/test/java/example/PersonTitle_Type.java (added)
+++ incubator/uima/sandbox/trunk/ConfigurableFeatureExtractor/src/test/java/example/PersonTitle_Type.java Tue Sep 29 16:24:11 2009
@@ -0,0 +1,79 @@
+
+/* First created by JCasGen Mon Sep 28 09:59:34 EDT 2009 */
+package example;
+
+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;
+
+/** A Personal Title.
+ * Updated by JCasGen Mon Sep 28 09:59:34 EDT 2009
+ * @generated */
+public class PersonTitle_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 (PersonTitle_Type.this.useExistingInstance) {
+  			   // Return eq fs instance if already created
+  		     FeatureStructure fs = PersonTitle_Type.this.jcas.getJfsFromCaddr(addr);
+  		     if (null == fs) {
+  		       fs = new PersonTitle(addr, PersonTitle_Type.this);
+  			   PersonTitle_Type.this.jcas.putJfsFromCaddr(addr, fs);
+  			   return fs;
+  		     }
+  		     return fs;
+        } else return new PersonTitle(addr, PersonTitle_Type.this);
+  	  }
+    };
+  /** @generated */
+  public final static int typeIndexID = PersonTitle.typeIndexID;
+  /** @generated 
+     @modifiable */
+  public final static boolean featOkTst = JCasRegistry.getFeatOkTst("example.PersonTitle");
+ 
+  /** @generated */
+  final Feature casFeat_Kind;
+  /** @generated */
+  final int     casFeatCode_Kind;
+  /** @generated */ 
+  public String getKind(int addr) {
+        if (featOkTst && casFeat_Kind == null)
+      jcas.throwFeatMissing("Kind", "example.PersonTitle");
+    return ll_cas.ll_getStringValue(addr, casFeatCode_Kind);
+  }
+  /** @generated */    
+  public void setKind(int addr, String v) {
+        if (featOkTst && casFeat_Kind == null)
+      jcas.throwFeatMissing("Kind", "example.PersonTitle");
+    ll_cas.ll_setStringValue(addr, casFeatCode_Kind, v);}
+    
+  
+
+
+
+  /** initialize variables to correspond with Cas Type and Features
+	* @generated */
+  public PersonTitle_Type(JCas jcas, Type casType) {
+    super(jcas, casType);
+    casImpl.getFSClassRegistry().addGeneratorForType((TypeImpl)this.casType, getFSGenerator());
+
+ 
+    casFeat_Kind = jcas.getRequiredFeatureDE(casType, "Kind", "example.PersonTitleKind", featOkTst);
+    casFeatCode_Kind  = (null == casFeat_Kind) ? JCas.INVALID_FEATURE_CODE : ((FeatureImpl)casFeat_Kind).getCode();
+
+  }
+}
+
+
+
+    
\ No newline at end of file

Added: incubator/uima/sandbox/trunk/ConfigurableFeatureExtractor/src/test/java/org/apache/uima/tools/cfe/test/CFEtest.java
URL: http://svn.apache.org/viewvc/incubator/uima/sandbox/trunk/ConfigurableFeatureExtractor/src/test/java/org/apache/uima/tools/cfe/test/CFEtest.java?rev=820015&view=auto
==============================================================================
--- incubator/uima/sandbox/trunk/ConfigurableFeatureExtractor/src/test/java/org/apache/uima/tools/cfe/test/CFEtest.java (added)
+++ incubator/uima/sandbox/trunk/ConfigurableFeatureExtractor/src/test/java/org/apache/uima/tools/cfe/test/CFEtest.java Tue Sep 29 16:24:11 2009
@@ -0,0 +1,102 @@
+/*
+ * 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.uima.tools.cfe.test;
+
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+import junit.framework.Assert;
+import junit.framework.TestCase;
+
+import org.apache.uima.UIMAFramework;
+import org.apache.uima.analysis_engine.AnalysisEngine;
+import org.apache.uima.analysis_engine.AnalysisEngineDescription;
+import org.apache.uima.analysis_engine.metadata.AnalysisEngineMetaData;
+import org.apache.uima.analysis_engine.metadata.FixedFlow;
+import org.apache.uima.analysis_engine.metadata.SofaMapping;
+import org.apache.uima.cas.CAS;
+import org.apache.uima.pear.tools.PackageBrowser;
+import org.apache.uima.pear.tools.PackageInstaller;
+import org.apache.uima.pear.util.FileUtil;
+import org.apache.uima.resource.ResourceSpecifier;
+import org.apache.uima.resource.metadata.Capability;
+import org.apache.uima.resource.metadata.ConfigurationParameter;
+import org.apache.uima.resource.metadata.Import;
+import org.apache.uima.resource.metadata.MetaDataObject;
+import org.apache.uima.test.junit_extension.JUnitExtension;
+import org.apache.uima.util.FileUtils;
+import org.apache.uima.util.XMLInputSource;
+import org.apache.uima.util.XMLParser;
+
+/**
+ * The CFE tests installs a pear file
+ */
+
+public class CFEtest extends TestCase {
+
+  // Temporary working directory, used to install the pear package
+  private File tempInstallDir = null;
+
+  /**
+   * @see junit.framework.TestCase#setUp()
+   */
+  protected void setUp() throws Exception {
+
+    // create temporary working directory
+    File tempFile = File.createTempFile("pear_cfe_test_", "tmp");
+    if (tempFile.delete()) {
+      File tempDir = tempFile;
+      if (tempDir.mkdirs())
+        this.tempInstallDir = tempDir;
+    }
+  }
+
+  /**
+   * @see junit.framework.TestCase#tearDown()
+   */
+  protected void tearDown() throws Exception {
+    if (this.tempInstallDir != null) {
+      FileUtil.deleteDirectory(this.tempInstallDir);
+    }
+  }
+
+  public void testCFE() throws Exception {
+    
+    // Run an aggregate with a person-title annotator and 
+    // a CFE Cas Consumer
+    
+    XMLInputSource in = new XMLInputSource(JUnitExtension.getFile("PersonTitlePlusFeatureExtraction.xml"));
+    AnalysisEngineDescription specifier = (AnalysisEngineDescription) UIMAFramework.getXMLParser().parseResourceSpecifier(in);
+    // CFE currently requires that the config file be specified as an absolute path.
+    File configFile = JUnitExtension.getFile("CFEConfig.xml");
+    specifier.getAnalysisEngineMetaData().getConfigurationParameterSettings().setParameterValue("ConfigurationFile", configFile.getAbsolutePath());
+    AnalysisEngine ae = UIMAFramework.produceAnalysisEngine(specifier);
+    ae.setConfigParameterValue("ConfigurationFile", configFile.getAbsolutePath());
+    ae.reconfigure();
+    CAS cas = ae.newCAS();
+    String document = FileUtils.file2String(JUnitExtension.getFile("someTestData.txt"));
+    cas.setDocumentText(document);
+    ae.process(cas);    
+  }
+}

Added: incubator/uima/sandbox/trunk/ConfigurableFeatureExtractor/src/test/resources/CFEConfig.xml
URL: http://svn.apache.org/viewvc/incubator/uima/sandbox/trunk/ConfigurableFeatureExtractor/src/test/resources/CFEConfig.xml?rev=820015&view=auto
==============================================================================
--- incubator/uima/sandbox/trunk/ConfigurableFeatureExtractor/src/test/resources/CFEConfig.xml (added)
+++ incubator/uima/sandbox/trunk/ConfigurableFeatureExtractor/src/test/resources/CFEConfig.xml Tue Sep 29 16:24:11 2009
@@ -0,0 +1,41 @@
+<?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.
+   ***************************************************************
+   -->
+  <tns:CFEConfig xmlns:tns="http://www.apache.org/uima/tools/cfe/config" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.apache.org/uima/tools/cfe/config CFEConfig.xsd ">
+  <tns:targetAnnotations className="Military_Person" enclosingAnnotation="uima.tt.DocumentAnnotation">
+    <tns:targetAnnotationMatcher annotationTypeName="example.PersonTitle">
+      <tns:groupFeatureMatchers>
+        <tns:featureMatchers featurePath="Kind">
+          <tns:enumFeatureValues>
+          	<tns:values>Military</tns:values>
+          </tns:enumFeatureValues>
+        </tns:featureMatchers>
+      </tns:groupFeatureMatchers>
+    </tns:targetAnnotationMatcher>
+    <tns:featureAnnotationMatchers annotationTypeName="example.PersonTitle" windowsizeInside="1">
+      <tns:groupFeatureMatchers>
+        <tns:featureMatchers featurePath="begin"/>
+        <tns:featureMatchers featurePath="end"/>
+        <tns:featureMatchers featurePath="coveredText"/>
+      </tns:groupFeatureMatchers>
+    </tns:featureAnnotationMatchers>
+  </tns:targetAnnotations>
+</tns:CFEConfig>

Added: incubator/uima/sandbox/trunk/ConfigurableFeatureExtractor/src/test/resources/PersonTitleAnnotator.xml
URL: http://svn.apache.org/viewvc/incubator/uima/sandbox/trunk/ConfigurableFeatureExtractor/src/test/resources/PersonTitleAnnotator.xml?rev=820015&view=auto
==============================================================================
--- incubator/uima/sandbox/trunk/ConfigurableFeatureExtractor/src/test/resources/PersonTitleAnnotator.xml (added)
+++ incubator/uima/sandbox/trunk/ConfigurableFeatureExtractor/src/test/resources/PersonTitleAnnotator.xml Tue Sep 29 16:24:11 2009
@@ -0,0 +1,165 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+	<!--
+	 ***************************************************************
+	 * Licensed to the Apache Software Foundation (ASF) under one
+	 * or more contributor license agreements.  See the NOTICE file
+	 * distributed with this work for additional information
+	 * regarding copyright ownership.  The ASF licenses this file
+	 * to you under the Apache License, Version 2.0 (the
+	 * "License"); you may not use this file except in compliance
+	 * with the License.  You may obtain a copy of the License at
+         *
+	 *   http://www.apache.org/licenses/LICENSE-2.0
+	 * 
+	 * Unless required by applicable law or agreed to in writing,
+	 * software distributed under the License is distributed on an
+	 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+	 * KIND, either express or implied.  See the License for the
+	 * specific language governing permissions and limitations
+	 * under the License.
+	 ***************************************************************
+   -->
+   
+<analysisEngineDescription xmlns="http://uima.apache.org/resourceSpecifier">
+  <frameworkImplementation>org.apache.uima.java</frameworkImplementation>
+  <primitive>true</primitive>
+  <annotatorImplementationName>org.apache.uima.examples.cas.PersonTitleAnnotator</annotatorImplementationName>
+  <analysisEngineMetaData>
+    <name>Person Title Annotator</name>
+    <description>An example annotator that discovers Person Titles in text and classifies them
+    into three categories - Civilian (e.g. Mr.,Ms.), Military (e.g. Lt. Col.) , and 
+    Government (e.g. Gov., Sen.).  This annotator can be configured to only look for 
+    titles within existing annotations of a particular type (for example, Person Name 
+    annotations).</description>
+    <version>1.0</version>
+    <vendor>The Apache Software Foundation</vendor>
+    <configurationParameters>
+      <configurationParameter>
+        <name>CivilianTitles</name>
+        <description>List of Civilian Titles to be annotated.</description>
+        <type>String</type>
+        <multiValued>true</multiValued>
+        <mandatory>true</mandatory>
+      </configurationParameter>
+      <configurationParameter>
+        <name>MilitaryTitles</name>
+        <description>List of Military Titles to be annotated.</description>
+        <type>String</type>
+        <multiValued>true</multiValued>
+        <mandatory>true</mandatory>
+      </configurationParameter>
+      <configurationParameter>
+        <name>GovernmentTitles</name>
+        <description>List of Government Titles to be annotated.</description>
+        <type>String</type>
+        <multiValued>true</multiValued>
+        <mandatory>true</mandatory>
+      </configurationParameter>
+      <configurationParameter>
+        <name>ContainingAnnotationType</name>
+        <description>Annotation type within which to search for Person Titles.  If no value is specified,
+        the entire document will be searched.</description>
+        <type>String</type>
+        <multiValued>false</multiValued>
+        <mandatory>false</mandatory>
+      </configurationParameter>
+    </configurationParameters>
+    <configurationParameterSettings>
+      <nameValuePair>
+        <name>CivilianTitles</name>
+        <value>
+          <array>
+            <string>Mr.</string>
+            <string>Ms.</string>
+            <string>Mrs.</string>
+            <string>Dr.</string>
+          </array>
+        </value>
+      </nameValuePair>
+      <nameValuePair>
+        <name>MilitaryTitles</name>
+        <value>
+          <array>
+            <string>Gen.</string>
+            <string>Col.</string>
+            <string>Maj.</string>
+            <string>Capt.</string>
+            <string>Lt. Gen.</string>
+            <string>Lt Col.</string>
+            <string>Lt.</string>
+          </array>
+        </value>
+      </nameValuePair>
+      <nameValuePair>
+        <name>GovernmentTitles</name>
+        <value>
+          <array>
+            <string>Vice President</string>
+            <string>President</string>
+            <string>Vice Pres.</string>
+            <string>Pres.</string>
+            <string>Governor</string>
+            <string>Lt. Governor</string>
+            <string>Gov.</string>
+            <string>Lt. Gov.</string>
+            <string>Senator</string>
+            <string>Sen.</string>
+          </array>
+        </value>
+      </nameValuePair>
+    </configurationParameterSettings>
+    <typeSystemDescription>
+      <types>
+        <typeDescription>
+          <name>example.PersonTitle</name>
+          <description>A Personal Title.</description>
+          <supertypeName>uima.tcas.Annotation</supertypeName>
+          <features>
+            <featureDescription>
+              <name>Kind</name>
+              <description>The kind of title - Civilian, Military, or Government.</description>
+              <rangeTypeName>example.PersonTitleKind</rangeTypeName>
+            </featureDescription>
+          </features>
+        </typeDescription>
+        <typeDescription>
+          <name>example.PersonTitleKind</name>
+          <description>A kind of person title - Civilian, Military, or Government.</description>
+          <supertypeName>uima.cas.String</supertypeName>
+          <allowedValues>
+            <value>
+              <string>Civilian</string>
+              <description>Title of a person not in military or government service.</description>
+            </value>
+            <value>
+              <string>Military</string>
+              <description>Title of a person in the military.</description>
+            </value>
+            <value>
+              <string>Government</string>
+              <description>Title of a government official.</description>
+            </value>
+          </allowedValues>
+        </typeDescription>
+      </types>
+    </typeSystemDescription>
+    <capabilities>
+      <capability>
+        <inputs/>
+        <outputs>
+          <type>example.PersonTitle</type>
+          <feature>example.PersonTitle:Kind</feature>
+        </outputs>
+        <languagesSupported>
+          <language>en</language>
+        </languagesSupported>
+      </capability>
+    </capabilities>
+	<operationalProperties>
+		<modifiesCas>true</modifiesCas>
+		<multipleDeploymentAllowed>true</multipleDeploymentAllowed>
+		<outputsNewCASes>false</outputsNewCASes>
+	</operationalProperties>	  
+  </analysisEngineMetaData>
+</analysisEngineDescription>

Added: incubator/uima/sandbox/trunk/ConfigurableFeatureExtractor/src/test/resources/PersonTitlePlusFeatureExtraction.xml
URL: http://svn.apache.org/viewvc/incubator/uima/sandbox/trunk/ConfigurableFeatureExtractor/src/test/resources/PersonTitlePlusFeatureExtraction.xml?rev=820015&view=auto
==============================================================================
--- incubator/uima/sandbox/trunk/ConfigurableFeatureExtractor/src/test/resources/PersonTitlePlusFeatureExtraction.xml (added)
+++ incubator/uima/sandbox/trunk/ConfigurableFeatureExtractor/src/test/resources/PersonTitlePlusFeatureExtraction.xml Tue Sep 29 16:24:11 2009
@@ -0,0 +1,91 @@
+<?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="UIMAFeatureConsumer">
+      <import name="UIMAFeatureConsumer"/>
+    </delegateAnalysisEngine>
+    <delegateAnalysisEngine key="PersonTitleAnnotator">
+      <import name="PersonTitleAnnotator"/>
+    </delegateAnalysisEngine>
+  </delegateAnalysisEngineSpecifiers>
+  <analysisEngineMetaData>
+    <name>aeDescriptor</name>
+    <description/>
+    <version>1.0</version>
+    <vendor/>
+    <configurationParameters searchStrategy="language_fallback">
+      <configurationParameter>
+        <name>OutputDirectory</name>
+        <description>output directory</description>
+        <type>String</type>
+        <multiValued>false</multiValued>
+        <mandatory>false</mandatory>
+        <overrides>
+          <parameter>UIMAFeatureConsumer/OutputDirectory</parameter>
+        </overrides>
+      </configurationParameter>
+      <configurationParameter>
+        <name>ConfigurationFile</name>
+        <description>configuration file</description>
+        <type>String</type>
+        <multiValued>false</multiValued>
+        <mandatory>false</mandatory>
+        <overrides>
+          <parameter>UIMAFeatureConsumer/ConfigurationFile</parameter>
+        </overrides>
+      </configurationParameter>
+      <configurationParameter>
+        <name>IncludeTargetId</name>
+        <description>Specifies whether the Id of target annotation object should be included in the extracted feature set</description>
+        <type>Boolean</type>
+        <multiValued>false</multiValued>
+        <mandatory>false</mandatory>
+        <overrides>
+          <parameter>UIMAFeatureConsumer/IncludeTargetId</parameter>
+        </overrides>
+      </configurationParameter>
+    </configurationParameters>
+    <configurationParameterSettings>
+      <nameValuePair>
+        <name>OutputDirectory</name>
+        <value>
+          <string>tempTestOut</string>
+        </value>
+      </nameValuePair>
+      <nameValuePair>
+        <name>ConfigurationFile</name>
+        <value>
+          <string>src/test/resources/CFEConfig.xml</string>
+        </value>
+      </nameValuePair>
+      <nameValuePair>
+        <name>IncludeTargetId</name>
+        <value>
+          <boolean>false</boolean>
+        </value>
+      </nameValuePair>
+    </configurationParameterSettings>
+    <flowConstraints>
+      <fixedFlow>
+        <node>PersonTitleAnnotator</node>
+        <node>UIMAFeatureConsumer</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/uima/sandbox/trunk/ConfigurableFeatureExtractor/src/test/resources/UIMAFeatureConsumer.xml
URL: http://svn.apache.org/viewvc/incubator/uima/sandbox/trunk/ConfigurableFeatureExtractor/src/test/resources/UIMAFeatureConsumer.xml?rev=820015&view=auto
==============================================================================
--- incubator/uima/sandbox/trunk/ConfigurableFeatureExtractor/src/test/resources/UIMAFeatureConsumer.xml (added)
+++ incubator/uima/sandbox/trunk/ConfigurableFeatureExtractor/src/test/resources/UIMAFeatureConsumer.xml Tue Sep 29 16:24:11 2009
@@ -0,0 +1,88 @@
+<?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.    
+-->  
+<casConsumerDescription xmlns="http://uima.apache.org/resourceSpecifier">
+  <frameworkImplementation>org.apache.uima.java</frameworkImplementation>
+  <implementationName>org.apache.uima.tools.cfe.UIMAFeatureConsumer</implementationName>
+  <processingResourceMetaData>
+    <name>UIMAFeatureConsumer</name>
+    <description>extracts UIMA features according to specification given in the configuration file</description>
+    <version>1.0</version>
+    <vendor>IBM</vendor>
+    <configurationParameters>
+      <configurationParameter>
+        <name>OutputDirectory</name>
+        <description>output directory</description>
+        <type>String</type>
+        <multiValued>false</multiValued>
+        <mandatory>false</mandatory>
+      </configurationParameter>
+      <configurationParameter>
+        <name>ConfigurationFile</name>
+        <description>configuration file</description>
+        <type>String</type>
+        <multiValued>false</multiValued>
+        <mandatory>false</mandatory>
+      </configurationParameter>
+      <configurationParameter>
+        <name>IncludeTargetId</name>
+        <description>Specifies whether the Id of target annotation object should be included in the extracted feature set</description>
+        <type>Boolean</type>
+        <multiValued>false</multiValued>
+        <mandatory>false</mandatory>
+      </configurationParameter>
+      <configurationParameter>
+        <name>XMLBeansParser</name>
+        <type>Boolean</type>
+        <multiValued>false</multiValued>
+        <mandatory>false</mandatory>
+      </configurationParameter>
+    </configurationParameters>
+    <configurationParameterSettings>
+      <nameValuePair>
+        <name>IncludeTargetId</name>
+        <value>
+          <boolean>false</boolean>
+        </value>
+      </nameValuePair>
+      <nameValuePair>
+        <name>XMLBeansParser</name>
+        <value>
+          <boolean>false</boolean>
+        </value>
+      </nameValuePair>
+    </configurationParameterSettings>
+    <typeSystemDescription/>
+    <typePriorities/>
+    <fsIndexCollection/>
+    <capabilities>
+      <capability>
+        <inputs/>
+        <outputs/>
+        <languagesSupported/>
+      </capability>
+    </capabilities>
+    <operationalProperties>
+      <modifiesCas>false</modifiesCas>
+      <multipleDeploymentAllowed>true</multipleDeploymentAllowed>
+      <outputsNewCASes>false</outputsNewCASes>
+    </operationalProperties>
+  </processingResourceMetaData>
+  <resourceManagerConfiguration/>
+</casConsumerDescription>

Added: incubator/uima/sandbox/trunk/ConfigurableFeatureExtractor/src/test/resources/testData.txt
URL: http://svn.apache.org/viewvc/incubator/uima/sandbox/trunk/ConfigurableFeatureExtractor/src/test/resources/testData.txt?rev=820015&view=auto
==============================================================================
--- incubator/uima/sandbox/trunk/ConfigurableFeatureExtractor/src/test/resources/testData.txt (added)
+++ incubator/uima/sandbox/trunk/ConfigurableFeatureExtractor/src/test/resources/testData.txt Tue Sep 29 16:24:11 2009
@@ -0,0 +1,2 @@
+Test Data.
+Dr. George Smith arrived late. Col. Jones and Capt. Mark greeted him.
\ No newline at end of file