Package de.julielab.jcore.ae.jsbd.main
Class SentenceAnnotator
- java.lang.Object
-
- org.apache.uima.analysis_component.AnalysisComponent_ImplBase
-
- org.apache.uima.analysis_component.Annotator_ImplBase
-
- org.apache.uima.analysis_component.JCasAnnotator_ImplBase
-
- de.julielab.jcore.ae.jsbd.main.SentenceAnnotator
-
- All Implemented Interfaces:
org.apache.uima.analysis_component.AnalysisComponent
public class SentenceAnnotator extends org.apache.uima.analysis_component.JCasAnnotator_ImplBase
-
-
Field Summary
Fields Modifier and Type Field Description static StringPARAM_ALWAYS_SPLIT_NEWLINEstatic StringPARAM_CUT_AWAY_TYPESstatic StringPARAM_MAX_SENTENCE_LENGTHstatic StringPARAM_MODEL_FILEstatic StringPARAM_POSTPROCESSINGstatic StringPARAM_SENTENCE_DELIMITER_TYPES
-
Constructor Summary
Constructors Constructor Description SentenceAnnotator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidinitialize(org.apache.uima.UimaContext aContext)initiaziation of JSBD: load the model, set post processingvoidprocess(org.apache.uima.jcas.JCas aJCas)process method is in charge of doing the sentence splitting.-
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
-
-
-
-
Field Detail
-
PARAM_MODEL_FILE
public static final String PARAM_MODEL_FILE
- See Also:
- Constant Field Values
-
PARAM_POSTPROCESSING
public static final String PARAM_POSTPROCESSING
- See Also:
- Constant Field Values
-
PARAM_SENTENCE_DELIMITER_TYPES
public static final String PARAM_SENTENCE_DELIMITER_TYPES
- See Also:
- Constant Field Values
-
PARAM_CUT_AWAY_TYPES
public static final String PARAM_CUT_AWAY_TYPES
- See Also:
- Constant Field Values
-
PARAM_MAX_SENTENCE_LENGTH
public static final String PARAM_MAX_SENTENCE_LENGTH
- See Also:
- Constant Field Values
-
PARAM_ALWAYS_SPLIT_NEWLINE
public static final String PARAM_ALWAYS_SPLIT_NEWLINE
- See Also:
- Constant Field Values
-
-
Method Detail
-
initialize
public void initialize(org.apache.uima.UimaContext aContext) throws org.apache.uima.resource.ResourceInitializationExceptioninitiaziation of JSBD: load the model, set post processing- Specified by:
initializein interfaceorg.apache.uima.analysis_component.AnalysisComponent- Overrides:
initializein classorg.apache.uima.analysis_component.AnalysisComponent_ImplBase- Throws:
org.apache.uima.resource.ResourceInitializationException
-
process
public void process(org.apache.uima.jcas.JCas aJCas) throws org.apache.uima.analysis_engine.AnalysisEngineProcessExceptionprocess method is in charge of doing the sentence splitting. If processingScope is set, we iterate over Annotation objects of this type and do the sentence splitting within this scope. Otherwise, the whole document text is considered.- Specified by:
processin classorg.apache.uima.analysis_component.JCasAnnotator_ImplBase- Throws:
org.apache.uima.analysis_engine.AnalysisEngineProcessException
-
-