Class CoNLLUUtils


  • public class CoNLLUUtils
    extends Object
    Utility functions for reading and writing CoNLL-U files.
    Author:
    Sebastian Schuster
    • Constructor Detail

      • CoNLLUUtils

        public CoNLLUUtils()
    • 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.
      • toExtraDepsString

        public static String toExtraDepsString​(HashMap<String,​String> extraDeps)
        Converts an extra dependencies hash map to a string to be used in a CoNLL-U file.
        Parameters:
        extraDeps -
        Returns:
        The extra dependencies string.