synBuffer.append( (adjectives.size() > 0) ? wnetTools.getSynonyms(adjectives.get(0), "a"):"");
String[] synonyms = synBuffer.toString().trim().split(" ");
*/
//*-- tokenize the question
StandardBgramAnalyzer analyzer = new StandardBgramAnalyzer(); analyzer.setExtractEntities(true);
TokenStream stream = analyzer.tokenStream("contents", new StringReader(question));
ArrayList<Token> tokenList = new ArrayList<Token>(); Token token = null;
entities = new ArrayList<String>(); //*-- list of entities in the question
while ( (token = stream.next()) != null)
{ tokenList.add(token); if (token.type().equals("<ENTITY>")) entities.add(token.termText()); }