summaryrefslogtreecommitdiff
path: root/python/README.md
diff options
context:
space:
mode:
authormjdenkowski <michael.j.denkowski@gmail.com>2014-04-18 15:15:40 -0400
committermjdenkowski <michael.j.denkowski@gmail.com>2014-04-18 15:15:40 -0400
commitf31a19b243885d4382e23ad1df84a7f00034b269 (patch)
treed5d4c87c2141b521e9d3492ff46610b090090705 /python/README.md
parentb09d05952ae0dd7713582ee0d7e46af551c28e61 (diff)
Stream mode for grammar extractor
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`.