--- license: apache-2.0 tags: - knowledge-graph - wiki-data - wikipedia language: - en pretty_name: GetNID — Neurofold Identity Registry v1.0 size_categories: - 1M dict: h = hashlib.sha256(qid.upper().encode()).hexdigest().upper() shard_id = int(h[:4], 16) % 8192 db_path = f"{shard_dir}/shard_{shard_id:04d}.db" with sqlite3.connect(db_path) as conn: row = conn.execute( "SELECT nid, qid, title, lang FROM ledger WHERE qid = ?", (qid.upper(),) ).fetchone() return dict(zip(["nid", "qid", "title", "lang"], row)) if row else None ``` ### JavaScript / Browser ```javascript const sha256 = async (text) => { const buf = await crypto.subtle.digest('SHA-256', new TextEncoder().encode(text)); return Array.from(new Uint8Array(buf)).map(b => b.toString(16).padStart(2,'0')).join('').toUpperCase(); }; async function resolveQID(qid) { const hash = await sha256(qid.toUpperCase()); const shardId = parseInt(hash.slice(0, 4), 16) % 8192; const fileName = `shard_${String(shardId).padStart(4,'0')}.db`; // Fetch shard, query with sql.js } ``` --- ## Metrics | Metric | Value | |---|---| | Minted NIDs | ~6.7M | | Languages | en (v1.0) | | Data shards | 8,192 | | Router shards | 256 | | Avg shard size | ~100 KB | | Total payload | ~1.5 GB | | Lookup complexity | O(1) | --- ## Licensing | Component | License | |---|---| | Registry code & protocol | [Apache 2.0](https://www.apache.org/licenses/LICENSE-2.0) | | Ledger data (derived from Wikidata) | [CC BY-SA 4.0](https://creativecommons.org/licenses/by-sa/4.0/) | Wikidata content is made available by the Wikimedia Foundation under CC BY-SA 4.0. Use of the registry data is subject to those upstream terms. --- ## Repository [github.com/neurofold/getnid](https://github.com/neurofold/getnid) --- ## Citation ```bibtex @misc{getnid2026, author = {Larson, JB}, title = {GetNID: Neurofold Identity Registry v1.0}, year = {2026}, url = {https://huggingface.co/datasets/Neurofold/getnid}, note = {Deterministic identifier registry for 6.7M Wikipedia concepts} } ```