@Override protected void correctDependencies(List<TypedDependency> list) { SemanticGraph sg = new SemanticGraph(list); correctDependencies(sg); list.clear(); list.addAll(sg.typedDependencies()); Collections.sort(list); }
@Override protected void postProcessDependencies(List<TypedDependency> list) { SemanticGraph sg = new SemanticGraph(list); postProcessDependencies(sg); list.clear(); list.addAll(sg.typedDependencies()); }
@Override protected void getExtras(List<TypedDependency> list) { SemanticGraph sg = new SemanticGraph(list); addRef(sg); if (DEBUG) { printListSorted("After adding ref:", sg.typedDependencies()); } addExtraNSubj(sg); if (DEBUG) { printListSorted("After adding extra nsubj:", sg.typedDependencies()); } list.clear(); list.addAll(sg.typedDependencies()); }
protected static void postProcessDependencies(SemanticGraph sg) { if (DEBUG) { printListSorted("At postProcessDependencies:", sg.typedDependencies()); } correctWHAttachment(sg); if (DEBUG) { printListSorted("After correcting WH attachment:", sg.typedDependencies()); } convertRel(sg); if (DEBUG) { printListSorted("After converting rel:", sg.typedDependencies()); } fixCCAttachment(sg); if (DEBUG) { printListSorted("After fixing CC attachment:", sg.typedDependencies()); } }
protected static void correctDependencies(SemanticGraph sg) { if (DEBUG) { printListSorted("At correctDependencies:", sg.typedDependencies()); } correctSubjPass(sg); if (DEBUG) { printListSorted("After correctSubjPass:", sg.typedDependencies()); } processNames(sg); if (DEBUG) { printListSorted("After processNames:", sg.typedDependencies()); } removeExactDuplicates(sg); if (DEBUG) { printListSorted("After removeExactDuplicates:", sg.typedDependencies()); } }
private static GrammaticalStructure semanticGraphToGrammaticalStructure(SemanticGraph sg) { /* sg.typedDependency() generates an ArrayList */ List<TypedDependency> deps = (List<TypedDependency>) sg.typedDependencies(); IndexedWord root = deps.get(0).gov(); TreeGraphNode rootNode = new TreeGraphNode(root); GrammaticalStructure gs = new UniversalEnglishGrammaticalStructure(deps, rootNode); return gs; }
@Override protected void postProcessDependencies(List<TypedDependency> list) { if (DEBUG) { printListSorted("At postProcessDependencies:", list); } SemanticGraph sg = new SemanticGraph(list); correctWHAttachment(sg); list.clear(); list.addAll(sg.typedDependencies()); if (DEBUG) { printListSorted("After correcting WH movement", list); } convertRel(list); if (DEBUG) { printListSorted("After converting rel:", list); } }
printListSorted("addEnhancements: before correctDependencies()", sg.typedDependencies()); printListSorted("addEnhancements: after correctDependencies()", sg.typedDependencies()); processMultiwordPreps(sg); if (DEBUG) { printListSorted("addEnhancements: after processMultiwordPreps()", sg.typedDependencies()); demoteQuantificationalModifiers(sg); if (DEBUG) { printListSorted("addEnhancements: after demoteQuantificationalModifiers()", sg.typedDependencies()); expandPPConjunctions(sg); if (DEBUG) { printListSorted("addEnhancements: after expandPPConjunctions()", sg.typedDependencies()); printListSorted("addEnhancements: after expandPrepConjunctions()", sg.typedDependencies()); addCaseMarkerInformation(sg, options.enhanceOnlyNmods); if (DEBUG) { printListSorted("addEnhancements: after addCaseMarkerInformation()", sg.typedDependencies()); addConjInformation(sg); if (DEBUG) { printListSorted("addEnhancements: after addConjInformation()", sg.typedDependencies()); addRef(sg); if (DEBUG) { printListSorted("addEnhancements: after addRef()", sg.typedDependencies());
SemanticGraph enhanced = new SemanticGraph(basic.typedDependencies());
@Override protected void correctDependencies(List<TypedDependency> list) { SemanticGraph sg = new SemanticGraph(list); correctDependencies(sg); list.clear(); list.addAll(sg.typedDependencies()); Collections.sort(list); }
@Override protected void correctDependencies(List<TypedDependency> list) { SemanticGraph sg = new SemanticGraph(list); correctDependencies(sg); list.clear(); list.addAll(sg.typedDependencies()); Collections.sort(list); }
@Override protected void postProcessDependencies(List<TypedDependency> list) { SemanticGraph sg = new SemanticGraph(list); postProcessDependencies(sg); list.clear(); list.addAll(sg.typedDependencies()); }
@Override protected void postProcessDependencies(List<TypedDependency> list) { SemanticGraph sg = new SemanticGraph(list); postProcessDependencies(sg); list.clear(); list.addAll(sg.typedDependencies()); }
@Override protected void getExtras(List<TypedDependency> list) { SemanticGraph sg = new SemanticGraph(list); addRef(sg); if (DEBUG) { printListSorted("After adding ref:", sg.typedDependencies()); } addExtraNSubj(sg); if (DEBUG) { printListSorted("After adding extra nsubj:", sg.typedDependencies()); } list.clear(); list.addAll(sg.typedDependencies()); }
@Override protected void getExtras(List<TypedDependency> list) { SemanticGraph sg = new SemanticGraph(list); addRef(sg); if (DEBUG) { printListSorted("After adding ref:", sg.typedDependencies()); } addExtraNSubj(sg); if (DEBUG) { printListSorted("After adding extra nsubj:", sg.typedDependencies()); } list.clear(); list.addAll(sg.typedDependencies()); }
protected static void postProcessDependencies(SemanticGraph sg) { if (DEBUG) { printListSorted("At postProcessDependencies:", sg.typedDependencies()); } correctWHAttachment(sg); if (DEBUG) { printListSorted("After correcting WH attachment:", sg.typedDependencies()); } convertRel(sg); if (DEBUG) { printListSorted("After converting rel:", sg.typedDependencies()); } }
protected static void postProcessDependencies(SemanticGraph sg) { if (DEBUG) { printListSorted("At postProcessDependencies:", sg.typedDependencies()); } correctWHAttachment(sg); if (DEBUG) { printListSorted("After correcting WH attachment:", sg.typedDependencies()); } convertRel(sg); if (DEBUG) { printListSorted("After converting rel:", sg.typedDependencies()); } }
protected static void correctDependencies(SemanticGraph sg) { if (DEBUG) { printListSorted("At correctDependencies:", sg.typedDependencies()); } correctSubjPass(sg); if (DEBUG) { printListSorted("After correctSubjPass:", sg.typedDependencies()); } processNames(sg); if (DEBUG) { printListSorted("After processNames:", sg.typedDependencies()); } removeExactDuplicates(sg); if (DEBUG) { printListSorted("After removeExactDuplicates:", sg.typedDependencies()); } }
private static GrammaticalStructure semanticGraphToGrammaticalStructure(SemanticGraph sg) { /* sg.typedDependency() generates an ArrayList */ List<TypedDependency> deps = (List<TypedDependency>) sg.typedDependencies(); IndexedWord root = deps.get(0).gov(); TreeGraphNode rootNode = new TreeGraphNode(root); GrammaticalStructure gs = new UniversalEnglishGrammaticalStructure(deps, rootNode); return gs; }
private static GrammaticalStructure semanticGraphToGrammaticalStructure(SemanticGraph sg) { /* sg.typedDependency() generates an ArrayList */ List<TypedDependency> deps = (List<TypedDependency>) sg.typedDependencies(); IndexedWord root = deps.get(0).gov(); TreeGraphNode rootNode = new TreeGraphNode(root); GrammaticalStructure gs = new UniversalEnglishGrammaticalStructure(deps, rootNode); return gs; }