diff --git a/README.md b/README.md index fa8572d..136194e 100644 --- a/README.md +++ b/README.md @@ -24,8 +24,6 @@ The header has **Scan**, **Library (N)** and a gear for settings. 1. Open the PDF and print at **Actual size / 100%** (never "Fit to page"), **single-sided**, through the **manual feed slot**. 2. When the cards came out correctly, answer **Yes, clear them** so they are not printed twice. -Each card also carries a QR code (about 1.25 inches square, above the ISBN line). It holds the book's record as plain text: call number, title, the first two authors, ISBN and year, so a card still means something if the database is lost, and a phone camera shows it as readable text. Hold a card up to the scanner: the book is found in your library, or added from the card (already resolved, and not queued for printing again). Cards for books with no barcode can be scanned this way too. Other QR codes, such as those on a back cover, are ignored. - **Library** shows every book in shelf order, grouped by main class, with search and a *Needs attention* filter. Click a book to edit it, print another card, look it up again, or delete it. A number marked `~` was borrowed from another edition or from similar books; check those. **How a number is found.** A number is only ever printed without `~` when it came word for word from a catalogue record (Library of Congress, then Open Library) for this exact ISBN or LCCN, and has at least one cutter. Nothing is generated for those. A record that gives only a bare class (such as `GV199.42`, which in that class needs a place cutter next, not an author) is treated as a hint: the app then looks at other editions of the same book in that class, then at similar books in that class, and borrows from them with `~`. If it finds nothing better it prints the bare class and this edition's year with `~`. Books that share a number are shelved by the first author's surname, then title. **Look up again** ignores every saved answer and asks the catalogues afresh. diff --git a/package-lock.json b/package-lock.json index 4e16d42..9258b03 100644 --- a/package-lock.json +++ b/package-lock.json @@ -7,6 +7,7 @@ "": { "name": "booksorter", "version": "0.1.0", + "license": "MIT", "dependencies": { "@hono/node-server": "^2.1.9", "@pdf-lib/fontkit": "^1.1.1", @@ -15,8 +16,7 @@ "fast-xml-parser": "^5.12.1", "hono": "^4.13.19", "pdf-lib": "^1.17.1", - "preact": "^11.2.0", - "qrcode-generator": "^2.0.4" + "preact": "^11.2.0" }, "devDependencies": { "@types/node": "^26.6.6", @@ -1053,12 +1053,6 @@ } } }, - "node_modules/qrcode-generator": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/qrcode-generator/-/qrcode-generator-2.0.4.tgz", - "integrity": "sha512-mZSiP6RnbHl4xL2Ap5HfkjLnmxfKcPWpWe/c+5XxCuetEenqmNFf1FH/ftXPCtFG5/TDobjsjz6sSNL0Sr8Z9g==", - "license": "MIT" - }, "node_modules/strnum": { "version": "2.5.1", "resolved": "https://registry.npmjs.org/strnum/-/strnum-2.5.1.tgz", diff --git a/package.json b/package.json index c834e95..cc54adb 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "private": true, "type": "module", "scripts": { - "test": "node --test \"src/**/*.test.ts\"", + "test": "node --test \"src/**/*.test.ts\" \"scripts/**/*.test.ts\"", "typecheck": "tsc --noEmit", "build": "node scripts/build-web.ts", "start": "npm run build && node src/server/main.ts" @@ -18,8 +18,7 @@ "fast-xml-parser": "^5.12.1", "hono": "^4.13.19", "pdf-lib": "^1.17.1", - "preact": "^11.2.0", - "qrcode-generator": "^2.0.4" + "preact": "^11.2.0" }, "devDependencies": { "@types/node": "^26.6.6", diff --git a/scripts/gen-lcc-outline.ts b/scripts/gen-lcc-outline.ts index e2ad8cc..71ed6fc 100644 --- a/scripts/gen-lcc-outline.ts +++ b/scripts/gen-lcc-outline.ts @@ -1,17 +1,21 @@ -// Generates src/shared/lcc-outline.ts from the Library of Congress Classification -// Outline (https://www.loc.gov/catdir/cpso/lcco/), a US government publication. +// Generates src/shared/lcc-outline.ts (main classes and subclasses, used by the web app too) and +// src/server/lcc-ranges.ts (every nested number range with its caption, server only) from the Library of +// Congress Classification Outline (https://www.loc.gov/catdir/cpso/lcco/), a US government publication. // Usage: node scripts/gen-lcc-outline.ts [cacheDir] (or env LCC_CACHE_DIR) // Requires `pdftotext` (poppler). Downloads are cached outside the repo. import { execFileSync } from 'node:child_process'; import { existsSync, mkdirSync, readFileSync, writeFileSync } from 'node:fs'; import { tmpdir } from 'node:os'; import { join } from 'node:path'; +import { parseOutlineText } from './lcc-parse.ts'; +import type { Range } from './lcc-parse.ts'; const INDEX = 'https://www.loc.gov/catdir/cpso/lcco/'; const UA = 'Mozilla/5.0 (compatible; lcc-outline-generator)'; const cache = process.argv[2] ?? process.env.LCC_CACHE_DIR ?? join(tmpdir(), 'lcc-outline-cache'); mkdirSync(cache, { recursive: true }); const out = new URL('../src/shared/lcc-outline.ts', import.meta.url); +const outRanges = new URL('../src/server/lcc-ranges.ts', import.meta.url); // Fix-ups applied to names after sentence-casing / extraction. const MAIN_FIXES: Record = { @@ -61,12 +65,17 @@ if (hrefs.length < 20) throw new Error(`expected ~20 class PDFs, found ${hrefs.l const MAIN: Record = {}; const SUB: Record = {}; +const RANGES = new Map(); for (const href of hrefs) { const name = href.split('/').pop()!; const pdf = join(cache, name); await get(new URL(href, INDEX).href, name); - const lines = execFileSync('pdftotext', ['-layout', pdf, '-'], { encoding: 'utf8', maxBuffer: 1 << 28 }).split('\n'); + const text = execFileSync('pdftotext', ['-layout', pdf, '-'], { encoding: 'utf8', maxBuffer: 1 << 28 }); + const lines = text.split('\n'); + const parsed = parseOutlineText(text); + for (const [letters, rows] of parsed.ranges) RANGES.set(letters, rows); + for (const p of parsed.problems) console.warn(`${name}: skipped "${p}"`); // Title: "CLASS Q - SCIENCE", possibly wrapped onto following lines. const ti = lines.findIndex((l) => /^\s*CLASS [A-Z](-[A-Z])? - /.test(l)); @@ -116,3 +125,21 @@ export function classNames(letters: string): { className: string | null; subclas `; writeFileSync(out, src); console.log(`wrote ${Object.keys(MAIN).length} main classes, ${Object.keys(SUB).length} subclasses`); + +const rangesSrc = `// GENERATED by scripts/gen-lcc-outline.ts -- do not edit by hand. +// Source: Library of Congress Classification Outline, ${INDEX} +// (a US government publication). Re-run: node scripts/gen-lcc-outline.ts +// Server only: the web app does not import this file. + +/** [lo, hi, caption], or [lo, hi, caption, cutterLo, cutterHi] for a range bounded by cutters. Captions are verbatim. */ +export type OutlineRange = [lo: number, hi: number, caption: string, cutterLo?: string, cutterHi?: string]; + +/** Every range of the outline by class letters, in outline order (a range comes before the ranges nested in it). */ +export const OUTLINE_RANGES: Record = { +${[...RANGES.keys()].sort().map((k) => ` ${k}: [\n${RANGES.get(k)!.map((r) => ' ' + JSON.stringify(r)).join(',\n')},\n ],`).join('\n')} +}; +`; +writeFileSync(outRanges, rangesSrc); +const perClass: Record = {}; +for (const [k, rows] of RANGES) perClass[k[0]!] = (perClass[k[0]!] ?? 0) + rows.length; +console.log(`wrote ${[...RANGES.values()].reduce((n, r) => n + r.length, 0)} ranges in ${RANGES.size} subclasses; per main class: ${Object.entries(perClass).map(([k, n]) => k + '=' + n).join(' ')}`); diff --git a/scripts/lcc-parse.test.ts b/scripts/lcc-parse.test.ts new file mode 100644 index 0000000..62785a4 --- /dev/null +++ b/scripts/lcc-parse.test.ts @@ -0,0 +1,67 @@ +import { test } from 'node:test'; +import assert from 'node:assert/strict'; +import { cleanCaption, parseBounds, parseOutlineText } from './lcc-parse.ts'; + +test('number ranges in every form the outline uses', () => { + assert.deepEqual(parseBounds('191.2-200.66'), { lo: 191.2, hi: 200.66 }); + assert.deepEqual(parseBounds('1201.5'), { lo: 1201.5, hi: 1201.5 }); + assert.deepEqual(parseBounds('1115-(1193)'), { lo: 1115, hi: 1193 }); + assert.deepEqual(parseBounds('(1)-1281'), { lo: 1, hi: 1281 }); + assert.deepEqual(parseBounds('1569.C2'), { lo: 1569, hi: 1569, cutterLo: 'C2', cutterHi: 'C2' }); + assert.deepEqual(parseBounds('469.M21-.M38'), { lo: 469, hi: 469, cutterLo: 'M21', cutterHi: 'M38' }); + assert.deepEqual(parseBounds('990.U45-U46', 'DA'), { lo: 990, hi: 990, cutterLo: 'U45', cutterHi: 'U46' }); + assert.deepEqual(parseBounds('1.A5-3.3'), { lo: 1, hi: 3.3, cutterLo: 'A5' }); + assert.deepEqual(parseBounds('12.5-.9'), { lo: 12.5, hi: 12.9 }); + assert.deepEqual(parseBounds('1003-Z1005.5', 'Z'), { lo: 1003, hi: 1005.5 }); + assert.equal(parseBounds('4440-4406'), null); + assert.equal(parseBounds('274.5-6'), null); +}); + +test('captions: wraps joined, notes dropped, headers and breaks ignored, nesting kept in order', () => { + const text = [ + ' LIBRARY OF CONGRESS CLASSIFICATION OUTLINE', + 'Subclass GV Recreation. Leisure', + 'Subclass GV', + '', + 'GV1-1860 Recreation. Leisure', + 'GV191.2-200.66 Outdoor life. Outdoor recreation', + 'GV199-199.62 Hiking. Pedestrian tours', + 'GV346-351.5 School and college athletics. Intramural', + ' and interscholastic athletics', + 'GV401-433 Physical education facilities.', + ' Including gymnasiums, athletic fields,', + ' playgrounds, etc.', + '\fGV1470-1511 Parties. Party games and stunts', + 'GV1201.5 Hobbies (General)', + 'Subclass GX', + 'GX5 Heading', + ' Individual states', + ].join('\n'); + const { ranges, problems } = parseOutlineText(text); + assert.deepEqual(problems, []); + assert.deepEqual(ranges.get('GV'), [ + [1, 1860, 'Recreation. Leisure'], + [191.2, 200.66, 'Outdoor life. Outdoor recreation'], + [199, 199.62, 'Hiking. Pedestrian tours'], + [346, 351.5, 'School and college athletics. Intramural and interscholastic athletics'], + [401, 433, 'Physical education facilities'], + [1470, 1511, 'Parties. Party games and stunts'], + [1201.5, 1201.5, 'Hobbies (General)'], + ]); + assert.deepEqual(ranges.get('GX'), [[5, 5, 'Heading']]); +}); + +test('unreadable ranges are reported, not guessed', () => { + const { ranges, problems } = parseOutlineText('Subclass KZ\nKZD4440-4406 Liability for accidents\nKZ5 Fine\n'); + assert.equal(problems.length, 1); + assert.deepEqual(ranges.get('KZ'), [[5, 5, 'Fine']]); +}); + +test('caption clean-up trims debris only', () => { + assert.equal(cleanCaption(' Law and\n order , '), 'Law and order'); + assert.equal(cleanCaption('Museology. Museum methods, technique, etc.'), 'Museology. Museum methods, technique, etc.'); + assert.equal(cleanCaption('Purānas .'), 'Purānas'); + assert.equal(cleanCaption('1789­'), '1789-'); + assert.equal(cleanCaption('1871- . Later 19th century'), '1871- . Later 19th century'); + assert.equal(cleanCaption('Persian wars, 499-479 B.C.'), 'Persian wars, 499-479 B.C.'); +}); diff --git a/scripts/lcc-parse.ts b/scripts/lcc-parse.ts new file mode 100644 index 0000000..859ab35 --- /dev/null +++ b/scripts/lcc-parse.ts @@ -0,0 +1,112 @@ +// Parses the text of one Library of Congress Classification Outline PDF (from `pdftotext -layout`) +// into its number ranges with their captions. Used by gen-lcc-outline.ts; no I/O here. + +/** [lo, hi, caption] or, for ranges bounded by cutters, [lo, hi, caption, cutterLo, cutterHi]. */ +export type Range = [lo: number, hi: number, caption: string, cutterLo?: string, cutterHi?: string]; + +export interface Parsed { + /** Ranges by class letters (PS, GV, KBM), in the order they appear in the outline. */ + ranges: Map; + /** Lines that looked like a range but could not be read; reported by the generator. */ + problems: string[]; +} + +const NUM = String.raw`\(?(\d+(?:\.\d+)?)\)?`; +const START = new RegExp(String.raw`^${NUM}(?:\.([A-Z]\d*))?$`); +const END_NUMBER = new RegExp(String.raw`^([A-Z]{1,3}(?=[\d(]))?${NUM}(?:\.([A-Z]\d*))?$`); +const END_DECIMAL = /^\.(\d+)$/; +const END_CUTTER = /^\.?([A-Z]\d*)$/; +const NOTE = /^(Including|Class |For |See |Subarrange|Cf\.)/; + +export interface Bounds { lo: number; hi: number; cutterLo?: string; cutterHi?: string } + +/** The number part of a code such as `191.2-200.66`, `1569.C2`, `469.M21-.M38` or `1115-(1193)`; null if unreadable. */ +export function parseBounds(code: string, letters = ''): Bounds | null { + const dash = code.indexOf('-'); + const startText = dash < 0 ? code : code.slice(0, dash); + const s = START.exec(startText); + if (!s) return null; + const lo = Number(s[1]); + const out: Bounds = { lo, hi: lo }; + if (s[2]) out.cutterLo = s[2]; + if (dash < 0) { if (s[2]) out.cutterHi = s[2]; return out; } + const endText = code.slice(dash + 1); + let m: RegExpExecArray | null; + // "U46" after "DA990.U45" is a cutter; "Z1003.5" after "Z1" repeats the class letters. Tell them apart by the letters. + if ((m = END_NUMBER.exec(endText)) && (!m[1] || m[1] === letters) && Number(m[2]) >= lo) { + out.hi = Number(m[2]); + if (m[3]) out.cutterHi = m[3]; + } else if ((m = END_DECIMAL.exec(endText))) { + out.hi = Number(`${Math.trunc(lo)}.${m[1]}`); + } else if ((m = END_CUTTER.exec(endText))) { + out.cutterHi = m[1]!; + } else return null; + if (out.hi < out.lo) return null; + return out; +} + +/** A caption as published: one line of text, no stray marks; a lone full stop (a diacritic dot the PDF set on its own line) is dropped. */ +export function cleanCaption(raw: string): string { + let s = raw.replace(/­/g, '-').replace(/\s+/g, ' ').trim(); + s = s.replace(/(?(); + const problems: string[] = []; + let started = false; + let cur: { letters: string; index: number; capCol: number; caption: string } | null = null; + let inNote = false; + + const finish = () => { + if (!cur) return; + const list = ranges.get(cur.letters)!; + const r = list[cur.index]!; + r[2] = cleanCaption(cur.caption); + cur = null; + }; + + for (const rawLine of text.split('\n')) { + const line = rawLine.replace(/\f/g, '').replace(/\s+$/, ''); + if (/^(?:Sub)?[Cc]lass [A-Z]{1,3}\s*$/.test(line)) { finish(); started = true; inNote = false; continue; } + if (!started || !line.trim()) continue; + + const codeLine = /^([A-Z]{1,3})((?:\(\d+\)|\d)\S*)\s+(\S.*)$/.exec(line) ?? /^([A-Z]{1,3})((?:\(\d+\)|\d)\S*)\s*$/.exec(line); + if (codeLine) { + finish(); + inNote = false; + const [, letters, code, caption = ''] = codeLine as unknown as [string, string, string, string?]; + const b = parseBounds(code, letters); + if (!b) { problems.push(line.trim()); continue; } + if (!ranges.has(letters)) ranges.set(letters, []); + const list = ranges.get(letters)!; + const row: Range = [b.lo, b.hi, '']; + if (b.cutterLo !== undefined || b.cutterHi !== undefined) { row[3] = b.cutterLo ?? ''; row[4] = b.cutterHi ?? ''; } + list.push(row); + cur = { letters, index: list.length - 1, capCol: line.length - caption.length, caption }; + continue; + } + + // Anything else: a wrapped caption, a note under a caption, or a heading without a range. + const indent = line.length - line.trimStart().length; + const t = line.trim(); + if (!cur) continue; + if (indent <= cur.capCol) { finish(); inNote = false; continue; } // a heading line, not part of the range above + if (inNote) continue; + if (NOTE.test(t)) { inNote = true; continue; } + cur.caption += ' ' + t; + } + finish(); + for (const [letters, list] of ranges) { + ranges.set(letters, list.filter((r) => { + if (r[2]) return true; + problems.push(`${letters}${r[0]}-${r[1]}: empty caption`); + return false; + })); + } + return { ranges, problems }; +} diff --git a/src/server/app.test.ts b/src/server/app.test.ts index 715f55b..ac4bdba 100644 --- a/src/server/app.test.ts +++ b/src/server/app.test.ts @@ -17,7 +17,7 @@ function setupRecording(fresh: (boolean | undefined)[]) { function setup(resolve: (i?: any, o?: any) => Promise = async () => found, port?: number) { const db = openDb(':memory:'); const events = createEventBus(); - const resolver = { resolve, search: async () => [{ title: 'Hit', authors: [], lcc: [] }] }; + const resolver = { resolve, tail: async () => [], search: async () => [{ title: 'Hit', authors: [], lcc: [] }] }; const jobs = createJobs({ db, resolver, onChange: (b) => events.emitBook(b), retryDelaysMs: [0], log: () => {} }); const pdfCalls: { cards: CardData[]; opts: Settings & { startPosition: number } }[] = []; const app = createApp({ @@ -134,8 +134,7 @@ test('print passes cards in shelf order and honours start; confirm clears queue' const call = pdfCalls[0]!; assert.deepEqual(call.cards.map((c) => c.title), ['Approx', 'First', 'Second']); assert.equal(call.opts.startPosition, 2); - assert.equal(call.cards[1]!.className, 'Class P'); - assert.equal(call.cards[1]!.subclassName, 'Sub PS'); + assert.deepEqual(call.cards[1]!.hierarchy, { outline: ['Class P', 'Sub PS'], tail: [] }); assert.equal(call.cards[0]!.approximate, true); assert.equal(call.cards[1]!.approximate, false); const ids = r.headers.get('x-book-ids')!.split(',').map(Number); @@ -234,7 +233,7 @@ test('debug capture: saves a PNG, keeps the newest 30, refuses other bodies', as const dir = mkdtempSync(join(tmpdir(), 'captures-')); try { const db = openDb(':memory:'); - const resolver = { resolve: async () => found, search: async () => [] }; + const resolver = { resolve: async () => found, tail: async () => [], search: async () => [] }; const jobs = createJobs({ db, resolver, onChange: () => {}, retryDelaysMs: [0], log: () => {} }); const app = createApp({ db, jobs, resolver, capturesDir: join(dir, 'captures'), @@ -254,41 +253,6 @@ test('debug capture: saves a PNG, keeps the newest 30, refuses other bodies', as } finally { rmSync(dir, { recursive: true, force: true }); } }); -test('from-card: parses, adds a resolved book that is not queued, then finds it again', async () => { - const { req, db } = setup(); - assert.equal((await req('POST', '/api/books/from-card', { text: 'https://example.com' })).status, 400); - assert.equal((await req('POST', '/api/books/from-card', {})).status, 400); - const text = 'PQ2230.A1 H8 1987 ~\nLes Misérables\nVictor Hugo\nbooksorter 1'; - const first = await (await req('POST', '/api/books/from-card', { text })).json() as any; - assert.equal(first.existed, false); - assert.equal(first.book.status, 'resolved'); - assert.equal(first.book.source, 'card'); - assert.equal(first.book.confidence, 'approximate'); - assert.equal(first.book.inQueue, false); - assert.equal(first.book.callNumber, 'PQ2230.A1 H8 1987'); - assert.deepEqual(first.book.authors, ['Victor Hugo']); - // same title (any case, padded) with the same call number is the same book; a different call number is not - const again = await (await req('POST', '/api/books/from-card', { text: text.replace('Les Misérables', 'LES MISÉRABLES ') })).json() as any; - assert.equal(again.existed, true); - assert.equal(again.book.id, first.book.id); - const other = await (await req('POST', '/api/books/from-card', { text: text.replace('H8', 'H9') })).json() as any; - assert.equal(other.existed, false); - assert.equal(db.listBooks().length, 2); -}); - -test('from-card: a card with an ISBN matches by ISBN; cross-origin is refused', async () => { - const { req, db } = setup(undefined, 4321); - const text = 'QA76.73.R87 K53 2018\nThe Rust Programming Language\nSteve Klabnik\nISBN 9781593278281\n2018\nbooksorter 1'; - const made = await (await req('POST', '/api/books/from-card', { text }, { origin: 'http://localhost:4321' })).json() as any; - assert.equal(made.book.isbn13, '9781593278281'); - assert.equal(made.book.year, 2018); - const found = await (await req('POST', '/api/books/from-card', { text: text.replace('The Rust Programming Language', 'Other') }, { origin: 'http://localhost:4321' })).json() as any; - assert.equal(found.existed, true); - assert.equal(found.book.id, made.book.id); - assert.equal((await req('POST', '/api/books/from-card', { text }, { origin: 'http://evil.example' })).status, 403); - assert.equal(db.listBooks().length, 1); -}); - test('retry asks the lookup to ignore its caches', async () => { const fresh: (boolean | undefined)[] = []; const { req, jobs } = setupRecording(fresh); @@ -316,3 +280,19 @@ test('a search result\'s LCCN (work-level) is not saved onto the book', async () const f = await (await req('POST', '/api/books/from-search', { result: { title: 'Hit', authors: ['X'], lccn: '96067014', lcc: [] } })).json() as any; assert.equal(f.book.lccn, null); }); + +test('GET /api/books/:id/hierarchy answers with the outline and the stored tail', async () => { + const { req, db } = setup(); + const b = db.insertPending({ title: 'H', callNumber: 'PS3558.E63 D8 2005', status: 'resolved', hierarchyTail: ['Utah'] }).book; + const r = await req('GET', `/api/books/${b.id}/hierarchy`); + assert.equal(r.status, 200); + assert.deepEqual(await r.json(), { outline: ['Class P', 'Sub PS'], tail: [] }); // the default builds from class names only + assert.equal((await req('GET', '/api/books/999/hierarchy')).status, 404); +}); + +test('a cross-origin request that changes state is refused', async () => { + const { req, db } = setup(undefined, 4321); + assert.equal((await req('POST', '/api/books/manual', { title: 'X' }, { origin: 'http://evil.example' })).status, 403); + assert.equal((await req('POST', '/api/books/manual', { title: 'X' }, { origin: 'http://localhost:4321' })).status, 200); + assert.equal(db.listBooks().length, 1); +}); diff --git a/src/server/app.ts b/src/server/app.ts index 66347fc..814c386 100644 --- a/src/server/app.ts +++ b/src/server/app.ts @@ -3,9 +3,8 @@ import { compareShelf } from '../shared/shelf.ts'; import { join } from 'node:path'; import { Hono } from 'hono'; import type { Context } from 'hono'; -import type { Book, CardData, SearchResult, Settings } from '../shared/types.ts'; +import type { Book, CardData, Hierarchy, SearchResult, Settings } from '../shared/types.ts'; import { normalizeIsbn } from '../shared/isbn.ts'; -import { parseCardCode } from '../shared/cardcode.ts'; import { formatCallNumber, parseCallNumber, sortKeyOfRaw } from '../shared/callnumber.ts'; import type { Db, Filter, NewBook } from './db.ts'; import type { Jobs, ResolverLike } from './jobs.ts'; @@ -15,6 +14,8 @@ import type { classNames } from '../shared/lcc-outline.ts'; export type RenderCardsPdf = typeof renderCardsPdf; export type RenderCalibrationPdf = typeof renderCalibrationPdf; export type ClassNames = typeof classNames; +/** The plain-word hierarchy of a call number and the book's stored tail (see hierarchy.ts). */ +export type HierarchyOf = (callNumber: string | null, tail: string[] | null) => Hierarchy; export interface EventBus { on(listener: (event: string, data: unknown) => void): () => void; @@ -40,6 +41,8 @@ export interface AppDeps { db: Db; jobs: Jobs; resolver: ResolverLike; renderCardsPdf: RenderCardsPdf; renderCalibrationPdf: RenderCalibrationPdf; classNames: ClassNames; + /** Defaults to the main class and subclass names alone (no outline ranges, no tail). */ + hierarchy?: HierarchyOf; events?: EventBus; /** Where pictures the scanner failed to read are kept for tuning (the newest 30). */ capturesDir?: string; @@ -75,6 +78,11 @@ function cacheKeys(book: Book): string[] { export function createApp(deps: AppDeps): Hono { const { db, jobs, resolver, classNames } = deps; + const hierarchyOf: HierarchyOf = deps.hierarchy ?? ((callNumber) => { + const cn = callNumber ? parseCallNumber(callNumber) : null; + const names = classNames(cn?.letters ?? ''); + return { outline: [names.className, names.subclassName].filter((x): x is string => !!x), tail: [] }; + }); const events = deps.events ?? createEventBus(); const app = new Hono(); @@ -155,26 +163,6 @@ export function createApp(deps: AppDeps): Hono { return c.json({ book: addPending({ lccn, title: lccn }).book }); }); - // A card's QR code carries the whole record, so the book is made straight from it, with no lookup. It is not - // queued for printing: it already has its card. - app.post('/api/books/from-card', async (c) => { - const text = (await body(c)).text; - const card = typeof text === 'string' ? parseCardCode(text) : null; - if (!card) throw new HttpError(400, 'Not a Booksorter card'); - const sortKey = sortKeyOfRaw(card.callNumber); - const title = card.title.trim(); - const same = (b: Book) => b.title.trim().toLowerCase() === title.toLowerCase() && b.sortKey === sortKey; - const existing = card.isbn13 ? db.findByIsbn(card.isbn13) : db.listBooks().find(same) ?? null; - if (existing) return c.json({ book: existing, existed: true }); - const { book, created } = db.insertPending({ - isbn13: card.isbn13, title: title || card.callNumber, authors: card.authors, year: card.year, - callNumber: card.callNumber, sortKey, confidence: card.approximate ? 'approximate' : 'exact', source: 'card', - status: 'resolved', manualOverride: false, inQueue: false, - }); - if (created) events.emitBook(book); - return c.json({ book, existed: !created }); - }); - app.get('/api/search', async (c) => { const title = c.req.query('title')?.trim() ?? ''; const author = c.req.query('author')?.trim() ?? ''; @@ -206,6 +194,12 @@ export function createApp(deps: AppDeps): Hono { return c.json({ book: addPending(fields).book }); }); + app.get('/api/books/:id/hierarchy', (c) => { + const book = db.getBook(Number(c.req.param('id'))); + if (!book) throw new HttpError(404, 'No such book'); + return c.json(hierarchyOf(book.callNumber, book.hierarchyTail)); + }); + app.get('/api/books', (c) => { const f = c.req.query('filter'); const filter: Filter = f === 'queue' || f === 'attention' ? f : 'all'; @@ -277,11 +271,8 @@ export function createApp(deps: AppDeps): Hono { .sort(compareShelf); if (!books.length) throw new HttpError(400, 'Nothing to print'); const cards: CardData[] = books.map((b) => { - const cn = parseCallNumber(b.callNumber!); - const letters = cn?.letters ?? /^[A-Z]*/.exec(b.callNumber!)![0]; - const names = classNames(letters); return { - callNumber: b.callNumber!, className: names.className, subclassName: names.subclassName, + callNumber: b.callNumber!, hierarchy: hierarchyOf(b.callNumber, b.hierarchyTail), title: b.subtitle ? `${b.title}: ${b.subtitle}` : b.title, authors: b.authors, publisher: b.publisher, year: b.year, subjects: b.subjects, isbn13: b.isbn13, approximate: b.confidence === 'approximate', }; diff --git a/src/server/db.test.ts b/src/server/db.test.ts index 18f0a11..d2b595a 100644 --- a/src/server/db.test.ts +++ b/src/server/db.test.ts @@ -59,3 +59,49 @@ test('settings and cache', () => { db.cache.set('k', 'w'); assert.equal(db.cache.get('k'), 'w'); }); + +test('a database made before the hierarchy tail gets the column; old books read as not looked for', async () => { + const { DatabaseSync } = await import('node:sqlite'); + const { mkdtempSync, rmSync } = await import('node:fs'); + const { tmpdir } = await import('node:os'); + const { join } = await import('node:path'); + const dir = mkdtempSync(join(tmpdir(), 'booksorter-migrate-')); + try { + const path = join(dir, 'old.db'); + const old = new DatabaseSync(path); + old.exec(` + CREATE TABLE books ( + id INTEGER PRIMARY KEY AUTOINCREMENT, isbn13 TEXT UNIQUE, lccn TEXT, title TEXT NOT NULL, subtitle TEXT, + authors TEXT NOT NULL DEFAULT '[]', publisher TEXT, year INTEGER, subjects TEXT NOT NULL DEFAULT '[]', + call_number TEXT, sort_key TEXT, confidence TEXT, source TEXT, dewey TEXT, + status TEXT NOT NULL DEFAULT 'pending', attention_reason TEXT, manual_override INTEGER NOT NULL DEFAULT 0, + in_queue INTEGER NOT NULL DEFAULT 0, printed_at TEXT, created_at TEXT NOT NULL, updated_at TEXT NOT NULL + ); + CREATE TABLE source_cache (key TEXT PRIMARY KEY, body TEXT NOT NULL); + CREATE TABLE settings (key TEXT PRIMARY KEY, value TEXT NOT NULL); + INSERT INTO books (isbn13, title, call_number, sort_key, confidence, source, status, in_queue, printed_at, created_at, updated_at) + VALUES ('9780874805451', 'Canyoneering 3', 'GV199.42.U82 G733 1997', 'GV 0199.42 U82 G733 1997', 'exact', 'loc-isbn', + 'resolved', 1, '2026-01-02T00:00:00.000Z', '2026-01-01T00:00:00.000Z', '2026-01-01T00:00:00.000Z'); + `); + old.close(); + + const db = openDb(path); + const before = db.listBooks()[0]!; + assert.equal(before.hierarchyTail, null); + assert.equal(before.callNumber, 'GV199.42.U82 G733 1997'); + assert.deepEqual(db.listTailMissingIds(), [before.id]); + const after = db.updateBook(before.id, { hierarchyTail: ['Utah'] })!; + assert.deepEqual(after.hierarchyTail, ['Utah']); + assert.equal(after.printedAt, before.printedAt); + assert.equal(db.updateBook(before.id, { hierarchyTail: [] })!.hierarchyTail?.length, 0); + assert.deepEqual(db.listTailMissingIds(), []); + assert.equal(db.updateBook(before.id, { hierarchyTail: null })!.hierarchyTail, null); + db.close(); + + const again = openDb(path); // opening a migrated database again is harmless + assert.equal(again.listBooks().length, 1); + again.close(); + } finally { + rmSync(dir, { recursive: true, force: true }); + } +}); diff --git a/src/server/db.ts b/src/server/db.ts index c396c46..b1f3d71 100644 --- a/src/server/db.ts +++ b/src/server/db.ts @@ -12,7 +12,7 @@ export interface NewBook { authors?: string[]; publisher?: string | null; year?: number | null; subjects?: string[]; callNumber?: string | null; sortKey?: string | null; confidence?: Confidence | null; source?: Source | null; dewey?: string | null; status?: Status; attentionReason?: string | null; - manualOverride?: boolean; inQueue?: boolean; + manualOverride?: boolean; inQueue?: boolean; hierarchyTail?: string[] | null; } export type BookPatch = Partial>; export type Filter = 'all' | 'queue' | 'attention'; @@ -25,6 +25,8 @@ export interface Db { updateBook(id: number, patch: BookPatch): Book | null; deleteBook(id: number): boolean; listPendingIds(): number[]; + /** Books that are not pending and whose hierarchy tail has not been looked for yet. */ + listTailMissingIds(): number[]; getSettings(): Settings; putSettings(s: Settings): void; cache: ForgettableCache; @@ -38,12 +40,13 @@ const COLUMNS: Record = { publisher: 'publisher', year: 'year', subjects: 'subjects', callNumber: 'call_number', sortKey: 'sort_key', confidence: 'confidence', source: 'source', dewey: 'dewey', status: 'status', attentionReason: 'attention_reason', manualOverride: 'manual_override', - inQueue: 'in_queue', printedAt: 'printed_at', + inQueue: 'in_queue', printedAt: 'printed_at', hierarchyTail: 'hierarchy_tail', }; const JSON_FIELDS = new Set(['authors', 'subjects']); const BOOL_FIELDS = new Set(['manualOverride', 'inQueue']); function toRow(key: string, v: unknown): unknown { + if (key === 'hierarchyTail') return v == null ? null : JSON.stringify(v); // null stays NULL: not looked for yet if (JSON_FIELDS.has(key)) return JSON.stringify(v ?? []); if (BOOL_FIELDS.has(key)) return v ? 1 : 0; return v === undefined ? null : v; @@ -57,6 +60,7 @@ function toBook(r: Row): Book { confidence: r.confidence, source: r.source, dewey: r.dewey, status: r.status, attentionReason: r.attention_reason, manualOverride: !!r.manual_override, inQueue: !!r.in_queue, printedAt: r.printed_at, createdAt: r.created_at, updatedAt: r.updated_at, + hierarchyTail: r.hierarchy_tail == null ? null : JSON.parse(r.hierarchy_tail), }; } @@ -94,12 +98,17 @@ export function openDb(path: string): Db { CREATE TABLE IF NOT EXISTS settings (key TEXT PRIMARY KEY, value TEXT NOT NULL); `); + // Additive migration: a database made before the hierarchy tail existed gets the column; nothing else changes. + if (!(db.prepare('PRAGMA table_info(books)').all() as Row[]).some((c) => c.name === 'hierarchy_tail')) { + db.exec('ALTER TABLE books ADD COLUMN hierarchy_tail TEXT'); + } + const getById = db.prepare('SELECT * FROM books WHERE id = ?'); const getByIsbn = db.prepare('SELECT * FROM books WHERE isbn13 = ?'); const insert = db.prepare(`INSERT INTO books (isbn13, lccn, title, subtitle, authors, publisher, year, subjects, call_number, sort_key, confidence, source, dewey, status, attention_reason, - manual_override, in_queue, created_at, updated_at) - VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) + manual_override, in_queue, created_at, updated_at, hierarchy_tail) + VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) ON CONFLICT(isbn13) DO NOTHING`); const self: Db = { @@ -110,7 +119,7 @@ export function openDb(path: string): Db { f.publisher ?? null, f.year ?? null, JSON.stringify(f.subjects ?? []), f.callNumber ?? null, f.sortKey ?? null, f.confidence ?? null, f.source ?? null, f.dewey ?? null, f.status ?? 'pending', f.attentionReason ?? null, f.manualOverride ? 1 : 0, - (f.inQueue ?? true) ? 1 : 0, now, now, + (f.inQueue ?? true) ? 1 : 0, now, now, f.hierarchyTail == null ? null : JSON.stringify(f.hierarchyTail), ); if (r.changes === 0 && f.isbn13) return { book: self.findByIsbn(f.isbn13)!, created: false }; return { book: self.getBook(Number(r.lastInsertRowid))!, created: true }; @@ -153,6 +162,9 @@ export function openDb(path: string): Db { listPendingIds() { return (db.prepare("SELECT id FROM books WHERE status = 'pending' ORDER BY id").all() as Row[]).map((r) => r.id); }, + listTailMissingIds() { + return (db.prepare("SELECT id FROM books WHERE hierarchy_tail IS NULL AND status != 'pending' ORDER BY id").all() as Row[]).map((r) => r.id); + }, getSettings() { const r = db.prepare("SELECT value FROM settings WHERE key = 'settings'").get() as Row | undefined; return r ? { ...DEFAULT_SETTINGS, ...JSON.parse(r.value) } : { ...DEFAULT_SETTINGS }; diff --git a/src/server/hierarchy.test.ts b/src/server/hierarchy.test.ts new file mode 100644 index 0000000..694c0fc --- /dev/null +++ b/src/server/hierarchy.test.ts @@ -0,0 +1,65 @@ +import { test } from 'node:test'; +import assert from 'node:assert/strict'; +import { hasClassCutter, hierarchyOf, outlineLevels, outlineRangesFor } from './hierarchy.ts'; +import { OUTLINE_RANGES } from './lcc-ranges.ts'; + +test('GV199.42 nests Hiking inside Outdoor life inside Recreation', () => { + assert.deepEqual(outlineLevels('GV199.42'), [ + 'Geography. Anthropology. Recreation', 'Recreation. Leisure', + 'Outdoor life. Outdoor recreation', 'Hiking. Pedestrian tours', + ]); +}); + +test('spot checks across the outline', () => { + const last = (cn: string) => outlineLevels(cn).at(-1); + assert.equal(last('QA76.73'), 'Electronic computers. Computer science'); + assert.equal(last('QE28'), 'General'); + assert.equal(last('F824.3'), 'Utah'); + assert.equal(last('F867'), 'California'); + assert.equal(last('RD563'), 'Surgery by region, system, or organ'); + assert.equal(last('SH456.27'), 'Angling'); + assert.equal(last('TX907.3'), 'Hospitality industry. Hotels, clubs, restaurants, etc. Food service'); + assert.equal(outlineLevels('PS3545').at(-1), '1900-1960'); +}); + +test('decimals are compared as numbers, and the cutters after the class do not matter', () => { + assert.deepEqual(outlineLevels('GV199.42.U82 U564 2024'), outlineLevels('GV199.42')); + assert.notDeepEqual(outlineLevels('GV199.7'), outlineLevels('GV199.42')); // between 199.62 and 199.8 + assert.ok(!outlineLevels('GV199.7').includes('Hiking. Pedestrian tours')); + assert.ok(!outlineLevels('GV199.8').includes('Hiking. Pedestrian tours')); +}); + +test('consecutive duplicate captions collapse; letters outside the outline stop at what is known', () => { + const levels = outlineLevels('GV199.42'); + assert.equal(levels.filter((l) => l === 'Recreation. Leisure').length, 1); + assert.deepEqual(outlineLevels('ZZ1'), ['Bibliography. Library science. Information resources (General)']); + assert.deepEqual(outlineLevels('not a number'), []); +}); + +test('a range ending on a whole number holds that number\'s decimals; a sibling that starts later wins', () => { + assert.ok(outlineLevels('HD5660.5').some((l) => l.startsWith('Employee participation'))); + assert.ok(!outlineLevels('HD5661').some((l) => l.startsWith('Employee participation'))); +}); + +test('ranges bounded by cutters apply to the first cutter only', () => { + const rows = OUTLINE_RANGES['DT']!.filter((r) => r[3] !== undefined); + assert.ok(rows.length > 0); + assert.ok(outlineLevels('F1569.C2').includes('Canal Zone. Panama Canal')); + assert.ok(outlineLevels('F1569.C23 Z8').includes('Canal Zone. Panama Canal')); // C23 continues C2 + assert.ok(!outlineLevels('F1569.D3').includes('Canal Zone. Panama Canal')); + assert.ok(!outlineLevels('F1569').includes('Canal Zone. Panama Canal')); + assert.ok(outlineRangesFor('DT', 469, { letter: 'M', digits: '25' }).includes('Madagascar')); + assert.ok(!outlineRangesFor('DT', 469, { letter: 'M', digits: '5' }).includes('Madagascar')); +}); + +test('the tail is used only when the class part carries a cutter', () => { + assert.equal(hasClassCutter('GV199.42.U82 U564 2024'), true); + assert.equal(hasClassCutter('QE28 .L22 2007'), false); + assert.equal(hasClassCutter('GV199.42'), false); + const h = hierarchyOf('GV199.42.U82 U564 2024', ['Utah', 'Uinta Mountains']); + assert.deepEqual(h.tail, ['Utah', 'Uinta Mountains']); + assert.equal(h.outline.at(-1), 'Hiking. Pedestrian tours'); + assert.deepEqual(hierarchyOf('QE28 .L22 2007', ['Utah']).tail, []); + assert.deepEqual(hierarchyOf('GV199.42.U82 U564 2024', null).tail, []); + assert.deepEqual(hierarchyOf(null, ['Utah']), { outline: [], tail: [] }); +}); diff --git a/src/server/hierarchy.ts b/src/server/hierarchy.ts new file mode 100644 index 0000000..295a4e0 --- /dev/null +++ b/src/server/hierarchy.ts @@ -0,0 +1,79 @@ +// The plain-word hierarchy of a call number: outline levels from the LC Classification Outline (decided by the +// letters and number alone), then the tail taken from the catalogue record's subject heading (stored per book). +import { parseCallNumber } from '../shared/callnumber.ts'; +import { classNames } from '../shared/lcc-outline.ts'; +import type { Hierarchy } from '../shared/types.ts'; +import { OUTLINE_RANGES } from './lcc-ranges.ts'; +import type { OutlineRange } from './lcc-ranges.ts'; + +type Cutter = { letter: string; digits: string }; + +/** Compare a call number's cutter with a bound such as "U45" or "Z": letter first, then the digits as a decimal. */ +function cmpCutter(c: Cutter, bound: string): number { + const bl = bound[0]!; + if (c.letter !== bl) return c.letter < bl ? -1 : 1; + const a = c.digits.replace(/[a-z]+$/, ''), b = bound.slice(1); + const n = Math.max(a.length, b.length); + const x = a.padEnd(n, '0'), y = b.padEnd(n, '0'); + return x < y ? -1 : x > y ? 1 : 0; +} +/** At or below an upper bound; a cutter that only continues the bound's digits ("M385" for "M38") is inside it. */ +function atMost(c: Cutter, bound: string): boolean { + return cmpCutter(c, bound) <= 0 || (c.letter === bound[0] && c.digits.startsWith(bound.slice(1))); +} + +interface Hit { r: OutlineRange; index: number; ext: boolean } + +/** The ranges of the outline that contain this number, broadest first. */ +export function outlineRangesFor(letters: string, x: number, firstCutter: Cutter | null): string[] { + const rows = OUTLINE_RANGES[letters]; + if (!rows) return []; + const hits: Hit[] = []; + rows.forEach((r, index) => { + const [lo, hi, , cl, ch] = r; + const cutters = cl !== undefined || ch !== undefined; + // A range that ends on a whole number also takes that number's decimals (HD5650-5660 holds HD5660.5); + // a single number is exactly itself. + const ext = !cutters && hi > lo && Number.isInteger(hi) && x > hi && x < hi + 1; + if (x < lo || (x > hi && !ext)) return; + if (cutters) { + if (x === lo && cl) { if (!firstCutter || cmpCutter(firstCutter, cl) < 0) return; } + if (x === hi && ch) { if (!firstCutter || !atMost(firstCutter, ch)) return; } + if (lo === hi && !firstCutter) return; + } + hits.push({ r, index, ext }); + }); + // A range reached only through the decimal extension is dropped when another range that holds the number + // is neither around it nor inside it (two siblings cannot both be right). + const sure = hits.filter((h) => !h.ext); + const kept = hits.filter((h) => !h.ext || sure.every((s) => + (s.r[0] <= h.r[0] && s.r[1] >= h.r[1]) || (s.r[0] >= h.r[0] && s.r[1] <= h.r[1] + 1))); + kept.sort((a, b) => a.r[0] - b.r[0] || b.r[1] - a.r[1] || (a.r[3] === undefined ? 0 : 1) - (b.r[3] === undefined ? 0 : 1) || a.index - b.index); + return kept.map((h) => h.r[2]); +} + +function collapse(levels: string[]): string[] { + return levels.filter((l, i) => l && l !== levels[i - 1]); +} + +/** Main class, subclass, then every nested outline range, general to specific. */ +export function outlineLevels(callNumber: string): string[] { + const cn = parseCallNumber(callNumber); + if (!cn) return []; + const names = classNames(cn.letters); + const x = Number(cn.number + (cn.decimal ? '.' + cn.decimal : '')); + const ranges = outlineRangesFor(cn.letters, x, cn.cutters[0] ?? null); + return collapse([names.className ?? '', names.subclassName ?? '', ...ranges]); +} + +/** The tail applies only when the class part of the number (card line 1) carries a cutter, as in GV199.42.U82 U564. */ +export function hasClassCutter(callNumber: string): boolean { + const cn = parseCallNumber(callNumber); + return !!cn && cn.cutters.length >= 2; +} + +export function hierarchyOf(callNumber: string | null, tail: string[] | null): Hierarchy { + if (!callNumber) return { outline: [], tail: [] }; + const outline = outlineLevels(callNumber); + return { outline, tail: hasClassCutter(callNumber) ? collapse(tail ?? []) : [] }; +} diff --git a/src/server/jobs.test.ts b/src/server/jobs.test.ts index 7bdfa50..0a71d9a 100644 --- a/src/server/jobs.test.ts +++ b/src/server/jobs.test.ts @@ -3,6 +3,7 @@ import assert from 'node:assert/strict'; import { openDb } from './db.ts'; import { createJobs, DEFAULT_RETRY_DELAYS_MS } from './jobs.ts'; import type { ResolverLike } from './jobs.ts'; +import type { NewBook } from './db.ts'; import type { Book, Resolution } from '../shared/types.ts'; class TemporaryError extends Error {} @@ -17,7 +18,7 @@ function setup(resolve: ResolverLike['resolve'], delays = [0, 0, 0]) { const db = openDb(':memory:'); const changes: Book[] = []; const logs: string[] = []; - const resolver: ResolverLike = { resolve, search: async () => [] }; + const resolver: ResolverLike = { resolve, tail: async () => [], search: async () => [] }; const jobs = createJobs({ db, resolver, onChange: (b) => changes.push(b), retryDelaysMs: delays, log: (l) => logs.push(l) }); return { db, jobs, changes, logs }; } @@ -258,3 +259,84 @@ test('an LCCN placeholder title counts as empty', async () => { await jobs.idle(); assert.equal(db.getBook(book.id)!.title, 'The Rust Book'); }); + +function tailBook(db: ReturnType, over: Partial) { + return db.insertPending({ + status: 'resolved', callNumber: 'GV199.42.U82 U564 2024', sortKey: 'GV 0199.42 U82', confidence: 'exact', + source: 'loc-isbn', inQueue: false, title: 'T', ...over, + }).book; +} + +test('lookup stores the tail; the tail stays unknown (NULL) when the catalogue could not be asked', async () => { + const a = setup(async () => ({ ...found, tail: ['Utah'] })); + const x = a.db.insertPending({ isbn13: '9781593278281', title: '9781593278281' }).book; + a.jobs.enqueue(x.id); + await a.jobs.idle(); + assert.deepEqual(a.db.getBook(x.id)!.hierarchyTail, ['Utah']); + const b = setup(async () => ({ ...found, tail: null })); + const y = b.db.insertPending({ isbn13: '9781593278281', title: '9781593278281' }).book; + b.jobs.enqueue(y.id); + await b.jobs.idle(); + assert.equal(b.db.getBook(y.id)!.status, 'resolved'); + assert.equal(b.db.getBook(y.id)!.hierarchyTail, null); +}); + +test('tail backfill changes only the tail, emits the update, and never touches status or the number', async () => { + const calls: unknown[] = []; + const { db, changes } = setup(async () => found); + const resolver: ResolverLike = { + resolve: async () => { throw new Error('no lookup'); }, search: async () => [], + tail: async (i) => { calls.push(i); return ['Utah', 'Uinta Mountains']; }, + }; + const j = createJobs({ db, resolver, onChange: (b) => changes.push(b), retryDelaysMs: [0], log: () => {} }); + const printed = '2026-02-03T00:00:00.000Z'; + const b = tailBook(db, { isbn13: '9781593278281' }); + db.updateBook(b.id, { printedAt: printed, inQueue: true, confidence: 'approximate' }); + const before = db.getBook(b.id)!; + j.resumeTails(); + await j.idle(); + const after = db.getBook(b.id)!; + assert.deepEqual(after.hierarchyTail, ['Utah', 'Uinta Mountains']); + for (const k of ['callNumber', 'sortKey', 'confidence', 'source', 'status', 'attentionReason', 'inQueue', 'printedAt', 'manualOverride'] as const) { + assert.deepEqual(after[k], before[k], k); + } + assert.ok(changes.some((c) => c.id === b.id && c.hierarchyTail !== null), 'book-updated event'); + assert.equal(calls.length, 1); +}); + +test('tail backfill: no identifiers, hand entries and similar numbers get [] without asking', async () => { + const { db } = setup(async () => found); + const asked: unknown[] = []; + const resolver: ResolverLike = { resolve: async () => found, search: async () => [], tail: async (i) => { asked.push(i); return ['X']; } }; + const jobs = createJobs({ db, resolver, onChange: () => {}, retryDelaysMs: [0], log: () => {} }); + const none = tailBook(db, { title: 'no ids' }); + const manual = tailBook(db, { isbn13: '9780000000002', manualOverride: true, source: 'manual' }); + const similar = tailBook(db, { isbn13: '9780000000019', source: 'similar' }); + const byHand = tailBook(db, { lccn: '2012047313', source: 'manual' }); + const pending = db.insertPending({ isbn13: '9780000000026', title: 'p' }).book; // status pending: the lookup's job + jobs.resumeTails(); + await jobs.idle(); + for (const b of [none, manual, similar, byHand]) assert.deepEqual(db.getBook(b.id)!.hierarchyTail, [], b.title); + assert.equal(db.getBook(pending.id)!.hierarchyTail, null); + assert.equal(asked.length, 0); +}); + +test('tail backfill: a temporary failure is retried, then left NULL for the next start; a missing record stores []', async () => { + const { db } = setup(async () => found); + let n = 0; + const logs: string[] = []; + const resolver: ResolverLike = { + resolve: async () => found, search: async () => [], + tail: async (i) => { n++; if (i.isbn13 === '9780000000002') throw new TemporaryError('loc.gov busy'); return []; }, + }; + const jobs = createJobs({ db, resolver, onChange: () => {}, retryDelaysMs: [0, 0], isTemporary: (e) => e instanceof TemporaryError, log: (l) => logs.push(l) }); + const busy = tailBook(db, { isbn13: '9780000000002' }); + const empty = tailBook(db, { isbn13: '9780000000019' }); + jobs.resumeTails(); + await jobs.idle(); + assert.equal(db.getBook(busy.id)!.hierarchyTail, null); + assert.equal(db.getBook(busy.id)!.status, 'resolved'); + assert.deepEqual(db.getBook(empty.id)!.hierarchyTail, []); + assert.equal(n, 4); // busy: first try and two retries; empty: once + assert.ok(logs.some((l) => l.includes('left for the next start'))); +}); diff --git a/src/server/jobs.ts b/src/server/jobs.ts index efb3bf1..86d8e65 100644 --- a/src/server/jobs.ts +++ b/src/server/jobs.ts @@ -10,6 +10,11 @@ export interface Jobs { /** `fresh`: the lookup ignores every cached source answer ("Look up again"), through its retries too. */ enqueue(id: number, opts?: { fresh?: boolean }): void; resume(): void; + /** + * Backfill, for books made before the hierarchy tail existed: look up only the tail (nothing else about the book + * changes). Books that cannot have one get [] at once; a temporary failure leaves NULL for the next start. + */ + resumeTails(): void; idle(): Promise; } @@ -43,6 +48,9 @@ export function createJobs(deps: { const fresh = new Set(); // Books waiting for a retry: they hold no worker; a timer puts them back in the queue. const waiting = new Map>(); + // The tail backfill queues behind real lookups, and retries on its own timers. + const tailQueue: number[] = []; + const tailAttempts = new Map(); let running: Promise | null = null; let idlers = 0; let wake: (() => void)[] = []; @@ -105,18 +113,19 @@ export function createJobs(deps: { if (!cur) return; if (res.meta) applyMeta(id, res.meta); const dewey = res.dewey ?? cur.dewey ?? undefined; + const tail = res.tail !== undefined && res.tail !== null ? { hierarchyTail: res.tail } : {}; if (cur.manualOverride) { - emit(id, { dewey }); + emit(id, { dewey, ...(cur.hierarchyTail === null ? { hierarchyTail: [] } : {}) }); log(`[lookup] ${label}: kept the hand-entered call number (${took()})`); } else if (res.callNumber) { emit(id, { callNumber: res.callNumber, sortKey: res.sortKey, confidence: res.confidence, - source: res.source, dewey, status: 'resolved', attentionReason: null, + source: res.source, dewey, status: 'resolved', attentionReason: null, ...tail, }); log(`[lookup] ${label}: ${res.callNumber} (${res.source === 'similar' && similar ? `similar ${similar}` : res.source}) in ${took()}`); } else { const reason = res.reason ?? 'No Library of Congress number found'; - emit(id, { dewey, status: 'needs_attention', attentionReason: reason }); + emit(id, { dewey, status: 'needs_attention', attentionReason: reason, ...tail }); log(`[lookup] ${label}: no call number, ${reason} in ${took()}`); } } catch (e) { @@ -138,17 +147,62 @@ export function createJobs(deps: { } } + /** Sources whose number never comes with a tail of its own: borrowed from similar books, or entered by hand. */ + const NO_TAIL_SOURCES = new Set(['similar', 'manual']); + + async function backfillTail(id: number): Promise { + const book = db.getBook(id); + if (!book || book.hierarchyTail !== null || book.status === 'pending') { tailAttempts.delete(id); return; } + const label = book.isbn13 ?? book.lccn ?? book.title; + // Only the tail column is ever written here: the number, sort key, confidence, source, status, queue flag and + // printed date stay as they are. + if ((!book.isbn13 && !book.lccn) || book.manualOverride || (book.source && NO_TAIL_SOURCES.has(book.source))) { + tailAttempts.delete(id); + emit(id, { hierarchyTail: [] }); + return; + } + const n = tailAttempts.get(id) ?? 0; + try { + const tail = await resolver.tail({ + ...(book.isbn13 ? { isbn13: book.isbn13 } : {}), ...(book.lccn ? { lccn: book.lccn } : {}), + title: book.title, ...(book.authors[0] ? { author: book.authors[0] } : {}), + viaTitle: book.source === 'loc-title' || book.source === 'ol-work', + }); + tailAttempts.delete(id); + emit(id, { hierarchyTail: tail }); + log(`[tail] ${label}: ${tail.length ? tail.join(' / ') : 'no usable subject heading'}`); + } catch (e) { + const message = e instanceof Error ? e.message : String(e); + if (isTemporary(e) && n < delays.length) { + tailAttempts.set(id, n + 1); + const delay = delays[n]!; + log(`[tail] ${label}: ${message}; trying again in ${Math.round(delay / 1000)} s`); + const t = setTimeout(() => { waiting.delete(-id); tailQueue.push(id); start(); notify(); }, delay); + if (idlers === 0) t.unref(); + waiting.set(-id, t); // a negative key keeps tail retries apart from lookup retries + return; + } + tailAttempts.delete(id); + log(`[tail] ${label}: left for the next start, ${message}`); // NULL stays: the next start tries again + } + } + async function drain(): Promise { - while (queue.length) { - const id = queue.shift()!; - queued.delete(id); - try { await attempt(id); } catch { /* a failure on one book must not stop the queue */ } + while (queue.length || tailQueue.length) { + if (queue.length) { + const id = queue.shift()!; + queued.delete(id); + try { await attempt(id); } catch { /* a failure on one book must not stop the queue */ } + } else { + const id = tailQueue.shift()!; + try { await backfillTail(id); } catch { /* ditto */ } + } } } function start(): void { if (running) return; - running = drain().finally(() => { running = null; if (queue.length) start(); notify(); }); + running = drain().finally(() => { running = null; if (queue.length || tailQueue.length) start(); notify(); }); } return { @@ -163,11 +217,15 @@ export function createJobs(deps: { start(); }, resume() { for (const id of db.listPendingIds()) this.enqueue(id); }, + resumeTails() { + for (const id of db.listTailMissingIds()) if (!tailQueue.includes(id)) tailQueue.push(id); + start(); + }, async idle() { idlers++; for (const t of waiting.values()) t.ref(); try { - while (running || queue.length || waiting.size) { + while (running || queue.length || tailQueue.length || waiting.size) { if (running) await running; else await new Promise((r) => { wake.push(r); }); } diff --git a/src/server/lcc-ranges.ts b/src/server/lcc-ranges.ts new file mode 100644 index 0000000..d862c74 --- /dev/null +++ b/src/server/lcc-ranges.ts @@ -0,0 +1,7598 @@ +// GENERATED by scripts/gen-lcc-outline.ts -- do not edit by hand. +// Source: Library of Congress Classification Outline, https://www.loc.gov/catdir/cpso/lcco/ +// (a US government publication). Re-run: node scripts/gen-lcc-outline.ts +// Server only: the web app does not import this file. + +/** [lo, hi, caption], or [lo, hi, caption, cutterLo, cutterHi] for a range bounded by cutters. Captions are verbatim. */ +export type OutlineRange = [lo: number, hi: number, caption: string, cutterLo?: string, cutterHi?: string]; + +/** Every range of the outline by class letters, in outline order (a range comes before the ranges nested in it). */ +export const OUTLINE_RANGES: Record = { + AC: [ + [1,999,"Collections. Series. Collected works"], + [1,195,"Collections of monographs, essays, etc."], + [1,8,"American and English"], + [9,195,"Other languages"], + [200,200,"Collections for Jewish readers"], + [801,895,"Inaugural and program dissertations"], + [901,995,"Pamphlet collections"], + [999,999,"Scrapbooks"], + ], + AE: [ + [1,90,"Encyclopedias"], + [5,90,"By language"], + ], + AG: [ + [2,600,"Dictionaries and other general reference works"], + ], + AI: [ + [1,21,"Indexes"], + ], + AM: [ + [1,501,"Museums. Collectors and collecting"], + [10,100,"By country"], + [111,160,"Museology. Museum methods, technique, etc."], + [200,501,"Collectors and collecting"], + ], + AP: [ + [1,271,"Periodicals"], + [101,115,"Humorous periodicals"], + [200,230,"Juvenile periodicals"], + [250,265,"Periodicals for women"], + [270,271,"Periodicals for Blacks"], + ], + AS: [ + [1,945,"Academies and learned societies"], + [2.5,4,"International associations, congresses, conferences, etc."], + [11,785,"By region or country"], + ], + AY: [ + [10,2001,"Yearbooks. Almanacs. Directories"], + [10,29,"Annuals"], + [30,1730,"Almanacs"], + [2001,2001,"Directories. General works on the compilation of directories, etc."], + ], + AZ: [ + [20,999,"History of scholarship and learning. The humanities"], + [101,181,"Philosophy. Theory"], + [191,193,"Evaluation"], + [200,361,"History"], + [501,908,"By region or country"], + ], + B: [ + [1,5802,"Philosophy (General)"], + [69,99,"General works"], + [108,5802,"By period"], + [108,708,"Ancient"], + [720,765,"Medieval"], + [770,785,"Renaissance"], + [790,5802,"Modern"], + [808,849,"Special topics and schools of philosophy"], + [850,5739,"By region or country"], + [5800,5802,"By religion"], + ], + BC: [ + [1,199,"Logic"], + [11,39,"History"], + [25,39,"By period"], + [60,99,"General works"], + [171,199,"Special topics"], + ], + BD: [ + [10,701,"Speculative philosophy"], + [10,41,"General philosophical works"], + [95,131,"Metaphysics"], + [143,237,"Epistemology. Theory of knowledge"], + [240,260,"Methodology"], + [300,450,"Ontology"], + [493,701,"Cosmology"], + ], + BF: [ + [1,990,"Psychology"], + [38,64,"Philosophy. Relation to other topics"], + [173,175.5,"Psychoanalysis"], + [176,176.5,"Psychological tests and testing"], + [180,198.7,"Experimental psychology"], + [203,203,"Gestalt psychology"], + [207,209,"Psychotropic drugs and other substances"], + [231,299,"Sensation. Aesthesiology"], + [309,499,"Consciousness. Cognition"], + [501,505,"Motivation"], + [511,593,"Affection. Feeling. Emotion"], + [608,635,"Will. Volition. Choice. Control"], + [636,637,"Applied psychology"], + [638,648,"New Thought. Menticulture, etc."], + [660,685,"Comparative psychology. Animal and human psychology"], + [692,692.5,"Psychology of sex. Sexual behavior"], + [697,697.5,"Differential psychology. Individuality. Self"], + [698,698.9,"Personality"], + [699,711,"Genetic psychology"], + [712,724.85,"Developmental psychology"], + [725,727,"Class psychology"], + [795,839,"Temperament. Character"], + [839.8,885,"Physiognomy. Phrenology"], + [889,905,"Graphology. Study of handwriting"], + [908,940,"The hand. Palmistry"], + [1001,1389,"Parapsychology"], + [1001,1045,"Psychic research. Psychology of the conscious"], + [1048,1108,"Hallucinations. Sleep. Dreaming. Visions"], + [1111,1156,"Hypnotism. Suggestion. Mesmerism. Subliminal projection"], + [1161,1171,"Telepathy. Mind reading. Thought transference"], + [1228,1389,"Spiritualism"], + [1404,2055,"Occult sciences"], + [1444,1486,"Ghosts. Apparitions. Hauntings"], + [1501,1562,"Demonology. Satanism. Possession"], + [1562.5,1584,"Witchcraft"], + [1585,1623,"Magic. Hermetics. Necromancy"], + [1651,1729,"Astrology"], + [1745,1779,"Oracles. Sibyls. Divinations"], + [1783,1815,"Seers. Prophets. Prophecies"], + [1845,1891,"Fortune-telling"], + [2050,2055,"Human-alien encounters. Contact between humans and extraterrestrials"], + ], + BH: [ + [1,301,"Aesthetics"], + [81,208,"History"], + [301,301,"Special topics"], + ], + BJ: [ + [1,1725,"Ethics"], + [71,1185,"History and general works"], + [1188,1295,"Religious ethics"], + [1298,1335,"Evolutionary and genetic ethics"], + [1365,1385,"Positivist ethics"], + [1388,1388,"Socialist ethics"], + [1390,1390.5,"Communist ethics"], + [1392,1392,"Totalitarian ethics"], + [1395,1395,"Feminist ethics"], + [1518,1697,"Individual ethics. Character. Virtue"], + [1725,1725,"Ethics of social groups, classes, etc. Professional ethics"], + [1801,2195,"Social usages. Etiquette"], + [2021,2078,"Etiquette of entertaining"], + [2139,2156,"Etiquette of travel"], + [2195,2195,"Telephone etiquette"], + ], + BL: [ + [1,2790,"Religions. Mythology. Rationalism"], + [1,50,"Religion (General)"], + [51,65,"Philosophy of religion. Psychology of religion. Religion in relation to other subjects"], + [70,71,"Sacred books (General)"], + [71.5,73,"Biography"], + [74,99,"Religions of the world"], + [175,265,"Natural theology"], + [175,190,"General"], + [200,200,"Theism"], + [205,216,"Nature and attributes of Deity"], + [217,217,"Polytheism"], + [218,218,"Dualism"], + [220,220,"Pantheism"], + [221,221,"Monotheism"], + [224,227,"Creation. Theory of the earth"], + [239,265,"Religion and science"], + [270,270,"Unity and plurality"], + [290,290,"The soul"], + [300,325,"The myth. Comparative mythology"], + [350,385,"Classification of religions"], + [410,410,"Religions in relation to one another"], + [425,490,"Religious doctrines (General)"], + [430,430,"Origins of religion"], + [435,457,"Nature worship"], + [458,458,"Women in comparative religion"], + [460,460,"Sex worship. Phallicism"], + [465,470,"Worship of human beings"], + [473,490,"Other"], + [500,547,"Eschatology"], + [550,619,"Worship. Cultus"], + [624,629.5,"Religious life"], + [630,632.5,"Religious organization"], + [660,2680,"History and principles of religions"], + [660,660,"Indo-European. Aryan"], + [685,685,"Ural-Altaic"], + [687,687,"Mediterranean region"], + [689,980,"European. Occidental"], + [700,820,"Classical (Etruscan, Greek, Roman)"], + [830,875,"Germanic and Norse"], + [900,980,"Other European"], + [1000,2370,"Asian. Oriental"], + [1000,1035,"General"], + [1050,1050,"Northern and Central Asia"], + [1055,1055,"Southern and Eastern Asia"], + [1060,1060,"Southwestern Asia. Asia Minor. Levant"], + [1100,1295,"Hinduism"], + [1100,1107.5,"General"], + [1108.2,1108.7,"Religious education"], + [1109.2,1109.7,"Antiquities. Archaeology. Inscriptions"], + [1111,1143.2,"Sacred books. Sources"], + [1112.2,1137.5,"Vedic texts"], + [1140.2,1140.4,"Purānas"], + [1141.2,1142.6,"Tantric texts"], + [1145,1146,"Hindu literature"], + [1153.7,1168,"By region or country"], + [1212.32,1215,"Doctrines. Theology"], + [1216,1225,"Hindu pantheon. Deities"], + [1225.2,1243.58,"Religious life"], + [1243.72,1243.78,"Monasteries. Temples, etc."], + [1271.2,1295,"Modifications. Sects"], + [1284.5,1289.592,"Vaishnavism"], + [1300,1380,"Jainism"], + [1310,1314.2,"Sacred books. Sources"], + [1315,1317,"Jain literature"], + [1375.3,1375.7,"Jaina pantheon. Deities"], + [1376,1378.85,"Forms of worship"], + [1379,1380,"Modifications, etc."], + [1500,1590,"Zoroastrianism (Mazdeism). Parseeism"], + [1595,1595,"Yezidis"], + [1600,1695,"Semitic religions"], + [1600,1605,"General"], + [1610,1610,"Aramean"], + [1615,1616,"Sumerian"], + [1620,1625,"Assyro-Babylonian"], + [1630,1630,"Chaldean"], + [1635,1635,"Harranian. Pseudo-Sabian"], + [1640,1645,"Syrian. Palestinian. Samaritan"], + [1650,1650,"Hebrew"], + [1660,1665,"Phoenician. Carthaginian, etc."], + [1670,1672,"Canaanite"], + [1675,1675,"Moabite. Philistine"], + [1680,1685,"Arabian (except Islam)"], + [1695,1695,"Druses"], + [1710,1710,"Ethiopian"], + [1750,2350,"By region or country"], + [1790,1975,"China"], + [1830,1883,"Confucianism"], + [1899,1942.85,"Taoism"], + [2000,2032,"India"], + [2017,2018.7,"Sikhism"], + [2195,2228,"Japan"], + [2216,2227.8,"Shinto"], + [2230,2240,"Korea"], + [2390,2490,"African"], + [2420,2460,"Egyptian"], + [2500,2592,"American"], + [2600,2630,"Pacific Ocean islands. Oceania"], + [2670,2670,"Arctic regions"], + [2700,2790,"Rationalism"], + ], + BM: [ + [1,990,"Judaism"], + [1,449,"General"], + [70,135,"Study and teaching"], + [150,449,"History"], + [201,449,"By region or country"], + [480,488.8,"Pre-Talmudic Jewish literature (non-Biblical)"], + [495,532,"Sources of Jewish religion. Rabbinical literature"], + [497,509,"Talmudic literature"], + [497,497.8,"Mishnah"], + [498,498.8,"Palestinian Talmud"], + [499,504.7,"Babylonian Talmud"], + [507,507.5,"Baraita"], + [508,508.5,"Tosefta"], + [510,518,"Midrash"], + [520,523.7,"Halacha"], + [525,526,"Cabala"], + [529,529,"Jewish tradition"], + [534,538,"Relation of Judaism to special subject fields"], + [534,536,"Religions"], + [545,582,"Principles of Judaism (General)"], + [585,585.4,"Controversial works against the Jews"], + [590,591,"Jewish works against Christianity and Islam"], + [600,645,"Dogmatic Judaism"], + [646,646,"Heresy, heresies"], + [648,648,"Apologetics"], + [650,747,"Practical Judaism"], + [651,652.7,"Priests, rabbis, etc."], + [653,653.7,"Congregations. Synagogues"], + [654,655.6,"The tabernacle. The temple"], + [656,657,"Forms of worship"], + [660,679,"Liturgy and ritual"], + [690,695,"Festivals and fasts"], + [700,720,"Rites and customs"], + [723,729,"Jewish way of life. Spiritual life. Mysticism. Personal religion. Moral theology"], + [730,747,"Preaching. Homiletics"], + [750,755,"Biography"], + [900,990,"Samaritans"], + ], + BP: [ + [1,610,"Islam. Bahai Faith. Theosophy, etc."], + [1,253,"Islam"], + [1,68,"General"], + [42,48,"Study and teaching"], + [50,68,"History"], + [70,80,"Biography"], + [75,77.75,"Muh. ammad, Prophet, d. 632"], + [87,89,"Islamic literature"], + [100,157,"Sacred books"], + [100,134,"Koran"], + [128.15,129.83,"Special parts and chapters"], + [130,134,"Works about the Koran"], + [135,136.9,"Hadith literature. Traditions. Sunna"], + [137,137.5,"Koranic and other Islamic legends"], + [160,165,"General works on Islam"], + [165.5,165.5,"Dogma (‘Aq~’id)"], + [166,166.94,"Theology (Kal~m)"], + [167.5,167.5,"Heresy, heresies, heretics"], + [168,168,"Apostasy from Islam"], + [169,169,"Works against Islam and the Koran"], + [170,170,"Works in defense of Islam. Islamic apologetics"], + [170.2,170.2,"Benevolent work. Social work. Welfare work, etc."], + [170.3,170.5,"Missionary work of Islam"], + [171,173,"Relation of Islam to other religions"], + [173.25,173.45,"Islamic sociology"], + [174,190,"The practice of Islam"], + [176,181,"The five duties of a Moslem. Pillars of Islam"], + [182,182,"Jihad (Holy War)"], + [184,184.9,"Religious ceremonies, rites, etc."], + [186,186.97,"Special days and seasons, fasts, feasts, festivals, etc. Relics"], + [187,187.9,"Shrines, sacred places, etc."], + [188,190,"Islamic religious life"], + [188.2,188.3,"Devotional literature"], + [188.45,189.65,"Sufism. Mysticism. Dervishes"], + [189.68,189.7,"Monasticism"], + [191,253,"Branches, sects, etc."], + [192,194.9,"Shiites"], + [221,223,"Black Muslims"], + [232,232,"Moorish Science Temple of America"], + [251,253,"Nurculuk"], + [300,395,"Bahai Faith"], + [500,585,"Theosophy"], + [595,597,"Anthroposophy"], + [600,610,"Other beliefs and movements"], + ], + BQ: [ + [1,9800,"Buddhism"], + [1,10,"Periodicals. Yearbooks (General)"], + [12,93,"Societies, councils, associations, clubs, etc."], + [96,99,"Financial institutions. Trusts"], + [100,102,"Congresses. Conferences (General)"], + [104,105,"Directories (General)"], + [107,109,"Museums. Exhibitions"], + [115,126,"General collections. Collected works"], + [128,128,"Encyclopedias (General)"], + [130,130,"Dictionaries (General)"], + [133,133,"Terminology"], + [135,135,"Questions and answers. Maxims (General)"], + [141,209,"Religious education (General)"], + [210,219,"Research"], + [221,249,"Antiquities. Archaeology"], + [240,244,"Literary discoveries"], + [246,249,"Inscriptions, etc."], + [251,799,"History"], + [800,829,"Persecutions"], + [840,999,"Biography"], + [840,858,"Collective"], + [860,999,"Individual"], + [860,939,"Gautama Buddha"], + [940,999,"Other"], + [1001,1045,"Buddhist literature"], + [1100,3340,"Tripit. aka (Canonical literature)"], + [4000,4060,"General works"], + [4061,4570,"Doctrinal and systematic Buddhism"], + [4180,4565,"Special doctrines"], + [4570,4570,"Special topics and relations to special subjects"], + [4600,4610,"Relation to other religious and philosophical systems"], + [4620,4905,"Buddhist pantheon"], + [4911,5720,"Practice of Buddhism. Forms of worship"], + [4965,5030,"Ceremonies and rites. Ceremonial rules"], + [5035,5065,"Hymns. Chants. Recitations"], + [5070,5075,"Altar, liturgical objects, ornaments, memorials, etc."], + [5080,5085,"Vestments, altar cloths, etc."], + [5090,5095,"Liturgical functions"], + [5100,5125,"Symbols and symbolism"], + [5130,5137,"Temple. Temple organization"], + [5140,5355,"Buddhist ministry. Priesthood. Organization"], + [5251,5305,"Education and training"], + [5310,5350,"Preaching"], + [5360,5680,"Religious life"], + [5485,5530,"Precepts for laymen"], + [5535,5594,"Devotional literature. Meditations. Prayers"], + [5595,5633,"Devotion. Meditation. Prayer"], + [5635,5675,"Spiritual life. Mysticism. Englightenment. Perfection"], + [5700,5720,"Festivals. Days and seasons"], + [5725,5845,"Folklore"], + [5821,5845,"Miracle literature"], + [5851,5899,"Benevolent work. Social work. Welfare work, etc."], + [5901,5975,"Missionary work"], + [6001,6160,"Monasticism and monastic life Samgha (Order)"], + [6200,6240,"Asceticism. Hermits. Wayfaring life"], + [6300,6388,"Monasteries. Temples. Shrines. Sites"], + [6400,6495,"Pilgrims and pilgrimages"], + [7001,9800,"Modifications, schools, etc."], + [7100,7285,"Therav~da (Hinayana) Buddhism"], + [7300,7529,"Mahayana Buddhism"], + [7530,7950,"Tibetan Buddhism (Lamaism)"], + [7960,7989,"Bonpo (Sect)"], + [8000,9800,"Special modifications, sects, etc."], + [8500,8769,"Pure Land Buddhism"], + [8900,9099,"Tantric Buddhism"], + [9250,9519,"Zen Buddhism"], + ], + BR: [ + [1,1725,"Christianity"], + [60,67,"Early Christian literature. Fathers of the Church, etc."], + [115,115,"Christianity in relation to special subjects"], + [130,133.5,"Christian antiquities. Archaeology. Museums"], + [140,1510,"History"], + [160,481,"By period"], + [160,275,"Early and medieval"], + [280,280,"Renaissance. Renaissance and Reformation"], + [290,481,"Modern period"], + [323.5,334.2,"Luther, Martin"], + [500,1510,"By region or country"], + [1600,1609,"Persecution. Martyrs"], + [1609.5,1609.5,"Dissent"], + [1610,1610,"Tolerance and toleration"], + [1615,1617,"Liberalism"], + [1620,1620,"Sacrilege (History)"], + [1690,1725,"Biography"], + ], + BS: [ + [1,2970,"The Bible"], + [11,115,"Early versions"], + [125,355,"Modern texts and versions"], + [125,198,"English"], + [199,313,"Other European languages"], + [315,355,"Non-European languages"], + [315,315,"Asian languages"], + [325,325,"African languages"], + [335,335,"Languages of Oceania and Australasia"], + [345,345,"American Indian languages"], + [350,350,"Mixed languages"], + [355,355,"Artificial languages"], + [410,680,"Works about the Bible"], + [500,534.8,"Criticism and interpretation"], + [535,537,"The Bible as literature"], + [546,558,"Bible stories. Paraphrases of Bible stories. The Bible story"], + [569,580,"Men, women, and children of the Bible"], + [580,580,"Individual Old Testament characters"], + [585,613,"Study and teaching"], + [647,649,"Prophecy"], + [650,667,"Bible and science"], + [670,672,"Bible and social sciences"], + [701,1830,"Old Testament"], + [705,815,"Early versions"], + [825,1013,"Modern texts and versions"], + [1091,1099,"Selections. Quotations"], + [1110,1199,"Works about the Old Testament"], + [1160,1191.5,"Criticism and interpretation"], + [1200,1830,"Special parts of the Old Testament"], + [1901,2970,"New Testament"], + [1937,2020,"Early texts and versions"], + [2025,2213,"Modern texts and versions"], + [2260,2269,"Selections. Quotations"], + [2280,2545,"Works about the New Testament"], + [2350,2393,"Criticism and interpretation"], + [2415,2417,"The teachings of Jesus"], + [2430,2520,"Men, women, and children of the New Testament"], + [2525,2544,"Study and teaching"], + [2547,2970,"Special parts of the New Testament"], + [2640,2765.6,"Epistles of Paul"], + ], + BT: [ + [10,1480,"Doctrinal Theology"], + [19,37,"Doctrine and dogma"], + [93,93.6,"Judaism"], + [95,97.2,"Divine law. Moral government"], + [98,180,"God"], + [109,115,"Doctrine of the Trinity"], + [117,123,"Holy Spirit. The Paraclete"], + [126,127.5,"Revelation"], + [130,153,"Divine attributes"], + [198,590,"Christology"], + [296,500,"Life of Christ"], + [580,580,"Miracles. Apparitions. Shrines, sanctuaries, images, processions, etc."], + [587,587,"Relics"], + [595,680,"Mary, Mother of Jesus Christ. Mariology"], + [650,660,"Miracles. Apparitions. Shrines, sanctuaries, images, processions, etc."], + [695,749,"Creation"], + [750,811,"Salvation. Soteriology"], + [819,891,"Eschatology. Last things"], + [899,940,"Future state. Future life"], + [960,985,"Invisible world (saints, demons, etc.)"], + [990,1010,"Creeds, confessions, covenants, etc."], + [1029,1040,"Catechisms"], + [1095,1255,"Apologetics. Evidences of Christianity"], + [1313,1480,"History of specific doctrines and movements. Heresies and schisms"], + ], + BV: [ + [1,5099,"Practical Theology"], + [5,530,"Worship (Public and private)"], + [30,135,"Times and seasons. The Church year"], + [43,64,"Feast days"], + [65,70,"Saints’ days"], + [80,105,"Fasts"], + [107,133,"Lord’s Day. Sunday. Sabbath"], + [150,168,"Christian symbols and symbolism"], + [169,199,"Liturgy and ritual"], + [200,200,"Family worship"], + [205,287,"Prayer"], + [301,530,"Hymnology"], + [360,465,"Denominational and special types of hymnbooks in English"], + [467,510,"Hymns in languages other than English"], + [590,1652,"Ecclesiastical theology"], + [598,603,"The Church"], + [629,631,"Church and state"], + [637,637.5,"City churches"], + [638,638.8,"The rural church. The church and country life"], + [646,651,"Church polity"], + [652,652.9,"Church management. Efficiency"], + [652.95,657,"Mass media and telecommunication in religion"], + [659,683,"Ministry. Clergy. Religious vocations"], + [700,707,"Parish. Congregation. The local church"], + [770,777,"Church finance. Church property"], + [800,873,"Sacraments. Ordinances"], + [803,814,"Baptism"], + [823,828,"Holy Communion. Lord’s Supper. Eucharist"], + [835,838,"Marriage"], + [840,850,"Penance"], + [895,896,"Shrines. Holy places"], + [900,1450,"Religious societies, associations, etc."], + [950,1280,"Religious societies of men, brotherhoods, etc."], + [1000,1220,"Young Men’s Christian Associations"], + [1300,1395,"Religious societies of women"], + [1300,1393,"Young Women’s Christian Associations"], + [1460,1615,"Religious education (General)"], + [1620,1652,"Social life, recreation, etc., in the church"], + [2000,3705,"Missions"], + [2123,2595,"Special churches"], + [2130,2300,"Roman Catholic Church"], + [2350,2595,"Protestant churches"], + [2610,2695,"Special types of missions"], + [2750,3695,"Missions in individual countries"], + [3750,3799,"Evangelism. Revivals"], + [4000,4470,"Pastoral theology"], + [4019,4180,"Education"], + [4019,4167,"Training for the ordained ministry"], + [4168,4180,"Training for lay workers"], + [4200,4317,"Preaching. Homiletics"], + [4239,4317,"Sermons"], + [4390,4399,"Personal life of the clergy"], + [4400,4470,"Practical church work. Social work. Work of the layman"], + [4485,5099,"Practical religion. The Christian life"], + [4520,4526.2,"Religious duties"], + [4625,4780,"Moral theology"], + [4625,4627,"Sins and vices"], + [4630,4647,"Virtues"], + [4650,4715,"Precepts from the Bible"], + [4720,4780,"Precepts of the Church. Commandments of the Church"], + [4800,4897,"Works of meditation and devotion"], + [4900,4911,"Works of consolation and cheer"], + [4912,4950,"Conversion literature"], + [5015,5068,"Asceticism"], + [5070,5095,"Mysticism"], + [5099,5099,"Quietism"], + ], + BX: [ + [1,9999,"Christian Denominations"], + [1,9.5,"Church unity. Ecumenical movement. Interdenominational cooperation"], + [100,189,"Eastern churches. Oriental churches"], + [100,107,"General"], + [120,129,"Armenian Church"], + [130,139,"Coptic Church"], + [140,149,"Ethiopic or Abyssinian Church"], + [150,159,"Nestorian, Chaldean, or East Syrian Church"], + [160,169,"St. Thomas Christians. Malabar Christians. Mar Thoma Syrian Church"], + [170,179,"Syrian or Jacobite Church"], + [180,189,"Maronite Church"], + [200,756,"Orthodox Eastern Church"], + [200,395,"General"], + [400,756,"Divisions of the church"], + [400,440,"Patriarchates of the East. Melchites"], + [450,450.93,"Church of Cyprus"], + [460,605,"Russian Church"], + [610,620,"Church of Greece"], + [630,639,"Orthodox Church in Austria and Hungary"], + [650,659,"Bulgarian Church"], + [660,669,"Georgian Church"], + [670,679,"Montenegrin Church"], + [690,699,"Romanian Church"], + [710,719,"Serbian Church. Yugoslav Church"], + [720,729,"Orthodox Eastern Church, Macedonian"], + [729.5,729.5,"Orthodox Eastern Church, Ukrainian"], + [729.9,755,"Orthodox Church in other regions or countries"], + [800,4795,"Catholic Church"], + [800,839,"Periodicals. Societies, councils, congresses, etc."], + [840,840,"Museums. Exhibitions"], + [841,841,"Dictionaries. Encyclopedias"], + [845,845,"Directories. Yearbooks"], + [847,847,"Atlases"], + [850,875,"Documents"], + [880,891,"General collected works"], + [895,939,"Study and teaching"], + [940,1745,"History"], + [1746,1755,"Theology. Doctrine. Dogmatics"], + [1756,1756,"Sermons"], + [1760,1779.5,"Controversial works"], + [1781,1788,"Catholic Church and other churches"], + [1790,1793,"Catholic Church and the state"], + [1800,1920,"Government and organization"], + [1958,1968,"Creeds and catechisms"], + [1969,1969,"Forms of worship. Catholic practice"], + [1970,2175,"Liturgy and ritual"], + [2050,2175,"Prayers and devotions"], + [2177,2198,"Meditations. Devotional readings. Spiritual exercises, etc."], + [2200,2292,"Sacraments"], + [2295,2310,"Sacramentals"], + [2312,2312,"Images"], + [2315,2324,"Relics. Shrines. Pilgrimages. Processions"], + [2325,2333,"Saints. Hagiology"], + [2347,2377,"Practical religion. Christian life"], + [2380,2386,"Religious life. Religious state"], + [2400,4563,"Monasticism. Religious orders"], + [2890,4192,"Religious orders of men"], + [4200,4563,"Religious orders of women"], + [4600,4644,"Churches, cathedrals, abbeys (as parish churches), etc."], + [4650,4705,"Biography and portraits"], + [4650,4698,"Collective"], + [4654,4662,"Saints and martyrs"], + [4700,4705,"Individual"], + [4700,4700,"Saints"], + [4710.1,4715.95,"Eastern churches in communion with Rome. Catholics of the Oriental rites. Uniats"], + [4716.4,4795,"Dissenting sects other than Protestant"], + [4718.5,4735,"Jansenists"], + [4737,4737,"French schisms of the 19th century"], + [4740,4740,"German Catholics"], + [4751,4793,"Old Catholics"], + [4793.5,4794.25,"Independent Catholic Churches"], + [4795,4795,"Other"], + [4800,9999,"Protestantism"], + [4800,4861,"General"], + [4872,4924,"Pre-Reformation"], + [4872,4893,"Waldenses and Albigenses"], + [4900,4906,"Lollards. Wycliffites"], + [4913,4924,"Hussites"], + [4920,4924,"Bohemian Brethren"], + [4929,4951,"Post-Reformation"], + [4929,4946,"Anabaptists"], + [4950,4951,"Plain People"], + [5001,5009,"Anglican Communion (General)"], + [5011,5207,"Church of England"], + [5011,5050,"General"], + [5051,5110,"History. Local divisions"], + [5115,5126,"Special parties and movements"], + [5127,5129.8,"Church of England and other churches"], + [5130,5132,"General"], + [5133,5133,"Sermons. Tracts. Addresses. Essays"], + [5135,5136,"Controversial works"], + [5137,5139,"Creeds and catechisms, etc."], + [5140.5,5147,"Liturgy and ritual"], + [5148,5149,"Sacraments"], + [5150,5182.5,"Government. Organization. Discipline"], + [5183,5187,"Religious communities. Conventual life. Religious"], + [5194,5195,"Cathedrals, churches, etc. in England and Wales"], + [5197,5199,"Biography"], + [5200,5207,"Dissent and nonconformity"], + [5210,5395,"Episcopal Church in Scotland"], + [5410,5595,"Church of Ireland"], + [5596,5598,"Church in Wales"], + [5600,5740,"Church of England outside of Great Britain"], + [5601,5620,"Anglican Church of Canada"], + [5800,5995,"Protestant Episcopal Church in the United States of America"], + [5996,6030,"Protestant Episcopal Church outside the United States"], + [6051,6093,"Reformed Episcopal Church"], + [6101,9999,"Other Protestant denominations Alphabetical; only larger denominations listed The subarrangement is essentially the same for each sect, the primary features being indicated by way of example under Baptists"], + [6101,6193,"Adventists. “Millerites”"], + [6195,6197,"Arminians. Remonstrants"], + [6201,6495,"Baptists"], + [6201,6227,"General"], + [6231,6328,"History. Local divisions"], + [6329,6329,"Baptists and other churches"], + [6330,6331.2,"Doctrine"], + [6333,6333,"Sermons. Tracts"], + [6334,6334,"Controversial works"], + [6335,6336,"Creeds. Catechisms"], + [6337,6337,"Service. Ritual. Liturgy"], + [6338,6339,"Sacraments"], + [6340,6346.3,"Government. Discipline"], + [6349,6470,"Individual branches"], + [6480,6490,"Individual Baptist churches"], + [6493,6495,"Biography"], + [6551,6593,"Catholic Apostolic Church. Irvingites"], + [6651,6693,"Christadelphians. Brothers of Christ"], + [6751,6793,"Christian Church"], + [6801,6843,"Christian Reformed Church"], + [6901,6997,"Christian Science"], + [7003,7003,"Christian Union"], + [7020,7060,"Church of God"], + [7079,7097,"Churches of God"], + [7101,7260,"Congregationalism"], + [7301,7343,"Disciples of Christ. Campbellites"], + [7401,7430,"Dowieism. Christian Catholic Church"], + [7451,7493,"Evangelical and Reformed Church"], + [7556,7556,"Evangelical United Brethren Church"], + [7580,7583,"Free Congregations (Germany). Freie Gemeinden"], + [7601,7795,"Friends. Society of Friends. Quakers"], + [7801,7843,"German Baptist Brethren. Church of the Brethren. Dunkards"], + [7850,7865,"German Evangelical Protestant Church of North America. Evangelical Protestant Church of North America"], + [7901,7943,"German Evangelical Synod of North America"], + [7990,7990,"Holiness churches","H6","H69"], + [8001,8080,"Lutheran churches"], + [8101,8144,"Mennonites"], + [8201,8495,"Methodism"], + [8525,8528,"Millennial Dawnists. Jehovah’s Witnesses"], + [8551,8593,"Moravian Church. United Brethren. Unitas Fratrum. Herrnhuters"], + [8601,8695,"Mormons. Church of Jesus Christ of Latter-Day Saints"], + [8701,8749,"New Jerusalem Church. New Church. Swedenborgianism"], + [8762,8785,"Pentecostal churches"], + [8799,8809,"Plymouth Brethren. Darbyites"], + [8901,9225,"Presbyterianism. Calvinistic Methodism"], + [9301,9359,"Puritanism"], + [9401,9640,"Reformed or Calvinistic Churches"], + [9675,9675,"River Brethren. Brethren in Christ"], + [9701,9743,"Salvation Army"], + [9751,9793,"Shakers. United Society of Believers. Millennial Church"], + [9801,9869,"Unitarianism"], + [9875,9877.1,"United Brethren in Christ. Church of the United Brethren in Christ"], + [9881,9882.95,"United Church of Canada"], + [9884,9886,"United Church of Christ"], + [9887,9887,"United Evangelical Church"], + [9889,9889,"United Missionary Church"], + [9901,9969,"Unviersalism. Universalists"], + [9975,9975,"Volunteers of America"], + [9980,9980,"Walloon Church"], + [9998,9998,"Other beliefs and movements akin to Christianity"], + [9999,9999,"Independent churches, parishes, societies, etc."], + ], + C: [ + [1,51,"Auxiliary Sciences of History (General)"], + ], + CB: [ + [3,482,"History of Civilization"], + [156,156,"Terrestrial evidence of interplanetary voyages"], + [158,161,"Forecasts of future progress"], + [195,281,"Civilization and race"], + [305,430,"By period"], + [440,482,"Relation to special topics"], + [450,450,"Geography and civilization"], + [478,478,"Technology"], + [481,481,"War and civilization"], + [482,482,"Water and civilization"], + ], + CC: [ + [1,960,"Archaeology"], + [72,81,"Philosophy. Theory"], + [73,81,"Methodology"], + [83,97,"Study and teaching. Research"], + [135,137,"Preservation, restoration, and conservation of antiquities. Antiquities and state"], + [140,140,"Forgeries of antiquities"], + [200,260,"Bells. Campanology. Cowbells"], + [300,350,"Crosses"], + [600,605,"Boundary stones"], + [700,705,"Stone heaps, cairns, etc., of unknown purpose"], + [710,710,"Hill figures"], + [960,960,"Lanterns of the dead"], + ], + CD: [ + [1,6471,"Diplomatics. Archives. Seals"], + [1,511,"Diplomatics"], + [70,79,"Practice of special chancelleries"], + [80,81,"Formularies"], + [87,87,"Forgeries of documents"], + [91,392,"Collection of documents, facsimiles, etc., for study"], + [501,511,"Study and teaching"], + [921,4280,"Archives"], + [995,4280,"History and statistics"], + [997,997,"Biography of archivists"], + [1000,4280,"By region or country"], + [5001,6471,"Seals"], + [5191,5191,"Iconography"], + [5201,5391,"Ancient"], + [5501,5557,"Medieval"], + [5561,5561,"Renaissance"], + [5575,6471,"Modern"], + ], + CE: [ + [1,97,"Technical Chronology. Calendar"], + [21,46,"Ancient"], + [51,85,"Medieval and modern"], + [91,92,"Perpetual calendars. Century calendars, etc."], + ], + CJ: [ + [1,6661,"Numismatics"], + [1,4625,"Coins"], + [153,153,"Finds of coins"], + [161,161,"Symbols, devices, etc."], + [201,1397,"Ancient"], + [1509,4625,"Medieval and modern"], + [4801,5450,"Tokens"], + [4861,4889,"By period"], + [4901,5336,"By region or country"], + [5350,5450,"Special uses of tokens"], + [5501,6661,"Medals and medallions"], + [5581,5690,"Ancient"], + [5723,5793,"Medieval and modern"], + [5795,6661,"By region or country"], + ], + CN: [ + [1,1355,"Inscriptions. Epigraphy"], + [120,740,"Ancient inscriptions"], + [750,753,"Early Christian inscriptions"], + [755,755,"Medieval inscriptions (General)"], + [760,760,"Modern inscriptions (General)"], + [805,865,"By language"], + [870,1355,"By region or country"], + ], + CR: [ + [1,6305,"Heraldry"], + [51,79,"Crests, monograms, devices, badges, mottoes, etc."], + [91,93,"Shields and supporters"], + [101,115,"Flags, banners, and standards"], + [191,1020,"Public and official heraldry"], + [1101,1131,"Ecclesiastical and sacred heraldry"], + [1179,3395,"Family heraldry"], + [3499,4420,"Titles of honor, rank, precedence, etc."], + [4480,4485,"Royalty. Insignia. Regalia, crown and coronets, etc."], + [4501,6305,"Chivalry and knighthood (Orders, decorations, etc.)"], + [4547,4553,"Ceremonials, pageants, tournaments, etc."], + [4571,4595,"Duels and dueling"], + [4651,6305,"Orders, etc."], + ], + CS: [ + [1,3090,"Genealogy"], + [23,35,"Genealogical lists, etc., covering more than one country or continent"], + [38,39,"Family history covering more than one country"], + [42,2209,"By region or country"], + [2300,3090,"Personal and family names"], + ], + CT: [ + [21,9999,"Biography"], + [21,22,"Biography as an art or literary form"], + [31,83,"History of biographical literature. Lives of biographers"], + [93,206,"General collective biography"], + [206,206,"Portraits"], + [210,3150,"National biography"], + [3200,9999,"Biography. By subject"], + [3200,3830,"Biography of women (Collective)"], + [3990,3990,"Academicians. Scholars. Savants"], + [9960,9998,"Other miscellaneous groups"], + [9999,9999,"Blank books for personal records, diaries, etc."], + ], + D: [ + [1,2027,"History (General)"], + [1,24.5,"General"], + [25,27,"Military and naval history"], + [31,34,"Political and diplomatic history"], + [51,90,"Ancient history"], + [101,110.5,"Medieval and modern history, 476-"], + [111,203,"Medieval history"], + [135,149,"Migrations"], + [151,173,"Crusades"], + [175,195,"Latin Kingdom of Jerusalem. Latin Orient, 1099-1291"], + [200,203,"Later medieval. 11th-15th centuries"], + [204,475,"Modern history, 1453-"], + [219,234,"1453-1648"], + [242,283.5,"1601-1715. 17th century"], + [251,271,"Thirty Years’ War, 1618-1648"], + [275,276,"War of Devolution, 1667-1668"], + [277,278.5,"Dutch War, 1672-1678"], + [279,280.5,"War of the Grand Alliance, 1688-1697"], + [281,283.5,"War of Spanish Succession, 1701-1714"], + [284,297,"1715-1789. 18th century"], + [291,294,"War of Austrian Succession, 1740-1748"], + [297,297,"Seven Years’ War, 1756-1763"], + [299,475,"1789-"], + [301,309,"Period of the French Revolution"], + [351,400,"19th century. 1801-1914/1920"], + [371,379,"Eastern question"], + [383,383,"1815-1830. Congress of Vienna"], + [385,393,"1830-1870"], + [394,400,"1871- . Later 19th century"], + [410,475,"20th century"], + [461,475,"Eastern question"], + [501,680,"World War I (1914-1918)"], + [720,728,"Period between World Wars (1919-1939)"], + [731,838,"World War II (1939-1945)"], + [839,860,"Post-war history (1945- )"], + [880,888,"Developing countries"], + [890,893,"Eastern Hemisphere"], + [900,2009,"Europe (General)"], + [901,980,"Description and travel"], + [1050,2027,"History"], + ], + DA: [ + [1,995,"History of Great Britain"], + [10,18.2,"British Empire. Commonwealth of Nations. The Commonwealth"], + [20,690,"England"], + [20,27.5,"General"], + [28,592,"History"], + [28,35,"General"], + [40,89.6,"Political, military, naval, and Air Force history. Foreign relations"], + [90,125,"Antiquities. Social life and customs. Ethnography"], + [129,592,"By period"], + [129,260,"Early and medieval to 1485"], + [140,199,"Celts. Romans. Saxons. Danes. Normans"], + [200,260,"1154-1485. Angevins. Plantagenets. Lancaster-York"], + [300,592,"Modern, 1485-"], + [310,360,"Tudors, 1485-1603"], + [350,360,"Elizabeth I, 1558-1603. Elizabethan age"], + [385,398,"Early Stuarts, 1603-1642"], + [400,429,"Civil War and Commonwealth, 1642-1660"], + [430,463,"Later Stuarts"], + [498,503,"1714-1760"], + [505,522,"George III, 1760-1820"], + [550,565,"Victorian era, 1837-1901"], + [566,592,"20th century"], + [600,667,"Description and travel. Guidebooks"], + [670,690,"Local history and description"], + [670,670,"Counties, regions, etc., A-Z"], + [675,689,"London"], + [690,690,"Other cities, towns, etc., A-Z"], + [700,745,"Wales"], + [700,713,"General"], + [714,722.1,"History"], + [725,738,"Description and travel"], + [740,745,"Local history and description"], + [750,890,"Scotland"], + [750,757.7,"General"], + [757.9,826,"History"], + [757.9,763,"General"], + [765,774.5,"Political and military history. Antiquities, etc."], + [774.8,826,"By period"], + [777,790,"Early and medieval to 1603"], + [783.2,783.45,"War of Independence, 1285-1371"], + [783.5,790,"Stuarts, 1371-1603"], + [800,814.5,"1603-1707/1745"], + [807,807,"The Union, 1707"], + [813,814.5,"1707-1745. Jacobite movements"], + [815,826,"19th-20th centuries"], + [850,878,"Description and travel"], + [880,890,"Local history and description"], + [900,995,"Ireland"], + [900,908.7,"General"], + [909,965,"History"], + [909,916.8,"General"], + [920,927,"Antiquities. Social life and customs. Ethnography"], + [930,965,"By period"], + [930,937.5,"Early and medieval to 1603"], + [933.3,933.3,"English conquest, 1154-1189"], + [938,966.2,"Modern, 1603-"], + [949.5,949.5,"The Union, 1800"], + [949.7,965,"19th-20th centuries. Irish question"], + [963,963,"1922- . Republic of Ireland. Irish Free State"], + [966,966.2,"21st century"], + [969,988,"Description and travel"], + [990,995,"Local history and description"], + [990,990,"Northern Ireland (Ulster)","U45","U46"], + ], + DAW: [ + [1001,1051,"History of Central Europe"], + [1001,1028,"General"], + [1031,1051,"History"], + ], + DB: [ + [1,3150,"History of Austria. Liechtenstein. Hungary. Czechoslovakia"], + [1,879,"Austria. Austro-Hungarian Empire"], + [1,20.5,"General"], + [21,27.5,"Description and travel"], + [29,34.5,"Antiquities. Social life and customs. Ethnography"], + [35,99.2,"History"], + [35,40.5,"General"], + [42,49,"Military, naval, and political history. Foreign relations"], + [51,99.2,"By period"], + [51,64,"Early and medieval to 1521"], + [60,64,"Wars with the Turks"], + [65,99.2,"1521-"], + [65.2,65.9,"1521-1648"], + [66,69.5,"1648-1740"], + [69.7,77,"1740-1815"], + [80,99.2,"19th-20th centuries"], + [83,83,"Revolution, 1848"], + [96,99.2,"Republic, 1918-"], + [99,99.1,"1938-1955. German annexation. Allied occupation"], + [99.2,99.2,"1955-"], + [101,879,"Local history and description"], + [101,785,"Provinces, regions, etc."], + [841,860,"Vienna"], + [879,879,"Other cities, towns, etc., A-Z"], + [881,898,"Liechtenstein"], + [901,999,"Hungary"], + [901,906.7,"General"], + [906.9,920.5,"Description and travel. Antiquities. Ethnography"], + [921,958.6,"History"], + [927,958.6,"By period"], + [927,932.9,"Early to 1792"], + [929,929.8,"Árpád dynasty, 896-1301"], + [929.95,931.9,"Elective kings, 1301-1526"], + [932.95,945,"1792-1918. 19th century"], + [934.5,939.5,"Revolution of 1848-1849"], + [940,945,"1849-1918"], + [946,958.6,"20th century"], + [955,955.8,"1918-1945. Revolution of 1919-1920"], + [955.9,957.5,"1945-1989. Revolution of 1956"], + [957.9,958.6,"1989-"], + [974.9,999,"Local history and description"], + [974.9,975,"Counties, regions, etc."], + [981,997,"Budapest"], + [2000,3150,"Czechoslovakia"], + [2000,2035,"General. Description and travel. Antiquities. Social life and customs"], + [2040,2043,"Ethnography"], + [2044,2247,"History"], + [2080,2247,"By period"], + [2080,2133,"Early and medieval to 1526"], + [2135,2182,"Hapsburg rule, 1526-1918"], + [2185,2241,"Czechoslovak Republic, 1918-1992"], + [2242,2247,"1993- . Independent Czech Republic"], + [2300,2650,"Local history and description of Czech lands"], + [2300,2421,"Moravia"], + [2600,2649,"Prague (Praha)"], + [2700,3150,"Slovakia"], + [3100,3139,"Bratislava (Pressburg)"], + ], + DC: [ + [1,947,"History of France"], + [1,20.5,"General"], + [21,29.3,"Description and travel"], + [30,34.5,"Antiquities. Social life and customs. Ethnography"], + [35,424,"History"], + [35,41,"General"], + [44,59.8,"Military, naval, and political history. Foreign relations"], + [60,424,"By period"], + [60,109,"Early and medieval to 1515"], + [62,64,"Gauls. Celts. Franks"], + [64.7,94,"476-1328. Merovingians. Carlovingians. Capetians"], + [95,109,"1328-1515"], + [96,101.7,"Hundred Years’ War, 1339-1453"], + [101.9,109,"15th century. Jeanne d’Arc, Saint"], + [110,433,"Modern, 1515-"], + [111,120,"1515-1589. 16th century"], + [118,118,"Massacre of St. Bartholomew, 1572"], + [120.8,130,"1589-1715. Henri IV, Louis XIII, Louis XIV"], + [131,138,"1715-1789. 18th century. Louis XV, Louis XVI"], + [139,249,"Revolutionary and Napoleonic period, 1789-1815"], + [251,354.9,"19th century"], + [256,260,"Restoration, 1815-1830"], + [261,269,"July Revolution of 1830. July Monarchy, 1830-1848"], + [270,274.5,"February Revolution and Second Republic"], + [275,280.5,"Second Empire, 1852-1870"], + [281,326.5,"Franco-German or Franco-Prussian War, 1870-1871"], + [330,354.9,"Later 19th century"], + [361,424,"20th century"], + [397,397,"1940-1946"], + [398,409,"Fourth Republic, 1947-1958"], + [411,424,"Fifth Republic, 1958-"], + [425,433,"21st century"], + [600,801,"Local history and description"], + [601.1,609.83,"North, East, etc. France"], + [611,611,"Regions, provinces, departments, etc., A-Z"], + [701,790,"Paris"], + [801,801,"Other cities, towns, etc., A-Z"], + [921,930,"Andorra"], + [941,947,"Monaco"], + ], + DD: [ + [1,905,"History of Germany"], + [1,21,"General"], + [21.5,43,"Description and travel"], + [51,78,"Antiquities. Social life and customs. Ethnography"], + [84,257.4,"History"], + [84,96,"General"], + [99,120,"Military, naval, and political history. Foreign relations"], + [121,257.4,"By period"], + [121,124,"Earliest to 481"], + [125,174.6,"Early and medieval to 1519"], + [126,155,"Medieval Empire, 481-1273"], + [127,135,"481-918. Merovingians. Carolingians"], + [136,144,"919-1125. Houses of Saxony and Franconia"], + [145,155,"1125-1273. Hohenstaufen period"], + [156,174.6,"1273-1519. Houses of Habsburg and Luxemburg"], + [175,257.4,"Modern, 1519-"], + [176,189,"1519-1648. Reformation and Counter-reformation"], + [181,183,"Peasants’ War, 1524-1525"], + [184,184.7,"Schmalkaldic League and War, 1530-1547"], + [189,189,"Period of Thirty Years’ War, 1618-1648"], + [190,199,"1648-1815. 18th century. French Revolutionary and Napoleonic period"], + [201,257.4,"19th-20th centuries"], + [206,216,"1815-1871"], + [217,231,"New Empire, 1871-1918"], + [228.8,228.8,"Period of World War I, 1914-1918"], + [233,257.4,"Revolution and Republic, 1918-"], + [253,256.8,"Hitler, 1933-1945. National socialism"], + [256,256,"Period of World War II, 1939-1945"], + [257,257.4,"Period of Allied occupation, 1945-"], + [258,262,"West Germany"], + [280,289.5,"East Germany"], + [301,454,"Prussia"], + [301,312,"General"], + [314,320,"Description and travel"], + [325,339,"Antiquities. Social life and customs. Ethnography"], + [341,454,"History"], + [701,901,"Local history and description"], + [701,788,"North and Central, Northeast, etc. Germany"], + [801,801,"States, provinces, regions, etc., A-Z"], + [851,900,"Berlin"], + [900.2,900.76,"Bonn"], + [901,901,"Other cities, towns, etc., A-Z"], + ], + DE: [ + [1,100,"History of the Greco-Roman world"], + [1,15.5,"General"], + [23,31,"Geography"], + [46,73.2,"Antiquities. Civilization. Culture. Ethnography"], + [80,100,"History"], + ], + DF: [ + [10,951,"History of Greece"], + [10,289,"Ancient Greece"], + [10,16,"General"], + [27,41,"Geography. Travel"], + [75,136,"Antiquities. Civilization. Culture. Ethnography"], + [207,241,"History"], + [207,218,"General"], + [220,241,"By period"], + [220,221,"Bronze Age, Minoan, and Mycenaean ages"], + [221.2,224,"ca. 1125-500 B.C. Age of Tyrants"], + [225,226,"Persian wars, 499-479 B.C."], + [227,228,"Athenian supremacy. Age of Pericles. 479-431 B.C."], + [229,230,"Peloponnesian War, 431-404 B.C."], + [230.9,231.9,"Spartan and Theban supremacies, 404-362 B.C."], + [232.5,233.8,"Macedonian epoch. Age of Philip. 359-336 B.C."], + [234,234.9,"Alexander the Great, 336-323 B.C."], + [235,238.9,"Hellenistic period, 323-146.B.C."], + [239,241,"Roman epoch, 140 B.C.-323/476 A.D."], + [251,289,"Local history and description"], + [501,649,"Medieval Greece. Byzantine Empire, 323-1453"], + [501,518,"General"], + [520,542.4,"Antiquities. Social life and customs. Ethnography"], + [545,548,"Military history. Political history. Empire and papacy"], + [550,649,"History"], + [550,552.8,"General"], + [553,599.5,"Eastern Empire, 323/476-1057. Constantine the Great"], + [599.8,649,"1057-1453"], + [610,629,"1204-1261. Latin Empire"], + [630,649,"1261-1453. Palaeologi"], + [645,649,"1453. Fall of Constantinople"], + [701,951,"Modern Greece"], + [701,720,"General"], + [720.5,728,"Description and travel"], + [741,748,"Social life and customs. Ethnography"], + [750,854.32,"History"], + [750,760,"General"], + [765,787,"Military, naval, and political history. Foreign relations"], + [801,854.32,"By period"], + [801,801.9,"Turkish rule, 1453-1821"], + [802,832,"1821-1913"], + [804,815,"War of Independence, 1821-1829"], + [816,818,"Kapodistrias, 1827-1831"], + [833,854.32,"20th century"], + [848,848,"Republic, 1924-1935"], + [895,951,"Local history and description"], + [901,901,"Regions, provinces, islands, etc., A-Z"], + [901,901,"Crete","C78","C88"], + [915,936,"Athens"], + [951,951,"Other cities, towns, etc., A-Z"], + ], + DG: [ + [11,999,"History of Italy"], + [11,365,"Ancient Italy. Rome to 476"], + [11,16,"General"], + [27,41,"Geography. Description and travel"], + [51,70,"Local history and description"], + [51,55,"Regions in Italy, A-Z"], + [59,59,"Regions outside of Italy, A-Z"], + [61,69,"Rome (City) to 476"], + [70,70,"Other cities, towns, etc., A-Z"], + [75,190,"Antiquities. Civilization. Culture. Ethnography"], + [201,365,"History"], + [201,215,"General"], + [221,365,"By period"], + [221,225,"Pre-Roman Italy. Etruria. Etruscans"], + [231,269,"Kings and Republic, 753-27 B.C."], + [233,233.9,"Foundations and kings, 753-510"], + [235,269,"Republic, 509-27"], + [237,238,"Subjection of Italy, 343-290"], + [241,253,"Conquest of Mediterranean world. 264-133"], + [242,249.4,"First and Second Punic Wars. Illyrian wars. 264-201"], + [250,253,"Wars in the East and in the West. 200-133"], + [253.5,269,"Fall of the Republic and establishment of the Empire. 133-27"], + [256,260,"Period of Marius and Sulla (Pompey). 111-78"], + [261,267,"Julius Caesar. First Triumvirate, 60"], + [268,269,"Second Triumvirate, 43-31"], + [269.5,365,"Empire, 27 B.C. - 476 A.D."], + [269.5,274.3,"General"], + [275,309.3,"Constitutional Empire, 27 B.C. - 284 A.D."], + [310,365,"284-476. Decline and fall"], + [401,583.8,"Medieval and modern Italy, 476-"], + [401,421,"General"], + [421.5,430.2,"Description and travel"], + [431,457,"Antiquities. Social life and customs. Ethnography"], + [461,583.8,"History"], + [461,473,"General"], + [480,499,"Military, naval, and political history. Foreign relations"], + [500,583.8,"By period"], + [500,537.8,"Medieval, 476-1492"], + [503,529,"476-1268"], + [506,514.7,"489-774. Gothic and Lombard kingdoms. Byzantine exarchate, 553-568"], + [515,529,"774-1268. Frankish and German emperors"], + [530,537.8,"1268-1492"], + [532,537.8,"Renaissance"], + [538,583.8,"Modern, 1492-"], + [539,545.8,"16th-18th centuries"], + [546,549,"1792-1815. Napoleonic period"], + [548,549,"Kingdom of Italy"], + [550.5,564,"19th century"], + [552,554.5,"1848-1871. Risorgimento"], + [553,553.5,"1848-1849. Austro-Sardinian War"], + [555,575,"1871-1947. United Italy (Monarchy)"], + [571,572,"1919-1945. Fascism"], + [576,583.8,"1948- . Republic"], + [600,684.72,"Northern Italy"], + [600,609,"General"], + [610,618.78,"Piedmont. Savoy"], + [631,645,"Genoa"], + [651,664.5,"Milan. Lombardy"], + [670,684.72,"Venice"], + [691,817.3,"Central Italy"], + [691,694,"General"], + [731,759.3,"Tuscany. Florence"], + [791,800,"Papal States (States of the Church). Holy See. Vatican"], + [803,817.3,"Rome (Modern city)"], + [819,875,"Southern Italy"], + [819,829,"General"], + [831,831,"Sicily and Malta"], + [840,857.5,"Naples. Kingdom of the Two Sicilies"], + [861,875,"Sicily"], + [975,975,"Other cities (non-metropolitan), provinces, etc., A-Z"], + [987,999,"Malta. Maltese Islands"], + ], + DH: [ + [1,925,"History of Low Countries. Benelux Countries"], + [1,23,"General"], + [31,40,"Description and travel"], + [51,92,"Antiquities. Social life and customs. Ethnography"], + [95,207,"History"], + [95,109,"General"], + [113,137,"Military, naval, and political history. Foreign relations"], + [141,207,"By period"], + [141,162,"Early and medieval to 1384"], + [171,184,"1384-1555. House of Burgundy"], + [185,207,"Wars of Independence, 1555-1648"], + [401,811,"Belgium"], + [401,430,"General"], + [431,435,"Description and travel"], + [451,492,"Antiquities. Social life and customs. Ethnography"], + [503,694,"History"], + [503,527,"General"], + [540,569,"Military, naval, and political history. Foreign relations"], + [571,694,"By period"], + [571,584,"Early and medieval to 1555"], + [585,619,"1555-1794. Spanish and Austrian rule"], + [611,619,"1714-1794. Austrian Netherlands"], + [620,676,"1794-1909"], + [631,631,"French rule, 1794-1813"], + [650,652,"Revolution of 1830"], + [677,694,"20th century"], + [801,811,"Local history and description"], + [801,801,"Provinces, regions, etc., A-Z"], + [802,809.95,"Brussels"], + [811,811,"Other cities, towns, etc., A-Z"], + [901,925,"Luxembourg"], + ], + DJ: [ + [1,500,"History of Netherlands (Holland)"], + [1,30,"General"], + [33,41,"Description and travel"], + [51,92,"Antiquities. Social life and customs. Ethnography"], + [95,292,"History"], + [95,116,"General"], + [124,150,"Military, naval, and political history, etc. Foreign relations"], + [151,292,"By period"], + [151,152,"Early and medieval to 1555"], + [154,210,"1555-1795. United provinces"], + [180,182,"Anglo-Dutch wars, 1652-1667"], + [190,191,"War with France, 1672-1678"], + [193,193,"Anglo-Dutch War, 1672-1674"], + [196,199.2,"Stadtholders, 1702-1747"], + [205,206,"Anglo-Dutch War, 1780-1784"], + [208,209,"War with France, 1793-1795"], + [211,211,"1795-1806. Batavian Republic"], + [215,292,"19th-20th centuries"], + [401,411,"Local history and description"], + [411,411,"Amsterdam","A5","A59"], + ], + DJK: [ + [1,77,"History of Eastern Europe (General)"], + [26,28,"Ethnography"], + [27,27,"Slavic peoples (General)"], + [30,51,"History"], + [61,77,"Local history and description"], + [61,66,"Black Sea region"], + [71,76,"Carpathian Mountain region"], + [76.2,76.8,"Danube River Valley"], + [77,77,"Pannonia"], + ], + DK: [ + [1,949.5,"History of Russia. Soviet Union. Former Soviet Republics"], + [33,35.5,"Ethnography"], + [36,293,"History"], + [70,112.42,"Early to 1613"], + [70,99.7,"Rus’"], + [99.8,112.42,"Muscovy"], + [112.8,264.8,"House of Romanov, 1613-1917"], + [265,265.95,"Revolution, 1917-1921"], + [266,292,"Soviet regime, 1918-1991"], + [293,293,"1991-"], + [500,500,"Regions not limited to one Republic, A-Z"], + [501,949.5,"Local history and description"], + [502.3,502.75,"Baltic States"], + [503,503.95,"Estonia"], + [503.92,503.939,"Tallinn"], + [504,504.95,"Latvia"], + [504.92,504.939,"Riga"], + [505,505.95,"Lithuania"], + [505.92,505.939,"Vilnius"], + [507,507.95,"Belarus. Byelorussian S.S.R. White Russia"], + [507.92,507.939,"Minsk"], + [508,508.95,"Ukraine"], + [508.92,508.939,"Kiev"], + [509,509,"Southern Soviet Union"], + [509.1,509.95,"Moldova. Moldovian S.S.R. Bessarabia"], + [509.92,509.939,"Chisinau. Kishinev"], + [510,651,"Russia (Federation). Russian S.F.S.R."], + [541,579,"Saint Petersburg. Leningrad. Petrograd"], + [588,609,"Moscow"], + [670,679.5,"Georgia (Republic). Georgian S.S.R. Georgian Sakartvelo"], + [679.2,679.39,"Tbilisi. Tiflis"], + [680,689.5,"Armenia (Republic). Armenian S.S.R."], + [689.2,689.39,"Yerevan. Erevan"], + [690,699.5,"Azerbaijan. Azerbaijan S.S.R."], + [699.2,699.39,"Baku"], + [751,781,"Siberia"], + [845,860,"Soviet Central Asia. West Turkestan"], + [901,909.5,"Kazakhstan. Kazakh S.S.R."], + [909.2,909.39,"Alma Ata"], + [911,919.5,"Kyrgyzstan. Kirghiz S.S.R. Kirghizia"], + [919.2,919.39,"Frunze"], + [921,929.5,"Tajikistan. Tajik S.S.R. Tadzhikistan"], + [929.2,929.39,"Dushanbe"], + [931,939.5,"Turkmenistan. Turkmen S.S.R. Turkmenia"], + [939.2,939.39,"Ashkhabad"], + [941,949.5,"Uzbekistan. Uzbek S.S.R."], + [949.2,949.39,"Tashkent"], + [4010,4800,"History of Poland"], + [4120,4122,"Ethnography"], + [4123,4452,"History"], + [4186,4348,"To 1795"], + [4348.5,4395,"1795-1918. 19th century (General)"], + [4397,4420,"1918-1945"], + [4429,4442,"1945-1989. People’s Republic"], + [4445,4452,"1989-"], + [4600,4800,"Local history and description"], + [4610,4645,"Warsaw (Warszawa)"], + [4650,4685,"Gdansk (Danzig)"], + [4700,4735,"Krakow (Cracow)"], + ], + DL: [ + [1,1180,"History of Northern Europe. Scandinavia"], + [1,6.8,"General"], + [7,11.5,"Description and travel"], + [20,42.5,"Antiquities. Social life and customs. Ethnography"], + [43,87,"History"], + [43,49,"General"], + [52,59,"Military, naval, and political history. Foreign relations"], + [61,87,"By period"], + [61,65,"Earliest to 1387. Scandinavian Empire. Northmen. Vikings"], + [75,81,"1387-1900"], + [83,87,"1900- . Period of World War I, 1914-1918"], + [101,291,"Denmark"], + [101,114.5,"General"], + [115,120,"Description and travel"], + [121,142.5,"Antiquities. Social life and customs. Ethnography"], + [143,263.3,"History"], + [143,151,"General"], + [154,159.5,"Military, naval, and political history. Foreign relations"], + [160,263.3,"By period"], + [160,183.9,"Early and medieval to 1523"], + [162,173.8,"750-1241. Norwegian rule, 1042-1047"], + [174,183.9,"1241-1523. Union of Kalmar, 1397"], + [184,263.3,"Modern, 1523-"], + [185,192.8,"1523-1670"], + [190,190,"War with Sweden, 1643-1645"], + [192,192,"War with Sweden, 1657-1660"], + [193,199.8,"1670-1808"], + [196.3,196.3,"Period of Northern War, 1700-1721"], + [201,249,"1808-1906. 19th century"], + [217,223,"Schleswig-Holstein War, 1848-1850"], + [236,239.6,"Schleswig-Holstein War, 1864"], + [250,263.3,"20th century"], + [269,291,"Local history and description"], + [271,271,"Counties, regions, islands, etc., A-Z"], + [276,276,"Copenhagen"], + [291,291,"Other cities, towns, etc., A-Z"], + [301,398,"Iceland"], + [301,334,"General. Description and travel, etc."], + [335,380,"History"], + [396,398,"Local history and description"], + [401,596,"Norway"], + [401,414,"General"], + [415,419.2,"Description and travel"], + [420,442.5,"Antiquities. Social life and customs. Ethnography"], + [443,537,"History"], + [443,451.5,"General"], + [453,459,"Military, naval, and political history. Foreign relations"], + [460,537,"By period"], + [460,478,"Early and medieval to 1387"], + [480,502,"1387-1814. Union of Kalmar, 1397"], + [499,499,"War of 1807-1814"], + [500,502,"Union with Sweden, 1814"], + [503,526,"1814-1905. 19th century"], + [525,525,"Dissolution of the Swedish-Norwegian union, 1905"], + [527,537,"20th century. Period of World War II, 1939-1945"], + [576,596,"Local history and description"], + [576,576,"Counties, regions, etc., A-Z"], + [581,581,"Oslo (Christiania)"], + [596,596,"Other cities, towns, etc., A-Z"], + [601,991,"Sweden"], + [601,614.5,"General"], + [614.55,619.5,"Description and travel"], + [621,642,"Antiquities. Social life and customs. Ethnography"], + [643,879,"History"], + [643,651,"General"], + [654,659,"Military, naval, and political history. Foreign relations"], + [660,879,"By period"], + [660,700.9,"Early and medieval to 1523. Union of Kalmar, 1397"], + [701,879,"Modern, 1523-"], + [701,719.9,"Vasa dynasty, 1523-1654. Gustaf II Adolf, 1611-1632"], + [710,712,"Wars with Denmark, Russia, Poland"], + [721,743,"Zweibrücken dynasty, 1654-1718"], + [733,743,"Northern War, 1700-1721"], + [747,805,"1718-1818"], + [790,790,"Revolution and loss of Finland, 1809"], + [805,805,"Union with Norway, 1814"], + [807,859,"1814-1907. 19th century"], + [860,879,"20th century"], + [971,991,"Local history and description"], + [971,971,"Provinces, regions, etc., A-Z"], + [976,976,"Stockholm"], + [991,991,"Other cities, towns, etc., A-Z"], + [1002,1180,"Finland"], + [1002,1014.5,"General"], + [1015,1015.4,"Description and travel"], + [1016,1022,"Antiquities. Social life and customs. Ethnography"], + [1024,1141.6,"History"], + [1024,1033,"General"], + [1036,1048,"Military, naval, and political history. Foreign relations"], + [1050,1141.6,"By period"], + [1050,1052.9,"Early to 1523"], + [1055,1141.6,"Modern, 1523-"], + [1070,1078,"Revolution, 1917-1918. Civil War"], + [1090,1105,"1939-1945"], + [1095,1105,"Russo-Finnish War, 1939-1940"], + [1122,1135.5,"1945-1981"], + [1140,1141.6,"1981-"], + [1170,1180,"Local history and description"], + [1170,1170,"Regions, provinces, historical regions, etc., A-Z"], + [1175,1175.95,"Helsinki (Helsingfors)"], + [1180,1180,"Other cities, towns, etc., A-Z"], + ], + DP: [ + [1,402,"History of Spain"], + [1,27,"General"], + [27.5,43.2,"Description and travel"], + [44,53,"Antiquities. Social life and customs. Ethnography"], + [56,272.4,"History"], + [56,75,"General"], + [76,86,"Military, naval, and political history. Foreign relations"], + [91,272.4,"By period"], + [91,96,"Earliest to 711"], + [92,96,"Pre-Roman, Roman, and Gothic periods"], + [97.3,160.8,"711-1516. Moorish domination and the Reconquest"], + [100,123,"Moors in Spain. Córdoba. Kingdom of Granada"], + [124,133.7,"Aragon (Catalonia)"], + [134,143.8,"Castile and Leon"], + [145,152.8,"León (Asturias)"], + [153,160.8,"Navarre"], + [161,272.4,"Modern Spain, 1479/1516-"], + [161.5,166,"1479-1516. Fernando V and Isabel I"], + [170,189,"1516-1700. Habsburgs"], + [192,200.8,"1700-1808. Bourbons"], + [201,232.6,"1808-1886. 19th century"], + [204,208,"1808-1814. Napoleonic period"], + [212,220,"1814-1868. Bourbon restoration"], + [219,219.2,"Carlist War, 1833-1840"], + [222,232.6,"1868-1886"], + [224,226,"Revolution, 1868-1870"], + [230,231.5,"First Republic, 1873-1875"], + [233,272.4,"20th century. 1886-"], + [250,269.9,"Second Republic, 1931-1939"], + [269,269.9,"Civil War, 1936-1939"], + [269.97,271,"1939-1975"], + [272,272.4,"1975-"], + [285,402,"Local history and description"], + [285,295,"Northern, Northwestern, Southern Spain"], + [302,302,"Provinces, regions, ets., A-Z"], + [350,374,"Madrid"], + [402,402,"Other cities, towns, etc., A-Z"], + [501,900.22,"History of Portugal"], + [501,520,"General"], + [521,526.5,"Description and travel"], + [528,534.5,"Antiquities. Social life and customs. Ethnography"], + [535,682.2,"History"], + [535,546,"General"], + [547,557,"Military, naval, and political history. Foreign relations"], + [558,682.2,"By period"], + [558,618,"Early and medieval to 1580"], + [568,578,"House of Burgundy, 1095-1383"], + [580,580,"Interregnum, 1383-1385"], + [582,618,"House of Aviz, 1385-1580"], + [620,682.2,"1580-"], + [622,629,"1580-1640. Spanish dynasty (Sixty years’ captivity)"], + [632,644.9,"1640-1816. House of Braganza"], + [645,669,"1816-1908"], + [650,650,"Revolution of 1820"], + [657,657,"Wars of succession, 1826-1840"], + [670,682.2,"20th century"], + [674,674,"Revolution of October 1910"], + [675,682.2,"Republic, 1910- . Revolution of 1919"], + [702,802,"Local history and description"], + [702,702,"Provinces, regions, etc., A-Z"], + [752,776,"Lisbon"], + [802,802,"Other cities, towns, etc., A-Z"], + ], + DQ: [ + [1,851,"History of Switzerland"], + [1,20,"General"], + [20.5,26,"Description and travel"], + [30,49.5,"Antiquities. Social life and customs. Ethnography"], + [51,210,"History"], + [51,57,"General"], + [59,76,"Military and political history. Foreign relations"], + [78,210,"By period"], + [78,110,"Early and medieval to 1516"], + [79,84,"Early to 687. Celts and Romans. Teutonic tribes"], + [85,87,"687-1291. Carolingian and German rule"], + [88,110,"1291-1516. Federation and independence"], + [111,123,"1516-1798"], + [124,191,"19th century"], + [131,151,"1789/1798-1815. Helvetic Republic, 1798-1803"], + [154,161,"1815-1848. Sonderbund, 1845-1847"], + [171,191,"1848-1900"], + [201,210,"20th century"], + [301,851,"Local history and description"], + [301,800.35,"Cantons (and cantonal capitals)"], + [820,829,"Alps"], + [841,841,"Regions, peaks, etc., A-Z"], + [851,851,"Cities, towns, etc., A-Z"], + ], + DR: [ + [1,2285,"History of Balkan Peninsula"], + [1,11,"General"], + [11.5,16,"Description and travel"], + [20,27,"Antiquities. Social life and customs. Ethnography"], + [32,48.5,"History. Balkan War, 1912-1913"], + [50,50.84,"Thrace"], + [51,98,"Bulgaria"], + [51,56.7,"General"], + [57,60.2,"Description and travel"], + [62,64.5,"Antiquities. Social life and customs. Ethnography"], + [65,93.47,"History"], + [65,69.5,"General"], + [70,73,"Military and political history. Foreign relations"], + [73.7,93.47,"By period"], + [73.7,80.8,"Early and medieval"], + [74.5,77.8,"First Bulgarian Empire, 681-1018"], + [79,79.25,"Greek rule, 1018-1185"], + [80,80.8,"Second Bulgarian Empire, 1185-1396"], + [81,84,"Turkish rule, 1396-1878"], + [84.9,89.8,"1878-1944"], + [89.9,93.34,"1944-1990"], + [93.4,93.47,"1990-"], + [95,98,"Local history and description"], + [95,95,"Provinces, regions, etc., A-Z"], + [97,97,"Sofia"], + [98,98,"Other cities, towns, etc., A-Z"], + [201,296,"Romania"], + [201,206,"General"], + [207,210,"Description and travel"], + [211,214.2,"Antiquities. Social life and customs. Ethnography"], + [215,269.6,"History"], + [215,218,"General"], + [219,229,"Military, naval, and political history. Foreign relations"], + [238,269.6,"By period"], + [238,240.5,"Early and medieval to 1601. Roman period"], + [241,241.5,"Phanariote regime, 1601-1822"], + [242,249,"1822-1881. 19th century"], + [250,266.5,"1866/1881-1944"], + [267,267.5,"1944-1989"], + [268,269.6,"1989-"], + [279,296,"Local history and description"], + [279,280.74,"Transylvania"], + [281,281,"Other provinces, regions, etc., A-Z"], + [286,286,"Bucharest"], + [296,296,"Other cities, towns, etc., A-Z"], + [401,741,"Turkey"], + [401,419,"General"], + [421,429.4,"Description and travel"], + [431,435,"Antiquities. Social life and customs. Ethnography"], + [436,605,"History"], + [436,446,"General"], + [448,479,"Military, naval, and political history. Foreign relations"], + [481,605,"By period"], + [481,481,"Earliest to 1281/1453"], + [485,555.7,"1281/1453-1789. Fall of Constantinople, 1453"], + [511,529,"1566-1640. Period of decline"], + [515,516,"Cyprian War, 1570-1571. Holy League, 1571"], + [531,555.7,"1640-1789"], + [534.2,534.5,"War of Candia, 1644-1669"], + [556,567,"1789-1861. 19th century"], + [568,575,"1861-1909. War with Russia, 1877-1878"], + [576,605,"20th century. Constitutional movement"], + [701,741,"Local history and description (European Turkey)"], + [701,701,"Provinces, regions, etc., A-Z"], + [716,739,"Istanbul (Constantinople)"], + [741,741,"Other cities, towns, etc., A-Z"], + [901,998,"Albania"], + [901,914.5,"General"], + [915,918,"Description and travel"], + [921,926,"Antiquities. Social life and customs. Ethnography"], + [927,978.52,"History"], + [927,946,"General"], + [947,953,"Military, naval, and political history. Foreign relations"], + [954,978.52,"By period"], + [954,960.5,"To 1501"], + [961,969,"1501-1912. Turkish rule"], + [969.8,978.52,"20th century"], + [996,998,"Local history and description"], + [996,996,"Provinces, regions, etc., A-Z"], + [997,997,"Tiranë"], + [998,998,"Other cities, towns, etc., A-Z"], + [1202,2285,"Yugoslavia"], + [1202,1218,"General"], + [1220,1224,"Description and travel"], + [1227,1231,"Antiquities. Social life and customs. Ethnography"], + [1232,1321,"History"], + [1232,1249,"General"], + [1250,1258,"Military, naval, and political history. Foreign relations"], + [1259,1321,"By period"], + [1259,1265,"Early and medieval to 1500"], + [1266,1272,"1500-1800"], + [1273,1280,"1800-1918"], + [1281,1321,"1918-"], + [1313,1313.8,"Yugoslav War, 1991-1995"], + [1350,2285,"Local history and description"], + [1352,1485,"Slovenia"], + [1502,1645,"Croatia"], + [1620,1630.5,"Dalmatia"], + [1633,1636.5,"Slavonia"], + [1652,1785,"Bosnia and Hercegovina"], + [1802,1928,"Montenegro"], + [1932,2125,"Serbia"], + [2075,2087.7,"Kosovo"], + [2090,2101.5,"Vojvodina"], + [2106,2124.5,"Belgrade"], + [2152,2285,"Macedonia"], + ], + DS: [ + [1,937,"History of Asia"], + [5.95,10,"Description and travel"], + [11,11,"Antiquities"], + [13,28,"Ethnography"], + [31,35.2,"History"], + [35.3,35.77,"The Islamic World"], + [36,39.2,"Arab countries"], + [36.9,36.9,"Ethnography"], + [37,39.2,"History"], + [41,66,"Middle East. Southwestern Asia. Ancient Orient. Arab East. Near East"], + [51,54.95,"Local history and description"], + [54,54.95,"Cyprus"], + [58,59,"Ethnography"], + [61,66,"History"], + [67,79.9,"Iraq (Assyria, Babylonia, Mesopotamia)"], + [69,70.5,"Antiquities"], + [70.8,70.8,"Ethnography"], + [70.82,79.9,"History"], + [80,90,"Lebanon (Phenicia)"], + [80.5,80.55,"Ethnography"], + [80.7,87.6,"History"], + [92,99,"Syria"], + [94.7,94.8,"Ethnography"], + [94.9,98.3,"History"], + [99,99,"Provinces, regions, cities, etc."], + [101,151,"Israel (Palestine). The Jews"], + [109,109.94,"Jerusalem"], + [111,111.9,"Antiquities"], + [113.2,113.8,"Ethnography. Tribes of Israel"], + [114,128.2,"History"], + [133,151,"Jews outside of Palestine"], + [153,154.9,"Jordan. Transjordan"], + [153.5,153.55,"Ethnography"], + [153.7,154.55,"History"], + [155,156,"Asia Minor"], + [161,195.5,"Armenia"], + [173,195.5,"History"], + [201,248,"Arabian Peninsula. Saudi Arabia"], + [218,219,"Ethnography"], + [221,244.63,"History"], + [247,248,"Local history and description"], + [251,326,"Iran (Persia)"], + [260.7,262,"Antiquities"], + [268,269,"Ethnography"], + [270,318.85,"History"], + [324,326,"Local history and description"], + [327,329.4,"Central Asia"], + [331,349.9,"Southern Asia. Indian Ocean Region"], + [349.8,349.9,"Islands of the Indian Ocean"], + [350,375,"Afghanistan"], + [354.5,354.6,"Ethnography"], + [355,371.3,"History"], + [374,375,"Local history and description"], + [376,392.2,"Pakistan"], + [380,380,"Ethnography"], + [381,389.22,"History"], + [392,392.2,"Local history and description"], + [393,396.9,"Bangladesh. East Pakistan"], + [393.82,393.83,"Ethnography"], + [394.5,395.7,"History"], + [396.8,396.9,"Local history and description"], + [401,486.8,"India (Bharat)"], + [430,432,"Ethnography. Sects"], + [433,481,"History"], + [483,486.8,"Local history and description"], + [488,490,"Sri Lanka"], + [489.2,489.25,"Ethnography"], + [489.5,489.86,"History"], + [491,492.9,"Bhutan"], + [493,495.8,"Nepal"], + [498,498.8,"Goa. Portuguese in India"], + [501,518.9,"East Asia. The Far East"], + [518.15,518.9,"Relation of individual countries to East Asia"], + [520,560.72,"Southeast Asia"], + [524,526.7,"History"], + [527,530.9,"Burma"], + [531,560.72,"French Indochina"], + [541,553.7,"History"], + [554,554.98,"Cambodia"], + [555,555.98,"Laos"], + [556,559.93,"Vietnam. Annam"], + [557,559.9,"Vietnamese Conflict"], + [560,560.72,"Democratic Republic (North Vietnam), 1945-"], + [561,589,"Thailand (Siam)"], + [569,570,"Ethnography"], + [570.95,586,"History"], + [588,589,"Local history and description"], + [591,599,"Malaysia. Malay Peninsula. Straits Settlements"], + [595,595.2,"Ethnography"], + [595.8,597.215,"History"], + [597.22,599,"Local history and description"], + [597.33,597.34,"Sabah. British North Borneo"], + [597.36,597.39,"Sarawak"], + [600,605,"Malay Archipelago"], + [608,610.9,"Singapore"], + [611,649,"Indonesia (Dutch East Indies)"], + [631,632,"Ethnography"], + [633,644.46,"History"], + [646.1,646.15,"Sumatra"], + [646.17,646.29,"Java"], + [646.3,646.34,"Borneo. Kalimantan, Indonesia"], + [646.4,646.49,"Celebes. Sulawesi"], + [646.5,646.59,"Timor"], + [646.6,646.69,"Moluccas. Maluku"], + [650,650.99,"Brunei"], + [651,689,"Philippines"], + [665,666,"Ethnography"], + [667,686.62,"History"], + [688,689,"Local history and description"], + [701,799.9,"China"], + [730,731,"Ethnography"], + [733,779.32,"History"], + [781,796,"Local history and description"], + [781,784.2,"Manchuria"], + [785,786,"Tibet"], + [796,796,"Hong Kong","H7","H7"], + [798,798,"Outer Mongolia. Mongolian People's Republic"], + [798.92,799.9,"Taiwan"], + [801,897,"Japan"], + [833,891.5,"History"], + [894.215,897,"Local history and description"], + [901,937,"Korea"], + [904.8,922.4642,"History"], + [918,921.8,"War and intervention, 1950-1953"], + [924,925,"Local history and description"], + [930,937,"Democratic People's Republic, 1948-"], + ], + DT: [ + [1,3415,"History of Africa"], + [7,12.25,"Description and travel"], + [15,16,"Ethnography"], + [17,39,"History"], + [43,154,"Egypt"], + [56.8,69.5,"Antiquities"], + [63,63.5,"Pyramids"], + [68,68.8,"Religious antiquities"], + [71,72,"Ethnography"], + [73,73,"Local antiquities"], + [74,107.87,"History"], + [115,154,"Local history and description"], + [139,153.5,"Cairo"], + [154.1,159.9,"Sudan. Anglo-Egyptian Sudan"], + [154.8,154.8,"Antiquities"], + [155,155.2,"Ethnography"], + [155.3,157.67,"History"], + [159.6,159.9,"Local history and description"], + [160,177,"North Africa"], + [167,176,"History"], + [168,169.5,"Carthaginian period"], + [179.2,179.9,"Northwest Africa"], + [181,346,"Maghrib. Barbary States"], + [211,239,"Libya"], + [223,223.2,"Ethnography"], + [223.3,236,"History"], + [238,239,"Local history and description"], + [241,269,"Tunisia (Tunis)"], + [253,253.2,"Ethnography"], + [253.4,264.49,"History"], + [268,269,"Local history and description"], + [271,299,"Algeria"], + [283,283.6,"Ethnography"], + [283.7,295.55,"History"], + [298,299,"Local history and description"], + [301,330,"Morocco"], + [313,313.6,"Ethnography"], + [313.7,325.92,"History"], + [328,329,"Local history and description"], + [330,330,"Spanish Morocco"], + [331,346,"Sahara"], + [348,363.3,"Central Sub-Saharan Africa"], + [365,469,"Eastern Africa"], + [365.5,365.78,"History"], + [367,367.8,"Northeast Africa"], + [371,390,"Ethiopia (Abyssinia)"], + [380,380.4,"Ethnography"], + [380.5,390,"History"], + [391,398,"Eritrea"], + [401,409,"Somalia. Somaliland and adjacent territory"], + [402.3,402.45,"Ethnography"], + [402.5,407.3,"History"], + [409,409,"Local history and description"], + [411,411.9,"Djibouti. French Territory of the Afars and Issas. French Somaliland"], + [411.42,411.45,"Ethnography"], + [411.5,411.83,"History"], + [411.9,411.9,"Local history and description"], + [421,432.5,"East Africa. British East Africa"], + [433.2,433.29,"Uganda"], + [433.242,433.245,"Ethnography"], + [433.252,433.287,"History"], + [433.29,433.29,"Local history and description"], + [433.5,434,"Kenya"], + [433.542,433.545,"Ethnography"], + [433.552,433.584,"History"], + [436,449,"Tanzania. Tanganyika. German East Africa"], + [443,443.3,"Ethnography"], + [443.5,448.25,"History"], + [449,449,"Zanzibar","Z2","Z2"], + [450,450.49,"Rwanda. Ruanda-Urundi"], + [450.24,450.25,"Ethnography"], + [450.26,450.437,"History"], + [450.49,450.49,"Local history and description"], + [450.5,450.95,"Burundi"], + [450.64,450.65,"Ethnography"], + [450.66,450.855,"History"], + [450.95,450.95,"Local history and description"], + [468,469,"Islands (East African coast)"], + [469,469,"Madagascar","M21","M38"], + [469,469,"Mascarene Islands","M39","M39"], + [469,469,"Mautitius (Ile de France)","M4","M495"], + [469,469,"Mayotte","M4975","M4975"], + [469,469,"Reunion","R3","R5"], + [469,469,"Seychelles","S4","S49"], + [470,671,"West Africa. West Coast"], + [477,477,"Upper Guinea"], + [479,479,"Lower Guinea"], + [491,516.9,"British West Africa"], + [507,507,"Ashanti Empire"], + [509,509.9,"Gambia"], + [509.42,509.45,"Ethnography"], + [509.5,509.83,"History"], + [509.9,509.9,"Local history and description"], + [509.97,512.9,"Ghana (Gold Coast)"], + [510.42,510.43,"Ethnography"], + [510.5,512.34,"History"], + [512.9,512.9,"Local history and description"], + [515,515.9,"Nigeria"], + [515.42,515.45,"Ethnography"], + [515.53,515.842,"History"], + [515.9,515.9,"Local history and description"], + [516,516.9,"Sierra Leone"], + [516.42,516.45,"Ethnography"], + [516.5,516.82,"History"], + [516.9,516.9,"Local history and description"], + [521,555.9,"French West Africa. French Sahara. West Sahara. Sahel"], + [541,541.9,"Benin. Dahomey"], + [541.42,541.45,"Ethnography"], + [541.5,541.845,"History"], + [541.9,541.9,"Local history and description"], + [543,543.9,"Guinea"], + [543.42,543.45,"Ethnography"], + [543.5,543.827,"History"], + [543.9,543.9,"Local history and description"], + [545,545.9,"Côte d'Ivoire. Ivory Coast"], + [545.42,545.45,"Ethnography"], + [545.52,545.83,"History"], + [545.9,545.9,"Local history and description"], + [546.1,546.49,"French-speaking Equatorial Africa"], + [546.1,546.19,"Gabon (Gaboon, Gabun)"], + [546.142,546.145,"Ethnography"], + [546.15,546.183,"History"], + [546.19,546.19,"Local history and description"], + [546.2,546.29,"Congo (Brazzaville). Middle Congo"], + [546.242,546.245,"Ethnography"], + [546.25,546.283,"History"], + [546.29,546.29,"Local history and description"], + [546.3,546.39,"Central African Republic. Central African Empire. Ubangi-Shari"], + [546.342,546.345,"Ethnography"], + [546.348,546.3852,"History"], + [546.39,546.39,"Local history and description"], + [546.4,546.49,"Chad (Tchad)"], + [546.442,546.445,"Ethnography"], + [546.449,546.483,"History"], + [546.49,546.49,"Local history and description"], + [547,547.9,"Niger"], + [547.42,547.45,"Ethnography"], + [547.5,547.83,"History"], + [547.9,547.9,"Local history and description"], + [548,548,"West Sahara"], + [549,549.9,"Senegal"], + [549.42,549.45,"Ethnography"], + [549.47,549.83,"History"], + [549.9,549.9,"Local history and description"], + [551,551.9,"Mali. Mali Federation. Sudanese Republic. French Sudan"], + [551.42,551.45,"Ethnography"], + [551.5,551.82,"History"], + [551.9,551.9,"Local history and description"], + [554,554.9,"Mauritania"], + [554.42,554.45,"Ethnography"], + [554.52,554.83,"History"], + [554.9,554.9,"Local history and description"], + [555,555.9,"Burkina Faso. Upper Volta"], + [555.42,555.45,"Ethnography"], + [555.517,555.837,"History"], + [555.9,555.9,"Local history and description"], + [561,581,"Cameroon (Cameroun, Kamerun)"], + [570,571,"Ethnography"], + [572,578.4,"History"], + [581,581,"Local history and description"], + [582,582.9,"Togo. Togoland"], + [582.42,582.45,"Ethnography"], + [582.5,582.82,"History"], + [582.9,582.9,"Local history and description"], + [591,615.9,"Portuguese-speaking West Africa"], + [613,613.9,"Guinea-Bissau. Portuguese Guinea"], + [613.42,613.45,"Ethnography"], + [613.5,613.83,"History"], + [613.9,613.9,"Local history and description"], + [615,615.9,"Sao Tome and Principe"], + [615.42,615.45,"Ethnography"], + [615.5,615.8,"History"], + [615.9,615.9,"Local history and description"], + [619,620.9,"Spanish West Africa"], + [620,620.9,"Equatorial Guinea (Spanish Guinea)"], + [620.42,620.45,"Ethnography"], + [620.46,620.83,"History"], + [620.9,620.9,"Local history and description"], + [621,637,"Liberia"], + [630,630.5,"Ethnography"], + [630.8,636.53,"History"], + [639,639,"Congo (Kongo) River region"], + [641,665,"Zaire. Congo (Democratic Republic). Belgian Congo"], + [649.5,650,"Ethnography"], + [650.2,663,"History"], + [665,665,"Local history and description"], + [669,671,"Islands"], + [671,671,"Cape Verde","C2","C2"], + [1001,1190,"Southern Africa"], + [1054,1058,"Ethnography"], + [1062,1182,"History"], + [1190,1190,"Local history and description"], + [1251,1465,"Angola"], + [1304,1308,"Ethnography"], + [1314,1436,"History"], + [1450,1465,"Local history and description"], + [1501,1685,"Namibia. South-West Africa"], + [1554,1558,"Ethnography"], + [1564,1651,"History"], + [1670,1685,"Local history and description"], + [1701,2405,"South Africa"], + [1754,1770,"Ethnography"], + [1757,1757,"Apartheid"], + [1758,1760,"Blacks"], + [1772,1974,"History"], + [1991,2054,"Cape Province. Cape of Good Hope"], + [2075,2145,"Orange Free State. Oranje Vrystaat"], + [2181,2278,"KwaZulu-Natal. Natal"], + [2291,2378,"Transvaal. South African Republic"], + [2421,2525,"Botswana. Bechuanaland"], + [2454,2458,"Ethnography"], + [2464,2502,"History"], + [2541,2686,"Lesotho. Basutoland"], + [2592,2596,"Ethnography"], + [2604,2660,"History"], + [2680,2686,"Local history and description"], + [2701,2825,"Swaziland"], + [2744,2746,"Ethnography"], + [2754,2806,"History"], + [2820,2825,"Local history and description"], + [2831,2864,"British Central Africa. Federation of Rhodesia and Nyasaland"], + [2871,3025,"Zimbabwe. Southern Rhodesia"], + [2910,2913,"Ethnography"], + [2914,3000,"History"], + [3020,3025,"Local history and description"], + [3031,3145,"Zambia. Northern Rhodesia"], + [3054,3058,"Ethnography"], + [3064,3119,"History"], + [3140,3145,"Local history and description"], + [3161,3257,"Malawi. Nyasaland"], + [3189,3192,"Ethnography"], + [3194,3237,"History"], + [3252,3257,"Local history and description"], + [3291,3415,"Mozambique"], + [3324,3328,"Ethnography"], + [3330,3398,"History"], + [3410,3415,"Local history and description"], + ], + DU: [ + [1,950,"History of Oceania (South Seas)"], + [28.11,68,"History"], + [80,398,"Australia"], + [108,117.2,"History"], + [120,125,"Ethnography"], + [125,125,"Australian aborigines"], + [145,145,"Australian Capital Territory. Canberra"], + [150,180,"New South Wales"], + [170,172,"History"], + [178,180,"Local history and description"], + [182,198,"Tasmania. Van Diemen's Land"], + [190,195.3,"History"], + [200,230,"Victoria"], + [220,222,"History"], + [228,230,"Local history and description"], + [250,280,"Queensland"], + [270,272,"History"], + [278,280,"Local history and description"], + [300,330,"South Australia"], + [320,322,"History"], + [328,330,"Local history and description"], + [350,380,"Western Australia"], + [370,372,"History"], + [378,380,"Local history and description"], + [390,390,"Central Australia"], + [391,391,"Northern Australia"], + [392,398,"Northern Territory of Australia"], + [400,430,"New Zealand"], + [419,422,"History"], + [422.5,424.5,"Ethnography"], + [422.8,424,"Maoris"], + [428,430,"Local history and description"], + [490,490,"Melanesia (General)"], + [500,500,"Micronesia (General)"], + [510,510,"Polynesia (General)"], + [520,950,"Smaller island groups"], + [620,629,"Hawaiian Islands. Hawaii"], + [739,747,"New Guinea"], + [810,819,"Samoan Islands"], + ], + DX: [ + [101,301,"History of Romanies"], + ], + E: [ + [11,143,"America"], + [11,29,"General"], + [29,29,"Elements in the population"], + [31,49.2,"North America"], + [51,73,"Pre-Columbian America. The Indians"], + [75,99,"Indians of North America"], + [81,83,"Indian wars"], + [99,99,"Indian tribes and cultures"], + [101,135,"Discovery of America and early explorations"], + [103,110,"Pre-Columbian period"], + [111,120,"Columbus"], + [121,135,"Post-Columbian period. El Dorado"], + [141,143,"Descriptive accounts of America. Earliest to 1810"], + [151,889,"United States"], + [151,169.12,"General"], + [171,183.9,"History"], + [171,180,"General"], + [173,173,"Sources and documents"], + [175,175.7,"Historiography"], + [176,176.8,"Biography"], + [179.5,179.5,"Historical geography"], + [181,181,"Military history"], + [182,182,"Naval history"], + [183,183.3,"Political history"], + [183.7,183.9,"Diplomatic history. Foreign and general relations"], + [183.8,183.8,"Relations with individual countries"], + [184,185.98,"Elements in the population"], + [184.5,185.98,"Afro-Americans"], + [185.2,185.89,"Status and development since emancipation"], + [185.96,185.98,"Biography. Genealogy"], + [186,199,"Colonial history (1607-1775)"], + [186,189,"General"], + [191,199,"By period"], + [191,191,"1607-1689"], + [195,199,"1689-1775"], + [196,196,"King William's War, 1689-1697"], + [197,197,"Queen Anne's War, 1702-1713"], + [198,198,"King George's War, 1744-1748"], + [199,199,"French and Indian War, 1755-1763"], + [201,298,"The Revolution, 1775-1783"], + [300,453,"Revolution to the Civil War, 1775/1783-1861"], + [300,302.6,"General"], + [302,302,"Collected works of American statemen"], + [302.1,302.1,"Political history"], + [302.5,302.6,"Biography (Late eighteenth century)"], + [303,440.5,"By period"], + [303,309,"1775-1789. The Confederation, 1783-1789"], + [310,337,"1789-1809. Constitutional period"], + [310.7,310.7,"Diplomatic history. Foreign and general relations"], + [311,320,"Washington's administrations, 1789-1797"], + [321,330,"John Adams' administration, 1797-1801"], + [323,323,"Troubles with France, 1796-1800"], + [331,337,"Jefferson's administrations, 1801-1809"], + [333,333,"Purchase of Louisiana, 1803"], + [335,335,"War with Tripoli, 1801-1805"], + [336,336.5,"Neutral trade and its restrictions, 1800-1810"], + [337.5,337.5,"Nineteenth century (General)"], + [337.8,400,"Early nineteenth century, 1801/1809-1845"], + [337.8,340,"General"], + [337.8,337.8,"Collected works of American statesmen"], + [339,340,"Biography"], + [341,370,"Madison's administrations, 1809-1817"], + [351.5,364.9,"War of 1812"], + [365,365,"War with Algeria, 1815"], + [371,375,"Monroe's administrations, 1817-1825"], + [373,373,"Missouri Compromise, 1820"], + [374,374,"Diplomatic history. Foreign relations"], + [376,380,"John Quincy Adams' administration, 1825-1829"], + [381,385,"Jackson's administrations, 1829-1837"], + [384.3,384.3,"Nullification"], + [386,390,"Van Buren's administration, 1837-1841"], + [391,392,"William H. Harrison's administration, March 4-April 4, 1841"], + [396,400,"Tyler's administration, April 4, 1841-1845"], + [398,398,"Northeastern boundary disputes, 1783-1845"], + [401,415.2,"Mexican War, 1846-1848"], + [408,408,"Mexican cessions of 1848"], + [415.6,440.5,"Middle nineteenth century, 1845/1848-1861"], + [415.6,415.9,"General"], + [415.6,415.6,"Collected works of American statesmen"], + [415.8,415.9,"Biography"], + [416,420,"Polk's administration, 1845-1849"], + [421,423,"Taylor's administiration, 1849-July 9, 1850"], + [423,423,"Slavery question, 1849-1853"], + [426,430,"Fillmore's administration, July 9, 1850-1853"], + [431,435,"Pierce's administration, 1853-1857"], + [433,433,"Slavery question, 1853-1857"], + [436,440.5,"Buchanan's administration, 1857-1861"], + [438,438,"Slavery question, 1857-1861"], + [440.5,440.5,"State of the country, November 1860-March 4, 1861"], + [441,453,"Slavery in the United States. Antislavery movements"], + [456,655,"Civil War period, 1861-1865"], + [456,459,"Lincoln's administrations, 1861-April 15, 1865"], + [461,655,"The Civil War, 1861-1865"], + [482,489,"Confederate States of America"], + [491,586,"Armies. Troops"], + [591,600,"Naval history"], + [660,738,"Late nineteenth century, 1865-1900"], + [660,664,"General"], + [660,660,"Collected works of American statesmen"], + [661.7,661.7,"Diplomatic history. Foreign and general relations"], + [663,664,"Biography"], + [666,670,"Andrew Johnson's administration, April 15, 1865-1869"], + [668,668,"Reconstruction, 1865-1877"], + [669,669,"Purchase of Alaska, 1867"], + [671,680,"Grant's administrations, 1869-1877"], + [681,685,"Hayes' administration, 1877-1881"], + [686,687.9,"Garfield's administration, March 4-September 19, 1881"], + [691,695,"Arthur's administration, September 19, 1881-1885"], + [696,700,"Cleveland's first administration, 1885-1889"], + [701,705,"Benjamin Harrison's administration, 1889-1893"], + [706,710,"Cleveland's second administration, 1893-1897"], + [711,738,"McKinley's first administration, 1897-1901"], + [713,713,"Annexation in 1898 of Hawaii, the Philippines, and Puerto Rico"], + [714,735,"War of 1898 (Spanish-American War)"], + [740,837.7,"Twentieth century"], + [740,749,"General"], + [740.5,740.5,"Sources and documents"], + [742.5,742.5,"Collected works of American statesmen"], + [743,743.5,"Political history"], + [743.5,743.5,"Un-American activities"], + [744,744.5,"Diplomatic history. Foreign and general relations"], + [745,745,"Military history"], + [746,746,"Naval history"], + [747,748,"Biography"], + [751,751,"McKinley's second administration, March 4-September 14, 1901"], + [756,760,"Theodore Roosevelt's administrations, September 14, 1901-1909"], + [761,765,"Taft's administration, 1909-1913"], + [766,783,"Wilson's administrations, 1913-1921"], + [768,768,"Purchase of Danish West Indies (Virgin Islands), 1917"], + [780,780,"Internal history during World War I"], + [784,805,"1919-1933. Harding-Coolidge-Hoover era. \"The twenties\""], + [785,786,"Harding's administration, 1921-August 2, 1923"], + [791,796,"Coolidge's administration, August 2, 1923-1929"], + [801,805,"Hoover's administration, 1919-1933"], + [806,812,"Franklin Delano Roosevelt's administrations, 1933-April 12, 1945"], + [813,816,"Truman's administrations, April 12, 1945-1953"], + [835,837.7,"Eisenhower's administrations, 1953-1961"], + [838,889,"Later twentieth century, 1961-2000"], + [838,840.8,"General"], + [838.3,838.3,"Sources and documents"], + [839.5,839.8,"Political history"], + [839.8,839.8,"Un-American activities"], + [840,840.2,"Diplomatic history. Foreign and general relations"], + [840.6,840.8,"Biography (General)"], + [841,843,"Kennedy's administration, 1961-November 22, 1963"], + [842.9,842.9,"Assassination, funeral, memorial services, etc."], + [846,851,"Johnson's administrations, November 22, 1963-1969"], + [855,861,"Nixon's administrations, 1969-August 9, 1974"], + [860,861,"Watergate Affair. Resignation"], + [865,868,"Ford's administration, August 9, 1974-1977"], + [872,875,"Carter's administration, 1977-1981"], + [876,880,"Reagan's administrations, 1981-1989"], + [877.3,877.3,"Assassination attempt"], + [881,884,"George H. W. Bush's administration, 1989-1993"], + [885,889,"Clinton's administrations, 1993-2001"], + [895,904,"Twenty-first century"], + [902,904,"George W. Bush's administrations, 2001-2009"], + [907,909,"Barack Obama’s administration, 2009-"], + ], + F: [ + [1,975,"United States local history"], + [1,15,"New England"], + [16,30,"Maine"], + [31,45,"New Hampshire"], + [46,60,"Vermont"], + [61,75,"Massachusetts"], + [76,90,"Rhode Island"], + [91,105,"Connecticut"], + [106,106,"Atlantic coast. Middle Atlantic States"], + [116,130,"New York"], + [131,145,"New Jersey"], + [146,160,"Pennsylvania"], + [161,175,"Delaware"], + [176,190,"Maryland"], + [191,205,"District of Columbia. Washington"], + [206,220,"The South. South Atlantic States"], + [221,235,"Virginia"], + [236,250,"West Virginia"], + [251,265,"North Carolina"], + [266,280,"South Carolina"], + [281,295,"Georgia"], + [296,301,"Gulf States. West Florida"], + [306,320,"Florida"], + [321,335,"Alabama"], + [336,350,"Mississippi"], + [350.5,355,"Mississippi River and Valley. Middle West"], + [366,380,"Louisiana"], + [381,395,"Texas"], + [396,396,"Old Southwest. Lower Mississippi Valley"], + [406,420,"Arkansas"], + [431,445,"Tennessee"], + [446,460,"Kentucky"], + [461,475,"Missouri"], + [476,485,"Old Northwest. Northwest Territory"], + [486,500,"Ohio"], + [516,520,"Ohio River and Valley"], + [521,535,"Indiana"], + [536,550,"Illinois"], + [550.5,553.2,"The Lake region. Great Lakes"], + [561,575,"Michigan"], + [576,590,"Wisconsin"], + [590.3,596.3,"The West. Trans-Mississippi Region. Great Plains"], + [597,597,"The Northwest"], + [598,598,"Missouri River and Valley"], + [601,615,"Minnesota"], + [616,630,"Iowa"], + [631,645,"North Dakota"], + [646,660,"South Dakota"], + [661,675,"Nebraska"], + [676,690,"Kansas"], + [691,705,"Oklahoma"], + [721,722,"Rocky Mountains. Yellowstone National Park"], + [726,740,"Montana"], + [741,755,"Idaho"], + [756,770,"Wyoming"], + [771,785,"Colorado"], + [786,790,"New Southwest. Colorado River, Canyon, and Valley"], + [791,805,"New Mexico"], + [806,820,"Arizona"], + [821,835,"Utah"], + [836,850,"Nevada"], + [850.5,851.5,"Pacific States"], + [851.7,851.7,"Cascade Range"], + [852,854,"Pacific Northwest. Columbia River and Valley. Northwest boundary since 1846"], + [856,870,"California"], + [871,885,"Oregon"], + [886,900,"Washington"], + [901,951,"Alaska"], + [951,951,"Bering Sea and Aleutian Islands"], + [965,965,"The territories of the United States (General)"], + [970,970,"Insular possessions of the United States (General)"], + [975,975,"Central American, West Indian, and other countries protected by and having close political affiliations with the United States (General)"], + [1001,1145.2,"British America"], + [1001,1145.2,"Canada"], + [1001,1035,"General"], + [1035.8,1035.8,"Maritime provinces. Atlantic coast of Canada"], + [1036,1040,"Nova Scotia. Acadia"], + [1041,1045,"New Brunswick"], + [1046,1049.7,"Prince Edward Island"], + [1050,1050,"St. Lawrence Gulf, River and Valley (General)"], + [1051,1055,"Quebec"], + [1056,1059.7,"Ontario"], + [1060,1060.97,"Canadian Northwest. Northwest Territories"], + [1061,1065,"Manitoba"], + [1067,1067,"Assiniboia"], + [1070,1074.7,"Saskatchewan"], + [1075,1080,"Alberta"], + [1086,1089.7,"British Columbia"], + [1090,1090,"Rocky Mountains of Canada"], + [1090.5,1090.5,"Arctic regions"], + [1091,1095.5,"Yukon"], + [1096,1100.5,"Mackenzie"], + [1101,1105.7,"Franklin"], + [1106,1110.5,"Keewatin"], + [1121,1139,"Newfoundland"], + [1135,1139,"Labrador"], + [1140,1140,"The Labrador Peninsula"], + [1141,1145.2,"Nunavut"], + [1170,1170,"French America"], + [1170,1170,"Saint Pierre and Miquelon"], + [1201,3799,"Latin America. Spanish America"], + [1201,1392,"Mexico"], + [1218.5,1221,"Antiquities. Indians"], + [1401,1419,"Latin America (General)"], + [1421,1440,"Central America"], + [1435,1435.3,"Mayas"], + [1441,1457,"Belize"], + [1461,1477,"Guatemala"], + [1481,1497,"Salvador (El Salvador)"], + [1501,1517,"Honduras"], + [1521,1537,"Nicaragua"], + [1541,1557,"Costa Rica"], + [1561,1577,"Panama"], + [1569,1569,"Canal Zone. Panama Canal","C2","C2"], + [1601,1629,"West Indies"], + [1630,1640,"Bermudas"], + [1650,1660,"Bahamas"], + [1741,1991,"Greater Antilles"], + [1751,1854.9,"Cuba"], + [1788,1788.22,"Communist regime"], + [1861,1896,"Jamaica"], + [1900,1941,"Haiti (Island). Hispaniola"], + [1912,1930,"Haiti (Republic)"], + [1931,1941,"Dominican Republic"], + [1951,1983,"Puerto Rico"], + [1991,1991,"Navassa"], + [2001,2151,"Lesser Antilles Groups of islands, by geographical distribution"], + [2006,2006,"Leeward islands"], + [2011,2011,"Windward Islands"], + [2016,2016,"Islands along Venezuela coast"], + [2033,2129,"Individual islands"], + [2131,2133,"British West Indies"], + [2136,2136,"Virgin Islands of the United States"], + [2141,2141,"Netherlands West Indies. Dutch West Indies"], + [2151,2151,"French West Indies"], + [2155,2191,"Caribbean area. Caribbean Sea"], + [2201,3799,"South America"], + [2201,2239,"General"], + [2251,2299,"Colombia"], + [2301,2349,"Venezuela"], + [2351,2351,"Guiana"], + [2361,2391,"Guyana. British Guiana"], + [2401,2431,"Surinam"], + [2441,2471,"French Guiana"], + [2501,2659,"Brazil"], + [2661,2699,"Paraguay"], + [2701,2799,"Uruguay"], + [2801,3021,"Argentina"], + [3031,3031.5,"Falkland Islands"], + [3051,3285,"Chile"], + [3301,3359,"Bolivia"], + [3401,3619,"Peru"], + [3701,3799,"Ecuador"], + ], + G: [ + [1,922,"Geography (General)"], + [65,69,"Geographers"], + [70,70.6,"Philosophy. Relation to other topics. Methodology"], + [80,99,"History of geography"], + [100.5,108.5,"Toponymy"], + [140,140,"Great cities of the world"], + [141,141,"Historical geography"], + [142,142,"Aerial geography"], + [149,180,"Travel. Voyages and travels (General)"], + [154.9,155.8,"Travel and state. Tourism"], + [200,336,"History of discoveries, explorations, and travel"], + [369,503,"Special voyages and travels"], + [521,539,"Adventures, shipwrecks, buried treasure, etc."], + [540,550,"Seafaring life, ocean travel, etc."], + [575,890,"Arctic and Antarctic regions"], + [905,910,"Tropics (General)"], + [912,922,"Northern and Southern Hemispheres"], + [1000,3122,"Atlases"], + [1000,1000.5,"Atlases of the moon, planets, etc."], + [1001,1046,"World atlases. Atlases of the Earth"], + [1050,1052,"Northern and Southern Hemispheres"], + [1053,1053,"Tropics. Torrid Zone"], + [1054,1055,"Polar regions. Frigid Zone"], + [1059,1061,"Maritime atlases (General)"], + [1100,3102,"By region or country"], + [1100,1779,"America. Western Hemisphere"], + [1105,1692,"North America"], + [1110,1114,"Greenland"], + [1115,1193,"Canada"], + [1200,1534.24,"United States"], + [1535,1537,"Caribbean area"], + [1540,1542,"Latin America (General)"], + [1545,1549,"Mexico"], + [1550,1594,"Central America"], + [1600,1692,"West Indies"], + [1700,1779,"South America"], + [1780,2799,"Eastern Hemisphere. Eurasia, Africa, etc."], + [1791,2196,"Europe"], + [2110,2196,"Former Soviet republics. Union of Soviet Socialist Republics (U.S.S.R.). Russia (Empire)"], + [2200,2444.84,"Asia"], + [2445,2739,"Africa"], + [2740,2799,"Australasia"], + [2800,3064,"Oceans (General)"], + [3100,3102,"Antarctica"], + [3122,3122,"Atlases of imaginary, literary, and mythological regions, etc., A-Z"], + [3160,3171,"Globes"], + [3180,9980,"Maps"], + [3180,3182,"Universe. Solar system"], + [3190,3191,"Celestial maps"], + [3195,3197,"Moon"], + [3200,3202,"World. Earth"], + [3210,3221,"Northern and Southern Hemispheres"], + [3240,3241,"Tropics. Torrid Zone"], + [3250,3251,"Temperate Zone"], + [3260,3272,"Polar regions. Frigid Zone"], + [3290,9880,"By region or country"], + [3290,5667,"America. Western Hemisphere"], + [3300,5184,"North America"], + [3380,3384,"Greenland"], + [3400,3612,"Canada"], + [3700,4384,"United States"], + [4390,4392,"Caribbean area"], + [4410,4763,"Mexico"], + [4800,4874,"Central America"], + [4900,5184,"West Indies"], + [5200,5667,"South America"], + [5670,8904,"Eastern Hemisphere. Eurasia, Africa, etc."], + [5700,7342,"Europe"], + [7000,7342,"Former Soviet republics. Union of Soviet Socialist Republics (U.S.S.R.). Russia (Empire)"], + [7400,8198.54,"Asia"], + [8200,8904,"Africa"], + [8950,9084,"Australasia"], + [9095,9794,"Oceans (General)"], + [9800,9804,"Antarctica"], + [9900,9980,"Unlocalized maps"], + ], + GA: [ + [1,1776,"Mathematical geography. Cartography"], + [51,87,"Surveys (General)"], + [101,1776,"Cartography"], + [109,109,"Aerial cartography"], + [109.5,109.5,"Cadastral mapping"], + [109.8,109.8,"Statistical mapping"], + [110,115,"Projection"], + [125,155,"Map drawing, modeling, printing, reading, etc."], + [192,197.3,"Collections of maps, globes, etc. Map libraries"], + [197.5,198,"Cartographers"], + [260,288,"Globe making. Globes"], + [300,325,"World maps, general atlases, etc."], + [341,1776,"Maps. By region or country"], + ], + GB: [ + [3,5030,"Physical geography"], + [400,649,"Geomorphology. Landforms. Terrain"], + [447,447,"Climatic geomorphology"], + [448,448,"Slopes"], + [450,460,"Coasts"], + [461,468.995,"Reefs"], + [471,478.995,"Islands"], + [500,555,"Mountains. Orography"], + [561,649,"Other natural landforms: Floodplains, caves, deserts, dunes, etc."], + [651,2998,"Hydrology. Water"], + [980,2998,"Ground and surface waters"], + [980,992,"Watersheds. Runoff. Drainage"], + [1001,1199.8,"Groundwater. Hydrogeology"], + [1201,1598,"Rivers. Stream measurements"], + [1601,2398,"Lakes. Limnology. Ponds. Lagoons"], + [2401,2598,"Ice. Glaciers. Ice sheets. Sea ice"], + [2601,2798,"Snow. Snow surveys"], + [2801,2998,"Hydrometeorology"], + [5000,5030,"Natural disasters"], + ], + GC: [ + [1,1581,"Oceanography"], + [63,63,"Oceanographic expeditions"], + [65,78,"Underwater exploration"], + [83,87.6,"Submarine topography"], + [96,97.8,"Estuarine oceanography"], + [100,103,"Seawater"], + [109,149,"Chemical oceanography"], + [150,182,"Physical oceanography"], + [151,155,"Density"], + [160,177,"Temperature"], + [177.6,182,"Optical oceanography"], + [190,190.5,"Ocean-atmosphere interaction"], + [200,376,"Dynamics of the ocean"], + [205,227,"Waves"], + [228.5,228.6,"Ocean circulation"], + [229,296.8,"Currents"], + [297,299,"Water masses and oceanic mixing"], + [300,376,"Tides"], + [377,399,"Marine sediments"], + [401,881,"Oceanography. By region"], + [1000,1023,"Marine resources. Applied oceanography"], + [1080,1581,"Marine pollution. Sea water pollution"], + ], + GE: [ + [1,350,"Environmental sciences"], + [70,90,"Environmental education"], + [170,190,"Environmental policy"], + [195,199,"Environmentalism. Green movement"], + [300,350,"Environmental management"], + ], + GF: [ + [1,900,"Human ecology. Anthropogeography"], + [51,51,"Environmental influences on humans"], + [75,75,"Human influences on the environment"], + [101,127,"Settlements"], + [125,125,"Cities. Urban geography"], + [127,127,"Rural settlements. Rural geography"], + [500,900,"By region or country"], + ], + GN: [ + [1,890,"Anthropology"], + [49,298,"Physical anthropology. Somatology"], + [51,59,"Anthropometry"], + [62.8,265,"Human variation"], + [269,279,"Race (General)"], + [280.7,280.7,"Man as an animal. Simian traits versus human traits"], + [281,289,"Human evolution"], + [282,286.7,"Fossil man. Human paleontology"], + [296,296.5,"Medical anthropology"], + [301,674,"Ethnology. Social and cultural anthropology"], + [357,367,"Culture and cultural processes"], + [378,396,"Collected ethnographies"], + [397,397.7,"Applied anthropology"], + [406,517,"Cultural traits, customs, and institutions"], + [406,442,"Technology. Material culture"], + [448,450.8,"Economic organization. Economic anthropology"], + [451,477.7,"Intellectual life"], + [478,491.7,"Social organization"], + [492,495.2,"Political organization. Political anthropology"], + [495.4,498,"Societal groups, ethnocentrism, diplomacy, warfare, etc."], + [502,517,"Psychological anthropology"], + [537,674,"Ethnic groups and races"], + [550,674,"By region or country"], + [700,890,"Prehistoric archaeology"], + ], + GR: [ + [1,950,"Folklore"], + [72,79,"Folk literature (General)"], + [81,81,"Folk beliefs, superstitions, etc. (General)"], + [99.6,390,"By region or country"], + [420,950,"By subject"], + [420,426,"Costume, jewelry"], + [430,488,"Folklore relating to private life"], + [500,615,"Supernatural beings, demonology, fairies, ghosts, charms, etc."], + [620,640,"Cosmic phenomena, weather lore"], + [650,690,"Geographical topics"], + [700,860,"Animals, plants, and minerals"], + [865,874,"Transportation, travel, commerce, etc."], + [880,880,"Medicine. Folk medicine"], + [890,915,"Occupations"], + [931,935,"Signs and symbols"], + [940,941,"Mythical places"], + ], + GT: [ + [1,7070,"Manners and customs (General)"], + [165,476,"Houses. Dwellings"], + [485,485,"Churches and church going"], + [495,499,"Human body and its parts. Personal beauty"], + [500,2370,"Costume. Dress. Fashion"], + [2400,3390.5,"Customs relative to private life"], + [3400,5090,"Customs relative to public and social life"], + [5220,5286,"Customs relative to transportation and travel"], + [5320,6737,"Customs relative to special classes"], + [5320,5690,"By birth, rank, etc."], + [5750,6390,"By occupation"], + ], + GV: [ + [1,1860,"Recreation. Leisure"], + [181.35,181.6,"Recreation leadership. Administration of recreation services"], + [182,182.5,"Recreational areas and facilities. Recreation centers"], + [191.2,200.66,"Outdoor life. Outdoor recreation"], + [191.68,198.975,"Camping"], + [198.945,198.975,"Farm vacations, dude ranches, etc."], + [199,199.62,"Hiking. Pedestrian tours"], + [199.8,200.35,"Mountaineering"], + [200.4,200.56,"Orienteering. Wilderness survival"], + [200.6,200.66,"Caving. Spelunking"], + [201,555,"Physical education and training"], + [346,351.5,"School and college athletics. Intramural and interscholastic athletics"], + [401,433,"Physical education facilities. Sports facilities"], + [435,436.7,"Physical measurements. Physical tests, etc."], + [450,451.4,"Nudism. Sunbathing"], + [460,555,"Gymnastics. Gymnastic exercises"], + [557,1198.995,"Sports"], + [711,711,"Coaching"], + [712,725,"Athletic contests. Sports events"], + [733,734.5,"Professionalism in sports. Professional sports (General)"], + [735,735,"Umpires. Sports officiating"], + [743,749,"Athletic and sporting goods, supplies, etc."], + [750,770.27,"Air sports: Airplane flying, kiteflying, bungee jumping, etc."], + [770.3,840,"Water sports: Canoeing, sailing, yachting, scuba diving, etc."], + [840.7,857,"Winter sports: Ice hockey, skiing, bobsledding, snowmobiling, etc."], + [861,1017,"Ball games: Baseball, football, golf, etc."], + [1020,1034,"Automobile travel. Motoring. Automobile racing"], + [1040,1060.4,"Cycling. Bicycling. Motorcycling"], + [1060.5,1098,"Track and field athletics"], + [1100,1150.9,"Fighting sports: Bullfighting, boxing, fencing, etc."], + [1151,1190,"Shooting. Archery"], + [1195,1198.995,"Wrestling"], + [1199,1570,"Games and amusements"], + [1201.5,1201.5,"Hobbies (General)"], + [1203,1220.8,"Children's games and amusements"], + [1218.5,1220.8,"Toys"], + [1221,1469.63,"Indoor games and amusements"], + [1232,1299,"Card games: Poker, patience, whist, etc."], + [1301,1311,"Gambling. Chance and banking games"], + [1312,1469,"Board games. Move games"], + [1469.15,1469.62,"Computer games. Video games. Fantasy games"], + [1470,1511,"Parties. Party games and stunts"], + [1491,1507,"Puzzles"], + [1541,1561,"Parlor magic and tricks"], + [1564,1565,"Darts"], + [1580,1799.4,"Dancing"], + [1800,1860,"Circuses, spectacles, etc."], + ], + H: [ + [1,99,"Social sciences (General)"], + ], + HA: [ + [1,4737,"Statistics"], + [29,32,"Theory and method of social science statistics"], + [36,37,"Statistical services. Statistical bureaus"], + [38,39,"Registration of vital events. Vital records"], + [154,4737,"Statistical data"], + [154,155,"Universal statistics"], + [175,473,"By region or country"], + ], + HB: [ + [1,3840,"Economic theory. Demography"], + [71,74,"Economics as a science. Relation to other subjects"], + [75,130,"History of economics. History of economic theory"], + [131,147,"Methodology"], + [135,147,"Mathematical economics. Quantitative methods"], + [201,206,"Value. Utility"], + [221,236,"Price"], + [238,251,"Competition. Production. Wealth"], + [501,501,"Capital. Capitalism"], + [522,715,"Income. Factor shares"], + [535,551,"Interest"], + [601,601,"Profit"], + [615,715,"Entrepreneurship. Risk and uncertainty. Property"], + [801,843,"Consumption. Demand"], + [846,846.8,"Welfare theory"], + [848,3697,"Demography. Population. Vital events"], + [3711,3840,"Business cycles. Economic fluctuations"], + ], + HC: [ + [10,1085,"Economic history and conditions"], + [79,79,"Special topics"], + [92,92,"Economic geography of the oceans (General)"], + [94,1085,"By region or country"], + ], + HD: [ + [28,9999,"Industries. Land use. Labor"], + [28,70,"Management. Industrial management"], + [39,40.7,"Capital. Capital investments"], + [41,41,"Competition"], + [45,45.2,"Technological innovations. Automation"], + [47,47.4,"Costs"], + [49,49.5,"Crisis management. Emergency management. Inflation"], + [50,50.5,"Delegation of authority. Decentralization. Span of control"], + [56,57.5,"Industrial productivity"], + [58,58,"Location of industry"], + [58.7,58.95,"Organizational behavior, change and effectiveness. Corporate culture"], + [59,59.6,"Public relations. Industrial publicity"], + [60,60.5,"Social responsibility of business"], + [61,61,"Risk in industry. Risk management"], + [62,62,"Standardization. Simplification. Waste"], + [62.2,62.8,"Management of special enterprises"], + [66,66.2,"Work groups. Team work in industry. Quality circles"], + [69,69,"Other"], + [72,88,"Economic growth, development, planning"], + [101,1395.5,"Land use Land tenure"], + [1286,1289,"Communal ownership"], + [1290,1291,"Municipal ownership"], + [1301,1313,"Nationalization (Agrarian socialism)"], + [1326,1329,"Large holdings"], + [1330,1331,"Landlord and peasant"], + [1332,1333.5,"Land reform. Agrarian reform"], + [1334,1335,"Consolidation of land holdings"], + [1336,1339,"Small holdings. Peasant proprietors. Parcellation"], + [1361,1395.5,"Real estate business"], + [1401,2210,"Agriculture"], + [1428,1431,"International cooperation"], + [1470,1476,"Size of farms"], + [1478,1478,"Sharecropping"], + [1483,1486,"Agricultural associations, societies, etc."], + [1491,1491.5,"Cooperative agriculture"], + [1492,1492.5,"Collective farms"], + [1493,1493.5,"Government owned and operated farms. State farms. Sovkhozes"], + [1501,1542,"Agricultural classes"], + [1549,1549,"Gleaning"], + [1580,1580,"Reclamation of agricultural land. Melioration"], + [1635,1702,"Utilization and culture of special classes of lands"], + [1711,1741,"Irrigation"], + [2321,4730.9,"Industry"], + [2329,2329,"Industrialization"], + [2330,2330,"Rural industries"], + [2331,2336,"Home labor. Home-based businesses"], + [2337,2339,"Sweatshops"], + [2340.8,2346.5,"Small and medium-sized businesses, artisans, handicrafts, trades"], + [2350.8,2356,"Large industry. Factory system. Big business"], + [2365,2385,"Contracting. Letting of contracts"], + [2421,2429,"Trade associations"], + [2709,2930.7,"Corporations"], + [2951,3575,"Cooperation. Cooperative societies"], + [3611,4730.9,"Industrial policy. The state and industrial organization"], + [4801,8943,"Labor. Work. Working class"], + [4861,4895,"Labor systems"], + [4909,5100.9,"Wages"], + [5106,5267,"Hours of labor"], + [5306,5474,"Labor disputes. Strikes and lockouts"], + [5481,5630.7,"Industrial arbitration. Mediation and conciliation"], + [5650,5660,"Employee participation in management. Employee ownership. Industrial democracy. Works councils"], + [5701,6000.9,"Labor market. Labor supply. Labor demand"], + [6050,6305,"Classes of labor"], + [6350,6940.7,"Trade unions. Labor unions. Workers' associations"], + [6941,6948,"Employers' associations"], + [6951,6957,"Industrial sociology. Social conditions of labor"], + [6958.5,6976,"Industrial relations"], + [6977,7080,"Cost and standard of living"], + [7088,7252,"Social insurance. Social security. Pension"], + [7255,7256,"Vocational rehabilitation. Employment of people with disabilities"], + [7260,7780.8,"Industrial hygiene. Industrial welfare"], + [7795,8027,"Labor policy. Labor and the state"], + [8031,8031,"Labor in politics. Political activity of the working class"], + [8038,8038,"Professions (General). Professional employees"], + [8039,8039,"By industry or trade"], + [8045,8943,"By region or country"], + [9000,9999,"Special industries and trades"], + [9000,9495,"Agricultural industries"], + [9502,9502.5,"Energy industries. Energy policy. Fuel trade"], + [9506,9624,"Mineral industries. Metal trade"], + [9650,9663,"Chemical industries"], + [9665,9675,"Pharmaceutical industry"], + [9680,9714,"Mechanical industries"], + [9715,9717.5,"Construction industry"], + [9720,9975,"Manufacturing industries"], + [9999,9999,"Miscellaneous industries and trades"], + ], + HE: [ + [1,9990,"Transportation and communications"], + [199,199.5,"Freight (General)"], + [199.9,199.9,"Passenger traffic (General)"], + [305,311,"Urban transportation"], + [323,328,"Transportation geography. Trade routes"], + [331,380,"Traffic engineering. Roads and highways. Streets"], + [369,373,"Traffic surveys (General)"], + [374,377,"Bridges"], + [379,380,"Tunnels. Vehicular tunnels"], + [380.8,971,"Water transportation"], + [380.8,560,"Waterways"], + [561,971,"Shipping"], + [730,943,"Merchant marine. Ocean shipping. Coastwise shipping"], + [1001,5600,"Railroads. Rapid transit systems"], + [5601,5725,"Automotive transportation"], + [5746,5749,"Stage lines"], + [5751,5870,"Ferries"], + [5880,5990,"Express service"], + [6000,7500,"Postal service. Stamps. Philately"], + [7511,7549,"Pneumatic service"], + [7601,8700.9,"Telecommunication industry. Telegraph"], + [8660,8688,"Wireless telegraph. Radiotelegraphy"], + [8689,8700.95,"Radio and television broadcasting"], + [8701,9680.7,"Telephone industry"], + [9713,9715,"Cellular telephone services industry. Wireless telephone industry"], + [9719,9721,"Artificial satellite telecommunications"], + [9723,9737,"Signaling"], + [9751,9756,"Messenger service"], + [9761,9900,"Air transportation. Airlines"], + ], + HF: [ + [1,6182,"Commerce"], + [294,343,"Boards of trade. Chambers of commerce. Merchants' associations"], + [1014,1014,"Balance of trade"], + [1021,1027,"Commercial geography. Economic geography"], + [1040,1054,"Commodities. Commercial products"], + [1701,2701,"Tariff. Free trade. Protectionism"], + [3000,4055,"By region or country"], + [5001,6182,"Business"], + [5381,5386,"Vocational guidance. Career development"], + [5387,5387.5,"Business ethics"], + [5410,5417.5,"Marketing. Distribution of products"], + [5419,5422,"Wholesale trade"], + [5428,5429.6,"Retail trade"], + [5429.7,5430.6,"Shopping centers. Shopping malls"], + [5437,5444,"Purchasing. Selling. Sales personnel. Sales executives"], + [5446,5459,"Canvassing. Peddling"], + [5460,5469.5,"Department stores. Mail order business. Supermarkets. Convenience stores"], + [5469.7,5481,"Markets. Fairs"], + [5482,5482.4,"Secondhand trade"], + [5482.6,5482.65,"Black market"], + [5484,5495,"Warehouses. Storage"], + [5520,5541,"Office equipment and supplies"], + [5546,5548.6,"Office management"], + [5548.7,5548.85,"Industrial psychology"], + [5549,5549.5,"Personnel management. Employment management"], + [5601,5689,"Accounting. Bookkeeping"], + [5691,5716,"Business mathematics. Commercial arithmetic"], + [5717,5734.7,"Business communication"], + [5735,5746,"Business records management"], + [5761,5780,"Shipment of goods. Delivery of goods"], + [5801,6182,"Advertising"], + ], + HG: [ + [1,9999,"Finance"], + [178,178,"Liquidity"], + [179,179,"Personal finance"], + [201,1496,"Money"], + [258,312,"Precious metals. Bullion"], + [315,315,"Small coins"], + [321,329,"Mints. Assaying"], + [335,339,"Counterfeiting"], + [348,353.5,"Paper money"], + [361,363,"Legal tender"], + [381,395,"International coinage"], + [401,421,"Bimetallism"], + [451,1496,"By region or country"], + [1501,3550,"Banking"], + [1621,1638,"Interest rates. Interest tables"], + [1641,1643,"Bank loans. Bank credit. Commercial loans"], + [1651,1654,"Discount"], + [1655,1655,"Acceptances"], + [1656,1656,"Bank reserves. Bank liquidity. Loan loss reserves"], + [1660,1660,"Bank accounts. Bank deposits. Deposit banking"], + [1662,1662,"Insurance of deposits. Deposit insurance"], + [1685,1704,"Drafts. Checks"], + [1706,1708,"Accounting. Bookkeeping"], + [1709,1709,"Data processing"], + [1710,1710.5,"Electronic funds transfers"], + [1722,1722,"Bank mergers"], + [1723,1723,"Bank stocks. Banking as an investment"], + [1725,1778,"Banks and the state. State supervision of banks"], + [1811,2351,"Special classes of banks and financial institutions"], + [2397,3550,"By region or country"], + [3691,3769,"Credit. Debt. Loans"], + [3810,4000,"Foreign exchange. International finance. International monetary system"], + [4001,4285,"Finance management. Business finance. Corporation finance"], + [4301,4480.9,"Trust services. Trust companies"], + [4501,6051,"Investment, capital formation, speculation"], + [4530,4530,"Investment companies. Investment trusts. Mutual funds"], + [4538,4538,"Foreign investments"], + [4551,4598,"Stock exchanges"], + [4621,4621,"Stockbrokers. Security dealers. Investment advisers"], + [4701,4751,"Government securities. Industrial securities. Venture capital"], + [4900,5993,"By region or country"], + [6001,6051,"Speculation"], + [6105,6270.9,"Lotteries"], + [8011,9999,"Insurance"], + [8053.5,8054.45,"Insurance for professions. Malpractice insurance. Professional liability insurance"], + [8059,8059,"Business insurance"], + [8075,8107,"Insurance business. Insurance management"], + [8111,8123,"Government policy. State supervision"], + [8205,8220,"Government insurance"], + [8501,8745,"By region or country"], + [8751,9295,"Life insurance"], + [8779,8793,"Actuarial science. Statistical theory and methodology applied to insurance"], + [8799,8830,"By class insured, by risk, by plan"], + [8835,8899,"Life insurance business. Management"], + [8901,8914,"Government policy. State supervision"], + [8941,9200.5,"By region or country"], + [9201,9245,"Mutual life insurance. Assessment life insurance. Fraternal life insurance"], + [9251,9262,"Industrial life insurance"], + [9271,9271,"Child insurance. Life insurance for children"], + [9291,9295,"Maternity insurance"], + [9301,9343,"Accident insurance"], + [9371,9399,"Health insurance"], + [9651,9899,"Fire insurance"], + [9956,9969,"Casualty insurance"], + [9969.5,9999,"Other insurance"], + ], + HJ: [ + [9,9940,"Public finance"], + [9,99.8,"Periodicals. Serials. By region or country"], + [210,240,"History"], + [241,1620,"By region or country"], + [2005,2216,"Income and expenditure. Budget"], + [2240,5908,"Revenue. Taxation. Internal revenue"], + [2321,2323,"Tax incidence. Tax shifting. Tax equity"], + [2326,2327,"Progressive taxation"], + [2336,2337,"Tax exemption"], + [2338,2338,"Taxation of government property"], + [2351,2351,"Inflation and taxation"], + [2351.4,2351.4,"Tax revenue estimating"], + [2361,3192.7,"By region or country"], + [3801,3844,"Revenue from sources other than taxation"], + [3863,3925,"Direct taxation"], + [4113,4601,"Property tax"], + [4629,4830,"Income tax"], + [4919,4936,"Capitation. Poll tax"], + [5309,5510,"Administrative fees. User charges. License fees"], + [6603,7390,"Customs administration"], + [7461,7980,"Expenditures. Government spending"], + [8001,8899,"Public debts"], + [8052,8052,"Sinking funds. Amortization"], + [8101,8899,"By region or country"], + [9103,9695,"Local finance. Municipal finance"], + [9701,9940,"Public accounting. Auditing"], + ], + HM: [ + [1,1281,"Sociology"], + [435,477,"History of sociology. History of sociological theory"], + [461,473,"Schools of sociology. Schools of social thought"], + [481,554,"Theory. Method. Relations to other subjects"], + [621,656,"Culture"], + [661,696,"Social control"], + [701,701,"Social systems"], + [706,706,"Social structure"], + [711,806,"Groups and organizations"], + [756,781,"Community"], + [786,806,"Organizational sociology. Organization theory"], + [811,821,"Deviant behavior. Social deviance"], + [826,826,"Social institutions"], + [831,901,"Social change"], + [1001,1281,"Social psychology"], + [1041,1101,"Social perception. Social cognition"], + [1106,1171,"Interpersonal relations. Social behavior"], + [1176,1281,"Social influence. Social pressure"], + ], + HN: [ + [1,995,"Social history and conditions. Social problems. Social reform"], + [30,39,"The church and social problems"], + [41,46,"Community centers. Social centers"], + [50,995,"By region or country"], + ], + HQ: [ + [1,2044,"The Family. Marriage. Women"], + [12,449,"Sexual life"], + [19,30.7,"Sexual behavior and attitudes. Sexuality"], + [31,64,"Sex instruction and sexual ethics"], + [71,72,"Sexual deviations"], + [74,74.2,"Bisexuality"], + [75,76.8,"Homosexuality. Lesbianism"], + [77,77.2,"Transvestism"], + [77.7,77.95,"Transexualism"], + [79,79,"Sadism. Masochism. Fetishism, etc."], + [101,440.7,"Prostitution"], + [447,447,"Masturbation"], + [449,449,"Emasculation. Eunuchs, etc."], + [450,472,"Erotica"], + [503,1064,"The family. Marriage. Home"], + [750,755.5,"Eugenics"], + [755.7,759.92,"Parents. Parenthood"], + [760,767.7,"Family size"], + [767.8,792.2,"Children. Child development"], + [793,799.2,"Youth. Adolescents. Teenagers"], + [799.5,799.9,"Young men and women"], + [799.95,799.97,"Adulthood"], + [800,800.4,"Single people"], + [801,801.83,"Man-woman relationships. Courtship. Dating"], + [802,802,"Matrimonial bureaus. Marriage brokerage"], + [802.5,802.5,"Matrimonial advertisements"], + [803,803,"Temporary marriage. Trial marriage. Companionate marriage"], + [804,804,"Breach of promise"], + [805,805,"Desertion"], + [806,806,"Adultery"], + [811,960.7,"Divorce"], + [961,967,"Free love"], + [981,996,"Polygamy"], + [997,997,"Polyandry"], + [998,999,"Illegitimacy. Unmarried mothers"], + [1001,1006,"The state and marriage"], + [1051,1057,"The church and marriage"], + [1058,1058.5,"Widows and widowers. Widowhood"], + [1060,1064,"Aged. Gerontology (Social aspects). Retirement"], + [1073,1073.5,"Thanatology. Death. Dying"], + [1075,1075.5,"Sex role"], + [1088,1090.7,"Men"], + [1101,2030.7,"Women. Feminism"], + [1871,2030.7,"Women's clubs"], + [2035,2039,"Life skills. Coping skills. Everyday living skills"], + [2042,2044,"Life style"], + ], + HS: [ + [1,3371,"Societies: secret, benevolent, etc."], + [101,330.7,"Secret societies"], + [351,929,"Freemasons"], + [951,1179,"Odd Fellows"], + [1201,1350,"Knights of Pythias"], + [1355,1355,"Other societies"], + [1501,2460.7,"Other societies. By classes"], + [1501,1510,"Benevolent and \"friendly\" societies and mutual assessment fraternities"], + [1525,1560,"Religious societies"], + [1601,2265,"Race societies"], + [2275,2275,"Occupation societies"], + [2301,2460.7,"Political and \"patriotic\" societies"], + [2501,3371,"Clubs. Clubs and societies for special classes"], + ], + HT: [ + [51,1595,"Communities. Classes. Races"], + [51,65,"Human settlements. Communities"], + [101,395,"Urban groups. The city. Urban sociology"], + [161,165,"Garden cities. \"The city beautiful\""], + [165.5,169.9,"City planning"], + [170,178,"Urban renewal. Urban redevelopment"], + [201,221,"City population"], + [231,231,"Effect of city life"], + [251,265,"Mental and moral life"], + [281,281,"Recreation. Amusements"], + [321,325,"The city as an economic factor. City promotion"], + [330,334,"Metropolitan areas"], + [351,352,"Suburban cities and towns"], + [361,384,"Urbanization. City and country"], + [388,388,"Regional economics. Space in economics"], + [390,395,"Regional planning"], + [401,485,"Rural groups. Rural sociology"], + [601,1445,"Classes"], + [621,635,"Origin of social classes"], + [641,657,"Classes arising from birth"], + [675,690,"Classes arising from occupation"], + [713,725,"Caste system"], + [731,731,"Freedmen"], + [751,815,"Serfdom"], + [851,1445,"Slavery"], + [1501,1595,"Races"], + ], + HV: [ + [1,9960,"Social pathology. Social and public welfare. Criminology"], + [40,69,"Social service. Social work. Charity organization and practice"], + [85,525,"By region or country"], + [530,530,"The church and charity"], + [541,541,"Women and charity"], + [544,544,"Charity fairs, bazaars, etc."], + [544.5,544.5,"International social work"], + [547,547,"Self-help groups"], + [551.2,639,"Emergency management"], + [553,639,"Relief in case of disasters"], + [560,583,"Red Cross. Red Crescent"], + [599,639,"Special types of disasters"], + [640,645,"Refugee problems"], + [650,670,"Life saving"], + [675,677,"Accidents. Prevention of accidents"], + [680,696,"Free professional services"], + [697,4959,"Protection, assistance and relief"], + [697,3024,"Special classes"], + [697,700.7,"Families. Mothers. Widow's pensions"], + [701,1420.5,"Children"], + [835,847,"Foundlings"], + [873,887,"Destitute, neglected, and abandoned children. Street children"], + [888,907,"Children with disabilities"], + [931,941,"Fresh-air funds"], + [959,1420.5,"Orphanages. Orphans"], + [1421,1441,"Young adults. Youth. Teenagers"], + [1442,1448,"Women"], + [1449,1449,"Gay men. Lesbians"], + [1450,1494,"Aged"], + [1551,3024,"People with disabilities"], + [3025,3174,"Special classes. By occupation"], + [3025,3163,"Mariners"], + [3165,3173,"Shop women, clerks, etc."], + [3174,3174,"Other. By occupation"], + [3176,3199,"Special classes. By race or ethnic group"], + [4005,4013,"Immigrants"], + [4023,4470.7,"Poor in cities. Slums"], + [4480,4630,"Mendicancy. Vagabondism. Tramps. Homelessness"], + [4701,4890.9,"Protection of animals. Animal rights. Animal welfare"], + [4905,4959,"Animal experimentation. Anti-vivisection"], + [4961,4995,"Degeneration"], + [5001,5720.5,"Alcoholism. Intemperance. Temperance reform"], + [5725,5770,"Tobacco habit"], + [5800,5840,"Drug habits. Drug abuse"], + [6001,7220.5,"Criminology"], + [6035,6197,"Criminal anthropology"], + [6201,6249,"Criminal classes"], + [6250,6250.4,"Victims of crimes. Victimology"], + [6251,6773.55,"Crimes and offenses"], + [6774,7220.5,"Crimes and criminal classes"], + [7231,9960,"Criminal justice administration"], + [7428,7428,"Social work with delinquents and criminals"], + [7431,7431,"Prevention of crime, methods, etc."], + [7435,7439,"Gun control"], + [7551,8280.7,"Police. Detectives. Constabulary"], + [7935,8025,"Administration and organization"], + [8031,8080,"Police duty. Methods of protection"], + [8035,8069,"Special classes of crimes, offenses and criminals"], + [8073,8079.35,"Investigation of crimes. Examination and identification of prisoners"], + [8079.2,8079.35,"Police social work"], + [8079.5,8079.55,"Traffic control. Traffic accident investigation"], + [8081,8099,"Private detectives. Detective bureaus"], + [8130,8280.7,"By region or country"], + [8290,8291,"Private security services"], + [8301,9920.7,"Penology. Prisons. Corrections"], + [9051,9230.7,"The juvenile offender. Juvenile delinquency. Reform schools, etc."], + [9261,9430.7,"Reformation and reclamation of adult prisoners"], + [9441,9920.7,"By region or country"], + [9950,9960,"By region or country"], + ], + HX: [ + [1,970.7,"Socialism. Communism. Anarchism"], + [519,550,"Communism/socialism in relation to special topics"], + [626,696,"Communism: Utopian socialism, collective settlements"], + [806,811,"Utopias. The ideal state"], + [821,970.9,"Anarchism"], + ], + J: [ + [1,981,"General legislative and executive papers"], + [1,9,"Gazettes The Library of Congress now classes this material in K"], + [80,87,"United States"], + [80,82,"Presidents' messages and other executive papers"], + [100,981,"Other regions and countries"], + ], + JA: [ + [1,92,"Political science (General)"], + [1,26,"Periodicals"], + [27,34,"Societies"], + [35.5,35.5,"Congresses"], + [60,64,"Dictionaries and encyclopedias"], + [71,80,"Theory. Relations to other subjects"], + [81,84,"History"], + [86,88,"Study and teaching. Research"], + [92,92,"Collective biography of political scientists"], + ], + JC: [ + [11,605,"Political theory. The state. Theories of the state"], + [47,47,"Oriental state"], + [49,49,"Islamic state"], + [51,93,"Ancient state"], + [109,121,"Medieval state"], + [131,273,"Modern state"], + [177,178,"Thomas Paine"], + [311,314,"Nationalism. Nation state"], + [319,323,"Political geography"], + [327,327,"Sovereignty"], + [328.2,328.2,"Consensus. Consent of the governed"], + [328.6,328.65,"Violence. Political violence"], + [329,329,"Patriotism"], + [345,347,"Symbolism"], + [348,497,"Forms of the state"], + [571,605,"Purpose, functions, and relations of the state"], + ], + JF: [ + [20,2112,"Political institutions and public administration"], + [20,1177,"General. Comparative government"], + [51,56,"General works. History"], + [225,619,"Organs and functions of government"], + [251,289,"Executive. Heads of state"], + [331,341,"Parliamentary government"], + [491,619,"Legislation. Legislative process. Law-making"], + [799,1177,"Political rights. Political participation"], + [1338,2112,"Public administration"], + [1501,1521,"Civil service"], + [2011,2112,"Political parties"], + ], + JJ: [ + [1000,1019,"Political institutions and public administration (North America)"], + ], + JK: [ + [1,9993,"Political institutions and public administration (United States)"], + [1,9593,"United States"], + [404,1685,"Government. Public administration"], + [501,868,"Executive branch"], + [631,868,"Civil Service. Departments and agencies"], + [1012,1432,"Congress. Legislative branch"], + [1154,1276,"Senate"], + [1308,1432,"House of Representatives"], + [1606,1683,"Capital. Public buildings. Government property. Government purchasing"], + [1717,2217,"Political rights. Practical politics"], + [1758,1761,"Citizenship"], + [1846,1929,"Suffrage"], + [1965,2217,"Electoral system"], + [2255,2391,"Political parties"], + [2403,9593,"State government"], + [9663,9993,"Confederate States of America"], + ], + JL: [ + [1,3899,"Political institutions and public administration (Canada, Latin America, etc.)"], + [1,500,"Canada"], + [599.5,839,"West Indies. Caribbean Area"], + [1200,1299,"Mexico"], + [1400,1679,"Central America"], + [1850,3899,"South America"], + ], + JN: [ + [1,9689,"Political institutions and public administration (Europe)"], + [1,97,"General"], + [101,1371,"Great Britain"], + [1187,1371,"Scotland"], + [1395,1571.5,"Ireland"], + [1601,2191,"Austria-Hungary. Austria. Hungary"], + [2210,2229,"Czech Republic. Czechoslovakia"], + [2240,2240,"Slovakia"], + [2301,3007,"France"], + [3201,4944,"Germany"], + [5001,5191,"Greece"], + [5201,5690,"Italy"], + [5701,5999,"Netherlands"], + [6101,6371,"Belgium"], + [6500,6598,"Soviet Union. Russia. Former Soviet Republics"], + [6615,6615,"Estonia"], + [6630,6639,"Ukraine"], + [6640,6649,"Belarus"], + [6680,6689,"Moldova"], + [6690,6699,"Russia (Federation)"], + [6730,6739,"Latvia"], + [6745,6745,"Lithuania"], + [6750,6769,"Poland"], + [7011,7066,"Scandinavia. Northern Europe"], + [7101,7367,"Denmark"], + [7370,7379,"Greenland"], + [7380,7389,"Iceland"], + [7390,7399,"Finland"], + [7401,7695,"Norway"], + [7721,7995,"Sweden"], + [8101,8399,"Spain"], + [8423,8661,"Portugal"], + [8701,9599,"Switzerland"], + [9600,9689,"Balkan States"], + ], + JQ: [ + [21,6651,"Political institutions and public administration (Asia, Africa, Australia, Pacific Area, etc.)"], + [21,1852,"Asia"], + [200,620,"India"], + [1070,1199,"Central Asia"], + [1499,1749,"East Asia"], + [1758,1852,"Middle East"], + [1850,1850,"Arab countries"], + [1852,1852,"Islamic countries"], + [1870,3981,"Africa"], + [3981.5,3986.7,"Atlantic Ocean islands"], + [3995,6651,"Australia. New Zealand. Pacific Ocean islands"], + ], + JS: [ + [39,8500,"Local government. Municipal government"], + [55,68,"History"], + [141,163,"Executive branch. Mayor"], + [171,171,"Legislative branch"], + [221,227,"Elections. Local elections. Municipal elections"], + [241,271,"Local government other than municipal"], + [300,1583,"United States"], + [1701,1800,"Canada"], + [1840,2058.9,"West Indies. Caribbean Area"], + [2101,2143,"Mexico"], + [2145,2219,"Central America"], + [2300,2778,"South America"], + [3000,6949.89,"Europe"], + [6950,7520,"Asia"], + [7510,7510,"Arab countries"], + [7520,7520,"Islamic countries"], + [7525,7819.9,"Africa"], + [7820,7827.9,"Atlantic Ocean islands"], + [7900,7906.9,"Indian Ocean islands"], + [8001,8490.9,"Australia. New Zealand. Pacific Ocean islands"], + ], + JV: [ + [1,9480,"Colonies and colonization. Emigration and immigration. International migration"], + [1,5397,"Colonies and colonization"], + [1,9,"Periodicals. Serials"], + [10,19,"Societies"], + [61,152,"History"], + [412,461,"Administration"], + [500,5397,"Colonizing nations"], + [6001,9480,"Emigration and immigration. International migration"], + [6001,6006,"Periodicals. Serials"], + [6021,6033,"History"], + [6091,6124,"Emigration"], + [6201,6347,"Immigration"], + [6403,7127,"United States"], + [7200,7539,"Canada, Latin America, etc."], + [7590,8339.7,"Europe"], + [8490,8758,"Asia"], + [8760,8760,"Arab countries"], + [8762,8762,"Islamic countries"], + [8790,9024.5,"Africa"], + [9029,9036,"Atlantic Ocean islands"], + [9040,9047,"Indian Ocean islands"], + [9100,9269,"Australia. New Zealand"], + [9290,9470,"Pacific Ocean islands"], + ], + JX: [ + [1,6650,"International law, see JZ and KZ"], + [63,191,"Collections. Documents. Cases"], + [220,1195,"Collections, cases, etc. By country"], + [1261,1283,"Codification of international law"], + [1305,1598,"Foreign relations"], + [1621,1896,"Diplomacy"], + [1901,1995,"International arbitration, organization, etc."], + [2001,6650,"International law"], + ], + JZ: [ + [5,6530,"International relations"], + [5.5,18,"Periodicals"], + [24,38,"Societies, associations, academies, institutes, etc., for the study of international relations"], + [63,1153,"Sources"], + [221,1153,"By region or country"], + [1249,1254,"Relation to other disciplines and topics"], + [1305,2060,"Scope of international relations. Political theory. Diplomacy"], + [1329.5,1395,"By period"], + [1400,1454,"Diplomatic and consular service"], + [1464,2060,"Scope of international relations with regard to countries, territories, regions, etc."], + [3674,3875,"State territory and its parts"], + [3685,3685,"Boundaries"], + [3686,3875,"International waters"], + [4835,5490,"International organizations and associations"], + [4841,4848,"Political non-governmental organizations. NGOs"], + [4850,5490,"Intergovernmental organizations. IGOs"], + [4853,4934,"League of Nations"], + [4935,5160,"United Nations"], + [5511.2,6300,"Promotion of peace. Peaceful change"], + [5514,5526,"Societies, associations, academies, institutes, etc., for peace promotion, research and education"], + [5527,5532,"Congresses and conferences"], + [5587,6009,"International security. Disarmament. Global survival"], + [6010,6060,"Pacific settlement of international disputes"], + [6360,6377,"Non-military coercion"], + [6385,6405,"The armed conflict. War and order"], + [6422,6422.5,"Neutrality. Non-participation in wars. Norms of neutrality"], + [6530,6530,"Humanitarian aspects of war"], + ], + K: [ + [1,7720,"Law in general. Comparative and uniform law. Jurisprudence"], + [1,36.5,"Periodicals"], + [37,44,"Bibliography"], + [46,46,"Monographic series"], + [48,48,"Encyclopedias"], + [50,54,"Dictionaries. Words and phrases"], + [58,58,"Maxims. Quotations"], + [64,64,"Yearbooks"], + [68,70,"Directories"], + [85,89,"Legal research"], + [94,94,"Legal composition and draftsmanship"], + [100,103,"Legal education"], + [109,110,"Law societies. International bar associations"], + [115,130,"The legal profession"], + [133,133,"Legal aid. Legal assistance to the poor"], + [140,165,"History of law"], + [170,170,"Biography"], + [175,175,"Congresses"], + [176,177,"Collected works (nonserial)"], + [179,179,"Addresses, essays, lectures"], + [181,184.7,"Miscellany"], + [190,195,"Ethnological jurisprudence. Primitive law"], + [201,487,"Jurisprudence. Philosophy and theory of law"], + [202,202,"Periodicals"], + [212,213,"Methodology"], + [215,218,"History"], + [236,236,"Universality and non-universality of law"], + [237,264,"The concept of law"], + [270,274,"Acts and events"], + [280,286,"Sources of law"], + [288,296,"Interpretation and construction of law. Lacunae in law"], + [300,304,"Classification of law. Typology"], + [321,474,"Schools of legal theory"], + [325,328,"Historical jurisprudence"], + [330,344,"Positivism"], + [366,380,"Sociology of law. Sociological jurisprudence"], + [400,474,"Natural law"], + [486,487,"Relation of law to other topics"], + [520,5582,"Comparative law. International uniform law"], + [524,525,"Treaties and other international agreements"], + [540,546,"Trials"], + [578,579,"Concepts applying to several branches of law"], + [583,591,"Legal systems compared"], + [592,597,"Regional divisions. Interregional comparative law"], + [600,615,"Private law"], + [605,615,"Unification"], + [623,968,"Civil law"], + [625,709,"Persons"], + [670,709,"Domestic relations. Family law"], + [720,792,"Property"], + [795,798,"Trusts and trustees"], + [805,821,"Succession upon death"], + [830,968,"Obligations"], + [840,917,"Contracts"], + [920,920,"Restitution. Quasi contracts. Unjust enrichment"], + [923,968,"Torts"], + [970,970,"Compensation to victims of crime. Reparation"], + [1000,1395,"Commercial law"], + [1010,1014,"The merchant. Business enterprises"], + [1021,1022,"Commercial agency"], + [1024,1132,"Commercial contracts"], + [1026,1045,"Sale of goods"], + [1054,1065.5,"Negotiable instruments"], + [1066,1089,"Banking"], + [1094,1096,"Loan of money"], + [1100,1109,"Secured transactions"], + [1112,1116,"Investments"], + [1130,1132,"Carriage of goods and passengers. Carriers"], + [1150,1231,"Maritime law"], + [1195,1223,"Maritime social legislation"], + [1226,1231,"Marine insurance"], + [1241,1287,"Insurance"], + [1301,1366,"Business associations"], + [1370,1395,"Insolvency and bankruptcy. Creditors' rights"], + [1401,1578,"Intellectual property"], + [1411,1485,"Copyright"], + [1500,1578,"Industrial property"], + [1700,1973,"Social legislation"], + [1701,1841,"Labor law"], + [1861,1929,"Social insurance"], + [1960,1973,"Public welfare. Public assistance"], + [2100,2385,"Courts. Procedure"], + [2110,2155,"Court organization and procedure"], + [2201,2385,"Civil procedure"], + [2390,2390,"Negotiated settlement. Compromise"], + [2400,2405,"Arbitration and award"], + [3150,3150,"Public law"], + [3154,3370,"Constitutional law"], + [3161,3161,"Constitutional history"], + [3169,3169,"The state"], + [3171,3179,"Constitutional principles"], + [3184,3188,"Form and structure of government"], + [3195,3195,"National territory"], + [3201,3201,"Foreign relations administration"], + [3220,3220,"Public policy"], + [3224,3278,"Individual and state"], + [3280,3282,"Church and state"], + [3289,3367,"Organs of government"], + [3290,3304,"The people. Election law"], + [3310,3329,"The legislature"], + [3332,3363,"Heads of state and the central government"], + [3367,3367,"The judiciary"], + [3370,3370,"Constitutional courts and procedure"], + [3375,3375,"Colonial law"], + [3400,3431,"Administrative law"], + [3402,3417,"The administrative process"], + [3420,3431,"Administrative organization"], + [3440,3460,"Civil service. Government officials and employees"], + [3476,3560,"Public property. Public restraint on private property"], + [3566,3578,"Public health"], + [3581,3598,"Environmental law"], + [3601,3611,"Medical legislation"], + [3615,3622,"Veterinary laws. Veterinary medicine and hygiene. Prevention of cruelty to animals"], + [3625,3649,"Food. Drugs. Cosmetics"], + [3651,3654,"Alcohol. Alcoholic beverages"], + [3661,3674,"Public safety"], + [3700,3705,"Control of social activities"], + [3740,3762,"Education"], + [3770,3795,"Science and arts. Research"], + [3820,3836,"Economic constitution, policy, planning, and development"], + [3840,4375,"Regulation of industry, trade, and commerce. Occupational law"], + [3842,3862,"Trade regulations. Control of trade practices"], + [3870,3918,"Primary production. Extractive industries"], + [3921,3925,"Manufacturing industries"], + [3926,3935,"Food processing industries"], + [3941,3974,"Trade and commerce"], + [3978,3992,"Public utilities"], + [4011,4343,"Transportation and communication"], + [4360,4375,"Professions and occupations"], + [4430,4675,"Public finance"], + [4453,4640,"National revenue"], + [4650,4675,"State and local finance"], + [4700,4705,"Government measures in time of war, national emergency, or economic crisis"], + [4720,4780,"National defense. Military law"], + [4725,4734,"The military establishment. Armed forces"], + [4740,4760,"Military criminal law and procedure"], + [5000,5582,"Criminal law and procedure"], + [5015.4,5350,"Criminal law"], + [5401,5570,"Criminal procedure"], + [5575,5582,"Juvenile criminal law and procedure"], + [7000,7720,"Private international law. Conflict of laws"], + [7051,7054,"International unification, approximation, and harmonization"], + [7060,7081,"Choice of law"], + [7085,7085,"Retroactive law. Intertemporal law"], + [7090,7090,"Juristic acts"], + [7120,7197,"Persons"], + [7125,7140,"Natural persons"], + [7145,7148,"Juristic persons. Associations"], + [7155,7197,"Domestic relations. Family law"], + [7157,7179,"Marriage. Husband and wife"], + [7181,7197,"Parent and child. Guardian and ward"], + [7200,7218,"Property"], + [7222,7222,"Trust and trustees"], + [7230,7245,"Succession upon death"], + [7260,7338,"Obligations"], + [7265,7305,"Contracts"], + [7310,7310,"Restitution. Quasi contracts. Unjust enrichment"], + [7315,7338,"Torts"], + [7340,7512,"Commercial law"], + [7350,7444,"Commercial contracts"], + [7449,7460,"Maritime law"], + [7470,7470,"Insurance"], + [7485,7495,"Business associations. Business corporations"], + [7510,7512,"Insolvency and bankruptcy. Creditors' rights"], + [7550,7582,"Intellectual property"], + [7555,7557,"Copyright"], + [7570,7582,"Industrial property"], + [7585,7595,"Social legislation"], + [7611,7688,"Civil procedure. International civil procedure"], + [7690,7690,"Arbitration and award"], + [7720,7720,"Recognition of foreign administrative acts"], + ], + KB: [ + [1,4855,"Religious law in general. Comparative religious law. Jurisprudence"], + [2,4,"Bibliography"], + [7,68,"Periodicals"], + [68,68,"Annuals. Annuaires"], + [70,70,"Monographic series. By title, A-Z","A","Z"], + [73,73,"Collections. Compilations (General and comprehensive)"], + [74,78,"Auxiliary sciences"], + [90,90,"Encyclopedias. Law dictionaries. Terms and phrases. Vocabularies. By author or title, A-Z","A","Z"], + [100,100,"Proverbia. Legal maxims. Brocardica juris. Regulae juris. By author or title, A-Z","A","Z"], + [122,122,"Biography (Collective)"], + [130,130,"Legal research. Legal bibliography. Methods of bibliographic research"], + [150,150,"Conferences. Symposia"], + [160,160,"General works. Treatises"], + [162,250,"Legal systems compared"], + [270,280,"Theory, philosophy, and science of religious law"], + [400,4855,"Interdisciplinary discussion of subjects"], + [400,400,"Ritual law. Religious observances and rituals"], + [410,410,"Law reform and policies. Criticism"], + [479,479,"Private law (General)"], + [480,482,"Private international law. Conflict of laws"], + [491,491,"Civil law (General)"], + [524,530,"Persons"], + [531,619,"Domestic relations. Family law"], + [622,628.5,"Guardianship. Guardian and ward"], + [632,636.2,"Inheritance and succession"], + [636.3,636.3,"Gifts. Charitable gifts. Donations"], + [640,726,"Property. Res in commercio"], + [810,962.8,"Obligations. Contracts and transactions"], + [1270,1278,"Labor laws and legislation"], + [1468,1550,"Social laws and legislation. Welfare. Charities"], + [1572,1690,"Courts and procedure"], + [2000,2035,"Public law. The State"], + [2101,2862,"Constitutions and religion. Constitutional and administrative law"], + [2870,2870,"Civil service. Employees of state, communal agencies, and religious corporations"], + [3000,3034,"Police and public safety"], + [3040.5,3056,"Public property. Government property"], + [3075,3096.5,"Public health"], + [3098,3121.7,"Medical legislation"], + [3122,3122,"Veterinary medicine and hygiene. Veterinary public health"], + [3123,3123.5,"Animal protection. Animal welfare. Animal rights"], + [3124,3125,"Birth control. Family planning"], + [3127,3135,"Environmental law"], + [3137,3183,"Cultural affairs"], + [3190,3429,"Economic law"], + [3440,3500.7,"Transportation and communication"], + [3515,3522,"Professions. Intelligentsia"], + [3526,3694,"Public finance"], + [3709,3726,"Government measures in time of war, national emergency, or economic crisis"], + [3735,3780,"Military law"], + [3790,4855,"Criminal law and procedure"], + ], + KBM: [ + [1,4855,"Jewish law. Halakah Halakah"], + [523.6,523.6,"Even ha-#ezer law (General)"], + [523.72,523.72,"H. oshen mishpat. law (General)"], + [523.8,4855,"Mishpat Ivri"], + [523.8,523.8,"Bibliography"], + [523.82,523.82,"Monographic series"], + [523.9,523.9,"Legal education. Study and teaching"], + [524,524,"General works"], + [524.12,524.26,"The concept of Jewish law"], + [524.3,524.3,"Sources of Jewish law (Mishpat Ivri)"], + [524.32,524.34,"Methodology of law development"], + [524.36,524.36,"Influence of other legal systems on Jewish law"], + [524.38,524.38,"Law reform and policies. Criticism"], + [524.4,524.4,"Concepts applying to several branches of the law, A-Z","A","Z"], + [524.42,524.42,"Private law"], + [524.43,524.43,"Conflict of laws. Plurality of laws conflict"], + [524.5,524.5,"Assistance in emergencies"], + [524.6,530,"Persons"], + [531,619,"Domestic relations. Family law"], + [622,628.5,"Guardian and ward. Apotropos"], + [632,636.2,"Inheritance and succession"], + [636.3,636.3,"Gifts. Charitable gifts. Donations"], + [639,1424,"Dinei mamonot"], + [1468,1547,"Social laws and legislation"], + [1572,1942,"Courts and procedure"], + [2000,2024,"Public law. The state and the Jewish community. Kehillah"], + [2070,2614,"Constitutional law. Constitutional principles of the Jewish community"], + [2711,2840,"Administrative law and process of communal agencies"], + [2970,2970,"Civil service. Employees of communal agencies"], + [3000,3036.5,"Police and public safety"], + [3040.5,3073,"Public property. Communal property. Restraints on private property"], + [3075,3097,"Public health"], + [3098,3122,"Medical legislation"], + [3124,3125,"Birth control. Family planning"], + [3127,3134,"Environmental law"], + [3137,3183,"Cultural affairs"], + [3190,3436,"Economic law"], + [3440,3504.5,"Transportation and communication"], + [3515,3519,"Professions"], + [3526,3695,"Public finance"], + [3709,3729,"Measures in time of war, national emergency, or economic crisis"], + [3738,3785,"Community defense. Military law"], + [3790,4855,"Criminal law and procedure"], + ], + KBP: [ + [1,4860,"Islamic law. Sharī#ah. Fiqh"], + [2.2,8,"Bibliography"], + [9.5,9.5,"Monographic series"], + [10,14.5,"Societies. Associations"], + [15,15,"Congresses. Conferences"], + [18,18,"Academies. Institutes"], + [40,40,"Encyclopedias. Dictionaries"], + [40.2,40.2,"Maxims. Quotations"], + [40.5,40.5,"Directories"], + [41,41,"Legal research"], + [42,43,"Legal education. Study and teaching"], + [50,69,"History, development and application of Islamic law"], + [70,75.4,"Biography"], + [100,136.8,"Sources"], + [144,144,"General works"], + [173.25,173.6,"Islamic law and other disciplines or subjects"], + [174,190.5,"Observances and practice of Islam"], + [250,420,"Schools of thought. Islamic legal schools. Madhāhib"], + [425,466.3,"Us. ūl al-fiqh. Jurisprudence and theory of law. Science of legal reasoning"], + [469,469,"Influence of other legal systems on Islamic law"], + [470,470,"Law reform. Criticism. Tanz. īm"], + [480,485,"Conflict of laws. Tanāzu* al-qawānīn"], + [490,4860,"Furū# al-fiqh. Substantive law. Branches of law"], + [490.2,490.95,"General works. Treatises"], + [491,497.95,"Particular genres"], + [500,509.8,"General concepts"], + [524,638,"Ah. wāl shakhs. īyah"], + [639,1154,"Mu#āmalāt"], + [1155,1194,"Intellectual and industrial property"], + [1234,1259,"Unfair competition"], + [1270,1467,"Labor laws and legislation"], + [1468,1569,"Social laws and legislation"], + [1572,1942,"Courts and procedure"], + [2000,2035,"Public law. The state and Islam"], + [2101,2612,"Constitution of the state. Constitutional law"], + [2730,2968,"Government and administration. Siyāsah. Administrative process"], + [2970,2970,"Civil service. Employees of communal agencies"], + [3000,3037,"Police and public safety"], + [3040.5,3072,"Public property. Government property"], + [3075,3096.5,"Public health"], + [3098,3121.5,"Medical legislation"], + [3122,3122,"Veterinary medicine and hygiene. Veterinary public health"], + [3123,3123.5,"Animal protection. Animal welfare. Animal rights"], + [3124,3125,"Birth control. Family planning"], + [3127,3135,"Environmental law"], + [3137,3183.3,"Cultural affairs"], + [3190,3437,"Economic law"], + [3440,3512,"Transportation and communication"], + [3515,3521,"Professions. Intelligentsia"], + [3526,3705,"Public finance"], + [3709,3727,"Government measures in time of war, national emergency, or economic crisis"], + [3738,3785,"Military law"], + [3790,4860,"Criminal law and procedure"], + ], + KBR: [ + [2,4090,"History of canon law"], + [2,19,"Bibliography"], + [21,21,"Annuals. Annuaires. Yearbooks"], + [22,22,"Monographic series"], + [27,41.7,"Official acts of the Holy See"], + [42,54.5,"Decisions of ecclesiastical tribunals and courts, and related materials"], + [56,56,"Encyclopedias. Law dictionaries. Terms and phrases. Vocabularia"], + [64,64,"Directories"], + [74,83,"Auxiliary sciences"], + [100,100,"Proverbia. Legal maxims. Brocardica juris. Regulae juris","A","Z"], + [105,105,"Formularies. Clauses and forms. Formularia","A","Z"], + [122,124,"Collective biography of canonists or jurists"], + [127,129.5,"Trials"], + [130,132,"Legal research. Legal bibliography. Methods of bibliographic research"], + [133,134,"Legal education. Study and teaching"], + [136,148,"Societies. Associations. Academies, etc."], + [150,150,"Conferences. Symposia"], + [160,160,"General works"], + [190,2154.5,"Sources"], + [2155,2157,"Canon law and other disciplines or subjects"], + [2160,2204.5,"Canonical jurisprudence. Canonical science"], + [2205,2206.3,"Influence of other legal systems on Canon law"], + [2207,2207,"Law reform and policies. Criticism"], + [2208,2208,"General concepts and principles, A-Z","A","Z"], + [2224,2295,"Ius ecclesiasticum privatum"], + [2310,3026,"Constitution of the Church"], + [3040,3070,"The teaching office of the church. Magisterium. De ecclesiae munere docendi"], + [3077,3165,"Sacraments. Administration of sacraments. De sacramentis et administratione"], + [3180,3182,"Sacramentals. Sacramentalia"], + [3184,3256,"Other acts of divine worship. De ceteris actibus Cultus Divini"], + [3264,3280,"Social work of the Church. Public welfare. Caritas"], + [3320,3460,"Church property. Church economics and finance. Administration"], + [3500,3774,"Penal (Criminal) law. De lege poenali"], + [3780,3983,"Judiciary. Ecclesiastical courts and procedure. De processibus"], + [4000,4090,"Church and state relationships. De relationibus inter ecclesiam et status. Ius publicum ecclesiae"], + ], + KBU: [ + [2,4820,"Law of the Roman Catholic Church. The Holy See"], + [2,19,"Bibliography"], + [21,21,"Annuals. Annuaires. Yearbooks"], + [22,22,"Monographic series"], + [25,26,"Official gazette of the Holy See"], + [26.8,41.5,"Official acts of the Holy See"], + [42,54.5,"Decisions of ecclesiastical tribunals and courts, and related materials"], + [56,56,"Encyclopedias"], + [56.5,56.5,"Dictionaries. Terms and phrases. Vocabularies"], + [64,64,"Directories"], + [102,102,"Form books. Clauses and forms"], + [127,129.5,"Trials"], + [130,132,"Legal research. Legal bibliography. Methods of bibliographic research"], + [133,133,"Legal education. Study and teaching"], + [136,148,"Societies. Associations. Academies, etc."], + [149,149,"Academies. Institutes"], + [150,150,"Conferences. Symposia"], + [160,160,"General works"], + [180,180,"Works on diverse aspects of a particular subject and falling within several branches of the law. By subject, A-Z","A","Z"], + [195,1565,"Collections. Compilations. Selections"], + [2155,2157,"Canon law and other disciplines or subjects"], + [2160,2204,"Canonical jurisprudence. Theory and science of canon law"], + [2205,2206,"Influence of other legal systems on canon law"], + [2207,2207,"Law reform and policies. Criticism"], + [2208,2208,"Concepts applying to several branches of the law, A-Z","A","Z"], + [2210,2212,"The codes of canon law"], + [2215,2308,"General norms and principles. De normis generalibus"], + [2310,3026,"Constitution of the Church"], + [3040,3070,"The teaching office of the Church. Magisterium. De ecclesiae munere docendi"], + [3075,3165,"Sacraments. Administration of sacraments. De sacramentis et administratione"], + [3180,3182,"Sacramentals. Sacramentalia"], + [3184,3256,"Other acts of divine worship. De ceteris actibus Cultus Divini"], + [3264,3280,"Social work of the Church. Public welfare. Caritas"], + [3282,3310,"Medical ethics and legislation. Church policy"], + [3320,3460,"Church property. Church economics and finance"], + [3500,3774,"Sanctions in the Church. Criminal law. De sanctionibus in Ecclesia. De lege poenali"], + [3780,3985,"Courts and procedure. De processibus"], + [4000,4097,"Church and state relationships. De relationibus inter ecclesiam et status. Ius publicum ecclesiae"], + [4112,4820,"Local Church government"], + ], + KD: [ + [51,9500,"England and Wales"], + [8850,9312,"Local laws of England"], + [9320,9355,"Local laws of Wales"], + [9400,9500,"Wales"], + ], + KDC: [ + [51,990,"Scotland"], + ], + KDG: [ + [26,540,"Isle of Man. Channel Islands"], + ], + KDK: [ + [21,1950,"Ireland (Eire)"], + ], + KDZ: [ + [1,4999,"America. North America"], + [1101,1199,"Organization of American States (OAS)"], + [2001,2499.2,"Bermuda"], + [3001,3499,"Greenland"], + [4001,4499,"St. Pierre and Miquelon"], + ], + KE: [ + [1,9450,"Federal law. Common and collective provincial law"], + ], + KEA: [ + [1,599,"Alberta"], + ], + KEB: [ + [1,599,"British Columbia"], + ], + KEM: [ + [1,599,"Manitoba"], + ], + KEN: [ + [1,599,"New Brunswick"], + [1201,1799,"Newfoundland"], + [5401,5999,"Northwest Territories"], + [7401,7999,"Nova Scotia"], + ], + KEO: [ + [1,1199,"Ontario"], + ], + KEP: [ + [1,599,"Prince Edward Island"], + ], + KEQ: [ + [1,1199,"Quebec"], + ], + KES: [ + [1,599,"Saskatchewan"], + ], + KEY: [ + [1,599,"Yukon Territory"], + ], + KEZ: [ + [1,9999,"Individual cities, A-Z"], + ], + KF: [ + [1,9827,"Federal law. Common and collective state law"], + ], + KFA: [ + [1,599,"Alabama"], + [1201,1799,"Alaska"], + [2401,2999,"Arizona"], + [3601,4199,"Arkansas"], + ], + KFC: [ + [1,1199,"California"], + [1801,2399,"Colorado"], + [3601,4199,"Connecticut"], + ], + KFD: [ + [1,599,"Delaware"], + [1201,1799,"District of Columbia"], + ], + KFF: [ + [1,599,"Florida"], + ], + KFG: [ + [1,599,"Georgia"], + ], + KFH: [ + [1,599,"Hawaii"], + ], + KFI: [ + [1,599,"Idaho"], + [1201,1799,"Illinois"], + [3001,3599,"Indiana"], + [4201,4799,"Iowa"], + ], + KFK: [ + [1,599,"Kansas"], + [1201,1799,"Kentucky"], + ], + KFL: [ + [1,599,"Louisiana"], + ], + KFM: [ + [1,599,"Maine"], + [1201,1799,"Maryland"], + [2401,2999,"Massachusetts"], + [4201,4799,"Michigan"], + [5401,5999,"Minnesota"], + [6601,7199,"Mississippi"], + [7801,8399,"Missouri"], + [9001,9599,"Montana"], + ], + KFN: [ + [1,599,"Nebraska"], + [601,1199,"Nevada"], + [1201,1799,"New Hampshire"], + [1801,2399,"New Jersey"], + [3601,4199,"New Mexico"], + [5001,6199,"New York"], + [7401,7999,"North Carolina"], + [8601,9199,"North Dakota"], + ], + KFO: [ + [1,599,"Ohio"], + [1201,1799,"Oklahoma"], + [2401,2999,"Oregon"], + ], + KFP: [ + [1,599,"Pennsylvania"], + ], + KFR: [ + [1,599,"Rhode Island"], + ], + KFS: [ + [1801,2399,"South Carolina"], + [3001,3599,"South Dakota"], + ], + KFT: [ + [1,599,"Tennessee"], + [1201,1799,"Texas"], + ], + KFU: [ + [1,599,"Utah"], + ], + KFV: [ + [1,599,"Vermont"], + [2401,2999,"Virginia"], + ], + KFW: [ + [1,599,"Washington"], + [1201,1799,"West Virginia"], + [2401,2999,"Wisconsin"], + [4201,4799,"Wyoming"], + ], + KFX: [ + [1,9999,"Individual cities, A-Z"], + ], + KFZ: [ + [1801,2399,"Northwest Territory"], + [8601,9199,"Confederate States of America"], + ], + KG: [ + [1,999,"Latin America (General)"], + [3001,3999,"Mexico and Central America (General)"], + ], + KGA: [ + [1,9000,"Belize"], + ], + KGB: [ + [1,9000,"Costa Rica"], + ], + KGC: [ + [1,9800,"El Salvador"], + ], + KGD: [ + [1,9990,"Guatemala"], + ], + KGE: [ + [1,9990,"Honduras"], + ], + KGF: [ + [1,9900,"Mexico"], + ], + KGG: [ + [1,9800,"Nicaragua"], + ], + KGH: [ + [1,8000,"Panama"], + [9001,9499,"Panama Canal Zone"], + ], + KGJ: [ + [1,999,"General"], + [7001,7499,"Anguilla"], + ], + KGK: [ + [1,499,"Antigua and Barbuda"], + [1001,1499,"Aruba"], + ], + KGL: [ + [1,499,"Bahamas"], + [1001,1499,"Barbados"], + [2001,2499,"Bonaire"], + [3001,3499,"British Leeward Islands"], + [4001,4499,"British Virgin Islands"], + [5001,5999,"British West Indies"], + [6001,6499,"British Windward Islands"], + ], + KGM: [ + [1,499,"Cayman Islands"], + ], + KGN: [ + [1,9800,"Cuba"], + ], + KGP: [ + [1,499,"Curaçao"], + [2001,2499,"Dominica"], + ], + KGQ: [ + [1,9800,"Dominican Republic"], + ], + KGR: [ + [1,499,"Dutch Leeward Islands (General)"], + [1001,1499,"Dutch West Indies (Netherlands Antilles)"], + [2001,2499,"Dutch Windward Islands (General)"], + [3001,3499,"French West Indies (General)"], + [4001,4499,"Grenada"], + [5001,5499,"Guadeloupe"], + ], + KGS: [ + [1,9000,"Haiti"], + ], + KGT: [ + [1,499,"Jamaica"], + [1001,1499,"Martinique"], + [2001,2499,"Montserrat"], + ], + KGU: [ + [1,499,"Navassa Islands"], + ], + KGV: [ + [1,8200,"Puerto Rico"], + ], + KGW: [ + [1,499,"Saba"], + [2001,2499,"Saint Christopher (Saint Kitts), Nevis, and Anguilla"], + [3001,3499,"Saint Lucia"], + [5001,5499,"Saint Vincent and the Grenadines"], + [7001,7499,"Sint Eustatius"], + [8001,8499,"Sint Maarten"], + ], + KGX: [ + [1,499,"Trinidad and Tobago"], + ], + KGY: [ + [1,499,"Turks and Caicos Islands"], + ], + KGZ: [ + [1,499,"Virgin Islands of the United States"], + ], + KH: [ + [1,999,"South America (General)"], + ], + KHA: [ + [1,9800,"Argentina"], + ], + KHC: [ + [1,8200,"Bolivia"], + ], + KHD: [ + [1,9900,"Brazil"], + ], + KHF: [ + [1,9800,"Chile"], + ], + KHH: [ + [1,9900,"Colombia"], + ], + KHK: [ + [1,9990,"Ecuador"], + ], + KHL: [ + [1,9000,"Falkland Islands"], + ], + KHM: [ + [1,9000,"French Guiana"], + ], + KHN: [ + [1,9000,"Guyana"], + ], + KHP: [ + [1,9700,"Paraguay"], + ], + KHQ: [ + [1,9800,"Peru"], + ], + KHS: [ + [1,9000,"Surinam"], + ], + KHU: [ + [1,9800,"Uruguay"], + ], + KHW: [ + [1,9900,"Venezuela"], + ], + KJ: [ + [2,1040,"History of Law"], + [160,1040,"Germanic law"], + ], + KJA: [ + [2,3660,"Roman law"], + ], + KJC: [ + [2,9799,"Regional comparative and uniform law"], + ], + KJE: [ + [5,7975,"Regional organization and integration. Comparative law"], + ], + KJG: [ + [1,4999,"Albania"], + ], + KJH: [ + [1,499,"Andorra"], + ], + KJJ: [ + [1,4999,"Austria"], + ], + KJK: [ + [1,4999,"Belgium"], + ], + KJM: [ + [1,4999,"Bulgaria"], + ], + KJN: [ + [1,499,"Cyprus"], + ], + KJP: [ + [1,4999,"Czechoslovakia"], + ], + KJR: [ + [1,4999,"Denmark"], + ], + KJS: [ + [1,4985,"Estonia"], + ], + KJT: [ + [1,4999,"Finland"], + ], + KJV: [ + [2,9158,"National laws"], + ], + KJW: [ + [51,4360,"Individual regions, provinces, departments, etc."], + [5201,9600,"Individual cities"], + ], + KK: [ + [2,9799.3,"Germany and West Germany"], + ], + KKA: [ + [7,9796,"East Germany"], + ], + KKE: [ + [1,4999,"Greece"], + ], + KKF: [ + [1,4999,"Hungary"], + ], + KKG: [ + [1,499,"Iceland"], + ], + KKH: [ + [1,4999,"Italy"], + ], + KKI: [ + [1,4890,"Latvia"], + ], + KKJ: [ + [1,499,"Liechtenstein"], + [501,9890,"Lithuania"], + ], + KKK: [ + [1,499,"Luxembourg"], + [1001,1499,"Malta"], + ], + KKL: [ + [1,499,"Monaco"], + ], + KKM: [ + [1,4999,"Netherlands"], + ], + KKN: [ + [1,4999,"Norway"], + ], + KKP: [ + [1,4999,"Poland"], + ], + KKQ: [ + [1,4999,"Portugal"], + ], + KKR: [ + [1,4999,"Romania"], + ], + KKS: [ + [1,499,"San Marino"], + ], + KKT: [ + [1,4999,"Spain"], + ], + KKV: [ + [1,4999,"Sweden"], + ], + KKW: [ + [1,4999,"Switzerland"], + ], + KKX: [ + [1,4999,"Turkey"], + ], + KKY: [ + [1,4999,"Ukraine (1991- )"], + ], + KKZ: [ + [1,4999,"Yugoslavia"], + ], + KL: [ + [2,5915,"History of law. The ancient orient"], + [2,135,"General"], + [147,177,"Ancient legal systems compared"], + [190,420,"Sources"], + [700,2215,"Mesopotamia. Assyro-Babylonian law"], + [1000,1299,"Sumer"], + [1600,1899,"Assyria"], + [2200,2499,"Babylonia"], + [2800,3099,"Egypt"], + [3500,3799,"Elam"], + [4110,4399,"Greek law"], + [4700,4999,"Hittite law"], + [5300,5599,"Persia"], + [5900,6199,"Phoenicia"], + ], + KLA: [ + [1,9999,"Russia. Soviet Union"], + ], + KLB: [ + [1,6499,"Russia (Federation, 1992- )"], + ], + KLD: [ + [1,490,"Armenian S.S.R. (to 1991)"], + ], + KLE: [ + [1,490,"Azerbaijan"], + ], + KLF: [ + [1,490,"Belarus (Republic)"], + ], + KLH: [ + [1,490,"Georgia (Republic)"], + ], + KLM: [ + [1,490,"Moldova"], + ], + KLN: [ + [1,489,"Russian S.F.S.R. (to 1991)"], + ], + KLP: [ + [1,4989,"Ukraine (1919-1991)"], + [9001,9499,"Zakavkazskaia Sotsialisticheskaia Federativnaia Sovetskaia Respublika (to 1936)"], + ], + KLQ: [ + [1,499,"Bukharskaia Narodnaia Sovetskaia Respublika (to 1924)"], + ], + KLR: [ + [1,490,"Kazakhstan"], + [1001,1499,"Khorezmskaia Sovetskaia Sotsialisticheskaia Respublika (to 1924)"], + ], + KLS: [ + [1,490,"Kyrgyzstan"], + ], + KLT: [ + [1,490,"Tadjikistan"], + ], + KLV: [ + [1,490,"Turkmenistan"], + ], + KLW: [ + [1,490,"Uzbekistan"], + ], + KM: [ + [1,999,"General Middle East. Southwest Asia"], + ], + KMC: [ + [1,799,"Regional comparative and uniform law"], + ], + KME: [ + [10,799,"Regional organization and integration"], + ], + KMF: [ + [1,293.5,"Armenia (Republic)"], + [1001,1490,"Bahrain"], + ], + KMG: [ + [1,489,"Gaza"], + ], + KMH: [ + [1,4990,"Iran"], + ], + KMJ: [ + [1,4990,"Iraq"], + ], + KMK: [ + [1,4990,"Israel"], + ], + KML: [ + [1,490,"Jerusalem"], + ], + KMM: [ + [1,490,"Jordan"], + [501,994,"West Bank (Territory under Israeli occupation, 1967- )"], + ], + KMN: [ + [1,499,"Kuwait"], + ], + KMP: [ + [1,490,"Lebanon"], + ], + KMQ: [ + [1,490,"Oman"], + [1001,1499,"Palestine (to 1948)"], + ], + KMS: [ + [1,490,"Qatar"], + ], + KMT: [ + [1,4990,"Saudi Arabia"], + ], + KMU: [ + [1,490,"Syria"], + ], + KMV: [ + [1,9870,"United Arab Emirates"], + ], + KMX: [ + [1001,1526,"Yemen"], + ], + KMY: [ + [1,489,"Yemen (People's Democratic Republic) (to 1990)"], + ], + KNC: [ + [1,999,"Regional comparative and uniform law"], + ], + KNE: [ + [150,499,"Regional organization and integration"], + ], + KNF: [ + [1,4990,"Afghanistan"], + ], + KNG: [ + [1,4990,"Bangladesh"], + ], + KNH: [ + [1,490,"Bhutan"], + ], + KNK: [ + [1,490,"Brunei"], + ], + KNL: [ + [1,4990,"Burma"], + ], + KNM: [ + [1,4990,"Cambodia"], + ], + KNN: [ + [1,9000,"China"], + ], + KNP: [ + [1,599,"China (Republic, 1949- ). Taiwan"], + ], + KNQ: [ + [1,9665,"China (People's Republic, 1949- )"], + ], + KNR: [ + [1,489,"Hong Kong"], + ], + KNS: [ + [1,4999,"India"], + ], + KNV: [ + [1,489,"French Indochina"], + ], + KNW: [ + [1,4990,"Indonesia"], + ], + KNX: [ + [1,4999,"Japan"], + ], + KNY: [ + [10,220,"Cities, etc."], + ], + KPA: [ + [1,4990,"Korea. South Korea"], + ], + KPC: [ + [1,4990,"Democratic People's Republic of Korea. North Korea"], + ], + KPE: [ + [1,4990,"Laos"], + ], + KPF: [ + [1,489,"Macao"], + ], + KPG: [ + [1,6999,"Malaysia"], + [7001,9999,"States of East and West Malaysia (1957- ) (Part 1)"], + ], + KPH: [ + [1,4990,"States of East and West Malaysia (1957- ) (Part 2)"], + [5001,5490,"Maldives"], + ], + KPJ: [ + [1,490,"Mongolia"], + ], + KPK: [ + [1,490,"Nepal"], + ], + KPL: [ + [1,4990,"Pakistan"], + ], + KPM: [ + [1,4990,"Philippines"], + ], + KPP: [ + [1,499,"Singapore"], + ], + KPS: [ + [1,4990,"Sri Lanka"], + ], + KPT: [ + [1,4990,"Thailand"], + ], + KPV: [ + [1,8094,"Vietnam"], + ], + KPW: [ + [1,489,"Vietnam. South Vietnam"], + ], + KQ: [ + [2,197,"History of law"], + [2010,9000,"Law of indigenous peoples"], + ], + KQC: [ + [1,999,"Regional comparative and uniform law"], + ], + KQE: [ + [10,1249,"Regional organization and integration"], + ], + KQG: [ + [1,4990,"Algeria"], + ], + KQH: [ + [1,4990,"Angola"], + ], + KQJ: [ + [1,490,"Benin"], + ], + KQK: [ + [1,490,"Botswana"], + ], + KQM: [ + [1,499,"British Central Africa Protectorate"], + ], + KQP: [ + [1,499,"British Indian Ocean Territory"], + [1001,1499,"British Somaliland"], + ], + KQT: [ + [1,490,"Burkina Faso"], + ], + KQV: [ + [1,490,"Burundi"], + ], + KQW: [ + [1,8020,"Cameroon"], + ], + KQX: [ + [1,490,"Cape Verde"], + ], + KRB: [ + [1,490,"Central African Republic"], + ], + KRC: [ + [1,490,"Chad"], + ], + KRE: [ + [1,490,"Comoros"], + ], + KRG: [ + [1,490,"Congo"], + ], + KRK: [ + [1,490,"Djibouti"], + ], + KRL: [ + [1,499,"East Africa Protectorate"], + ], + KRM: [ + [1,4990,"Egypt"], + ], + KRN: [ + [1,499,"Eritrea"], + ], + KRP: [ + [1,4990,"Ethiopia"], + ], + KRR: [ + [1,499,"French Equatorial Africa"], + ], + KRS: [ + [1,499,"French West Africa"], + ], + KRU: [ + [1,490,"Gabon"], + ], + KRV: [ + [1,489,"Gambia"], + ], + KRW: [ + [1,499,"German East Africa"], + ], + KRX: [ + [1,4990,"Ghana"], + ], + KRY: [ + [1,499,"Gibraltar"], + ], + KSA: [ + [1,490,"Guinea"], + ], + KSC: [ + [1,490,"Guinea-Bissau"], + ], + KSE: [ + [1,490,"Equatorial Guinea"], + [601,699,"Ifni"], + ], + KSG: [ + [1,499,"Italian East Africa"], + [1001,1499,"Italian Somaliland"], + ], + KSH: [ + [1,4990,"Ivory Coast"], + ], + KSK: [ + [1,4990,"Kenya"], + ], + KSL: [ + [1,490,"Lesotho"], + ], + KSN: [ + [1,490,"Liberia"], + ], + KSP: [ + [1,4990,"Libya"], + ], + KSR: [ + [1,490,"Madagascar"], + ], + KSS: [ + [1,490,"Malawi"], + ], + KST: [ + [1,490,"Mali"], + ], + KSU: [ + [1,490,"Mauritania"], + ], + KSV: [ + [1,490,"Mauritius"], + [5001,5490,"Mayotte"], + ], + KSW: [ + [1,4990,"Morocco"], + ], + KSX: [ + [1,4990,"Mozambique"], + ], + KSY: [ + [1,4990,"Namibia"], + ], + KSZ: [ + [1,490,"Niger"], + ], + KTA: [ + [1,9150,"Nigeria"], + ], + KTC: [ + [1,499,"Réunion"], + ], + KTD: [ + [1,490,"Rwanda"], + ], + KTE: [ + [1,490,"Saint Helena"], + ], + KTF: [ + [1,490,"São Tomé and Principe"], + ], + KTG: [ + [1,4990,"Senegal"], + ], + KTH: [ + [1,490,"Seychelles"], + ], + KTJ: [ + [1,490,"Sierra Leone"], + ], + KTK: [ + [1,490,"Somalia"], + ], + KTL: [ + [1,9560,"South Africa, Republic of"], + ], + KTN: [ + [1,499,"Spanish West Africa (to 1958)"], + [601,699,"Spanish Sahara (to 1975)"], + ], + KTQ: [ + [1,4990,"Sudan"], + ], + KTR: [ + [1,490,"Swaziland"], + ], + KTT: [ + [1,9910,"Tanzania"], + ], + KTU: [ + [1,490,"Togo"], + ], + KTV: [ + [1,4990,"Tunisia"], + ], + KTW: [ + [1,490,"Uganda"], + ], + KTX: [ + [1,4990,"Zaire"], + ], + KTY: [ + [1,490,"Zambia"], + [1501,1599,"Zanzibar (to 1964)"], + ], + KTZ: [ + [1,490,"Zimbabwe"], + ], + KU: [ + [1,4999,"Australia"], + ], + KUN: [ + [501,599,"Norfolk Island"], + [3001,3050,"Cities, communities, etc."], + ], + KUQ: [ + [1,4990,"New Zealand"], + ], + KVB: [ + [1,999,"Australia and New Zealand"], + ], + KVC: [ + [1,999,"Other Pacific area jurisdictions"], + ], + KVE: [ + [200,349,"Regional organization and integration"], + ], + KVH: [ + [1,490,"American Samoa"], + [1001,1499,"British New Guinea (Territory of Papua)"], + ], + KVL: [ + [1,489,"Cook Islands"], + ], + KVM: [ + [1,489,"Easter Island"], + ], + KVN: [ + [1,490,"Fiji"], + ], + KVP: [ + [1,100,"French Polynesia"], + [1001,1099,"German New Guinea (to 1914)"], + ], + KVQ: [ + [1,490,"Guam"], + ], + KVR: [ + [1,490,"Kiribati"], + ], + KVS: [ + [1,490,"Marshall Islands"], + [501,990,"Micronesia (Federated States)"], + [2501,2999,"Midway Islands"], + ], + KVU: [ + [1,499,"Nauru"], + [1001,1099,"Netherlands New Guinea (to 1963)"], + ], + KVW: [ + [1,490,"New Caledonia"], + ], + KWA: [ + [1,489,"Niue"], + ], + KWC: [ + [1,490,"Northern Mariana Islands"], + ], + KWE: [ + [1,499,"Pacific Islands (Trust Territory)"], + ], + KWG: [ + [1,490,"Palau"], + ], + KWH: [ + [1,490,"Papua New Guinea"], + ], + KWL: [ + [1,499,"Pitcairn Island"], + [2001,2490,"Solomon Islands"], + ], + KWP: [ + [1,490,"Tonga"], + ], + KWQ: [ + [1,490,"Tuvalu"], + ], + KWR: [ + [1,490,"Vanuatu"], + ], + KWT: [ + [1,489,"Wake Island"], + [2001,2490,"Wallis and Futuna Islands"], + ], + KWW: [ + [1,490,"Western Samoa"], + ], + KZ: [ + [2,6795,"Law of nations"], + [2,5.5,"Bibliography"], + [24,38,"Societies, etc."], + [27,37,"National"], + [60,62.5,"Intergovernmental congresses and conferences"], + [63,1152,"Sources. Fontes juris gentium"], + [118,194,"Treaties and other international agreements"], + [119,165,"To 1920"], + [170,173,"1920-"], + [176,182.5,"Boundary treaties"], + [183,183.5,"Treaties of arbitration, investigation, etc."], + [184,194,"Peace treaties"], + [199,218,"Judicial decisions and arbitral awards. Law reports"], + [221,1152,"By region or country"], + [1165,1208,"Trials"], + [1168,1208,"War crime trials"], + [1234,1236,"Legal research. Legal bibliography"], + [1249,1252,"International law and other disciplines"], + [1255,1273,"Theory and principles"], + [1267,1273,"Domain of the law of nations"], + [1284,1285.5,"Methodology"], + [1287,1296,"Codification of the law of nations"], + [1298,1304,"The law of treaties. System of treaty law"], + [1319,1327,"International legal regimes"], + [1329,3085,"Early/Medieval development to ca. 1900. Ius Naturae et Gentium"], + [1330,1339,"Peace of Westphalia to the French Revolution (1648-1789)"], + [1345,1369,"French Revolution to the American Civil War (1789-1861)"], + [1373,1387.2,"American Civil War to the First Conference of the Hague (1861-1899)"], + [2064,3085,"Publicists. Writers on public international law"], + [3092,3405,"20th century"], + [3110,3405,"Publicists. Writers on public international law"], + [3410,3410,"21st century"], + [3670,3881,"Objects of the law of nations. Territory and its different parts"], + [3900,5490,"The international legal community and members"], + [3910,5490,"Subjects of the law of nations"], + [4002,4080,"The state"], + [4110,4110,"By region"], + [4112,4820,"By state"], + [4850,5490,"Intergovernmental organizations. IGOs"], + [4853,4934,"The League of Nations"], + [4935,5275,"The United Nations"], + [5330,5490,"Regional organizations"], + [5510,6299,"International law of peace and peace enforcement"], + [5586,5893,"The system of collective security"], + [5615,5893,"Arms control and disarmament regimes"], + [5637,5645,"Conventional arms control"], + [5647,5686,"Nuclear (Strategic) arms limitation"], + [5687,5788.5,"Nuclear weapon free zones and zones of peace"], + [5834,5865,"Other weapons of mass destruction"], + [5870,5893,"Mutual and balanced reduction of armed forces"], + [5900,5967,"Military pact systems for collective self-defense"], + [6009,6299,"Pacific settlement of international disputes and conflict resolution"], + [6115,6299,"Arbitration and adjudication"], + [6350,6785,"Enforced settlement of international disputes"], + [6360,6373,"Non-military coercion"], + [6374,6377,"Threat of force"], + [6378,6795,"Law of war and neutrality. Jus belli"], + [6427,6437,"Warfare on land"], + [6440,6530,"Humanitarian law"], + [6540,6660,"Warfare on sea"], + [6665,6714,"Air warfare"], + [6730,6785,"The end of war. Armistice. Surrender. Postliminy"], + ], + KZA: [ + [1002,4205,"Law of the sea"], + [1040,1065,"Intergovernmental congresses and conferences"], + [1118,1122,"Treaties and other international agreements"], + [1340,1417,"Concepts and principles"], + [1340,1340,"Mare clausum doctrine"], + [1348,1405,"Mare liberum doctrine"], + [1430,1690,"Maritime boundaries"], + [1630,1664,"Continental shelf"], + [3481,3900,"Marine resources conservation and development"], + [3891,3900,"High-seas fisheries and fisheries regimes"], + [4130,4205,"Public order of the oceans"], + ], + KZD: [ + [1002,6715,"Space law. Law of outer space"], + [1040,1065,"Intergovernmental congresses and conferences"], + [1118,1122,"Treaties and other international agreements"], + [1340,1400,"Concepts and principles. Theory"], + [1390,1400,"Regulated use theory"], + [1410,1410,"The source of the law of space"], + [1420,1455,"Boundaries"], + [3489,4406,"Peaceful uses of outer space"], + [3489.5,3608,"Space resources"], + [4030,4326,"Public order in space and outer space"], + [4080,4210,"Space flight"], + [4301,4310,"Space communication"], + [4320.2,4326,"Rescue operations in outer space"], + [5614,6715,"Un-peaceful uses of outer space"], + [5620,5622.2,"Treaties and other international agreements"], + [5648,5680.2,"Disarmament and demilitarization regimes in outer space"], + ], + L: [ + [7,991,"Education (General)"], + [7,97,"Periodicals. Societies"], + [101,101,"Yearbooks"], + [107,107,"Congresses"], + [111,791,"Official documents, reports, etc."], + [797,898,"Educational exhibitions and museums"], + [899,899,"School fairs"], + [900,991,"Directories of educational institutions"], + ], + LA: [ + [5,2396,"History of education"], + [5,25,"General"], + [31,135,"By period"], + [173,186,"Higher education"], + [201,398,"United States"], + [410,2284,"Other regions or countries"], + [2301,2396,"Biography"], + ], + LB: [ + [5,3640,"Theory and practice of education"], + [5,45,"General"], + [51,885,"Systems of individual educators and writers"], + [1025,1050.75,"Teaching (Principles and practice)"], + [1049.9,1050.75,"Reading (General)"], + [1050.9,1091,"Educational psychology"], + [1101,1139,"Child study"], + [1139.2,1139.5,"Early childhood education"], + [1140,1140.5,"Preschool education. Nursery schools"], + [1141,1489,"Kindergarten"], + [1501,1547,"Primary education"], + [1555,1602,"Elementary or public school education"], + [1603,1696.6,"Secondary education. High schools"], + [1705,2286,"Education and training of teachers and administrators"], + [1771,1773,"Certification of teachers"], + [1775,1785,"Professional aspects of teaching and school administrators. Vocational guidance"], + [1805,2151,"State teachers colleges"], + [1811,1987,"United States"], + [1991,2151,"Other regions or countries"], + [2165,2278,"Teacher training in universities and colleges"], + [2300,2430,"Higher education"], + [2326.4,2330,"Institutions of higher education"], + [2331.7,2335.8,"Teaching personnel"], + [2335.86,2335.885,"Trade unions"], + [2335.95,2337,"Endowments, trusts, etc."], + [2337.2,2340.8,"Student financial aid"], + [2341,2341.95,"Supervision and administration. Business management"], + [2351,2359,"Admissions and entrance requirements"], + [2361,2365,"Curriculum"], + [2366,2367.75,"College examinations"], + [2371,2372,"Graduate education"], + [2381,2391,"Academic degrees"], + [2799,2799.3,"Educational consultants and consulting"], + [2801,3095,"School administration and organization"], + [2831.6,2831.99,"Administrative personnel"], + [2832,2844.1,"Teaching personnel"], + [2844.52,2844.63,"Trade unions"], + [3011,3095,"School management and discipline"], + [3045,3048,"Textbooks"], + [3050,3060.87,"Educational tests, measurements, evaluations and examinations"], + [3201,3325,"School architecture and equipment. School physical facilities. Campus planning"], + [3401,3495,"School hygiene. School health services"], + [3497,3499,"Hygiene in universities and colleges"], + [3525,3575,"Special days"], + [3602,3640,"School life. Student manners and customs"], + ], + LC: [ + [8,6691,"Special aspects of education"], + [8,59,"Forms of education"], + [8,8,"General works"], + [15,15,"Conversation and culture"], + [25,33,"Self-education. Self-culture"], + [37,44.3,"Home education"], + [45,45.8,"Nonformal education"], + [47,58.7,"Private school education"], + [58,58.7,"Preparatory schools. Preparatory school education"], + [59,59,"Public school education"], + [65,245,"Social aspects of education"], + [65,67.68,"Economic aspects of education"], + [68,70,"Demographic aspects of education"], + [71,120.4,"Education and the state"], + [72,72.5,"Academic freedom"], + [107,120.4,"Public school question. Secularization. Religious instruction in the public schools"], + [129,139,"Compulsory education"], + [142,148.5,"Attendance. Dropouts"], + [149,161,"Literacy. Illiteracy"], + [165,182,"Higher education and the state"], + [184,188,"Taxation of schools and colleges"], + [189,214.53,"Educational sociology"], + [212,212.863,"Discrimination in education"], + [212.9,212.93,"Sex differences in education"], + [213,214.53,"Educational equalization. Right to education"], + [215,238.4,"Community and the school"], + [223,223,"Schools as community centers"], + [225,226.7,"Home and school"], + [230,235,"Parent-teacher associations. Home and school associations"], + [237,238.4,"College-university and the community"], + [241,245,"Foundations, endowments, funds"], + [251,951,"Moral and religious education"], + [251,318,"Moral education. Character building"], + [321,951,"Religion and education. Education under church control"], + [361,629,"Christian education. Church education"], + [446,454,"Orthodox Eastern Church"], + [461,510,"Roman Catholic"], + [531,629,"Protestant"], + [701,775,"Jewish education"], + [901,915,"Islamic education"], + [921,929.7,"Buddhist education"], + [951,951,"Other"], + [980,1099.5,"Types of education"], + [1001,1024,"Humanistic education. Liberal education"], + [1022,1022.25,"Computer-assisted education"], + [1025,1027,"Collective education"], + [1030,1030,"Communist education"], + [1031,1034.5,"Competency based education"], + [1035,1035.8,"Basic education. Basic skills education"], + [1036,1036.8,"Community education"], + [1037,1037.8,"Career education"], + [1041,1048,"Vocational education (General)"], + [1049,1049.8,"Cooperative education"], + [1051,1072,"Professional education"], + [1081,1087.4,"Industrial education (General)"], + [1090,1091,"Political education"], + [1099,1099.5,"Multicultural education (General)"], + [1200,1203,"Inclusive education"], + [1390,5160.3,"Education of special classes of persons"], + [1390,1390,"Men. Boys"], + [1401,2572,"Women. Girls"], + [2574,2576,"Gays. Lesbians. Bisexuals"], + [2580,2582,"Student-athletes"], + [2601,2611,"Education in developing countries"], + [2630,2638,"Asian Americans. Asians in the United States"], + [2667,2698,"Latin Americans. Hispanic Americans"], + [2680,2688,"Mexican Americans. Mexicans in the United States"], + [2690,2698,"Puerto Ricans. Puerto Ricans in the United States"], + [2699,2913,"Blacks. African Americans"], + [3001,3501,"Asians"], + [3503,3520,"Romanies. Gypsies"], + [3530,3540,"Lapps"], + [3551,3593,"Jews"], + [3701,3740,"Immigrants or ethnic and linguistic minorities. Bilingual schools and bilingual education"], + [3745,3747,"Children of immigrants (First generation)"], + [3950,4806.5,"Exceptional children and youth. Special education"], + [3991,4000,"Gifted children and youth"], + [4001,4806.5,"Children and youth with disabilities. Learning disabled children and youth"], + [4812,5160.3,"Other special classes"], + [5161,5163,"Fundamental education"], + [5201,6660.4,"Education extension. Adult education. Continuing education"], + [5451,5493,"Aged education"], + [5501,5560,"Evening schools"], + [5701,5771,"Vacation schools. Summer schools"], + [5800,5808,"Distance education"], + [5900,6101,"Correspondence schools"], + [6201,6401,"University extension"], + [6501,6560.4,"Lyceums and lecture courses. Forums"], + [6571,6581,"Radio and television extension courses. Instruction by radio and television"], + [6601,6660.4,"Reading circles and correspondence clubs"], + [6681,6681,"Education and travel"], + [6691,6691,"Traveling educational exhibits"], + ], + LD: [ + [13,7501,"Individual institutions"], + [13,7501,"United States"], + [13,7251,"Universities. Colleges"], + [6501,6501,"Community colleges. Junior colleges"], + [7020,7251,"Women's colleges"], + [7501,7501,"Secondary and elementary schools"], + ], + LE: [ + [3,78,"Individual institutions"], + [3,78,"America (except United States)"], + [3,5,"Canada"], + [7,9,"Mexico"], + [11,13,"Central America"], + [15,17,"West Indies"], + [21,78,"South America"], + [21,23,"Argentina"], + [27,29,"Bolivia"], + [31,33,"Brazil"], + [36,38,"Chile"], + [41,43,"Colombia"], + [46,48,"Ecuador"], + [51,59,"Guianas"], + [61,63,"Paraguay"], + [66,68,"Peru"], + [71,73,"Uruguay"], + [76,78,"Venezuela"], + ], + LF: [ + [14,5627,"Individual institutions"], + [14,1257,"Great Britain"], + [14,797,"England"], + [800,957,"Ireland"], + [960,1137,"Scotland"], + [1140,1257,"Wales"], + [1311,1537,"Austria"], + [1541,1549,"Czech Republic"], + [1550,1550.8,"Slovakia"], + [1561,1697,"Hungary"], + [1705,1709,"Finland"], + [1711,2397,"France"], + [2402,3197,"Germany"], + [3211,3247,"Greece"], + [3248,3897,"Italy"], + [3899,3899,"Malta"], + [3911,4067,"Belgium"], + [4069,4069,"Luxembourg"], + [4071,4197,"Netherlands"], + [4203,4209,"Poland"], + [4211,4437,"Russia (Federation)"], + [4440,4441,"Estonia"], + [4443,4444,"Latvia"], + [4445,4446,"Lithuania"], + [4447.2,4447.5,"Belarus"], + [4448,4448.5,"Moldova"], + [4449.2,4449.5,"Ukraine"], + [4451,4487,"Denmark"], + [4488,4488.2,"Faroe Islands"], + [4489,4491,"Iceland"], + [4493,4537,"Norway"], + [4539,4607,"Sweden"], + [4610,4827,"Spain"], + [4831,4887,"Portugal"], + [4901,5047,"Switzerland"], + [5051,5627,"Turkey and the Baltic states"], + ], + LG: [ + [21,961,"Individual institutions"], + [21,395,"Asia"], + [21,21,"Afghanistan"], + [51,53,"China"], + [55,57,"Taiwan"], + [60,170.2,"India. Pakistan. Bangladesh. Burma. Sri Lanka. Nepal"], + [171,172,"Indochina"], + [173,173,"Malaysia"], + [181,184,"Indonesia"], + [185,187,"Papua-New Guinea (Ter.)"], + [200,227,"Philippines"], + [240,277,"Japan"], + [281,285,"Korea"], + [291,291,"Iran"], + [302.2,320,"Former Soviet republics in Asia"], + [321,321,"Asia Minor"], + [331,331.5,"Armenia (Republic)"], + [332.2,332.5,"Azerbaijan"], + [332.7,332.9,"Georgia (Republic)"], + [333,333,"Bahrain"], + [338,338,"Iraq"], + [341,345,"Israel. Palestine"], + [346,346,"Jordan"], + [347,347,"Kuwait"], + [351,357,"Lebanon"], + [358,358,"Qatar"], + [359,359,"Saudi Arabia"], + [361,367,"Syria"], + [370,370,"Yeman (Yemen Arab Republic)"], + [395,395,"Other"], + [401,681,"Africa"], + [401,401,"Ethiopia"], + [405,411,"South Africa"], + [416,416,"Botswana"], + [418,418,"Kenya"], + [419,419,"Lesotho"], + [421,423,"Uganda"], + [431,438,"Natal"], + [441,443,"Malawi"], + [451,451,"Orange Free State"], + [454,454,"Swaziland"], + [457,457,"Transkei"], + [459,459,"Venda"], + [461,462,"Zimbabwe"], + [468,468,"Tanzania"], + [469,469,"Zambia"], + [471,475,"Transvaal"], + [478,478,"Zululand"], + [481,505,"West Africa"], + [481,483,"Nigeria"], + [497,499,"Ghana"], + [511,511,"Egypt"], + [513,514,"Sudan"], + [521,521,"Algeria and Tunisia"], + [525,525,"Burundi"], + [531,536,"French Equatorial Africa. French Congo"], + [541,543,"Madagascar"], + [545,547,"Rwanda"], + [551,552,"Senegal"], + [553,554,"Benin"], + [559,560,"Ivory Coast"], + [561,561,"Mali"], + [581,593,"German Africa (Former)"], + [601,611,"Italian Africa (Former)"], + [615,615,"Zaire"], + [621,621,"Liberia"], + [631,632,"Morocco"], + [641,651,"Portuguese Africa (Former)"], + [671,671,"Spanish Africa"], + [681,681,"Libya"], + [690,690,"Indian Ocean islands"], + [715,720,"Australia"], + [741,745,"New Zealand"], + [961,961,"Pacific islands"], + ], + LH: [ + [1,9,"College and school magazines and papers"], + ], + LJ: [ + [3,165,"Student fraternities and societies, United States"], + ], + LT: [ + [6,501,"Textbooks"], + ], + M: [ + [1,5000,"Music"], + [1,1,"Music printed or copied in manuscript in the United States or the colonies before 1860","","A15"], + [1,3.3,"Collections","A5",""], + [1,1,"Miscellaneous","A5","Z"], + [2,2.3,"Musical sources"], + [3,3.3,"Collected works of individual composers"], + [5,1480,"Instrumental music"], + [5,5,"Collections"], + [6,175.5,"One solo instrument"], + [176,176,"Motion picture music"], + [176.5,176.5,"Radio and television music"], + [177,990,"Two or more solo instruments"], + [1000,1075,"Orchestra"], + [1100,1160,"String orchestra"], + [1200,1270,"Band"], + [1350,1366,"Other ensembles"], + [1375,1420,"Instrumental music for children"], + [1470,1480,"Aleatory music. Electronic music. Mixed media"], + [1490,1490,"Music printed or copied in manuscript before 1700"], + [1495,2199,"Vocal music"], + [1495,1495,"Collections"], + [1497,1998,"Secular vocal music"], + [1497,1497,"Collections"], + [1500,1527.8,"Dramatic music"], + [1528,1529.5,"Two or more solo voices"], + [1530,1609,"Choruses"], + [1611,1624.8,"One solo voice"], + [1625,1626,"Recitations with music"], + [1627,1853,"Folk, national and ethnic music"], + [1900,1985,"Songs of specific groups or on specific topics"], + [1990,1998,"Secular vocal music for children"], + [1999,2199,"Sacred vocal music"], + [1999,1999,"Collections"], + [2000,2007,"Dramatic music"], + [2010,2017.6,"Choral services, etc."], + [2018,2019.5,"Two or more solo voices"], + [2020,2101.5,"Choruses"], + [2102,2114.8,"One solo voice"], + [2115,2146,"Hymnals. Hymn collections"], + [2147,2188,"Liturgy and ritual"], + [2190,2196,"Sacred vocal music for children"], + [2198,2199,"Popular religious and devotional music"], + [5000,5000,"Unidentified compositions"], + [2.5,2.5,"Music study abroad"], + ], + ML: [ + [1,3930,"Literature on music"], + [1,5,"Periodicals. Serials"], + [12,21,"Directories. Almanacs"], + [25,28,"Societies and other organizations"], + [29,31,"Special collections"], + [32,33,"Institutions"], + [35,38,"Festivals. Congresses"], + [40,44,"Programs"], + [45,45,"Circulars and advertisements"], + [46,46,"Scrapbooks"], + [47,54.8,"Librettos. Texts. Scenarios"], + [55,89,"Aspects of the field of music as a whole"], + [93,96.5,"Manuscript studies and manuscripts"], + [100,109,"Dictionaries. Encyclopedias"], + [110,111.5,"Music librarianship"], + [112,112.5,"Music printing and publishing"], + [112.8,158.8,"Bibliography"], + [159,3785,"History and criticism"], + [159,161,"General works"], + [162,197,"By period"], + [198,360.6,"By region or country"], + [385,429,"Biography"], + [430,458,"Composition and performance"], + [459,1380,"Instruments and instrumental music"], + [1400,3275,"Vocal music"], + [3300,3351,"Program music"], + [3400,3465,"Dance music"], + [3469,3541,"Popular music"], + [3544,3776,"Folk, national, and ethnic music"], + [3780,3780,"Music on particular topics"], + [3785,3785,"Musical journalism"], + [3790,3792,"Music trade"], + [3795,3795,"Music as a profession. Vocational guidance"], + [3797,3799.5,"Musical research"], + [3800,3923,"Philosophical and societal aspects of music. Physics and acoustics of music. Physiological aspects of music"], + [3800,3800,"General works"], + [3805,3817,"Physics and acoustics"], + [3820,3820,"Physiological aspects of music"], + [3830,3840,"Psychology"], + [3845,3877,"Aesthetics"], + [3880,3915,"Criticism"], + [3916,3918,"Social and political aspects of music"], + [3919,3920,"Moral influence of music. Therapeutic use of music"], + [3921,3921.8,"Religious aspects of music"], + [3922,3922,"Music in the workplace"], + [3928,3930,"Literature for children"], + ], + MT: [ + [1,960,"Instruction and study"], + [1,1,"General works"], + [3,5,"History"], + [5.5,7,"Music theory"], + [9,15,"Printed pedagogical aids"], + [9,9,"Examinations, exercises, etc."], + [10,10,"Teachers’ and supervisors’ manuals, etc."], + [15,15,"Charts, diagrams, etc."], + [17,17,"Music in special education"], + [18,18,"Music in colleges and universities"], + [20,34,"Systems and methods"], + [35,39,"Notation"], + [40,67,"Composition. Elements and techniques of music"], + [68,68,"Improvisation. Accompaniment. Transposition"], + [70,74,"Instrumentation and orchestration"], + [75,75,"Interpretation"], + [80,80,"Embellishment"], + [82,82,"Memorizing"], + [85,85,"Conducting. Score reading and playing"], + [87,87,"Community music"], + [88,88,"Administration and instruction of vocal groups"], + [90,146,"Analysis and appreciation of musical works"], + [150,150,"Audio-visual aids"], + [155,155,"Music theory for children"], + [165,165,"Tuning"], + [170,810,"Instrumental techniques"], + [179,258,"Keyboard instruments"], + [259,338,"Stringed instruments. Bowed stringed instruments"], + [339,533,"Wind instruments"], + [539,654,"Plucked instruments"], + [655,725,"Percussion and other instruments"], + [728,735,"Ensembles"], + [737,737,"Motion picture accompanying"], + [740,810,"Instrumental techniques for children"], + [820,915,"Singing and vocal technique"], + [898,915,"Vocal techniques for children"], + [918,948,"School music"], + [920,925,"Kindergarten"], + [930,948,"Elementary schools. Junior high schools. High schools"], + [949.5,949.5,"Whistling"], + [950,950,"Music to accompany instruction in ballet, folk dancing, gymnastics, etc."], + [955,956,"Musical theater"], + [960,960,"Music in the theater"], + ], + N: [ + [1,9211,"Visual arts"], + [1,58,"General"], + [61,72,"Theory. Philosophy. Aesthetics of the visual arts"], + [81,390,"Study and teaching. Research"], + [400,3990,"Art museums, galleries, etc."], + [4390,5098,"Exhibitions"], + [5198,5299,"Private collections and collectors"], + [5300,7418,"History"], + [7420,7525.8,"General works"], + [7560,8266,"Special subjects of art"], + [8350,8356,"Art as a profession. Artists"], + [8510,8553,"Art studios, materials, etc."], + [8554,8585,"Examination and conservation of works of art"], + [8600,8675,"Economics of art"], + [8700,9165,"Art and the state. Public art"], + ], + NA: [ + [1,9428,"Architecture"], + [1,60,"General"], + [100,130,"Architecture and the state"], + [190,1555.5,"History"], + [1995,1995,"Architecture as a profession"], + [2000,2320,"Study and teaching. Research"], + [2335,2360,"Competitions"], + [2400,2460,"Museums. Exhibitions"], + [2500,2599,"General works"], + [2695,2793,"Architectural drawing and design"], + [2835,4050,"Details and decoration"], + [4100,8480,"Special classes of buildings"], + [4100,4145,"Classed by material"], + [4150,4160,"Classed by form"], + [4170,8480,"Classed by use"], + [4170,7020,"Public buildings"], + [4590,5621,"Religious architecture"], + [7100,7884,"Domestic architecture. Houses. Dwellings"], + [7910,8125,"Clubhouses, guild houses, etc."], + [8200,8260,"Farm architecture"], + [8300,8480,"Outbuildings, gates, fences, etc."], + [9000,9428,"Aesthetics of cities. City planning and beautifying"], + ], + NB: [ + [1,1952,"Sculpture"], + [1,50,"General"], + [60,1115,"History"], + [1120,1133,"Study and teaching"], + [1134,1134.4,"Competitions"], + [1135,1150,"General works"], + [1160,1195,"Designs and technique"], + [1199,1200,"Restoration of sculptures"], + [1203,1270,"Special materials"], + [1272,1291,"Mobiles, color, sculpture gardens, etc."], + [1293,1895,"Special forms"], + [1293,1310,"Portrait sculpture"], + [1312,1313,"Equestrian statues"], + [1330,1685,"Sculptural monuments"], + [1750,1793,"Religious monuments and shrines"], + [1800,1880,"Sepulchral monuments"], + [1910,1952,"Special subjects"], + ], + NC: [ + [1,1940,"Drawing. Design. Illustration"], + [1,45,"General"], + [50,266,"History of drawing"], + [390,670,"Study and teaching"], + [673,677,"Competitions"], + [703,725,"General works"], + [730,758,"Technique"], + [760,825,"Special subjects"], + [845,915,"Graphic art materials"], + [930,930,"Conservation and restoration of drawings"], + [950,996,"Illustration"], + [997,1003,"Commercial art. Advertising art"], + [1280,1284,"Printed ephemera. Imagerie populaire"], + [1300,1766,"Pictorial humor, caricature, etc."], + [1800,1850,"Posters"], + [1860,1896,"Greeting cards, postcards, invitations, book jackets, etc."], + [1920,1940,"Copying, enlarging, and reduction of drawings"], + ], + ND: [ + [25,3416,"Painting"], + [25,48,"General"], + [49,813,"History"], + [1115,1120,"Study and teaching"], + [1130,1156,"General works"], + [1288,1460,"Special subjects"], + [1290,1293,"Human figure"], + [1300,1337,"Portraits"], + [1340,1367,"Landscape painting"], + [1370,1375,"Marine painting"], + [1380,1383,"Animals. Birds"], + [1385,1388,"Sports. Hunting, fishing, etc."], + [1390,1393,"Still life"], + [1400,1403,"Flowers. Fruit. Trees"], + [1410,1460,"Other subjects"], + [1470,1625,"Technique and materials"], + [1630,1662,"Examination and conservation of paintings"], + [1700,2495,"Watercolor painting"], + [2550,2733,"Mural painting"], + [2889,3416,"Illuminating of manuscripts and books"], + ], + NE: [ + [1,3002,"Print media"], + [1,978,"Printmaking and engraving"], + [1,90,"General"], + [218,330,"Engraved portraits. Self-portraits"], + [380,380,"Conservation and restoration of prints"], + [390,395,"Collected works"], + [400,773,"History of printmaking"], + [830,898,"General works"], + [951,962,"Special subjects"], + [965,965.3,"Tradesmen's cards"], + [970,973,"Study and teaching"], + [975,975.4,"Competitions"], + [977,978,"Equipment"], + [1000,1352,"Wood engraving"], + [1000,1027,"General"], + [1030,1196.3,"History"], + [1220,1233,"General works"], + [1310,1326.5,"Japanese prints"], + [1330,1336,"Linoleum block prints"], + [1340,1340,"Fish prints"], + [1344,1345,"Potato prints"], + [1350,1352,"Other materials used in relief printing"], + [1400,1879,"Metal engraving"], + [1400,1422,"General"], + [1620,1630,"General works"], + [1634,1749,"History"], + [1750,1775,"Copper engraving"], + [1850,1879,"Color prints"], + [1940,2232.5,"Etching and aquatint"], + [1940,1975,"General"], + [1980,2055.5,"History"], + [2120,2140,"General works"], + [2141,2149,"Special subjects"], + [2220,2225,"Dry point"], + [2236,2240.6,"Serigraphy"], + [2242,2246,"Monotype (Printmaking)"], + [2250,2570,"Lithography"], + [2685,2685.8,"Lumiprints"], + [2690,2690,"Engraving on glass"], + [2800,2880,"Printing of engravings"], + [3000,3002,"Copying art. Copying machine art"], + ], + NK: [ + [1,9990,"Decorative arts"], + [1,570,"General"], + [600,806,"History"], + [1135,1149.5,"Arts and crafts movement"], + [1160,1590,"Decoration and ornament. Design"], + [1160,1174,"General"], + [1505,1535,"General works"], + [1548,1590,"Special subjects for design"], + [1648,1678,"Religious art"], + [1700,2195,"Interior decoration. House decoration"], + [1700,2138,"General. History, etc."], + [2140,2180,"Decorative painting"], + [2190,2192,"Church decoration"], + [2200,2750,"Furniture"], + [2775,2898,"Rugs and carpets"], + [2975,3049,"Tapestries"], + [3175,3296.3,"Upholstery. Drapery"], + [3375,3496.3,"Wallpapers"], + [3600,9990,"Other arts and art industries"], + [3700,4695,"Ceramics"], + [4700,4890,"Costume"], + [5100,5440,"Glass"], + [5500,6060,"Glyptic arts"], + [6400,8459,"Metalwork"], + [8800,9505.5,"Textiles"], + [9600,9955,"Woodwork"], + ], + NX: [ + [1,820,"Arts in general"], + [1,260,"General"], + [280,410,"Study and teaching. Research"], + [411,415,"Competitions"], + [420,430,"Exhibitions"], + [440,632,"History of the arts"], + [650,694,"Special subjects, characters, persons, religious arts, etc."], + [700,750,"Patronage of the arts"], + [760,770,"Administration of the arts"], + [775,777,"Voluntarism in the arts"], + [798,820,"Arts centers and facilities"], + ], + P: [ + [1,1091,"Philology. Linguistics"], + [1,85,"General"], + [87,96,"Communication. Mass media"], + [94.7,94.7,"Interpersonal communication"], + [95,95.6,"Oral communication. Speech"], + [98,98.5,"Computational linguistics. Natural language processing"], + [99,99.4,"Semiotics. Signs and symbols"], + [99.5,99.6,"Nonverbal communication"], + [101,410,"Language. Linguistic theory. Comparative grammar"], + [118,118.75,"Language acquisition"], + [121,149,"Science of language (Linguistics)"], + [201,299,"Comparative grammar"], + [301,301.5,"Style. Composition. Rhetoric"], + [302,302.87,"Discourse analysis"], + [306,310,"Translating and interpreting"], + [321,324.5,"Etymology"], + [325,325.5,"Semantics"], + [326,326.5,"Lexicology"], + [327,327.5,"Lexicography"], + [375,381,"Linguistic geography"], + [501,769,"Indo-European (Indo-Germanic) philology"], + [901,1091,"Extinct ancient or medieval languages"], + ], + PA: [ + [1,199,"Classical philology"], + [201,899,"Greek philology and language"], + [1000,1179,"Medieval and modern Greek language"], + [2001,2915,"Latin philology and language"], + [3000,3049,"Classical literature"], + [3050,4505,"Greek literature"], + [3051,3285,"Literary history"], + [3300,3516,"Collections"], + [3520,3564,"Criticism, interpretation, etc."], + [3601,3681,"Translations"], + [3818,4505,"Individual authors"], + [3825,3849,"Aeschylus"], + [3851,3858,"Aesop"], + [3890,3926,"Aristotle"], + [3949,3964,"Demosthenes"], + [3973,3992,"Euripedes"], + [4018,4209,"Homer"], + [4279,4333,"Plato"], + [4367,4389,"Plutarch"], + [4413,4434,"Sophocles"], + [4452,4486,"Thucydides"], + [4494,4499,"Xenophon"], + [5000,5660,"Byzantine and modern Greek literature"], + [5301,5638.36,"Individual authors"], + [6000,6971,"Roman literature"], + [6001,6097,"Literary history"], + [6100,6140,"Collections"], + [6141,6144,"Criticism, interpretation, etc."], + [6155,6191,"Translations"], + [6202,6971,"Individual authors"], + [6235,6269,"Caesar, Julius"], + [6278,6370,"Cicero, Marcus Tullius"], + [6393,6444,"Horace"], + [6482,6496,"Lucretius Carus, Titus"], + [6501,6510,"Martial"], + [6519,6553,"Ovid"], + [6568,6609,"Plautus, Titus Maccius"], + [6611,6637,"Pliny, the Elder"], + [6661,6693,"Seneca, Lucius Annaeus"], + [6705,6753,"Tacitus, Cornelius"], + [6755,6785,"Terentius Apher, Publius (Terence)"], + [6801,6961,"Vergilius Maro, Publius (Virgil)"], + [8001,8595,"Medieval and modern Latin literature"], + [8200,8595,"Individual authors"], + ], + PB: [ + [1,3029,"Modern languages. Celtic languages"], + [1,431,"Modern languages"], + [1001,3029,"Celtic languages and literature"], + [1101,1200,"Goidelic. Gaelic"], + [1201,1449,"Irish"], + [1501,1709,"Gaelic (Scottish Gaelic, Erse)"], + [1801,1867,"Manx"], + [1950,1950,"Pict"], + [2001,3029,"Brittanic group"], + [2101,2499,"Welsh. Cymric"], + [2501,2621,"Cornish"], + [2801,2932,"Breton. Armorican"], + [3001,3029,"Gaulish"], + ], + PC: [ + [1,5498,"Romance"], + [1,400,"General"], + [601,872,"Romanian"], + [901,986,"Raeto-Romance"], + [1001,1977,"Italian"], + [1981,1984,"Sardinian"], + [2001,3761,"French"], + [2700,3708,"Dialects. Provincialisms"], + [2813,2898,"Old French"], + [3201,3366,"Provencal (Old)"], + [3371,3420.5,"Modern patois of South France"], + [3420.8,3495,"Langue d'oc dialects"], + [3721,3761,"Slang. Argot"], + [3801,3976,"Catalan"], + [4001,4977,"Spanish"], + [5001,5498,"Portuguese"], + ], + PD: [ + [1,7159,"Germanic"], + [1,780,"General"], + [1001,1350,"Old Germanic dialects"], + [1101,1211,"Gothic"], + [1501,7159,"North Germanic. Scandinavian"], + [2201,2393,"Old Norse. Old Icelandic and Old Norwegian"], + [2401,2446,"Modern Icelandic"], + [2501,2999,"Norwegian"], + [3001,3929,"Danish"], + [5001,5929,"Swedish"], + [6000,7159,"Scandinavian dialects, Modern"], + ], + PE: [ + [1,3729,"English"], + [101,458,"Anglo-Saxon. Old English"], + [501,693,"Middle English"], + [814,896,"Early Modern English"], + [1001,1693,"Modern English"], + [1700,3602,"Dialects. Provincialisms, etc."], + [3701,3729,"Slang. Argot, etc."], + ], + PF: [ + [1,5999,"West Germanic"], + [1,979,"Dutch"], + [1001,1184,"Flemish"], + [1401,1541,"Friesian"], + [3001,5999,"German"], + [3801,3991,"Old High German"], + [3992,4010,"Old Saxon"], + [4043,4350,"Middle High German"], + [4501,4596,"Early Modern German"], + [5000,5951,"Dialects. Provincialism, etc."], + [5971,5999,"Slang. Argot, etc."], + ], + PG: [ + [1,9665,"Slavic. Baltic. Albanian"], + [1,7925,"Slavic"], + [1,499,"Slavic philology and languages (General)"], + [500,585,"Slavic literature (General)"], + [601,716,"Church Slavic"], + [771,799,"Bulgarian Church Slavic"], + [801,1146,"Bulgarian"], + [1151,1199,"Macedonian"], + [1201,1749,"Serbo-Croatian"], + [1801,1962,"Slovenian"], + [2001,2826,"Russian language"], + [2830,2847,"Belarusian"], + [2900,3698,"Russian literature"], + [2900,3190,"History and criticism"], + [2900,2998,"General"], + [3001,3026,"Special periods"], + [3041,3065,"Poetry"], + [3071,3089,"Drama"], + [3091,3099,"Prose"], + [3100,3155,"Folk literature"], + [3199,3299,"Collections"], + [3199,3205,"General"], + [3211,3219,"Translations"], + [3223,3229.2,"Special periods"], + [3230,3238,"Poetry"], + [3240,3255,"Drama"], + [3260,3299,"Prose"], + [3300,3493.96,"Individual authors and works"], + [3300,3308,"Early to 1700"], + [3310,3319,"18th century"], + [3312,3312,"Derzhavin"], + [3314,3314,"Karamzin"], + [3316,3316,"Lomonosov"], + [3318,3318,"Sumarokov"], + [3320,3447,"1800-1870"], + [3325,3328,"Dostoyevsky"], + [3332,3335,"Gogol'"], + [3340,3359,"Pushkin"], + [3365,3417,"Tolstoi"], + [3420,3445,"Turgenev"], + [3450,3470,"1870-1917"], + [3452,3452,"Andreev"], + [3455,3458,"Chekhov"], + [3462,3465,"Gorky"], + [3475,3476,"1917-1960"], + [3477,3490,"1961-2000"], + [3491.2,3493.96,"2001"], + [3500,3505,"Provincial, local, etc."], + [3515,3550,"Outside the Russian Federation"], + [3651,3698,"Special subjects"], + [3801,3987,"Ukrainian"], + [3990,3990,"Carpatho-Rusyn"], + [4001,5146,"Czech"], + [5201,5546,"Slovak"], + [5631,5689,"Sorbian (Wendic)"], + [6001,7446,"Polish"], + [7900,7925,"Lechitic dialects"], + [8001,9146,"Baltic"], + [8201,8208,"Old Prussian"], + [8501,8772,"Lithuanian"], + [8801,9146,"Latvian"], + [9501,9665,"Albanian"], + ], + PH: [ + [1,5490,"Uralic. Basque"], + [1,87,"General"], + [91,98.5,"Finnic. Baltic-Finnic"], + [101,405,"Finnish"], + [501,1109,"Other Finnic languages and dialects"], + [501,509,"Karelian"], + [521,529,"Olonets"], + [531,539,"Ludic"], + [541,549,"Veps"], + [551,559,"Ingrian"], + [561,569,"Votic"], + [581,589,"Livonian"], + [601,671,"Estonian"], + [701,735,"Sami"], + [751,785,"Mordvin"], + [801,836,"Mari"], + [1001,1079,"Permic"], + [1101,1109,"Udmurt"], + [1201,1409,"Ugric languages"], + [2001,3445,"Hungarian"], + [3801,3820,"Samoyedic languages"], + [5001,5490,"Basque"], + ], + PJ: [ + [1,9500,"Oriental philology and literature"], + [1,489,"General"], + [1,195,"Languages"], + [306,489,"Literature"], + [601,989,"Special groups"], + [601,621,"Christian Oriental"], + [701,989,"Islamic"], + [991,995,"Afroasiatic languages"], + [1001,1989,"Egyptology"], + [1091,1109,"Egyptian writing and its decipherment"], + [1111,1446,"Language"], + [1481,1989,"Literature. Inscriptions"], + [2001,2199,"Coptic"], + [2340,2399,"Libyco-Berber languages. Berber languages"], + [2353,2367,"Libyan group"], + [2369,2399,"Berber languages"], + [2401,2594,"Cushitic languages"], + [3001,3097,"Semitic philology and literature"], + [3101,3971,"Assyriology. Akkadian"], + [3231,3595,"Language"], + [3601,3971,"Literature. Inscriptions"], + [4001,4091,"Sumerian"], + [4101,4197,"West and North Semitic languages"], + [4171,4197,"Phoenician-Punic"], + [4501,5192,"Hebrew"], + [4543,4937,"Language (Biblical and modern)"], + [4951,4996,"Medieval Hebrew"], + [5001,5060,"Literature"], + [5050,5055.51,"Individual authors and works"], + [5061,5192,"Other languages used by Jews"], + [5111,5192,"Yiddish"], + [5201,5329.5,"Aramaic"], + [5211,5289,"West Aramaic"], + [5211,5219.5,"Biblical (Chaldaic)"], + [5229,5229,"Palmyrene inscriptions"], + [5239,5239,"Nabataean inscriptions"], + [5241,5249,"Christian Palestinian"], + [5251,5259,"Jewish Palestinian"], + [5271,5279,"Samaritan"], + [5281,5289,"Neo-Aramaic"], + [5301,5329.5,"East Aramaic"], + [5321,5329.5,"Mandaean"], + [5401,5809,"Syriac"], + [5414,5495,"Language"], + [5601,5695,"Literature"], + [5701,5709,"East Syriac (Nestorian)"], + [5711,5719,"West Syriac (Jacobite)"], + [5801,5809,"Neo-Syriac dialects (Modern Syriac)"], + [5901,5909,"South Semitic languages"], + [6001,8517,"Arabic"], + [6073,7144,"Language"], + [6690,6697,"Ancient Arabic"], + [6701,6901,"Modern Arabic dialects"], + [6950,7144,"South Arabian"], + [6950,6981,"Ancient"], + [7051,7144,"Modern"], + [7501,8517,"Arabic literature"], + [7695.8,7976,"Individual authors or works"], + [8991,9348,"Ethiopian languages"], + [9001,9101,"Ethiopic (Geez)"], + [9201,9269,"Amharic"], + ], + PK: [ + [1,9601,"Indo-Iranian philology and literature"], + [1,85,"General"], + [101,2899,"Indo-Aryan languages"], + [101,185,"General"], + [201,379,"Vedic"], + [401,976,"Sanskrit"], + [1001,1095,"Pali"], + [1201,1409.5,"Prakrit"], + [1421,1429.5,"Apabhram ' sa"], + [1471,1490,"Middle Indo-Aryan dialects"], + [1501,2899,"Modern Indo-Aryan languages"], + [1550,2899,"Particular languages and dialects"], + [1550,1569,"Assamese"], + [1651,1799,"Bengali"], + [1801,1831.95,"Bihari"], + [1841,1870.95,"Gujarati"], + [1931,2212,"Hindi, Urdu, Hindustani languages and literatures"], + [1931,1970,"Hindi language"], + [1971,1979.5,"Urdu language"], + [1981,2000,"Hindustani language"], + [2030,2142,"Hindi, Hindustani literatures"], + [2151,2212,"Urdu literature"], + [2261,2270.9,"Lahnda2"], + [2351,2418,"Marathi"], + [2461,2479,"Marwari"], + [2561,2579.5,"Oriya"], + [2591,2610,"Pahari"], + [2631,2659,"Panjabi"], + [2701,2708.9,"Rajasthani"], + [2781,2790,"Sindhi"], + [2801,2891,"Sinhalese (Singhalese)"], + [2892,2892.95,"Siraiki"], + [2896,2899,"Romani"], + [2901,5471,"Indo-Aryan literature"], + [2901,2979,"General"], + [3591,4485,"Sanskrit"], + [3791,3799,"Individual authors and works"], + [3801,4251,"Special subjects"], + [4471,4485,"Translations"], + [4501,4681,"Pali literature"], + [4990,5046,"Prakrit literature"], + [5401,5471,"Modern Indo-Aryan literature"], + [6001,6996,"Iranian philology and literature"], + [6001,6099,"General"], + [6101,6119,"Avestan"], + [6121,6129,"Old Persian"], + [6135,6199.9,"Middle Iranian languages"], + [6141,6199.5,"Pahlavi"], + [6201,6599.7,"New Persian"], + [6201,6399,"Language"], + [6400,6599.7,"Literature"], + [6450.9,6562.35,"Individual authors or works"], + [6455,6460,"Firdaws i2"], + [6465,6465,"Ha2fiz"], + [6475,6475,"Ibn Yam i2n, Fakhr al-D i2n Mah. mu2d"], + [6478,6482,"Jala2l al-D2i n Ru2m2i Maulana"], + [6490,6490,"Ja2m2i"], + [6501,6501,". 2m2"], + [6510,6525,"Omar Khayyam"], + [6540,6546,"Sa#d2i"], + [6701,6821,"Afghan (Pashto, Pushto, Pushtu, etc.)"], + [7001,7075,"Dardic (Pisacha)"], + [7021,7037,"Kashmiri"], + [7040,7045,"Kohistani"], + [7050,7065,"Nuristani (Kafiri) group"], + [8001,8832,"Armenian"], + [8001,8496,"Language"], + [8501,8832,"Literature"], + [9001,9201,"Caucasian languages"], + [9101,9169,"Georgian"], + ], + PL: [ + [1,8844,"Languages of Eastern Asia, Africa, Oceania"], + [1,481,"Ural-Altaic languages"], + [21,396,"Turkic languages"], + [400,431,"Mongolian languages"], + [450,481,"Tungus Manchu languages"], + [490,495,"Far Eastern languages and literature"], + [501,889,"Japanese language and literature"], + [501,699,"Japanese language"], + [700,889,"Japanese literature"], + [700,751.5,"History and criticism"], + [752,783,"Collections"], + [784,866,"Individual authors and works"], + [885,889,"Local literature"], + [901,998,"Korean language and literature"], + [901,949,"Korean language"], + [950,998,"Korean literature"], + [950.2,969.5,"History and criticism"], + [969.8,985,"Collections"], + [986,993,"Individual authors and works"], + [997,998,"Local literature"], + [1001,3208,"Chinese language and literature"], + [1001,1960,"Chinese language"], + [2250,3208,"Chinese literature"], + [2250,2443,"History and criticism"], + [2450,2659,"Collections"], + [2661,2979,"Individual authors and works"], + [3030,3208,"Provincial, local, colonial, etc."], + [3301,3311,"Non-Chinese languages of China"], + [3501,3509,"Non-Aryan languages of India and Southeastern Asia in general"], + [3512,3512,"Malaysian literature"], + [3515,3515,"Singapore literature"], + [3518,3518,"Languages of the Montagnards"], + [3521,4001,"Sino-Tibetan languages"], + [3551,4001,"Tibeto-Burman languages"], + [3561,3801,"Tibeto-Himalayan languages"], + [3601,3775,"Tibetan"], + [3781,3801,"Himalayan languages"], + [3851,4001,"Assam and Burma"], + [4051,4054,"Karen languages"], + [4070,4074,"Miao-Yao languages"], + [4281,4587,"Austroasiatic languages"], + [4301,4470,"Mon-Khmer (Mon-Anam) languages"], + [4371,4379,"Vietnamese. Annamese"], + [4423,4470,"Bru, Chrau, Khasi, Muong, etc."], + [4471,4471.5,"Nicobarese"], + [4490,4498,"Chamic languages"], + [4501,4587,"Munda languages (Kolarian languages)"], + [4601,4890,"Dravidian languages"], + [5001,7511,"Languages of Oceania"], + [5001,7101,"Austronesian, Papuan, and Australian languages"], + [5051,5497,"Malayan (Indonesian) languages"], + [5501,6135,"Philippine languages"], + [6145,6167,"Taiwan languages"], + [6191,6341,"Micronesian and Melanesian languages"], + [6401,6551,"Polynesian languages"], + [6601,6621,"Papuan languages"], + [7001,7101,"Australian languages"], + [8000,8844,"African languages and literature"], + [8000,8009,"Languages"], + [8009.5,8014,"Literature"], + [8015,8021,"Languages. By region or country"], + [8024,8027,"Special families of languages"], + [8035,8844,"Special languages (alphabetically)"], + ], + PM: [ + [1,9021,"Hyperborean, Indian, and artificial languages"], + [1,94,"Hperborean languages of Arctic Asia and America"], + [101,2711,"American languages (Aboriginal)"], + [231,355,"American languages of British North America"], + [401,501,"American languages of the United States (and Mexico)"], + [549,2711,"Special languages of the United States and Canada (alphabetically)"], + [3001,4566,"Languages of Mexico and Central America"], + [5001,7356,"Languages of South America and the West Indies"], + [7801,7895,"Mixed languages"], + [7831,7875,"Creole languages"], + [8001,8995,"Artificial languages--Universal languages"], + [8201,8298,"Esperanto"], + [8999,8999,"Picture languages"], + [9001,9021,"Secret languages"], + ], + PN: [ + [1,6790,"Literature (General)"], + [1,9,"Periodicals"], + [20,30,"Societies"], + [45,57,"Theory. Philosophy. Esthetics"], + [59,72,"Study and teaching"], + [80,99,"Criticism"], + [101,245,"Authorship"], + [172,239,"Technique. Literary composition, etc."], + [241,241.5,"Translating as a literary pursuit"], + [441,1009.5,"Literary history"], + [451,497,"Biography"], + [500,519,"Collections"], + [597,605,"Special relations, movements, and currents of literature"], + [610,779,"By period"], + [611,649,"Ancient"], + [661,694,"Medieval (to 1500)"], + [683,687,"Legends"], + [688,691,"Poetry"], + [692,693,"Prose. Prose fiction"], + [695,779,"Modern"], + [715,749,"Renaissance (1500-1700)"], + [801,820,"Romance literature"], + [821,840,"Germanic literature"], + [841,841,"Black literature (General)"], + [842,842,"Jewish literature in various languages"], + [851,884,"Comparative literature"], + [905,1008,"Folk literature"], + [980,995,"Fables"], + [1008.2,1009.5,"Juvenile literature"], + [1010,1525,"Poetry"], + [1031,1049,"Theory, philosophy, relations, etc."], + [1065,1085,"Relations to, and treatment of, special subjects"], + [1110,1279,"History and criticism"], + [1301,1333,"Epic poetry"], + [1341,1347,"Folk poetry"], + [1351,1389,"Lyric poetry"], + [1530,1530,"The monologue"], + [1551,1551,"The dialogue"], + [1560,1590,"The performing arts. Show business"], + [1585,1589,"Centers for the performing arts"], + [1600,3307,"Drama"], + [1635,1650,"Relation to, and treatment of, special subjects"], + [1660,1693,"Technique of dramatic composition"], + [1720,1861,"History"], + [1865,1988,"Special types"], + [1990,1992.92,"Broadcasting"], + [1991,1991.9,"Radio broadcasts"], + [1992,1992.92,"Television broadcasts"], + [1993,1999,"Motion pictures"], + [1997,1997.85,"Plays, scenarios, etc."], + [2000,3307,"Dramatic representation. The theater"], + [2061,2071,"Art of acting"], + [2085,2091,"The stage and accessories"], + [2131,2193,"By period"], + [2131,2145,"Ancient"], + [2152,2160,"Medieval"], + [2171,2179,"Renaissance"], + [2181,2193,"Modern"], + [2219.3,3030,"Special regions or countries"], + [3035,3035,"The Jewish theater"], + [3151,3171,"Amateur theater"], + [3175,3191,"College and school theatricals"], + [3203,3299,"Tableaux, pageants, \"Happenings,\" etc."], + [3311,3503,"Prose. Prose fiction"], + [3329,3352,"Philosophy, theory, etc."], + [3355,3383,"Technique. Authorship"], + [3427,3448,"Special kinds of fiction. Fiction genres"], + [3451,3503,"History"], + [4001,4355,"Oratory. Elocution, etc."], + [4071,4095,"Study and teaching"], + [4177,4191,"Debating"], + [4199,4321,"Recitations (in English)"], + [4331,4355,"Recitations in foreign languages"], + [4390,4390,"Diaries"], + [4400,4400,"Letters (Literary history)"], + [4500,4500,"Essays (Literary history)"], + [4699,5650,"Journalism. The periodical press, etc."], + [4735,4748,"Relation to the state. Government and the press. Liberty of the press"], + [4775,4784,"Technique. Practical journalism"], + [4825,4830,"Amateur journalism"], + [4832,4836,"Magazines and other periodicals"], + [4840,5648,"By region or country"], + [5650,5650,"The Jewish press"], + [6010,6790,"Collections of general literature"], + [6066,6069,"Special classes of authors"], + [6080,6095,"Quotations"], + [6081,6084,"English"], + [6086,6089,"French"], + [6090,6110,"German"], + [6099,6110,"Poetry"], + [6110.5,6120,"Drama"], + [6120.15,6120.95,"Fiction"], + [6121,6129,"Orations"], + [6130,6140,"Letters"], + [6141,6145,"Essays"], + [6146.5,6231,"Wit and humor"], + [6157,6222,"By region or country"], + [6233,6238,"Anacreontic literature"], + [6244,6246,"Literary extracts. Commonplace books"], + [6249,6258,"Ana"], + [6259,6268,"Anecdotes. Table talk"], + [6269,6278,"Aphorisms. Apothegms"], + [6279,6288,"Epigrams"], + [6288.5,6298,"Epitaphs"], + [6299,6308,"Maxims"], + [6309,6318,"Mottoes"], + [6319,6328,"Sayings, bon mots, etc."], + [6329,6338,"Thoughts"], + [6340,6348,"Toasts"], + [6348.5,6358,"Emblems, devices"], + [6361,6361,"Paradoxes"], + [6366,6377,"Riddles, acrostics, charades, conundrums, etc."], + [6400,6525,"Proverbs"], + [6700,6790,"Comic books, strips, etc."], + ], + PQ: [ + [1,3999,"French literature"], + [1,771,"History and criticism"], + [1,150,"General"], + [151,221,"Medieval. Old French"], + [226,310,"Modern"], + [400,491,"Poetry"], + [500,591,"Drama"], + [601,771,"Prose and prose fiction"], + [781,841,"Folk literature"], + [845,845,"Juvenile literature"], + [1100,1297,"Collections"], + [1100,1145,"General"], + [1160,1193,"Poetry"], + [1211,1241,"Drama"], + [1243,1297,"Prose"], + [1300,1595,"Old French literature"], + [1300,1391,"Collections"], + [1411,1545,"To 1350/1400"], + [1551,1595,"(14th-) 15th century (to ca. 1525)"], + [1600,2726,"Modern literature Individual authors"], + [1600,1709,"16th century"], + [1710,1935,"17th century"], + [1947,2147,"18th century"], + [2149,2551,"19th century"], + [2600,2651,"1900-1960"], + [2660,2686,"1961-2000"], + [2700,2726,"2001"], + [3800,3999,"Provincial, local, colonial, etc."], + [4001,5999,"Italian literature"], + [4001,4199.5,"History and criticism"], + [4001,4063,"General"], + [4064,4075,"Early to 1500"], + [4077,4088,"Modern"], + [4091,4131,"Poetry"], + [4133,4160,"Drama"], + [4161,4185,"Prose"], + [4186,4199,"Folk literature"], + [4199.5,4199.5,"Juvenile literature (General)"], + [4201,4263,"Collections"], + [4201,4204,"General"], + [4205,4206,"Translations"], + [4207,4225,"Poetry"], + [4227,4245,"Drama"], + [4247,4263,"Prose"], + [4265,4556,"Individual authors and works to 1400"], + [4561,4664,"Individual authors, 1400-1700"], + [4675,4734,"Individual authors, 1701-1900"], + [4800,4851,"Individual authors, 1900-1960"], + [4860,4886,"Individual authors, 1961-2000"], + [4900,4926,"Individual authors, 2001"], + [5901,5999,"Regional, provincial, local, etc."], + [6001,8929,"Spanish literature"], + [6001,6168,"History and criticism"], + [6001,6056,"General"], + [6056,6056,"Moorish-Spanish literature"], + [6058,6060,"Early to 1500"], + [6061,6073,"Modern"], + [6075,6098,"Poetry"], + [6098.7,6129,"Drama"], + [6131,6153,"Prose"], + [6155,6167,"Folk literature"], + [6168,6168,"Juvenile literature (General)"], + [6170,6269,"Collections"], + [6170,6174.9,"General"], + [6174.95,6215,"Poetry"], + [6217,6241,"Drama"], + [6247,6264,"Prose"], + [6265,6269,"Translations"], + [6271,6498,"Individual authors and works to 1700"], + [6500,6576,"Individual authors, 1700-ca. 1868"], + [6600,6647,"Individual authors, 1868-1960"], + [6650,6676,"Individual authors, 1961-2000"], + [6700,6726,"Individual authors, 2001"], + [7000,8929,"Provincial, local, colonial, etc."], + [7081,8560,"Spanish America"], + [9000,9999,"Portuguese literature"], + [9000,9129,"History and criticism"], + [9000,9034,"General"], + [9035,9055,"Special periods"], + [9061,9081,"Poetry"], + [9083,9095,"Drama"], + [9097,9119,"Prose"], + [9121,9128,"Folk literature"], + [9129,9129,"Juvenile literature (General)"], + [9131,9188,"Collections"], + [9131,9144,"General"], + [9137,9137,"Translations"], + [9149,9163,"Poetry"], + [9164,9170,"Drama"], + [9172,9188,"Prose"], + [9189,9189,"Individual authors and works to 1500"], + [9191,9255,"Individual authors and works, 1500-1700"], + [9261,9261,"Individual authors, 1701-1960"], + [9262,9288,"Individual authors, 1961-2000"], + [9300,9326,"Individual authors, 2001"], + [9400,9999,"Provincial, local, colonial, etc."], + [9500,9698.436,"Brazil"], + ], + PR: [ + [1,9680,"English literature"], + [1,56,"Literary history and criticism"], + [57,78,"Criticism"], + [111,116,"Women authors"], + [125,138.5,"Relations to other literatures and countries"], + [161,488,"By period"], + [171,236,"Anglo-Saxon (Beginnings through 1066)"], + [251,369,"Medieval. Middle English (1066-1500)"], + [401,488,"Modern"], + [421,429,"Elizabethan era (1550-1640)"], + [431,439,"17th century"], + [441,449,"18th century"], + [451,469,"19th century"], + [471,479,"20th century"], + [481,488,"21st century"], + [500,614,"Poetry"], + [521,614,"By period"], + [621,744,"Drama"], + [641,744,"By period"], + [750,890,"Prose"], + [767,818,"By period"], + [821,890,"Prose fiction. The novel"], + [901,907.2,"Oratory"], + [908,908,"Diaries"], + [911,918,"Letters"], + [921,928,"Essays"], + [931,938,"Wit and humor"], + [951,981,"Folk literature"], + [1098,1369,"Collections of English literature"], + [1110,1110,"Special classes of authors"], + [1119,1151,"By period"], + [1170,1228,"Poetry"], + [1241,1273,"Drama"], + [1281,1309,"Prose (General)"], + [1321,1329,"Oratory"], + [1330,1330,"Diaries"], + [1341,1349,"Letters"], + [1361,1369,"Essays"], + [1490,1799,"Anglo-Saxon literature"], + [1803,2165,"Anglo-Norman period. Early English. Middle"], + [2199,3195,"English renaissance (1500-1640)"], + [3291,3785,"17th and 18th centuries (1640-1770)"], + [3991,5990,"19th century, 1770/1800-1890/1900"], + [6000,6049,"1900-1960"], + [6050,6076,"1961-2000"], + [6100,6126,"2001"], + [8309,9680,"English literature: Provincial, local, etc."], + ], + PS: [ + [1,3626,"American literature"], + [126,138,"Biography, memoirs, letters, etc."], + [147,152,"Women authors"], + [163,173,"Treatment of special subjects, classes"], + [185,231,"By period"], + [185,195,"17th-18th centuries"], + [201,217,"19th century"], + [221,228,"20th century"], + [229,231,"21st century"], + [241,286,"Special regions, states, etc."], + [241,255,"North"], + [261,267,"South"], + [271,285,"West and Central"], + [301,326,"Poetry"], + [330,353,"Drama"], + [360,380,"Prose"], + [370,380,"Prose fiction"], + [400,408.2,"Oratory"], + [409,409,"Diaries"], + [410,419,"Letters"], + [420,429,"Essays"], + [430,439,"Wit and humor. Satire"], + [451,478,"Folk literature"], + [490,490,"Juvenile literature (General)"], + [501,689,"Collections of American literature"], + [530,536.3,"By period"], + [537,574,"By region"], + [538,549,"North"], + [551,559,"South"], + [561,572,"West and Central"], + [580,619,"Poetry"], + [593,593,"By form"], + [601,617,"By period"], + [623,635,"Drama"], + [642,659.5,"Prose (General)"], + [651,659.2,"By period"], + [660,668.2,"Oratory"], + [666,668.2,"By period"], + [669,669,"Diaries"], + [670,678.2,"Letters"], + [680,689,"Essays"], + [700,3576,"Individual authors"], + [700,893,"Colonial period (17th and 18th centuries)"], + [991,3390,"19th century"], + [3500,3549,"1900-1960"], + [3550,3576,"1961-2000"], + [3600,3626,"2001-"], + ], + PT: [ + [1,4897,"German literature"], + [1,80,"Literary history and criticism"], + [83,873,"History of German literature"], + [175,230,"Medieval"], + [236,405,"Modern"], + [500,597,"Poetry"], + [605,709,"Drama"], + [711,871,"Prose"], + [881,951,"Folk literature"], + [923,937,"Faust legend"], + [1100,1479,"Collections"], + [1100,1141,"General"], + [1151,1241,"Poetry"], + [1251,1299,"Drama"], + [1301,1360,"Prose"], + [1371,1374,"Early to 1950. Old and Middle High German"], + [1375,1479,"Middle High German"], + [1501,2688,"Individual authors or works"], + [1501,1695,"Middle High German, ca. 1050-1450/1500"], + [1701,1797,"1500-ca. 1700"], + [1799,2592,"1700-ca. 1860/70"], + [1891,2239,"Goethe"], + [1891,2017,"Works"], + [2026,2039,"Translations"], + [2044,2239,"Biography and criticism"], + [2600,2653,"1860/70-1960"], + [2660,2688,"1961-2000"], + [2700,2728,"2001-"], + [3701,3971,"Provincial, local, colonial, etc."], + [3701,3746,"East Germany"], + [4801,4897,"Low German literature"], + [5001,5980,"Dutch literature"], + [5001,5348,"Literary history and criticism"], + [5001,5112,"General"], + [5121,5185,"Special periods"], + [5201,5243,"Poetry"], + [5250,5295,"Drama"], + [5300,5348,"Prose"], + [5351,5395,"Folk literature"], + [5398,5398,"Juvenile literature (General)"], + [5400,5547,"Collections"], + [5400,5409,"General"], + [5410,5414,"Translations"], + [5420,5460,"Special periods"], + [5470,5488,"Poetry"], + [5490,5515,"Drama"], + [5517,5547,"Prose"], + [5555,5881.36,"Individual authors or works"], + [5555,5595,"Medieval"], + [5600,5739,"16th-18th centuries"], + [5620,5637,"Cats, Jacob"], + [5700,5732,"Vondel, Joost van den"], + [5800,5880,"1800-1960"], + [5881,5881.36,"1961-2000"], + [5882,5882.36,"2001-"], + [5901,5980,"Provincial, local, foreign"], + [6000,6467.36,"Flemish literature since 1830"], + [6000,6199,"Literary history and criticism"], + [6200,6230,"Folk literature"], + [6250,6250,"Juvenile literature (General)"], + [6300,6397,"Collections"], + [6400,6467.36,"Individual authors or works"], + [6500,6593.36,"Afrikaans literature"], + [6500,6530,"Literary history and criticism"], + [6540,6545,"Folk literature"], + [6550,6575,"Collections"], + [6580,6580,"Local"], + [6590,6593.36,"Individual authors or works"], + [7001,7099,"Scandinavian literature"], + [7001,7099,"General"], + [7001,7087,"Literary history and criticism"], + [7088,7089,"Folk literature"], + [7090,7099,"Collections"], + [7101,7338,"Old Norse literature: Old Icelandic and Old Norwegian"], + [7101,7211,"Literary history and criticism"], + [7170,7176,"Poetry"], + [7177,7211,"Prose"], + [7181,7193,"Sagas"], + [7195,7211,"Scientific and learned literature"], + [7220,7262.5,"Collections"], + [7230,7252,"Poetry"], + [7255,7262.5,"Prose"], + [7261,7262.5,"Sagas"], + [7263,7296,"Individual sagas and historical works"], + [7298,7309,"Religious works"], + [7312,7318,"Scientific and learned literature"], + [7326,7338,"Individual authors or works before 1540"], + [7351,7550,"Modern Icelandic literature"], + [7351,7418,"Literary history and criticism"], + [7420,7438,"Folk literature"], + [7442,7442,"Juvenile literature (General)"], + [7450,7495,"Collections"], + [7500,7511,"Individual authors or works"], + [7500,7501,"16th-18th centuries"], + [7510,7511,"19th-20th centuries"], + [7512,7513,"21st century"], + [7520,7550,"Provincial, local, foreign"], + [7581,7599,"Faroese literature"], + [7581,7592,"Literary history and criticism"], + [7593,7596.5,"Collections"], + [7597,7597,"Local"], + [7598,7599,"Individual authors or works"], + [7601,8260,"Danish literature"], + [7601,7869,"Literary history and criticism"], + [7721,7762,"Special periods"], + [7770,7794,"Poetry"], + [7800,7832,"Drama"], + [7835,7869,"Prose"], + [7900,7930,"Folk literature"], + [7935,7935,"Juvenile literature (General)"], + [7945,8046,"Collections"], + [7975,7994,"Poetry"], + [7999,8020,"Drama"], + [8021,8046,"Prose"], + [8050,8177.36,"Individual authors or works"], + [8050,8050,"Medieval"], + [8060,8098,"16th-18th centuries"], + [8070,8094.5,"Holberg, Ludvig"], + [8100,8167,"19th century"], + [8102,8120,"Andersen, Hans Christian"], + [8145,8157,"Oehlenschläger, Adam Gottlob"], + [8174,8175,"1900-1960"], + [8176,8176.36,"1961-2000"], + [8177,8177.36,"2001-"], + [8205,8260,"Provincial, local, foreign"], + [8301,9155,"Norwegian literature"], + [8301,8574,"Literary history and criticism"], + [8420,8456,"Special periods"], + [8460,8489,"Poetry"], + [8500,8534,"Drama"], + [8540,8574,"Prose"], + [8600,8637,"Folk literature"], + [8640,8640,"Juvenile literature (General)"], + [8650,8733,"Collections"], + [8675,8695,"Poetry"], + [8699,8718,"Drama"], + [8719,8723,"Prose"], + [8750,8952.36,"Individual authors or works"], + [8750,8775,"16th-18th centuries"], + [8800,8942,"19th century"], + [8851,8900,"Ibsen, Henrik"], + [8949,8950,"1900-1960"], + [8951,8951.36,"1961-2000"], + [8952,8952.36,"2001-"], + [9000,9094,"Landsmaal or New Norwegian"], + [9000,9019,"Literary history and criticism"], + [9025,9055,"Collections"], + [9064,9094,"Individual authors"], + [9100,9155,"Provincial, local, foreign"], + [9201,9999,"Swedish literature"], + [9201,9499,"Literary history and criticism"], + [9320,9370,"Special periods"], + [9375,9404,"Poetry"], + [9415,9449,"Drama"], + [9460,9499,"Prose"], + [9509,9542,"Folk literature"], + [9544,9544,"Juvenile literature (General)"], + [9547,9639,"Collections"], + [9565,9570,"Translations"], + [9580,9599,"Poetry"], + [9605,9625,"Drama"], + [9626,9639,"Prose"], + [9650,9877.36,"Individual authors or works"], + [9650,9651,"Medieval"], + [9674,9715,"16th-18th centuries"], + [9725,9850,"19th century"], + [9759,9771,"Lagerlöf, Selma"], + [9800,9817,"Strindberg, Johan August"], + [9820,9838,"Tegnér, Esaias"], + [9870,9875,"1900-1960"], + [9876,9876.36,"1961-2000"], + [9877,9877.36,"2001-"], + [9950,9999,"Provincial, local, foreign"], + ], + PZ: [ + [1,90,"Fiction and juvenile belles lettres"], + [1,4,"Fiction in English"], + [5,90,"Juvenile belles lettres"], + ], + Q: [ + [1,390,"Science (General)"], + [1,295,"General"], + [300,390,"Cybernetics"], + [350,390,"Information theory"], + ], + QA: [ + [1,939,"Mathematics"], + [1,43,"General"], + [47,59,"Tables"], + [71,90,"Instruments and machines"], + [75,76.95,"Calculating machines"], + [75.5,76.95,"Electronic computers. Computer science"], + [76.75,76.765,"Computer software"], + [101,145,"Elementary mathematics. Arithmetic"], + [150,272.5,"Algebra"], + [273,280,"Probabilities. Mathematical statistics"], + [299.6,433,"Analysis"], + [440,699,"Geometry. Trigonometry. Topology"], + [801,939,"Analytic mechanics"], + ], + QB: [ + [1,991,"Astronomy"], + [1,139,"General"], + [140,237,"Practical and spherical astronomy"], + [275,343,"Geodesy"], + [349,421,"Theoretical astronomy and celestial mechanics"], + [455,456,"Astrogeology"], + [460,466,"Astrophysics"], + [468,480,"Non-optical methods of astronomy"], + [495,903,"Descriptive astronomy"], + [500.5,785,"Solar system"], + [799,903,"Stars"], + [980,991,"Cosmogony. Cosmology"], + ], + QC: [ + [1,999,"Physics"], + [1,75,"General"], + [81,114,"Weights and measures"], + [120,168.85,"Descriptive and experimental mechanics"], + [170,197,"Atomic physics. Constitution and properties of matter"], + [221,246,"Acoustics. Sound"], + [251,338.5,"Heat"], + [310.15,319,"Thermodynamics"], + [350,467,"Optics. Light"], + [450,467,"Spectroscopy"], + [474,496.9,"Radiation physics (General)"], + [501,766,"Electricity and magnetism"], + [501,721,"Electricity"], + [669,675.8,"Electromagnetic theory"], + [676,678.6,"Radio waves (Theory)"], + [701,715.4,"Electric discharge"], + [717.6,718.8,"Plasma physics. Ionized gases"], + [750,766,"Magnetism"], + [770,798,"Nuclear and particle physics. Atomic energy. Radioactivity"], + [793,793.5,"Elementary particle physics"], + [794.95,798,"Radioactivity and radioactive substances"], + [801,809,"Geophysics. Cosmic physics"], + [811,849,"Geomagnetism"], + [851,999,"Meteorology. Climatology"], + [974.5,976,"Meteorological optics"], + [980,999,"Climatology and weather"], + [994.95,999,"Weather forecasting"], + ], + QD: [ + [1,999,"Chemistry"], + [1,65,"General"], + [71,142,"Analytical chemistry"], + [146,197,"Inorganic chemistry"], + [241,441,"Organic chemistry"], + [415,436,"Biochemistry"], + [450,801,"Physical and theoretical chemistry"], + [625,655,"Radiation chemistry"], + [701,731,"Photochemistry"], + [901,999,"Crystallography"], + ], + QE: [ + [1,996.5,"Geology"], + [1,350.62,"General"], + [351,399.2,"Mineralogy"], + [420,499,"Petrology"], + [500,639.5,"Dynamic and structural geology"], + [521,545,"Volcanoes and earthquakes"], + [601,613.5,"Structural geology"], + [640,699,"Stratigraphy"], + [701,760,"Paleontology"], + [760.8,899.2,"Paleozoology"], + [901,996.5,"Paleobotany"], + ], + QH: [ + [1,278.5,"Natural history (General)"], + [1,199.5,"General"], + [201,278.5,"Microscopy"], + [301,705.5,"Biology (General)"], + [359,425,"Evolution"], + [426,470,"Genetics"], + [471,489,"Reproduction"], + [501,531,"Life"], + [540,549.5,"Ecology"], + [573,671,"Cytology"], + [705,705.5,"Economic biology"], + ], + QK: [ + [1,989,"Botany"], + [1,474.5,"General"], + [474.8,495,"Spermatophyta. Phanerogams"], + [494,494.5,"Gymnosperms"], + [495,495,"Angiosperms"], + [504,638,"Cryptogams"], + [640,707,"Plant anatomy"], + [710,899,"Plant physiology"], + [900,989,"Plant ecology"], + ], + QL: [ + [1,991,"Zoology"], + [1,355,"General"], + [360,599.82,"Invertebrates"], + [461,599.82,"Insects"], + [605,739.8,"Chordates. Vertebrates"], + [614,639.8,"Fishes"], + [640,669.3,"Reptiles and amphibians"], + [671,699,"Birds"], + [700,739.8,"Mammals"], + [750,795,"Animal behavior"], + [791,795,"Stories and anecdotes"], + [799,799.5,"Morphology"], + [801,950.9,"Anatomy"], + [951,991,"Embryology"], + ], + QM: [ + [1,695,"Human anatomy"], + [1,511,"General"], + [531,549,"Regional anatomy"], + [550,577.8,"Human and comparative histology"], + [601,695,"Human embryology"], + ], + QP: [ + [1,981,"Physiology"], + [1,345,"General"], + [351,495,"Neurophysiology and neuropsychology"], + [501,801,"Animal biochemistry"], + [901,981,"Experimental pharmacology"], + ], + QR: [ + [1,502,"Microbiology"], + [1,74.5,"General"], + [75,99.5,"Bacteria"], + [99.6,99.8,"Cyanobacteria"], + [100,130,"Microbial ecology"], + [171,171,"Microorganisms in the animal body"], + [180,189.5,"Immunology"], + [355,502,"Virology"], + ], + R: [ + [5,920,"Medicine (General)"], + [5,130.5,"General works"], + [131,687,"History of medicine. Medical expeditions"], + [690,697,"Medicine as a profession. Physicians"], + [702,703,"Medicine and the humanities. Medicine and disease in relation to history, literature, etc."], + [711,713.97,"Directories"], + [722,722.32,"Missionary medicine. Medical missionaries"], + [723,726,"Medical philosophy. Medical ethics"], + [726.5,726.8,"Medicine and disease in relation to psychology. Terminal care. Dying"], + [727,727.5,"Medical personnel and the public. Physician and the public"], + [728,733,"Practice of medicine. Medical practice economics"], + [735,854,"Medical education. Medical schools. Research"], + [855,855.5,"Medical technology"], + [856,857,"Biomedical engineering. Electronics. Instrumentation"], + [858,859.7,"Computer applications to medicine. Medical informatics"], + [864,864,"Medical records"], + [895,920,"Medical physics. Medical radiology. Nuclear medicine"], + ], + RA: [ + [1,1270,"Public aspects of medicine"], + [1,418.5,"Medicine and the state"], + [396,396,"Regulation of medical education. Licensure"], + [398,398,"Registration of physicians, pharmacists, etc."], + [399,399,"Regulation of medical practice. Evaluation and quality control of medical care. Medical audit"], + [405,405,"Death certification"], + [407,409.5,"Health status indicators. Medical statistics and surveys"], + [410,410.9,"Medical economics. Economics of medical care. Employment"], + [411,415,"Provisions for personal medical care. Medical care plans"], + [418,418.5,"Medicine and society. Social medicine. Medical sociology"], + [421,790.95,"Public health. Hygiene. Preventive medicine"], + [428,428.5,"Public health laboratories, institutes, etc."], + [440,440.87,"Study and teaching. Research"], + [565,600,"Environmental health"], + [601,602,"Food and food supply in relation to public health"], + [604,618,"Parks, public baths, public carriers, buildings, etc."], + [619,637,"Disposal of the dead. Undertaking. Burial. Cremation. Cemeteries"], + [638,638,"Immunity and immunization in relation to public health"], + [639,642,"Transmission of disease"], + [643,645,"Disease (Communicable and noninfectious) and public health"], + [645.3,645.37,"Home health care services"], + [645.5,645.9,"Emergency medical services"], + [646,648.3,"War and public health"], + [648.5,767,"Epidemics. Epidemiology. Quarantine. Disinfection"], + [771,771.7,"Rural health and hygiene. Rural health services"], + [773,788,"Personal health and hygiene"], + [790,790.95,"Mental health. Mental illness prevention"], + [791,954,"Medical geography. Climatology. Meteorology"], + [960,1000.5,"Medical centers. Hospitals. Dispensaries. Clinics"], + [1001,1171,"Forensic medicine. Medical jurisprudence. Legal medicine"], + [1190,1270,"Toxicology. Poisons"], + ], + RB: [ + [1,214,"Pathology"], + [1,17,"General works"], + [24,33,"Pathological anatomy and histology"], + [37,56.5,"Clinical pathology. Laboratory technique"], + [57,57,"Post-mortem examination. Autopsies"], + [127,150,"Manifestations of disease"], + [151,214,"Theories of disease. Etiology. Pathogenesis"], + ], + RC: [ + [31,1245,"Internal medicine"], + [49,52,"Psychosomatic medicine"], + [71,78.7,"Examination. Diagnosis"], + [81,82,"Popular medicine"], + [86,88.9,"Medical emergencies. Critical care. Intensive care. First aid"], + [91,103,"Disease due to physical and chemical agents"], + [109,216,"Infectious and parasitic diseases"], + [251,251,"Constitutional diseases (General)"], + [254,282,"Neoplasms. Tumors. Oncology"], + [306,320.5,"Tuberculosis"], + [321,571,"Neurosciences. Biological psychiatry. Neuropsychiatry"], + [346,429,"Neurology. Diseases of the nervous system"], + [435,571,"Psychiatry"], + [475,489,"Therapeutics. Psychotherapy"], + [490,499,"Hypnotism and hypnosis. Suggestion therapy"], + [500,510,"Psychoanalysis"], + [512,569.5,"Psychopathology"], + [512,528,"Psychoses"], + [530,552,"Neuroses"], + [554,569.5,"Personality disorders. Behavior problems"], + [569.7,571,"Mental retardation. Developmental disabilities"], + [581,951,"Specialties of internal medicine"], + [581,607,"Immunologic diseases. Allergy"], + [620,627,"Nutritional diseases. Deficiency diseases"], + [627.5,632,"Metabolic diseases"], + [633,647.5,"Diseases of the blood and blood-forming organs"], + [648,665,"Diseases of the endocrine glands. Clinical endocrinology"], + [666,701,"Diseases of the circulatory (Cardiovascular) system"], + [705,779,"Diseases of the respiratory system"], + [799,869,"Diseases of the digestive system. Gastroenterology"], + [870,923,"Diseases of the genitourinary system. Urology"], + [924,924.5,"Diseases of the connective tissues"], + [925,935,"Diseases of the musculoskeletal system"], + [952,1245,"Special situations and conditions"], + [952,954.6,"Geriatrics"], + [955,962,"Arctic medicine. Tropical medicine"], + [963,969,"Industrial medicine. Industrial hygiene"], + [970,986,"Military medicine. Naval medicine"], + [1000,1020,"Submarine medicine"], + [1030,1160,"Transportation medicine"], + [1200,1245,"Sports medicine"], + ], + RD: [ + [1,811,"Surgery"], + [1,31.7,"General works"], + [32,33.9,"Operative surgery. Technique of surgical operations"], + [49,52,"Surgical therapeutics. Preoperative and postoperative care"], + [57,57,"Surgical pathology"], + [58,58,"Reparative processes after operations (Physiological)"], + [59,59,"Surgical shock. Traumatic shock"], + [63,76,"Operating rooms and theaters. Instruments, apparatus, and appliances"], + [78.3,87.3,"Anesthesiology"], + [91,91.5,"Asepsis and antisepsis. Sterilization (Operative)"], + [92,97.8,"Emergency surgery. Wounds and injuries"], + [98,98.4,"Surgical complications"], + [99,99.35,"Surgical nursing"], + [101,104,"Fractures (General)"], + [118,120.5,"Plastic surgery. Reparative surgery"], + [120.6,129.8,"Transplantation of organs, tissues, etc."], + [130,130,"Prosthesis. Artificial organs"], + [137,145,"Surgery in childhood, adolescence, pregnancy, old age"], + [151,498,"Military and naval surgery"], + [520,599.5,"Surgery by region, system, or organ"], + [651,678,"Neoplasms. Tumors. Oncology"], + [680,688,"Diseases of the locomotor system (Surgical treatment)"], + [701,811,"Orthopedic surgery"], + [792,811,"Physical rehabilitation"], + ], + RE: [ + [1,994,"Ophthalmology"], + [75,79,"Examination. Diagnosis"], + [80,87,"Eye surgery"], + [88,88,"Ophthalmic nursing"], + [89,89,"Eye banks"], + [91,912,"Particular diseases of the eye"], + [918,921,"Color vision tests, charts, etc."], + [925,939,"Refraction and errors of refraction and accommodation"], + [939.2,981,"Optometry. Opticians. Eyeglasses"], + [986,988,"Artificial eyes and other prostheses"], + [991,992,"Ocular therapeutics"], + ], + RF: [ + [1,547,"Otorhinolaryngology"], + [110,320,"Otology. Diseases of the ear"], + [341,437,"Rhinology. Diseases of the nose, accessory sinuses, and nasopharynx"], + [460,547,"Laryngology. Diseases of the throat"], + ], + RG: [ + [1,991,"Gynecology and obstetrics"], + [104,104.7,"Operative gynecology"], + [133,137.6,"Conception. Artificial insemination. Contraception"], + [138,138,"Sterilization of women"], + [159,208,"Functional and systemic disorders. Endocrine gynecology"], + [211,483,"Abnormalities and diseases of the female genital organs"], + [484,485,"Urogynecology and obstetric urology. Urogynecologic surgery"], + [491,499,"Diseases of the breast"], + [500,991,"Obstetrics"], + [551,591,"Pregnancy"], + [600,650,"The embryo and fetus"], + [648,648,"Spontaneous abortion. Miscarriage"], + [651,721,"Labor. Parturition"], + [725,791,"Obstetric operations. Operative obstetrics"], + [801,871,"Puerperal state"], + [940,991,"Maternal care. Prenatal care services"], + ], + RJ: [ + [1,570,"Pediatrics"], + [47.3,47.4,"Genetic aspects"], + [50,51,"Examination. Diagnosis"], + [52,53,"Therapeutics"], + [59,60,"Infant and neonatal morbidity and mortality"], + [91,91,"Supposed prenatal influence. Prenatal culture. Stirpiculture"], + [101,103,"Child health. Child health services"], + [125,145,"Physiology of children and adolescents"], + [206,235,"Nutrition and feeding of children and adolescents"], + [240,240,"Immunization of children (General)"], + [242,243,"Hospital care"], + [245,247,"Nursing of children. Pediatric nursing"], + [250,250.3,"Premature infants"], + [251,325,"Newborn infants"], + [370,550,"Diseases of children and adolescents"], + [499,507,"Mental disorders. Child psychiatry"], + ], + RK: [ + [1,715,"Dentistry"], + [58,59.3,"Practice of dentistry. Dental economics"], + [60.7,60.8,"Preventive dentistry"], + [280,280,"Oral and dental anatomy and physiology"], + [301,493,"Oral and dental medicine. Pathology. Diseases"], + [501,519,"Operative dentistry. Restorative dentistry"], + [520,528,"Orthodontics"], + [529,535,"Oral surgery"], + [641,667,"Prosthetic dentistry. Prosthodontics"], + ], + RL: [ + [1,803,"Dermatology"], + [87,94,"Care and hygiene"], + [95,95,"Pathological anatomy"], + [110,120,"Therapeutics"], + [130,169,"Diseases of the glands, hair, nails"], + [201,331,"Hyperemias, inflammations, and infections of the skin"], + [391,489,"Atrophies. Hypertrophies"], + [675,675,"Chronic ulcer of the skin. Bedsores"], + [701,751,"Diseases due to psychosomatic and nerve disorders. Dermatoneuroses"], + [760,785,"Diseases due to parasites"], + [790,790,"Pigmentations. Albinism"], + [793,793,"Congenital disorders of the skin. Nevi. Moles"], + ], + RM: [ + [1,950,"Therapeutics. Pharmacology"], + [138,138,"Drug prescribing"], + [139,139,"Prescription writing"], + [146,146.7,"Misuse of therapeutic drugs. Medication errors"], + [147,180,"Administration of drugs and other therapeutic agents"], + [182,190,"Other therapeutic procedures"], + [214,258,"Diet therapy. Dietary cookbooks"], + [259,259,"Vitamin therapy"], + [260,263,"Chemotherapy"], + [265,267,"Antibiotic therapy. Antibiotics"], + [270,282,"Immunotherapy. Serotherapy"], + [283,298,"Endocrinotherapy. Organotherapy"], + [300,666,"Drugs and their actions"], + [671,671.5,"Nonprescription drugs. Patent medicines"], + [695,893,"Physical medicine. Physical therapy"], + [930,931,"Rehabilitation therapy"], + [950,950,"Rehabilitation technology"], + ], + RS: [ + [1,441,"Pharmacy and materia medica"], + [125,131.9,"Formularies. Collected prescriptions"], + [139,141.9,"Pharmacopoeias"], + [151.2,151.9,"Dispensatories"], + [153,441,"Materia medica"], + [160,167,"Pharmacognosy. Pharmaceutical substances (Plant, animal, and inorganic)"], + [189,190,"Assay methods. Standardization. Analysis"], + [192,199,"Pharmaceutical technology"], + [200,201,"Pharmaceutical dosage forms"], + [250,252,"Commercial preparations. Patent medicines"], + [355,356,"Pharmaceutical supplies"], + [400,431,"Pharmaceutical chemistry"], + [441,441,"Microscopical examination of drugs"], + ], + RT: [ + [1,120,"Nursing"], + [89,120,"Specialties in nursing"], + ], + RV: [ + [1,431,"Botanic, Thomsonian, and eclectic medicine"], + ], + RX: [ + [1,681,"Homeopathy"], + [211,581,"Diseases, treatment, etc."], + [601,675,"Materia medica and therapeutics"], + ], + RZ: [ + [201,999,"Other systems of medicine"], + [201,275,"Chiropractic"], + [301,397.5,"Osteopathy"], + [399,399,"Osteo-magnetics, neuropathy, etc., A-Z"], + [400,408,"Mental healing"], + [409.7,999,"Miscellaneous systems and treatments"], + ], + S: [ + [1,972,"Agriculture (General)"], + [21,400.5,"Documents and other collections"], + [403,403,"Agricultural missions, voyages, etc."], + [419,482,"History"], + [530,559,"Agricultural education"], + [539.5,542.3,"Research. Experimentation"], + [544,545.53,"Agricultural extension work"], + [548,548.6,"Historic farms"], + [550,559,"Exhibitions. Fairs"], + [560,571.5,"Farm economics. Farm management. Agricultural mathematics"], + [583,587.73,"Agricultural chemistry. Agricultural chemicals"], + [588.4,589.6,"Agricultural physics"], + [589.7,589.7,"Agricultural ecology (General)"], + [589.75,589.76,"Agriculture and the environment"], + [589.8,589.87,"Plant growing media. Potting soils"], + [590,599.9,"Soils. Soil science"], + [600,600.7,"Agricultural meteorology. Crops and climate"], + [602.5,604.37,"Methods and systems of culture. Cropping systems"], + [604.5,604.64,"Agricultural conservation"], + [604.8,621.5,"Melioration: Improvement, reclamation, fertilization, irrigation, etc., of lands"], + [605.5,605.5,"Organic farming. Organiculture"], + [606,621.5,"Special classes of lands and reclamation methods"], + [622,627,"Soil conservation and protection"], + [631,667,"Fertilizers and improvement of the soil"], + [671,760.5,"Farm machinery and farm engineering"], + [770,790.3,"Agricultural structures. Farm buildings"], + [900,972,"Conservation of natural resources"], + ], + SB: [ + [1,1110,"Plant culture"], + [39,39,"Horticultural voyages, etc."], + [71,87,"History"], + [107,109,"Economic botany"], + [109.7,111,"Methods for special areas"], + [112,112,"Irrigation farming"], + [113.2,118.46,"Seeds. Seed technology"], + [118.48,118.75,"Nurseries. Nursery industry"], + [119,124,"Propagation"], + [125,125,"Training and pruning"], + [126,126,"Artificial light gardening"], + [126.5,126.57,"Hydroponics. Soilless agriculture"], + [127,127,"Forcing"], + [128,128,"Growth regulators"], + [129,130,"Harvesting, curing, storage"], + [169,172.5,"Tree crops"], + [175,177,"Food crops"], + [183,317,"Field crops"], + [317.5,319.864,"Horticulture. Horticultural crops"], + [320,353.5,"Vegetables"], + [354,402,"Fruit and fruit culture"], + [381,386,"Berries and small fruits"], + [387,399,"Grape culture. Viticulture"], + [401,401,"Nuts"], + [403,450.87,"Flowers and flower culture. Ornamental plants"], + [406.7,406.83,"Plant propagation"], + [409,413,"Culture of individual plants"], + [414,414,"Forcing"], + [414.6,417,"Greenhouses and greenhouse culture"], + [418,418.4,"Container gardening"], + [419,419.3,"Indoor gardening and houseplants"], + [419.5,419.5,"Roof gardening. Balcony gardening"], + [421,439.8,"Classes of plants"], + [441,441.75,"Flower shows. Exhibitions"], + [442.5,442.5,"Care and preparation of cut flowers and ornamental plants for market"], + [442.8,443.4,"Marketing. Cut flower industry. Florists"], + [446,446.6,"Horticultural service industry"], + [447,447,"Preservation and reproduction of flowers, fruits, etc."], + [447.5,447.5,"Bonkei. Tray landscapes"], + [449,450.87,"Flower arrangement and decoration"], + [450.9,467.8,"Gardens and gardening"], + [469,476.4,"Landscape gardening. Landscape architecture"], + [481,486,"Parks and public reservations"], + [599,990.5,"Pests and diseases"], + [608,608,"Individual or types of plants or trees"], + [610,615,"Weeds, parasitic plants, etc."], + [617,618,"Poisonous plants"], + [621,795,"Plant pathology"], + [818,945,"Economic entomology"], + [950,990.5,"Pest control and treatment of diseases. Plant protection"], + [950.9,970.4,"Pesticides"], + [973,973.5,"Soil disinfection"], + [974,978,"Organic plant protection. Biological control"], + [979.5,985,"Inspection. Quarantine"], + [992,998,"Economic zoology applied to crops. Agricultural zoology"], + ], + SD: [ + [1,669.5,"Forestry"], + [11,115,"Documents"], + [119,119,"Voyages, etc."], + [131,247.5,"History of forestry. Forest conditions"], + [250,363.3,"Forestry education"], + [388,388,"Forestry machinery and engineering"], + [388.5,388.5,"Tools and implements"], + [389,389,"Forest roads"], + [390,390.43,"Forest soils"], + [390.5,390.7,"Forest meteorology. Forest microclimatology"], + [391,410.9,"Sylviculture"], + [411,428,"Conservation and protection"], + [430,559,"Exploitation and utilization"], + [561,669.5,"Administration. Policy"], + ], + SF: [ + [1,1100,"Animal culture"], + [41,55,"History"], + [84,84.64,"Economic zoology"], + [84.82,85.6,"Rangelands. Range management. Grazing"], + [87,87,"Acclimatization"], + [89,89,"Transportation"], + [91,91,"Housing and environmental control"], + [92,92,"Equipment and supplies"], + [94.5,99,"Feeds and feeding. Animal nutrition"], + [101,103.5,"Brands and branding, and other means of identifying"], + [105,109,"Breeding and breeds"], + [111,113,"Cost, yield, and profit. Accounting"], + [114,121,"Exhibitions"], + [170,180,"Working animals"], + [191,275,"Cattle"], + [221,250,"Dairying"], + [250.5,275,"Dairy processing. Dairy products"], + [277,360.4,"Horses"], + [294.2,297,"Horse sports. Horse shows"], + [304.5,307,"Driving"], + [308.5,310.5,"Horsemanship. Riding"], + [311,312,"Draft horses"], + [315,315.5,"Ponies"], + [321,359.7,"Racing"], + [360,360.4,"Feral horses. Wild horses"], + [361,361.73,"Donkeys"], + [362,362,"Mules"], + [371,379,"Sheep. Wool"], + [380,388,"Goats"], + [391,397.83,"Swine"], + [402,405,"Fur-bearing animals"], + [405.5,407,"Laboratory animals"], + [408,408.6,"Zoo animals"], + [409,409,"Small animal culture"], + [411,459,"Pets"], + [421,440.2,"Dogs. Dog racing"], + [441,450,"Cats"], + [451,455,"Rabbits and hares"], + [456,458.83,"Fishes. Aquariums"], + [459,459,"Other animals"], + [461,473,"Birds. Cage birds"], + [481,507,"Poultry. Eggs"], + [508,510.6,"Game birds"], + [511,511.5,"Ostrich"], + [512,513,"Ornamental birds"], + [515,515.5,"Reptiles"], + [518,518,"Insect rearing"], + [521,539.8,"Bee culture"], + [541,560,"Sericulture. Silk culture"], + [561,561,"Lac-insects"], + [600,1100,"Veterinary medicine"], + [756.5,769.5,"Special preclinical sciences"], + [780.2,780.7,"Veterinary microbiology, bacteriology, virology, mycology"], + [780.9,780.9,"Veterinary epidemiology. Epizootiology"], + [781,809,"Communicable diseases of animals (General)"], + [810,810,"Veterinary parasitology"], + [810.5,810.7,"Predatory animals and their control"], + [811,909,"Veterinary medicine of special organs, regions, and systems"], + [910,910,"Other diseases and conditions"], + [910.5,910.5,"Veterinary orthopedics"], + [911,914.4,"Veterinary surgery"], + [914.3,914.4,"Veterinary traumatology. Veterinary emergencies"], + [914.5,914.5,"Veterinary acupuncture"], + [915,919.5,"Veterinary pharmacology"], + [925,925,"Veterinary physical medicine"], + [951,997.5,"Diseases of special classes of animals"], + ], + SH: [ + [1,691,"Aquaculture. Fisheries. Angling"], + [20.3,191,"Aquaculture"], + [33,134.6,"By region or country"], + [138,138,"Mariculture"], + [151,179,"Fish culture"], + [171,179,"Diseases and adverse factors"], + [185,191,"Frogs, leeches, etc."], + [201,399,"Fisheries"], + [213,216.55,"By oceans and seas"], + [219,321,"By region or country"], + [327.5,327.7,"Fishery resources. Fishery conservation"], + [328,329,"Fishery management. Fishery policy"], + [334,334,"Economic aspects. Finance"], + [334.5,334.7,"Fishery technology"], + [334.9,336.5,"Fishery processing"], + [337,337,"Packing, transportation, and storage"], + [337.5,337.5,"Fishing port facilities"], + [343.2,343.3,"Fishery oceanography. Fishery meteorology"], + [343.4,343.4,"Fishery research vessels"], + [343.5,343.5,"Exploratory fishing"], + [343.8,343.8,"Navigation"], + [343.9,343.9,"Safety measures"], + [344,344.8,"Methods and gear. Catching of fish"], + [346,351,"Fishery for individual species"], + [360,363,"Seal fisheries. Fur sealing"], + [364,364,"Sea otter"], + [365,380.92,"Shellfish fisheries. Shellfish culture"], + [381,385,"Whaling"], + [387,387,"Porpoises. Dolphins"], + [388.7,391.5,"Algae culture"], + [393,393,"Seagrasses"], + [396,396,"Sponge fisheries"], + [400,400.8,"Seafood gathering"], + [401,691,"Angling"], + ], + SK: [ + [1,664,"Hunting sports"], + [37,39.5,"Shooting"], + [40,268,"By country"], + [281,293,"Special methods and types of hunting"], + [284,287,"Fox hunting"], + [291,292,"Coursing"], + [293,293,"Ferreting"], + [295,305,"Big game"], + [311,335,"Bird hunting. Fowling"], + [336,336,"Varmint hunting (General)"], + [337,337,"Predator hunting"], + [341,341,"Other game"], + [351,579,"Wildlife management. Game protection"], + [590,593,"Wild animal trade"], + [650,664,"Wildlife-related recreation"], + ], + T: [ + [1,995,"Technology (General)"], + [10.5,11.9,"Communication of technical information"], + [11.95,12.5,"Industrial directories"], + [55,55.3,"Industrial safety. Industrial accident prevention"], + [55.4,60.8,"Industrial engineering. Management engineering"], + [57,57.97,"Applied mathematics. Quantitative methods"], + [57.6,57.97,"Operations research. Systems analysis"], + [58.4,58.4,"Managerial control systems"], + [58.5,58.64,"Information technology"], + [58.6,58.62,"Management information systems"], + [58.7,58.8,"Production capacity. Manufacturing capacity"], + [59,59.2,"Standardization"], + [59.5,59.5,"Automation"], + [59.7,59.77,"Human engineering in industry. Man-machine systems"], + [60,60.8,"Work measurement. Methods engineering"], + [61,173,"Technical education. Technical schools"], + [173.2,174.5,"Technological change"], + [175,178,"Industrial research. Research and development"], + [201,342,"Patents. Trademarks"], + [351,385,"Mechanical drawing. Engineering graphics"], + [391,995,"Exhibitions. Trade shows. World's fairs"], + ], + TA: [ + [1,2040,"Engineering (General). Civil engineering (General)"], + [164,164,"Bioengineering"], + [165,165,"Engineering instruments, meters, etc. Industrial instrumentation"], + [166,167,"Human engineering"], + [168,168,"Systems engineering"], + [170,171,"Environmental engineering"], + [174,174,"Engineering design"], + [177.4,185,"Engineering economy"], + [190,194,"Management of engineering works"], + [197,198,"Engineering meteorology"], + [213,215,"Engineering machinery, tools, and implements"], + [329,348,"Engineering mathematics. Engineering analysis"], + [349,359,"Mechanics of engineering. Applied mechanics"], + [365,367,"Acoustics in engineering. Acoustical engineering"], + [401,492,"Materials of engineering and construction. Mechanics of materials"], + [495,495,"Disasters and engineering"], + [501,625,"Surveying"], + [630,695,"Structural engineering (General)"], + [703,712,"Engineering geology. Rock mechanics. Soil mechanics. Underground construction"], + [715,787,"Earthwork. Foundations"], + [800,820,"Tunneling. Tunnels"], + [1001,1280,"Transportation engineering"], + [1501,1820,"Applied optics. Photonics"], + [2001,2040,"Plasma engineering. Applied plasma dynamics"], + ], + TC: [ + [1,978,"Hydraulic engineering"], + [160,181,"Technical hydraulics"], + [183,201,"General preliminary operations. Dredging. Submarine building"], + [203,380,"Harbors and coast protective works. Coastal engineering. Lighthouses"], + [401,506,"River, lake, and water-supply engineering (General)"], + [530,537,"River protective works. Regulation. Flood control"], + [540,558,"Dams. Barrages"], + [601,791,"Canals and inland navigation. Waterways"], + [801,978,"Irrigation engineering. Reclamation of wasteland. Drainage"], + [1501,1800,"Ocean engineering"], + ], + TD: [ + [1,1066,"Environmental technology. Sanitary engineering"], + [159,168,"Municipal engineering"], + [169,171.8,"Environmental protection"], + [172,193.5,"Environmental pollution"], + [194,195,"Environmental effects of industries and plants"], + [201,500,"Water supply for domestic and industrial purposes"], + [419,428,"Water pollution"], + [429.5,480.7,"Water purification. Water treatment and conditioning. Saline water conversion"], + [481,493,"Water distribution systems"], + [511,780,"Sewage collection and disposal systems. Sewerage"], + [783,812.5,"Municipal refuse. Solid wastes"], + [813,870,"Street cleaning. Litter and its removal"], + [878,894,"Special types of environment"], + [895,899,"Industrial and factory sanitation"], + [896,899,"Industrial and factory wastes"], + [920,934,"Rural and farm sanitary engineering"], + [940,949,"Low temperature sanitary engineering"], + [1020,1066,"Hazardous substances and their disposal"], + ], + TE: [ + [1,450,"Highway engineering. Roads and pavements"], + [175,176.5,"Highway design. Interchanges and intersections"], + [177,178.8,"Roadside development. Landscaping"], + [200,205,"Materials for roadmaking"], + [206,209.5,"Location engineering"], + [210,228.3,"Construction details"], + [250,278.8,"Pavements and paved roads"], + [279,279,"Streets"], + [279.5,298,"Pedestrian facilities"], + [280,295,"Sidewalks. Footpaths. Flagging"], + [298,298,"Curbs. Curbstones"], + ], + TF: [ + [1,1620,"Railroad engineering and operation"], + [200,320,"Railway construction"], + [340,499,"Railway equipment and supplies"], + [501,668,"Railway operation and management"], + [670,851,"Local and light railways"], + [840,851,"Elevated railways and subways"], + [855,1127,"Electric railways"], + [1300,1620,"High speed ground transporation"], + ], + TG: [ + [1,470,"Bridge engineering"], + ], + TH: [ + [1,9745,"Building construction"], + [845,895,"Architectural engineering. Structural engineering of buildings"], + [900,915,"Construction equipment in building"], + [1000,1725,"Systems of building construction"], + [2025,3000,"Details in building design and construction"], + [3301,3411,"Maintenance and repair"], + [4021,4977,"Buildings: Construction with reference to use"], + [5011,5701,"Construction by phase of the work (Building trades)"], + [6014,6081,"Environmental engineering of buildings. Sanitary engineering of buildings"], + [6101,6887,"Plumbing and pipefitting"], + [7005,7699,"Heating and ventilation. Air conditioning"], + [7700,7975,"Illumination. Lighting"], + [8001,8581,"Decoration and decorative furnishings"], + [9025,9745,"Protection of buildings"], + ], + TJ: [ + [1,1570,"Mechanical engineering and machinery"], + [163.13,163.25,"Power resources"], + [163.26,163.5,"Energy conservation"], + [170,179,"Mechanics applied to machinery. Dynamics"], + [181,210,"Mechanical movements"], + [210.2,211.47,"Mechanical devices and figures. Automata. Ingenious mechanisms. Robots (General)"], + [212,225,"Control engineering systems. Automatic machinery (General)"], + [227,240,"Machine design and drawing"], + [241,254.7,"Machine construction (General)"], + [255,265,"Heat engines"], + [266,267.5,"Turbines. Turbomachines (General)"], + [268,740,"Steam engineering"], + [603,695,"Locomotives"], + [751,805,"Miscellaneous motors and engines"], + [807,830,"Renewable energy sources"], + [836,927,"Hydraulic machinery"], + [940,940.5,"Vacuum technology"], + [950,1030,"Pneumatic machinery"], + [1040,1119,"Machinery exclusive of prime movers"], + [1125,1345,"Machine shops and machine shop practice"], + [1350,1418,"Hoisting and conveying machinery"], + [1425,1475,"Lifting and pressing machinery"], + [1480,1496,"Agricultural machinery. Farm machinery"], + [1501,1519,"Sewing machines"], + ], + TK: [ + [1,9971,"Electrical engineering. Electronics. Nuclear engineering"], + [301,399,"Electric meters"], + [452,454.4,"Electric apparatus and materials. Electric circuits. Electric networks"], + [1001,1841,"Production of electric energy or power. Powerplants. Central stations"], + [2000,2891,"Dynamoelectric machinery and auxiliaries"], + [2896,2985,"Production of electricity by direct energy conversion"], + [3001,3521,"Distribution or transmission of electric power"], + [4001,4102,"Applications of electric power"], + [4125,4399,"Electric lighting"], + [4601,4661,"Electric heating"], + [5101,6720,"Telecommunication"], + [7800,8360,"Electronics"], + [7885,7895,"Computer engineering. Computer hardware"], + [8300,8360,"Photoelectronic devices (General)"], + [9001,9401,"Nuclear engineering. Atomic power"], + [9900,9971,"Electricity for amateurs. Amateur constructors' manuals"], + ], + TL: [ + [1,4050,"Motor vehicles. Aeronautics. Astronautics"], + [1,484,"Motor vehicles. Cycles"], + [500,777,"Aeronautics. Aeronautical engineering"], + [780,785.8,"Rocket propulsion. Rockets"], + [787,4050,"Astronautics. Space travel"], + ], + TN: [ + [1,997,"Mining engineering. Metallurgy"], + [263,271,"Mineral deposits. Metallic ore deposits. Prospecting"], + [275,325,"Practical mining operations. Safety measures"], + [331,347,"Mine transportation, haulage and hoisting. Mining machinery"], + [400,580,"Ore deposits and mining of particular metals"], + [600,799,"Metallurgy"], + [799.5,948,"Nonmetallic minerals"], + [950,997,"Building and ornamental stones"], + ], + TP: [ + [1,1185,"Chemical technology"], + [155,156,"Chemical engineering"], + [200,248,"Chemicals: Manufacture, use, etc."], + [248.13,248.65,"Biotechnology"], + [250,261,"Industrial electrochemistry"], + [267.5,301,"Explosives and pyrotechnics"], + [315,360,"Fuel"], + [368,456,"Food processing and manufacture"], + [480,498,"Low temperature engineering. Cryogenic engineering. Refrigeration"], + [500,660,"Fermentation industries. Beverages. Alcohol"], + [670,699,"Oils, fats, and waxes"], + [690,692.5,"Petroleum refining. Petroleum products"], + [700,746,"Illuminating industries (Nonelectric)"], + [751,762,"Gas industry"], + [785,869,"Clay industries. Ceramics. Glass"], + [875,888,"Cement industries"], + [890,933,"Textile bleaching, dyeing, printing, etc."], + [934,945,"Paints, pigments, varnishes, etc."], + [1080,1185,"Polymers and polymer manufacture"], + ], + TR: [ + [1,1050,"Photography"], + [250,265,"Cameras"], + [287,500,"Photographic processing. Darkroom technique"], + [504,508,"Transparencies. Diapositives"], + [510,545,"Color photography"], + [550,581,"Studio and laboratory"], + [590,620,"Lighting"], + [624,835,"Applied photography"], + [845,899,"Cinematography. Motion pictures"], + [925,1050,"Photomechanical processes"], + ], + TS: [ + [1,2301,"Manufactures"], + [155,194,"Production management. Operations management"], + [195,198.8,"Packaging"], + [200,770,"Metal manufactures. Metalworking"], + [780,788,"Stonework"], + [800,937,"Wood technology. Lumber"], + [840,915,"Wood products. Furniture"], + [920,937,"Chemical processing of wood"], + [940,1047,"Leather industries. Tanning"], + [1060,1070,"Furs"], + [1080,1268,"Paper manufacture and trade"], + [1300,1865,"Textile industries"], + [1870,1935,"Rubber industry"], + [1950,1982,"Animal products"], + [2120,2159,"Cereals and grain. Milling industry"], + [2220,2283,"Tobacco industry"], + [2284,2288,"Animal feeds and feed mills. Pet food industry"], + ], + TT: [ + [1,999,"Handicrafts. Arts and crafts"], + [161,170.7,"Manual training. School shops"], + [174,176,"Articles for children"], + [180,200,"Woodworking. Furniture making. Upholstering"], + [201,203,"Lathework. Turning"], + [205,267,"Metalworking"], + [300,382.8,"Painting. Wood finishing"], + [387,410,"Soft home furnishings"], + [490,695,"Clothing manufacture. Dressmaking. Tailoring"], + [697,927,"Home arts. Homecrafts"], + [950,979,"Hairdressing. Beauty culture. Barbers' work"], + [980,999,"Laundry work"], + ], + TX: [ + [1,1110,"Home economics"], + [301,339,"The house"], + [341,641,"Nutrition. Foods and food supply"], + [642,840,"Cooking"], + [851,885,"Dining-room service"], + [901,946.5,"Hospitality industry. Hotels, clubs, restaurants, etc. Food service"], + [950,953,"Taverns, barrooms, saloons"], + [955,985,"Building operation and housekeeping"], + [1100,1105,"Mobile home living"], + [1110,1110,"Recreational vehicle living"], + ], + U: [ + [1,900,"Military science (General)"], + [21,22.3,"War. Philosophy. Military sociology"], + [27,43,"History of military science"], + [45,45,"Historiography"], + [56,59,"Army clubs"], + [150,155,"Military planning"], + [161,163,"Strategy"], + [164,167.5,"Tactics"], + [168,168,"Logistics"], + [250,255,"Maneuvers (combined arms)"], + [260,260,"Joint operations. Combined operations"], + [261,261,"Amphibious warfare"], + [262,262,"Commando tactics"], + [263,264.5,"Atomic warfare. Atomic weapons"], + [300,305,"Artillery and rifle ranges"], + [310,310.2,"War games"], + [320,325,"Physical training of soldiers"], + [400,714,"Military education and training"], + [750,773,"Military life, manners and customs, antiquities, etc."], + [799,897,"History of arms and armor"], + ], + UA: [ + [10,997,"Armies: Organization, distribution, military situation"], + [21,885,"By region or country"], + [910,915,"Mobilization"], + [920,925,"Plans for attack and defense"], + [926,929,"Civil defense"], + [929.5,929.95,"War damage in industry. Industrial defense"], + [940,945,"Military communication"], + [950,979,"Routes of travel. Distances"], + [985,997,"Military geography"], + ], + UB: [ + [1,900,"Military administration"], + [160,165,"Records, returns, muster rolls, etc."], + [170,175,"Adjutant generals' offices"], + [180,197,"Civilian personnel departments"], + [250,271,"Intelligence"], + [273,274,"Sabotage"], + [275,277,"Psychological warfare. Propaganda"], + [320,338,"Enlistment, recruiting, etc."], + [340,345,"Compulsory service. Conscription and exemption"], + [356,369.5,"Provision for veterans"], + [370,375,"Military pensions, etc."], + [380,385,"Soldiers' and sailors' homes"], + [407,409,"Warrant officers. Noncommissioned officers"], + [410,415,"Officers"], + [416,419,"Minorities, women, etc. in armed forces"], + [420,425,"Furloughs"], + [440,449.5,"Retired military personnel"], + ], + UC: [ + [10,780,"Maintenance and transportation"], + [20,258,"Organization of the service. By region or country"], + [260,267,"Supplies and stores"], + [270,360,"Transportation"], + [400,440,"Barracks. Quarters. Camps"], + [460,535,"Clothing and equipment"], + [540,585,"Equipage. Field kits"], + [600,695,"Horses. Mules. Remount service"], + [700,780,"Subsistence"], + ], + UD: [ + [1,495,"Infantry"], + [157,302,"Tactics. Maneuvers. Drill regulations"], + [320,325,"Manual of arms"], + [330,335,"Firing. Military sharpshooting"], + [340,345,"Bayonet drill"], + [380,425,"Small arms. Swords, etc."], + [450,455,"Mounted infantry"], + [460,464,"Mountain troops"], + [470,475,"Ski troops"], + [480,485,"Airborne troops. Parachute troops"], + [490,495,"Airmobile operations"], + ], + UE: [ + [1,500,"Cavalry. Armor"], + [144,145,"Horse cavalry"], + [147,147,"Armored cavalry"], + [157,302,"Tactics. Maneuvers. Drill regulations"], + [420,425,"Cavalry sword exercises"], + [460,475,"Horses"], + ], + UF: [ + [1,910,"Artillery"], + [157,302,"Tactics. Maneuvers. Drill regulations"], + [400,405,"Field artillery"], + [450,455,"Seacoast artillery"], + [460,465,"Siege artillery"], + [470,475,"Howitzer artillery. Mortar batteries"], + [480,485,"Garrison artillery"], + [500,515,"Weapons systems"], + [520,537,"Ordnance and small arms"], + [540,545,"Arsenals, magazines, armories, etc."], + [560,780,"Ordnance material (Ordnance proper)"], + [820,830,"Ballistics. Velocities and motions of projectiles"], + [848,856,"Artillery instruments. Fire control, etc."], + ], + UG: [ + [1,620,"Military engineering"], + [160,302,"Tactics and regulations"], + [335,335,"Bridges"], + [340,340,"Tunnels"], + [360,390,"Field engineering"], + [400,442,"Fortification"], + [443,449,"Attack and defense. Siege warfare"], + [470,474,"Military surveying, topography, and mapping"], + [490,490,"Land mines, etc."], + [500,565,"Technical troops and other special corps"], + [570,582,"Military signaling"], + [590,613.5,"Military telegraphy and telephony"], + [614,614.5,"Military electric lighting"], + [615,620,"Military motor vehicles"], + [622,1435,"Air forces. Air warfare"], + [633,635,"By region or country"], + [637,639,"Education and training"], + [640,645,"Military aeronautical research"], + [700,705,"Tactics"], + [730,735,"Air defenses"], + [760,765,"Aerial reconnaissance"], + [770,1045,"Organization. Personnel management"], + [1097,1097,"Air bases"], + [1100,1435,"Equipment and supplies"], + [1500,1530,"Military astronautics. Space warfare. Space surveillance"], + [1523,1525,"By region or country"], + ], + UH: [ + [20,910,"Other services"], + [20,25,"Chaplains"], + [201,515,"Medical and sanitary services"], + [520,560,"Care of sick and wounded. Relief societies"], + [600,629.5,"Military hygiene and sanitation"], + [700,705,"Public relations. Press. War correspondents"], + [750,769,"Military social work. Social welfare services"], + [800,910,"Recreation and information services"], + ], + V: [ + [1,995,"Naval science (General)"], + [25,55,"History and antiquities of naval science"], + [66,69,"Navy clubs"], + [160,165,"Strategy"], + [167,178,"Tactics"], + [200,200,"Coast defense"], + [210,214.5,"Submarine warfare"], + [390,395,"Naval research"], + [396,396.5,"Military oceanography"], + [399,399,"Automation in the naval sciences"], + [400,695,"Naval education"], + [720,743,"Naval life, manners and customs, antiquities, etc."], + [750,995,"War vessels: Construction, armament, etc."], + ], + VA: [ + [10,750,"Navies: Organization, distribution, naval situation"], + [49,395,"United States"], + [400,750,"Other regions or countries"], + ], + VB: [ + [15,955,"Naval administration"], + [21,124,"By region or country"], + [170,187,"Civil department"], + [260,275,"Enlisted personnel"], + [307,309,"Warrant officers"], + [310,315,"Officers"], + [320,325,"Minorities, women, etc. in navies"], + ], + VC: [ + [10,580,"Naval maintenance"], + [20,258,"Organization of service"], + [260,268,"Supplies and stores"], + [270,279,"Equipment of vessels, supplies, allowances, etc."], + [280,345,"Clothing and equipment"], + [350,410,"Subsistence. Provisioning"], + [412,425,"Navy yards and stations. Shore facilities"], + ], + VD: [ + [7,430,"Naval seamen"], + [21,124,"By region or country"], + [160,302,"Drill regulations"], + [330,335,"Shooting"], + [360,390,"Small arms"], + [400,405,"Small boat service"], + ], + VE: [ + [7,500,"Marines"], + [23,124,"By region or country"], + [160,302,"Drill regulations"], + [330,335,"Shooting"], + [360,390,"Small arms"], + [420,425,"Barracks, quarters, etc."], + [430,435,"Training camps"], + ], + VF: [ + [1,580,"Naval ordnance"], + [21,124,"By region or country"], + [160,302,"Ordnance instructions and drill books"], + [310,315,"Target practice"], + [346,348,"Naval weapons systems"], + [350,375,"Ordnance and arms (General)"], + [390,510,"Ordnance material (Ordnance proper)"], + ], + VG: [ + [20,2029,"Minor services of navies"], + [20,25,"Chaplains"], + [50,55,"Coast guard and coast signal service"], + [70,85,"Naval communication by telegraphy, telephone, etc."], + [90,95,"Naval aviation"], + [100,475,"Medical service"], + [500,505,"Public relations. Press. War correspondents"], + [2000,2005,"Social work. Social welfare services"], + [2020,2029,"Recreation and information service"], + ], + VK: [ + [1,1661,"Navigation. Merchant marine"], + [15,124,"History, conditions, etc."], + [321,369.8,"Harbors. Ports"], + [381,397,"Signaling"], + [401,529,"Study and teaching"], + [549,572,"Science of navigation"], + [573,587,"Nautical instruments"], + [588,597,"Marine hydrography. Hydrographic surveying"], + [600,794,"Tide and current tables"], + [798,997,"Sailing directions. Pilot guides"], + [1000,1249,"Lighthouse service"], + [1250,1299,"Shipwrecks and fires"], + [1299.5,1299.6,"Icebreaking operations"], + [1300,1491,"Saving of life and property"], + [1500,1661,"Pilots and pilotage"], + ], + VM: [ + [1,989,"Naval architecture. Shipbuilding. Marine engineering"], + [15,124,"History"], + [165,276,"Study and teaching"], + [295,296,"Contracts and specifications"], + [298.5,301,"Shipbuilding industry. Shipyards"], + [311,466,"Special types of vessels"], + [595,989,"Marine engineering"], + [975,989,"Diving"], + ], + Z: [ + [4,115.5,"Books (General). Writing. Paleography"], + [4,8,"History of books and bookmaking"], + [40,104.5,"Writing"], + [41,42.5,"Autographs. Signatures"], + [43,45,"Calligraphy. Penmanship"], + [48,48,"Duplicating processes. Copying services"], + [49,51.5,"Typewriters. Typewriting. Keyboards. Keyboarding"], + [52,52.5,"Word processing"], + [53,102,"Shorthand. Stenography. Phonography"], + [102.5,104.5,"Cryptography. Ciphers. Invisible writing"], + [105,115.5,"Manuscripts. Paleography"], + [116,659,"Book industries and trade"], + [116,116,"Treatises on the modern printed book","A2","A2"], + [116,116,"Book design","A3","A3"], + [116,265.5,"Printing","A5",""], + [124,228,"History"], + [231,234,"Printers and printing establishments"], + [234,234,"Medallic history of printing. Tokens"], + [235,236,"Printer's marks, mottoes, etc."], + [237,237,"Paper. Watermarks, etc."], + [240,241.5,"Incunabula. Block books"], + [242.9,264.5,"Practical printing"], + [265,265.5,"Representation or reproduction of books, documents, etc., by photography, microphotography, or other means"], + [266,276,"Bookbinding. Book decoration"], + [278,549,"Bookselling and publishing"], + [551,656,"Copyright"], + [657,659,"Freedom of the press. Censorship"], + [662,1000.5,"Libraries"], + [662,664,"Collections"], + [665,718.8,"Library science. Information science"], + [668,669.7,"Library education. Research"], + [672,672.13,"Library cooperation and coordination"], + [674.7,674.83,"Library information networks"], + [675,675,"Classes of libraries"], + [678,678.88,"Library administration and organization. Constitution"], + [678.89,678.892,"Library service agencies"], + [678.9,678.93,"Automation"], + [679,680,"Library buildings. Library architecture"], + [680.3,680.6,"Library communication systems"], + [681,681.3,"Reproduction of library materials. Storage media of library materials"], + [681.5,681.7,"Trustees. Library boards, committees, etc."], + [682,682.4,"Personnel"], + [683,683.5,"Finance. Insurance"], + [684,685,"Supplies. Shelving. Bookstacks"], + [686,686,"Branches. Delivery stations. Bookmobiles"], + [687,718.85,"The collections. The books"], + [688,688,"Special collections"], + [688.5,688.6,"Processing"], + [689,689.8,"Acquisition (selection, purchase, gifts, duplicates)"], + [690,690,"Exchanges"], + [691,692,"Special classes of materials"], + [693,695.83,"Cataloging"], + [695.85,695.85,"Library handwriting"], + [695.87,695.87,"Printing of catalogs"], + [695.9,695.94,"Indexing. Abstracting"], + [695.95,695.95,"Alphabetizing. Filing"], + [695.98,695.98,"Recataloging. Reclassification"], + [696,697,"Classification and notation"], + [698,698,"Shelflisting. Author notation"], + [699,699.5,"Machine methods of information and retrieval. Mechanized bibliographic control"], + [699.7,699.7,"Physical processing. Shelf preparation"], + [700,700,"Bookbinding"], + [700.9,701.5,"Physical parameters, preservation, conservation and restoration of books and other library materials"], + [702,702,"Thefts and losses of books and other library materials"], + [703.5,703.5,"Stack management. Disposition of books on shelves, etc."], + [703.6,703.6,"Discarding. Weeding"], + [711,711.95,"Public services. Reference services"], + [712,714,"Circulation. Loans. Charging systems"], + [716,716.15,"Library extension. Library commissions. Traveling libraries"], + [716.2,718.85,"Libraries in relation to special topics"], + [719,723,"Libraries (General)"], + [729,875,"Library reports. History. Statistics"], + [881,977,"Library catalogs and bulletins"], + [987,996.3,"Book collecting"], + [997,997.2,"Private libraries"], + [999,1000.5,"Booksellers' catalogs"], + [1001,1121,"General bibliography"], + [1001,1001,"Introduction to bibliography. Theory, philosophy, psychology. Bibliography. Documentation"], + [1003,1003.5,"Choice of books. Books and reading. Book reviews"], + [1003.8,1004,"Biography of bibliographers"], + [1011,1017,"General bibliographies"], + [1019,1033,"Special classes of books"], + [1035,1035.9,"Best books"], + [1036,1036,"Booksellers' general catalogs of modern books"], + [1037,1039,"Books for special classes of persons, institutions, etc."], + [1041,1107,"Anonyms and pseudonyms"], + [1201,4980,"National bibliography"], + [1201,1946,"America"], + [1215,1363,"United States"], + [1365,1401,"Canada. British North America"], + [1411,1939,"Mexico. Central America. West Indies. South America"], + [1975,1975,"Eastern Hemisphere"], + [2000,2959,"Europe"], + [3001,3496,"Asia"], + [3501,3975,"Africa"], + [4001,4980,"Australia. Oceania"], + [5051,7999,"Subject bibliography Subjects arranged in alphabetical sequence"], + [8001,8999,"Personal bibliography Names of individuals arranged in alphabetical sequence"], + ], + ZA: [ + [3038,5190,"Information resources (General)"], + [3150,3159,"Information services. Information centers"], + [3201,3250,"Information superhighway"], + [4050,4775,"Information in specific formats or media"], + [4050,4480,"Electronic information resources"], + [4150,4380,"Computer network resources"], + [4450,4460,"Databases"], + [4550,4575,"Motion pictures. Video recordings"], + [4650,4675,"Pictures. Photographs"], + [4750,4775,"Sound recordings"], + [5049,5190,"Government information"], + ], +}; diff --git a/src/server/main.ts b/src/server/main.ts index d169413..d07c98b 100644 --- a/src/server/main.ts +++ b/src/server/main.ts @@ -8,6 +8,7 @@ import { createApp, createEventBus } from './app.ts'; import { createResolver, TemporaryError } from './resolve/resolver.ts'; import { renderCalibrationPdf, renderCardsPdf } from './pdf/render.ts'; import { classNames } from '../shared/lcc-outline.ts'; +import { hierarchyOf } from './hierarchy.ts'; const port = Number(process.env.PORT ?? 4321); const dbPath = process.env.BOOKSORTER_DB ?? 'data/booksorter.db'; @@ -26,7 +27,7 @@ const resolver = createResolver({ fetch: globalThis.fetch, cache: db.cache }); const jobs = createJobs({ db, resolver, onChange: (b) => events.emitBook(b), isTemporary: (e) => e instanceof TemporaryError, }); -const app = createApp({ port, db, jobs, resolver, renderCardsPdf, renderCalibrationPdf, classNames, events, capturesDir }); +const app = createApp({ port, db, jobs, resolver, renderCardsPdf, renderCalibrationPdf, classNames, hierarchy: hierarchyOf, events, capturesDir }); app.get('*', (c) => { if (!existsSync(join(webRoot, 'index.html'))) { @@ -40,6 +41,7 @@ app.get('*', (c) => { const server = serve({ fetch: app.fetch, port, hostname: '127.0.0.1' }, () => { console.log(`Booksorter running at http://localhost:${port}`); jobs.resume(); + jobs.resumeTails(); }); server.on('error', (err: NodeJS.ErrnoException) => { if (err.code === 'EADDRINUSE') console.error(`Port ${port} is already in use. Is Booksorter already running?`); diff --git a/src/server/pdf/card.test.ts b/src/server/pdf/card.test.ts index 8b305a3..886f12a 100644 --- a/src/server/pdf/card.test.ts +++ b/src/server/pdf/card.test.ts @@ -1,15 +1,17 @@ import { test } from 'node:test'; import assert from 'node:assert/strict'; -import { layoutCard, wrap } from './card.ts'; +import { layoutCard as layout, wrap } from './card.ts'; import type { CardData } from '../../shared/types.ts'; const measure = (t: string, size: number, _b: boolean) => Array.from(t).length * size * 0.55; const base: CardData = { - callNumber: 'QA76.73.R87 K53 2018', className: 'Science', subclassName: 'Mathematics', + callNumber: 'QA76.73.R87 K53 2018', hierarchy: { outline: ['Science', 'Mathematics'], tail: [] }, title: 'The Rust Programming Language', authors: ['Steve Klabnik', 'Carol Nichols'], publisher: 'No Starch Press', year: 2018, subjects: ['Rust (Computer program language)'], isbn13: '9781593278281', approximate: true, }; +/** The text runs only; the tree and rule are tested through layout() itself. */ +const layoutCard = (c: CardData, m: typeof measure) => layout(c, m).runs; const widthOf = (r: { text: string; size: number; bold: boolean }) => measure(r.text, r.size, r.bold); function checkBounds(runs: ReturnType) { @@ -69,18 +71,112 @@ test('wrap breaks a word wider than the line and terminates', () => { assert.deepEqual(wrap('', 10, false, measure), []); }); -test('omitted pieces: no subclass duplicate, no isbn, no tilde', () => { - const runs = layoutCard({ ...base, subclassName: 'Science', isbn13: null, approximate: false }, measure); +test('omitted pieces: no duplicate level, no isbn, no tilde', () => { + const runs = layoutCard({ ...base, hierarchy: { outline: ['Science', 'Science'], tail: [] }, isbn13: null, approximate: false }, measure); assert.equal(runs.filter((r) => r.text === 'Science').length, 1); assert.ok(!runs.some((r) => r.text.startsWith('ISBN') || r.text === '~')); }); -test('no text block goes below y 132 (room for the QR code)', () => { +test('no text block goes below y 30 (above the ISBN line)', () => { const many: CardData = { ...base, title: 'A long title '.repeat(12), authors: ['One Author', 'Two Author', 'Three Author'], - subjects: ['A long first subject heading '.repeat(4), 'A long second subject heading '.repeat(4)], }; const runs = layoutCard(many, measure); - assert.ok(runs.filter((r) => r.y > 20).every((r) => r.y > 132)); + assert.ok(runs.filter((r) => r.y > 20).every((r) => r.y > 30)); assert.ok(runs.some((r) => r.text.startsWith('ISBN') && r.y === 16)); }); + +// ---- the hierarchy tree, the rule and the space priority ---- + +const levelRuns = (runs: ReturnType, rule: number) => + runs.filter((r) => r.size <= 8.5 && r.size >= 7 && r.y < 292 && r.y > rule && r.text !== '~' && !r.text.startsWith('ISBN')); +const GV = ['Recreation. Leisure', 'Outdoor life. Outdoor recreation', 'Hiking. Pedestrian tours', 'Utah', 'Uinta Mountains']; +const gv = (outline: string[], tail: string[] = []): CardData => ({ ...base, callNumber: 'GV199.42.U82 U564 2024', hierarchy: { outline, tail } }); + +test('a five-level tree: one level per line, general first, each 7 pt further in, every level in the same plain gray', () => { + const l = layout(gv(['Geography. Anthropology. Recreation', ...GV.slice(0, 3)], GV.slice(3)), measure); + const lv = levelRuns(l.runs, l.ruleY); + assert.deepEqual(lv.map((r) => r.text), GV); + lv.forEach((r, i) => { + assert.equal(r.x, 14 + 7 * i); + assert.equal(r.size, 8.5); + assert.equal(r.bold, false); + assert.equal(r.gray, 0.35); + if (i) assert.ok(r.y < lv[i - 1]!.y, 'general at the top'); + if (i) assert.ok(Math.abs(lv[i - 1]!.y - r.y - 10.5) < 1e-9, 'pitch 10.5'); + }); + assert.equal(l.connectors.length, 8); // an elbow (down, across) from each parent to its child + for (const c of l.connectors) { assert.equal(c.thickness, 0.5); assert.ok(c.x1 === c.x2 || c.y1 === c.y2); } + assert.ok(l.ruleY < lv[4]!.y && Math.abs(lv[4]!.y - l.ruleY - 8) < 1e-9, 'the rule sits 8 pt under the last line'); + const title = l.runs.find((r) => r.text.startsWith('The Rust'))!; + assert.ok(title.y < l.ruleY, 'WHAT is below the rule'); + assert.ok(!l.runs.some((r) => r.text.startsWith('Geography')), 'starts at the subclass'); +}); + +test('one level: a single plain gray line, no connector', () => { + const l = layout({ ...base, hierarchy: { outline: ['Science'], tail: [] } }, measure); + const lv = levelRuns(l.runs, l.ruleY); + assert.equal(lv.length, 1); + assert.equal(lv[0]!.bold, false); + assert.equal(lv[0]!.gray, 0.35); + assert.equal(l.connectors.length, 0); + const none = layout({ ...base, hierarchy: { outline: [], tail: [] } }, measure); + assert.equal(none.ruleY, 286); + assert.equal(none.connectors.length, 0); +}); + +test('a caption too wide for its indent shrinks, not below 7 pt', () => { + // measure: 0.55 em per char; 188 pt at 8.5 pt holds 40 chars, at 7 pt 48. + const cap = 'x'.repeat(44); + const l = layout({ ...base, hierarchy: { outline: ['Science', cap, 'Short'], tail: [] } }, measure); + const run = l.runs.find((r) => r.text === cap)!; + assert.ok(run.size < 8.5 && run.size >= 7); + assert.ok(widthOf(run) + run.x <= 202 + 1e-9); +}); + +test('a caption that cannot fit even at 7 pt wraps once at the same indent, whole words', () => { + const words = Array.from({ length: 14 }, (_, i) => `word${i}`).join(' '); // 90+ chars + const l = layout({ ...base, hierarchy: { outline: ['Science', 'Math', words], tail: [] } }, measure); + const parts = l.runs.filter((r) => !r.bold && r.x === 21 && r.size <= 8.5); + assert.equal(parts.length, 2); + assert.equal(parts.map((r) => r.text).join(' '), words, 'no word is cut or truncated'); + assert.ok(parts.every((r) => r.size >= 7 && widthOf(r) + r.x <= 202 + 1e-9)); + assert.ok(parts[0]!.y > parts[1]!.y); +}); + +test('more than five levels: the general end is dropped, the specific end kept', () => { + const l = layout(gv(['Main', 'Sub', 'A', 'B', 'C', 'D'], ['E', 'F']), measure); + assert.deepEqual(levelRuns(l.runs, l.ruleY).map((r) => r.text), ['B', 'C', 'D', 'E', 'F']); +}); + +test('title and authors are kept: the publisher goes first, then tree levels (not below two)', () => { + const title = 'Alpha beta gamma delta epsilon zeta eta theta iota kappa lambda mu'; + // The first `tall` of the five levels are long captions that wrap to several lines at 7 pt. + const levels5 = (tall: number, words: number) => ['A', 'B', 'C', 'D', 'E'].map((t, i) => (i < tall ? Array.from({ length: words }, (_, k) => `${t}word${k}`).join(' ') : t)); + const make = (levels: string[], pub = 'No Starch Press'): CardData => ({ + ...gv(['Main', ...levels.slice(0, -1)], levels.slice(-1)), title, authors: ['First Author', 'Second Author'], publisher: pub, + }); + const inWhat = (l: ReturnType) => l.runs.filter((r) => r.y < l.ruleY && r.y > 30); + const levelCount = (l: ReturnType) => new Set(levelRuns(l.runs, l.ruleY).map((r) => r.x)).size; + + // Plenty of room: everything prints, including the publisher. + const roomy = layout(make(['A', 'B', 'C', 'D', 'E']), measure); + assert.equal(levelCount(roomy), 5); + assert.ok(inWhat(roomy).some((r) => r.text.includes('No Starch'))); + + // Five tall levels: the publisher is the first thing to go; the tree and title and authors stay. + const tall = layout(make(levels5(3, 24)), measure); + assert.equal(inWhat(tall).filter((r) => r.bold && r.size === 13).length, 3, 'title'); + assert.ok(inWhat(tall).some((r) => r.text.includes('Author')), 'authors'); + assert.ok(!inWhat(tall).some((r) => r.text.includes('No Starch')), 'publisher dropped first'); + assert.equal(levelCount(tall), 5, 'the tree is untouched while title and authors still fit'); + + // Taller still: the general end of the tree goes, never below two levels; title and authors still print. + const huge = layout(make(levels5(4, 28)), measure); + const n = levelCount(huge); + assert.ok(n >= 2 && n < 5, `levels ${n}`); + assert.ok(inWhat(huge).some((r) => r.bold && r.size >= 11), 'title'); + assert.ok(inWhat(huge).some((r) => r.text.includes('Author')), 'authors'); + assert.equal(levelRuns(huge.runs, huge.ruleY).at(-1)!.text, 'E', 'the specific end is kept'); + assert.ok(huge.runs.filter((r) => r.y > 20).every((r) => r.y > 30)); +}); diff --git a/src/server/pdf/card.ts b/src/server/pdf/card.ts index fd26a9f..b2e5650 100644 --- a/src/server/pdf/card.ts +++ b/src/server/pdf/card.ts @@ -1,17 +1,18 @@ import { parseCallNumber, cardLines } from '../../shared/callnumber.ts'; import type { CardData } from '../../shared/types.ts'; +import { displayLevels } from '../../shared/hierarchy.ts'; export interface TextRun { text: string; x: number; y: number; size: number; bold: boolean; gray: number } export type Measure = (text: string, size: number, bold: boolean) => number; export const MARGIN_X = 14; export const TEXT_WIDTH = 188; +/** Where the rule sits when there is no hierarchy tree above it. */ export const RULE_Y = 286; const GRAY = 0.35; -const BLOCK_START = 268; const BLOCK_GAP = 8; -/** Text stays above the QR code: its top edge is y 122 plus 9 pt of clear space, rounded up. */ -const BLOCK_FLOOR = 132; +/** Text stays above the ISBN line (baseline 16, 8 pt). */ +const BLOCK_FLOOR = 30; const ELLIPSIS = '…'; /** Largest size (1 pt steps, down to min) at which text fits; text is truncated if min still overflows. */ @@ -34,26 +35,26 @@ function truncate(text: string, size: number, bold: boolean, m: Measure): string } /** Break one over-long word into pieces that each fit. Always consumes at least one character per piece. */ -function breakWord(word: string, size: number, bold: boolean, m: Measure): string[] { +function breakWord(word: string, size: number, bold: boolean, m: Measure, width = TEXT_WIDTH): string[] { const out: string[] = []; let cur = ''; for (const ch of Array.from(word)) { - if (cur && m(cur + ch, size, bold) > TEXT_WIDTH) { out.push(cur); cur = ch; } else cur += ch; + if (cur && m(cur + ch, size, bold) > width) { out.push(cur); cur = ch; } else cur += ch; } if (cur) out.push(cur); return out; } -export function wrap(text: string, size: number, bold: boolean, m: Measure): string[] { +export function wrap(text: string, size: number, bold: boolean, m: Measure, width = TEXT_WIDTH): string[] { const words = text.split(/\s+/).filter(Boolean); const lines: string[] = []; let cur = ''; for (const word of words) { const joined = cur ? cur + ' ' + word : word; - if (m(joined, size, bold) <= TEXT_WIDTH) { cur = joined; continue; } + if (m(joined, size, bold) <= width) { cur = joined; continue; } if (cur) { lines.push(cur); cur = ''; } - if (m(word, size, bold) <= TEXT_WIDTH) { cur = word; continue; } - const pieces = breakWord(word, size, bold, m); + if (m(word, size, bold) <= width) { cur = word; continue; } + const pieces = breakWord(word, size, bold, m, width); cur = pieces.pop() ?? ''; lines.push(...pieces); } @@ -75,7 +76,99 @@ interface Block { size: number; bold: boolean; gray: number; lines: string[] } const LEADING = 1.2; -export function layoutCard(card: CardData, measure: Measure): TextRun[] { +export interface Segment { x1: number; y1: number; x2: number; y2: number; thickness: number; gray: number } +export interface CardLayout { + runs: TextRun[]; + /** The tree's elbow connectors, as thin gray vector lines. */ + connectors: Segment[]; + /** Where the hairline rule between WHERE (call number, tree) and WHAT (title, authors) goes. */ + ruleY: number; +} + +// The hierarchy tree under the call number: one level per line, general at the top, each level indented further. +export const TREE_TOP = 292; +export const TREE_PITCH = 10.5; +const TREE_INDENT = 7; +const TREE_SIZE = 8.5; +const TREE_MIN_SIZE = 7; +const TREE_MAX_LEVELS = 5; +const TREE_MIN_LEVELS = 2; +const TREE_GRAY = 0.35; +const CONNECTOR_GRAY = 0.5; +const RULE_GAP = 8; + +interface Tree { runs: TextRun[]; connectors: Segment[]; ruleY: number } + +/** One level: the largest size down to 7 pt at which it fits on one line; else wrapped (shrunk as needed to fit two lines). */ +function fitLevel(text: string, width: number, bold: boolean, m: Measure): { size: number; lines: string[] } { + for (let size = TREE_SIZE; size >= TREE_MIN_SIZE; size -= 0.5) { + if (m(text, size, bold) <= width) return { size, lines: [text] }; + } + for (let size = TREE_SIZE; size >= TREE_MIN_SIZE; size -= 0.5) { + const lines = wrap(text, size, bold, m, width); + if (lines.length <= 2) return { size, lines }; + } + return { size: TREE_MIN_SIZE, lines: wrap(text, TREE_MIN_SIZE, bold, m, width) }; // never truncated, however long +} + +function layoutTree(levels: string[], m: Measure): Tree { + const runs: TextRun[] = []; + const connectors: Segment[] = []; + let line = 0; // index of the next line slot + let prev: { x: number; lastBaseline: number } | null = null; + const baselineOf = (slot: number) => TREE_TOP - slot * TREE_PITCH - TREE_SIZE * 0.85; + for (const [i, text] of levels.entries()) { + const x = MARGIN_X + TREE_INDENT * i; + const { size, lines } = fitLevel(text, TEXT_WIDTH - TREE_INDENT * i, false, m); + const firstBaseline = baselineOf(line); + lines.forEach((t, k) => { + runs.push({ text: t, x, y: baselineOf(line + k), size, bold: false, gray: TREE_GRAY }); + }); + if (prev) { + // Down from just under the parent's text, then across to the child, at the height of its lower-case letters. + const vx = prev.x + 2.5; + const midY = firstBaseline + 2.4; + connectors.push({ x1: vx, y1: prev.lastBaseline - 2.2, x2: vx, y2: midY, thickness: 0.5, gray: CONNECTOR_GRAY }); + connectors.push({ x1: vx, y1: midY, x2: x - 1.2, y2: midY, thickness: 0.5, gray: CONNECTOR_GRAY }); + } + prev = { x, lastBaseline: baselineOf(line + lines.length - 1) }; + line += lines.length; + } + const ruleY = prev ? prev.lastBaseline - RULE_GAP : RULE_Y; + return { runs, connectors, ruleY }; +} + +/** What goes below the rule, in priority order; each block is dropped whole if it does not fit above the ISBN line. */ +function whatBlocks(card: CardData, measure: Measure): { required: Block[]; publisher: Block | null } { + const required: Block[] = []; + if (card.title.trim()) { + let t = wrapLimited(card.title, 13, true, 3, measure); + let size = 13; + if (t.overflow) { size = 11; t = wrapLimited(card.title, 11, true, 3, measure); } + required.push({ size, bold: true, gray: 0, lines: t.lines }); + } + if (card.authors.length) { + const list = card.authors.length > 3 ? card.authors.slice(0, 3).join(', ') + ' et al.' : card.authors.join(', '); + required.push({ size: 10, bold: false, gray: 0, lines: wrapLimited(list, 10, false, 2, measure).lines }); + } + const pub = [card.publisher, card.year != null ? String(card.year) : null].filter(Boolean).join(', '); + return { required, publisher: pub ? { size: 9, bold: false, gray: 0, lines: [truncate(pub, 9, false, measure)] } : null }; +} + +/** Bottom edge of blocks stacked from `top`. */ +function stackBottom(top: number, blocks: Block[]): number { + let t = top; + for (const b of blocks) t -= b.lines.length * b.size * LEADING + BLOCK_GAP; + return t + BLOCK_GAP; +} + +/** + * Space priority, highest first: the call number; the title and the authors; the tree's last two levels; the tree's + * upper levels (up to 5 in all); the publisher and year. When the title and authors do not fit above the ISBN line, + * the publisher goes first (it only prints if it still fits), then the tree loses levels from its general end, + * down to a minimum of two. + */ +export function layoutCard(card: CardData, measure: Measure): CardLayout { const runs: TextRun[] = []; const cn = parseCallNumber(card.callNumber); const [l1, l2] = cn ? cardLines(cn) : [card.callNumber, '']; @@ -86,34 +179,17 @@ export function layoutCard(card: CardData, measure: Measure): TextRun[] { runs.push({ text: b.text, x: MARGIN_X, y: 300, size: b.size, bold: true, gray: 0 }); } - const blocks: Block[] = []; - const names: string[] = []; - if (card.className) names.push(card.className); - if (card.subclassName && card.subclassName !== card.className) names.push(card.subclassName); - if (names.length) { - blocks.push({ size: 9, bold: false, gray: GRAY, lines: names.map((n) => truncate(n, 9, false, measure)) }); + const all = displayLevels(card.hierarchy).slice(-TREE_MAX_LEVELS); + const { required, publisher } = whatBlocks(card, measure); + let tree = layoutTree(all, measure); + for (let drop = 0; drop <= all.length - TREE_MIN_LEVELS; drop++) { + tree = layoutTree(all.slice(drop), measure); + if (stackBottom(tree.ruleY - 18, required) >= BLOCK_FLOOR) break; } - if (card.title.trim()) { - let t = wrapLimited(card.title, 13, true, 3, measure); - let size = 13; - if (t.overflow) { size = 11; t = wrapLimited(card.title, 11, true, 3, measure); } - blocks.push({ size, bold: true, gray: 0, lines: t.lines }); - } - - if (card.authors.length) { - const list = card.authors.length > 3 ? card.authors.slice(0, 3).join(', ') + ' et al.' : card.authors.join(', '); - blocks.push({ size: 10, bold: false, gray: 0, lines: wrapLimited(list, 10, false, 2, measure).lines }); - } - - const pub = [card.publisher, card.year != null ? String(card.year) : null].filter(Boolean).join(', '); - if (pub) blocks.push({ size: 9, bold: false, gray: 0, lines: [truncate(pub, 9, false, measure)] }); - - for (const s of card.subjects.slice(0, 2)) { - if (s.trim()) blocks.push({ size: 9, bold: false, gray: GRAY, lines: wrapLimited(s, 9, false, 2, measure).lines }); - } - - let top = BLOCK_START; + runs.push(...tree.runs); + const blocks = publisher ? [...required, publisher] : required; + let top = tree.ruleY - 18; for (const b of blocks) { const lh = b.size * LEADING; const bottom = top - b.lines.length * lh; @@ -131,5 +207,5 @@ export function layoutCard(card: CardData, measure: Measure): TextRun[] { const w = measure('~', 12, true); runs.push({ text: '~', x: MARGIN_X + TEXT_WIDTH - w, y: 16, size: 12, bold: true, gray: 0 }); } - return runs; + return { runs, connectors: tree.connectors, ruleY: tree.ruleY }; } diff --git a/src/server/pdf/qr.test.ts b/src/server/pdf/qr.test.ts deleted file mode 100644 index 766db36..0000000 --- a/src/server/pdf/qr.test.ts +++ /dev/null @@ -1,68 +0,0 @@ -import { test, before } from 'node:test'; -import assert from 'node:assert/strict'; -import { readFileSync } from 'node:fs'; -import { createRequire } from 'node:module'; -import { prepareZXingModule, readBarcodes } from 'zxing-wasm/reader'; -import { qrMatrix, qrRects, QR_BOTTOM, QR_SIZE, QR_TOP, QR_X } from './qr.ts'; -import { encodeCardCode, parseCardCode } from '../../shared/cardcode.ts'; -import type { CardCode } from '../../shared/cardcode.ts'; - -const short = 'QA76.73.R87 K53 2018\nThe Rust Programming Language\nSteve Klabnik; Carol Nichols\nISBN 9781718500440\n2018\nbooksorter 1'; - -test('the symbol is 90 pt square, flush left, from y 32 to 122, for any version', () => { - const longest = encodeCardCode({ - callNumber: 'QA76.73.C153 S77 K47 2013', approximate: true, title: 'x'.repeat(200), authors: ['a'.repeat(60)], isbn13: '9781718500440', year: 2018, - }); - for (const payload of [short, longest, 'booksorter 1']) { - const { rects, version } = qrRects(payload); - assert.ok(version >= 1 && version <= 6, `version ${version}`); - const x0 = Math.min(...rects.map(r => r.x)), x1 = Math.max(...rects.map(r => r.x + r.width)); - const y0 = Math.min(...rects.map(r => r.y)), y1 = Math.max(...rects.map(r => r.y + r.height)); - // finder patterns sit in every corner except bottom-right, so all four edges are touched - assert.ok(Math.abs(x0 - QR_X) < 1e-9 && Math.abs(x1 - (QR_X + QR_SIZE)) < 1e-9); - assert.ok(Math.abs(y0 - QR_BOTTOM) < 1e-9 && Math.abs(y1 - QR_TOP) < 1e-9); - assert.equal(QR_X, 14); - } -}); - -test('horizontal runs are merged: rectangles cover exactly the dark modules', () => { - const m = qrMatrix(short), n = m.length, mod = QR_SIZE / n; - const { rects } = qrRects(short); - let dark = 0; - for (const row of m) for (const v of row) if (v) dark++; - const area = rects.reduce((a, r) => a + r.width * r.height, 0); - assert.ok(Math.abs(area - dark * mod * mod) < 1e-6); - assert.ok(rects.length < dark); - for (const r of rects) assert.ok(Math.abs(r.height - mod) < 1e-9); -}); - -// ---- round trip: draw the symbol into pixels and read it back with zxing-wasm ---------------------- -before(async () => { - const wasm = readFileSync(createRequire(import.meta.url).resolve('zxing-wasm/reader').replace(/dist[\\/].*$/, 'dist/reader/zxing_reader.wasm')); - await prepareZXingModule({ overrides: { wasmBinary: wasm.buffer.slice(wasm.byteOffset, wasm.byteOffset + wasm.byteLength) as ArrayBuffer }, fireImmediately: true }); -}); - -function raster(matrix: boolean[][], px = 6, quiet = 4): { data: Uint8ClampedArray; width: number; height: number } { - const n = matrix.length, size = (n + 2 * quiet) * px, data = new Uint8ClampedArray(size * size * 4).fill(255); - for (let r = 0; r < n; r++) for (let c = 0; c < n; c++) { - if (!matrix[r]![c]) continue; - for (let y = 0; y < px; y++) for (let x = 0; x < px; x++) { - const i = (((r + quiet) * px + y) * size + (c + quiet) * px + x) * 4; - data[i] = data[i + 1] = data[i + 2] = 0; - } - } - return { data, width: size, height: size }; -} - -test('a printed symbol with a non-ASCII title reads back to the same payload', async () => { - const card: CardCode = { - callNumber: 'PQ2230.A1 H8 1987', approximate: false, title: 'Les Misérables', - authors: ['Victor Hugo'], isbn13: '9780140444308', year: 1987, - }; - const payload = encodeCardCode(card); - const [hit] = await readBarcodes(raster(qrMatrix(payload)) as ImageData, { formats: ['QRCode'], tryHarder: true }); - assert.ok(hit, 'zxing found no QR code'); - assert.equal(hit.format, 'QRCode'); - assert.equal(hit.text, payload); - assert.deepEqual(parseCardCode(hit.text), card); -}); diff --git a/src/server/pdf/qr.ts b/src/server/pdf/qr.ts deleted file mode 100644 index d851345..0000000 --- a/src/server/pdf/qr.ts +++ /dev/null @@ -1,43 +0,0 @@ -import qrcode from 'qrcode-generator'; - -/** Card-local geometry of the QR symbol (dark-module area, not counting the quiet zone). */ -export const QR_SIZE = 90; -export const QR_X = 14; // flush with the text margin (MARGIN_X in card.ts) -export const QR_BOTTOM = 32; -export const QR_TOP = QR_BOTTOM + QR_SIZE; -/** Nothing else is drawn within this distance of the symbol. */ -export const QR_CLEAR = 9; - -// The payload is UTF-8; the library's default byte encoder is not. -qrcode.stringToBytes = (s: string) => Array.from(new TextEncoder().encode(s)); - -/** Dark modules of the smallest error-level-L byte-mode symbol that holds the payload: matrix[row][col]. */ -export function qrMatrix(payload: string): boolean[][] { - const qr = qrcode(0, 'L'); - qr.addData(payload, 'Byte'); - qr.make(); - const n = qr.getModuleCount(); - return Array.from({ length: n }, (_, r) => Array.from({ length: n }, (_, c) => qr.isDark(r, c))); -} - -export interface Rect { x: number; y: number; width: number; height: number } - -/** - * Filled rectangles (card-local points) for the dark modules, scaled so the symbol is QR_SIZE square. - * Each horizontal run of dark modules is one rectangle, so there are no hairline gaps between neighbours. - */ -export function qrRects(payload: string): { version: number; rects: Rect[] } { - const m = qrMatrix(payload), n = m.length, module = QR_SIZE / n; - const rects: Rect[] = []; - for (let r = 0; r < n; r++) { - let c = 0; - while (c < n) { - if (!m[r]![c]) { c++; continue; } - let end = c; - while (end < n && m[r]![end]) end++; - rects.push({ x: QR_X + c * module, y: QR_TOP - (r + 1) * module, width: (end - c) * module, height: module }); - c = end; - } - } - return { version: (n - 17) / 4, rects }; -} diff --git a/src/server/pdf/render.test.ts b/src/server/pdf/render.test.ts index ab4725d..ff4fe2c 100644 --- a/src/server/pdf/render.test.ts +++ b/src/server/pdf/render.test.ts @@ -6,7 +6,7 @@ import type { CardData } from '../../shared/types.ts'; const zero = { offsetXmm: 0, offsetYmm: 0 }; const card: CardData = { - callNumber: 'QA76.73.R87 K53 2018', className: 'Science', subclassName: 'Mathematics', + callNumber: 'QA76.73.R87 K53 2018', hierarchy: { outline: ['Science', 'Mathematics'], tail: [] }, title: 'The Rust Programming Language', authors: ['Steve Klabnik'], publisher: 'No Starch Press', year: 2018, subjects: [], isbn13: null, approximate: false, }; diff --git a/src/server/pdf/render.ts b/src/server/pdf/render.ts index bb1a5bd..2074376 100644 --- a/src/server/pdf/render.ts +++ b/src/server/pdf/render.ts @@ -5,10 +5,8 @@ import { PDFDocument, rgb, pushGraphicsState, popGraphicsState, concatTransforma import type { PDFFont, PDFPage } from 'pdf-lib'; import fontkit from '@pdf-lib/fontkit'; import type { CardData, Settings } from '../../shared/types.ts'; -import { layoutCard, MARGIN_X, TEXT_WIDTH, RULE_Y } from './card.ts'; +import { layoutCard, MARGIN_X, TEXT_WIDTH } from './card.ts'; import { SHEET, CARD, cardMatrix } from './layout.ts'; -import { qrRects } from './qr.ts'; -import { encodeCardCode } from '../../shared/cardcode.ts'; interface Fonts { regular: PDFFont; bold: PDFFont; has: (cp: number) => boolean } @@ -46,7 +44,8 @@ function cleanCard(c: CardData, f: Fonts): CardData { const n = (s: string | null) => (s == null ? null : clean(s, f)); return { ...c, - callNumber: clean(c.callNumber, f), className: n(c.className), subclassName: n(c.subclassName), + callNumber: clean(c.callNumber, f), + hierarchy: { outline: c.hierarchy.outline.map((x) => clean(x, f)), tail: c.hierarchy.tail.map((x) => clean(x, f)) }, title: clean(c.title, f), authors: c.authors.map((s) => clean(s, f)), publisher: n(c.publisher), subjects: c.subjects.map((s) => clean(s, f)), isbn13: n(c.isbn13), }; @@ -61,19 +60,17 @@ function inCardSpace(page: PDFPage, m: ReturnType, draw: () = function drawCard(page: PDFPage, card: CardData, fonts: Fonts) { const measure = (t: string, size: number, bold: boolean) => (bold ? fonts.bold : fonts.regular).widthOfTextAtSize(clean(t, fonts), size); - for (const r of layoutCard(cleanCard(card, fonts), measure)) { + const layout = layoutCard(cleanCard(card, fonts), measure); + for (const r of layout.runs) { page.drawText(clean(r.text, fonts), { x: r.x, y: r.y, size: r.size, font: r.bold ? fonts.bold : fonts.regular, color: rgb(r.gray, r.gray, r.gray), }); } - // The payload carries the real text, not the font-safe copy the card text is drawn from. - const payload = encodeCardCode({ - callNumber: card.callNumber, approximate: card.approximate, title: card.title, - authors: card.authors, isbn13: card.isbn13, year: card.year, - }); - for (const r of qrRects(payload).rects) page.drawRectangle({ ...r, color: rgb(0, 0, 0), borderWidth: 0 }); + for (const c of layout.connectors) { + page.drawLine({ start: { x: c.x1, y: c.y1 }, end: { x: c.x2, y: c.y2 }, thickness: c.thickness, color: rgb(c.gray, c.gray, c.gray) }); + } page.drawLine({ - start: { x: MARGIN_X, y: RULE_Y }, end: { x: MARGIN_X + TEXT_WIDTH, y: RULE_Y }, + start: { x: MARGIN_X, y: layout.ruleY }, end: { x: MARGIN_X + TEXT_WIDTH, y: layout.ruleY }, thickness: 0.75, color: rgb(0, 0, 0), }); } diff --git a/src/server/resolve/match.test.ts b/src/server/resolve/match.test.ts index 7275f0f..9567754 100644 --- a/src/server/resolve/match.test.ts +++ b/src/server/resolve/match.test.ts @@ -3,7 +3,7 @@ import assert from 'node:assert/strict'; import { normalizeTitle, recordMatches, titlesMatch } from './match.ts'; import type { MarcFields } from '../sources/marc.ts'; -const rec = (title: string, names: string[]): MarcFields => ({ lccn: null, lcc: [], dewey: null, meta: { title, authors: [], subjects: [] }, names, topics: [], isbns: [] }); +const rec = (title: string, names: string[]): MarcFields => ({ lccn: null, lcc: [], dewey: null, meta: { title, authors: [], subjects: [] }, names, topics: [], isbns: [], subjectTail: [] }); test('normalizeTitle', () => { assert.equal(normalizeTitle('The Mythical Man-Month: Essays on Software'), 'mythical man month'); diff --git a/src/server/resolve/resolver.test.ts b/src/server/resolve/resolver.test.ts index bd4df87..e46dac9 100644 --- a/src/server/resolve/resolver.test.ts +++ b/src/server/resolve/resolver.test.ts @@ -436,3 +436,12 @@ test('an LCCN from the LoC ISBN record\'s own 010 is reported', async () => { const res = await createResolver({ fetch: f.fetch, cache: memCache(), sleep: noSleep }).resolve({ isbn13: SIERRA_SOUTH }); assert.equal(res.meta?.lccn, '2020947927'); }); + +test('tail: the LoC record\'s first LCSH heading, from lookup and from the tail-only call alike', async () => { + const f = fixtureFetch(); + const r = createResolver({ fetch: f.fetch, cache: memCache(), sleep: noSleep }); + const res = await r.resolve({ isbn13: '9781593278281' }); + assert.ok(res.tail && res.tail.length > 0, 'a heading was found'); + assert.deepEqual(await r.tail({ isbn13: '9781593278281' }), res.tail); + assert.deepEqual(await r.tail({ isbn13: '9780999999998' }), []); // no record at all: looked, none +}); diff --git a/src/server/resolve/resolver.ts b/src/server/resolve/resolver.ts index 4c02c34..9646713 100644 --- a/src/server/resolve/resolver.ts +++ b/src/server/resolve/resolver.ts @@ -29,6 +29,13 @@ export interface ResolveOpts { export interface Resolver { resolve(input: ResolveInput, opts?: ResolveOpts): Promise; search(title: string, author: string): Promise; + /** + * Only the hierarchy tail of a book already in the library: the subject heading of its Library of Congress record + * (this edition's by ISBN, then by LCCN; with `viaTitle`, the title match the lookup itself would have used). + * Uses the same rate limit and cache as a lookup. [] when there is no record or no usable heading; + * throws TemporaryError when the catalogue cannot be asked. + */ + tail(input: { isbn13?: string; lccn?: string; title?: string; author?: string; viaTitle?: boolean }): Promise; } type Partials = (Partial | null | undefined)[]; @@ -247,20 +254,43 @@ export function createResolver(deps: { const dewey = locRecs.map((r) => r.dewey).find(Boolean) ?? edition?.dewey ?? work?.dewey ?? locTitleRecs.map((r) => r.dewey).find(Boolean) ?? null; + // The tail comes from this edition's record, else the title-matched record. A number borrowed from similar + // books carries none. When the catalogue could not be asked it stays unknown (null) and is looked for later. + const tail: string[] | null = chosen?.source === 'similar' ? [] + : locRecs[0] ? locRecs[0].subjectTail + : locTitleRecs[0] ? locTitleRecs[0].subjectTail + : locError ? null : []; + if (chosen) { return { meta, callNumber: chosen.callNumber, sortKey: chosen.sortKey, - confidence: chosen.confidence, source: chosen.source, dewey, reason: null, + confidence: chosen.confidence, source: chosen.source, dewey, tail, reason: null, }; } // Open Library had nothing and the LoC could not be asked: report that, not "no number found". if (locError) throw locError; if (olError) throw olError; return { - meta, callNumber: null, sortKey: null, confidence: null, source: null, dewey, + meta, callNumber: null, sortKey: null, confidence: null, source: null, dewey, tail, reason: meta ? 'No Library of Congress number found' : 'Not found in Open Library or the Library of Congress', }; } - return { resolve, search: (title, author) => ol.search(title, author) }; + async function tail(input: { isbn13?: string; lccn?: string; title?: string; author?: string; viaTitle?: boolean }): Promise { + const isbn = input.isbn13 ? (normalizeIsbn(input.isbn13) ?? input.isbn13) : undefined; + let mine: MarcFields[] = []; + if (isbn) mine = await loc.byIsbn(isbn); + if (mine.length === 0 && input.lccn) { + // Same edition only if the book has no ISBN or the record lists this ISBN. + mine = (await loc.byLccn(input.lccn)).filter((r) => !isbn || r.isbns.includes(isbn)); + } + if (mine[0]) return mine[0].subjectTail; + if (input.viaTitle && input.title && input.author) { + const found = (await loc.byTitle(input.title, input.author)).filter((r) => recordMatches(r, input.title!, input.author!)); + if (found[0]) return found[0].subjectTail; + } + return []; + } + + return { resolve, tail, search: (title, author) => ol.search(title, author) }; } diff --git a/src/server/sources/marc.test.ts b/src/server/sources/marc.test.ts index 15a065b..aa918da 100644 --- a/src/server/sources/marc.test.ts +++ b/src/server/sources/marc.test.ts @@ -83,3 +83,30 @@ test('020 ISBNs are read as ISBN-13, ISBN-10 converted, qualifiers dropped, junk assert.deepEqual(parseMarcXml(xml(['0201835959 (pbk.)', '9780201835953', 'not an isbn']))[0]!.isbns, ['9780201835953']); assert.deepEqual(parseMarcXml('x')[0]!.isbns, []); }); + +const rec = (fields: string) => + parseMarcXml(`${fields}`)[0]!; +const f = (tag: string, ind2: string, subs: [string, string][]) => + `${subs.map(([c, v]) => `${v}`).join('')}`; + +test('subject tail: the $z chain of the first 650 that has one, without $v and full stops', () => { + const r = rec( + f('650', '0', [['a', 'Canyoneering'], ['z', 'Utah'], ['z', 'Grand Staircase-Escalante National Monument'], ['v', 'Guidebooks.']]) + + f('651', '0', [['a', 'Grand Staircase-Escalante National Monument (Utah)'], ['v', 'Guidebooks.']])); + assert.deepEqual(r.subjectTail, ['Utah', 'Grand Staircase-Escalante National Monument']); + assert.deepEqual(rec(f('650', '0', [['a', 'Canyoneering'], ['z', 'Utah.'], ['v', 'Guidebooks.']])).subjectTail, ['Utah']); +}); + +test('subject tail: a 650 with $z wins over an earlier one without; else the first 650 $a; else the first 651 $a', () => { + const both = rec(f('650', '0', [['a', 'Hiking.']]) + f('650', '0', [['a', 'Trails'], ['z', 'Utah.']])); + assert.deepEqual(both.subjectTail, ['Utah']); + const topical = rec(f('650', '0', [['a', 'Rust (Computer program language)'], ['v', 'Handbooks.']]) + f('650', '0', [['a', 'Programming.']])); + assert.deepEqual(topical.subjectTail, ['Rust (Computer program language)']); + assert.deepEqual(rec(f('651', '0', [['a', 'Uinta Mountains (Utah and Wyo.)']])).subjectTail, ['Uinta Mountains (Utah and Wyo.)']); +}); + +test('subject tail: other thesauri are ignored, and no heading gives an empty tail', () => { + const fast = rec(f('650', '7', [['a', 'Hiking'], ['z', 'Utah']]) + f('650', '6', [['a', 'Randonnee'], ['z', 'Utah']])); + assert.deepEqual(fast.subjectTail, []); + assert.deepEqual(rec(f('245', '0', [['a', 'Title']])).subjectTail, []); +}); diff --git a/src/server/sources/marc.ts b/src/server/sources/marc.ts index 556f842..4523d80 100644 --- a/src/server/sources/marc.ts +++ b/src/server/sources/marc.ts @@ -14,6 +14,8 @@ export interface MarcFields { topics: string[]; /** The ISBNs the record lists (020 $a), as ISBN-13: an ISBN-10 is converted, the "(pbk.)" qualifier dropped. */ isbns: string[]; + /** Place words for the card's hierarchy, from the first usable Library of Congress subject heading; see subjectTail(). */ + subjectTail: string[]; } type Node = Record; @@ -86,6 +88,26 @@ export function displayName(name: string): string { return [forenames, surname, ...suffix].join(' '); } +/** A heading without its closing ISBD full stop: "Utah." -> "Utah". */ +const noStop = (s: string) => s.trim().replace(/\.+$/, '').trim(); + +/** + * The tail of a call number's hierarchy, from the record's subject headings (LCSH only: second indicator 0). + * The geographic subdivisions ($z, in order) of the first 650 that has any; else the $a of the first 650; else the + * $a of the first 651. Form subdivisions ($v) and $x are not part of it. + */ +function subjectTail(fields: Field[]): string[] { + const lcsh = (tag: string) => fields.filter((f) => f.tag === tag && f.ind2 === '0'); + const f650 = lcsh('650'); + const withZ = f650.find((f) => f.subs.some((s) => s.code === 'z' && s.value)); + if (withZ) return withZ.subs.filter((s) => s.code === 'z' && s.value).map((s) => noStop(s.value)).filter(Boolean); + for (const f of [...f650, ...lcsh('651')]) { + const a = noStop(sub(f, 'a')); + if (a) return [a]; + } + return []; +} + export function parseMarcRecord(rec: Node): MarcFields { const fields = fieldsOf(rec); const all = (tag: string) => fields.filter((f) => f.tag === tag); @@ -131,7 +153,7 @@ export function parseMarcRecord(rec: Node): MarcFields { if (ym) meta.year = Number(ym[1]); if (lccn) meta.lccn = lccn; const isbns = uniq(all('020').flatMap((f) => f.subs.filter((x) => x.code === 'a').map((x) => normalizeIsbn(x.value.split(/\s/)[0] ?? '')).filter((x): x is string => x !== null))); - return { lccn, lcc, dewey, meta, names, topics, isbns }; + return { lccn, lcc, dewey, meta, names, topics, isbns, subjectTail: subjectTail(fields) }; } /** Parse every MARC record in an SRU response or a bare LCCN permalink record. */ diff --git a/src/shared/cardcode.test.ts b/src/shared/cardcode.test.ts deleted file mode 100644 index be2fac1..0000000 --- a/src/shared/cardcode.test.ts +++ /dev/null @@ -1,58 +0,0 @@ -import { test } from 'node:test'; -import assert from 'node:assert/strict'; -import { encodeCardCode, parseCardCode } from './cardcode.ts'; -import type { CardCode } from './cardcode.ts'; - -const rust: CardCode = { - callNumber: 'QA76.73.R87 K53 2018', approximate: false, title: 'The Rust Programming Language', - authors: ['Steve Klabnik', 'Carol Nichols', 'Third Person'], isbn13: '9781718500440', year: 2018, -}; -const bytes = (s: string) => new TextEncoder().encode(s).length; - -test('encodes the documented layout', () => { - assert.equal( - encodeCardCode(rust), - 'QA76.73.R87 K53 2018\nThe Rust Programming Language\nSteve Klabnik; Carol Nichols\nISBN 9781718500440\n2018\nbooksorter 1', - ); -}); - -test('optional lines are left out, the authors line stays; approximate adds a tilde', () => { - assert.equal( - encodeCardCode({ ...rust, authors: [], isbn13: null, year: null, approximate: true }), - 'QA76.73.R87 K53 2018 ~\nThe Rust Programming Language\n\nbooksorter 1', - ); -}); - -test('round trip', () => { - assert.deepEqual(parseCardCode(encodeCardCode(rust)), { ...rust, authors: ['Steve Klabnik', 'Carol Nichols'] }); - const bare = { ...rust, authors: [], isbn13: null, year: null, approximate: true }; - assert.deepEqual(parseCardCode(encodeCardCode(bare)), bare); -}); - -test('long text is cut to 130 bytes, authors first to 40 bytes, with an ellipsis', () => { - const c = { ...rust, title: 'A very long title '.repeat(12), authors: ['Alexandrina Victoria Hanover-Windsor', 'Bartholomew Montgomery Fitzgerald'] }; - const text = encodeCardCode(c); - assert.ok(bytes(text) <= 130, String(bytes(text))); - const lines = text.split('\n'); - assert.ok(bytes(lines[2]!) <= 40 && lines[2]!.endsWith('…')); - assert.ok(lines[1]!.endsWith('…')); - assert.equal(lines[0], rust.callNumber); - assert.equal(lines.at(-1), 'booksorter 1'); - assert.ok(lines.includes('ISBN 9781718500440') && lines.includes('2018')); -}); - -test('multi-byte characters are never split', () => { - const c = { ...rust, title: 'é'.repeat(100), authors: ['日本語の著者'.repeat(10)] }; - const text = encodeCardCode(c); - assert.ok(bytes(text) <= 130); - assert.ok(!text.includes('�')); - assert.equal(parseCardCode(text)?.callNumber, rust.callNumber); -}); - -test('parse ignores other codes and tolerates CRLF, trailing spaces and unknown lines', () => { - assert.equal(parseCardCode('https://example.com/book'), null); - assert.equal(parseCardCode('QA76.73.R87 K53 2018\nTitle\nA\nsomething else'), null); - assert.equal(parseCardCode('not a call number\nTitle\nA\nbooksorter 1'), null); - const p = parseCardCode('QA76.73.R87 K53 2018 ~ \r\nTitle \r\nA; B\r\n2018\r\nfuture: thing\r\nISBN 9781718500440\r\nbooksorter 2 \r\n'); - assert.deepEqual(p, { callNumber: 'QA76.73.R87 K53 2018', approximate: true, title: 'Title', authors: ['A', 'B'], isbn13: '9781718500440', year: 2018 }); -}); diff --git a/src/shared/cardcode.ts b/src/shared/cardcode.ts deleted file mode 100644 index 4e8b11b..0000000 --- a/src/shared/cardcode.ts +++ /dev/null @@ -1,68 +0,0 @@ -import { parseCallNumber } from './callnumber.ts'; - -/** What the QR code on a printed card says. See README: plain text, one fact per line. */ -export interface CardCode { - callNumber: string; approximate: boolean; title: string; authors: string[]; - isbn13: string | null; year: number | null; -} - -export const MARKER_NAME = 'booksorter'; -export const MARKER = `${MARKER_NAME} 1`; -export const MAX_BYTES = 130; -export const MAX_AUTHOR_BYTES = 40; -const ELLIPSIS = '…'; - -const encoder = new TextEncoder(); -const byteLength = (s: string): number => encoder.encode(s).length; -const oneLine = (s: string): string => s.replace(/\s+/g, ' ').trim(); - -/** Shorten to at most `max` UTF-8 bytes, ending in an ellipsis when something was cut. Never splits a character. */ -function fit(s: string, max: number): string { - if (byteLength(s) <= max) return s; - const chars = Array.from(s); - while (chars.length > 0) { - chars.pop(); - const t = chars.join('').trimEnd() + ELLIPSIS; - if (byteLength(t) <= max) return t; - } - return max >= byteLength(ELLIPSIS) ? ELLIPSIS : ''; -} - -export function encodeCardCode(c: CardCode): string { - const callNumber = oneLine(c.callNumber) + (c.approximate ? ' ~' : ''); - const tail: string[] = []; - if (c.isbn13) tail.push(`ISBN ${c.isbn13}`); - if (c.year != null) tail.push(String(c.year)); - tail.push(MARKER); - let authors = oneLine(c.authors.slice(0, 2).join('; ')); - let title = oneLine(c.title); - const build = () => [callNumber, title, authors, ...tail].join('\n'); - if (byteLength(build()) > MAX_BYTES) { - authors = fit(authors, MAX_AUTHOR_BYTES); - title = ''; - const room = MAX_BYTES - byteLength(build()); - title = fit(oneLine(c.title), Math.max(0, room)); - } - return build(); -} - -/** Returns null for anything that is not a Booksorter card (other QR codes on a book, for example). */ -export function parseCardCode(text: string): CardCode | null { - const lines = text.split(/\r?\n/).map((l) => l.trimEnd()); - while (lines.length > 0 && lines[lines.length - 1]!.trim() === '') lines.pop(); - if (lines.length < 4) return null; - if (!/^booksorter \d+$/.test(lines[lines.length - 1]!.trim())) return null; - let callNumber = lines[0]!.trim(); - let approximate = false; - if (callNumber.endsWith(' ~')) { approximate = true; callNumber = callNumber.slice(0, -2).trim(); } - if (!callNumber || !parseCallNumber(callNumber)) return null; - const authors = lines[2]!.split(';').map((a) => a.trim()).filter(Boolean); - let isbn13: string | null = null, year: number | null = null; - for (const line of lines.slice(3, -1)) { - const t = line.trim(); - const isbn = /^ISBN (\d{13})$/.exec(t); - if (isbn) { isbn13 = isbn[1]!; continue; } - if (/^\d{4}$/.test(t)) year = Number(t); - } - return { callNumber, approximate, title: lines[1]!.trim(), authors, isbn13, year }; -} diff --git a/src/shared/hierarchy.ts b/src/shared/hierarchy.ts new file mode 100644 index 0000000..00c56c9 --- /dev/null +++ b/src/shared/hierarchy.ts @@ -0,0 +1,7 @@ +import type { Hierarchy } from './types.ts'; + +/** The levels worth showing, general to specific: from the subclass down (the main class only when nothing else is known). */ +export function displayLevels(h: Hierarchy): string[] { + const outline = h.outline.length > 1 ? h.outline.slice(1) : h.outline; + return [...outline, ...h.tail].filter((l, i, a) => l.trim() && l !== a[i - 1]); +} diff --git a/src/shared/types.ts b/src/shared/types.ts index dc06993..3ef3234 100644 --- a/src/shared/types.ts +++ b/src/shared/types.ts @@ -1,6 +1,6 @@ export type Confidence = 'exact' | 'approximate' | 'manual'; export type Status = 'pending' | 'resolved' | 'needs_attention'; -export type Source = 'loc-isbn' | 'loc-lccn' | 'ol-edition' | 'loc-title' | 'ol-work' | 'similar' | 'manual' | 'card'; +export type Source = 'loc-isbn' | 'loc-lccn' | 'ol-edition' | 'loc-title' | 'ol-work' | 'similar' | 'manual'; export interface Book { id: number; isbn13: string | null; lccn: string | null; title: string; subtitle: string | null; authors: string[]; @@ -9,7 +9,11 @@ export interface Book { confidence: Confidence | null; source: Source | null; dewey: string | null; status: Status; attentionReason: string | null; manualOverride: boolean; inQueue: boolean; printedAt: string | null; createdAt: string; updatedAt: string; + /** Place words from the catalogue record's subject heading. null: not looked for yet; []: looked, none. */ + hierarchyTail: string[] | null; } +/** A call number explained in plain words: `outline` from the LC outline (main class first), `tail` from the record's subject. */ +export interface Hierarchy { outline: string[]; tail: string[] } export interface BookMeta { title: string; subtitle?: string; authors: string[]; publisher?: string; year?: number; subjects: string[]; lccn?: string; @@ -25,10 +29,12 @@ export interface Resolution { callNumber: string | null; sortKey: string | null; confidence: 'exact' | 'approximate' | null; source: Source | null; dewey: string | null; + /** The tail for this book; null when the catalogue could not be asked (so it is looked for again later). */ + tail?: string[] | null; reason: string | null; // set when callNumber is null } export interface CardData { - callNumber: string; className: string | null; subclassName: string | null; + callNumber: string; hierarchy: Hierarchy; title: string; authors: string[]; publisher: string | null; year: number | null; subjects: string[]; isbn13: string | null; approximate: boolean; } diff --git a/src/web/actions.ts b/src/web/actions.ts index aa66f4b..ea6efdc 100644 --- a/src/web/actions.ts +++ b/src/web/actions.ts @@ -2,7 +2,7 @@ import type { Book, SearchResult } from '../shared/types.ts'; import { api } from './api.ts'; import { setLastScan, upsertBook } from './live.ts'; import { beepLow } from './sound.ts'; -import { showError, showToast } from './toast-store.ts'; +import { showError } from './toast-store.ts'; /** ISBNs with a request in flight: one ISBN is never sent twice at the same time. */ const inflight = new Map>(); @@ -41,33 +41,3 @@ export async function addFromResult(r: SearchResult): Promise { try { added(await api.fromSearch(r)); return true; } catch (e) { beepLow(); showError(`Could not add "${r.title}": ${(e as Error).message}`); return false; } } - -/** Card texts with a request in flight: one card is never sent twice at the same time. */ -const cardsInflight = new Map>(); - -/** - * A card's QR code was read: find or add the book it describes. Nothing changes on the Scan screen except a - * toast; for a book already in the library the toast can open it in the editor. - */ -export function addFromCard(text: string, open: (id: number) => void): Promise { - let p = cardsInflight.get(text); - if (!p) { - p = (async () => { - try { - const r = await api.fromCard(text); - upsertBook(r.book); - if (r.existed) { - showToast(`Already in your library: ${r.book.title}`, { action: { label: 'Open', run: () => open(r.book.id) } }); - } else { - showToast(`Added from its card: ${r.book.title}`); - } - } catch (e) { - beepLow(); - showError(`Could not use that card: ${(e as Error).message}`); - } - })(); - cardsInflight.set(text, p); - void p.finally(() => cardsInflight.delete(text)); - } - return p; -} diff --git a/src/web/api.ts b/src/web/api.ts index 3c5db8d..c519342 100644 --- a/src/web/api.ts +++ b/src/web/api.ts @@ -1,4 +1,4 @@ -import type { Book, SearchResult, Settings } from '../shared/types.ts'; +import type { Book, Hierarchy, SearchResult, Settings } from '../shared/types.ts'; export class ApiError extends Error {} @@ -34,7 +34,6 @@ export interface BookPatch { title?: string; authors?: string[]; publisher?: str export const api = { scan: (isbn: string) => request<{ book: Book; duplicate: boolean }>('POST', '/api/scan', { isbn }), - fromCard: (text: string) => request<{ book: Book; existed: boolean }>('POST', '/api/books/from-card', { text }), addLccn: async (lccn: string) => toBook(await request('POST', '/api/books/lccn', { lccn })), search: (title: string, author: string) => request('GET', `/api/search?title=${encodeURIComponent(title)}&author=${encodeURIComponent(author)}`), @@ -42,6 +41,7 @@ export const api = { addManual: async (input: ManualInput) => toBook(await request('POST', '/api/books/manual', input)), listBooks: (filter: 'all' | 'queue' | 'attention' = 'all', q = '') => request('GET', `/api/books?filter=${filter}&q=${encodeURIComponent(q)}`), + hierarchy: (id: number) => request('GET', `/api/books/${id}/hierarchy`), patchBook: async (id: number, patch: BookPatch) => toBook(await request('PATCH', `/api/books/${id}`, patch)), deleteBook: (id: number) => request('DELETE', `/api/books/${id}`), /** Fire and forget while the page is closing. */ diff --git a/src/web/bookstate.test.ts b/src/web/bookstate.test.ts index d0f6b49..dfec16d 100644 --- a/src/web/bookstate.test.ts +++ b/src/web/bookstate.test.ts @@ -8,7 +8,7 @@ function book(id: number, over: Partial): Book { id, isbn13: null, lccn: null, title: 'T' + id, subtitle: null, authors: [], publisher: null, year: null, subjects: [], callNumber: null, sortKey: null, confidence: null, source: null, dewey: null, status: 'pending', attentionReason: null, manualOverride: false, inQueue: true, - printedAt: null, createdAt: `2026-01-01T00:00:0${id}Z`, updatedAt: '', ...over, + printedAt: null, hierarchyTail: null, createdAt: `2026-01-01T00:00:0${id}Z`, updatedAt: '', ...over, }; } const ready = (id: number, over: Partial = {}) => book(id, { status: 'resolved', callNumber: 'QA76.73 .R87 K53 2018', sortKey: 'k' + id, ...over }); diff --git a/src/web/components/CallNo.tsx b/src/web/components/CallNo.tsx index cedde75..dbfa328 100644 --- a/src/web/components/CallNo.tsx +++ b/src/web/components/CallNo.tsx @@ -2,12 +2,11 @@ import { cardLines, parseCallNumber } from '../../shared/callnumber.ts'; export const APPROX_TIP = 'Number borrowed from another edition'; export const SIMILAR_TIP = 'Number borrowed from similar books'; -export const CARD_TIP = 'Number read from its card, marked approximate there'; /** A call number in two monospaced lines, the way it is printed on the card. `~` marks an approximate one. */ export function CallNo({ value, approximate, source, large }: { value: string | null; approximate?: boolean; source?: string | null; large?: boolean }) { const similar = source === 'similar'; - const tip = similar ? SIMILAR_TIP : source === 'card' ? CARD_TIP : APPROX_TIP; + const tip = similar ? SIMILAR_TIP : APPROX_TIP; const cls = 'callno' + (large ? ' callno-large' : ''); if (!value) return –; const cn = parseCallNumber(value); diff --git a/src/web/components/Editor.tsx b/src/web/components/Editor.tsx index 8973a59..6802e84 100644 --- a/src/web/components/Editor.tsx +++ b/src/web/components/Editor.tsx @@ -11,6 +11,7 @@ import { Panel } from './Panel.tsx'; import { moveActive, ResultList } from './Results.tsx'; import { Spinner } from './StateMark.tsx'; import { composeNumber, findNeighbours } from '../shelve.ts'; +import { displayLevels } from '../../shared/hierarchy.ts'; /** `new` may carry what was typed in the entry box. */ export type EditorTarget = { kind: 'edit'; id: number } | { kind: 'new'; title?: string; authors?: string }; @@ -48,6 +49,15 @@ function EditorForm({ book, fixing, initial, onClose }: { const [busy, setBusy] = useState(false); const [confirming, setConfirming] = useState(false); + // Where the call number sits in the classification, in words (from the server, which holds the outline). + const [levels, setLevels] = useState([]); + useEffect(() => { + if (!book) return; + let current = true; + api.hierarchy(book.id).then(h => { if (current) setLevels(displayLevels(h)); }, () => {}); + return () => { current = false; }; + }, [book?.id, book?.callNumber, book?.hierarchyTail]); + async function run(fn: () => Promise) { setBusy(true); setError(''); try { await fn(); } catch (e) { setError((e as Error).message); } @@ -123,6 +133,13 @@ function EditorForm({ book, fixing, initial, onClose }: { setCallNumber(e.currentTarget.value)} /> {book ? 'Changing this locks the number' : 'Optional. Leave it empty to have it looked up.'} + {book && levels.length ? ( +

+ {levels.map((l, i) => i === levels.length - 1 + ? {l} + : {l} )} +

+ ) : null} composeNumber(neighbour, splitAuthors(authors), title, yearValue(year))} onChoose={setCallNumber} /> {error ? : null} diff --git a/src/web/decode.test.ts b/src/web/decode.test.ts index c241bfe..23d0544 100644 --- a/src/web/decode.test.ts +++ b/src/web/decode.test.ts @@ -118,34 +118,3 @@ test('decodeLive and decodeThorough return the ISBN of a readable frame', async assert.equal(live.out.isbn, CODE); assert.equal((await decodeThorough(p, null)).isbn, CODE); }); - -// --- QR codes on cards ---------------------------------------------------------------------------------- -import { qrMatrix } from '../server/pdf/qr.ts'; -import { encodeCardCode } from '../shared/cardcode.ts'; - -function qrPixels(text: string, px: number): Pixels { - const m = qrMatrix(text), q = 4, size = (m.length + 2 * q) * px, data = new Uint8ClampedArray(size * size * 4).fill(255); - for (let r = 0; r < m.length; r++) for (let c = 0; c < m.length; c++) { - if (!m[r]![c]) continue; - for (let y = 0; y < px; y++) for (let x = 0; x < px; x++) { - const i = (((r + q) * px + y) * size + (c + q) * px + x) * 4; - data[i] = data[i + 1] = data[i + 2] = 0; - } - } - return { data, width: size, height: size }; -} - -const CARD_TEXT = encodeCardCode({ callNumber: 'QA76.73.R87 K53 2018', approximate: false, title: 'Les Misérables', authors: ['Victor Hugo'], isbn13: null, year: null }); - -test('a card QR code is read live and by the Capture burst', async () => { - const p = qrPixels(CARD_TEXT, 4); - assert.equal((await decodeLive(p, newLiveState())).out.card, CARD_TEXT); - assert.equal((await decodeThorough(p, null)).card, CARD_TEXT); -}); - -test('a QR code that is not a card is ignored without a trace', async () => { - const p = qrPixels('https://example.com/some/book', 4); - const live = (await decodeLive(p, newLiveState())).out; - assert.deepEqual(live, { isbn: null, other: null, card: null }); - assert.deepEqual(await decodeThorough(p, null), { isbn: null, other: null, card: null }); -}); diff --git a/src/web/decode.ts b/src/web/decode.ts index 7bf3191..9fbdac1 100644 --- a/src/web/decode.ts +++ b/src/web/decode.ts @@ -1,12 +1,10 @@ import { readBarcodes } from 'zxing-wasm/reader'; import type { ReaderOptions } from 'zxing-wasm/reader'; import { normalizeIsbn } from '../shared/isbn.ts'; -import { parseCardCode } from '../shared/cardcode.ts'; /** RGBA pixels, as from ImageData. Plain data so that this module runs in Node tests. */ export interface Pixels { data: Uint8ClampedArray | Uint8Array; width: number; height: number } -/** `card` is the text of a Booksorter card's QR code; QR codes that are not cards are dropped without a trace. */ -export interface DecodeOutcome { isbn: string | null; other: string | null; card: string | null } +export interface DecodeOutcome { isbn: string | null; other: string | null } // ---- image operations (grey, one byte per pixel) ------------------------------------------------------- @@ -88,12 +86,6 @@ export const BASE: ReaderOptions = { formats: ['EAN13', 'UPCA'], tryHarder: true, tryDownscale: true, tryRotate: false, tryInvert: false, maxNumberOfSymbols: 2, }; -/** - * QR codes are looked for only on the variants that keep 2D detail (plain and enlarged); the row-averaged ones - * smear a QR code to nothing and stay EAN-only, so their speed and reliability are as before. - */ -const WITH_QR: ReaderOptions = { ...BASE, formats: ['EAN13', 'UPCA', 'QRCode'] }; - export interface Variant { name: string; opts: ReaderOptions; prep: (g: Grey) => Grey } const rowSmooth = (g: Grey) => upscale(rowAverage(g, 6), 2); @@ -105,19 +97,18 @@ const rowSmooth = (g: Grey) => upscale(rowAverage(g, 6), 2); export const VARIANTS: Variant[] = [ { name: 'rows+sharp2x', opts: { ...BASE, binarizer: 'LocalAverage' }, prep: g => sharpenAcross(rowSmooth(g), 3, 1.2) }, { name: 'rows2x', opts: { ...BASE, binarizer: 'GlobalHistogram' }, prep: rowSmooth }, - { name: 'crop', opts: { ...WITH_QR, binarizer: 'LocalAverage' }, prep: g => g }, - { name: 'up2x', opts: { ...WITH_QR, binarizer: 'GlobalHistogram' }, prep: g => upscale(g, 2) }, - { name: 'up3x', opts: { ...WITH_QR, binarizer: 'LocalAverage' }, prep: g => upscale(g, 3) }, + { name: 'crop', opts: { ...BASE, binarizer: 'LocalAverage' }, prep: g => g }, + { name: 'up2x', opts: { ...BASE, binarizer: 'GlobalHistogram' }, prep: g => upscale(g, 2) }, + { name: 'up3x', opts: { ...BASE, binarizer: 'LocalAverage' }, prep: g => upscale(g, 3) }, ]; /** For the whole frame, which is too big to enlarge: no upscaling. */ export const WHOLE_VARIANTS: Variant[] = [ - { name: 'whole', opts: { ...WITH_QR, binarizer: 'LocalAverage' }, prep: g => g }, + { name: 'whole', opts: { ...BASE, binarizer: 'LocalAverage' }, prep: g => g }, { name: 'whole-rows', opts: { ...BASE, binarizer: 'GlobalHistogram' }, prep: g => sharpenAcross(rowAverage(g, 6), 1, 1) }, ]; -function judge(codes: { text: string; format?: string }[], into: DecodeOutcome): void { +function judge(codes: { text: string }[], into: DecodeOutcome): void { for (const c of codes) { - if (c.format === 'QRCode') { if (parseCardCode(c.text)) into.card ??= c.text; continue; } const isbn = /^\d{13}$/.test(c.text) ? normalizeIsbn(c.text) : null; if (isbn) into.isbn ??= isbn; else into.other ??= c.text; } @@ -127,9 +118,6 @@ async function tryVariant(g: Grey, v: Variant, extra: ReaderOptions, into: Decod judge(await readBarcodes(toImage(v.prep(g)) as ImageData, { ...v.opts, ...extra }), into); } -/** A book ISBN or a card was read: nothing more to try on this frame. */ -const found = (o: DecodeOutcome): boolean => o.isbn !== null || o.card !== null; - export interface LiveState { round: number; cursor: number } export const newLiveState = (): LiveState => ({ round: 0, cursor: 0 }); /** Every FULL_EVERY-th live round looks at the whole frame instead of the crop. */ @@ -146,14 +134,14 @@ export const wantsFull = (st: LiveState): boolean => st.round % FULL_EVERY === F * stopped, so that slow machines still get through every variant across frames. */ export async function decodeLive(p: Pixels, st: LiveState, now: () => number = () => performance.now()): Promise<{ out: DecodeOutcome; state: LiveState }> { - const out: DecodeOutcome = { isbn: null, other: null, card: null }; + const out: DecodeOutcome = { isbn: null, other: null }; const began = now(), g = toGrey(p); let cursor = st.cursor; if (wantsFull(st)) { - for (const v of WHOLE_VARIANTS) if (!found(out)) await tryVariant(g, v, {}, out); + for (const v of WHOLE_VARIANTS) if (!out.isbn) await tryVariant(g, v, {}, out); } else { await tryVariant(g, VARIANTS[0]!, {}, out); - for (let i = 0; i < REST.length && !found(out) && now() - began <= LIVE_BUDGET_MS; i++) { + for (let i = 0; i < REST.length && !out.isbn && now() - began <= LIVE_BUDGET_MS; i++) { await tryVariant(g, REST[cursor]!, {}, out); cursor = (cursor + 1) % REST.length; } @@ -163,12 +151,12 @@ export async function decodeLive(p: Pixels, st: LiveState, now: () => number = ( /** Everything we have on one frame, for the Capture burst: every variant, rotated too, crop then whole frame. */ export async function decodeThorough(crop: Pixels, whole: Pixels | null): Promise { - const out: DecodeOutcome = { isbn: null, other: null, card: null }; + const out: DecodeOutcome = { isbn: null, other: null }; for (const p of whole ? [crop, whole] : [crop]) { const g = toGrey(p); for (const v of p === crop ? VARIANTS : WHOLE_VARIANTS) { await tryVariant(g, v, { tryRotate: true, tryInvert: true }, out); - if (found(out)) return out; + if (out.isbn) return out; } } return out; diff --git a/src/web/library.test.ts b/src/web/library.test.ts index 9b90660..b43ab9d 100644 --- a/src/web/library.test.ts +++ b/src/web/library.test.ts @@ -8,7 +8,7 @@ function book(id: number, over: Partial): Book { id, isbn13: null, lccn: null, title: 'T' + id, subtitle: null, authors: [], publisher: null, year: null, subjects: [], callNumber: null, sortKey: null, confidence: null, source: null, dewey: null, status: 'resolved', attentionReason: null, manualOverride: false, inQueue: false, - printedAt: null, createdAt: '', updatedAt: '', ...over, + printedAt: null, hierarchyTail: null, createdAt: '', updatedAt: '', ...over, }; } const qa = (id: number, key: string) => book(id, { callNumber: 'QA76.73 .R87', sortKey: key }); diff --git a/src/web/readstate.test.ts b/src/web/readstate.test.ts index 8141bd0..1c63a2c 100644 --- a/src/web/readstate.test.ts +++ b/src/web/readstate.test.ts @@ -1,6 +1,6 @@ import { test } from 'node:test'; import assert from 'node:assert/strict'; -import { acceptCard, acceptRead, markCardEmitted, markEmitted, newReadState } from './readstate.ts'; +import { acceptRead, markEmitted, newReadState } from './readstate.ts'; const ISBN = '9780306406157'; @@ -46,13 +46,3 @@ test('markEmitted silences the loop for 5 s', () => { assert.equal(acceptRead(s, ISBN, 2000).emit, null); assert.equal(acceptRead(s, ISBN, 6100).emit, ISBN); }); - -test('a card is announced once per 5 s per text, independently of ISBNs', () => { - let r = acceptCard(newReadState(), 'card A', 0); - assert.equal(r.emit, 'card A'); - r = acceptCard(r.state, 'card A', 4900); - assert.equal(r.emit, null); - assert.equal(acceptCard(r.state, 'card B', 4900).emit, 'card B'); - assert.equal(acceptCard(r.state, 'card A', 5100).emit, 'card A'); - assert.equal(acceptCard(markCardEmitted(newReadState(), 'card A', 0), 'card A', 100).emit, null); -}); diff --git a/src/web/readstate.ts b/src/web/readstate.ts index caa3df6..d528f53 100644 --- a/src/web/readstate.ts +++ b/src/web/readstate.ts @@ -35,15 +35,3 @@ export function acceptRead( export function markEmitted(state: ReadState, isbn: string, now: number): ReadState { return { ...state, emittedAt: { ...state.emittedAt, [isbn]: now } }; } - -/** A card's QR code, repeat-protected like an ISBN: once per REPEAT_MS per distinct text. */ -export function acceptCard(state: ReadState, text: string, now: number): { state: ReadState; emit: string | null } { - const key = 'card:' + text; - const last = state.emittedAt[key]; - if (last !== undefined && now - last < REPEAT_MS) return { state, emit: null }; - return { state: { ...state, emittedAt: { ...state.emittedAt, [key]: now } }, emit: text }; -} - -export function markCardEmitted(state: ReadState, text: string, now: number): ReadState { - return { ...state, emittedAt: { ...state.emittedAt, ['card:' + text]: now } }; -} diff --git a/src/web/scanner.ts b/src/web/scanner.ts index e0ab87d..28be836 100644 --- a/src/web/scanner.ts +++ b/src/web/scanner.ts @@ -1,5 +1,5 @@ import { prepareZXingModule } from 'zxing-wasm/reader'; -import { acceptCard, acceptRead, markCardEmitted, markEmitted, newReadState } from './readstate.ts'; +import { acceptRead, markEmitted, newReadState } from './readstate.ts'; import { cropRect } from './frame.ts'; import { decodeLive, decodeThorough, newLiveState, sharpness, wantsFull } from './decode.ts'; import type { DecodeOutcome, Pixels } from './decode.ts'; @@ -62,8 +62,6 @@ function nextFrame(video: HTMLVideoElement, fallbackMs: number): Promise { export interface ScannerHandlers { /** A valid ISBN-13 was read (at most once per 5 seconds per book). */ onIsbn(isbn13: string): void; - /** A Booksorter card's QR code was read (at most once per 5 seconds per card). */ - onCard(text: string): void; /** A barcode was read that is not a book ISBN. */ onOther(code: string): void; /** The camera stopped by itself (unplugged, taken by another program). */ @@ -150,11 +148,6 @@ export async function startScanner( const r = await decodeLive(grab(video, c.x, c.y, c.w, c.h), live); live = r.state; if (stopped || burst) { /* a burst took over: drop this result */ } else { - if (r.out.card) { - const a = acceptCard(state, r.out.card, Date.now()); - state = a.state; - if (a.emit) handlers.onCard(a.emit); - } for (const code of [r.out.isbn, r.out.other]) { if (!code) continue; const a = acceptRead(state, code, Date.now()); @@ -187,17 +180,13 @@ export async function startScanner( if (!best || score > best.score) best = { full, score }; const out = await decodeThorough(crop, full); other ??= out.other; - if (out.card) { - state = markCardEmitted(state, out.card, Date.now()); - return { isbn: null, other, card: out.card, saved: null }; - } if (out.isbn) { state = markEmitted(state, out.isbn, Date.now()); - return { isbn: out.isbn, other, card: null, saved: null }; + return { isbn: out.isbn, other, saved: null }; } } - if (other) return { isbn: null, other, card: null, saved: null }; - return { isbn: null, other: null, card: null, saved: best ? await saveFailed(best.full) : null }; + if (other) return { isbn: null, other, saved: null }; + return { isbn: null, other: null, saved: best ? await saveFailed(best.full) : null }; } finally { burst = false; } diff --git a/src/web/store.test.ts b/src/web/store.test.ts index 65a441e..adf635f 100644 --- a/src/web/store.test.ts +++ b/src/web/store.test.ts @@ -8,7 +8,7 @@ function book(id: number, title: string, sortKey: string | null): Book { id, isbn13: null, lccn: null, title, subtitle: null, authors: [], publisher: null, year: null, subjects: [], callNumber: null, sortKey, confidence: null, source: null, dewey: null, status: 'resolved', attentionReason: null, manualOverride: false, inQueue: true, - printedAt: null, createdAt: '', updatedAt: '', + printedAt: null, hierarchyTail: null, createdAt: '', updatedAt: '', }; } diff --git a/src/web/styles.css b/src/web/styles.css index bee6a62..0ccfe92 100644 --- a/src/web/styles.css +++ b/src/web/styles.css @@ -297,3 +297,7 @@ main { max-width: var(--page-max); margin: 0 auto; padding: var(--space-6) var(- .scan-left { position: static; } .panel { width: 100%; } } + +/* Where a call number sits in the classification: one line of secondary text, the most specific level in full colour. */ +.crumbs { margin: 0; font-size: var(--text-sm); color: var(--muted); line-height: var(--leading); } +.crumb-last { color: var(--text); } diff --git a/src/web/views/Camera.tsx b/src/web/views/Camera.tsx index 63ff5ab..385858d 100644 --- a/src/web/views/Camera.tsx +++ b/src/web/views/Camera.tsx @@ -37,7 +37,7 @@ const CameraIcon = () => ( * The live camera with its controls on a bar along the bottom edge. `onIsbn` gets every ISBN it reads. * `captureRef.current` is set to a function that takes one careful picture (it returns false when the camera is off). */ -export function Camera({ onIsbn, onCard, captureRef }: { onIsbn: (isbn: string) => void; onCard: (text: string) => void; captureRef: { current: (() => boolean) | null } }) { +export function Camera({ onIsbn, captureRef }: { onIsbn: (isbn: string) => void; captureRef: { current: (() => boolean) | null } }) { const cam = useCamera(); const video = useRef(null); const scanner = useRef(null); @@ -65,18 +65,9 @@ export function Camera({ onIsbn, onCard, captureRef }: { onIsbn: (isbn: string) say(`Read ${isbn}`, 'ok'); onIsbn(isbn); }; - const gotCard = (text: string) => { - beepAccept(); - setFlash(true); - clearTimeout(flashTimer.current); - flashTimer.current = setTimeout(() => setFlash(false), 600); - say('Read a card', 'ok'); - onCard(text); - }; - const handlers = useRef({ onIsbn: gotIsbn, onCard: gotCard, onOther: () => {}, onEnded: () => {} }); + const handlers = useRef({ onIsbn: gotIsbn, onOther: () => {}, onEnded: () => {} }); handlers.current = { onIsbn: gotIsbn, - onCard: gotCard, onOther: () => { beepLow(); say('That barcode is not an ISBN', 'warn'); }, onEnded: () => { scanner.current = null; setState('off'); setStatus(null); updateCamera({ resolution: '' }); @@ -100,7 +91,7 @@ export function Camera({ onIsbn, onCard, captureRef }: { onIsbn: (isbn: string) setState('starting'); setProblem(''); try { const sc = await startScanner(video.current, getCamera().deviceId || undefined, { - onIsbn: i => handlers.current.onIsbn(i), onCard: t => handlers.current.onCard(t), onOther: c => handlers.current.onOther(), onEnded: () => handlers.current.onEnded(), + onIsbn: i => handlers.current.onIsbn(i), onOther: c => handlers.current.onOther(), onEnded: () => handlers.current.onEnded(), }, ac.signal); if (!sc) return; // turned off or left the screen while the permission prompt was open if (ac.signal.aborted) { sc.stop(); return; } @@ -130,8 +121,7 @@ export function Camera({ onIsbn, onCard, captureRef }: { onIsbn: (isbn: string) try { const r = await sc.capture(n => say(`Trying… ${n} frames`, 'info', true)); if (scanner.current !== sc) return; - if (r.card) gotCard(r.card); - else if (r.isbn) gotIsbn(r.isbn); + if (r.isbn) gotIsbn(r.isbn); else if (r.other) { beepLow(); say('That barcode is not an ISBN', 'warn', true); } else { beepLow(); say(r.saved ? NOT_FOUND_SAVED : NOT_FOUND, 'warn', true); } } catch { diff --git a/src/web/views/Scan.tsx b/src/web/views/Scan.tsx index 0b72126..2d35f10 100644 --- a/src/web/views/Scan.tsx +++ b/src/web/views/Scan.tsx @@ -1,5 +1,5 @@ import { useEffect, useRef } from 'preact/hooks'; -import { addByIsbn, addFromCard } from '../actions.ts'; +import { addByIsbn } from '../actions.ts'; import { dialogOpen } from '../dialog.ts'; import { unlockAudio } from '../sound.ts'; import type { EditorTarget } from '../components/Editor.tsx'; @@ -53,8 +53,7 @@ export function Scan({ onEdit }: { onEdit: (t: EditorTarget) => void }) { return (
- { void addByIsbn(isbn); }} - onCard={text => { void addFromCard(text, id => onEdit({ kind: 'edit', id })); }} /> + { void addByIsbn(isbn); }} />