/
academic.py
49 lines (42 loc) · 1019 Bytes
/
academic.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
def is_academic_phrase(phrase):
if not phrase:
return False
# if you have academic-sounding tags, you're academic
sciency_words = [
"chemi",
"scien",
"bio",
"econo",
"omics",
"sociology",
"physics",
"psych",
"math",
# "statistics",
"ecolog",
"genetics",
# "analysis",
"department",
"university",
"formatics",
"evolution",
"professor",
"doctoral",
"phd",
"postdoc",
"post-doc",
"doi",
# "chemphys", #cran tag
# "experimentaldesign",
# "clinicaltrials",
# "research",
# "medicalimaging",
# "differentialequations",
# "pharmacokinetics",
# "environmetrics"
]
phase_lower = phrase.lower()
for sciency_word in sciency_words:
if sciency_word in phase_lower:
return True
return False