summaryrefslogtreecommitdiff
path: root/python/README.md
diff options
context:
space:
mode:
authorVictor Chahuneau <vchahune@cs.cmu.edu>2013-08-26 20:12:32 -0400
committerVictor Chahuneau <vchahune@cs.cmu.edu>2013-08-26 20:12:32 -0400
commit03799a2d330c6dbbe12154d4bcea236210b4f6ed (patch)
tree7adb0bc8dd2987fa32ee1299d8821dd8b7b06706 /python/README.md
parent8b491e57f8a011f4f8496e44bed7eb7a4360bc93 (diff)
Improve the package structure of pycdec
This change should not break anything, but now you can run: python setup.py build_ext --inplace and use the cleaner: PYTHONPATH=/path/to/cdec/python python -m ...
Diffstat (limited to 'python/README.md')
-rw-r--r--python/README.md9
1 files changed, 6 insertions, 3 deletions
diff --git a/python/README.md b/python/README.md
index bea6190a..953971d3 100644
--- a/python/README.md
+++ b/python/README.md
@@ -1,4 +1,4 @@
-pycdec is a Python interface to cdec
+pycdec is a Python interface to cdec
## Installation
@@ -6,6 +6,8 @@ Build and install pycdec:
python setup.py install
+Alternatively, run `python setup.py build_ext --inplace` and add the `python/` directory to your `PYTHONPATH`.
+
## Grammar extractor
Compile a parallel corpus and a word alignment into a suffix array representation:
@@ -18,13 +20,14 @@ Or, if your parallel corpus is in a single-file format (with source and target s
Extract grammar rules from the compiled corpus:
- cat input.txt | python -m cdec.sa.extract -c extract.ini -g grammars/
+ 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.
## Library usage
-A basic demo of pycdec's features is available in `test.py`
+A basic demo of pycdec's features is available in `examples/test.py`.
+Other examples are given in [the paper](http://victor.chahuneau.fr/pub/pycdec/) describing pycdec.
More documentation will come as the API becomes stable.