} else if(headfinderName.equalsIgnoreCase("SemanticHeadFinder")) {
return new SemanticHeadFinder();
} else if(headfinderName.equalsIgnoreCase("SunJurafskyChineseHeadFinder")) {
return new SunJurafskyChineseHeadFinder();
} else if(headfinderName.equalsIgnoreCase("TueBaDZHeadFinder")) {
return new TueBaDZHeadFinder();
} else {//try to find the class
try {
Class<?> headfinder = Class.forName(headfinderName);
HeadFinder hf = (HeadFinder) headfinder.newInstance();
return hf;