<jupyter_start><jupyter_text>Visualization using the Graphviz Library**Goal:** Visualize all (or some) of the DAG defining the LSHTC3 data.Source: https://graphviz.readthedocs.io/en/stable/examples.html Load the Data<jupyter_code>with open("./data/hierarchyWikipediaMedium.txt", 'r') as edges:
    lines = []
    for line in edges.readlines():
        line = line.rstrip('\r\n')
        line = line.split(' ')
        lines.append(line)
    print(lines[0:100])
from graphviz import Graph
g = Graph('G', filename='process.gv', engine='sfdp')
for edge in lines[6000:6100]:
    g.edge(edge[0], edge[1])
g.view()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.1536050156739812, 'fraction_numerical': 0.023510971786833857, 'mean_word_length': 4.415254237288136, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 1, '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': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '666984', 'license': 'MIT', 'n_tokens_mistral': 236, 'n_tokens_neox': 224, 'n_words': 50, 'path': 'DAG_viz.ipynb', 'repo_name': 'djliden/LSHTC3_DAG', 'size': '638'}