summaryrefslogtreecommitdiff
path: root/python/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'python/README.md')
-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: