public void add ( IWord word ) { //check and extends the entity from the base word if ( word . getEntity ( ) == null ) { word . setEntity ( rootWord . getEntity ( ) ) ; } //check and extends the part of speech from the base word if ( word . getPartSpeech ( ) == null ) { word . setPartSpeech ( rootWord . getPartSpeech ( ) ) ; } word . setSyn ( this ) ; synsList . add ( word ) ; }
add a new synonyms word and the newly added word will extends the part of speech and the entity from the base word if there are not set