Package org.apache.uima.resource.metadata

Examples of org.apache.uima.resource.metadata.TypeSystemDescription.addType()


      XMLInputSource in = new XMLInputSource(url);
      AnalysisEngineDescription specifier = (AnalysisEngineDescription) UIMAFramework
              .getXMLParser().parseResourceSpecifier(in);

      TypeSystemDescription basicTypeSystem = specifier.getAnalysisEngineMetaData().getTypeSystem();
      basicTypeSystem.addType(HtmlAnnotator.NAMESPACE + "A", "Type for Testing",
              "uima.tcas.Annotation");
      basicTypeSystem.addType(HtmlAnnotator.NAMESPACE + "I", "Type for Testing",
              "uima.tcas.Annotation");
      basicTypeSystem.addType(HtmlAnnotator.NAMESPACE + "B", "Type for Testing",
              "uima.tcas.Annotation");
View Full Code Here


              .getXMLParser().parseResourceSpecifier(in);

      TypeSystemDescription basicTypeSystem = specifier.getAnalysisEngineMetaData().getTypeSystem();
      basicTypeSystem.addType(HtmlAnnotator.NAMESPACE + "A", "Type for Testing",
              "uima.tcas.Annotation");
      basicTypeSystem.addType(HtmlAnnotator.NAMESPACE + "I", "Type for Testing",
              "uima.tcas.Annotation");
      basicTypeSystem.addType(HtmlAnnotator.NAMESPACE + "B", "Type for Testing",
              "uima.tcas.Annotation");
      basicTypeSystem.addType(HtmlAnnotator.NAMESPACE + "U", "Type for Testing",
              "uima.tcas.Annotation");
View Full Code Here

      TypeSystemDescription basicTypeSystem = specifier.getAnalysisEngineMetaData().getTypeSystem();
      basicTypeSystem.addType(HtmlAnnotator.NAMESPACE + "A", "Type for Testing",
              "uima.tcas.Annotation");
      basicTypeSystem.addType(HtmlAnnotator.NAMESPACE + "I", "Type for Testing",
              "uima.tcas.Annotation");
      basicTypeSystem.addType(HtmlAnnotator.NAMESPACE + "B", "Type for Testing",
              "uima.tcas.Annotation");
      basicTypeSystem.addType(HtmlAnnotator.NAMESPACE + "U", "Type for Testing",
              "uima.tcas.Annotation");
      specifier.getAnalysisEngineMetaData().setTypeSystem(basicTypeSystem);
View Full Code Here

              "uima.tcas.Annotation");
      basicTypeSystem.addType(HtmlAnnotator.NAMESPACE + "I", "Type for Testing",
              "uima.tcas.Annotation");
      basicTypeSystem.addType(HtmlAnnotator.NAMESPACE + "B", "Type for Testing",
              "uima.tcas.Annotation");
      basicTypeSystem.addType(HtmlAnnotator.NAMESPACE + "U", "Type for Testing",
              "uima.tcas.Annotation");
      specifier.getAnalysisEngineMetaData().setTypeSystem(basicTypeSystem);

      AnalysisEngine ae = UIMAFramework.produceAnalysisEngine(specifier);
      ae.setConfigParameterValue("outputView", outputViewName);
View Full Code Here

    XMLInputSource in = new XMLInputSource(url);
    AnalysisEngineDescription specifier = (AnalysisEngineDescription) UIMAFramework
            .getXMLParser().parseResourceSpecifier(in);

    TypeSystemDescription basicTypeSystem = specifier.getAnalysisEngineMetaData().getTypeSystem();
    basicTypeSystem.addType(HtmlAnnotator.NAMESPACE + "A", "Type for Testing",
            "uima.tcas.Annotation");
    basicTypeSystem.addType(HtmlAnnotator.NAMESPACE + "I", "Type for Testing",
            "uima.tcas.Annotation");
    basicTypeSystem.addType(HtmlAnnotator.NAMESPACE + "B", "Type for Testing",
            "uima.tcas.Annotation");
View Full Code Here

            .getXMLParser().parseResourceSpecifier(in);

    TypeSystemDescription basicTypeSystem = specifier.getAnalysisEngineMetaData().getTypeSystem();
    basicTypeSystem.addType(HtmlAnnotator.NAMESPACE + "A", "Type for Testing",
            "uima.tcas.Annotation");
    basicTypeSystem.addType(HtmlAnnotator.NAMESPACE + "I", "Type for Testing",
            "uima.tcas.Annotation");
    basicTypeSystem.addType(HtmlAnnotator.NAMESPACE + "B", "Type for Testing",
            "uima.tcas.Annotation");
    basicTypeSystem.addType(HtmlAnnotator.NAMESPACE + "U", "Type for Testing",
            "uima.tcas.Annotation");
View Full Code Here

    TypeSystemDescription basicTypeSystem = specifier.getAnalysisEngineMetaData().getTypeSystem();
    basicTypeSystem.addType(HtmlAnnotator.NAMESPACE + "A", "Type for Testing",
            "uima.tcas.Annotation");
    basicTypeSystem.addType(HtmlAnnotator.NAMESPACE + "I", "Type for Testing",
            "uima.tcas.Annotation");
    basicTypeSystem.addType(HtmlAnnotator.NAMESPACE + "B", "Type for Testing",
            "uima.tcas.Annotation");
    basicTypeSystem.addType(HtmlAnnotator.NAMESPACE + "U", "Type for Testing",
            "uima.tcas.Annotation");
    specifier.getAnalysisEngineMetaData().setTypeSystem(basicTypeSystem);
   
View Full Code Here

            "uima.tcas.Annotation");
    basicTypeSystem.addType(HtmlAnnotator.NAMESPACE + "I", "Type for Testing",
            "uima.tcas.Annotation");
    basicTypeSystem.addType(HtmlAnnotator.NAMESPACE + "B", "Type for Testing",
            "uima.tcas.Annotation");
    basicTypeSystem.addType(HtmlAnnotator.NAMESPACE + "U", "Type for Testing",
            "uima.tcas.Annotation");
    specifier.getAnalysisEngineMetaData().setTypeSystem(basicTypeSystem);
   
    AnalysisEngine ae = UIMAFramework.produceAnalysisEngine(specifier);
    ae.setConfigParameterValue("outputView", outputViewName);
View Full Code Here

    ResourceSpecifier specifier = UIMAFramework.getXMLParser().parseResourceSpecifier(in);
    AnalysisEngineDescription aed = (AnalysisEngineDescription) specifier;

    TypeSystemDescription basicTypeSystem = aed.getAnalysisEngineMetaData().getTypeSystem();
    for (int i = 1; i <= 50; i++) {
      basicTypeSystem.addType(RutaTestUtils.TYPE + i, "Type for Testing",
              "uima.tcas.Annotation");
    }
    Collection<TypeSystemDescription> tsds = new ArrayList<TypeSystemDescription>();
    tsds.add(basicTypeSystem);
    TypeSystemDescription mergeTypeSystems = CasCreationUtils.mergeTypeSystems(tsds);
View Full Code Here

  public void testApply() throws Exception {
    URL typePrioritiesUrl = RutaTestUtils.class.getResource("TypePriorities.xml");
    URL tsUrl = RutaTestUtils.class.getResource("BasicTypeSystem.xml");
    Object descriptor = UIMAFramework.getXMLParser().parse(new XMLInputSource(tsUrl));
    TypeSystemDescription tsDesc = (TypeSystemDescription) descriptor;
    tsDesc.addType("uima.ruta.T1", "", "uima.tcas.Annotation");
    tsDesc.addType("uima.ruta.T2", "", "uima.tcas.Annotation");
    tsDesc.addType("uima.ruta.T3", "", "uima.tcas.Annotation");
    tsDesc.resolveImports();
    TypePriorities typePriorities = UIMAFramework.getXMLParser().parseTypePriorities(new XMLInputSource(typePrioritiesUrl));
    CAS cas = CasCreationUtils.createCas(tsDesc, typePriorities, new FsIndexDescription[0]);
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.