public class CoNLLUUtils
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
CoNLLUUtils.DepIndexComparator |
static class |
CoNLLUUtils.FeatureNameComparator |
Constructor and Description |
---|
CoNLLUUtils() |
Modifier and Type | Method and Description |
---|---|
static java.util.HashMap<java.lang.String,java.lang.String> |
parseExtraDeps(java.lang.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 java.util.HashMap<java.lang.String,java.lang.String> |
parseFeatures(java.lang.String featureString)
Parses the value of the feature column in a CoNLL-U file
and returns them in a HashMap with the feature names as keys
and the feature values as values.
|
static java.lang.String |
toExtraDepsString(java.util.HashMap<java.lang.String,java.lang.String> extraDeps)
Converts an extra dependencies hash map to a string to be used
in a CoNLL-U file.
|
static java.lang.String |
toFeatureString(java.util.HashMap<java.lang.String,java.lang.String> features)
Converts a feature HashMap to a feature string to be used
in a CoNLL-U file.
|
public static java.util.HashMap<java.lang.String,java.lang.String> parseFeatures(java.lang.String featureString)
featureString
- HashMap<String,String>
with the feature values.public static java.lang.String toFeatureString(java.util.HashMap<java.lang.String,java.lang.String> features)
public static java.util.HashMap<java.lang.String,java.lang.String> parseExtraDeps(java.lang.String extraDepsString)
extraDepsString
- HashMap<Integer,String>
with the additional dependencies.public static java.lang.String toExtraDepsString(java.util.HashMap<java.lang.String,java.lang.String> extraDeps)
extraDeps
-