|
|
--- |
|
|
license: cc-by-4.0 |
|
|
pretty_name: ConceptNet 5 (Un-normalized SQLite, Full Archive) |
|
|
multilinguality: multilingual |
|
|
tags: |
|
|
- conceptnet |
|
|
- knowledge-graph |
|
|
- sqlite |
|
|
- un-normalized |
|
|
- archival |
|
|
- all-languages |
|
|
--- |
|
|
|
|
|
# ConceptNet 5 (Un-normalized SQLite, 23.6 GB) |
|
|
|
|
|
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. |
|
|
|
|
|
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. |
|
|
|
|
|
## When to Use This Dataset |
|
|
|
|
|
**Use this dataset if you:** |
|
|
- Need access to **all languages** in ConceptNet (not just the 11 languages in the normalized version) |
|
|
- Require the complete, unfiltered knowledge graph |
|
|
- Are doing cross-linguistic research across many language pairs |
|
|
- Need the original data structure for compatibility reasons |
|
|
|
|
|
**Use the normalized version ([cstr/conceptnet-normalized-multi](https://huggingface.co/datasets/cstr/conceptnet-normalized-multi)) if you:** |
|
|
- Only need 11 specific languages (en, fr, it, de, es, ar, fa, grc, he, la, hbo) |
|
|
- Want faster query performance (normalized schema with integer keys) |
|
|
- Need a smaller file size (~1.8 GB vs 23.6 GB) |
|
|
- Prefer optimized, production-ready data |
|
|
|
|
|
## Dataset Description |
|
|
|
|
|
This repository contains the `conceptnet-de-indexed.db` file, a large (23.6 GB) SQLite database of the ConceptNet 5.5 knowledge graph. |
|
|
|
|
|
- **Nodes**: The `node` table contains 28.3 million nodes from all ConceptNet languages. |
|
|
- **Edges**: The `edge` table contains 34 million un-filtered edges. |
|
|
- **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. |
|
|
- **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`). |
|
|
|
|
|
## Database Schema |
|
|
|
|
|
### node (28.3M rows) |
|
|
|
|
|
- `id` (VARCHAR): The full ConceptNet URL (e.g., `/c/en/dog/n`). |
|
|
- `label` (VARCHAR): The human-readable label. |
|
|
- `language` (VARCHAR): The language code (e.g., `en`, `de`). |
|
|
- `sense_label` (VARCHAR): e.g., `n`, `v`. |
|
|
- `term_id` (VARCHAR): The URL without the POS tag (e.g., `/c/en/dog`). |
|
|
- ...and other metadata columns. |
|
|
|
|
|
### relation (50 rows) |
|
|
|
|
|
- `id` (VARCHAR): The relation URL (e.g., `/r/IsA`). |
|
|
- `label` (VARCHAR): The relation name (e.g., `IsA`). |
|
|
- `symmetric` (BOOLEAN): If the relation is symmetric. |
|
|
|
|
|
### edge (34M rows) |
|
|
|
|
|
- `id` (VARCHAR): The unique edge URL. |
|
|
- `rel_id` (VARCHAR): Foreign key (as text URL) to `relation.id`. |
|
|
- `start_id` (VARCHAR): Foreign key (as text URL) to `node.id`. |
|
|
- `end_id` (VARCHAR): Foreign key (as text URL) to `node.id`. |
|
|
- `weight` (FLOAT): The edge weight. |
|
|
- ...and other metadata columns. |
|
|
|
|
|
## Example Query |
|
|
|
|
|
**Note**: Queries on this un-normalized database use text-based keys and may be slower than the normalized version. |
|
|
|
|
|
```python |
|
|
import sqlite3 |
|
|
import pandas as pd |
|
|
|
|
|
DB_PATH = "conceptnet-de-indexed.db" # Or path from hf_hub_download |
|
|
conn = sqlite3.connect(f"file:{DB_PATH}?mode=ro", uri=True) |
|
|
|
|
|
query = """ |
|
|
SELECT |
|
|
e.start_id, |
|
|
e.end_id, |
|
|
e.weight |
|
|
FROM edge e |
|
|
WHERE |
|
|
e.start_id LIKE 'http://conceptnet.io/c/de/hund%' |
|
|
AND e.rel_id = 'http://conceptnet.io/r/IsA' |
|
|
ORDER BY e.weight DESC |
|
|
LIMIT 10; |
|
|
""" |
|
|
|
|
|
df = pd.read_sql_query(query, conn) |
|
|
print(df) |
|
|
conn.close() |
|
|
``` |
|
|
|
|
|
## Original Dataset Information |
|
|
|
|
|
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. |
|
|
|
|
|
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. |
|
|
|
|
|
## Citation Information |
|
|
|
|
|
If you use this data in your work, please cite the original ConceptNet 5.5 paper: |
|
|
|
|
|
```bibtex |
|
|
@inproceedings{speer2017conceptnet, |
|
|
author = {Robyn Speer and Joshua Chin and Catherine Havasi}, |
|
|
title = {ConceptNet 5.5: An Open Multilingual Graph of General Knowledge}, |
|
|
booktitle = {Proceedings of the AAAI Conference on Artificial Intelligence}, |
|
|
year = {2017}, |
|
|
pages = {4444--4451}, |
|
|
url = {http://aaai.org/ocs/index.php/AAAI/AAAI17/paper/view/14972} |
|
|
} |
|
|
``` |