use of edu.illinois.cs.cogcomp.edison.config.SimpleGazetteerAnnotatorConfigurator in project cogcomp-nlp by CogComp.
the class SimpleGazetteerAnnotatorTest method testSimpleGazetteerAnnotatorString.
/**
* Test method for {@link SimpleGazetteerAnnotator#SimpleGazetteerAnnotator(ResourceManager)}.
*
* @throws URISyntaxException
* @throws IOException
*/
@Test
public void testSimpleGazetteerAnnotatorString() throws IOException, URISyntaxException {
Properties props = new Properties();
props.setProperty(SimpleGazetteerAnnotatorConfigurator.PATH_TO_DICTIONARIES.key, "/testgazetteers/");
props.setProperty(SimpleGazetteerAnnotatorConfigurator.IS_LAZILY_INITIALIZED.key, SimpleGazetteerAnnotatorConfigurator.FALSE);
ResourceManager localRm = new SimpleGazetteerAnnotatorConfigurator().getConfig(new ResourceManager(props));
SimpleGazetteerAnnotator sga = new SimpleGazetteerAnnotator(localRm);
assertTrue("Wrong number of dictionaries loaded.", sga.dictionaries.size() == 1);
assertTrue("Wrong number of dictionaries loaded.", sga.dictionariesIgnoreCase.size() == 1);
}
Aggregations