use of edu.stanford.nlp.trees.treebank.DefaultMapper in project CoreNLP by stanfordnlp.
the class FTBDataset method setOptions.
@Override
public boolean setOptions(Properties opts) {
boolean ret = super.setOptions(opts);
if (opts.containsKey(ConfigParser.paramSplit)) {
String splitFileName = opts.getProperty(ConfigParser.paramSplit);
splitSet = makeSplitSet(splitFileName);
}
CC_TAGSET = PropertiesUtils.getBool(opts, ConfigParser.paramCCTagset, false);
treebank = new MemoryTreebank(new FrenchXMLTreeReaderFactory(CC_TAGSET), FrenchTreebankLanguagePack.FTB_ENCODING);
if (lexMapper == null) {
lexMapper = new DefaultMapper();
lexMapper.setup(null, lexMapOptions.split(","));
}
if (pathsToMappings.size() != 0) {
if (posMapper == null)
posMapper = new DefaultMapper();
for (File path : pathsToMappings) posMapper.setup(path);
}
return ret;
}
Aggregations