Skip to content

Commit

Permalink
#281 realated. Removed non utilized parameter.
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolay-r committed May 28, 2022
1 parent ff6703b commit 438f322
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 9 deletions.
5 changes: 1 addition & 4 deletions arekit/contrib/bert/handlers/serializer.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,7 @@ def __handle_iteration(self, data_type):
doc_ops=self.__doc_ops,
opin_ops=self.__opin_ops)
+
ppl_text_ids_to_parsed_news(
parse_news_func=lambda doc_id: self.__doc_ops.parse_doc(doc_id),
iter_doc_opins=lambda doc_id: self.__opin_ops.iter_opinions_for_extraction(
doc_id=doc_id, data_type=data_type))
ppl_text_ids_to_parsed_news(parse_news_func=lambda doc_id: self.__doc_ops.parse_doc(doc_id))
+
ppl_parsed_news_to_opinion_linkages(
value_to_group_id_func=self.__value_to_group_id_func,
Expand Down
5 changes: 2 additions & 3 deletions arekit/contrib/networks/core/input/helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ def __perform_writing(exp_ctx, exp_io, doc_ops, data_type, opinion_provider,
# endregion

@staticmethod
# TODO. Provide text_parser here.
def prepare(exp_ctx, exp_io, doc_ops, opin_ops, terms_per_context, balance, value_to_group_id_func):
assert(isinstance(exp_ctx, NetworkSerializationContext))
assert(isinstance(terms_per_context, int))
Expand Down Expand Up @@ -122,9 +123,7 @@ def prepare(exp_ctx, exp_io, doc_ops, opin_ops, terms_per_context, balance, valu
opin_ops=opin_ops)
+
ppl_text_ids_to_parsed_news(
parse_news_func=lambda doc_id: doc_ops.parse_doc(doc_id),
iter_doc_opins=lambda doc_id: opin_ops.iter_opinions_for_extraction(
doc_id=doc_id, data_type=data_type))
parse_news_func=lambda doc_id: doc_ops.parse_doc(doc_id))
+
ppl_parsed_news_to_opinion_linkages(value_to_group_id_func=value_to_group_id_func,
terms_per_context=terms_per_context)
Expand Down
3 changes: 1 addition & 2 deletions arekit/contrib/utils/pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,8 @@ def ppl_text_ids_to_annotated(annotator, data_type, doc_ops, opin_ops):
]


def ppl_text_ids_to_parsed_news(parse_news_func, iter_doc_opins):
def ppl_text_ids_to_parsed_news(parse_news_func):
assert(callable(parse_news_func))
assert(callable(iter_doc_opins))

return [
# (id, opinions) -> (parsed_news, opinions).
Expand Down

0 comments on commit 438f322

Please sign in to comment.