Добавлен коостяк для подсказок

This commit is contained in:
Jack Stdin
2016-01-15 15:15:10 +03:00
parent 8156fa3d8d
commit 1e861f7285
7 changed files with 220 additions and 65 deletions

11
aore/miscutils/trigram.py Normal file
View File

@@ -0,0 +1,11 @@
# -*- coding: utf-8 -*-
def trigram(inp):
inp = u"__"+inp+u"__"
output = []
for i in range(0, len(inp) - 2):
output.append(inp[i:i + 3])
return " ".join(output)