Skip to content

Feature request: Modular labels files #21

Open
@inariksit

Description

@inariksit

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 …

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions