python 3.6
All graphs in input must be in Graphviz/DOT format
- Matrix algorithm need grammar in Chomsky normal form (for example: data/grammars/Q1_H.dot)
- Bottom_up algorithm need grammar in Graphviz/DOT format (for example: data/grammars/Q1_A.dot)
- Top_down algorithm need grammar in Graphviz/DOT format (for example: data/grammars/Q1_A.dot)
python analyze.py -t <grammar_filename> <graph_filename> <result_filename>(optional)
Where -t is a type of algorithm what you want to use:
-m
for matrix algorithm-u
for bottom_up algorithm-d
for top_down algorithm
For example:
python analyze.py -d data/grammars/Q1_A.dot data/graphs/skos.dot result.txt
For run all tests:
python -m unittest -v tests
All tests are passed for ~1.5 hours
For run only quick tests with small data:
python -m unittest -v tests.Quick
For run tests for every algorithm separately:
python -m unittest -v tests.Hard.test_matrix
python -m unittest -v tests.Hard.test_bottom_up
python -m unittest -v tests.Hard.test_top_down
Algorithms do not work with grammars containing epsilon. Please remove all epsilon-production before use the algorithms.