Skip to content

Commit 6bfbb0f

Browse files
committed
Language.Unknown can be treated as a generic Universal language when splitting a GrammaticRelation in text form to make a new relation. After all, the code that puts it back together will use : as the separator anyway for Unknown
1 parent 8c345f9 commit 6bfbb0f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/edu/stanford/nlp/trees/GrammaticalRelation.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ public static GrammaticalRelation valueOf(Language language, String s) {
227227
*/
228228
String name;
229229
String specific;
230-
char separator = language == Language.UniversalEnglish ? ':' : '_';
230+
char separator = (language == Language.UniversalEnglish || language == Language.Unknown) ? ':' : '_';
231231
int underscorePosition = s.indexOf(separator);
232232
if (underscorePosition > 0) {
233233
name = s.substring(0, underscorePosition);

0 commit comments

Comments
 (0)