def __init__(self, text): tc = TextCombiner() self.body = tc.remove_parenthesis(text) self.set_blank_to_body_if_not_includes_hiragana_or_karakana() self.body = tc.remove_inside_round_parenthesis(self.body) m_factory = MWordsFactory() self.m_body_words = m_factory.build_from(self.body)
def prepare_m_words(self, page): tc = TextCombiner() snippet = tc.remove_all_parenthesis(page.snippet) mwf = MWordsFactory() m_words = mwf.build_from(snippet) m_words = tc.combine_nouns(m_words) m_words = tc.combine_verbs(m_words) return m_words
def set_m_body_words_by_combine_words(self): tc = TextCombiner() self.m_body_words = tc.combine_nouns(self.m_body_words) self.m_body_words = tc.combine_verbs(self.m_body_words)
def _set_m_body_words_by_combine_words(self): tc = TextCombiner() m_body_words = tc.combine_nouns(self.m_body_words) self.m_body_words = tc.combine_verbs(m_body_words)