Datasets:
lc_001 stringlengths 2 8 | lccn stringlengths 1 27 ⌀ | title stringlengths 1 1.52k | creator stringlengths 1 389 ⌀ | lcc_code stringlengths 2 74 | lcc_class stringclasses 2
values | embedding listlengths 1.02k 1.02k |
|---|---|---|---|---|---|---|
10000035 | unk80000383 | About the Ford Foundation | Ford Foundation | AS911.F6 | A | [
-0.031320348381996155,
0.02471798285841942,
0.020073136314749718,
-0.058663345873355865,
0.03798374906182289,
0.03091716207563877,
-0.014311081729829311,
-0.004600977059453726,
-0.0015467626508325338,
-0.04259759187698364,
0.03226299211382866,
0.04031697288155556,
0.043699588626623154,
-0.... |
10000077 | unk80000963 | The Act and Testimony of the minority of the General assembly and others | Presbyterian church in the United States of America. General assembly | AC901 | A | [
-0.04038355126976967,
0.030275005847215652,
0.02682461217045784,
0.010567317716777325,
-0.018152067437767982,
0.012231061235070229,
0.007506824564188719,
-0.0007928822888061404,
-0.02553114853799343,
-0.03303961083292961,
-0.020125972107052803,
0.05265821889042854,
-0.01794247515499592,
-0... |
10000405 | 2005205224 | Almanach français des Etats-Unis, pour l'année : à l'usage des populations françaises de l'Amérique du nord | American Almanac Collection (Library of Congress) | AY256.N5 | A | [
-0.061271797865629196,
0.0077402894385159016,
0.013583785854279995,
-0.007917521521449089,
-0.020080210641026497,
-0.02176280878484249,
-0.006839863024652004,
-0.03621219843626022,
0.01715249940752983,
-0.0039300029166042805,
-0.008867213502526283,
0.03325776010751724,
-0.01526601705700159,
... |
10000125 | unk80002543 | Actes de la IVe Quinzaine internationale.. | Union des associations internationales, Brussels | AS4 | A | [
-0.03595840185880661,
-0.003208764363080263,
-0.01617838814854622,
0.06612098962068558,
-0.0031543546356260777,
0.017499523237347603,
-0.030252844095230103,
-0.018725724890828133,
-0.039038531482219696,
0.01322548370808363,
-0.004185439087450504,
0.0005492438212968409,
0.035784874111413956,
... |
10000180 | unk80003403 | Address delivered before the alumni of Bowdoin college | Daveis, Charles Stewart, 1788-1865 | AC901 | A | [
-0.03911725804209709,
0.005855103489011526,
-0.007012082263827324,
0.010749162174761295,
0.0005345153622329235,
0.017573731020092964,
0.02575116790831089,
0.029994942247867584,
-0.003386932425200939,
-0.008986853994429111,
0.014975115656852722,
0.033249516040086746,
0.04160603508353233,
0.... |
10000409 | 00204771 | An almanack, for the year ... : containing ... abstract from the constitution of Pennsylvania .. | American Almanac Collection (Library of Congress) | AY286.W3 | A | [
-0.03746636584401131,
-0.042349718511104584,
-0.005013052374124527,
0.02702093869447708,
-0.009162181988358498,
0.005747147370129824,
-0.017539098858833313,
-0.047018129378557205,
0.00545178959146142,
-0.0409388467669487,
-0.014061285182833672,
0.05143507942557335,
0.007895799353718758,
-0... |
10000159 | unk80003093 | Acta Salmanticensia | null | AS301 | A | [
-0.08634012937545776,
-0.0024777515791356564,
0.011917846277356148,
0.017380360513925552,
0.008161830715835094,
-0.005943354684859514,
0.010832331143319607,
0.0073678395710885525,
0.006943519227206707,
-0.0349842831492424,
-0.009723350405693054,
0.04987870901823044,
0.02880539372563362,
-0... |
10000237 | unk80004313 | Affection's gift | null | AY11 | A | [
-0.04826807603240013,
0.0036258893087506294,
0.03128314018249512,
0.02484334446489811,
-0.00956305954605341,
0.016495032235980034,
0.022320173680782318,
-0.05547935888171196,
-0.006721602752804756,
0.014478610828518867,
-0.013493753969669342,
0.016666406765580177,
0.02373497001826763,
-0.0... |
10000256 | unk80004573 | An address delivered to the literary societies of Franklin college, on September 29, 1840 | M'Clusky, John | AC901 | A | [
-0.06218671426177025,
0.0343543104827404,
0.01971823163330555,
-0.0030563767068088055,
-0.022881686687469482,
-0.0014733111020177603,
0.013007761910557747,
0.012117790058255196,
0.022062569856643677,
-0.02072305604815483,
0.02933800220489502,
0.06403376907110214,
0.044117555022239685,
-0.0... |
10000257 | unk80004583 | Address of the Editorial committee of the Catholic tract society of Baltimore to the public: | Catholic tract society of Baltimore. Editorial committee | AC901 | A | [-0.07775509357452393,0.033694349229335785,0.014568241313099861,-0.019506044685840607,-0.00201772199(...TRUNCATED) |
Library of Congress bibliographic embeddings — Parquet edition
A Parquet repackaging of the Library of Congress's experimental vector
embeddings of its bibliographic records, published on
https://id.loc.gov/download/ as "Experimental Embeddings Data by LCC".
Each record carries a 1024‑dimensional vector generated by LC with Amazon
Titan Text Embeddings V2 (amazon.titan-embed-text-v2:0), plus a few
descriptive fields.
LC distributes the data as ~190 GB of gzipped JSON Lines split by Library of
Congress Classification (LCC) class letter. This edition stores the same
values as Parquet so they can be queried with DuckDB, Polars, pandas or the
datasets library without downloading and parsing JSON.
Experimental, and incomplete for now. LC labels these embeddings experimental. As of 2026‑10‑08 three of LC's files — P (language & literature), T (technology) and no_LCC (records without a class) — return HTTP 403 from LC's download bucket even though they are linked from the download page, so they are not included yet. They will be added if LC makes them readable. The 19 classes here cover roughly 12 million records.
Contents
12,226,727 records, 47.1 GB of Parquet (54 files), converted 2026‑10‑08.
| class | records | class | records | |
|---|---|---|---|---|
| A General works | 117,340 | L Education | 400,688 | |
| B Philosophy, psychology, religion | 1,287,475 | M Music | 722,727 | |
| C Auxiliary sciences of history | 184,235 | N Fine arts | 628,142 | |
| D World history | 1,500,614 | Q Science | 911,724 | |
| E History of the Americas | 200,142 | R Medicine | 486,685 | |
| F History of the Americas (local) | 380,594 | S Agriculture | 275,019 | |
| G Geography, anthropology | 829,701 | U Military science | 136,717 | |
| H Social sciences | 2,205,841 | V Naval science | 48,833 | |
| J Political science | 414,639 | Z Bibliography, library science | 281,385 | |
| K Law | 1,214,226 | P, T, no_LCC | not yet available |
Columns
| column | type | notes |
|---|---|---|
lc_001 |
string | MARC 001 control number of the LC bibliographic record |
lccn |
string | Library of Congress Control Number as given by LC (may carry prefixes such as unk) |
title |
string | title as given in LC's meta.Title |
creator |
string | main creator as given in meta.Creator (null for ~2%) |
lcc_code |
string | full LCC call-number class, e.g. VA454 |
lcc_class |
string | the source file / class letter (A…Z); also the config name |
embedding |
list<float32>, length 1024 | Titan v2 vector, unit-normalized (cosine similarity = dot product) |
Values are lossless: every vector in LC's JSON is exactly representable as float32 (verified on samples), and that is the stored type.
Querying
-- DuckDB: nearest neighbours within one class, straight from the Hub
WITH v AS (SELECT * FROM 'hf://datasets/jimfhahn/lc-bib-embeddings/data/V/*.parquet'),
q AS (SELECT embedding::FLOAT[1024] AS e FROM v WHERE title ILIKE '%submarine at war%' LIMIT 1)
SELECT array_inner_product(v.embedding::FLOAT[1024], q.e) AS sim, v.title, v.lcc_code
FROM v, q
ORDER BY sim DESC
LIMIT 10;
from datasets import load_dataset
ds = load_dataset("jimfhahn/lc-bib-embeddings", "V", split="train")
Brute-force search over a single class is fast (≈0.3 s for class V's ~49K
records on a laptop). For the full collection, build an ANN index (FAISS,
DuckDB's vss extension, etc.).
Searching with free text
Query text must be embedded with the same model,
amazon.titan-embed-text-v2:0 (AWS Bedrock), at 1024 dimensions with
normalization on. Vectors from any other model are not comparable. Without
Bedrock access the data is still useful for record‑to‑record similarity,
clustering and visualization.
Provenance
- Source:
https://id.loc.gov/download/embeddings/<CLASS>_embeddings_2025.jsonl.gz(served fromlds-downloads.s3.amazonaws.com; files last modified 2026‑09‑22). - Conversion:
tools/lc-embeddings/lc_embeddings_to_parquet.py, run as a Hugging Face Job (CPU Upgrade, 27 minutes end to end). Each class file is streamed through DuckDB (read_json→CAST(embedding AS FLOAT[1024])→ Parquet, zstd, ~1 GB shards). Any record whose vector is not exactly 1024‑dimensional would fail the run; none did. - No records were filtered or modified; row order within a class follows LC's files.
Relation to other datasets
jimfhahn/lc-bibframe-hubs
holds LC's BIBFRAME Hub (work-level) graph. Both use LCCNs, from the same
numbering scheme, but an LCCN identifies a single record. A Hub carries the
LCCN of the name/title authority record it was derived from (n…, no…,
nr…); rows here carry the LCCN of a bibliographic record. So lccn is a
key within each dataset, not a foreign key between them; an exact join on it
matches nothing (checked against class D: 0 of 1.5M).
The working link is lc_001. LC's BIBFRAME Work for a bibliographic record
lives at https://id.loc.gov/resources/works/{lc_001}, and that Work points
to Hubs through bf:relation when the record has a uniform title, a
name/title access point or a series. In a 6‑record spot check, all 6 Works
resolved and 1 linked to a Hub (a series Hub). Expect Hub links for a
minority of records.
License
The bibliographic data is published by the Library of Congress, a U.S. Government agency, and is in the public domain in the United States. This repackaging is released under CC0 1.0. The embeddings were produced by LC using Amazon Titan; consult LC's download page for any usage notes.
- Downloads last month
- 112