Beispiel #1
0
 def TagSenetnceTest(self,method=2):
     tag_sentence = Sentence_Tag()
     sentences = ReadFile.getQueriesWithId('AllQueriesWithID')
     re_sentences = tag_sentence.tagSentences(sentences[:100],method=method)
     for sen in re_sentences:
         if method == 1:
             for w in sen:
                 print w[0],w[1]
             print
         else:
             print sen
Beispiel #2
0
 def TagSenetnceTest(self, method=2):
     tag_sentence = Sentence_Tag()
     sentences = ReadFile.getQueriesWithId('AllQueriesWithID')
     re_sentences = tag_sentence.tagSentences(sentences[:100],
                                              method=method)
     for sen in re_sentences:
         if method == 1:
             for w in sen:
                 print w[0], w[1]
             print
         else:
             print sen
Beispiel #3
0
    def TestSentencesStruct(self):
        method = 2
        tag_sentence = Sentence_Tag()
        sentences = ReadFile.getQueriesWithId('AllQueriesWithID')
        sentenceStruct = SentenceStruct()

        tag_sentences = tag_sentence.tagSentences(sentences, method)
        sentences_class_list = sentenceStruct.SimiSentenceStruct(tag_sentences)
        # sh = Show()
        # sh.showSenetenceStructResult(sentences_class_list)
        # wr = WriteResult()
        # wr.WriteSentenceStruct(sentences_class_list)
        return sentences_class_list
Beispiel #4
0
    def TestSentencesStruct(self):
        method = 2
        tag_sentence = Sentence_Tag()
        sentences = ReadFile.getQueriesWithId('AllQueriesWithID')
        sentenceStruct = SentenceStruct()

        tag_sentences = tag_sentence.tagSentences(sentences,method)
        sentences_class_list = sentenceStruct.SimiSentenceStruct(tag_sentences)
        # sh = Show()
        # sh.showSenetenceStructResult(sentences_class_list)
        # wr = WriteResult()
        # wr.WriteSentenceStruct(sentences_class_list)
        return sentences_class_list