/** * Returns the part of speech of this word. * * @return the part of speech */ public POS getPOS() { return synset.getPOS(); }
@Override public String transform(Synset s) { return String.format("%08d%s", s.getOffset(), wordNetPosToString.transform(s.getPOS())); } }
public int hashCode() { return getPOS().hashCode() ^ (int) getOffset(); }
public int hashCode() { return getPOS().hashCode() ^ (int) getOffset(); }
@Override public void addSynset(Synset synset) throws JWNLException { super.addSynset(synset); getTable(synset.getPOS(), DictionaryFileType.DATA).put(synset.getKey(), synset); }
@Override public void removeSynset(Synset synset) throws JWNLException { getTable(synset.getPOS(), DictionaryFileType.DATA).remove(synset.getKey()); super.removeSynset(synset); }
@Override public void addSynset(Synset synset) throws JWNLException { super.addSynset(synset); getTable(synset.getPOS(), DictionaryFileType.DATA).put(synset.getKey(), synset); }
@Override public void removeSynset(Synset synset) throws JWNLException { getTable(synset.getPOS(), DictionaryFileType.DATA).remove(synset.getKey()); super.removeSynset(synset); }
@Override public void removeSynset(Synset synset) throws JWNLException { clearSynset(synset.getPOS(), synset.getKey()); super.removeSynset(synset); }
@Override public void removeSynset(Synset synset) throws JWNLException { clearSynset(synset.getPOS(), synset.getKey()); super.removeSynset(synset); }
/** * @param synset A WordNet synset. * @return Creates an Entity from a synset. */ public static Entity synsetToEntity(Synset synset) { if (synset == null) { return null; } return new Entity(getSynsetLexemes(synset), WordNetUtils.mapPos(synset.getPOS())); }
private void removeThisSynsetFromIndexWords(Word word) { if (null != dictionary && dictionary.isEditable()) { try { IndexWord indexWord = dictionary.getIndexWord(getPOS(), word.getLemma()); if (null != indexWord) { indexWord.getSenses().remove(Synset.this); } } catch (JWNLException e) { throw new JWNLRuntimeException(e); } } }
private void removeThisSynsetFromIndexWords(Word word) { if (null != dictionary && dictionary.isEditable()) { try { IndexWord indexWord = dictionary.getIndexWord(getPOS(), word.getLemma()); if (null != indexWord) { indexWord.getSenses().remove(Synset.this); } } catch (JWNLException e) { throw new JWNLRuntimeException(e); } } }
public CachedSense(String senseId) throws SenseInventoryException { super(senseId); synset = stringToSynset.transform(id); pos = wordNetPosToSiPos.transform(synset.getPOS()); useCount = 0; for (Word word : synset.getWords()) { useCount += word.getUseCount(); } }
protected int getSynsetType() { int ss_type = getPOS().getId(); if (POS.ADJECTIVE == getSynset().getPOS() && getSynset().isAdjectiveCluster()) { ss_type = POS.ADJECTIVE_SATELLITE_ID; } return ss_type; }
protected int getSynsetType() { int ss_type = getPOS().getId(); if (POS.ADJECTIVE == getSynset().getPOS() && getSynset().isAdjectiveCluster()) { ss_type = POS.ADJECTIVE_SATELLITE_ID; } return ss_type; }