Skip to content

Commit

Permalink
#354 related refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolay-r committed Jul 9, 2022
1 parent cdc8332 commit 7b8c675
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
logging.basicConfig(level=logging.INFO)


class DefaultOpinionAnnotator(BaseOpinionAnnotator):
class AlgorithmBasedOpinionAnnotator(BaseOpinionAnnotator):
""" Algorithm-based annotator
"""

Expand All @@ -23,7 +23,7 @@ def __init__(self, annot_algo, create_empty_collection_func, get_doc_etalon_opin
"""
assert(isinstance(annot_algo, BaseOpinionAnnotationAlgorithm))
assert(callable(get_doc_etalon_opins_func))
super(DefaultOpinionAnnotator, self).__init__()
super(AlgorithmBasedOpinionAnnotator, self).__init__()

self.__annot_algo = annot_algo
self.__get_doc_etalon_opins_func = get_doc_etalon_opins_func
Expand Down
8 changes: 4 additions & 4 deletions arekit/contrib/experiment_rusentrel/annot/factory.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from arekit.common.opinions.annot.default import DefaultOpinionAnnotator
from arekit.common.opinions.annot.algo_based import AlgorithmBasedOpinionAnnotator
from arekit.contrib.experiment_rusentrel.annot.two_scale import TwoScaleTaskOpinionAnnotator


Expand All @@ -13,6 +13,6 @@ def create(labels_count, create_algo, create_empty_collection_func, get_doc_etal
return TwoScaleTaskOpinionAnnotator(create_empty_collection_func=create_empty_collection_func,
get_doc_etalon_opins_func=get_doc_etalon_opins_func)
else:
return DefaultOpinionAnnotator(create_algo(),
create_empty_collection_func=create_empty_collection_func,
get_doc_etalon_opins_func=get_doc_etalon_opins_func)
return AlgorithmBasedOpinionAnnotator(annot_algo=create_algo(),
create_empty_collection_func=create_empty_collection_func,
get_doc_etalon_opins_func=get_doc_etalon_opins_func)

0 comments on commit 7b8c675

Please sign in to comment.