You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please check the eu.fbk.dkm.pikes.tintop.annotators.MateSrlAnnotator#createMateSentence method. As you can see, the length for the forms, poss,... arrays is set after the CoreMap.size() method
int size = stanfordSentence.size();
String[] forms = new String[size + 1];
String[] poss = new String[size + 1];
....
which doesn't tell the number of tokens but the number of annotations, so the later iteration over the tokens could lead to an ArrayOutOfBound exception:
java.util.List<CoreLabel> get = stanfordSentence.get(
CoreAnnotations.TokensAnnotation.class);
for (int i = 0; i < get.size(); i++) {
....
}
I assume that the arrays should be sized after the number of tokens (+1 for some of them). If yes, please let me know and I will branch-fix-pull request it ASAP.
The text was updated successfully, but these errors were encountered:
Please check the
eu.fbk.dkm.pikes.tintop.annotators.MateSrlAnnotator#createMateSentence
method. As you can see, the length for theforms
,poss
,... arrays is set after theCoreMap.size()
methodwhich doesn't tell the number of tokens but the number of annotations, so the later iteration over the tokens could lead to an
ArrayOutOfBound
exception:I assume that the arrays should be sized after the number of tokens (+1 for some of them). If yes, please let me know and I will branch-fix-pull request it ASAP.
The text was updated successfully, but these errors were encountered: