import { type PathBuilderLike } from "path-ts"; import { type CJKSplitReport, type CoverageStats } from "#cjk/builder"; /** * Options for {@linkcode buildJPCorpus}, corresponding to the Python assembler's flags. */ export interface JPCorpusOptions { parquet: PathBuilderLike; kenall: PathBuilderLike; /** * The WOF admin database for the kana readings, or `null` to decline the `kana_municipality` register. */ adminDB: PathBuilderLike | null; outDir: PathBuilderLike; trainRows: number; valRows: number; boardRows: number; rowsPerPart: number; statsSamplePerPart: number; postcodeFraction: number; countryFraction: number; spacedFraction: number; variantHyphenFraction: number; maxFieldChars: number; /** * A smoke build reads a limited number of row groups and skips the 47-prefecture check. */ maxRowGroups?: number; /** * `REGEX:K` appends K−1 copies of every selected train row whose municipality matches (#2178). */ upweightPattern?: string | null; seed: number; force: boolean; } /** * The defaults of the Python assembler's flags. */ export declare const JP_CORPUS_DEFAULTS: { readonly trainRows: 2000000; readonly valRows: 20000; readonly boardRows: 20000; readonly rowsPerPart: 250000; readonly statsSamplePerPart: 50000; readonly postcodeFraction: 0.3; readonly countryFraction: 0.1; readonly spacedFraction: 0.12; readonly variantHyphenFraction: 0.05; readonly maxFieldChars: 64; readonly seed: 42; }; /** * `build-report.json` serializes the JP build report in this key order. */ export interface JPCorpusReport { seed: number; source_parquet: string; kenall: string; label_set: string; source: string; eligible_rows_scanned: number; /** * Rows dropped before selection, by reason, most common first. */ dropped_at_source: ReadonlyMap; max_field_chars: number; per_prefecture_cap: number; prefectures_train: number; board_municipalities: number; board_rows: number; kenall_join_tiers: ReadonlyMap; register_availability: ReadonlyMap; char_vocab_size: number; fractions: { postcode: number; country: number; spaced: number; variant_hyphen: number; }; register_weights: ReadonlyMap; upweight: { pattern: string | null; copies_appended: number; }; splits: ReadonlyMap; board_coverage: CoverageStats; } /** * Builds the corpus, its board and its character vocabulary under `outDir`, and returns the build report. * * @throws When `outDir` holds files and `force` is unset, an input is missing, the drop rate exceeds 2%, * a full build's train split misses a prefecture, or a board municipality reaches train or val. */ export declare function buildJPCorpus(options: JPCorpusOptions): Promise; //# sourceMappingURL=assemble.d.ts.map