/** * Create a CollectionReader from an XML descriptor file and a set of configuration parameters. * * @param descriptorPath * The path to the XML descriptor file. * @param configurationData * Any additional configuration parameters to be set. These should be supplied as (name, * value) pairs, so there should always be an even number of parameters. * @return The CollectionReader created from the XML descriptor and the configuration parameters. * @deprecated use {@link #createReaderFromPath(String, Object...)} * @throws UIMAException * if the descriptor could not be created or if the component could not be instantiated * @throws IOException * if the descriptor could not be read */ @Deprecated public static CollectionReader createCollectionReaderFromPath(String descriptorPath, Object... configurationData) throws UIMAException, IOException { return createReaderFromPath(descriptorPath, configurationData); }
@Override public void initialize(UimaContext context) throws ResourceInitializationException { super.initialize(context); readers = new ArrayList<>(); for (String readerFile : readerFiles) { try { readers.add(CollectionReaderFactory.createReaderFromPath(readerFile)); } catch (UIMAException e) { throw new ResourceInitializationException(e); } catch (IOException e) { throw new ResourceInitializationException(e); } } }
public BagOfAnnotationsGenerator(String inputDir, String outputDir, String aePath) throws UIMAException, IOException { reader = CollectionReaderFactory .createReaderFromPath( "../ctakes-core/desc/collection_reader/FilesInDirectoryCollectionReader.xml", ConfigParameterConstants.PARAM_INPUTDIR, inputDir ); this.ae = AnalysisEngineFactory.createEngineFromPath( aePath == null ? defaultAEPath : aePath ); this.outputDir = outputDir; this.classOfT = getClassOfT(); }
public BagOfAnnotationsGenerator(String inputDir, String outputDir, String aePath) throws UIMAException, IOException { reader = CollectionReaderFactory .createReaderFromPath( "../ctakes-core/desc/collection_reader/FilesInDirectoryCollectionReader.xml", ConfigParameterConstants.PARAM_INPUTDIR, inputDir ); this.ae = AnalysisEngineFactory.createEngineFromPath( aePath == null ? defaultAEPath : aePath ); this.outputDir = outputDir; this.classOfT = getClassOfT(); }
CollectionReader reader = CollectionReaderFactory.createReaderFromPath( "../ctakes-core/desc/collection_reader/FilesInDirectoryCollectionReader.xml", ConfigParameterConstants.PARAM_INPUTDIR,
CollectionReader reader = CollectionReaderFactory.createReaderFromPath( "../ctakes-core/desc/collection_reader/FilesInDirectoryCollectionReader.xml", ConfigParameterConstants.PARAM_INPUTDIR,