/** * Constructs a word id from the specified arguments. This constructor * produces a word with an unknown lemma. * * @param offset * the synset offset * @param pos * the part of speech; may not be <code>null</code> * @param num * the word number * @throws IllegalArgumentException * if the offset or number are not legal * @since JWI 1.0 */ public WordID(int offset, POS pos, int num){ this(new SynsetID(offset, pos), num); }
/** * Constructs a word id from the specified arguments. This constructor * produces a word with an unknown word number. * * @param offset * the synset offset * @param pos * the part of speech; may not be <code>null</code> * @param lemma * the lemma; may not be <code>null</code>, empty, or all * whitespace * @since JWI 1.0 */ public WordID(int offset, POS pos, String lemma){ this(new SynsetID(offset, pos), lemma); }
if (pos != null) return new SynsetID(offset, pos); return null;
throw new IllegalArgumentException("unknown part of speech tag: " + tag); return new SynsetID(offset, pos);
for (int i = 0; i < senseCount; i++) { offset = Integer.parseInt(tokenizer.nextToken()); words[i] = new WordID(new SynsetID(offset, pos), lemma);
ISynsetID id = new SynsetID(offset, pos);
ISynset synset = getSynset(new SynsetID(entry.getOffset(), entry.getPOS())); if(synset != null) for(IWord synonym : synset.getWords())