Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

367 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

The UD/SUD converter tool

This repository contains a set of Graph Rewriting rules which can be used with the Grew software for conversion from UD to SUD and the other way.

Examples of converted data are available here.

HOWTO use the conversion system

You first have to install the most recent version of the Grew software (see instructions page).

Universal conversion from UD to SUD

grew transform -grs grs/UD_to_SUD.grs -config sud -i input_UD_file.conllu -o output_SUD_file.conllu

Universal conversion from SUD to UD

grew transform -grs grs/SUD_to_UD.grs -config sud -i input_SUD_file.conllu -o output_UD_file.conllu

Language specific conversions

For some langauges, there are dedicated conversion systems. Corresponding files are prefixed by the language code, for instance, zh_SUD_to_UD.grs is a conversion from SUD to UD adapted to Chinese annotations; the strategy to used is names like the file with suffix _main(zh_SUD_to_UD_main in the previous example). Consult the grs folder to see which languages have specific conversions systems.

Conversion from mSUD to SUD

For Chinese and Beja, additional conversions for mSUD format are available.

Try the Beja GRS online on Grew-web:

Automatic tests

You can run automatic tests defined in ./test2/tests_description.json to see if the rules are being applied correctly. You need to add a folder that has the same name of the grs file inside test2/data/ with both a source.conllu and an expected conllu.

test description

Add an entry for your grs rule inside ./test2/tests_description.json with the following entries :

[
    {
        "TEST_FOLDER_NAME": "zh_mSUD_to_SUD",
        "GRS_FILE": "zh_mSUD_to_SUD.grs",
        "STRAT_NAME": "zh_mSUD_to_SUD_main",
        "CONFIG_TYPE": "sud"
    }
]

Tests command

Using docker, run the following commands

docker build -t grs_test . 
docker run grs_test

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages