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
commit23cd40b815a791b793e6dc594353c19fe8796b4d (patch)
treed1181f095d37d20cdb7306033d81a9c3ac2fbac1
parentddd99766d069c5ce5d41da304d7ba613657ee564 (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: