Skip to content

Commit

Permalink
Merge pull request #8 from m-stoeckel/master
Browse files Browse the repository at this point in the history
Version 1.2.2
  • Loading branch information
manu-schaaf authored Mar 4, 2021
2 parents db48449 + 0b6a730 commit ee3e5d8
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
</parent>
<groupId>org.texttechnologylab</groupId>
<artifactId>textimager-uima-agreement</artifactId>
<version>1.2.1</version>
<version>1.2.2</version>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,13 @@ public class RelationAnnotationAgreement extends AbstractIAAEngine {
public void initialize(UimaContext context) throws ResourceInitializationException {
annotationClasses = ImmutableSet.of(Entity.class, Event.class, Signal.class);
super.initialize(context);
switch (pMultiCasHandling) {
case COMBINED:
case BOTH:
logger.warn(String.format("RelationAnnotationAgreement.PARAM_MULTI_CAS_HANDLING=%s is not implemented, " +
"defaulting to SEPARATE.", pMultiCasHandling));
break;
}
}

@Override
Expand Down Expand Up @@ -189,7 +196,9 @@ public void process(JCas jCas) throws AnalysisEngineProcessException {

switch (pMultiCasHandling) {
case SEPARATE:
case COMBINED:
case BOTH:
default:
handleSeparate(
jCas,
predicateIdentificationStudy,
Expand All @@ -209,6 +218,15 @@ public void process(JCas jCas) throws AnalysisEngineProcessException {
}
}

@Nonnull
protected JCas initializeIaaView(JCas jCas) {
JCas viewIAA = JCasUtil.getView(jCas, "IAA", true);
if (viewIAA.getDocumentText() == null)
viewIAA.setDocumentText(jCas.getDocumentText());
viewIAA.removeAllIncludingSubtypes(AgreementValue.type);
return viewIAA;
}

private void handleSeparate(
JCas jCas,
CodingAnnotationStudy predicateIdentificationStudy,
Expand Down

0 comments on commit ee3e5d8

Please sign in to comment.