@Test
public void test() throws IOException {
File modelDir = getModelDir();
AnswerTypeContextGenerator atcg = new AnswerTypeContextGenerator(new File(getWordNetDictionary().getAbsolutePath()));
//<start id="answerType"/>
FileInputStream chunkerStream = new FileInputStream(
new File(modelDir,"en-chunker.bin"));
ChunkerModel chunkerModel = new ChunkerModel(chunkerStream);
ChunkerME chunker = new ChunkerME(chunkerModel);
FileInputStream posStream = new FileInputStream(
new File(modelDir,"en-pos-maxent.bin"));
POSModel posModel = new POSModel(posStream);
POSTaggerME tagger = new POSTaggerME(posModel);
Parser parser = new ChunkParser(chunker, tagger);
Parse[] results = ParserTool.parseLine("Who is the president of egypt ?", parser, 1);
String[] context = atcg.getContext(results[0]);
List<String> features = Arrays.asList(context);
assertTrue(features.contains("qw=who"));
assertTrue(features.contains("hw=president"));
assertTrue(features.contains("s=1740")); //entity
assertTrue(features.contains("s=7846")); //person