summaryrefslogtreecommitdiff
path: root/python/src/sa/_sa.pyx
blob: 50da4235c3cd3d4e47cd6bb371eaf2a1efa64b09 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
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"
include "features.pxi"