summaryrefslogtreecommitdiff
path: root/python/README.md
diff options
context:
space:
mode:
authorChris Dyer <redpony@gmail.com>2014-04-20 22:25:20 -0400
committerChris Dyer <redpony@gmail.com>2014-04-20 22:25:20 -0400
commit2af1d21b74343b568fbb87a2a6902ee01f19636a (patch)
tree39723f1f3a14ec0a877b89573265f04310384d92 /python/README.md
parent1748e9a095bcc3a1db8ab47eb7ac6a1f9568772b (diff)
parentbcf989fe0ea170c4f01383a70ba552e663d69109 (diff)
Merge branch 'master' of https://github.com/redpony/cdec
Diffstat (limited to 'python/README.md')
-rw-r--r--python/README.md20
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`.