public SemanticHeadFinder(TreebankLanguagePack tlp, boolean cop) { super(tlp); ruleChanges(); // make a distinction between auxiliaries and copular verbs to // get the NP has semantic head in sentences like "Bill is an honest man". verbalAuxiliaries = new HashSet<String>(); verbalAuxiliaries.addAll( Arrays.asList( new String[] { "will", "wo", "shall", "may", "might", "should", "would", "can", "could", "ca", "must", "has", "have", "had", "having", "be", "being", "been", "get", "gets", "getting", "got", "gotten", "do", "does", "did", "to", "'ve", "'d", "'ll" })); // copular verbs having an NP complement copulars = new HashSet<String>(); if (cop) { copulars.addAll( Arrays.asList( new String[] { "be", "being", "Being", "am", "are", "is", "was", "were", "'m", "'re", "'s", "s", "seem", "seems", "seemed", "appear", "appears", "appeared", "stay", "stays", "stayed", "remain", "remains", "remained", "resemble", "resembles", "resembled", "become", "becomes", "became" })); } // a few times the apostrophe is missing on "'s" verbalTags = new HashSet<String>(); // include Charniak tags so can do BLLIP right verbalTags.addAll( Arrays.asList( new String[] {"TO", "MD", "VB", "VBD", "VBP", "VBZ", "VBG", "VBN", "AUX", "AUXG"})); }
/** * Create a SemanticHeadFinder. * * @param tlp The TreebankLanguagePack, used by the superclass to get basic category of * constituents. * @param cop If true, a copular verb (be, seem, appear, stay, remain, resemble, become) is not * treated as head when it has an AdjP or NP complement. If false, a copula verb is still * always treated as a head. But it will still be treated as an auxiliary in periphrastic * tenses with a VP complement. */ public SemanticHeadFinder(TreebankLanguagePack tlp, boolean cop) { super(tlp); ruleChanges(); // make a distinction between auxiliaries and copula verbs to // get the NP has semantic head in sentences like "Bill is an honest man". (Added "sha" for // "shan't" May 2009 verbalAuxiliaries = new HashSet<String>(); verbalAuxiliaries.addAll(Arrays.asList(auxiliaries)); passiveAuxiliaries = new HashSet<String>(); passiveAuxiliaries.addAll(Arrays.asList(beGetVerbs)); // copula verbs having an NP complement copulars = new HashSet<String>(); if (cop) { copulars.addAll(Arrays.asList(copulaVerbs)); } // a few times the apostrophe is missing on "'s" verbalTags = new HashSet<String>(); // include Charniak tags so can do BLLIP right verbalTags.addAll(Arrays.asList(verbTags)); }