def log_similarity_result(logfile, result):
assert result['<STR_LIT>'] == '<STR_LIT>'<EOL>if not logfile:<EOL><INDENT>return<EOL><DEDENT>with open(logfile, '<STR_LIT:a>') as f:<EOL><INDENT>f.write('<STR_LIT:\t>'.join([<EOL>str(result['<STR_LIT>']),<EOL>result['<STR_LIT>'],<EOL>result['<STR_LIT>'],<EOL>json.dumps(result['<STR_LIT>']),<EOL>result['<STR_LIT>'],<EOL>str(result['<STR_LIT>']),<EOL>str(result['<STR_LIT>']),<EOL>]))<EOL>f.write('<STR_LIT:\n>')<EOL><DEDENT>
Log a similarity evaluation result dictionary as TSV to logfile.