-
Notifications
You must be signed in to change notification settings - Fork 0
/
AllConstants.py
40 lines (33 loc) · 1.28 KB
/
AllConstants.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
__author__ = 'Khaleeq'
# CONS = {}
# CONS['NEGATION'] = ("not")
# CONS['NO']=("no", "false")
# CONS['UNLIKELY']=("<", "unlikely", "doubtful", "negative")
# CONS['NEUTRAL']=("?", "maybe", "unknown" "don't know", "unsure", "skip", "can't tell", "cannot tell", "irrelevant", "n/a", "does not apply", "", " " )
# CONS['LIKELY']=(">", "likely", "positive", "confident")
# CONS['YES']=("yes", "true")
#
# CONS['POS'] = CONS['YES'] + CONS['LIKELY']
# CONS['NEG'] = CONS['NO'] + CONS['UNLIKELY']
# CONS['VALID_INPUT'] = CONS['POS'] + CONS['NEG'] + CONS['NEUTRAL']
NEGATION = ("not")
NO=("no", "false")
UNLIKELY=("<", "unlikely", "doubtful", "negative")
NEUTRAL=("?", "maybe", "sometimes", "partially", "somewhat", "unknown", "do not know", "undecided", "indefinite", "uncertain", "undetermined", "don't know", "unsure", "skip", "can't tell", "cannot tell", "irrelevant", "n/a", "does not apply", "", " " )
LIKELY=(">", "likely", "positive", "confident")
YES=("yes", "true")
POS = YES + LIKELY
NEG = NO + UNLIKELY
VALID_INPUT = POS + NEG + NEUTRAL
def branchingValidation(input, pos, neg):
if input in pos:
return "pos"
elif input in neg:
return "neg"
else:
return ""
def validation(input, valids):
if input in valids:
return "valid"
else:
return ""