Add files

Signed-off-by: András Schmelczer <andras@schmelczer.dev>
This commit is contained in:
Andras Schmelczer 2022-04-02 13:47:33 +02:00
commit 889e79174b
No known key found for this signature in database
GPG key ID: 39260B5B0614A13E
103 changed files with 24322 additions and 0 deletions

21
good_ai/src/sus/nlp.py Normal file
View file

@ -0,0 +1,21 @@
try:
import en_core_web_lg
except ImportError:
import subprocess
print("Spacy model en_core_web_lg not found locally, downloading...")
subprocess.call(
[
"pip",
"install",
"https://github.com/explosion/spacy-models/releases/download/en_core_web_lg-3.2.0/en_core_web_lg-3.2.0-py3-none-any.whl",
]
)
import en_core_web_lg
from .external.negspacy import negation # noqa: F401 it's important to import this
nlp = en_core_web_lg.load()
nlp.add_pipe("negex")