Esempio 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)
Esempio 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)
Esempio 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)
Esempio n. 4
0
 def set_sahens_from_text(self):
     self.sahens = SentenceSeparator.sahens(self.text)
Esempio n. 5
0
 def set_verbs_from_text(self):
     self.verbs = SentenceSeparator.verbs(self.text)
Esempio n. 6
0
 def set_sahens_from_text(self):
     self.sahens = SentenceSeparator.sahens(self.text)
Esempio n. 7
0
 def set_verbs_from_text(self):
     self.verbs = SentenceSeparator.verbs(self.text)
Esempio 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)