INNER CODE UNIT · Python
load_list
vacancy/SceneGraphParser · sng_parser/database.py:18
def load_list(filename):
if filename not in _caches:
out = set()
for x in open(osp.join(osp.dirname(__file__), '_data', filename)):
x = x.strip()
if len(x) > 0:
out.add(x)
_caches[filename] = out
return _caches[filename]
def is_phrasal_verb(verb):
return verb in load_list('phrasal-verbs.txt')
def is_phrasal_prep(prep):
return prep in load_list('phrasal-preps.txt')