From f3afb85e743a252935c02e6bcdefe9d4f26549da Mon Sep 17 00:00:00 2001 From: Sadegh Date: Tue, 31 Dec 2024 21:54:35 +0330 Subject: [PATCH] fix sentiment and readme --- README.md | 2 +- dadmatools/pipeline/language.py | 3 ++- setup.py | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 71c28e6..d3fd557 100644 --- a/README.md +++ b/README.md @@ -176,7 +176,7 @@ import dadmatools.pipeline.language as language # here lemmatizer and pos tagger will be loaded # as tokenizer is the default tool, it will be loaded as well even without calling -pips = 'tok, lem, pos, dep, chunk, cons, spellchecker, kasreh, itf, ner, sent' +pips = 'tok,lem,pos,dep,chunk,cons,spellchecker,kasreh,itf,ner,sent' nlp = language.Pipeline(pips) # doc is an SpaCy object doc = nlp('کشور بزرگ ایران توانسته در طی سال‌ها اغشار مختلفی از قومیت‌های گوناگون رو به خوبی تو خودش جا بده') diff --git a/dadmatools/pipeline/language.py b/dadmatools/pipeline/language.py index f91f3bf..0552c4a 100644 --- a/dadmatools/pipeline/language.py +++ b/dadmatools/pipeline/language.py @@ -1277,7 +1277,8 @@ def __call__(self, input, pipelines: str = None): if self._config.active_lang in langwithsent and SENT in pipelines: # sent if possible # sentiment = self._sent_doc(out) # out = self._sent_doc(out) - final['sentiment'] = self._sent_model[self.active_lang](text) + # final['sentiment'] = self._sent_model[self.active_lang](text) + final['sentiment'] = self._sent_model(text) return final def _conllu_predict(self, text_fpath): diff --git a/setup.py b/setup.py index e78ba34..87caed5 100644 --- a/setup.py +++ b/setup.py @@ -51,7 +51,7 @@ setuptools.setup( name="dadmatools", - version="2.1.4", + version="2.1.5", author="Dadmatech AI Company", author_email="info@dadmatech.ir", description="DadmaTools is a Persian NLP toolkit",