For certain pairs of JCas texts, the metrics MTLDComparator,
SentenceRatioComparator, and TokenRatioComparator give an output of Infinity
instead of a regular double. This can break downstream processing. It would
be helpful if the metrics instead outputted a very large number that could
still be read as a double.
It appears that Infinity is returned if, due to the text annotation in the JCas
passed into the metric, one of the annotation counts for a text is 0. All
three metrics have denominators of unscreened annotation counts.
This problem could be fixed by checking if a metric's denominator is 0, and if
so, substituting a very-small-but-not-0 number in its place.
Original issue reported on code.google.com by EmilyKJa...@gmail.com on 9 Nov 2012 at 3:57
Original issue reported on code.google.com by
EmilyKJa...@gmail.com
on 9 Nov 2012 at 3:57