Skip to content

Commit

Permalink
Refactoring #178
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolay-r committed Aug 24, 2021
1 parent 5142044 commit aeea14f
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions arekit/contrib/source/ruattitudes/news/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@ class RuAttitudesNews(News):
def __init__(self, sentences, news_index):
assert(len(sentences) > 0)

super(RuAttitudesNews, self).__init__(news_id=news_index,
sentences=sentences,
entities_parser=RuAttitudesTextEntitiesParser())
super(RuAttitudesNews, self).__init__(news_id=news_index, sentences=sentences)

self.__set_owners()
self.__objects_before_sentence = self.__cache_objects_declared_before()
Expand Down Expand Up @@ -60,6 +58,14 @@ def extract_linked_text_opinions(self, opinion):
assert(isinstance(opinion, Opinion))
return LinkedTextOpinionsWrapper(self.__iter_all_text_opinions_in_sentences(opinion=opinion))

def get_entities_collection(self):
raise Exception("Not Available for this type of collection")

@staticmethod
def _sentence_to_terms_list_core(sentence):
with RuAttitudesTextEntitiesParser() as parser:
return parser.parse(sentence)

# endregion

# region Private methods
Expand Down

0 comments on commit aeea14f

Please sign in to comment.