Datasets:
Download generator/datasets.js from hyperbots-inc/synthetic-doc-classification: direct link, hf CLI and curl.
- Browser
- Download file 20.1 kB
-
https://huggingface.co/datasets/hyperbots-inc/synthetic-doc-classification/resolve/main/generator/datasets.js
- Command line
-
hf download hf://datasets/hyperbots-inc/synthetic-doc-classification/generator/datasets.js
-
curl -L -o datasets.js https://huggingface.co/datasets/hyperbots-inc/synthetic-doc-classification/resolve/main/generator/datasets.js
20.1 kB
| // datasets.js - builds the hyperbots-inc/synthetic-* datasets from docgen.js. | |
| // Run in a browser (Chrome) page after loading docgen.js: const files = await DocSets.build('parsing'); | |
| // Each builder returns [{path, data}] where data is a string or a Blob. | |
| (function (root) { | |
| ; | |
| const G = root.DocGen || (typeof require !== 'undefined' ? require('./docgen.js') : null); | |
| const { RNG, TYPES, generate, toText, toHTML, render, ocrFromRender, markdownFromRender, addStamps, degrade, paginate, B, kvi, S } = G; | |
| const ALL = Object.keys(TYPES); | |
| const SEEDS = { extraction: 1100, parsing: 2200, redaction: 3300, classification: 4400, splitting: 5500, handwritten: 6600, stamped: 7700, bad_scans: 8800, dense: 9900 }; | |
| const typeInfo = (t) => ({ doc_type: t, taxonomy_id: TYPES[t][0], taxonomy_name: TYPES[t][2], category: TYPES[t][1] + '. ' + G.CAT[TYPES[t][1]] }); | |
| const jl = (rows) => rows.map((x) => JSON.stringify(x)).join('\n') + '\n'; | |
| const toBlob = (cv, q) => new Promise((res) => cv.toBlob(res, 'image/jpeg', q)); | |
| function scaleCanvas(cv, f) { const c = document.createElement('canvas'); c.width = Math.round(cv.width * f); c.height = Math.round(cv.height * f); const x = c.getContext('2d'); x.imageSmoothingQuality = 'high'; x.drawImage(cv, 0, 0, c.width, c.height); return c; } | |
| const sb = (b, f) => b.map((v) => Math.round(v * f)); | |
| const fieldsOut = (o, map) => o.fields.map((f) => ({ key: f.key, label: f.label, value: f.value, bbox: map ? map(f.bbox) : f.bbox, handwritten: f.handwritten })); | |
| const blocksOut = (o, map) => o.blocks.filter((b) => b.label !== 'signature_mark').map((b) => ({ id: b.id, order: b.order, label: b.label, bbox: map ? map(b.bbox) : b.bbox, text: b.text })); | |
| function goldFor(doc, o) { const e = {}; for (const k in doc.entities) { const v = doc.entities[k]; if (Array.isArray(v)) { const t = o.tables[k]; e[k] = t ? v.slice(0, t.rows_rendered) : v; } else e[k] = v; } return e; } | |
| // ---------------------------------------------------------------- dense layouts | |
| function denseDoc(r, kind) { | |
| const L = G.locale(r); const co = G.company(r, L, 'buyer'); const d = G.newDoc('bank_statement', ''); d.blocks = []; d.dense_kind = kind; | |
| if (kind === 'directory_listing') { | |
| const city = r.pick(L.cities)[0]; d.title = city + ' Business & Residential Directory'; d.blocks.push(B.title(d.title + ' - ' + r.int(1931, 1998))); | |
| const letters = 'ABCDEFGHIJKLMNOPRSTW'.split(''); const start = r.int(0, letters.length - 4); const secs = []; | |
| for (let li = start; li < start + 4; li++) { const ent = []; const n = r.int(55, 80); for (let i = 0; i < n; i++) { const p = G.person(r, L); const nm = letters[li] + p.last.slice(1).toLowerCase(); const occ = r.pick(['clerk', 'grocer', 'mach', 'tchr', 'carp', 'acct', 'nurse', 'drvr', 'eng', 'retired', 'lab', 'sec', 'baker', 'tailor']); ent.push(nm + ' ' + p.first + ' ' + r.pick(['A', 'B', 'C', 'J', 'M', 'R']) + ' (' + r.pick(['Mary', 'Ann', 'Rose', 'Ellen', 'Grace', '']) + ') ' + occ + ' h' + r.int(1, 999) + ' ' + r.pick(['Maple', 'Elm', 'Oak', 'Main', 'High', 'Mill', 'Park', 'Canal']) + ' ' + r.pick(['St', 'Av', 'Rd', 'Ln']) + ' tel ' + r.digits(1) + '-' + r.digits(4)); } secs.push({ h: '- ' + letters[li] + ' -', segs: [{ text: ent.join('\n') }] }); } | |
| d.blocks.push(B.cols(r.pick([3, 4]), secs)); d.blocks.push(B.footer('Page ' + r.int(100, 900))); | |
| } else if (kind === 'terms_and_conditions') { | |
| d.title = r.pick(['General Terms and Conditions of Purchase', 'Master Services Agreement - Standard Terms', 'Terms and Conditions of Sale']); d.blocks.push(B.brand(co.name, [co.address], d.title, false)); | |
| const secs = []; G.legalPara(r, 1); const heads = r.shuffle(['Definitions', 'Term', 'Payment', 'Confidentiality', 'Limitation of Liability', 'Indemnification', 'Termination', 'Governing Law', 'Force Majeure', 'Assignment', 'Notices', 'Entire Agreement', 'Severability', 'Data Protection', 'Audit Rights', 'Intellectual Property', 'Warranties', 'Insurance', 'Dispute Resolution', 'Non-Solicitation']); | |
| heads.forEach((h, i) => secs.push({ h: (i + 1) + '. ' + h.toUpperCase(), segs: [{ text: G.legalPara(r, r.int(4, 7)) }] })); | |
| d.blocks.push(B.cols(r.pick([2, 3]), secs)); d.blocks.push(B.footer(co.name + ' - Form T&C-' + r.digits(3) + ' Rev ' + r.int(1, 9))); | |
| } else if (kind === 'long_statement') { | |
| const sd = generate('bank_statement', r.int(1, 1e9), { rows: r.int(55, 75) }); d.title = sd.title; d.blocks = sd.blocks; d.entities = sd.entities; d.type = 'bank_statement'; | |
| } else if (kind === 'financial_statements') { | |
| const fd = generate(r.pick(['balance_sheet', 'profit_and_loss']), r.int(1, 1e9), { dense: true }); d.title = fd.title; d.blocks = fd.blocks; d.entities = fd.entities; d.type = fd.type; | |
| } else { | |
| d.title = r.pick(['Price List', 'Freight Rate Card', 'Parts Catalogue - Price Schedule']) + ' ' + r.int(2024, 2026); d.blocks.push(B.brand(co.name, [co.address, co.phone], d.title, true)); | |
| d.blocks.push(B.p('All prices in ' + L.cur + ', exclusive of taxes. Valid from 1 ' + r.pick(['January', 'April', 'July']) + '. Minimum order quantities apply where shown.')); | |
| const rows = []; const n = r.int(60, 85); for (let i = 0; i < n; i++) { const base = r.float(2, 900); rows.push([r.letters(2) + '-' + r.digits(5), r.pick(['Bracket', 'Valve', 'Hose', 'Bearing', 'Seal kit', 'Filter', 'Gasket', 'Sensor', 'Relay', 'Coupling', 'Bushing', 'Fuse', 'Motor', 'Panel']) + ' ' + r.pick(['M6', 'M8', 'DN25', 'DN50', '24V', '230V', 'HD', 'SS316', 'XL', 'Type B']), r.pick(['ea', 'pk', 'box', 'm', 'set']), String(r.pick([1, 5, 10, 25, 50, 100])), G.money(base, L), G.money(base * 0.95, L), G.money(base * 0.9, L)]); } | |
| d.blocks.push(B.table(['Part No.', 'Description', 'UoM', 'MOQ', 'List', '10+ Price', '50+ Price'], rows, 'price_list')); d.blocks.push(B.footer('Prices subject to change without notice.')); | |
| } | |
| return d; | |
| } | |
| // ---------------------------------------------------------------- builders | |
| const BUILDERS = { | |
| async extraction(n) { | |
| n = n || 12; const all = []; const byType = {}; | |
| ALL.forEach((t, ti) => { for (let i = 0; i < n; i++) { const seed = SEEDS.extraction * 1000 + ti * 100 + i; const d = generate(t, seed); const tx = toText(d); | |
| const row = Object.assign({ id: t + '-' + String(i + 1).padStart(3, '0') }, typeInfo(t), { locale: d.locale, title: d.title, text: tx.text, html: toHTML(d) }); | |
| all.push(Object.assign({}, row, { hyperapi_schema: JSON.stringify(d.schema), labels: JSON.stringify(d.entities) })); | |
| (byType[t] = byType[t] || []).push(Object.assign({}, row, { hyperapi_schema: JSON.stringify(d.schema), labels: d.entities })); } }); | |
| const files = [{ path: 'data/all/test.jsonl', data: jl(all) }]; for (const t in byType) files.push({ path: 'data/by_type/' + t + '.jsonl', data: jl(byType[t]) }); | |
| return { files, stats: { rows: all.length, types: ALL.length } }; | |
| }, | |
| async parsing(n) { | |
| n = n || 100; const rows = []; const files = []; | |
| for (let i = 0; i < n; i++) { const r = RNG(SEEDS.parsing * 1000 + i); const t = ALL[i % ALL.length]; const d = generate(t, SEEDS.parsing * 1000 + i); | |
| const o = render(d, { rnd: r, hand: d.form && r.bool(0.4) }); const name = 'parse-' + String(i + 1).padStart(4, '0') + '.jpg'; files.push({ path: 'data/test/' + name, data: await toBlob(o.canvas, 0.9) }); | |
| const ocr = ocrFromRender(o); rows.push(Object.assign({ file_name: name, id: name.replace('.jpg', '') }, typeInfo(t), { width: o.width, height: o.height, blocks: blocksOut(o), tables: o.blocks.filter((b) => b.label === 'table').map((b) => ({ block_id: b.id, n_rows: b.table.length, n_cols: b.table[0].length, html: b.html })), markdown: markdownFromRender(o), ocr_text: ocr.text })); } | |
| files.push({ path: 'data/test/metadata.jsonl', data: jl(rows) }); return { files, stats: { images: n } }; | |
| }, | |
| async redaction(n) { | |
| n = n || 100; const types = ['kyc_form', 'patient_intake_form', 'claim_form', 'bank_details_form', 'credit_application', 'payroll_statement', 'bank_statement', 'credit_card_statement', 'utility_bill', 'offer_letter', 'dunning_letter', 'lab_report', 'timesheet', 'expense_report', 'meeting_minutes']; | |
| const rows = []; const files = []; | |
| for (let i = 0; i < n; i++) { const seed = SEEDS.redaction * 1000 + i; const r = RNG(seed); const t = types[i % types.length]; const d = generate(t, seed); | |
| const o = render(d, { rnd: r, hand: d.form && r.bool(0.3) }); const ocr = ocrFromRender(o); const boxes = o.pii.slice(); const L = G.locale(RNG(seed + 1), d.locale); | |
| const ents = ocr.spans.map((sp) => { const bx = []; const need = sp.text.replace(/\s+/g, '').length; let got = 0; for (let k = 0; k < boxes.length && got < need; k++) { const b = boxes[k]; const bt = (b.text || '').trim(); if (b.type === sp.type && bt && sp.text.indexOf(bt) >= 0) { bx.push(b.bbox); got += bt.replace(/\s+/g, '').length; boxes.splice(k, 1); k--; } } return { type: sp.type, text: sp.text, start: sp.start, end: sp.end, bboxes: bx }; }); | |
| const fake = RNG(seed + 99); const repl = (e) => { const p = G.person(fake, L); return { PERSON_NAME: p.name, EMAIL: p.email, PHONE: p.phone, ADDRESS: p.address, DATE_OF_BIRTH: G.fmtDate(p.dob, /^\d{4}-/.test(e.text) ? 'iso' : (/^\d{2}\/\d{2}\/\d{4}$/.test(e.text) ? (d.locale === 'US' ? 'us' : 'eu') : (/^[A-Z][a-z]{2} \d/.test(e.text) ? 'short' : 'long'))), NATIONAL_ID: p.nid, ACCOUNT_NUMBER: 'X' + fake.digits(Math.max(4, e.text.length - 1)), IBAN: 'GB00 SYNT ' + fake.digits(4) + ' ' + fake.digits(4) + ' ' + fake.digits(4) + ' ' + fake.digits(2), PASSPORT_NUMBER: fake.letters(1) + fake.digits(8) }[e.type] || '[REDACTED]'; }; | |
| let red = '', deid = '', last = 0; const reps = []; ents.forEach((e) => { const rp = repl(e); reps.push(rp); red += ocr.text.slice(last, e.start) + '[REDACTED]'; deid += ocr.text.slice(last, e.start) + rp; last = e.end; }); red += ocr.text.slice(last); deid += ocr.text.slice(last); | |
| const summary = {}; ents.forEach((e) => { summary[e.type] = (summary[e.type] || 0) + 1; }); | |
| const name = 'pii-' + String(i + 1).padStart(4, '0') + '.jpg'; files.push({ path: 'data/test/' + name, data: await toBlob(o.canvas, 0.88) }); | |
| rows.push(Object.assign({ file_name: name, id: name.replace('.jpg', '') }, typeInfo(t), { ocr_text: ocr.text, pii: ents.map((e, k) => Object.assign({}, e, { synthetic_replacement: reps[k] })), signatures: o.signatures.map((s) => ({ bbox: s.bbox })), logos: o.blocks.filter((b) => b.label === 'logo').map((b) => ({ bbox: b.bbox })), summary: JSON.stringify(summary), redacted_text: red, deidentified_text: deid })); } | |
| files.push({ path: 'data/test/metadata.jsonl', data: jl(rows) }); return { files, stats: { images: n } }; | |
| }, | |
| async classification(per) { | |
| per = per || 8; const rows = []; const files = []; let i = 0; | |
| for (const t of ALL) for (let k = 0; k < per; k++, i++) { const seed = SEEDS.classification * 1000 + i; const r = RNG(seed); const d = generate(t, seed); | |
| const o = render(d, { rnd: r, hand: d.form && r.bool(0.5) }); const ocr0 = ocrFromRender(o).text; let cv = o.canvas; let variant = 'clean'; | |
| if (r.bool(0.2)) { addStamps(o, r, r.int(1, 2)); variant = 'stamped'; } | |
| if (r.bool(0.2)) { cv = degrade(o, r, r.pick(['mild', 'moderate'])).canvas; variant = variant === 'clean' ? 'degraded' : variant + '+degraded'; } | |
| const name = 'cls-' + String(i + 1).padStart(4, '0') + '.jpg'; files.push({ path: 'data/test/' + name, data: await toBlob(scaleCanvas(cv, 0.6), 0.82) }); | |
| rows.push(Object.assign({ file_name: name, id: name.replace('.jpg', ''), label: t }, typeInfo(t), { financial: TYPES[t][1] <= 'K', title_on_page: d.title, variant, ocr_text: ocr0 })); } | |
| files.push({ path: 'data/test/metadata.jsonl', data: jl(rows) }); return { files, stats: { images: i, classes: ALL.length } }; | |
| }, | |
| async splitting(n) { | |
| n = n || 200; const rows = []; | |
| for (let i = 0; i < n; i++) { const r = RNG(SEEDS.splitting * 1000 + i); const k = r.int(2, 6); const pages = []; const segs = []; | |
| if (r.bool(0.35)) { const L = G.locale(r); const c = G.company(r, L, 'buyer'); const p = G.person(r, L); const cover = { title: r.pick(['FAX COVER SHEET', 'Document Submission Cover Letter', 'Transmittal Sheet']), blocks: [B.brand(c.name, [c.address], '', false), B.kv([kvi('To', G.company(r, L, 'supplier').name), kvi('From', p.name), kvi('Date', G.fmtDate(new Date(Date.UTC(2025, r.int(0, 11), r.int(1, 28))), 'long')), kvi('Pages', 'see below')], 1), B.p('Please find enclosed the documents listed for your review and processing. Contact us if any page is missing or illegible.')] }; cover.blocks[0].title = cover.title; pages.push({ blocks: cover.blocks }); segs.push({ split_label: 'cover_sheet', taxonomy_id: 100, taxonomy_name: 'Unclassified: Other Document', title: cover.title, start_page: 1, end_page: 1 }); } | |
| let prev = null; for (let j = 0; j < k; j++) { const t = prev && r.bool(0.25) ? prev : r.pick(ALL); prev = t; const d = generate(t, SEEDS.splitting * 1000 + i * 10 + j, t === 'bank_statement' || t === 'credit_card_statement' ? { rows: r.int(8, 60) } : undefined); const ps = paginate(d, r, r.int(40, 60)); const st = pages.length + 1; ps.forEach((b) => pages.push({ blocks: b })); segs.push({ split_label: t, taxonomy_id: TYPES[t][0], taxonomy_name: TYPES[t][2], title: d.title, start_page: st, end_page: pages.length }); if (r.bool(0.08)) { pages.push({ blocks: [B.p('This page intentionally left blank.')] }); segs[segs.length - 1].end_page = pages.length; } } | |
| const pg = pages.map((p, pi) => { const doc = { title: '', blocks: p.blocks }; return { page_number: pi + 1, text: toText(doc).text, html: toHTML(doc) }; }); | |
| rows.push({ id: 'bundle-' + String(i + 1).padStart(4, '0'), num_pages: pg.length, num_documents: segs.length, segments: segs, pages: pg }); } | |
| return { files: [{ path: 'data/test.jsonl', data: jl(rows) }], stats: { bundles: n } }; | |
| }, | |
| async handwritten(n) { | |
| n = n || 100; const types = ['kyc_form', 'bank_details_form', 'credit_application', 'patient_intake_form', 'claim_form', 'expense_report', 'timesheet', 'maintenance_report', 'delivery_note']; | |
| const notes = ['Checked - OK', 'pls call back', 'Approved', 'see attached', 'urgent!', 'verified ID', 'scan copy filed', 'pay by Fri', 'missing page 2', 'recd in good cond.', 'OK to process', 'query sent to vendor']; | |
| const rows = []; const files = []; | |
| for (let i = 0; i < n; i++) { const seed = SEEDS.handwritten * 1000 + i; const r = RNG(seed); const t = types[i % types.length]; const d = generate(t, seed); d.form = true; d.blocks.forEach((b) => { if (b.t === 'kv') b.items.forEach((it) => { it.hand = true; }); }); | |
| const st = G.handStyle(r); const o = render(d, { rnd: r, hand: true, handStyle: st, signProb: 0.95 }); const ann = []; | |
| const k = r.int(0, 2); for (let j = 0; j < k; j++) { const txt = r.pick(notes); const x = r.float(o.width * 0.55, o.width * 0.8); const y = r.float(o.height * 0.12, o.height * 0.9); const bb = o.drawHand(txt, x, y, 24); ann.push({ text: txt, bbox: bb }); } | |
| const name = 'hw-' + String(i + 1).padStart(4, '0') + '.jpg'; files.push({ path: 'data/test/' + name, data: await toBlob(o.canvas, 0.88) }); | |
| rows.push(Object.assign({ file_name: name, id: name.replace('.jpg', '') }, typeInfo(t), { writer_font: st.font, ink: st.ink, fields: fieldsOut(o), checkboxes: o.checkboxes.map((c) => ({ label: c.label, checked: c.checked, options: c.options })), signatures: o.signatures, annotations: ann, labels: JSON.stringify(goldFor(d, o)), ocr_text: ocrFromRender(o).text })); } | |
| files.push({ path: 'data/test/metadata.jsonl', data: jl(rows) }); return { files, stats: { images: n } }; | |
| }, | |
| async stamped(n) { | |
| n = n || 100; const types = ['invoice', 'tax_invoice', 'purchase_order', 'delivery_note', 'bill_of_lading', 'credit_note', 'utility_bill', 'receipt', 'remittance_advice', 'nda', 'offer_letter', 'work_order', 'packing_list', 'quotation']; | |
| const rows = []; const files = []; | |
| for (let i = 0; i < n; i++) { const seed = SEEDS.stamped * 1000 + i; const r = RNG(seed); const t = types[i % types.length]; const d = generate(t, seed); const o = render(d, { rnd: r }); const ocr0 = ocrFromRender(o).text; | |
| const stamps = addStamps(o, r, r.pick([1, 1, 2, 2, 3])); | |
| const name = 'stamp-' + String(i + 1).padStart(4, '0') + '.jpg'; files.push({ path: 'data/test/' + name, data: await toBlob(o.canvas, 0.88) }); | |
| rows.push(Object.assign({ file_name: name, id: name.replace('.jpg', '') }, typeInfo(t), { stamps, fields: fieldsOut(o), labels: JSON.stringify(goldFor(d, o)), ocr_text: ocr0 })); } | |
| files.push({ path: 'data/test/metadata.jsonl', data: jl(rows) }); return { files, stats: { images: n } }; | |
| }, | |
| async bad_scans(n) { | |
| n = n || 120; const types = ['invoice', 'receipt', 'purchase_order', 'bank_statement', 'payroll_statement', 'utility_bill', 'delivery_note', 'bill_of_lading', 'kyc_form', 'lab_report', 'remittance_advice', 'credit_note']; | |
| const rows = []; const files = []; const lv = ['mild', 'moderate', 'severe']; | |
| for (let i = 0; i < n; i++) { const seed = SEEDS.bad_scans * 1000 + i; const r = RNG(seed); const t = types[i % types.length]; const d = generate(t, seed); const o = render(d, { rnd: r, hand: d.form && r.bool(0.5) }); const ocr0 = ocrFromRender(o).text; const bl0 = blocksOut(o); | |
| let stamp = null; if (r.bool(0.25)) stamp = addStamps(o, r, 1)[0]; const level = lv[i % 3]; const dg = degrade(o, r, level); | |
| const name = 'scan-' + String(i + 1).padStart(4, '0') + '.jpg'; files.push({ path: 'data/test/' + name, data: await toBlob(dg.canvas, dg.params.jpeg_quality) }); | |
| rows.push(Object.assign({ file_name: name, id: name.replace('.jpg', '') }, typeInfo(t), { severity: level, degradation: dg.params, has_stamp: !!stamp, fields: fieldsOut(o, dg.mapBox), blocks: bl0.map((b) => Object.assign({}, b, { bbox: dg.mapBox(b.bbox) })), labels: JSON.stringify(goldFor(d, o)), ocr_text: ocr0 })); } | |
| files.push({ path: 'data/test/metadata.jsonl', data: jl(rows) }); return { files, stats: { images: n } }; | |
| }, | |
| async dense(n) { | |
| n = n || 60; const kinds = ['directory_listing', 'terms_and_conditions', 'long_statement', 'financial_statements', 'price_list']; const rows = []; const files = []; | |
| for (let i = 0; i < n; i++) { const seed = SEEDS.dense * 1000 + i; const r = RNG(seed); const kind = kinds[i % kinds.length]; const d = denseDoc(r, kind); d.seed = seed; | |
| const old = kind === 'directory_listing'; const o = render(d, { rnd: r, W: 1654, H: 2339, size: old ? r.int(15, 17) : r.int(15, 18), margin: r.int(60, 80), dense: true, font: old ? r.pick(['Times New Roman', 'Georgia', 'Baskerville', 'Courier New']) : undefined, bg: old ? r.pick(['#f5efe0', '#f2ead6', '#fbf8f0']) : '#ffffff', logo: !old }); | |
| let cv = o.canvas; let deg = null; let map = null; if (old) { const dg = degrade(o, r, 'mild'); cv = dg.canvas; deg = dg.params; map = dg.mapBox; } | |
| const name = 'dense-' + String(i + 1).padStart(4, '0') + '.jpg'; files.push({ path: 'data/test/' + name, data: await toBlob(cv, deg ? deg.jpeg_quality : 0.9) }); | |
| rows.push({ file_name: name, id: name.replace('.jpg', ''), kind, title: d.title, width: o.width, height: o.height, num_blocks: o.blocks.length, num_table_rows: o.blocks.filter((b) => b.label === 'table').reduce((a, b) => a + b.table.length - 1, 0), truncated: o.truncated, aged_scan: !!deg, blocks: blocksOut(o, map), tables: o.blocks.filter((b) => b.label === 'table').map((b) => ({ block_id: b.id, n_rows: b.table.length, n_cols: b.table[0].length, html: b.html })), markdown: markdownFromRender(o), ocr_text: ocrFromRender(o).text, degradation: deg ? JSON.stringify(deg) : null }); } | |
| files.push({ path: 'data/test/metadata.jsonl', data: jl(rows) }); return { files, stats: { images: n } }; | |
| }, | |
| }; | |
| async function build(name, n) { return BUILDERS[name](n); } | |
| const API = { build, BUILDERS, denseDoc, SEEDS }; | |
| if (typeof module !== 'undefined') module.exports = API; else root.DocSets = API; | |
| })(typeof window !== 'undefined' ? window : this); | |