public void initialize(AnnotatorContext annotCtx) throws AnnotatorInitializationException, AnnotatorConfigurationException { super.initialize(annotCtx); try { String pathOfTrainedModel = (String) getContext().getConfigParameterValue("PathOfModel"); model = svm.svm_load_model(pathOfTrainedModel); } catch (Exception e) { e.printStackTrace(); } //mapping nominal values to integer //why convert to integer? tried binary values but didn't performed well feaMap = new HashMap<String, String>(); feaMap.put("nul", "0"); // both side effect keyword and location features feaMap.put("pre", "1"); // side effect keyword feature feaMap.put("bet", "1"); // location feature feaMap.put("bpd", "2"); // location feature feaMap.put("bdp", "3"); // location feature feaMap.put("bap", "4"); // location feature feaMap.put("bep", "5"); // location feature feaMap.put("afp", "6"); // location feature feaMap.put("any", "7"); // location feature }