org.apache.ctakes.assertion.cr
Class MiPACQKnowtatorXMLReader
java.lang.Object
org.apache.uima.analysis_component.AnalysisComponent_ImplBase
org.apache.uima.analysis_component.Annotator_ImplBase
org.apache.uima.analysis_component.JCasAnnotator_ImplBase
org.uimafit.component.JCasAnnotator_ImplBase
org.apache.ctakes.assertion.cr.MiPACQKnowtatorXMLReader
- All Implemented Interfaces:
- org.apache.uima.analysis_component.AnalysisComponent
public class MiPACQKnowtatorXMLReader
- extends org.uimafit.component.JCasAnnotator_ImplBase
assumes knowtator xml files are in "exported-xml" subdirectory w/ train/dev/test subsubdirs
and the original plaintext files are in "text" subdirectory w/ train/dev/test subsubdirs
Method Summary |
protected static String[] |
getAnnotatorNames()
Returns the names of the annotators in the Knowtator files that represent the gold standard |
protected URI |
getKnowtatorURI(org.apache.uima.jcas.JCas jCas)
Get the URI for the Knowtator XML file that should be loaded |
protected URI |
getTextURI(org.apache.uima.jcas.JCas jCas)
Get the URI that the text in this class was loaded from |
static void |
main(String[] args)
This main method is only for testing purposes. |
void |
process(org.apache.uima.jcas.JCas jCas)
|
Methods inherited from class org.uimafit.component.JCasAnnotator_ImplBase |
getLogger, initialize |
Methods inherited from class org.apache.uima.analysis_component.JCasAnnotator_ImplBase |
getRequiredCasInterface, process |
Methods inherited from class org.apache.uima.analysis_component.Annotator_ImplBase |
getCasInstancesRequired, hasNext, next |
Methods inherited from class org.apache.uima.analysis_component.AnalysisComponent_ImplBase |
batchProcessComplete, collectionProcessComplete, destroy, getContext, getResultSpecification, reconfigure, setResultSpecification |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PARAM_TEXT_DIRECTORY
public static final String PARAM_TEXT_DIRECTORY
- See Also:
- Constant Field Values
PARAM_SET_DEFAULTS
public static final String PARAM_SET_DEFAULTS
- See Also:
- Constant Field Values
MiPACQKnowtatorXMLReader
public MiPACQKnowtatorXMLReader()
getTextURI
protected URI getTextURI(org.apache.uima.jcas.JCas jCas)
throws org.apache.uima.analysis_engine.AnalysisEngineProcessException
- Get the URI that the text in this class was loaded from
- Throws:
org.apache.uima.analysis_engine.AnalysisEngineProcessException
getKnowtatorURI
protected URI getKnowtatorURI(org.apache.uima.jcas.JCas jCas)
throws org.apache.uima.analysis_engine.AnalysisEngineProcessException
- Get the URI for the Knowtator XML file that should be loaded
- Throws:
org.apache.uima.analysis_engine.AnalysisEngineProcessException
getAnnotatorNames
protected static String[] getAnnotatorNames()
- Returns the names of the annotators in the Knowtator files that represent the gold standard
process
public void process(org.apache.uima.jcas.JCas jCas)
throws org.apache.uima.analysis_engine.AnalysisEngineProcessException
- Specified by:
process
in class org.apache.uima.analysis_component.JCasAnnotator_ImplBase
- Throws:
org.apache.uima.analysis_engine.AnalysisEngineProcessException
main
public static void main(String[] args)
throws Exception
- This main method is only for testing purposes. It runs the reader on Knowtator directories.
args[0] = "/usr/data/MiPACQ/copies-of-just-clinical-knowtator-xml-and-text/";
should have a child directory called "text"
should have a child directory called "exported-xml"
files in knowtator xml directory should have files that end with .xml
- Throws:
Exception
Copyright © 2012-2013 The Apache Software Foundation. All Rights Reserved.