Ejemplo n.º 1
0
 def set_past_word_count(self):
     # self.sentencesはすでにある前提
     if not hasattr(self, 'past_word_count'):
         self.past_word_count = {}
     for sentence_index, sentence in enumerate(self.sentences):
         m_words = SentenceSeparator.m_words(sentence)
         for i, m_word in enumerate(m_words):
             # iはm_wordに分けたあとの順番
             past_text = self.past_text(i, m_word, m_words)
             if past_text:
                 self.past_word_count_up(past_text)
Ejemplo n.º 2
0
 def set_past_word_count(self):
     # self.sentencesはすでにある前提
     if not hasattr(self, 'past_word_count'):
         self.past_word_count = {}
     for sentence_index, sentence in enumerate(self.sentences):
         m_words = SentenceSeparator.m_words(sentence)
         for i, m_word in enumerate(m_words):
             # iはm_wordに分けたあとの順番
             past_text = self.past_text(i, m_word, m_words)
             if past_text:
                 self.past_word_count_up(past_text)
Ejemplo n.º 3
0
 def set_sentences_from_text(self):
     sp = SentenceSeparator(self.text)
     sentence_texts = sp.split_by_dots()
     for sentence_text in sentence_texts:
         sentence = Sentence(sentence_text, self.query)
         self.sentences.append(sentence)
Ejemplo n.º 4
0
 def set_sahens_from_text(self):
     self.sahens = SentenceSeparator.sahens(self.text)
Ejemplo n.º 5
0
 def set_verbs_from_text(self):
     self.verbs = SentenceSeparator.verbs(self.text)
Ejemplo n.º 6
0
 def set_sahens_from_text(self):
     self.sahens = SentenceSeparator.sahens(self.text)
Ejemplo n.º 7
0
 def set_verbs_from_text(self):
     self.verbs = SentenceSeparator.verbs(self.text)
Ejemplo n.º 8
0
 def set_sentences_from_text(self):
     sp = SentenceSeparator(self.text)
     sentence_texts = sp.split_by_dots()
     for sentence_text in sentence_texts:
         sentence = Sentence(sentence_text, self.query)
         self.sentences.append(sentence)