Tool to parse Nested Words in a given sequence. The Nested Word Automaton (NWA) used for parsing is built using the Ragel State Machine Compiler. The code demonstrates a way to build the NWA using the Ragel library.
- Python 3 (Tested on Python 3.4.3)
- gcc
- g++
- Ragel State Machine Compiler
- SWIG
$ python3 ./nested_word_parser.py --help
$ python3 ./nested_word_parser.py -r <Nested Word Automaton regex> -f <Filename to parse> -i <Absolute location of the Python 3 executable>
Examples
- By default, the values of the arguments are as follows:
$ python3 ./nested_word_parser.py -r "<0.1.2>" -f "./data/t1.csv" -i "/usr/include/python3.4m" 0 0 1 2 0 Failure 0 0 1 2 2 Success
- The below line produces the same output as above (if the Python 3 executable path is valid):
$ python3 ./nested_word_parser.py