Move files
This commit is contained in:
parent
79ddc5c7df
commit
8b004ec46d
233 changed files with 117 additions and 2394 deletions
21
src/great_ai/utilities/lemmatize_text.py
Normal file
21
src/great_ai/utilities/lemmatize_text.py
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
from typing import List
|
||||
|
||||
from .lemmatize_token import lemmatize_token
|
||||
from .nlp import nlp
|
||||
|
||||
|
||||
def lemmatize_text(
|
||||
text: str,
|
||||
add_negation: bool = False,
|
||||
add_part_of_speech: bool = False,
|
||||
) -> List[str]:
|
||||
doc = nlp(text)
|
||||
|
||||
return [
|
||||
lemmatize_token(
|
||||
t,
|
||||
add_negation=add_negation,
|
||||
add_part_of_speech=add_part_of_speech,
|
||||
)
|
||||
for t in doc
|
||||
]
|
||||
Loading…
Add table
Add a link
Reference in a new issue