Examples of containsType()


Examples of org.apache.uima.analysis_engine.ResultSpecification.containsType()

    jcas = aJCas;
    input = jcas.getDocumentText();

    // Create Annotations
    ResultSpecification resultSpec = getResultSpecification();
    if (resultSpec.containsType("org.apache.uima.tutorial.TimeAnnot",aJCas.getDocumentLanguage()))
      makeAnnotations(timeAnnotationMaker, hoursMinutesPattern, dfTimeShort);
    if (resultSpec.containsType("org.apache.uima.tutorial.DateAnnot",aJCas.getDocumentLanguage()))
      makeAnnotations(dateAnnotationMaker, numericDatePattern, dfDateShort);
    if (resultSpec.containsType("org.apache.uima.tutorial.DateAnnot",aJCas.getDocumentLanguage()))
      makeAnnotations(dateAnnotationMaker, mediumDatePattern, dfDateMedium);
View Full Code Here

Examples of org.apache.uima.analysis_engine.ResultSpecification.containsType()

    // Create Annotations
    ResultSpecification resultSpec = getResultSpecification();
    if (resultSpec.containsType("org.apache.uima.tutorial.TimeAnnot",aJCas.getDocumentLanguage()))
      makeAnnotations(timeAnnotationMaker, hoursMinutesPattern, dfTimeShort);
    if (resultSpec.containsType("org.apache.uima.tutorial.DateAnnot",aJCas.getDocumentLanguage()))
      makeAnnotations(dateAnnotationMaker, numericDatePattern, dfDateShort);
    if (resultSpec.containsType("org.apache.uima.tutorial.DateAnnot",aJCas.getDocumentLanguage()))
      makeAnnotations(dateAnnotationMaker, mediumDatePattern, dfDateMedium);
    if (resultSpec.containsType("org.apache.uima.tutorial.DateAnnot",aJCas.getDocumentLanguage()))
      makeAnnotations(dateAnnotationMaker, longDatePattern, dfDateLong);
View Full Code Here

Examples of org.apache.uima.analysis_engine.ResultSpecification.containsType()

    ResultSpecification resultSpec = getResultSpecification();
    if (resultSpec.containsType("org.apache.uima.tutorial.TimeAnnot",aJCas.getDocumentLanguage()))
      makeAnnotations(timeAnnotationMaker, hoursMinutesPattern, dfTimeShort);
    if (resultSpec.containsType("org.apache.uima.tutorial.DateAnnot",aJCas.getDocumentLanguage()))
      makeAnnotations(dateAnnotationMaker, numericDatePattern, dfDateShort);
    if (resultSpec.containsType("org.apache.uima.tutorial.DateAnnot",aJCas.getDocumentLanguage()))
      makeAnnotations(dateAnnotationMaker, mediumDatePattern, dfDateMedium);
    if (resultSpec.containsType("org.apache.uima.tutorial.DateAnnot",aJCas.getDocumentLanguage()))
      makeAnnotations(dateAnnotationMaker, longDatePattern, dfDateLong);
  }
View Full Code Here

Examples of org.apache.uima.analysis_engine.ResultSpecification.containsType()

      makeAnnotations(timeAnnotationMaker, hoursMinutesPattern, dfTimeShort);
    if (resultSpec.containsType("org.apache.uima.tutorial.DateAnnot",aJCas.getDocumentLanguage()))
      makeAnnotations(dateAnnotationMaker, numericDatePattern, dfDateShort);
    if (resultSpec.containsType("org.apache.uima.tutorial.DateAnnot",aJCas.getDocumentLanguage()))
      makeAnnotations(dateAnnotationMaker, mediumDatePattern, dfDateMedium);
    if (resultSpec.containsType("org.apache.uima.tutorial.DateAnnot",aJCas.getDocumentLanguage()))
      makeAnnotations(dateAnnotationMaker, longDatePattern, dfDateLong);
  }

  // HELPER METHODS
View Full Code Here

Examples of org.apache.uima.analysis_engine.ResultSpecification.containsType()

      ResultSpecification resultSpec = new ResultSpecification_impl();
      resultSpec.addResultType("uima.tt.TokenLikeAnnotation", true);
      resultSpec.setTypeSystem(cas.getTypeSystem());
      ResultSpecification acResultSpec = ae.computeAnalysisComponentResultSpec(resultSpec, ae
              .getAnalysisEngineMetaData().getCapabilities());
      assertTrue(acResultSpec.containsType("uima.tt.TokenAnnotation"));
      assertFalse(acResultSpec.containsType("uima.tt.SentenceAnnotation"));
      assertFalse(acResultSpec.containsType("uima.tt.Lemma"));
    } catch (Exception e) {
      JUnitExtension.handleException(e);
    }
View Full Code Here

Examples of org.apache.uima.analysis_engine.ResultSpecification.containsType()

      resultSpec.addResultType("uima.tt.TokenLikeAnnotation", true);
      resultSpec.setTypeSystem(cas.getTypeSystem());
      ResultSpecification acResultSpec = ae.computeAnalysisComponentResultSpec(resultSpec, ae
              .getAnalysisEngineMetaData().getCapabilities());
      assertTrue(acResultSpec.containsType("uima.tt.TokenAnnotation"));
      assertFalse(acResultSpec.containsType("uima.tt.SentenceAnnotation"));
      assertFalse(acResultSpec.containsType("uima.tt.Lemma"));
    } catch (Exception e) {
      JUnitExtension.handleException(e);
    }
  }
View Full Code Here

Examples of org.apache.uima.analysis_engine.ResultSpecification.containsType()

      resultSpec.setTypeSystem(cas.getTypeSystem());
      ResultSpecification acResultSpec = ae.computeAnalysisComponentResultSpec(resultSpec, ae
              .getAnalysisEngineMetaData().getCapabilities());
      assertTrue(acResultSpec.containsType("uima.tt.TokenAnnotation"));
      assertFalse(acResultSpec.containsType("uima.tt.SentenceAnnotation"));
      assertFalse(acResultSpec.containsType("uima.tt.Lemma"));
    } catch (Exception e) {
      JUnitExtension.handleException(e);
    }
  }
 
View Full Code Here

Examples of org.apache.uima.analysis_engine.ResultSpecification.containsType()

      // check if engine should be called -
      //   loop over all remaining output capabilities of the aggregate's result spec
      //     to see if this component of the aggregate produces that type or feature,
      //     for this language
      for (TypeOrFeature tof : tofsNeeded) {
        if ((tof.isType() && delegateProduces.containsType(tof.getName(), language)) ||
            (!tof.isType() && delegateProduces.containsFeature(tof.getName(), language))) {
//        if (capabilityContainer.hasOutputTypeOrFeature(tof, language, true)) {
          currentAnalysisResultSpec.addResultTypeOrFeature(tof);
          shouldEngineBeCalled = true;
          // remove current ToF from the result spec
View Full Code Here

Examples of org.apache.uima.analysis_engine.ResultSpecification.containsType()

      ResultSpecification resultSpec = new ResultSpecification_impl();
      resultSpec.addResultType("uima.tt.TokenLikeAnnotation", true);
      resultSpec.setTypeSystem(cas.getTypeSystem());
      ResultSpecification acResultSpec = ae.computeAnalysisComponentResultSpec(resultSpec, ae
              .getAnalysisEngineMetaData().getCapabilities());
      assertTrue(acResultSpec.containsType("uima.tt.TokenAnnotation"));
      assertFalse(acResultSpec.containsType("uima.tt.SentenceAnnotation"));
      assertFalse(acResultSpec.containsType("uima.tt.Lemma"));
    } catch (Exception e) {
      JUnitExtension.handleException(e);
    }
View Full Code Here

Examples of org.apache.uima.analysis_engine.ResultSpecification.containsType()

      resultSpec.addResultType("uima.tt.TokenLikeAnnotation", true);
      resultSpec.setTypeSystem(cas.getTypeSystem());
      ResultSpecification acResultSpec = ae.computeAnalysisComponentResultSpec(resultSpec, ae
              .getAnalysisEngineMetaData().getCapabilities());
      assertTrue(acResultSpec.containsType("uima.tt.TokenAnnotation"));
      assertFalse(acResultSpec.containsType("uima.tt.SentenceAnnotation"));
      assertFalse(acResultSpec.containsType("uima.tt.Lemma"));
    } catch (Exception e) {
      JUnitExtension.handleException(e);
    }
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.