<jupyter_start><jupyter_text>English layout<jupyter_code>RESULTS = join(pardir, 'data', 'log_all_en')
df_en = concat_results(RESULTS)
df_en.iloc[df_en.Fitness.argmin()]
en_layout = ''.join(df_en.iloc[df_en.Fitness.argmin(), 0])
en_layout
plt.imshow(draw(en_layout, compute_cell_location()))<jupyter_output><empty_output><jupyter_text>Portuguese layout<jupyter_code>RESULTS = join(pardir, 'data', 'log_all_pt')
df_pt = concat_results(RESULTS)
df_pt.iloc[df_pt.Fitness.argmin()]
''.join(df_pt.iloc[df_pt.Fitness.argmin(), 0])<jupyter_output><empty_output><jupyter_text>Baseline EN<jupyter_code>DATA_DSSG = join(pardir, 'data', 'processed')

# get keys
with open(join(DATA_DSSG, 'en-keys.txt'), 'r') as file:
    keys = file.read()

# get corpus example
with open(join(DATA_DSSG, 'en-corpus.txt'), 'r') as file:
    corpus = file.read()

keys = ''.join(keys.split('\n'))
corpus = ''.join(corpus.split(keys)).split('\n')[0]
#webinar = ' EAIOTRNDMCYUSLGFWH_BQ#^<0ZV.KX_,?_JP'
webinar = 'EINOA TCGVDURL<^SWH_Z__XJQFPBMY,#.0K?'
check_keyboard(webinar, keys)
compute_cost(webinar, corpus)
(df_en.iloc[df_en.Fitness.argmin(),1] - compute_cost(webinar, corpus)) / compute_cost(webinar, corpus)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.17807089859851608, 'fraction_numerical': 0.00494641384995878, 'mean_word_length': 8.410852713178295, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '3', 'dir': 'jupyter-structured-clean-dedup', 'id': '154590', 'license': 'MIT', 'n_tokens_mistral': 543, 'n_tokens_neox': 529, 'n_words': 66, 'path': 'notebooks/3.0-jf-concat-results.ipynb', 'repo_name': 'joaopfonseca/dssgsummit2020-challenge', 'size': '1213'}