Example #1
0
def preprocess_housenumber(s):
    if not HOUSENUMBER_PROCESSORS:
        HOUSENUMBER_PROCESSORS.extend(config.HOUSENUMBER_PROCESSORS)
        HOUSENUMBER_PROCESSORS.extend(config.PROCESSORS)
    if s not in _HOUSENUMBER_CACHE:
        _HOUSENUMBER_CACHE[s] = list(iter_pipe(s, HOUSENUMBER_PROCESSORS))
    return _HOUSENUMBER_CACHE[s]
Example #2
0
def preprocess_housenumber(s):
    if not HOUSENUMBER_PROCESSORS:
        HOUSENUMBER_PROCESSORS.extend(config.HOUSENUMBER_PROCESSORS)
        HOUSENUMBER_PROCESSORS.extend(config.PROCESSORS)
    if s not in _HOUSENUMBER_CACHE:
        _HOUSENUMBER_CACHE[s] = list(iter_pipe(s, HOUSENUMBER_PROCESSORS))
    return _HOUSENUMBER_CACHE[s]
Example #3
0
def preprocess(s):
    if s not in _CACHE:
        _CACHE[s] = list(iter_pipe(s, config.PROCESSORS))
    return _CACHE[s]
Example #4
0
def preprocess_query(s):
    from addok import config
    return list(iter_pipe(s, config.QUERY_PROCESSORS + config.PROCESSORS))
Example #5
0
def preprocess_batch(d):
    return list(iter_pipe(d, config.BATCH_PROCESSORS))[0]
Example #6
0
def score_preprocessed_query(helper, result):
    helper.query = list(iter_pipe(helper.query, config.QUERY_PROCESSORS))[0]
Example #7
0
def preprocess_batch(d):
    config.INDEX_EDGE_NGRAMS = False  # Run command "ngrams" instead.
    return iter_pipe(d, config.BATCH_PROCESSORS)
Example #8
0
def process_documents(*docs):
    return list(iter_pipe(docs, config.BATCH_PROCESSORS))
Example #9
0
def preprocess():
    # Do not import at load time, because we don't want to have a hard
    # dependency to psycopg2.
    PSQL_PROCESSORS = [import_by_path(path) for path in config.PSQL_PROCESSORS]
    return iter_pipe(None, PSQL_PROCESSORS)
Example #10
0
def preprocess_query(s):
    return list(iter_pipe(s, config.QUERY_PROCESSORS + config.PROCESSORS))
Example #11
0
def preprocess():
    # Do not import at load time, because we don't want to have a hard
    # dependency to psycopg2.
    PSQL_PROCESSORS = [import_by_path(path) for path in config.PSQL_PROCESSORS]
    return iter_pipe(None, PSQL_PROCESSORS)
Example #12
0
def preprocess_query(s):
    return list(iter_pipe(s, config.QUERY_PROCESSORS + config.PROCESSORS))
Example #13
0
def preprocess_batch(d):
    config.INDEX_EDGE_NGRAMS = False  # Run command "ngrams" instead.
    return iter_pipe(d, config.BATCH_PROCESSORS)
Example #14
0
def preprocess_batch(d):
    return list(iter_pipe(d, config.BATCH_PROCESSORS))[0]
Example #15
0
def preprocess(s):
    if s not in _CACHE:
        _CACHE[s] = list(iter_pipe(s, config.PROCESSORS))
    return _CACHE[s]