private static boolean hasUseCount(final IndexWord iw) { for (final Synset synset : iw.getSenses()) { for (final Word word : synset.getWords()) { if (0 < word.getUseCount()) { return true; } } } return false; }
private static boolean hasPointer(final IndexWord iw, final PointerType pointerType) { for (final Synset synset : iw.getSenses()) { for (final Pointer pointer : synset.getPointers()) { if (pointerType == pointer.getType()) { return true; } } } return false; }
public POS getTargetPOS() throws JWNLException { if (null == target) { if (null != source.getDictionary() && source.getDictionary().isEditable()) { return getTarget().getSynset().getPOS(); } else { return targetIndex.pos; } } else { return target.getSynset().getPOS(); } }
/** * Returns the synset that is a) the target of this pointer, or b) the synset that contains the target of this pointer. * * @return the synset that is a) the target of this pointer, or b) the synset that contains the target of this pointer. * @throws JWNLException JWNLException */ public Synset getTargetSynset() throws JWNLException { if (null == getTarget()) { return null; } return getTarget().getSynset(); }
public Synset(Dictionary dictionary, POS pos, long offset) throws JWNLException { super(dictionary); checkPOSIsNotNull(dictionary, pos); this.pos = pos; pointers = new PointerList(); words = new WordList(); this.offset = offset; if (null != dictionary && dictionary.isEditable()) { dictionary.addSynset(this); } }
public Synset createSynset(POS pos) throws JWNLException { if (POS.VERB == pos) { return new VerbSynset(dictionary, createNewOffset(pos)); } else if (POS.ADJECTIVE == pos) { return new AdjectiveSynset(dictionary, createNewOffset(pos)); } else { return new Synset(dictionary, pos, createNewOffset(pos)); } }
private static boolean hasUseCount(final IndexWord iw) { for (final Synset synset : iw.getSenses()) { for (final Word word : synset.getWords()) { if (0 < word.getUseCount()) { return true; } } } return false; }
private static boolean hasPointer(final IndexWord iw, final PointerType pointerType) { for (final Synset synset : iw.getSenses()) { for (final Pointer pointer : synset.getPointers()) { if (pointerType == pointer.getType()) { return true; } } } return false; }
public POS getTargetPOS() throws JWNLException { if (null == target) { if (null != source.getDictionary() && source.getDictionary().isEditable()) { return getTarget().getSynset().getPOS(); } else { return targetIndex.pos; } } else { return target.getSynset().getPOS(); } }
/** * Returns the synset that is a) the target of this pointer, or b) the synset that contains the target of this pointer. * * @return the synset that is a) the target of this pointer, or b) the synset that contains the target of this pointer. * @throws JWNLException JWNLException */ public Synset getTargetSynset() throws JWNLException { if (null == getTarget()) { return null; } return getTarget().getSynset(); }
public Synset(Dictionary dictionary, POS pos) throws JWNLException { super(dictionary); checkPOSIsNotNull(dictionary, pos); this.pos = pos; pointers = new PointerList(); words = new WordList(); if (null != dictionary && dictionary.isEditable()) { dictionary.addSynset(this); } }