Package org.apache.uima.lucas.indexer.mapping

Examples of org.apache.uima.lucas.indexer.mapping.FeatureDescription


  }
 
  @Test
  public void testBuildFeatureAnnotationTokenStream() throws Exception{
    annotation1.setFeatureString("token1Feature1");
    annotationDescription.getFeatureDescriptions().add(new FeatureDescription("featureString"));
    AnnotationTokenStream annotationTokenStream = annotationTokenStreamBuilder.createAnnotationTokenStream(cas, annotationDescription);
    assertEquals(annotation1Type, annotationTokenStream.getAnnotationType());
    assertEquals(1, annotationTokenStream.getFeatureNames().size());
    assertEquals(0, annotationTokenStream.getFeatureFormats().size());
    assertEquals("token1Feature1", annotationTokenStream.next(new Token()).term());
View Full Code Here


  @Test
  public void testBuildFeatureAnnotationTokenStreamWithFormat() throws Exception{
    annotation1.setFeatureInteger(3);
   
    FeatureDescription featureDescription = new FeatureDescription("featureInteger");
    featureDescription.setNumberFormat("##");
   
    annotationDescription.getFeatureDescriptions().add(featureDescription);
    AnnotationTokenStream annotationTokenStream = annotationTokenStreamBuilder.createAnnotationTokenStream(cas, annotationDescription);
    assertEquals(annotation1Type, annotationTokenStream.getAnnotationType());
    assertEquals(1, annotationTokenStream.getFeatureNames().size());
View Full Code Here

    FeatureStructure2 featureStructure2 = new FeatureStructure2(cas);
    featureStructure2.setFeature1("token1Feature3Feature1");
    featureStructure1.setFeature3(featureStructure2);
    annotation1.setFeatureStructure1(featureStructure1);
   
    annotationDescription.getFeatureDescriptions().add(new FeatureDescription("feature1"));
    annotationDescription.setFeaturePath("featureStructure1");
    AnnotationTokenStream annotationTokenStream = annotationTokenStreamBuilder.createAnnotationTokenStream(cas, annotationDescription);
    assertEquals(annotation1Type, annotationTokenStream.getAnnotationType());
    assertEquals(1, annotationTokenStream.getFeatureNames().size());
    assertEquals(0, annotationTokenStream.getFeatureFormats().size());
View Full Code Here

TOP

Related Classes of org.apache.uima.lucas.indexer.mapping.FeatureDescription

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.