Skip to content

Commit

Permalink
#4399 - Allow OpenNLP Multi-Token Sequence Classifier to work for cro…
Browse files Browse the repository at this point in the history
…ss-sentence layers

- Use var in some places
  • Loading branch information
reckart committed Dec 27, 2023
1 parent b1ffa85 commit f0f4f5d
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -271,9 +271,9 @@ public static List<AnnotationFS> selectOverlapping(CAS aCas, Type aType, int aBe
@SuppressWarnings("unchecked")
public static <T extends AnnotationFS> T getNext(T aRef)
{
CAS cas = aRef.getCAS();
AnnotationIndex<AnnotationFS> idx = cas.getAnnotationIndex(aRef.getType());
FSIterator<AnnotationFS> it = idx.iterator(aRef);
var cas = aRef.getCAS();
var idx = cas.getAnnotationIndex(aRef.getType());
var it = idx.iterator(aRef);

if (!it.isValid()) {
return null;
Expand All @@ -287,7 +287,7 @@ public static <T extends AnnotationFS> T getNext(T aRef)
}

// Seek left until we hit the last FS that is no longer equal to the current
boolean moved = false;
var moved = false;
while (it.isValid() && idx.compare(it.get(), aRef) == 0) {
it.moveToPrevious();
moved = true;
Expand Down

0 comments on commit f0f4f5d

Please sign in to comment.