ulf1 / kshingle

Split strings into (character-based) k-shingles
Apache License 2.0
4 stars 1 forks source link

add single-chars to memo automatically #34

Closed ulf1 closed 3 years ago

ulf1 commented 3 years ago

https://github.com/ulf1/kshingle/blob/055a75c55bcacfbea7b4fd7c8c01d758866fe5d7/kshingle/cews.py#L263

if len(memo) == 0:
    memo = {k:v for k,v in db.items() if len(k)==1}