コード例 #1
0
def multi_iter_search_with_keep(words, texts, ms=None):
    from itertools import chain
    if ms is None:
        ms = MultiSearch(words)

    results = []
    for text in texts:
        results.extend(ms.iter_search(text, keep=True))
    results.sort()
    return results
コード例 #2
0
ファイル: test_multisearch.py プロジェクト: Andor-Z/scpy2
def multi_iter_search_with_keep(words, texts, ms=None):
    from itertools import chain
    if ms is None:
        ms = MultiSearch(words)

    results = []
    for text in texts:
        results.extend(ms.iter_search(text, keep=True))
    results.sort()
    return results
コード例 #3
0
def multi_iter_search(words, text, ms=None):
    if ms is None:
        ms = MultiSearch(words)
    results = list(ms.iter_search(text))
    results.sort()
    return results
コード例 #4
0
ファイル: test_multisearch.py プロジェクト: Andor-Z/scpy2
def multi_iter_search(words, text, ms=None):
    if ms is None:
        ms = MultiSearch(words)
    results = list(ms.iter_search(text))
    results.sort()
    return results