redpony / cdec

Decoder, aligner, and model optimizer for statistical machine translation and other structured prediction models based on (mostly) context-free formalisms
http://cdec-decoder.org/
Apache License 2.0
183 stars 77 forks source link

Online Grammar Extraction #78

Open carolinlawrence opened 9 years ago

carolinlawrence commented 9 years ago

For cases in which new sentences are obtained in an online fashion and a grammar for a sentences needs to be extracted quickly on the fly. To this end I split the code from extract.cc into two parts. The first function loads the files specified in the compile_config_file and keeps it in RAM, the second is executed every time a new sentence is received and extracts the grammar just like extract.cc does. The script, extract_daemon, is formulated as a daemon and can be communicated with via the nanomsg library.