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 | 97ee2a6f856c211a37a1c99b031319bff7dbee1c (patch) | |
tree | 234c910977a0c2ccdf21c4954d6548cfbc80b768 /python/README.md | |
parent | bb709970ea2142358f03ff85c29b307b34e9001a (diff) | |
parent | 9f24de23f4e1bc19819024e95744667134c766eb (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`. |