Hello, the main method is actually a good example on how to use it. So have a look at it.
Let me know if there are further questions. We still need to update that part of the documentation. There should be a proper sample and explanation. Hope that helps, Jörn On 06/13/2012 06:42 PM, Carlos Scheidecker wrote:
The opennlp.tools.lang.english.TreebankLinker has a Main method to perform Coreference resolutions. One can call that from the command line. I would like to know how to use that with the Java API. Can anyone provide an example? Thanks, Carlos. I've also found this explanation here: http://mail-archives.apache.org/mod_mbox/opennlp-users/201112.mbox/%3c4ed76af3.8020...@gmail.com%3E I now got it running with 1.5. You need to do the following. Use our Parser to parse an input article. Use the TreebankNameFinder to add names to your parsed article (its now in the trunk, see OPENNLP-407). I used this command: java -cp ... TreebankNameFinder -parse ner/date.bin ner/location.bin ner/money.bin ner/organization.bin ner/percentage.bin ner/person.bin ner/time.bin The names of models does matter. When you get the models from the website rename them as I did. Now you need to run the TreebankLinker. It just needs the model directory and you need to set WNSEARCHDIR to your wordnet directory, e.g like this -DWNSEARCHDIR=wordnet/dict Now the TreebankLinker is ready to link mentions together. Let us know if you have issues to get this running. Hope this helps, Jörn