diff options
author | Chris Dyer <cdyer@cs.cmu.edu> | 2012-07-28 12:11:44 -0400 |
---|---|---|
committer | Chris Dyer <cdyer@cs.cmu.edu> | 2012-07-28 12:11:44 -0400 |
commit | 306e0ba4754c6c4f460536cfe8c3f118dc1cc175 (patch) | |
tree | ad5ea3b0a5370ac613d1bad715fe0f5ab8c91c11 /python/src/sa/_sa.pyx | |
parent | 934e55dc12c3f374684bc6a0797e6f85c7abb85a (diff) | |
parent | ee5e376e263d9aeabdeee6968b4457f53d3fc772 (diff) |
Merge branch 'master' of github.com:redpony/cdec
Diffstat (limited to 'python/src/sa/_sa.pyx')
-rw-r--r-- | python/src/sa/_sa.pyx | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/python/src/sa/_sa.pyx b/python/src/sa/_sa.pyx new file mode 100644 index 00000000..710f8cb4 --- /dev/null +++ b/python/src/sa/_sa.pyx @@ -0,0 +1,29 @@ +import logging +import resource +import gzip + +cdef float monitor_cpu(): + return (resource.getrusage(resource.RUSAGE_SELF).ru_utime+ + resource.getrusage(resource.RUSAGE_SELF).ru_stime) + +def gzip_or_text(char* filename): + if filename.endswith('.gz'): + return gzip.GzipFile(filename) + else: + return open(filename) + +logger = logging.getLogger('cdec.sa') + +include "float_list.pxi" +include "int_list.pxi" +include "str_map.pxi" +include "data_array.pxi" +include "alignment.pxi" +include "bilex.pxi" +include "veb.pxi" +include "lcp.pxi" +include "sym.pxi" +include "rule.pxi" +include "precomputation.pxi" +include "suffix_array.pxi" +include "rulefactory.pxi" |