Class EEEAnnotator
- 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.coordbaseline.annotators.EEEAnnotator
-
- All Implemented Interfaces:
org.apache.uima.analysis_component.AnalysisComponent
public class EEEAnnotator extends org.apache.uima.analysis_component.JCasAnnotator_ImplBase
-
-
Field Summary
Fields Modifier and Type Field Description static StringANTECEDENT_LABELstatic StringCOMPONENT_IDstatic StringCONJUNCT_LABELstatic StringCONJUNCTION_LABELstatic StringEEE_LABELstatic StringOUTSIDE_LABEL
-
Constructor Summary
Constructors Constructor Description EEEAnnotator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidinitialize(org.apache.uima.UimaContext aContext)voidprocess(org.apache.uima.jcas.JCas jcas)This method is used to process the information found so far (e.g.voidwriteEEEToCas(ArrayList<CoordinationToken> coordinationTokenList, ArrayList<Token> tokenList, org.apache.uima.jcas.JCas jcas)This method is used to write the EEE to the CAS.-
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
-
COMPONENT_ID
public static final String COMPONENT_ID
- See Also:
- Constant Field Values
-
EEE_LABEL
public static final String EEE_LABEL
- See Also:
- Constant Field Values
-
OUTSIDE_LABEL
public static final String OUTSIDE_LABEL
- See Also:
- Constant Field Values
-
CONJUNCTION_LABEL
public static final String CONJUNCTION_LABEL
- See Also:
- Constant Field Values
-
CONJUNCT_LABEL
public static final String CONJUNCT_LABEL
- See Also:
- Constant Field Values
-
ANTECEDENT_LABEL
public static final String ANTECEDENT_LABEL
- See Also:
- Constant Field Values
-
-
Method Detail
-
initialize
public void initialize(org.apache.uima.UimaContext aContext) throws org.apache.uima.resource.ResourceInitializationException- 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 jcas) throws org.apache.uima.analysis_engine.AnalysisEngineProcessExceptionThis method is used to process the information found so far (e.g. by the Tokenizer) and add new EEE information to the CAS. For every sentence within the CAS, a coordinationTokenList will be created. This list will be just another manifestation of the sentence which is suitable for baseline prediction of EEEs. Once the coordiantionTokenList is processed, the new information will be added to the CAS (e.g. by creating the accordant Objects like EEEs and writing them to the CAS).- Specified by:
processin classorg.apache.uima.analysis_component.JCasAnnotator_ImplBase- Throws:
org.apache.uima.analysis_engine.AnalysisEngineProcessException
-
writeEEEToCas
public void writeEEEToCas(ArrayList<CoordinationToken> coordinationTokenList, ArrayList<Token> tokenList, org.apache.uima.jcas.JCas jcas)
This method is used to write the EEE to the CAS. For this purpose the coordinationTokenList and the tokenList are used. CoordinationTokenList contains information about EEEs (EEELabel marks every token either to be within the EEE or outside). TokenList is used to access the begin and end information. The approach is to iterate trough the coordinationTokenList and to check every coordinationToken if it is inside an EEE (in other words, to check it's EEELabel). Once the first coordinationToken which is inside an EEE is found on a certain position in the coordinationTokenList, the token on the same position in the tokenList will be accessed and it's begin value will be kept in the beginEEE variable. Thus we found the begin of the EEE. Now the end of the EEE has to be established. For this purpose the variable endEEE will be updated while the coordinationTokens are inside the EEE. Thus it marks the end information of the currently last checked token within the EEE.- Parameters:
coordinationTokenList- ArrayListis used to find the EEE using the EEELabel of the coordinationTokens tokenList- ArrayListis used to get the begin and end values of tokens jcas- JCas which the EEE will be put into
-
-