Hello,
thats not supported by the dictionary. There are a couple of util
classes you can use to read and write dictionaries with more attributes,
have a look at our pos dictionary to see how it works, and the standard
dictionary class is also a good pointer.
HTH,
Jörn
On 10/17/2012 06:52 PM, Spoja, Danja wrote:
Hello,
I am pretty new to OpenNLP, so if my question has already been answered on this
forum, I'll be grateful to be pointed to the link for it. I could not find an
answer scanning the message titles.
So I have sample code that takes a dictionary file and creates a Dictionary
object. Here is the dictionary:
<?xml version="1.0" encoding="UTF-8"?>
<dictionary case_sensitive="false">
<entry ref="cheese">
<token>cheddar</token>
</entry>
<entry ref="vegetable">
<token>tomato</token>
</entry>
</dictionary>
When I run my sentence through the name finder, which was initialized with my
dictionary, I get correct matches for cheddar and tomato, which is great.
However, I would also like to get access to refs 'cheese' and 'vegetable'? I
looked through the source code for OpenNLP and I could not find a way to get to
those items. Is there a way?
Thanks a lot.
Danja