diff options
author | Kenneth Heafield <github@kheafield.com> | 2012-08-03 07:46:54 -0400 |
---|---|---|
committer | Kenneth Heafield <github@kheafield.com> | 2012-08-03 07:46:54 -0400 |
commit | 122f46c31102b683eaab3ad81a3a98accbc694bb (patch) | |
tree | 8d499d789b159ebed25bb23b6983813d064a6296 /python/src/sa/_sa.pyx | |
parent | ac664bdb0e481539cf77098a7dd0e1ec8d937ba0 (diff) | |
parent | 193d137056c3c4f73d66f8db84691d63307de894 (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" |