GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — CoNLL-U plus · Issue #119 · udapi/udapi-python

CoNLL-U plus #119

New issue
Copy link
New issue
Copy link
Open
Open
CoNLL-U plus#119
Copy link

Description

@Stormur
Stormur
opened on Nov 28, 2023
Issue body actions

Hi!

I cannot find this in documentation: I was wondering if UDAPI already includes ways to deal with CoNLL-U plus files (i.e. read, write...). In particular, I am interested in expanding an existing regular CoNLL-U file into a plus one by adding new custom columns.

Thanks!

Activity

  1. martinpopel commented on Nov 28, 2023

    @martinpopel
    martinpopel
    on Nov 28, 2023
    Contributor
    More actions

    Udapi does not support CoNLL-U Plus yet. There is read.Conll with parameter attributes, where you can specify which columns are in a given file, but it uses setattr(node, attribute_name, value) internally, which means that only existing attribute names can be used as column names (or an underscore meaning that a given column should be ignored by the reader).

    I would welcome if someone sends a PR adding read.Conlluplus (or read.Conllup considering that .conllup is the recommended file extension) and write.Conlluplus. That would mean interpreting the global.columns header (perhaps storing it to document.meta['global.columns'] similarly to document.meta['global.Entity']. The question is where to store the extra (non-standard) columns and how to name them (lowercase?). I would suggest storing them in node.misc, so e.g. global.columns = ID FORM PARSEME:MWE results in node.misc["parseme:mwe"] containing the values from the last column. When serializing this document using write.Conlluplus with document.meta['global.columns'] == "ID FORM MISC PARSEME:MWE", the parseme:mwe attribute would not be stored in MISC, but in the last (PARSEME:MWE) column. This would allow the users to easily convert between different formats (possibly using e.g. udapy read.Conllu files=input.conllu util.Eval doc='doc.meta['global.columns'] = "ID FORM LEMMA MISC PARSEME:MWE"' write.Conlluplus files=output.conllup).

    Reacted by Stormur
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.