public void addKeywords ( String [ ] keywords ) { for ( String keyword : keywords ) { if ( taxonomy . concepts . containsKey ( keyword ) ) { throw new IllegalArgumentException ( String . format ( "Concept %s already exists." , keyword ) ) ; } } for ( String keyword : keywords ) { taxonomy . concepts . put ( keyword , this ) ; } if ( synset == null ) { synset = new TreeSet <> ( ) ; } for ( String keyword : keywords ) { synset . add ( keyword ) ; } }
Add a list of synomym to the concept synset .