Skip to content

Commit 9b49b99

Browse files
committed
Comment on a potential simplification
1 parent 128c031 commit 9b49b99

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/edu/stanford/nlp/trees/ud/CoNLLUDocumentReader.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,9 @@ public Pair<SemanticGraph,SemanticGraph> apply(String line) {
185185
}
186186
} else {
187187
for (String extraGovIdxStr : extraDeps.keySet()) {
188+
// TODO: use an exact parse instead of Double.parseDouble?
189+
// can maybe avoid a linear search in getToken
190+
// effectively trying to get rid of pseudoPosition entirely
188191
double extraGovIdx = Double.parseDouble(extraGovIdxStr);
189192
Pair<IndexedWord, GrammaticalRelation> govReln = getGovAndReln(extraGovIdx, word,
190193
extraDeps.get(extraGovIdxStr), sortedTokens);

0 commit comments

Comments
 (0)