-
Notifications
You must be signed in to change notification settings - Fork 27
/
Copy pathask.py
33 lines (28 loc) · 853 Bytes
/
ask.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
from bin_questions import BinQuestion
from binary import Binary
from wh_question import WH
from tokenize import Tokenize
class Ask:
def main(self, k):
print("\n\n\n\n")
print("Check Point 0")
T = Tokenize.main(k, "einstein.txt")
sentences_top_k = T[0]
NE = T[1]
questions = []
for si in sentences_top_k:
print(" *** org : ", si)
bin_attempt = Binary.main(si)
wh_attempt = WH.main(bin_attempt, si, NE)
if bin_attempt:
print(" *** bin : ", bin_attempt)
questions.append(bin_attempt)
if wh_attempt:
questions.append(wh_attempt)
if __name__ == '__main__':
Tokenize = Tokenize()
BinQuestion = BinQuestion()
Binary = Binary()
WH = WH()
run = Ask()
run.main(20)