summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorarmatthews <armatthe@cmu.edu>2014-05-18 17:22:56 -0400
committerarmatthews <armatthe@cmu.edu>2014-05-18 17:22:56 -0400
commit72e46b00edf847b9bd4b6299788586ea57da037c (patch)
tree3407b60da818d7f1be46d0a0354b40783bdc941e
parentfdaf46f6df031eb024507c39d7cf920219c6eb5e (diff)
Added information on how to recompile pycdec from the pyx files
-rw-r--r--python/README.md7
1 files changed, 7 insertions, 0 deletions
diff --git a/python/README.md b/python/README.md
index 37c7b78e..2cc77037 100644
--- a/python/README.md
+++ b/python/README.md
@@ -8,6 +8,13 @@ Build and install pycdec:
Alternatively, run `python setup.py build_ext --inplace` and add the `python/` directory to your `PYTHONPATH`.
+To re-build pycdec from the cython source, modify setup.py in the following ways:
+ * Add this input statement: from Cython.Build import cythonize
+ * Change the source file from cdec/\_cdec.cpp to cdec/\_cdec.pyx
+ * Add language='c++' as a property to ext\_modules (e.g. right after extra\_link\_args)
+ * In the final setup block, change ext\_modules=ext\_modules to ext\_modules=cythonize(ext\_modules)
+Then just build and install normally, as described above.
+
## Grammar extractor
Compile a parallel corpus and a word alignment into a suffix array representation: