예제 #1
0
파일: MyTest.py 프로젝트: liguoyu1/python
 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
예제 #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
예제 #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
예제 #4
0
파일: MyTest.py 프로젝트: liguoyu1/python
    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