Re: JWNL bug???

2015-06-10 Thread Aliaksandr Autayeu
Most likely not. It looks like the first option refers to PennTreeBank tags
(nouns - N-N, N-NS, etc, verbs - V-B, V-BD, etc, adjectives - J-J, J-JR,
J-JS, adverbs - R-B, etc) and the second option refers to WordNet nvar
tags - n-oun, v-erb, a-djective, adve-r-b. It's a bit strange to see two
type of tags together, but it does not seem too random :) This line from
main confirms the first guess:

dict.getLemmas(word,NN)

Aliaksandr

On 10 June 2015 at 16:43, Russ, Daniel (NIH/CIT) [E] dr...@mail.nih.gov
wrote:

 Hi,
I am not sure if this is a bug or not.  In getLemmas(String word,
 String tag) method of JWNLDictionary, if you are looking up adjectives it
 checks if the tag starts with J or a.  Anyone know if this a bug or
 deliberate?  (JWNL-1.3.3 distributed with opennlp-1.5.3)

   if (tag.startsWith(N) || tag.startsWith(n)) {
 pos = POS.NOUN;
   }
   else if (tag.startsWith(V) || tag.startsWith(v)) {
 pos = POS.VERB;
   }
   else if (tag.startsWith(J) || tag.startsWith(a)) {
 pos = POS.ADJECTIVE;
   }
   else if (tag.startsWith(R) || tag.startsWith(r)) {
 pos = POS.ADVERB;
   }
   else {
 pos = POS.NOUN;
   }

 Dan



JWNL bug???

2015-06-10 Thread Russ, Daniel (NIH/CIT) [E]
Hi,
   I am not sure if this is a bug or not.  In getLemmas(String word, String 
tag) method of JWNLDictionary, if you are looking up adjectives it checks if 
the tag starts with J or a.  Anyone know if this a bug or deliberate?  
(JWNL-1.3.3 distributed with opennlp-1.5.3)

  if (tag.startsWith(N) || tag.startsWith(n)) {
pos = POS.NOUN;
  }
  else if (tag.startsWith(V) || tag.startsWith(v)) {
pos = POS.VERB;
  }
  else if (tag.startsWith(J) || tag.startsWith(a)) {
pos = POS.ADJECTIVE;
  }
  else if (tag.startsWith(R) || tag.startsWith(r)) {
pos = POS.ADVERB;
  }
  else {
pos = POS.NOUN;
  }

Dan