diff options
author | Chris Dyer <redpony@gmail.com> | 2014-04-20 22:25:20 -0400 |
---|---|---|
committer | Chris Dyer <redpony@gmail.com> | 2014-04-20 22:25:20 -0400 |
commit | 2af1d21b74343b568fbb87a2a6902ee01f19636a (patch) | |
tree | 39723f1f3a14ec0a877b89573265f04310384d92 /python/README.md | |
parent | 1748e9a095bcc3a1db8ab47eb7ac6a1f9568772b (diff) | |
parent | bcf989fe0ea170c4f01383a70ba552e663d69109 (diff) |
Merge branch 'master' of https://github.com/redpony/cdec
Diffstat (limited to 'python/README.md')
-rw-r--r-- | python/README.md | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/python/README.md b/python/README.md index 953971d3..37c7b78e 100644 --- a/python/README.md +++ b/python/README.md @@ -23,7 +23,25 @@ Extract grammar rules from the compiled corpus: cat input.txt | python -m cdec.sa.extract -c extract.ini -g grammars/ -z This will create per-sentence grammar files in the `grammars` directory and output annotated input suitable for translation with cdec. - + +Extract rules in stream mode: + + python -m cdec.sa.extract -c extract.ini -t -z + +This will enable stdio interaction with the following types of lines: + +Extract grammar: + + context ||| sentence ||| grammar_file + +Learn (online mode, specify context name): + + context ||| sentence ||| reference ||| alignment + +Drop (online mode, specify context name): + + context ||| drop + ## Library usage A basic demo of pycdec's features is available in `examples/test.py`. |