-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmain.py
34 lines (25 loc) · 854 Bytes
/
main.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
34
from src.boolean_query_processor import BooleanQueryProcessor
from src.query_processor import QueryProcessor
def run_boolean_query_processor():
# Create query processor object
bqp = BooleanQueryProcessor()
while True:
# Take an input from user
query = input("Please write a query. ('q' for exit): ")
if query != 'q':
print("The result: ", bqp.process(query))
else:
break
def run_query_processor():
# Create query processor object
qp = QueryProcessor()
while True:
# Take an input from user
query = input("Please write a query. ('q' for exit): ")
if query != 'q':
print("The result: ", qp.process(query))
else:
break
if __name__ == "__main__":
#run_boolean_query_processor
run_query_processor()