/** * Returns a string form of the lexical id as they are written in data * files, which is a single digit hex number. * * @param lexID * the lexical id to convert * @throws IllegalArgumentException * if the specified integer is not a valid lexical id. * @return a string form of the lexical id as they are written in data * files, which is a single digit hex number. * @since JWI 2.1.0 */ public static String getLexicalIDForDataFile(int lexID) { checkLexicalID(lexID); return Integer.toHexString(lexID); }
/** * Returns a string form of the lexical id as they are written in sense * keys, which is as a two-digit decimal number. * * @param lexID * the lexical id to convert * @return a string form of the lexical id as they are written in sense * keys, which is as a two-digit decimal number. * @throws IllegalArgumentException * if the specified integer is not a valid lexical id. * @since JWI 2.1.0 */ public static String getLexicalIDForSenseKey(int lexID) { checkLexicalID(lexID); return (lexID < 10) ? lexIDNumStrs[lexID] : Integer.toString(lexID); }
public void setHead(String headLemma, int headLexID) { if(!needsHeadSet()) throw new IllegalStateException(); Word.checkLexicalID(headLexID); if(headLemma.trim().length() == 0) throw new IllegalArgumentException(); this.headLemma = headLemma; this.headLexID = headLexID; this.isHeadSet = true; }
if(id == null) throw new NullPointerException(); checkLexicalID(lexID); if(synset.getPOS() != POS.ADJECTIVE && adjMarker != null) throw new IllegalArgumentException();