Add auto-reload, evaluation endpoint, show docs

This commit is contained in:
Andras Schmelczer 2022-05-25 10:02:16 +02:00
parent 04404f2fc4
commit a7e3dc11fd
34 changed files with 389 additions and 100 deletions

8
examples/preprocess.py Normal file
View file

@ -0,0 +1,8 @@
import re
from great_ai.utilities.lemmatize_text import lemmatize_text
def preprocess(text: str) -> str:
lemmas = [re.sub(r"\d[\d.,]*", "NUM", lemma) for lemma in lemmatize_text(text)]
return " ".join(lemmas)