<jupyter_start><jupyter_text>Upload data as Journal Entries<jupyter_code>data = upload_data(DB_PATH, limit=None)
journal_truth = upload_journal_entries(DB_PATH)[["ID", "GroundTruth", "Time"]]
d = data_preprocessing(data)
d.head(2)<jupyter_output><empty_output><jupyter_text>Construct FSN object<jupyter_code>fsn = FSN()
fsn.build(d, left_title="FA_Name")
set_font()
# draw_fsn(fsn, add_node_labels=False)
draw.financial_accounts_histograms(d)<jupyter_output><empty_output><jupyter_text>Get Embeddings<jupyter_code># 4.  ///////// Getting Skip-Grams \\\\\\\\\\\\
skip_grams, tr = get_SkipGrams(fsn, use_cache=True)
# 5.  ///////// Getting embeddings \\\\\\\\\\\\
embeddings = get_embeddings(skip_grams, tr)
embeddings = embeddings.merge(journal_truth, on="ID")
embeddings = cl_Agglomerative(embeddings, 11)
draw.embeddings_2D(embeddings, legend_title="label", context="paper_full")
draw.embeddings_2D(embeddings, legend_title="GroundTruth")
draw.embeddings_as_heatmap(embeddings)<jupyter_output><empty_output><jupyter_text>Interactive visualisation<jupyter_code>dashboard(embeddings, d)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.15515695067264573, 'fraction_numerical': 0.006278026905829596, 'mean_word_length': 8.378151260504202, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 17, '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': '4', 'dir': 'jupyter-structured-clean-dedup', 'id': '68124', 'license': 'Apache-2.0', 'n_tokens_mistral': 427, 'n_tokens_neox': 406, 'n_words': 51, 'path': 'examples/StepByStep.ipynb', 'repo_name': 'AlexWorldD/NetEmbs', 'size': '1115'}