-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtranslation.py
More file actions
152 lines (146 loc) · 5.97 KB
/
translation.py
File metadata and controls
152 lines (146 loc) · 5.97 KB
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
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
#!/usr/bin/env python3
class Translators:
def __init__(self):
# translate official name to a shorter version
self.response_short = {
"Algoma University": "Algoma",
"Brescia University College": "Brescia",
"Brock University": "BrockU",
"Carleton University": "CarletonU",
"Collège de Hearst": "Hearst",
"Huntington University": "Huntington",
"Huron University College": "Huron",
"King's University College": "Kings",
"Lakehead University": "Lakehead",
"Laurentian University of Sudbury": "LaurentianU",
"McMaster University": "McMasterU",
"Nipissing University": "NipissingU",
"Northern Ontario School of Medicine": "NOSM",
"Ontario College of Art and Design University": "OCAD",
"Queen's University": "Queens",
"Ryerson University": "Ryerson",
"Trent University": "Trent",
"Trinity College": "Trinity",
"University of Guelph": "GuelphU",
"University of Ontario Institute of Technology": "UOIT",
"University of Ottawa": "OttawaU",
"University of St. Michael's College": "St. M",
"University of Sudbury": "SudburyU",
"University of Toronto": "UofT",
"University of Waterloo": "UoW",
"University of Western Ontario": "UWO",
"University of Windsor": "WindsorU",
"Victoria University": "VictoriaU",
"Wilfrid Laurier University": "WLaurier",
"York University": "York"
}
self.hashtags = {
"Algoma University": "#AlgomaU",
"Brescia University College": "#uWaterloo",
"Brock University": "#BrockU",
"Carleton University": "#CarletonU",
"Carleton": "#CarletonU",
"Collège de Hearst": "#HearstCollege",
"College de Hearst": "#HearstCollege",
"Huntington University": "#HuntingtonU",
"Huron University College": "#uwo",
"King's University College": "#uwo",
"Lakehead University": "#LakeheadU",
"Laurentian University of Sudbury": "#LaurentianU",
"McMaster University": "#McMasterU",
"Nipissing University": "#NipissingU",
"Northern Ontario School of Medicine": "#NOSM",
"Ontario College of Art and Design University": "#OCAD",
"Queen's University": "#QueensU",
"Queens University": "#QueensU",
"Queen's": "#QueensU",
"Queens": "#QueensU",
"Ryerson University": "#RyersonU",
"Trent University": "#TrentU",
"Trinity College": "#uoft",
"University of Guelph": "#uofg",
"University of Ontario Institute of Technology": "#UOIT",
"University of Ottawa": "#uOttawa",
"University of St. Michael's College": "#uoft",
"University of Sudbury": "#uSudbury",
"University of Toronto": "#uoft",
"University of Waterloo": "#uwaterloo",
"University of Western Ontario": "#uwo",
"Western": "#uwo",
"University of Windsor": "#uWindsor",
"Victoria University": "#uoft",
"Wilfrid Laurier University": "#WilfredLaurier",
"York University": "#YorkU"
}
self.uni_short = {
"algoma": "Algoma University",
"bresica": "Brescia University College",
"brock": "Brock University",
"carleton": "Carleton University",
"hearst": "Collège de Hearst",
"huntingtion": "Huntington University",
"huron": "Huron University College",
"kings": "King's University College",
"lakehead": "Lakehead University",
"laurentian": "Laurentian University of Sudbury",
"mac": "McMaster University",
"mcmaster": "McMaster University",
"nipissing": "Nipissing University",
"nosm": "Northern Ontario School of Medicine",
"nosom": "Northern Ontario School of Medicine",
"ocad": "Ontario College of Art and Design University",
"art": "Ontario College of Art and Design University",
"queens": "Queen's University",
"rye": "Ryerson University",
"ryerson": "Ryerson University",
"trent": "Trent University",
"trinity": "Trinity College",
"guelph": "University of Guelph",
"uofg": "University of Guelph",
"uoit": "University of Ontario Institute of Technology",
"oit": "University of Ontario Institute of Technology",
"it": "University of Ontario Institute of Technology",
"ottawa": "University of Ottawa",
"uofo": "University of Ottawa",
"usmc": "University of St. Michael's College",
"stmikes": "University of St. Michael's College",
"sudbury": "University of Sudbury",
"uofs": "University of Sudbury",
"uoft": "University of Toronto",
"toronto": "University of Toronto",
"uow": "University of Waterloo",
"waterloo": "University of Waterloo",
"uofw": "University of Waterloo",
"western": "University of Western Ontario",
"uwo": "University of Western Ontario",
"windsor": "University of Windsor",
"uofw": "University of Windsor",
"victoria": "Victoria University",
"wilfred": "Wilfrid Laurier University",
"laurier": "Wilfrid Laurier University",
"york":"York University"}
#more well known translated into less well known
self.affiliates = {
"University of Waterloo": ["Brescia University College"],
"University of Western Ontario": ["King's University College", "Huron University College"],
"University of Toronto": ["University of St. Michael's College", "Trinity College", "Victoria University"]
}
self.ignore = [ "a", "by", "u", "uni",
"university",
"school",
"college",
"how",
"who",
"what",
"where",
"why",
"the",
"they",
"them",
"and",
"of",
"and",
"medicine",
"technology"
]
self.help = ["?", "help", "user", "guide", "help me", "how to", "how"]