-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
yes_no_words.py
126 lines (112 loc) · 2.07 KB
/
yes_no_words.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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
import random
__version__ = "2022.4.8"
NO = frozenset(
[
"absolutely not",
"ahhh nah",
"cancel",
"certainly not",
"decline",
"denied",
"deny",
"disagreed",
"fail",
"false",
"forget it",
"impossible",
"lolno",
"na",
"nada",
"nah",
"naw",
"nay",
"negative",
"negatory",
"nein nein nein",
"nerp",
"never",
"nix",
"no way",
"no",
"nope",
"not a chance",
"not",
"pass",
"reject",
"zero",
]
)
YES = frozenset(
[
"absolutely",
"ack",
"acknowledged",
"affirmative",
"agree",
"aight",
"all right",
"all righty",
"alright",
"aye",
"certainly",
"cool",
"correct",
"definitely",
"exactly",
"fine",
"fo shizzle",
"fo sho",
"forizzle",
"gladly",
"good",
"indeed",
"indubitably",
"mhm",
"of course",
"ok",
"okay",
"precisely",
"right on",
"right",
"roger",
"sure thing",
"sure",
"surely",
"true dat",
"true",
"uh-huh",
"very well",
"way",
"word",
"ya",
"yaaasss",
"yah",
"ye",
"yea",
"yeah",
"yeh",
"yep",
"yeppers",
"yes",
"yessir",
"yessum",
"yis",
"yiss",
"yisss",
"you bet",
"yup",
"yuppers",
"yus",
]
)
ALL = YES.union(NO)
def all_random() -> str:
return random.choice(tuple(ALL))
def no_random() -> str:
return random.choice(tuple(NO))
def yes_random() -> str:
return random.choice(tuple(YES))
def is_falsy(word_or_phrase: str) -> bool:
return word_or_phrase.lower() in NO
def is_truthy(word_or_phrase: str) -> bool:
return word_or_phrase.lower() in YES