Split examples
This commit is contained in:
parent
b4492da2e6
commit
df1c9418ee
11 changed files with 401 additions and 252 deletions
8
examples/complex/preprocess.py
Normal file
8
examples/complex/preprocess.py
Normal 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)
|
||||
Loading…
Add table
Add a link
Reference in a new issue