Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: Modular labels files #21

Open
inariksit opened this issue Jan 26, 2022 · 1 comment
Open

Feature request: Modular labels files #21

inariksit opened this issue Jan 26, 2022 · 1 comment
Labels
enhancement New feature or request

Comments

@inariksit
Copy link
Member

inariksit commented Jan 26, 2022

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.

  •  gf-ud ud2gf B <startcat> <lang> A.labels B.labels
    

Or we could keep the existing arguments to ud-gf, and make the module structure a part of the labels files:

  • -- B.labels
    #include A.labels
    #fun b1 …
    #fun b2 …
@inariksit inariksit added the enhancement New feature or request label Jan 26, 2022
@anka-213
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants