-
Notifications
You must be signed in to change notification settings - Fork 0
/
ibis_supplier.py
43 lines (31 loc) · 1.1 KB
/
ibis_supplier.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
35
36
37
38
39
40
41
42
43
import settings
import studip
import travel
if settings.MULTIUSER:
import multiUser_ibis
else:
import singleUser_ibis
def loadIBIS(forwhat, language):
if forwhat == "studip":
apiconnector = studip.create_studip_APIConnector()
grammar = studip.create_studip_grammar(language)
domain = studip.create_studip_domain(apiconnector)
elif forwhat == "travel":
apiconnector = travel.create_travel_APIConnector()
grammar = travel.create_travel_grammar()
domain = travel.create_travel_domain()
if settings.MULTIUSER:
ibis = multiUser_ibis.IBIS2(domain, apiconnector, grammar)
else:
ibis = singleUser_ibis.IBIS1(domain, apiconnector, grammar)
return ibis
#####################################################################
# Running the dialogue system
######################################################################
if __name__=='__main__':
if not settings.MULTIUSER:
ibis = loadIBIS(settings.USE_GRAMMAR, settings.GRAMMAR_LAN)
ibis.init()
ibis.control()
else:
print("Multiuser is on")