Experiment with framework
Signed-off-by: András Schmelczer <andras@schmelczer.dev>
This commit is contained in:
parent
ea54cd9c8c
commit
cef2e51c67
25 changed files with 442 additions and 251 deletions
|
|
@ -1,10 +0,0 @@
|
|||
import re
|
||||
|
||||
from sus.clean import clean
|
||||
from sus.lemmatize_text import lemmatize_text
|
||||
|
||||
|
||||
def preprocess(text: str) -> str:
|
||||
cleaned = clean(text, convert_to_ascii=True)
|
||||
lemmas = [re.sub(r"\d+", "NUM", lemma) for lemma in lemmatize_text(cleaned)]
|
||||
return " ".join(lemmas)
|
||||
Loading…
Add table
Add a link
Reference in a new issue