private boolean isNoun(String word){
  if (nouns == null)   return false;
  return nouns.contains(word.toLowerCase());
}

private boolean isNoun ( String word ) { if ( nouns == null ) return false ; return nouns . contains ( word . toLowerCase ( ) ) ; }
if this is word is a thing in our repository it is a noun . an alternative is to use a wordnet database .
