Skip to content

Support undefined head in CoNLL-U #3

@martinpopel

Description

@martinpopel

According to the CoNLL-U specification, Underscore () is used to denote unspecified values in all fields except ID._
However, Read::CoNLLU emits warnings "Argument "_" isn't numeric in array element at .../Udapi/Core/Document.pm line 129" when reading files with underscore in the HEAD column.

My suggestion is

  • attach nodes with _ as HEAD to the technical root (as if they had 0 as HEAD)
  • mark somewhere (misc) that the dependency is actually undefined, so when writing the file, we can reconstruct the _ (and not substitute it with 0)

I am not sure if the second point is worth the work. We should benchmark the speed of CoNLLU reading, so it is not slower for regular files.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions