@Override public LexicographerFileInformation getLexicographerFileInformation() throws WordNetException { ILexFile lexFile = realSynset.getLexicalFile(); return EnglishWordnetLexicographerFileRetriever.get(lexFile.getNumber()); }
public static String printableName(IWord word, boolean bUseLexFileName) { ISynset syn = word.getSynset(); StringBuilder sb = new StringBuilder(); sb.append(word.getLemma()); sb.append(NAME_PART_SEP); sb.append(syn.getPOS().getTag()); sb.append(NAME_PART_SEP); // This is the sense number or name if (bUseLexFileName) sb.append(syn.getLexicalFile().getName().toLowerCase()); else sb.append(syn.getLexicalFile().getNumber()); sb.append(NAME_PART_SEP); sb.append(word.getLexicalID()); String res = sb.toString(); return res.replaceAll("[_]", NAME_PART_SEP); }
if(isAdjSat && isAdjHead) throw new IllegalArgumentException(); if((isAdjSat || isAdjHead) && lexFile.getNumber() != 0) throw new IllegalArgumentException();
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if(!(obj instanceof SenseKey)) return false; final SenseKey other = (SenseKey)obj; if(!lemma.equals(other.getLemma())) return false; if(lexID != other.getLexicalID()) return false; if(pos != other.getPOS()) return false; if(lexFile.getNumber() != other.getLexicalFile().getNumber()) return false; if(isAdjSat != other.isAdjectiveSatellite()) return false; if(isAdjSat){ if(!headLemma.equals(other.getHeadWord())) return false; if(headLexID != other.getHeadID()) return false; } return true; }
sb.append(key.getSynsetType()); sb.append(':'); sb.append(LexFile.getLexicalFileNumberString(key.getLexicalFile().getNumber())); sb.append(':'); sb.append(Word.getLexicalIDForSenseKey(key.getLexicalID()));
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; final ILexFile other = (ILexFile) obj; if (desc == null) { if(other.getDescription() != null) return false; } else if (!desc.equals(other.getDescription())) return false; if (name == null) { if (other.getName() != null) return false; } else if (!name.equals(other.getName())) return false; if (num != other.getNumber()) return false; if (pos == null) { if (other.getPOS() != null) return false; } else if (!pos.equals(other.getPOS())) return false; return true; }
syn.getLexicalFile().getNumber() + "";