Package org.apache.uima.resource

Examples of org.apache.uima.resource.ResourceSpecifier


      try {
         AnalysisEngine ae = null;
         // Create an XML input source from the specifier file.
         XMLInputSource in = new XMLInputSource(descFilePath);
         // Parse the specifier.
         ResourceSpecifier specifier = UIMAFramework.getXMLParser()
               .parseResourceSpecifier(in);
         // Create the Text Analysis Engine.
         ae = UIMAFramework.produceAnalysisEngine(specifier, null, null);

         // Create a new CAS.
View Full Code Here


      if (!validArgs) {
        printUsageMessage();
      } else {
        // get Resource Specifier from XML file
        XMLInputSource in = new XMLInputSource(taeDescriptor);
        ResourceSpecifier specifier = UIMAFramework.getXMLParser().parseResourceSpecifier(in);

        // for debugging, output the Resource Specifier
        // System.out.println(specifier);

        // create Analysis Engine
View Full Code Here

         // Create an XML input source from the specifier file.
         XMLInputSource in = new XMLInputSource(JUnitExtension
               .getURL("AnnotationWriter.xml"));
         // Parse the specifier.
         ResourceSpecifier specifier = UIMAFramework.getXMLParser()
               .parseResourceSpecifier(in);

         CasConsumer consumer = UIMAFramework.produceCasConsumer(specifier);

         consumer.setConfigParameterValue("AnnotationTypes", AnnotationTypes);
View Full Code Here

        ((CorporaCollectionReader) collectionReader).setCorpora(mCorpora);

        InputStream in = getClass().getResourceAsStream("DummyTAE.xml");

//      load dummy descriptor
        ResourceSpecifier textAnalysisEngineSpecifier;
        try
        {
            textAnalysisEngineSpecifier = UIMAFramework.getXMLParser()
                    .parseResourceSpecifier(
                    new XMLInputSource(in, new File("")));
View Full Code Here

      AnalysisEngine ae = null;
      CAS cas = null;
      // get resource specifier from XML file
      XMLInputSource in = new XMLInputSource(taeDescFilePath);
      ResourceSpecifier specifier = UIMAFramework.getXMLParser().parseResourceSpecifier(in);

      // create analysis engine with resource manager
      ae = UIMAFramework.produceAnalysisEngine(specifier, resMgr, null);
      // check ae
      Assert.assertNotNull(ae);
View Full Code Here

    delegateMap.put("key", delegateImport);

    // test that import is resolved
    Map<String, ResourceSpecifier> mapWithImportsResolved = testAgg.getDelegateAnalysisEngineSpecifiers();
    assertEquals(1, mapWithImportsResolved.size());
    ResourceSpecifier obj = mapWithImportsResolved.values().iterator().next();
    assertTrue(obj instanceof AnalysisEngineDescription);

    // test that remove works
    delegateMap.remove("key");
    mapWithImportsResolved = testAgg.getDelegateAnalysisEngineSpecifiers();
View Full Code Here

    // Create resouce manager and set PEAR package classpath
    ResourceManager rsrcMgr = UIMAFramework.newDefaultResourceManager();

    // Create analysis engine from the installed PEAR package
    XMLInputSource in = new XMLInputSource(instPear.getComponentPearDescPath());
    ResourceSpecifier specifier = UIMAFramework.getXMLParser()
          .parseResourceSpecifier(in);
    AnalysisEngine ae = UIMAFramework.produceAnalysisEngine(
          specifier, rsrcMgr, null);
    Assert.assertNotNull(ae);
   
View Full Code Here

      // Create an XML input source from the specifier file.
      XMLInputSource in = new XMLInputSource(JUnitExtension
              .getFile("SequencerTest/SequencerFixedAggregate.xml"));
      // Parse the specifier.
      ResourceSpecifier specifier = UIMAFramework.getXMLParser().parseResourceSpecifier(in);
      // Create the Text Analysis Engine.
      ae = UIMAFramework.produceAnalysisEngine(specifier, null, null);
      // Create a new CAS.
      CAS cas = ae.newCAS();
      // Our sample text.
View Full Code Here

      // Create an XML input source from the specifier file.
      XMLInputSource in = new XMLInputSource(JUnitExtension
              .getFile("SequencerTest/SequencerFixedAggregate.xml"));
      // Parse the specifier.
      ResourceSpecifier specifier = UIMAFramework.getXMLParser().parseResourceSpecifier(in);
      // Create the Text Analysis Engine.
      ae = UIMAFramework.produceAnalysisEngine(specifier, null, null);
      // Create a new CAS.
      CAS cas = ae.newCAS();
      // Our sample text.
View Full Code Here

      // Create an XML input source from the specifier file.
      XMLInputSource in = new XMLInputSource(JUnitExtension
              .getFile("SequencerTest/SequencerFixedAggregate.xml"));
      // Parse the specifier.
      ResourceSpecifier specifier = UIMAFramework.getXMLParser().parseResourceSpecifier(in);
      // Create the Text Analysis Engine.
      ae = UIMAFramework.produceAnalysisEngine(specifier, null, null);
      // Create a new CAS.
      CAS cas = ae.newCAS();
      // Our sample text.
View Full Code Here

TOP

Related Classes of org.apache.uima.resource.ResourceSpecifier

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.