summaryrefslogtreecommitdiff
path: root/python/README.md
diff options
context:
space:
mode:
authorPatrick Simianer <simianer@cl.uni-heidelberg.de>2012-08-01 17:32:37 +0200
committerPatrick Simianer <simianer@cl.uni-heidelberg.de>2012-08-01 17:32:37 +0200
commit3f8e33cfe481a09c121a410e66a6074b5d05683e (patch)
treea41ecaf0bbb69fa91a581623abe89d41219c04f8 /python/README.md
parentc139ce495861bb341e1b86a85ad4559f9ad53c14 (diff)
parent9fe0219562e5db25171cce8776381600ff9a5649 (diff)
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'python/README.md')
-rw-r--r--python/README.md29
1 files changed, 29 insertions, 0 deletions
diff --git a/python/README.md b/python/README.md
new file mode 100644
index 00000000..da9f9387
--- /dev/null
+++ b/python/README.md
@@ -0,0 +1,29 @@
+pycdec is a Python interface to cdec
+
+## Installation
+
+Build and install pycdec:
+
+ python setup.py install
+
+## Grammar extractor
+
+Compile a parallel corpus and a word alignment into a suffix array representation:
+
+ python -m cdec.sa.compile -f f.txt -e e.txt -a a.txt -o output/ -c extract.ini
+
+Extract grammar rules from the compiled corpus:
+
+ cat input.txt | python -m cdec.sa.extract -c extract.ini -g grammars/
+
+This will create per-sentence grammar files in the `grammars` directory and output annotated input suitable for translation with cdec.
+
+## Library usage
+
+A basic demo of pycdec's features is available in `test.py`
+
+More documentation will come as the API becomes stable.
+
+---
+
+pycdec was contributed by [Victor Chahuneau](http://victor.chahuneau.fr)