Package org.apache.uima.collection

Examples of org.apache.uima.collection.CollectionReader


        }
       
        collectionReaderMetaData.setFsIndexes(new FsIndexDescription[]
                {indexDesciptor});
       
        CollectionReader collectionReader;
        try
        {
            collectionReader = UIMAFramework
                    .produceCollectionReader(collectionReaderDescripton);
        }
View Full Code Here


    // add Collection Reader if specified
    if (collectionReaderDescriptor != null) {
      CollectionReaderDescription collectionReaderDescription = UIMAFramework.getXMLParser()
              .parseCollectionReaderDescription(new XMLInputSource(collectionReaderDescriptor));

      CollectionReader collectionReader = UIMAFramework
              .produceCollectionReader(collectionReaderDescription);

      uimaEEEngine.setCollectionReader(collectionReader);
    }
    uimaEEEngine.addStatusCallbackListener(new StatusCallbackListenerImpl());
View Full Code Here

              + "in classloader");
    }
    File collectionReaderDescriptor = new File(filename);
    CollectionReaderDescription collectionReaderDescription = UIMAFramework.getXMLParser()
            .parseCollectionReaderDescription(new XMLInputSource(collectionReaderDescriptor));
    CollectionReader collectionReader = UIMAFramework
            .produceCollectionReader(collectionReaderDescription);
    eeUimaEngine.setCollectionReader(collectionReader);
    initialize(eeUimaEngine, appCtx);
    waitUntilInitialized();
    runCrTest(eeUimaEngine, 7);
View Full Code Here

      CpeDescription cpeDesc = UIMAFramework.getXMLParser().parseCpeDescription(
    new XMLInputSource(JUnitExtension
        .getFile("CollectionProcessingEngineImplTest/externalResourceTestCpe.xml")));
      CollectionProcessingEngine cpe = UIMAFramework.produceCollectionProcessingEngine(cpeDesc, rm,
    null);
      CollectionReader colRdr = (CollectionReader) cpe.getCollectionReader();
      assertNotNull(colRdr.getUimaContext().getResourceObject("TestFileResource"));
      CasInitializer casIni = colRdr.getCasInitializer();
      assertNotNull(casIni.getUimaContext().getResourceObject("TestFileLanguageResource",
    new String[] { "en" }));
      AnalysisEngine ae = (AnalysisEngine) cpe.getCasProcessors()[0];
      assertNotNull(ae.getUimaContext().getResourceObject("TestResourceObject"));
      assertNotNull(ae.getUimaContext().getResourceObject("TestLanguageResourceObject",
View Full Code Here

        }

        collectionReaderMetaData.setFsIndexes(new FsIndexDescription[]
                {indexDesciptor});

        CollectionReader collectionReader;
        try
        {
            collectionReader = UIMAFramework
                    .produceCollectionReader(collectionReaderDescripton);
        }
View Full Code Here

public class CollectionReaderFactoryTest extends ComponentTestBase {

  @Test
  public void testCreateCollectionReader() throws UIMAException, IOException {

    CollectionReader reader = CollectionReaderFactory.createReader(
            SingleFileXReader.class, typeSystemDescription, SingleFileXReader.PARAM_FILE_NAME,
            "src/test/resources/data/docs/test.xmi", SingleFileXReader.PARAM_XML_SCHEME,
            SingleFileXReader.XMI);

    JCasIterator jCasIterator = new JCasIterator(reader);
View Full Code Here

/**
*/
public class CollectionReaderFactoryExternalResourceTest {
  @Test
  public void testAutoExternalResourceBinding() throws UIMAException, IOException {
    CollectionReader reader = createReader(
            TestReader.class,
            TestReader.PARAM_RESOURCE,
            createExternalResourceDescription(TestExternalResource.class,
                    TestExternalResource.PARAM_VALUE, TestExternalResource.EXPECTED_VALUE));

    reader.hasNext();
  }
View Full Code Here

   
      File textRoot = options.textRoot;
      File xmlRoot = options.xmlRoot;
      File outputRoot = options.outputRoot;
     
      CollectionReader reader = CollectionReaderFactory.createCollectionReader(
          FilesCollectionReader.class,
          FilesCollectionReader.PARAM_ROOT_FILE, textRoot.getPath());
     
      File preprocessDescFile = new File("desc/analysis_engine/RelationExtractorPreprocessor.xml");
      AnalysisEngine preprocessing = createPreprocessingAE(preprocessDescFile);
View Full Code Here

    File srlModelFile = options.srlModelFile;
    File inputFile = options.inputFile;
   
    TypeSystemDescription typeSystem = TypeSystemDescriptionFactory.createTypeSystemDescriptionFromPath("../ctakes-type-system/desc/common_type_system.xml");
       
    CollectionReader reader1 = CollectionReaderFactory.createCollectionReader(
        FilesCollectionReader.class,
        typeSystem,
        FilesCollectionReader.PARAM_ROOT_FILE,
        inputFile.toString()
        );
View Full Code Here

    ModifierExtractorEvaluation evaluation = new ModifierExtractorEvaluation(
        modelsDir,
        "-t", "0",   // svm kernel index
        "-c", "1000" // svm cost
        );
    CollectionReader collectionReader = evaluation.getCollectionReader(trainFiles);
    evaluation.train(collectionReader, modelsDir);
   
    // create the description
    AnalysisEngineDescription modifierExtractorDescription = AnalysisEngineFactory.createPrimitiveDescription(
        ModifierExtractorAnnotator.class,
View Full Code Here

TOP

Related Classes of org.apache.uima.collection.CollectionReader

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.