Exemple #1
0
 verb = []
 adverb = []
 cnt = cnt + 1
 print(cnt)
 fileId = file.title().split('.')[0]
 ques_list = []
 qid_list = []
 with open(file, 'r') as g:
     ques_lines = g.readlines()
     for line in ques_lines:
         if line.__contains__("QuestionID:"):
             qid_list.append(line)
         if line.__contains__("Question:"):
             ques = line.split("Question:")[1]
             ques_list.append(ques)
             Wh_word = helper.findWH(ques)
             #print Wh_word
             q_tagged = helper.Postagger(ques)
             q_tagged_copy = copy.deepcopy(q_tagged)
             #print "Answer Type: "
             #findNominal(q_tagged)
             #ner_tag.append(st.tag(ques[1].split()))
             #print ner_tag
             quot = []
             for val in quoted.findall(ques[1]):
                 if val:
                     quot.append(val)
             quotations.append(quot)
             #print quotations
             nnp_words.append(helper.findNNP(q_tagged))
             complNominal.append(Keywordcount.findcomplNominal(q_tagged))