Determining a word's tags

To obtain the tags for a given word, use the getTags method. This returns an array of tags represented by strings. The tags are then displayed, as shown here:

String tags[] = tagDictionary.getTags("force"); 
for (String tag : tags) { 
    System.out.print("/" + tag); 
} 
System.out.println(); 

The output is as follows:

/NN/VBP/VB

This means that the word "force" can be interpreted in three different ways.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset