Skip to content

Commit

Permalink
006: Updating spacy version
Browse files Browse the repository at this point in the history
  • Loading branch information
TharinduDR committed Mar 17, 2023
1 parent f2f7413 commit 433ef72
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions mudes/app/mudes_app.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from spacy.lang.en import English
from spacy.lang.xx import MultiLanguage

from spacy.tokenizer import Tokenizer
from mudes.algo.mudes_model import MUDESModel
from mudes.algo.predict import predict_spans
from mudes.algo.preprocess import contiguous_ranges
Expand Down Expand Up @@ -53,7 +53,7 @@ def predict_tokens(self, text: str, language: str = "en"):
else:
nlp = MultiLanguage()

tokenizer = nlp.Defaults.create_tokenizer(nlp)
tokenizer = Tokenizer(nlp.vocab)
tokens = tokenizer(text)
output_tokens = []
for token in tokens:
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ wandb
sentencepiece
onnxruntime
seqeval
spacy
spacy==3.5.1
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

setup(
name="mudes",
version="0.3.0",
version="0.4.0",
author="Tharindu Ranasinghe",
author_email="[email protected]",
description="Toxic Spans Prediction",
Expand Down Expand Up @@ -36,6 +36,6 @@
"sentencepiece",
"onnxruntime",
"seqeval",
"spacy"
"spacy==3.5.1"
],
)

0 comments on commit 433ef72

Please sign in to comment.