Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Evaluator refactoring #352

Closed
3 tasks done
nicolay-r opened this issue Jun 30, 2022 · 0 comments
Closed
3 tasks done

Evaluator refactoring #352

nicolay-r opened this issue Jun 30, 2022 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@nicolay-r
Copy link
Owner

nicolay-r commented Jun 30, 2022

  • Provide opportunity to evaluate list of text_opinions also (not OpinionCollections only)
  • Refactor this since the latter is a part of the another contrib module, and labels may vary as well:
  • __has_opinions_with_label -- remove dependency from Opinion type
    self.__pos_label = ExperimentPositiveLabel()
    self.__neg_label = ExperimentNegativeLabel()

def __has_opinions_with_label(opinions, label):
assert(isinstance(label, Label))
assert(isinstance(opinions, OpinionCollection))
for opinion in opinions:
if opinion.Sentiment == label:
return True
return False

@nicolay-r nicolay-r self-assigned this Jun 30, 2022
@nicolay-r nicolay-r added the enhancement New feature or request label Jun 30, 2022
nicolay-r added a commit that referenced this issue Jun 30, 2022
… separated class of BaseComparisonCalculator type.
nicolay-r added a commit that referenced this issue Jun 30, 2022
nicolay-r added a commit that referenced this issue Jul 4, 2022
nicolay-r added a commit that referenced this issue Jul 4, 2022
nicolay-r added a commit that referenced this issue Jul 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant