Create README.md
Browse files
README.md
ADDED
|
@@ -0,0 +1,117 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: cc-by-4.0
|
| 3 |
+
pretty_name: ConceptNet 5 (Un-normalized SQLite, Full Archive)
|
| 4 |
+
multilinguality: multilingual
|
| 5 |
+
tags:
|
| 6 |
+
- conceptnet
|
| 7 |
+
- knowledge-graph
|
| 8 |
+
- sqlite
|
| 9 |
+
- un-normalized
|
| 10 |
+
- archival
|
| 11 |
+
- all-languages
|
| 12 |
+
---
|
| 13 |
+
|
| 14 |
+
# ConceptNet 5 (Un-normalized SQLite, 23.6 GB)
|
| 15 |
+
|
| 16 |
+
This repository contains the complete, un-normalized ConceptNet 5.5 knowledge graph in SQLite format. Unlike the filtered version, this dataset includes **all languages** from the original ConceptNet release.
|
| 17 |
+
|
| 18 |
+
The database `conceptnet-de-indexed.db` is a 23.6 GB un-normalized SQLite file containing the full knowledge graph with all 28.3 million nodes and 34 million edges across all languages.
|
| 19 |
+
|
| 20 |
+
## When to Use This Dataset
|
| 21 |
+
|
| 22 |
+
**Use this dataset if you:**
|
| 23 |
+
- Need access to **all languages** in ConceptNet (not just the 11 languages in the normalized version)
|
| 24 |
+
- Require the complete, unfiltered knowledge graph
|
| 25 |
+
- Are doing cross-linguistic research across many language pairs
|
| 26 |
+
- Need the original data structure for compatibility reasons
|
| 27 |
+
|
| 28 |
+
**Use the normalized version ([cstr/conceptnet-normalized-multi](https://huggingface.co/datasets/cstr/conceptnet-normalized-multi)) if you:**
|
| 29 |
+
- Only need 11 specific languages (en, fr, it, de, es, ar, fa, grc, he, la, hbo)
|
| 30 |
+
- Want faster query performance (normalized schema with integer keys)
|
| 31 |
+
- Need a smaller file size (~1.8 GB vs 23.6 GB)
|
| 32 |
+
- Prefer optimized, production-ready data
|
| 33 |
+
|
| 34 |
+
## Dataset Description
|
| 35 |
+
|
| 36 |
+
This repository contains the `conceptnet-de-indexed.db` file, a large (23.6 GB) SQLite database of the ConceptNet 5.5 knowledge graph.
|
| 37 |
+
|
| 38 |
+
- **Nodes**: The `node` table contains 28.3 million nodes from all ConceptNet languages.
|
| 39 |
+
- **Edges**: The `edge` table contains 34 million un-filtered edges.
|
| 40 |
+
- **Schema**: This database is un-normalized. The `edge` table stores full text URLs for its `start_id`, `end_id`, and `rel_id` columns, resulting in its large size and slower query performance compared to normalized alternatives.
|
| 41 |
+
- **Data Quality**: This database contains all original edges, including both high-quality assertions (e.g., `hund IsA raubtier`) and low-quality metadata (e.g., `hund IsA n`).
|
| 42 |
+
|
| 43 |
+
## Database Schema
|
| 44 |
+
|
| 45 |
+
### node (28.3M rows)
|
| 46 |
+
|
| 47 |
+
- `id` (VARCHAR): The full ConceptNet URL (e.g., `/c/en/dog/n`).
|
| 48 |
+
- `label` (VARCHAR): The human-readable label.
|
| 49 |
+
- `language` (VARCHAR): The language code (e.g., `en`, `de`).
|
| 50 |
+
- `sense_label` (VARCHAR): e.g., `n`, `v`.
|
| 51 |
+
- `term_id` (VARCHAR): The URL without the POS tag (e.g., `/c/en/dog`).
|
| 52 |
+
- ...and other metadata columns.
|
| 53 |
+
|
| 54 |
+
### relation (50 rows)
|
| 55 |
+
|
| 56 |
+
- `id` (VARCHAR): The relation URL (e.g., `/r/IsA`).
|
| 57 |
+
- `label` (VARCHAR): The relation name (e.g., `IsA`).
|
| 58 |
+
- `symmetric` (BOOLEAN): If the relation is symmetric.
|
| 59 |
+
|
| 60 |
+
### edge (34M rows)
|
| 61 |
+
|
| 62 |
+
- `id` (VARCHAR): The unique edge URL.
|
| 63 |
+
- `rel_id` (VARCHAR): Foreign key (as text URL) to `relation.id`.
|
| 64 |
+
- `start_id` (VARCHAR): Foreign key (as text URL) to `node.id`.
|
| 65 |
+
- `end_id` (VARCHAR): Foreign key (as text URL) to `node.id`.
|
| 66 |
+
- `weight` (FLOAT): The edge weight.
|
| 67 |
+
- ...and other metadata columns.
|
| 68 |
+
|
| 69 |
+
## Example Query
|
| 70 |
+
|
| 71 |
+
**Note**: Queries on this un-normalized database use text-based keys and may be slower than the normalized version.
|
| 72 |
+
|
| 73 |
+
```python
|
| 74 |
+
import sqlite3
|
| 75 |
+
import pandas as pd
|
| 76 |
+
|
| 77 |
+
DB_PATH = "conceptnet-de-indexed.db" # Or path from hf_hub_download
|
| 78 |
+
conn = sqlite3.connect(f"file:{DB_PATH}?mode=ro", uri=True)
|
| 79 |
+
|
| 80 |
+
query = """
|
| 81 |
+
SELECT
|
| 82 |
+
e.start_id,
|
| 83 |
+
e.end_id,
|
| 84 |
+
e.weight
|
| 85 |
+
FROM edge e
|
| 86 |
+
WHERE
|
| 87 |
+
e.start_id LIKE 'http://conceptnet.io/c/de/hund%'
|
| 88 |
+
AND e.rel_id = 'http://conceptnet.io/r/IsA'
|
| 89 |
+
ORDER BY e.weight DESC
|
| 90 |
+
LIMIT 10;
|
| 91 |
+
"""
|
| 92 |
+
|
| 93 |
+
df = pd.read_sql_query(query, conn)
|
| 94 |
+
print(df)
|
| 95 |
+
conn.close()
|
| 96 |
+
```
|
| 97 |
+
|
| 98 |
+
## Original Dataset Information
|
| 99 |
+
|
| 100 |
+
This work includes data from ConceptNet 5, which was compiled by the Commonsense Computing Initiative. ConceptNet 5 is freely available under the Creative Commons Attribution-ShareAlike license (CC BY SA 4.0) from http://conceptnet.io.
|
| 101 |
+
|
| 102 |
+
For a full list of licenses and attributions for included resources such as WordNet, Open Multilingual WordNet, and Wikimedia projects, please see the original dataset card.
|
| 103 |
+
|
| 104 |
+
## Citation Information
|
| 105 |
+
|
| 106 |
+
If you use this data in your work, please cite the original ConceptNet 5.5 paper:
|
| 107 |
+
|
| 108 |
+
```bibtex
|
| 109 |
+
@inproceedings{speer2017conceptnet,
|
| 110 |
+
author = {Robyn Speer and Joshua Chin and Catherine Havasi},
|
| 111 |
+
title = {ConceptNet 5.5: An Open Multilingual Graph of General Knowledge},
|
| 112 |
+
booktitle = {Proceedings of the AAAI Conference on Artificial Intelligence},
|
| 113 |
+
year = {2017},
|
| 114 |
+
pages = {4444--4451},
|
| 115 |
+
url = {http://aaai.org/ocs/index.php/AAAI/AAAI17/paper/view/14972}
|
| 116 |
+
}
|
| 117 |
+
```
|