/CoNLL-U_cycles-1

Primary LanguagePythonMIT LicenseMIT

CoNLL-U_cycles

Summary

This program takes a CoNLL-U file and finds dependency cycles in its dependency graph.

What is a dependency cycle?

A dependency cycle occurs when node N depends on the value of node N, either indirectly through a chain of dependencies that loop back or directly by listing itself as a dependency. See below for examples.

Running

python3 main.py file.txt

This will parse a file.txt in the CoNLL-U format, and list cycles.

Testing

No Cycles

python3 main.py test/test_good.txt

Has Cycles

python3 main.py test/test_cycles.txt