Update entity database
Browse files- .gitattributes +2 -0
- README.md +107 -105
- entities-v6-lite.db +3 -0
- entities-v6.db +3 -0
- organizations_usearch_v6.bin +3 -0
- people_identity_usearch_v6.bin +3 -0
- people_identity_usearch_v6_shard0.bin +3 -0
- people_identity_usearch_v6_shard1.bin +3 -0
- people_identity_usearch_v6_shard2.bin +3 -0
- people_identity_usearch_v6_shard3.bin +3 -0
- people_identity_usearch_v6_shard4.bin +3 -0
- people_identity_usearch_v6_shard5.bin +3 -0
- people_identity_usearch_v6_shard6.bin +3 -0
- people_identity_usearch_v6_shards.json +48 -0
- people_usearch_v6.bin +3 -0
- people_usearch_v6_shard0.bin +3 -0
- people_usearch_v6_shard1.bin +3 -0
- people_usearch_v6_shard2.bin +3 -0
- people_usearch_v6_shard3.bin +3 -0
- people_usearch_v6_shards.json +30 -0
.gitattributes
CHANGED
|
@@ -62,3 +62,5 @@ entities-lite.db filter=lfs diff=lfs merge=lfs -text
|
|
| 62 |
entities.db filter=lfs diff=lfs merge=lfs -text
|
| 63 |
entities-v5-lite.db filter=lfs diff=lfs merge=lfs -text
|
| 64 |
entities-v5.db filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
| 62 |
entities.db filter=lfs diff=lfs merge=lfs -text
|
| 63 |
entities-v5-lite.db filter=lfs diff=lfs merge=lfs -text
|
| 64 |
entities-v5.db filter=lfs diff=lfs merge=lfs -text
|
| 65 |
+
entities-v6-lite.db filter=lfs diff=lfs merge=lfs -text
|
| 66 |
+
entities-v6.db filter=lfs diff=lfs merge=lfs -text
|
README.md
CHANGED
|
@@ -15,35 +15,36 @@ tags:
|
|
| 15 |
- vector-search
|
| 16 |
- embeddings
|
| 17 |
size_categories:
|
| 18 |
-
-
|
| 19 |
pretty_name: Entity References Database
|
| 20 |
configs:
|
| 21 |
- config_name: full
|
| 22 |
description: Full database with complete source metadata
|
| 23 |
- config_name: lite
|
| 24 |
-
description: Core fields
|
| 25 |
---
|
| 26 |
|
| 27 |
# Entity References Database
|
| 28 |
|
| 29 |
-
A comprehensive entity database for organizations, people, roles, and locations with
|
| 30 |
|
| 31 |
## Dataset Description
|
| 32 |
|
| 33 |
- **Repository:** [Corp-o-Rate-Community/entity-references](https://huggingface.co/datasets/Corp-o-Rate-Community/entity-references)
|
| 34 |
-
- **
|
| 35 |
- **Point of Contact:** Corp-o-Rate-Community
|
| 36 |
|
| 37 |
### Dataset Summary
|
| 38 |
|
| 39 |
-
This dataset provides fast lookup and qualification of named entities using vector similarity search. It stores records from authoritative global sources with embeddings generated by `google/embeddinggemma-300m` (768 dimensions).
|
| 40 |
|
| 41 |
**Key Features:**
|
| 42 |
-
- **
|
| 43 |
-
- **
|
| 44 |
-
- **
|
| 45 |
-
- **
|
| 46 |
- **Canonical linking** across sources (same entity from multiple sources linked)
|
|
|
|
| 47 |
|
| 48 |
### Supported Tasks
|
| 49 |
|
|
@@ -57,9 +58,9 @@ English (en)
|
|
| 57 |
|
| 58 |
## Dataset Structure
|
| 59 |
|
| 60 |
-
### Schema (
|
| 61 |
|
| 62 |
-
The database uses SQLite with
|
| 63 |
|
| 64 |
#### Organizations Table
|
| 65 |
|
|
@@ -68,7 +69,7 @@ The database uses SQLite with the [sqlite-vec](https://github.com/asg017/sqlite-
|
|
| 68 |
| `id` | INTEGER | Primary key |
|
| 69 |
| `qid` | INTEGER | Wikidata QID as integer (e.g., 2283 for Q2283) |
|
| 70 |
| `name` | TEXT | Organization name |
|
| 71 |
-
| `name_normalized` | TEXT |
|
| 72 |
| `source_id` | INTEGER FK | Reference to source_types |
|
| 73 |
| `source_identifier` | TEXT | LEI, CIK, Company Number, etc. |
|
| 74 |
| `region_id` | INTEGER FK | Reference to locations |
|
|
@@ -77,7 +78,7 @@ The database uses SQLite with the [sqlite-vec](https://github.com/asg017/sqlite-
|
|
| 77 |
| `to_date` | TEXT | Dissolution date (ISO format) |
|
| 78 |
| `canon_id` | INTEGER | ID of canonical record |
|
| 79 |
| `canon_size` | INTEGER | Size of canonical group |
|
| 80 |
-
| `record` | JSON | Full source record (
|
| 81 |
|
| 82 |
#### People Table
|
| 83 |
|
|
@@ -86,7 +87,7 @@ The database uses SQLite with the [sqlite-vec](https://github.com/asg017/sqlite-
|
|
| 86 |
| `id` | INTEGER | Primary key |
|
| 87 |
| `qid` | INTEGER | Wikidata QID as integer |
|
| 88 |
| `name` | TEXT | Display name |
|
| 89 |
-
| `name_normalized` | TEXT |
|
| 90 |
| `source_id` | INTEGER FK | Reference to source_types |
|
| 91 |
| `source_identifier` | TEXT | QID, Owner CIK, Person number |
|
| 92 |
| `country_id` | INTEGER FK | Reference to locations |
|
|
@@ -98,7 +99,9 @@ The database uses SQLite with the [sqlite-vec](https://github.com/asg017/sqlite-
|
|
| 98 |
| `to_date` | TEXT | Role end date (ISO format) |
|
| 99 |
| `birth_date` | TEXT | Date of birth (ISO format) |
|
| 100 |
| `death_date` | TEXT | Date of death (ISO format) |
|
| 101 |
-
| `
|
|
|
|
|
|
|
| 102 |
|
| 103 |
#### Roles Table
|
| 104 |
|
|
@@ -124,34 +127,46 @@ The database uses SQLite with the [sqlite-vec](https://github.com/asg017/sqlite-
|
|
| 124 |
| `parent_ids` | TEXT JSON | Parent location IDs in hierarchy |
|
| 125 |
| `location_type_id` | INTEGER FK | Reference to location_types |
|
| 126 |
|
| 127 |
-
####
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 128 |
|
| 129 |
| Table | Columns |
|
| 130 |
|-------|---------|
|
| 131 |
-
| `
|
| 132 |
-
| `organization_embeddings_scalar` | org_id INTEGER, embedding INT8[768] |
|
| 133 |
-
| `person_embeddings` | person_id INTEGER, embedding FLOAT[768] |
|
| 134 |
-
| `person_embeddings_scalar` | person_id INTEGER, embedding INT8[768] |
|
| 135 |
|
| 136 |
-
|
| 137 |
|
| 138 |
#### Enum Lookup Tables
|
| 139 |
|
| 140 |
| Table | Values |
|
| 141 |
|-------|--------|
|
| 142 |
-
| `source_types` | gleif, sec_edgar, companies_house, wikidata |
|
| 143 |
-
| `people_types` | executive, politician, government, military, legal, professional, academic, artist, media, athlete,
|
| 144 |
| `organization_types` | business, fund, branch, nonprofit, ngo, foundation, government, international_org, political_party, trade_union, educational, research, healthcare, media, sports, religious, unknown |
|
| 145 |
-
| `simplified_location_types` | continent, country, subdivision, city, district, other |
|
| 146 |
|
| 147 |
### Data Splits
|
| 148 |
|
| 149 |
-
| Config |
|
| 150 |
-
|--------|------
|
| 151 |
-
| `entities-lite.db` |
|
| 152 |
-
| `entities.db` |
|
|
|
|
|
|
|
|
|
|
| 153 |
|
| 154 |
-
The lite version is recommended for most use cases.
|
| 155 |
|
| 156 |
## Dataset Creation
|
| 157 |
|
|
@@ -161,25 +176,24 @@ The lite version is recommended for most use cases.
|
|
| 161 |
|
| 162 |
| Source | Records | Identifier | Coverage |
|
| 163 |
|--------|---------|------------|----------|
|
| 164 |
-
| [
|
| 165 |
-
| [
|
| 166 |
-
| [
|
| 167 |
-
| [
|
| 168 |
|
| 169 |
#### People
|
| 170 |
|
| 171 |
| Source | Records | Identifier | Coverage |
|
| 172 |
|--------|---------|------------|----------|
|
| 173 |
-
| [
|
| 174 |
-
| [
|
| 175 |
-
| [Companies House](https://www.gov.uk/government/organisations/companies-house) | ~15M+ | Person number | UK company officers |
|
| 176 |
|
| 177 |
### Embedding Model
|
| 178 |
|
| 179 |
| Property | Value |
|
| 180 |
|----------|-------|
|
| 181 |
| Model | `google/embeddinggemma-300m` |
|
| 182 |
-
| Dimensions | 768 |
|
| 183 |
| Framework | sentence-transformers |
|
| 184 |
| Size | ~300M parameters |
|
| 185 |
|
|
@@ -198,87 +212,81 @@ Records are linked across sources based on:
|
|
| 198 |
2. Same normalized name + same organization
|
| 199 |
3. Same normalized name + overlapping date ranges
|
| 200 |
|
| 201 |
-
**Source priority:**
|
| 202 |
|
| 203 |
## Usage
|
| 204 |
|
| 205 |
### Installation
|
| 206 |
|
| 207 |
```bash
|
| 208 |
-
pip install corp-
|
| 209 |
```
|
| 210 |
|
| 211 |
### Download
|
| 212 |
|
| 213 |
```bash
|
| 214 |
-
# Download lite version (recommended)
|
| 215 |
-
corp-
|
| 216 |
|
| 217 |
-
# Download full version
|
| 218 |
-
corp-
|
| 219 |
```
|
| 220 |
|
| 221 |
-
**Storage location:** `~/.cache/corp-extractor/entities-
|
| 222 |
|
| 223 |
### Search
|
| 224 |
|
| 225 |
```bash
|
| 226 |
# Search organizations
|
| 227 |
-
corp-
|
| 228 |
|
| 229 |
-
# Search people
|
| 230 |
-
corp-
|
| 231 |
|
| 232 |
# Search roles
|
| 233 |
-
corp-
|
| 234 |
|
| 235 |
# Search locations
|
| 236 |
-
corp-
|
| 237 |
|
| 238 |
# Check database status
|
| 239 |
-
corp-
|
| 240 |
```
|
| 241 |
|
| 242 |
### Python API
|
| 243 |
|
| 244 |
```python
|
| 245 |
-
from
|
| 246 |
|
| 247 |
# Search organizations
|
| 248 |
-
|
| 249 |
-
|
| 250 |
-
|
| 251 |
-
|
| 252 |
-
print(f"
|
| 253 |
-
|
| 254 |
-
# Search people
|
| 255 |
-
|
| 256 |
-
|
| 257 |
-
|
| 258 |
-
|
| 259 |
-
|
| 260 |
-
|
| 261 |
-
|
| 262 |
-
|
| 263 |
-
```python
|
| 264 |
-
from statement_extractor.pipeline import ExtractionPipeline
|
| 265 |
-
|
| 266 |
-
pipeline = ExtractionPipeline()
|
| 267 |
-
ctx = pipeline.process("Microsoft CEO Satya Nadella announced new AI features.")
|
| 268 |
-
|
| 269 |
-
for stmt in ctx.labeled_statements:
|
| 270 |
-
print(f"{stmt.subject_fqn} --[{stmt.statement.predicate}]--> {stmt.object_fqn}")
|
| 271 |
```
|
| 272 |
|
| 273 |
## Technical Details
|
| 274 |
|
| 275 |
### Vector Search Performance
|
| 276 |
|
|
|
|
|
|
|
| 277 |
| Database Size | Search Time | Memory |
|
| 278 |
|---------------|-------------|--------|
|
| 279 |
-
| 100K records |
|
| 280 |
-
| 1M records |
|
| 281 |
-
|
|
|
|
|
| 282 |
|
| 283 |
### Similarity Thresholds
|
| 284 |
|
|
@@ -289,51 +297,46 @@ for stmt in ctx.labeled_statements:
|
|
| 289 |
| 0.55 - 0.70 | Moderate match (may need verification) |
|
| 290 |
| < 0.55 | Weak match (likely different entity) |
|
| 291 |
|
| 292 |
-
### Canonical ID Format
|
| 293 |
-
|
| 294 |
-
| Source | Prefix | Example |
|
| 295 |
-
|--------|--------|---------|
|
| 296 |
-
| GLEIF | `LEI` | `LEI:INR2EJN1ERAN0W5ZP974` |
|
| 297 |
-
| SEC Edgar | `SEC-CIK` | `SEC-CIK:0000789019` |
|
| 298 |
-
| Companies House | `UK-CH` | `UK-CH:00445790` |
|
| 299 |
-
| Wikidata | `WIKIDATA` | `WIKIDATA:Q2283` |
|
| 300 |
-
|
| 301 |
## Building from Source
|
| 302 |
|
| 303 |
```bash
|
| 304 |
# Import data sources
|
| 305 |
-
corp-
|
| 306 |
-
corp-
|
| 307 |
-
corp-
|
| 308 |
-
corp-
|
| 309 |
-
corp-
|
| 310 |
|
| 311 |
-
#
|
| 312 |
-
corp-
|
| 313 |
|
| 314 |
-
#
|
| 315 |
-
corp-
|
| 316 |
|
| 317 |
# Create lite version for deployment
|
| 318 |
-
corp-
|
| 319 |
```
|
| 320 |
|
| 321 |
### Wikidata Dump Import (Recommended for Large Imports)
|
| 322 |
|
| 323 |
```bash
|
| 324 |
# Download and import from Wikidata dump (~100GB)
|
| 325 |
-
corp-
|
| 326 |
|
| 327 |
# Import only people
|
| 328 |
-
corp-
|
| 329 |
|
| 330 |
# Import only locations
|
| 331 |
-
corp-
|
|
|
|
| 332 |
|
| 333 |
-
|
| 334 |
-
|
|
|
|
| 335 |
```
|
| 336 |
|
|
|
|
|
|
|
| 337 |
## Considerations for Using the Data
|
| 338 |
|
| 339 |
### Social Impact
|
|
@@ -351,7 +354,6 @@ This dataset enables entity linking for NLP applications. Users should be aware
|
|
| 351 |
|
| 352 |
### Limitations
|
| 353 |
|
| 354 |
-
- The database does not automatically deduplicate across sources
|
| 355 |
- Embedding similarity is not perfect for entity disambiguation
|
| 356 |
- Updates require re-importing from source data
|
| 357 |
|
|
@@ -364,10 +366,10 @@ Apache 2.0
|
|
| 364 |
If you use this dataset, please cite:
|
| 365 |
|
| 366 |
```bibtex
|
| 367 |
-
@dataset{
|
| 368 |
title = {Entity References Database},
|
| 369 |
author = {Corp-o-Rate-Community},
|
| 370 |
-
year = {
|
| 371 |
publisher = {Hugging Face},
|
| 372 |
url = {https://huggingface.co/datasets/Corp-o-Rate-Community/entity-references}
|
| 373 |
}
|
|
@@ -379,4 +381,4 @@ Corp-o-Rate-Community
|
|
| 379 |
|
| 380 |
## Dataset Card Contact
|
| 381 |
|
| 382 |
-
Open an issue on the [GitHub repository](https://github.com/corp-o-rate/
|
|
|
|
| 15 |
- vector-search
|
| 16 |
- embeddings
|
| 17 |
size_categories:
|
| 18 |
+
- 10M<n<100M
|
| 19 |
pretty_name: Entity References Database
|
| 20 |
configs:
|
| 21 |
- config_name: full
|
| 22 |
description: Full database with complete source metadata
|
| 23 |
- config_name: lite
|
| 24 |
+
description: Core fields only, record content stripped (recommended)
|
| 25 |
---
|
| 26 |
|
| 27 |
# Entity References Database
|
| 28 |
|
| 29 |
+
A comprehensive entity database for organizations, people, roles, and locations with embedding-based semantic search. Built from authoritative sources (GLEIF, SEC, Companies House, Wikidata) for entity linking and named entity disambiguation.
|
| 30 |
|
| 31 |
## Dataset Description
|
| 32 |
|
| 33 |
- **Repository:** [Corp-o-Rate-Community/entity-references](https://huggingface.co/datasets/Corp-o-Rate-Community/entity-references)
|
| 34 |
+
- **Source Code:** [corp-o-rate/corp-entity-db](https://github.com/corp-o-rate/corp-entity-db)
|
| 35 |
- **Point of Contact:** Corp-o-Rate-Community
|
| 36 |
|
| 37 |
### Dataset Summary
|
| 38 |
|
| 39 |
+
This dataset provides fast lookup and qualification of named entities using vector similarity search. It stores records from authoritative global sources with embeddings generated by `google/embeddinggemma-300m` (768 dimensions), stored in USearch HNSW indexes for sub-millisecond approximate nearest neighbor search.
|
| 40 |
|
| 41 |
**Key Features:**
|
| 42 |
+
- **9.7M+ organization records** from GLEIF, SEC Edgar, Companies House, and Wikidata
|
| 43 |
+
- **63M+ people records** including executives, politicians, athletes, artists, and more
|
| 44 |
+
- **139K+ roles** and **25K+ locations** with hierarchical relationships
|
| 45 |
+
- **USearch HNSW indexes** for sub-millisecond vector search (embeddings never stored in SQLite)
|
| 46 |
- **Canonical linking** across sources (same entity from multiple sources linked)
|
| 47 |
+
- **Three-tier people search** achieving 100% acc@1 on 280 queries across 12 person types
|
| 48 |
|
| 49 |
### Supported Tasks
|
| 50 |
|
|
|
|
| 58 |
|
| 59 |
## Dataset Structure
|
| 60 |
|
| 61 |
+
### Schema (v5)
|
| 62 |
|
| 63 |
+
The database uses SQLite with normalized FK references (INTEGER FKs replace TEXT enums). All embeddings exist only in USearch HNSW indexes, never in SQLite.
|
| 64 |
|
| 65 |
#### Organizations Table
|
| 66 |
|
|
|
|
| 69 |
| `id` | INTEGER | Primary key |
|
| 70 |
| `qid` | INTEGER | Wikidata QID as integer (e.g., 2283 for Q2283) |
|
| 71 |
| `name` | TEXT | Organization name |
|
| 72 |
+
| `name_normalized` | TEXT | Normalized name (via corp-names) |
|
| 73 |
| `source_id` | INTEGER FK | Reference to source_types |
|
| 74 |
| `source_identifier` | TEXT | LEI, CIK, Company Number, etc. |
|
| 75 |
| `region_id` | INTEGER FK | Reference to locations |
|
|
|
|
| 78 |
| `to_date` | TEXT | Dissolution date (ISO format) |
|
| 79 |
| `canon_id` | INTEGER | ID of canonical record |
|
| 80 |
| `canon_size` | INTEGER | Size of canonical group |
|
| 81 |
+
| `record` | JSON | Full source record (stripped in lite) |
|
| 82 |
|
| 83 |
#### People Table
|
| 84 |
|
|
|
|
| 87 |
| `id` | INTEGER | Primary key |
|
| 88 |
| `qid` | INTEGER | Wikidata QID as integer |
|
| 89 |
| `name` | TEXT | Display name |
|
| 90 |
+
| `name_normalized` | TEXT | Normalized name (via corp-names) |
|
| 91 |
| `source_id` | INTEGER FK | Reference to source_types |
|
| 92 |
| `source_identifier` | TEXT | QID, Owner CIK, Person number |
|
| 93 |
| `country_id` | INTEGER FK | Reference to locations |
|
|
|
|
| 99 |
| `to_date` | TEXT | Role end date (ISO format) |
|
| 100 |
| `birth_date` | TEXT | Date of birth (ISO format) |
|
| 101 |
| `death_date` | TEXT | Date of death (ISO format) |
|
| 102 |
+
| `canon_id` | INTEGER | ID of canonical record |
|
| 103 |
+
| `canon_size` | INTEGER | Size of canonical group |
|
| 104 |
+
| `record` | JSON | Full source record (stripped in lite) |
|
| 105 |
|
| 106 |
#### Roles Table
|
| 107 |
|
|
|
|
| 127 |
| `parent_ids` | TEXT JSON | Parent location IDs in hierarchy |
|
| 128 |
| `location_type_id` | INTEGER FK | Reference to location_types |
|
| 129 |
|
| 130 |
+
#### USearch HNSW Indexes
|
| 131 |
+
|
| 132 |
+
All embeddings are generated on-the-fly during index building and stored only in versioned USearch HNSW index files:
|
| 133 |
+
|
| 134 |
+
| File | Dimensions | Description |
|
| 135 |
+
|------|-----------|-------------|
|
| 136 |
+
| `organizations_usearch_v5.bin` | 768 | Organization embeddings |
|
| 137 |
+
| `people_usearch_v5.bin` | 768 | Composite person embeddings (name\|role\|org as 3×256-dim segments) |
|
| 138 |
+
| `people_identity_usearch_v5.bin` | 256 | Name-only person embeddings (Matryoshka-truncated) |
|
| 139 |
+
|
| 140 |
+
The composite people index only includes people with org associations. Name, role, and org are embedded separately, independently L2-normalized, weighted (name=8, role=1, org=4), and concatenated into a 768-dim vector for AND-style matching.
|
| 141 |
+
|
| 142 |
+
#### Metadata Table
|
| 143 |
|
| 144 |
| Table | Columns |
|
| 145 |
|-------|---------|
|
| 146 |
+
| `db_info` | key TEXT PRIMARY KEY, value TEXT NOT NULL |
|
|
|
|
|
|
|
|
|
|
| 147 |
|
| 148 |
+
Contains `schema_version = 5` for version detection.
|
| 149 |
|
| 150 |
#### Enum Lookup Tables
|
| 151 |
|
| 152 |
| Table | Values |
|
| 153 |
|-------|--------|
|
| 154 |
+
| `source_types` | gleif, sec_edgar, companies_house, wikidata, pycountry |
|
| 155 |
+
| `people_types` | executive, politician, government, military, legal, professional, academic, artist, media, athlete, journalist, activist, unknown |
|
| 156 |
| `organization_types` | business, fund, branch, nonprofit, ngo, foundation, government, international_org, political_party, trade_union, educational, research, healthcare, media, sports, religious, unknown |
|
| 157 |
+
| `simplified_location_types` | continent, country, subdivision, city, district, historic, other |
|
| 158 |
|
| 159 |
### Data Splits
|
| 160 |
|
| 161 |
+
| Config | Contents |
|
| 162 |
+
|--------|----------|
|
| 163 |
+
| `entities-v5-lite.db` | Core fields, record content stripped, `name_normalized` kept |
|
| 164 |
+
| `entities-v5.db` | Full records with source metadata |
|
| 165 |
+
| `organizations_usearch_v5.bin` | USearch HNSW index for organization search |
|
| 166 |
+
| `people_usearch_v5.bin` | Composite USearch HNSW index for people search |
|
| 167 |
+
| `people_identity_usearch_v5.bin` | Identity USearch HNSW index for people name-only search |
|
| 168 |
|
| 169 |
+
The lite version + USearch indexes is recommended for most use cases.
|
| 170 |
|
| 171 |
## Dataset Creation
|
| 172 |
|
|
|
|
| 176 |
|
| 177 |
| Source | Records | Identifier | Coverage |
|
| 178 |
|--------|---------|------------|----------|
|
| 179 |
+
| [Companies House](https://www.gov.uk/government/organisations/companies-house) | 5.5M | Company Number | UK registered companies |
|
| 180 |
+
| [GLEIF](https://www.gleif.org/) | 2.6M | LEI (Legal Entity Identifier) | Global companies with LEI |
|
| 181 |
+
| [Wikidata](https://www.wikidata.org/) | 1.5M | QID | Notable companies worldwide |
|
| 182 |
+
| [SEC Edgar](https://www.sec.gov/) | 73K | CIK (Central Index Key) | All SEC filers |
|
| 183 |
|
| 184 |
#### People
|
| 185 |
|
| 186 |
| Source | Records | Identifier | Coverage |
|
| 187 |
|--------|---------|------------|----------|
|
| 188 |
+
| [Companies House](https://www.gov.uk/government/organisations/companies-house) | 27.5M | Person number | UK company officers |
|
| 189 |
+
| [Wikidata](https://www.wikidata.org/) | 36M | QID | Notable people with English Wikipedia |
|
|
|
|
| 190 |
|
| 191 |
### Embedding Model
|
| 192 |
|
| 193 |
| Property | Value |
|
| 194 |
|----------|-------|
|
| 195 |
| Model | `google/embeddinggemma-300m` |
|
| 196 |
+
| Dimensions | 768 (256 with Matryoshka truncation) |
|
| 197 |
| Framework | sentence-transformers |
|
| 198 |
| Size | ~300M parameters |
|
| 199 |
|
|
|
|
| 212 |
2. Same normalized name + same organization
|
| 213 |
3. Same normalized name + overlapping date ranges
|
| 214 |
|
| 215 |
+
**Source priority:** wikidata > sec_edgar > companies_house
|
| 216 |
|
| 217 |
## Usage
|
| 218 |
|
| 219 |
### Installation
|
| 220 |
|
| 221 |
```bash
|
| 222 |
+
pip install corp-entity-db
|
| 223 |
```
|
| 224 |
|
| 225 |
### Download
|
| 226 |
|
| 227 |
```bash
|
| 228 |
+
# Download lite version + USearch indexes (recommended)
|
| 229 |
+
corp-entity-db download
|
| 230 |
|
| 231 |
+
# Download full version + USearch indexes
|
| 232 |
+
corp-entity-db download --full
|
| 233 |
```
|
| 234 |
|
| 235 |
+
**Storage location:** `~/.cache/corp-extractor/entities-v5.db` (or `entities-v5-lite.db` for lite)
|
| 236 |
|
| 237 |
### Search
|
| 238 |
|
| 239 |
```bash
|
| 240 |
# Search organizations
|
| 241 |
+
corp-entity-db search "Microsoft"
|
| 242 |
|
| 243 |
+
# Search people (composite embedding + name fallback + identity fallback)
|
| 244 |
+
corp-entity-db search-people "Tim Cook" --role CEO --org Apple
|
| 245 |
|
| 246 |
# Search roles
|
| 247 |
+
corp-entity-db search-roles "CEO"
|
| 248 |
|
| 249 |
# Search locations
|
| 250 |
+
corp-entity-db search-locations "California"
|
| 251 |
|
| 252 |
# Check database status
|
| 253 |
+
corp-entity-db status
|
| 254 |
```
|
| 255 |
|
| 256 |
### Python API
|
| 257 |
|
| 258 |
```python
|
| 259 |
+
from corp_entity_db import OrganizationDatabase, CompanyEmbedder, get_database_path
|
| 260 |
|
| 261 |
# Search organizations
|
| 262 |
+
db = OrganizationDatabase(get_database_path())
|
| 263 |
+
embedder = CompanyEmbedder()
|
| 264 |
+
matches = db.search(embedder.embed("Microsoft"), top_k=10)
|
| 265 |
+
for record, score in matches:
|
| 266 |
+
print(f"{record.name} ({record.entity_type}) - score: {score:.3f}")
|
| 267 |
+
|
| 268 |
+
# Search people (composite embeddings + name fallback + identity fallback)
|
| 269 |
+
from corp_entity_db import PersonDatabase, get_person_database
|
| 270 |
+
person_db = get_person_database()
|
| 271 |
+
query_emb = embedder.embed_composite_person("Tim Cook", role="CEO", org="Apple")
|
| 272 |
+
matches = person_db.search(
|
| 273 |
+
query_emb, top_k=5, query_name="Tim Cook",
|
| 274 |
+
embedder=embedder, query_role="CEO", query_org="Apple",
|
| 275 |
+
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 276 |
```
|
| 277 |
|
| 278 |
## Technical Details
|
| 279 |
|
| 280 |
### Vector Search Performance
|
| 281 |
|
| 282 |
+
Using USearch HNSW indexes with int8 quantization:
|
| 283 |
+
|
| 284 |
| Database Size | Search Time | Memory |
|
| 285 |
|---------------|-------------|--------|
|
| 286 |
+
| 100K records | <1ms | ~200MB |
|
| 287 |
+
| 1M records | <5ms | ~1GB |
|
| 288 |
+
| 10M records | <10ms | ~8GB |
|
| 289 |
+
| 50M records | <20ms | ~40GB |
|
| 290 |
|
| 291 |
### Similarity Thresholds
|
| 292 |
|
|
|
|
| 297 |
| 0.55 - 0.70 | Moderate match (may need verification) |
|
| 298 |
| < 0.55 | Weak match (likely different entity) |
|
| 299 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 300 |
## Building from Source
|
| 301 |
|
| 302 |
```bash
|
| 303 |
# Import data sources
|
| 304 |
+
corp-entity-db import-gleif --download
|
| 305 |
+
corp-entity-db import-sec --download
|
| 306 |
+
corp-entity-db import-companies-house
|
| 307 |
+
corp-entity-db import-people --all
|
| 308 |
+
corp-entity-db import-wikidata-dump --download --limit 50000
|
| 309 |
|
| 310 |
+
# Post-import: build USearch indexes, VACUUM
|
| 311 |
+
corp-entity-db post-import
|
| 312 |
|
| 313 |
+
# Link equivalent records
|
| 314 |
+
corp-entity-db canonicalize
|
| 315 |
|
| 316 |
# Create lite version for deployment
|
| 317 |
+
corp-entity-db create-lite ~/.cache/corp-extractor/entities-v5.db
|
| 318 |
```
|
| 319 |
|
| 320 |
### Wikidata Dump Import (Recommended for Large Imports)
|
| 321 |
|
| 322 |
```bash
|
| 323 |
# Download and import from Wikidata dump (~100GB)
|
| 324 |
+
corp-entity-db import-wikidata-dump --download --limit 50000
|
| 325 |
|
| 326 |
# Import only people
|
| 327 |
+
corp-entity-db import-wikidata-dump --download --people --no-orgs
|
| 328 |
|
| 329 |
# Import only locations
|
| 330 |
+
corp-entity-db import-wikidata-dump --dump dump.json.bz2 --locations --no-people --no-orgs
|
| 331 |
+
```
|
| 332 |
|
| 333 |
+
**Build extras** (optional):
|
| 334 |
+
```bash
|
| 335 |
+
pip install "corp-entity-db[build]" # Adds orjson + indexed_bzip2
|
| 336 |
```
|
| 337 |
|
| 338 |
+
The dump import uses a 3-thread parallel pipeline (reader → embedder → writer) and creates multiple records per person (one per position+org combination). Canonicalization runs automatically at the end. Supports `.bz2`, `.zst`, and `.gz` compressed dumps.
|
| 339 |
+
|
| 340 |
## Considerations for Using the Data
|
| 341 |
|
| 342 |
### Social Impact
|
|
|
|
| 354 |
|
| 355 |
### Limitations
|
| 356 |
|
|
|
|
| 357 |
- Embedding similarity is not perfect for entity disambiguation
|
| 358 |
- Updates require re-importing from source data
|
| 359 |
|
|
|
|
| 366 |
If you use this dataset, please cite:
|
| 367 |
|
| 368 |
```bibtex
|
| 369 |
+
@dataset{entity_references_2025,
|
| 370 |
title = {Entity References Database},
|
| 371 |
author = {Corp-o-Rate-Community},
|
| 372 |
+
year = {2025},
|
| 373 |
publisher = {Hugging Face},
|
| 374 |
url = {https://huggingface.co/datasets/Corp-o-Rate-Community/entity-references}
|
| 375 |
}
|
|
|
|
| 381 |
|
| 382 |
## Dataset Card Contact
|
| 383 |
|
| 384 |
+
Open an issue on the [GitHub repository](https://github.com/corp-o-rate/corp-entity-db) for questions or feedback.
|
entities-v6-lite.db
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:2c0aab89347cb3dda79997f17997f1192ede4ade17f85c32cab1b470ca9cc670
|
| 3 |
+
size 23461195776
|
entities-v6.db
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:43a2da726faa38d856c4cbc511756d4cb9cc06f5046cf95e685dade64bf1641a
|
| 3 |
+
size 42025447424
|
organizations_usearch_v6.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:3af1c286b7fd2366f968f138cf43117a2bc821a9da37944d3957f0c5b6c47a06
|
| 3 |
+
size 23213862512
|
people_identity_usearch_v6.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e0d9a09fa2e4c63e0c7eabc099c81434f26e30dc894f2efcbc662968a770f9f9
|
| 3 |
+
size 29556523768
|
people_identity_usearch_v6_shard0.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a74369f42a0daa0000de9600d296a3fad2d108f421b0250bfdc3b039afa70599
|
| 3 |
+
size 1596875392
|
people_identity_usearch_v6_shard1.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:7b954fa9c459d89fea515da4b2d10eaec58f11c7474142c36de416f75d400347
|
| 3 |
+
size 5322245392
|
people_identity_usearch_v6_shard2.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:0045e30735ae5c11fe3a81170109ff817fcc6ed8c733daff933fa4139bfd7556
|
| 3 |
+
size 5322245392
|
people_identity_usearch_v6_shard3.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:f0c1641b8d0777cd2882e7b5ff995ab1739949bb7d7f776c698d67686a50cc31
|
| 3 |
+
size 5322245392
|
people_identity_usearch_v6_shard4.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:136d846c4b7469aab7940d4b291336525cd4da7006c376234784c4bca48b658d
|
| 3 |
+
size 5322245392
|
people_identity_usearch_v6_shard5.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d3fac3f7128d7be25aa910d2522547da4deffc58cb5da8b6f332eb492e9c7e41
|
| 3 |
+
size 5322245392
|
people_identity_usearch_v6_shard6.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:84e65c2d77e72597df71e4eb4f7e88a146841a481553726e67982189575680a6
|
| 3 |
+
size 1888546552
|
people_identity_usearch_v6_shards.json
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"version": 1,
|
| 3 |
+
"total_vectors": 56548100,
|
| 4 |
+
"shards": [
|
| 5 |
+
{
|
| 6 |
+
"index": 0,
|
| 7 |
+
"filename": "people_identity_usearch_v6_shard0.bin",
|
| 8 |
+
"count": 3000000,
|
| 9 |
+
"hot": true
|
| 10 |
+
},
|
| 11 |
+
{
|
| 12 |
+
"index": 1,
|
| 13 |
+
"filename": "people_identity_usearch_v6_shard1.bin",
|
| 14 |
+
"count": 10000000,
|
| 15 |
+
"hot": false
|
| 16 |
+
},
|
| 17 |
+
{
|
| 18 |
+
"index": 2,
|
| 19 |
+
"filename": "people_identity_usearch_v6_shard2.bin",
|
| 20 |
+
"count": 10000000,
|
| 21 |
+
"hot": false
|
| 22 |
+
},
|
| 23 |
+
{
|
| 24 |
+
"index": 3,
|
| 25 |
+
"filename": "people_identity_usearch_v6_shard3.bin",
|
| 26 |
+
"count": 10000000,
|
| 27 |
+
"hot": false
|
| 28 |
+
},
|
| 29 |
+
{
|
| 30 |
+
"index": 4,
|
| 31 |
+
"filename": "people_identity_usearch_v6_shard4.bin",
|
| 32 |
+
"count": 10000000,
|
| 33 |
+
"hot": false
|
| 34 |
+
},
|
| 35 |
+
{
|
| 36 |
+
"index": 5,
|
| 37 |
+
"filename": "people_identity_usearch_v6_shard5.bin",
|
| 38 |
+
"count": 10000000,
|
| 39 |
+
"hot": false
|
| 40 |
+
},
|
| 41 |
+
{
|
| 42 |
+
"index": 6,
|
| 43 |
+
"filename": "people_identity_usearch_v6_shard6.bin",
|
| 44 |
+
"count": 3548100,
|
| 45 |
+
"hot": false
|
| 46 |
+
}
|
| 47 |
+
]
|
| 48 |
+
}
|
people_usearch_v6.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:5263087d9a40f06dc2bbb2fd8f71411638d4814415b2a0cb50d932a1f73f4fcc
|
| 3 |
+
size 29522238912
|
people_usearch_v6_shard0.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:812dd8185fc957ac8e403edbca5c94ba54701865b9565fbf8172d5cef070ac4f
|
| 3 |
+
size 3132875392
|
people_usearch_v6_shard1.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:f5e44abc7caa80b67d9ae1635d3bada6a0b6be9fa5376cfeb264d8634ded0d85
|
| 3 |
+
size 10442245392
|
people_usearch_v6_shard2.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a76e9eb8a4608ef205560b37c596c0acf1a758c92b292ecfe12b9d13b3704910
|
| 3 |
+
size 10442245392
|
people_usearch_v6_shard3.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:c8f8031229856125fe1ff5d9a84cc96776220db77e379ebc45c9a1747850f609
|
| 3 |
+
size 6529995832
|
people_usearch_v6_shards.json
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"version": 1,
|
| 3 |
+
"total_vectors": 29253380,
|
| 4 |
+
"shards": [
|
| 5 |
+
{
|
| 6 |
+
"index": 0,
|
| 7 |
+
"filename": "people_usearch_v6_shard0.bin",
|
| 8 |
+
"count": 3000000,
|
| 9 |
+
"hot": true
|
| 10 |
+
},
|
| 11 |
+
{
|
| 12 |
+
"index": 1,
|
| 13 |
+
"filename": "people_usearch_v6_shard1.bin",
|
| 14 |
+
"count": 10000000,
|
| 15 |
+
"hot": false
|
| 16 |
+
},
|
| 17 |
+
{
|
| 18 |
+
"index": 2,
|
| 19 |
+
"filename": "people_usearch_v6_shard2.bin",
|
| 20 |
+
"count": 10000000,
|
| 21 |
+
"hot": false
|
| 22 |
+
},
|
| 23 |
+
{
|
| 24 |
+
"index": 3,
|
| 25 |
+
"filename": "people_usearch_v6_shard3.bin",
|
| 26 |
+
"count": 6253380,
|
| 27 |
+
"hot": false
|
| 28 |
+
}
|
| 29 |
+
]
|
| 30 |
+
}
|