def read_openke_translation(filename, delimiter='<STR_LIT:\t>', entity_first=True):
result = {}<EOL>with open(filename, "<STR_LIT:r>") as f:<EOL><INDENT>_ = next(f) <EOL>for line in f:<EOL><INDENT>line_slice = line.rstrip().split(delimiter)<EOL>if not entity_first:<EOL><INDENT>line_slice = list(reversed(line_slice))<EOL><DEDENT>result[line_slice[<NUM_LIT:0>]] = line_slice[<NUM_LIT:1>]<EOL><DEDENT><DEDENT>return result<EOL>
Returns map with entity or relations from plain text.