// String modelFileOrDirname = (String) aContext.getConfigParameterValue("modelDir");
try {
// FileInputStream fis = new FileInputStream(new File(modelFileOrDirname));
// File parserFile = FileLocator.locateFile(parserModel);
FileInputStream fis = new FileInputStream(parserModel);
ParserModel model = new ParserModel(fis);
// parser = ParserFactory.create(model, AbstractBottomUpParser.defaultBeamSize, AbstractBottomUpParser.defaultAdvancePercentage); //TreebankParser.getParser(modelFileOrDirname, useTagDictionary, useCaseSensitiveTagDictionary, AbstractBottomUpParser.defaultBeamSize, AbstractBottomUpParser.defaultAdvancePercentage);
parser = new Parser(model, AbstractBottomUpParser.defaultBeamSize, AbstractBottomUpParser.defaultAdvancePercentage);
fis.close();
} catch (IOException e) {
e.printStackTrace();