杨魅力
@pykit.runTimedef parse(): p = {} for k in kws: for i in k.split(): p.setdefault(i,[]).append(k) for k in kws: r = [set(p[i]) for i in k.split()] r = set.intersection(*r) d[k] = len(r)-1kws = [...]d = {}d.fromkeys(kws,0)parse()研究了一下倒排,速度提高十倍以上