Package edu.stanford.nlp.trees.ud
Class CoNLLUUtils
- java.lang.Object
-
- edu.stanford.nlp.trees.ud.CoNLLUUtils
-
public class CoNLLUUtils extends Object
Utility functions for reading and writing CoNLL-U files.- Author:
- Sebastian Schuster
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classCoNLLUUtils.DepIndexComparator
-
Constructor Summary
Constructors Constructor Description CoNLLUUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static HashMap<String,String>parseExtraDeps(String extraDepsString)Parses the value of the extra dependencies column in a CoNLL-U file and returns them in a HashMap with the governor indices as keys and the relation names as values.static StringtoExtraDepsString(HashMap<String,String> extraDeps)Converts an extra dependencies hash map to a string to be used in a CoNLL-U file.
-
-
-
Method Detail
-
parseExtraDeps
public static HashMap<String,String> parseExtraDeps(String extraDepsString)
Parses the value of the extra dependencies column in a CoNLL-U file and returns them in a HashMap with the governor indices as keys and the relation names as values.- Parameters:
extraDepsString-- Returns:
- A
HashMap<Integer,String>with the additional dependencies.
-
-