Skip to content

Commit

Permalink
fix sentiment and readme
Browse files Browse the repository at this point in the history
  • Loading branch information
sadeghjafari5528 committed Dec 31, 2024
1 parent 43fd56b commit f3afb85
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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('کشور بزرگ ایران توانسته در طی سال‌ها اغشار مختلفی از قومیت‌های گوناگون رو به خوبی تو خودش جا بده')
Expand Down
3 changes: 2 additions & 1 deletion dadmatools/pipeline/language.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit f3afb85

Please sign in to comment.