Dataset Viewer
Duplicate
The dataset viewer is not available for this split.
Cannot load the dataset split (in streaming mode) to extract the first rows.
Error code:   StreamingRowsError
Exception:    CastError
Message:      Couldn't cast
authorities: struct<>
first_release: bool
profile: string
pointer_version: int64
manifest: struct<path: string, sha256: string, size: int64>
  child 0, path: string
  child 1, sha256: string
  child 2, size: int64
release: string
profiles: struct<core: struct<db_size: int64, gz_size: int64, sha256_db: string, sha256_gz: string, url_pinned (... 114 chars omitted)
  child 0, core: struct<db_size: int64, gz_size: int64, sha256_db: string, sha256_gz: string, url_pinned: string>
      child 0, db_size: int64
      child 1, gz_size: int64
      child 2, sha256_db: string
      child 3, sha256_gz: string
      child 4, url_pinned: string
  child 1, full: struct<db_size: int64, gz_size: int64, sha256_db: string, sha256_gz: string, url_pinned: string>
      child 0, db_size: int64
      child 1, gz_size: int64
      child 2, sha256_db: string
      child 3, sha256_gz: string
      child 4, url_pinned: string
compat_fingerprint: string
release_commit: string
normalize_version: string
schema_version: int64
indexes: struct<core: struct<sha256: string, url_pinned: string>, full: struct<sha256: string, url_pinned: st (... 6 chars omitted)
  child 0, core: struct<sha256: string, url_pinned: string>
      child 0, sha256: string
      child 1, url_pinned: string
  child 1, full: struct<sha256: string, url_pinned: string>
      child 0, sha256: string
      child 1, url_pinned: string
to
{'compat_fingerprint': Value('string'), 'indexes': {'core': {'sha256': Value('string'), 'url_pinned': Value('string')}, 'full': {'sha256': Value('string'), 'url_pinned': Value('string')}}, 'manifest': {'path': Value('string'), 'sha256': Value('string'), 'size': Value('int64')}, 'normalize_version': Value('string'), 'pointer_version': Value('int64'), 'profiles': {'core': {'db_size': Value('int64'), 'gz_size': Value('int64'), 'sha256_db': Value('string'), 'sha256_gz': Value('string'), 'url_pinned': Value('string')}, 'full': {'db_size': Value('int64'), 'gz_size': Value('int64'), 'sha256_db': Value('string'), 'sha256_gz': Value('string'), 'url_pinned': Value('string')}}, 'release': Value('string'), 'release_commit': Value('string'), 'schema_version': Value('int64')}
because column names don't match
Traceback:    Traceback (most recent call last):
                File "/src/services/worker/src/worker/utils.py", line 147, in get_rows_or_raise
                  return get_rows(
                      dataset=dataset,
                  ...<4 lines>...
                      column_names=column_names,
                  )
                File "/src/libs/libcommon/src/libcommon/utils.py", line 272, in decorator
                  return func(*args, **kwargs)
                File "/src/services/worker/src/worker/utils.py", line 127, in get_rows
                  rows_plus_one = list(itertools.islice(safe_iter(ds, dataset=dataset), rows_max_number + 1))
                File "/src/services/worker/src/worker/utils.py", line 483, in safe_iter
                  yield from ds.decode(False) if ds.features else ds
                File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 2840, in __iter__
                  for key, example in ex_iterable:
                                      ^^^^^^^^^^^
                File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 2373, in __iter__
                  for key, pa_table in self._iter_arrow():
                                       ~~~~~~~~~~~~~~~~^^
                File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 2398, in _iter_arrow
                  for key, pa_table in self.ex_iterable._iter_arrow():
                                       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
                File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 536, in _iter_arrow
                  for key, pa_table in iterator:
                                       ^^^^^^^^
                File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 419, in _iter_arrow
                  for key, pa_table in self.generate_tables_fn(**gen_kwags):
                                       ~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^
                File "/usr/local/lib/python3.14/site-packages/datasets/packaged_modules/json/json.py", line 343, in _generate_tables
                  self._cast_table(pa_table, json_field_paths=json_field_paths),
                  ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                File "/usr/local/lib/python3.14/site-packages/datasets/packaged_modules/json/json.py", line 132, in _cast_table
                  pa_table = table_cast(pa_table, self.info.features.arrow_schema)
                File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 2378, in table_cast
                  return cast_table_to_schema(table, schema)
                File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 2306, in cast_table_to_schema
                  raise CastError(
                  ...<3 lines>...
                  )
              datasets.table.CastError: Couldn't cast
              authorities: struct<>
              first_release: bool
              profile: string
              pointer_version: int64
              manifest: struct<path: string, sha256: string, size: int64>
                child 0, path: string
                child 1, sha256: string
                child 2, size: int64
              release: string
              profiles: struct<core: struct<db_size: int64, gz_size: int64, sha256_db: string, sha256_gz: string, url_pinned (... 114 chars omitted)
                child 0, core: struct<db_size: int64, gz_size: int64, sha256_db: string, sha256_gz: string, url_pinned: string>
                    child 0, db_size: int64
                    child 1, gz_size: int64
                    child 2, sha256_db: string
                    child 3, sha256_gz: string
                    child 4, url_pinned: string
                child 1, full: struct<db_size: int64, gz_size: int64, sha256_db: string, sha256_gz: string, url_pinned: string>
                    child 0, db_size: int64
                    child 1, gz_size: int64
                    child 2, sha256_db: string
                    child 3, sha256_gz: string
                    child 4, url_pinned: string
              compat_fingerprint: string
              release_commit: string
              normalize_version: string
              schema_version: int64
              indexes: struct<core: struct<sha256: string, url_pinned: string>, full: struct<sha256: string, url_pinned: st (... 6 chars omitted)
                child 0, core: struct<sha256: string, url_pinned: string>
                    child 0, sha256: string
                    child 1, url_pinned: string
                child 1, full: struct<sha256: string, url_pinned: string>
                    child 0, sha256: string
                    child 1, url_pinned: string
              to
              {'compat_fingerprint': Value('string'), 'indexes': {'core': {'sha256': Value('string'), 'url_pinned': Value('string')}, 'full': {'sha256': Value('string'), 'url_pinned': Value('string')}}, 'manifest': {'path': Value('string'), 'sha256': Value('string'), 'size': Value('int64')}, 'normalize_version': Value('string'), 'pointer_version': Value('int64'), 'profiles': {'core': {'db_size': Value('int64'), 'gz_size': Value('int64'), 'sha256_db': Value('string'), 'sha256_gz': Value('string'), 'url_pinned': Value('string')}, 'full': {'db_size': Value('int64'), 'gz_size': Value('int64'), 'sha256_db': Value('string'), 'sha256_gz': Value('string'), 'url_pinned': Value('string')}}, 'release': Value('string'), 'release_commit': Value('string'), 'schema_version': Value('int64')}
              because column names don't match

Need help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.

LCSH lite — SQLite databases of Library of Congress authorities

Small SQLite databases built from the Library of Congress bulk authority files (id.loc.gov), for offline lookup in the LCSH Recommendation Tool.

Profile Authorities Download On disk
core LCSH (subjects) + LCGFT (genre/form) about 62 MB about 205 MB
full core + LCNAF (names) about 1.9 GB about 5.4 GB

How to use a release

Read latest.json at the repository root. It names the current release and, for each profile, a url_pinned download link fixed to one commit, plus the SHA-256 of the gzip file and of the database inside it. Check both hashes before you use a file. Every release lives under releases/<release>/ and is never changed after it is published.

Contents and rules

  • Built by lcsh-db-builder from subjects, genreForms and names SKOS bulk files, with MARC keys from the subjects and genreForms MADS files.
  • Subdivision records (-781 forms and 18X free-floating subdivisions) are not included; they are not valid main headings.
  • Name records have no MARC key in these databases; look them up online.
  • The schema and the exact supported queries are documented in the builder repository (docs/SCHEMA.md, docs/SCHEMA_QUERIES.md).

Licence

The data comes from the Library of Congress and is in the public domain in the United States. See https://www.loc.gov/legal/ and id.loc.gov.

Downloads last month
65