Skip to content

lkolt/FLAnalyze

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FLAnalyze

Requirements

python 3.6

Input

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)

Run

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

Unit tests

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

Note

Algorithms do not work with grammars containing epsilon. Please remove all epsilon-production before use the algorithms.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages