@@ -0,0 +1,1205 @@
+from functools import partial%0Afrom multiprocessing import cpu_count, Pool%0Afrom unicodedata import category%0A%0Afrom denite.filter.sorter_sublime import get_score%0A%0Afrom .base import Base%0A%0Aclass Filter(Base):%0A    def __init__(self, vim):%0A        super().__init__(vim)%0A%0A        self.name = 'sorter_sublime_multiprocess'%0A        self.description = %5C%0A            'sorter for fuzzy matching like sublime text based on lib_fts using multiprocessing'%0A        self.pool = Pool(processes=cpu_count())%0A%0A    def filter(self, context):%0A        if len(context%5B'input'%5D) == 0:%0A            return context%5B'candidates'%5D%0A%0A        all_chunks = chunks(context%5B'candidates'%5D, cpu_count())%0A        all_chunks = self.pool.map(partial(score, context%5B'input'%5D), all_chunks)%0A        context%5B'candidates'%5D = %5B%5D%0A        for c in all_chunks:%0A            context%5B'candidates'%5D += c%0A%0A        return sorted(%0A            context%5B'candidates'%5D,%0A            key=lambda candidate: -candidate%5B'filter__rank'%5D%0A        )%0A%0Adef score(pattern, candidates):%0A    for c in candidates:%0A        c%5B'filter__rank'%5D = get_score(pattern, c%5B'word'%5D)%0A    return candidates%0A%0Adef chunks(l, n):%0A    n = max(1, n)%0A    return (l%5Bi:i+n%5D for i in range(0, len(l), n))%0A

Add sorter_sublime_multiprocess to denite