We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 65a6b4f commit 64a998aCopy full SHA for 64a998a
src/edu/stanford/nlp/trees/ud/UniversalDependenciesConverter.java
@@ -288,6 +288,12 @@ public static void main(String[] args) {
288
Tree tree = ((TreeToSemanticGraphIterator) sgIterator).getCurrentTree();
289
if (ptbCorrector != null) {
290
tree = ptbCorrector.transformTree(tree);
291
+ List<Label> xposLabels = tree.preTerminalYield();
292
+ for (IndexedWord token: sg.vertexListSorted()) {
293
+ int idx = token.index() - 1;
294
+ String xposTag = xposLabels.get(idx).value();
295
+ token.set(CoreAnnotations.PartOfSpeechAnnotation.class, xposTag);
296
+ }
297
}
298
Tree uposTree = UniversalPOSMapper.mapTree(tree);
299
List<Label> uposLabels = uposTree.preTerminalYield();
0 commit comments