Skip to content

Commit

Permalink
Improve spacy inference speed disabling the rest of the pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
ZJaume committed Oct 28, 2021
1 parent b910645 commit 52ddf8a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion biner.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

PUNCTUATION = "[¡¿" + string.punctuation.replace("'","").replace("-","") + "]"
ENTITIES = {"PERSON"}
nlp = spacy.load("en_core_web_sm")
nlp = spacy.load("en_core_web_sm", disable=["tok2vec", "tagger", "parser", "attribute_ruler", "lemmatizer"])

# Regular expression for emails
# https://www.regextester.com/19
Expand Down

0 comments on commit 52ddf8a

Please sign in to comment.