Berico-Technologies/CLAVIN — pull request #3 by seanlavelle (2012-11-20 21:55:29+00:00)
Title: Reporting positions inside the document

I added a LocationOccurrence class, which contains a string and an int offset. Where clavin used to use just a string to represent a location, now it uses one of these, so that it can report the positions inside the document where it found locations.

There's three lines in GeoParserTest to test that the positions are correct in the output.

The ApacheExtractor now uses "Spans" to figure out this position information. It also now scans through the sentences in the document one at a time, like the opennlp documentation recommends, instead of treating the whole document like one big sentence. (I already had some code written that did it this way, and this patch is based on that code)

Doing the sentence splitting brings in another opennlp binary file called en-sent.bin.