public class OneDocPerLineReader
extends org.apache.uima.fit.component.JCasCollectionReader_ImplBase
CollectionReader that takes a simple text file as input. Each line is
turned into a new CAS. Format is:docId{tab}textSentenceDumpAnnotator| Modifier and Type | Field and Description |
|---|---|
protected String |
inputFile |
protected String |
nextLine |
protected int |
pmId |
protected Iterator<String> |
textFileReader |
| Constructor and Description |
|---|
OneDocPerLineReader() |
| Modifier and Type | Method and Description |
|---|---|
void |
getNext(org.apache.uima.jcas.JCas jcas) |
org.apache.uima.util.Progress[] |
getProgress() |
boolean |
hasNext() |
void |
initialize(org.apache.uima.UimaContext context) |
close, getLogger, getNext, initializedestroy, getCasInitializer, getProcessingResourceMetaData, initialize, isConsuming, reconfigure, setCasInitializer, typeSystemInitgetConfigParameterValue, getConfigParameterValue, setConfigParameterValue, setConfigParameterValuegetCasManager, getMetaData, getResourceManager, getUimaContext, getUimaContextAdmin, setLogger, setMetaDataclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitprotected String inputFile
protected String nextLine
protected int pmId
public void initialize(org.apache.uima.UimaContext context)
throws org.apache.uima.resource.ResourceInitializationException
initialize in class org.apache.uima.fit.component.JCasCollectionReader_ImplBaseorg.apache.uima.resource.ResourceInitializationExceptionpublic void getNext(org.apache.uima.jcas.JCas jcas)
throws IOException,
org.apache.uima.collection.CollectionException
getNext in class org.apache.uima.fit.component.JCasCollectionReader_ImplBaseIOExceptionorg.apache.uima.collection.CollectionExceptionpublic boolean hasNext()
throws IOException,
org.apache.uima.collection.CollectionException
IOExceptionorg.apache.uima.collection.CollectionExceptionpublic org.apache.uima.util.Progress[] getProgress()
Copyright © 2015 Bluebrain Project. All rights reserved.