GrammaticalFramework / gf-ud

Functions to analyse and manipulate dependency trees, as well as conversions between GF and dependency trees. The main use case is UD (Universal Dependencies), but the code is designed to be completely generic as for annotation scheme. This repository replaces the old gf-contrib/ud2gf code. It is also meant to be used in the 'vd' command of GF and replace the supporting code in gf-core in the future.
Other
7 stars 15 forks source link

Feature request: Modular labels files #21

Open inariksit opened 2 years ago

inariksit commented 2 years ago

Many GF grammars are structured as follows:

abstract A = { fun a1, a2 : … } ;

abstract B = A ** { fun b1, b2 : … } ;

If we want to use those grammars with gf-ud, we need the following labels files:

-- A.labels
#fun a1 …
#fun a2 …

and

-- B.labels
#fun a1 …
#fun a2 …
#fun b1 …
#fun b2 …

In order to avoid duplicating labels, it would be better to allow the labels for a given grammar to be in multiple files. In this example, the file B.labels should only contain labels for funs b1 and b2.

When giving the labels files as arguments to gf-ud, we could give a complete list of labels files, e.g.

anka-213 commented 2 years ago

The #include option sounds like the more backwards-compatible and more convenient option, so I think that's the way to go.