# nicoloferretti/patent-similarity architecture

> Architecture diagram of the GitHub repository nicoloferretti/patent-similarity, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-01). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/nicoloferretti/patent-similarity
- Repository: https://github.com/nicoloferretti/patent-similarity

## Overview

This repository contains a small historical patent-network viewer, not a complete patent-similarity pipeline. Its sampled script loads a serialized graph and displays it in a Dash/Cytoscape interface; clicking a node shows its label. The README gives no further capability details, and the notebooks and graph-generation process were not sampled, so they are not mapped.

Main entry points: [`historical_codes/w2v_stringdist_dash_cyto.py`](https://github.com/nicoloferretti/patent-similarity/blob/master/historical_codes/w2v_stringdist_dash_cyto.py) (Network View), [`historical_codes/data_network.p`](https://github.com/nicoloferretti/patent-similarity/blob/master/historical_codes/data_network.p) (Serialized Network)

## Diagram (Mermaid)

```mermaid
flowchart TD

node_user(("Viewer"))
node_network["Serialized Network<br/>[data_network.p]"]
node_loader["Network Loader"]
node_graph["Network View"]
node_tap["Tap Callback"]

node_loader -->|"loads graph"| node_network
node_loader -->|"supplies elements"| node_graph
node_user -->|"views network"| node_graph
node_graph -->|"dispatches taps"| node_tap
node_user -->|"selects node"| node_tap

click node_network "https://github.com/nicoloferretti/patent-similarity/blob/master/historical_codes/data_network.p"
click node_loader "https://github.com/nicoloferretti/patent-similarity/blob/master/historical_codes/w2v_stringdist_dash_cyto.py"
click node_graph "https://github.com/nicoloferretti/patent-similarity/blob/master/historical_codes/w2v_stringdist_dash_cyto.py"
click node_tap "https://github.com/nicoloferretti/patent-similarity/blob/master/historical_codes/w2v_stringdist_dash_cyto.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_user,node_graph toneBlue
class node_network,node_loader,node_tap toneTeal
```

## Components

### Other components

- **Viewer**
- [Serialized Network](https://github.com/nicoloferretti/patent-similarity/blob/master/historical_codes/data_network.p): `historical_codes/data_network.p`
- [Network Loader](https://github.com/nicoloferretti/patent-similarity/blob/master/historical_codes/w2v_stringdist_dash_cyto.py): `historical_codes/w2v_stringdist_dash_cyto.py`
- [Network View](https://github.com/nicoloferretti/patent-similarity/blob/master/historical_codes/w2v_stringdist_dash_cyto.py): `historical_codes/w2v_stringdist_dash_cyto.py`
- [Tap Callback](https://github.com/nicoloferretti/patent-similarity/blob/master/historical_codes/w2v_stringdist_dash_cyto.py): `historical_codes/w2v_stringdist_dash_cyto.py`

## Connections

- Network Loader → Serialized Network: loads graph (evidence: `historical_codes/w2v_stringdist_dash_cyto.py`)
- Network Loader → Network View: supplies elements (evidence: `historical_codes/w2v_stringdist_dash_cyto.py`)
- Viewer → Network View: views network (evidence: `historical_codes/w2v_stringdist_dash_cyto.py`)
- Network View → Tap Callback: dispatches taps (evidence: `historical_codes/w2v_stringdist_dash_cyto.py`)
- Viewer → Tap Callback: selects node (evidence: `historical_codes/w2v_stringdist_dash_cyto.py`)
