eyecite-ts 0.5.0 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +38 -8
- package/dist/annotate/index.cjs.map +1 -1
- package/dist/annotate/index.d.cts +1 -1
- package/dist/annotate/index.d.mts +1 -1
- package/dist/annotate/index.mjs.map +1 -1
- package/dist/{citation-25ZydLsu.d.mts → citation-BwXdJTA9.d.mts} +177 -12
- package/dist/citation-BwXdJTA9.d.mts.map +1 -0
- package/dist/{citation-Cymq3pJ-.d.cts → citation-By8QXtGC.d.cts} +177 -12
- package/dist/citation-By8QXtGC.d.cts.map +1 -0
- package/dist/data/index.cjs.map +1 -1
- package/dist/data/index.d.cts +90 -90
- package/dist/data/index.d.cts.map +1 -1
- package/dist/data/index.d.mts +90 -90
- package/dist/data/index.d.mts.map +1 -1
- package/dist/data/index.mjs.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +110 -128
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +110 -128
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/dist/knownCodes-CI-vnoBO.cjs.map +1 -1
- package/dist/knownCodes-MkDSiR1j.mjs.map +1 -1
- package/dist/types-BfYnmSHC.d.mts +115 -0
- package/dist/types-BfYnmSHC.d.mts.map +1 -0
- package/dist/types-C_5aOCZ1.d.cts +115 -0
- package/dist/types-C_5aOCZ1.d.cts.map +1 -0
- package/dist/utils/index.cjs +7 -0
- package/dist/utils/index.cjs.map +1 -0
- package/dist/utils/index.d.cts +122 -0
- package/dist/utils/index.d.cts.map +1 -0
- package/dist/utils/index.d.mts +122 -0
- package/dist/utils/index.d.mts.map +1 -0
- package/dist/utils/index.mjs +7 -0
- package/dist/utils/index.mjs.map +1 -0
- package/package.json +10 -1
- package/dist/citation-25ZydLsu.d.mts.map +0 -1
- package/dist/citation-Cymq3pJ-.d.cts.map +0 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { S as
|
|
1
|
+
import { A as PinciteInfo, C as StatuteCitation, D as Warning, E as SupraCitation, O as Span, S as ShortFormCitationType, T as SubsequentHistoryEntry, _ as Parenthetical, a as CitationType, b as ShortFormCaseCitation, c as ExtractorMap, d as FullCitation, f as FullCitationType, g as NeutralCitation, h as JournalCitation, i as CitationSignal, j as parsePincite, k as TransformationMap, l as FederalRegisterCitation, m as IdCitation, n as CitationBase, o as ConstitutionalCitation, p as HistorySignal, r as CitationOfType, s as CourtInference, t as Citation, u as FullCaseCitation, v as ParentheticalType, w as StatutesAtLargeCitation, x as ShortFormCitation, y as PublicLawCitation } from "./citation-By8QXtGC.cjs";
|
|
2
|
+
import { a as FootnoteMap, i as ScopeStrategy, n as ResolutionResult, o as FootnoteZone, r as ResolvedCitation, t as ResolutionOptions } from "./types-C_5aOCZ1.cjs";
|
|
2
3
|
|
|
3
4
|
//#region src/types/guards.d.ts
|
|
4
5
|
/**
|
|
5
|
-
* Type guard: narrows Citation to a full citation (case, statute, journal, neutral, publicLaw, federalRegister).
|
|
6
|
+
* Type guard: narrows Citation to a full citation (case, statute, journal, neutral, publicLaw, federalRegister, statutesAtLarge, constitutional).
|
|
6
7
|
*/
|
|
7
8
|
declare function isFullCitation(citation: Citation): citation is FullCitation;
|
|
8
9
|
/**
|
|
@@ -44,93 +45,6 @@ interface Pattern {
|
|
|
44
45
|
type: FullCitationType;
|
|
45
46
|
}
|
|
46
47
|
//#endregion
|
|
47
|
-
//#region src/resolve/types.d.ts
|
|
48
|
-
/**
|
|
49
|
-
* Scope boundary strategy for resolution.
|
|
50
|
-
* Determines how far back to search for antecedent citations.
|
|
51
|
-
*/
|
|
52
|
-
type ScopeStrategy = "paragraph" | "section" | "footnote" | "none";
|
|
53
|
-
/**
|
|
54
|
-
* Options for citation resolution.
|
|
55
|
-
*/
|
|
56
|
-
interface ResolutionOptions {
|
|
57
|
-
/**
|
|
58
|
-
* Scope boundary strategy (default: 'paragraph')
|
|
59
|
-
* - paragraph: Only resolve within same paragraph
|
|
60
|
-
* - section: Only resolve within same section
|
|
61
|
-
* - footnote: Only resolve within same footnote
|
|
62
|
-
* - none: Resolve across entire document
|
|
63
|
-
*/
|
|
64
|
-
scopeStrategy?: ScopeStrategy;
|
|
65
|
-
/**
|
|
66
|
-
* Auto-detect paragraph boundaries from text (default: true)
|
|
67
|
-
* Uses paragraphBoundaryPattern to split text
|
|
68
|
-
*/
|
|
69
|
-
autoDetectParagraphs?: boolean;
|
|
70
|
-
/**
|
|
71
|
-
* Regex pattern to detect paragraph boundaries (default: /\n\n+/)
|
|
72
|
-
* Only used if autoDetectParagraphs is true
|
|
73
|
-
*/
|
|
74
|
-
paragraphBoundaryPattern?: RegExp;
|
|
75
|
-
/**
|
|
76
|
-
* Enable fuzzy party name matching for supra resolution (default: true)
|
|
77
|
-
* Uses Levenshtein distance to handle typos and variations
|
|
78
|
-
*/
|
|
79
|
-
fuzzyPartyMatching?: boolean;
|
|
80
|
-
/**
|
|
81
|
-
* Similarity threshold for fuzzy party matching (default: 0.8)
|
|
82
|
-
* Range: 0-1 where 1.0 is exact match
|
|
83
|
-
* Only used if fuzzyPartyMatching is true
|
|
84
|
-
*/
|
|
85
|
-
partyMatchThreshold?: number;
|
|
86
|
-
/**
|
|
87
|
-
* Allow Id. citations to resolve to other short-form citations (default: false)
|
|
88
|
-
* If true: "Smith v. Jones, 500 F.2d 100" -> "Id." -> "Id. at 105"
|
|
89
|
-
* If false: Second Id. fails to resolve (no full citation between them)
|
|
90
|
-
*/
|
|
91
|
-
allowNestedResolution?: boolean;
|
|
92
|
-
/**
|
|
93
|
-
* Report unresolved citations with failure reasons (default: true)
|
|
94
|
-
* If false: resolution field will be undefined for unresolved citations
|
|
95
|
-
*/
|
|
96
|
-
reportUnresolved?: boolean;
|
|
97
|
-
}
|
|
98
|
-
/**
|
|
99
|
-
* Result of resolving a short-form citation.
|
|
100
|
-
*/
|
|
101
|
-
interface ResolutionResult {
|
|
102
|
-
/**
|
|
103
|
-
* Index of the citation this resolves to.
|
|
104
|
-
* undefined if resolution failed
|
|
105
|
-
*/
|
|
106
|
-
resolvedTo?: number;
|
|
107
|
-
/**
|
|
108
|
-
* Reason for resolution failure (if any)
|
|
109
|
-
*/
|
|
110
|
-
failureReason?: string;
|
|
111
|
-
/**
|
|
112
|
-
* Warnings about ambiguous or uncertain resolutions
|
|
113
|
-
*/
|
|
114
|
-
warnings?: string[];
|
|
115
|
-
/**
|
|
116
|
-
* Confidence in the resolution (0-1)
|
|
117
|
-
* Factors: party name similarity, scope boundary, citation type match
|
|
118
|
-
*/
|
|
119
|
-
confidence: number;
|
|
120
|
-
}
|
|
121
|
-
/**
|
|
122
|
-
* Citation with resolution metadata.
|
|
123
|
-
*
|
|
124
|
-
* Uses a distributive conditional type so that `resolution` is only
|
|
125
|
-
* meaningfully present on short-form citations (Id., supra, short-form case).
|
|
126
|
-
* On full citations, `resolution` is typed as `undefined`.
|
|
127
|
-
*/
|
|
128
|
-
type ResolvedCitation<C extends Citation = Citation> = C extends ShortFormCitation ? C & {
|
|
129
|
-
resolution: ResolutionResult | undefined;
|
|
130
|
-
} : C & {
|
|
131
|
-
resolution?: undefined;
|
|
132
|
-
};
|
|
133
|
-
//#endregion
|
|
134
48
|
//#region src/extract/extractCitations.d.ts
|
|
135
49
|
/**
|
|
136
50
|
* Options for customizing citation extraction behavior.
|
|
@@ -195,6 +109,25 @@ interface ExtractOptions {
|
|
|
195
109
|
* ```
|
|
196
110
|
*/
|
|
197
111
|
resolutionOptions?: ResolutionOptions;
|
|
112
|
+
/**
|
|
113
|
+
* Remove citations flagged as likely false positives (default: false).
|
|
114
|
+
*
|
|
115
|
+
* When false (default), flagged citations get reduced confidence (0.1) and a warning.
|
|
116
|
+
* When true, flagged citations are removed from results entirely.
|
|
117
|
+
*
|
|
118
|
+
* False positive detection uses:
|
|
119
|
+
* - A static blocklist of known non-US reporter abbreviations (international, UK, European)
|
|
120
|
+
* - A year plausibility heuristic (years before 1750 predate US legal reporting)
|
|
121
|
+
*
|
|
122
|
+
* @example
|
|
123
|
+
* ```typescript
|
|
124
|
+
* // Remove false positives from results
|
|
125
|
+
* const citations = extractCitations(text, { filterFalsePositives: true })
|
|
126
|
+
* ```
|
|
127
|
+
*/
|
|
128
|
+
filterFalsePositives?: boolean;
|
|
129
|
+
/** Detect footnote zones and annotate citations with inFootnote/footnoteNumber (default: false) */
|
|
130
|
+
detectFootnotes?: boolean;
|
|
198
131
|
}
|
|
199
132
|
/**
|
|
200
133
|
* Extracts legal citations from text using the full parsing pipeline.
|
|
@@ -285,6 +218,16 @@ declare function extractCitationsAsync(text: string, options: ExtractOptions & {
|
|
|
285
218
|
}): Promise<ResolvedCitation[]>;
|
|
286
219
|
declare function extractCitationsAsync(text: string, options?: ExtractOptions): Promise<Citation[]>;
|
|
287
220
|
//#endregion
|
|
221
|
+
//#region src/extract/filterFalsePositives.d.ts
|
|
222
|
+
/**
|
|
223
|
+
* Apply false positive filters to extracted citations.
|
|
224
|
+
*
|
|
225
|
+
* @param citations - Extracted citations (may be mutated in penalize mode)
|
|
226
|
+
* @param remove - If true, remove flagged citations. If false, penalize confidence + add warning.
|
|
227
|
+
* @returns Filtered array (same reference if remove=false, new array if remove=true and items removed)
|
|
228
|
+
*/
|
|
229
|
+
declare function applyFalsePositiveFilters(citations: Citation[], remove: boolean): Citation[];
|
|
230
|
+
//#endregion
|
|
288
231
|
//#region src/clean/cleanText.d.ts
|
|
289
232
|
/**
|
|
290
233
|
* Result of text cleaning operation.
|
|
@@ -305,7 +248,7 @@ interface CleanTextResult {
|
|
|
305
248
|
* cleaned text while reporting positions in the original text.
|
|
306
249
|
*
|
|
307
250
|
* @param original - Original input text
|
|
308
|
-
* @param cleaners - Array of cleaner functions to apply (default: stripHtmlTags, decodeHtmlEntities, normalizeWhitespace, normalizeUnicode, normalizeDashes, fixSmartQuotes)
|
|
251
|
+
* @param cleaners - Array of cleaner functions to apply (default: stripHtmlTags, decodeHtmlEntities, normalizeWhitespace, normalizeUnicode, normalizeDashes, fixSmartQuotes, normalizeTypography, normalizeReporterSpacing)
|
|
309
252
|
* @returns Cleaned text with position mappings and warnings
|
|
310
253
|
*
|
|
311
254
|
* @example
|
|
@@ -425,12 +368,51 @@ declare function tokenize(cleanedText: string, patterns?: Pattern[]): Token[];
|
|
|
425
368
|
*/
|
|
426
369
|
declare function extractCase(token: Token, transformationMap: TransformationMap, cleanedText?: string): FullCaseCitation;
|
|
427
370
|
//#endregion
|
|
428
|
-
//#region src/extract/
|
|
371
|
+
//#region src/extract/extractConstitutional.d.ts
|
|
429
372
|
/**
|
|
430
|
-
*
|
|
431
|
-
*
|
|
373
|
+
* Extract a constitutional citation from a tokenized match.
|
|
374
|
+
*
|
|
375
|
+
* @param token - Tokenized citation candidate from the tokenizer
|
|
376
|
+
* @param transformationMap - Maps cleaned text positions to original text positions
|
|
377
|
+
* @returns Parsed constitutional citation with structured fields
|
|
432
378
|
*/
|
|
433
|
-
declare function
|
|
379
|
+
declare function extractConstitutional(token: Token, transformationMap: TransformationMap): ConstitutionalCitation;
|
|
380
|
+
//#endregion
|
|
381
|
+
//#region src/extract/extractFederalRegister.d.ts
|
|
382
|
+
/**
|
|
383
|
+
* Extracts Federal Register citation metadata from a tokenized citation.
|
|
384
|
+
*
|
|
385
|
+
* Parses token text to extract:
|
|
386
|
+
* - Volume: Federal Register volume number (e.g., "85")
|
|
387
|
+
* - Page: Page number (e.g., "12345")
|
|
388
|
+
* - Year: Optional publication year in parentheses (e.g., "(2021)")
|
|
389
|
+
*
|
|
390
|
+
* Confidence scoring:
|
|
391
|
+
* - 0.9 (Federal Register format is standardized)
|
|
392
|
+
*
|
|
393
|
+
* @param token - Token from tokenizer containing matched text and clean positions
|
|
394
|
+
* @param transformationMap - Position mapping from clean → original text
|
|
395
|
+
* @returns FederalRegisterCitation with parsed metadata and translated positions
|
|
396
|
+
*
|
|
397
|
+
* @example
|
|
398
|
+
* ```typescript
|
|
399
|
+
* const token = {
|
|
400
|
+
* text: "85 Fed. Reg. 12345",
|
|
401
|
+
* span: { cleanStart: 10, cleanEnd: 28 },
|
|
402
|
+
* type: "federalRegister",
|
|
403
|
+
* patternId: "federal-register"
|
|
404
|
+
* }
|
|
405
|
+
* const citation = extractFederalRegister(token, transformationMap)
|
|
406
|
+
* // citation = {
|
|
407
|
+
* // type: "federalRegister",
|
|
408
|
+
* // volume: 85,
|
|
409
|
+
* // page: 12345,
|
|
410
|
+
* // confidence: 0.9,
|
|
411
|
+
* // ...
|
|
412
|
+
* // }
|
|
413
|
+
* ```
|
|
414
|
+
*/
|
|
415
|
+
declare function extractFederalRegister(token: Token, transformationMap: TransformationMap): FederalRegisterCitation;
|
|
434
416
|
//#endregion
|
|
435
417
|
//#region src/extract/extractJournal.d.ts
|
|
436
418
|
/**
|
|
@@ -548,45 +530,31 @@ declare function extractNeutral(token: Token, transformationMap: TransformationM
|
|
|
548
530
|
*/
|
|
549
531
|
declare function extractPublicLaw(token: Token, transformationMap: TransformationMap): PublicLawCitation;
|
|
550
532
|
//#endregion
|
|
551
|
-
//#region src/extract/
|
|
533
|
+
//#region src/extract/extractStatute.d.ts
|
|
552
534
|
/**
|
|
553
|
-
* Extracts
|
|
554
|
-
*
|
|
555
|
-
* Parses token text to extract:
|
|
556
|
-
* - Volume: Federal Register volume number (e.g., "85")
|
|
557
|
-
* - Page: Page number (e.g., "12345")
|
|
558
|
-
* - Year: Optional publication year in parentheses (e.g., "(2021)")
|
|
559
|
-
*
|
|
560
|
-
* Confidence scoring:
|
|
561
|
-
* - 0.9 (Federal Register format is standardized)
|
|
562
|
-
*
|
|
563
|
-
* @param token - Token from tokenizer containing matched text and clean positions
|
|
564
|
-
* @param transformationMap - Position mapping from clean → original text
|
|
565
|
-
* @returns FederalRegisterCitation with parsed metadata and translated positions
|
|
566
|
-
*
|
|
567
|
-
* @example
|
|
568
|
-
* ```typescript
|
|
569
|
-
* const token = {
|
|
570
|
-
* text: "85 Fed. Reg. 12345",
|
|
571
|
-
* span: { cleanStart: 10, cleanEnd: 28 },
|
|
572
|
-
* type: "federalRegister",
|
|
573
|
-
* patternId: "federal-register"
|
|
574
|
-
* }
|
|
575
|
-
* const citation = extractFederalRegister(token, transformationMap)
|
|
576
|
-
* // citation = {
|
|
577
|
-
* // type: "federalRegister",
|
|
578
|
-
* // volume: 85,
|
|
579
|
-
* // page: 12345,
|
|
580
|
-
* // confidence: 0.9,
|
|
581
|
-
* // ...
|
|
582
|
-
* // }
|
|
583
|
-
* ```
|
|
535
|
+
* Extracts statute citation metadata from a tokenized citation.
|
|
536
|
+
* Dispatches to family-specific extractors based on patternId.
|
|
584
537
|
*/
|
|
585
|
-
declare function
|
|
538
|
+
declare function extractStatute(token: Token, transformationMap: TransformationMap): StatuteCitation;
|
|
586
539
|
//#endregion
|
|
587
540
|
//#region src/extract/extractStatutesAtLarge.d.ts
|
|
588
541
|
declare function extractStatutesAtLarge(token: Token, transformationMap: TransformationMap): StatutesAtLargeCitation;
|
|
589
542
|
//#endregion
|
|
543
|
+
//#region src/extract/courtNormalization.d.ts
|
|
544
|
+
/**
|
|
545
|
+
* Normalize a court string extracted from a citation parenthetical.
|
|
546
|
+
*
|
|
547
|
+
* - Collapses spaces after periods: "S.D. N.Y." → "S.D.N.Y."
|
|
548
|
+
* - Ensures trailing period on abbreviated forms: "2d Cir" → "2d Cir."
|
|
549
|
+
* - Returns undefined for empty/undefined input
|
|
550
|
+
*
|
|
551
|
+
* @example
|
|
552
|
+
* normalizeCourt("S.D. N.Y.") // "S.D.N.Y."
|
|
553
|
+
* normalizeCourt("2d Cir") // "2d Cir."
|
|
554
|
+
* normalizeCourt("U.S.") // "U.S."
|
|
555
|
+
*/
|
|
556
|
+
declare function normalizeCourt(court: string | undefined): string | undefined;
|
|
557
|
+
//#endregion
|
|
590
558
|
//#region src/resolve/DocumentResolver.d.ts
|
|
591
559
|
/**
|
|
592
560
|
* Document-scoped resolver that processes citations sequentially
|
|
@@ -671,5 +639,19 @@ declare class DocumentResolver {
|
|
|
671
639
|
*/
|
|
672
640
|
declare function resolveCitations(citations: Citation[], text: string, options?: ResolutionOptions): ResolvedCitation[];
|
|
673
641
|
//#endregion
|
|
674
|
-
|
|
642
|
+
//#region src/footnotes/detectFootnotes.d.ts
|
|
643
|
+
/**
|
|
644
|
+
* Detect footnote zones in text (HTML or plain text).
|
|
645
|
+
*
|
|
646
|
+
* Strategy: if the input contains HTML tags, try HTML structural detection
|
|
647
|
+
* first. If that yields no results (HTML without footnote elements), fall
|
|
648
|
+
* back to plain-text heuristic detection. For non-HTML input, use plain-text
|
|
649
|
+
* detection directly.
|
|
650
|
+
*
|
|
651
|
+
* @param text - Raw input text (HTML or plain text)
|
|
652
|
+
* @returns FootnoteMap with zones in input-text coordinates, sorted by start
|
|
653
|
+
*/
|
|
654
|
+
declare function detectFootnotes(text: string): FootnoteMap;
|
|
655
|
+
//#endregion
|
|
656
|
+
export { type Citation, type CitationBase, type CitationOfType, type CitationSignal, type CitationType, type CleanTextResult, type ConstitutionalCitation, type CourtInference, DocumentResolver, type ExtractOptions, type ExtractorMap, type FederalRegisterCitation, type FootnoteMap, type FootnoteZone, type FullCaseCitation, type FullCitation, type FullCitationType, type HistorySignal, type IdCitation, type JournalCitation, type NeutralCitation, type Parenthetical, type ParentheticalType, type PinciteInfo, type PublicLawCitation, type ResolutionOptions, type ResolutionResult, type ResolvedCitation, type ScopeStrategy, type ShortFormCaseCitation, type ShortFormCitation, type ShortFormCitationType, type Span, type StatuteCitation, type StatutesAtLargeCitation, type SubsequentHistoryEntry, type SupraCitation, type Token, type TransformationMap, type Warning, applyFalsePositiveFilters, assertUnreachable, cleanText, detectFootnotes, extractCase, extractCitations, extractCitationsAsync, extractConstitutional, extractFederalRegister, extractJournal, extractNeutral, extractPublicLaw, extractStatute, extractStatutesAtLarge, isCaseCitation, isCitationType, isFullCitation, isShortFormCitation, normalizeCourt, parsePincite, resolveCitations, tokenize };
|
|
675
657
|
//# sourceMappingURL=index.d.cts.map
|
package/dist/index.d.cts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.cts","names":[],"sources":["../src/types/guards.ts","../src/patterns/casePatterns.ts","../src/
|
|
1
|
+
{"version":3,"file":"index.d.cts","names":[],"sources":["../src/types/guards.ts","../src/patterns/casePatterns.ts","../src/extract/extractCitations.ts","../src/extract/filterFalsePositives.ts","../src/clean/cleanText.ts","../src/tokenize/tokenizer.ts","../src/extract/extractCase.ts","../src/extract/extractConstitutional.ts","../src/extract/extractFederalRegister.ts","../src/extract/extractJournal.ts","../src/extract/extractNeutral.ts","../src/extract/extractPublicLaw.ts","../src/extract/extractStatute.ts","../src/extract/extractStatutesAtLarge.ts","../src/extract/courtNormalization.ts","../src/resolve/DocumentResolver.ts","../src/resolve/index.ts","../src/footnotes/detectFootnotes.ts"],"mappings":";;;;;;;iBAYgB,cAAA,CAAe,QAAA,EAAU,QAAA,GAAW,QAAA,IAAY,YAAA;;;;iBAgBhD,mBAAA,CAAoB,QAAA,EAAU,QAAA,GAAW,QAAA,IAAY,iBAAA;;;;iBAOrD,cAAA,CAAe,QAAA,EAAU,QAAA,GAAW,QAAA,IAAY,gBAAA;;AAPhE;;;iBAegB,cAAA,WAAyB,YAAA,CAAA,CACvC,QAAA,EAAU,QAAA,EACV,IAAA,EAAM,CAAA,GACL,QAAA,IAAY,cAAA,CAAe,CAAA;;;;;;;AAX9B;;;;;;;;;;iBA+BgB,iBAAA,CAAkB,CAAA;;;UClDjB,OAAA;EACf,EAAA;EACA,KAAA,EAAO,MAAA;EACP,WAAA;EACA,IAAA,EAAM,gBAAA;AAAA;;;;ADRR;;UE2CiB,cAAA;EF3C+C;;;;;;;AAgBhE;;;;;;;EE0CE,QAAA,GAAW,KAAA,EAAO,IAAA;;;AFnCpB;;;;;;;;;;AAQA;;EE2CE,QAAA,GAAW,OAAA;;;;;;;;;;;;;;EAeX,OAAA;;;;;AFnCF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NoB;AAoB9B;;;EApB8B,Qe4OpB,gBAAA;EfxNwB;;;;AClDlC;EDkDkC,QewPxB,gBAAA;;;;UAWA,kBAAA;;;;UAUA,iBAAA;;;;UAUA,aAAA;;AblSV;;UamTU,mBAAA;AAAA;;;;;;;AfvUV;;;;;;iBgBFgB,gBAAA,CACd,SAAA,EAAW,QAAA,IACX,IAAA,UACA,OAAA,GAAU,iBAAA,GACT,gBAAA;;;;;;AhBzBH;;;;;;;;iBiBKgB,eAAA,CAAgB,IAAA,WAAe,WAAA"}
|
package/dist/index.d.mts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { S as
|
|
1
|
+
import { A as PinciteInfo, C as StatuteCitation, D as Warning, E as SupraCitation, O as Span, S as ShortFormCitationType, T as SubsequentHistoryEntry, _ as Parenthetical, a as CitationType, b as ShortFormCaseCitation, c as ExtractorMap, d as FullCitation, f as FullCitationType, g as NeutralCitation, h as JournalCitation, i as CitationSignal, j as parsePincite, k as TransformationMap, l as FederalRegisterCitation, m as IdCitation, n as CitationBase, o as ConstitutionalCitation, p as HistorySignal, r as CitationOfType, s as CourtInference, t as Citation, u as FullCaseCitation, v as ParentheticalType, w as StatutesAtLargeCitation, x as ShortFormCitation, y as PublicLawCitation } from "./citation-BwXdJTA9.mjs";
|
|
2
|
+
import { a as FootnoteMap, i as ScopeStrategy, n as ResolutionResult, o as FootnoteZone, r as ResolvedCitation, t as ResolutionOptions } from "./types-BfYnmSHC.mjs";
|
|
2
3
|
|
|
3
4
|
//#region src/types/guards.d.ts
|
|
4
5
|
/**
|
|
5
|
-
* Type guard: narrows Citation to a full citation (case, statute, journal, neutral, publicLaw, federalRegister).
|
|
6
|
+
* Type guard: narrows Citation to a full citation (case, statute, journal, neutral, publicLaw, federalRegister, statutesAtLarge, constitutional).
|
|
6
7
|
*/
|
|
7
8
|
declare function isFullCitation(citation: Citation): citation is FullCitation;
|
|
8
9
|
/**
|
|
@@ -44,93 +45,6 @@ interface Pattern {
|
|
|
44
45
|
type: FullCitationType;
|
|
45
46
|
}
|
|
46
47
|
//#endregion
|
|
47
|
-
//#region src/resolve/types.d.ts
|
|
48
|
-
/**
|
|
49
|
-
* Scope boundary strategy for resolution.
|
|
50
|
-
* Determines how far back to search for antecedent citations.
|
|
51
|
-
*/
|
|
52
|
-
type ScopeStrategy = "paragraph" | "section" | "footnote" | "none";
|
|
53
|
-
/**
|
|
54
|
-
* Options for citation resolution.
|
|
55
|
-
*/
|
|
56
|
-
interface ResolutionOptions {
|
|
57
|
-
/**
|
|
58
|
-
* Scope boundary strategy (default: 'paragraph')
|
|
59
|
-
* - paragraph: Only resolve within same paragraph
|
|
60
|
-
* - section: Only resolve within same section
|
|
61
|
-
* - footnote: Only resolve within same footnote
|
|
62
|
-
* - none: Resolve across entire document
|
|
63
|
-
*/
|
|
64
|
-
scopeStrategy?: ScopeStrategy;
|
|
65
|
-
/**
|
|
66
|
-
* Auto-detect paragraph boundaries from text (default: true)
|
|
67
|
-
* Uses paragraphBoundaryPattern to split text
|
|
68
|
-
*/
|
|
69
|
-
autoDetectParagraphs?: boolean;
|
|
70
|
-
/**
|
|
71
|
-
* Regex pattern to detect paragraph boundaries (default: /\n\n+/)
|
|
72
|
-
* Only used if autoDetectParagraphs is true
|
|
73
|
-
*/
|
|
74
|
-
paragraphBoundaryPattern?: RegExp;
|
|
75
|
-
/**
|
|
76
|
-
* Enable fuzzy party name matching for supra resolution (default: true)
|
|
77
|
-
* Uses Levenshtein distance to handle typos and variations
|
|
78
|
-
*/
|
|
79
|
-
fuzzyPartyMatching?: boolean;
|
|
80
|
-
/**
|
|
81
|
-
* Similarity threshold for fuzzy party matching (default: 0.8)
|
|
82
|
-
* Range: 0-1 where 1.0 is exact match
|
|
83
|
-
* Only used if fuzzyPartyMatching is true
|
|
84
|
-
*/
|
|
85
|
-
partyMatchThreshold?: number;
|
|
86
|
-
/**
|
|
87
|
-
* Allow Id. citations to resolve to other short-form citations (default: false)
|
|
88
|
-
* If true: "Smith v. Jones, 500 F.2d 100" -> "Id." -> "Id. at 105"
|
|
89
|
-
* If false: Second Id. fails to resolve (no full citation between them)
|
|
90
|
-
*/
|
|
91
|
-
allowNestedResolution?: boolean;
|
|
92
|
-
/**
|
|
93
|
-
* Report unresolved citations with failure reasons (default: true)
|
|
94
|
-
* If false: resolution field will be undefined for unresolved citations
|
|
95
|
-
*/
|
|
96
|
-
reportUnresolved?: boolean;
|
|
97
|
-
}
|
|
98
|
-
/**
|
|
99
|
-
* Result of resolving a short-form citation.
|
|
100
|
-
*/
|
|
101
|
-
interface ResolutionResult {
|
|
102
|
-
/**
|
|
103
|
-
* Index of the citation this resolves to.
|
|
104
|
-
* undefined if resolution failed
|
|
105
|
-
*/
|
|
106
|
-
resolvedTo?: number;
|
|
107
|
-
/**
|
|
108
|
-
* Reason for resolution failure (if any)
|
|
109
|
-
*/
|
|
110
|
-
failureReason?: string;
|
|
111
|
-
/**
|
|
112
|
-
* Warnings about ambiguous or uncertain resolutions
|
|
113
|
-
*/
|
|
114
|
-
warnings?: string[];
|
|
115
|
-
/**
|
|
116
|
-
* Confidence in the resolution (0-1)
|
|
117
|
-
* Factors: party name similarity, scope boundary, citation type match
|
|
118
|
-
*/
|
|
119
|
-
confidence: number;
|
|
120
|
-
}
|
|
121
|
-
/**
|
|
122
|
-
* Citation with resolution metadata.
|
|
123
|
-
*
|
|
124
|
-
* Uses a distributive conditional type so that `resolution` is only
|
|
125
|
-
* meaningfully present on short-form citations (Id., supra, short-form case).
|
|
126
|
-
* On full citations, `resolution` is typed as `undefined`.
|
|
127
|
-
*/
|
|
128
|
-
type ResolvedCitation<C extends Citation = Citation> = C extends ShortFormCitation ? C & {
|
|
129
|
-
resolution: ResolutionResult | undefined;
|
|
130
|
-
} : C & {
|
|
131
|
-
resolution?: undefined;
|
|
132
|
-
};
|
|
133
|
-
//#endregion
|
|
134
48
|
//#region src/extract/extractCitations.d.ts
|
|
135
49
|
/**
|
|
136
50
|
* Options for customizing citation extraction behavior.
|
|
@@ -195,6 +109,25 @@ interface ExtractOptions {
|
|
|
195
109
|
* ```
|
|
196
110
|
*/
|
|
197
111
|
resolutionOptions?: ResolutionOptions;
|
|
112
|
+
/**
|
|
113
|
+
* Remove citations flagged as likely false positives (default: false).
|
|
114
|
+
*
|
|
115
|
+
* When false (default), flagged citations get reduced confidence (0.1) and a warning.
|
|
116
|
+
* When true, flagged citations are removed from results entirely.
|
|
117
|
+
*
|
|
118
|
+
* False positive detection uses:
|
|
119
|
+
* - A static blocklist of known non-US reporter abbreviations (international, UK, European)
|
|
120
|
+
* - A year plausibility heuristic (years before 1750 predate US legal reporting)
|
|
121
|
+
*
|
|
122
|
+
* @example
|
|
123
|
+
* ```typescript
|
|
124
|
+
* // Remove false positives from results
|
|
125
|
+
* const citations = extractCitations(text, { filterFalsePositives: true })
|
|
126
|
+
* ```
|
|
127
|
+
*/
|
|
128
|
+
filterFalsePositives?: boolean;
|
|
129
|
+
/** Detect footnote zones and annotate citations with inFootnote/footnoteNumber (default: false) */
|
|
130
|
+
detectFootnotes?: boolean;
|
|
198
131
|
}
|
|
199
132
|
/**
|
|
200
133
|
* Extracts legal citations from text using the full parsing pipeline.
|
|
@@ -285,6 +218,16 @@ declare function extractCitationsAsync(text: string, options: ExtractOptions & {
|
|
|
285
218
|
}): Promise<ResolvedCitation[]>;
|
|
286
219
|
declare function extractCitationsAsync(text: string, options?: ExtractOptions): Promise<Citation[]>;
|
|
287
220
|
//#endregion
|
|
221
|
+
//#region src/extract/filterFalsePositives.d.ts
|
|
222
|
+
/**
|
|
223
|
+
* Apply false positive filters to extracted citations.
|
|
224
|
+
*
|
|
225
|
+
* @param citations - Extracted citations (may be mutated in penalize mode)
|
|
226
|
+
* @param remove - If true, remove flagged citations. If false, penalize confidence + add warning.
|
|
227
|
+
* @returns Filtered array (same reference if remove=false, new array if remove=true and items removed)
|
|
228
|
+
*/
|
|
229
|
+
declare function applyFalsePositiveFilters(citations: Citation[], remove: boolean): Citation[];
|
|
230
|
+
//#endregion
|
|
288
231
|
//#region src/clean/cleanText.d.ts
|
|
289
232
|
/**
|
|
290
233
|
* Result of text cleaning operation.
|
|
@@ -305,7 +248,7 @@ interface CleanTextResult {
|
|
|
305
248
|
* cleaned text while reporting positions in the original text.
|
|
306
249
|
*
|
|
307
250
|
* @param original - Original input text
|
|
308
|
-
* @param cleaners - Array of cleaner functions to apply (default: stripHtmlTags, decodeHtmlEntities, normalizeWhitespace, normalizeUnicode, normalizeDashes, fixSmartQuotes)
|
|
251
|
+
* @param cleaners - Array of cleaner functions to apply (default: stripHtmlTags, decodeHtmlEntities, normalizeWhitespace, normalizeUnicode, normalizeDashes, fixSmartQuotes, normalizeTypography, normalizeReporterSpacing)
|
|
309
252
|
* @returns Cleaned text with position mappings and warnings
|
|
310
253
|
*
|
|
311
254
|
* @example
|
|
@@ -425,12 +368,51 @@ declare function tokenize(cleanedText: string, patterns?: Pattern[]): Token[];
|
|
|
425
368
|
*/
|
|
426
369
|
declare function extractCase(token: Token, transformationMap: TransformationMap, cleanedText?: string): FullCaseCitation;
|
|
427
370
|
//#endregion
|
|
428
|
-
//#region src/extract/
|
|
371
|
+
//#region src/extract/extractConstitutional.d.ts
|
|
429
372
|
/**
|
|
430
|
-
*
|
|
431
|
-
*
|
|
373
|
+
* Extract a constitutional citation from a tokenized match.
|
|
374
|
+
*
|
|
375
|
+
* @param token - Tokenized citation candidate from the tokenizer
|
|
376
|
+
* @param transformationMap - Maps cleaned text positions to original text positions
|
|
377
|
+
* @returns Parsed constitutional citation with structured fields
|
|
432
378
|
*/
|
|
433
|
-
declare function
|
|
379
|
+
declare function extractConstitutional(token: Token, transformationMap: TransformationMap): ConstitutionalCitation;
|
|
380
|
+
//#endregion
|
|
381
|
+
//#region src/extract/extractFederalRegister.d.ts
|
|
382
|
+
/**
|
|
383
|
+
* Extracts Federal Register citation metadata from a tokenized citation.
|
|
384
|
+
*
|
|
385
|
+
* Parses token text to extract:
|
|
386
|
+
* - Volume: Federal Register volume number (e.g., "85")
|
|
387
|
+
* - Page: Page number (e.g., "12345")
|
|
388
|
+
* - Year: Optional publication year in parentheses (e.g., "(2021)")
|
|
389
|
+
*
|
|
390
|
+
* Confidence scoring:
|
|
391
|
+
* - 0.9 (Federal Register format is standardized)
|
|
392
|
+
*
|
|
393
|
+
* @param token - Token from tokenizer containing matched text and clean positions
|
|
394
|
+
* @param transformationMap - Position mapping from clean → original text
|
|
395
|
+
* @returns FederalRegisterCitation with parsed metadata and translated positions
|
|
396
|
+
*
|
|
397
|
+
* @example
|
|
398
|
+
* ```typescript
|
|
399
|
+
* const token = {
|
|
400
|
+
* text: "85 Fed. Reg. 12345",
|
|
401
|
+
* span: { cleanStart: 10, cleanEnd: 28 },
|
|
402
|
+
* type: "federalRegister",
|
|
403
|
+
* patternId: "federal-register"
|
|
404
|
+
* }
|
|
405
|
+
* const citation = extractFederalRegister(token, transformationMap)
|
|
406
|
+
* // citation = {
|
|
407
|
+
* // type: "federalRegister",
|
|
408
|
+
* // volume: 85,
|
|
409
|
+
* // page: 12345,
|
|
410
|
+
* // confidence: 0.9,
|
|
411
|
+
* // ...
|
|
412
|
+
* // }
|
|
413
|
+
* ```
|
|
414
|
+
*/
|
|
415
|
+
declare function extractFederalRegister(token: Token, transformationMap: TransformationMap): FederalRegisterCitation;
|
|
434
416
|
//#endregion
|
|
435
417
|
//#region src/extract/extractJournal.d.ts
|
|
436
418
|
/**
|
|
@@ -548,45 +530,31 @@ declare function extractNeutral(token: Token, transformationMap: TransformationM
|
|
|
548
530
|
*/
|
|
549
531
|
declare function extractPublicLaw(token: Token, transformationMap: TransformationMap): PublicLawCitation;
|
|
550
532
|
//#endregion
|
|
551
|
-
//#region src/extract/
|
|
533
|
+
//#region src/extract/extractStatute.d.ts
|
|
552
534
|
/**
|
|
553
|
-
* Extracts
|
|
554
|
-
*
|
|
555
|
-
* Parses token text to extract:
|
|
556
|
-
* - Volume: Federal Register volume number (e.g., "85")
|
|
557
|
-
* - Page: Page number (e.g., "12345")
|
|
558
|
-
* - Year: Optional publication year in parentheses (e.g., "(2021)")
|
|
559
|
-
*
|
|
560
|
-
* Confidence scoring:
|
|
561
|
-
* - 0.9 (Federal Register format is standardized)
|
|
562
|
-
*
|
|
563
|
-
* @param token - Token from tokenizer containing matched text and clean positions
|
|
564
|
-
* @param transformationMap - Position mapping from clean → original text
|
|
565
|
-
* @returns FederalRegisterCitation with parsed metadata and translated positions
|
|
566
|
-
*
|
|
567
|
-
* @example
|
|
568
|
-
* ```typescript
|
|
569
|
-
* const token = {
|
|
570
|
-
* text: "85 Fed. Reg. 12345",
|
|
571
|
-
* span: { cleanStart: 10, cleanEnd: 28 },
|
|
572
|
-
* type: "federalRegister",
|
|
573
|
-
* patternId: "federal-register"
|
|
574
|
-
* }
|
|
575
|
-
* const citation = extractFederalRegister(token, transformationMap)
|
|
576
|
-
* // citation = {
|
|
577
|
-
* // type: "federalRegister",
|
|
578
|
-
* // volume: 85,
|
|
579
|
-
* // page: 12345,
|
|
580
|
-
* // confidence: 0.9,
|
|
581
|
-
* // ...
|
|
582
|
-
* // }
|
|
583
|
-
* ```
|
|
535
|
+
* Extracts statute citation metadata from a tokenized citation.
|
|
536
|
+
* Dispatches to family-specific extractors based on patternId.
|
|
584
537
|
*/
|
|
585
|
-
declare function
|
|
538
|
+
declare function extractStatute(token: Token, transformationMap: TransformationMap): StatuteCitation;
|
|
586
539
|
//#endregion
|
|
587
540
|
//#region src/extract/extractStatutesAtLarge.d.ts
|
|
588
541
|
declare function extractStatutesAtLarge(token: Token, transformationMap: TransformationMap): StatutesAtLargeCitation;
|
|
589
542
|
//#endregion
|
|
543
|
+
//#region src/extract/courtNormalization.d.ts
|
|
544
|
+
/**
|
|
545
|
+
* Normalize a court string extracted from a citation parenthetical.
|
|
546
|
+
*
|
|
547
|
+
* - Collapses spaces after periods: "S.D. N.Y." → "S.D.N.Y."
|
|
548
|
+
* - Ensures trailing period on abbreviated forms: "2d Cir" → "2d Cir."
|
|
549
|
+
* - Returns undefined for empty/undefined input
|
|
550
|
+
*
|
|
551
|
+
* @example
|
|
552
|
+
* normalizeCourt("S.D. N.Y.") // "S.D.N.Y."
|
|
553
|
+
* normalizeCourt("2d Cir") // "2d Cir."
|
|
554
|
+
* normalizeCourt("U.S.") // "U.S."
|
|
555
|
+
*/
|
|
556
|
+
declare function normalizeCourt(court: string | undefined): string | undefined;
|
|
557
|
+
//#endregion
|
|
590
558
|
//#region src/resolve/DocumentResolver.d.ts
|
|
591
559
|
/**
|
|
592
560
|
* Document-scoped resolver that processes citations sequentially
|
|
@@ -671,5 +639,19 @@ declare class DocumentResolver {
|
|
|
671
639
|
*/
|
|
672
640
|
declare function resolveCitations(citations: Citation[], text: string, options?: ResolutionOptions): ResolvedCitation[];
|
|
673
641
|
//#endregion
|
|
674
|
-
|
|
642
|
+
//#region src/footnotes/detectFootnotes.d.ts
|
|
643
|
+
/**
|
|
644
|
+
* Detect footnote zones in text (HTML or plain text).
|
|
645
|
+
*
|
|
646
|
+
* Strategy: if the input contains HTML tags, try HTML structural detection
|
|
647
|
+
* first. If that yields no results (HTML without footnote elements), fall
|
|
648
|
+
* back to plain-text heuristic detection. For non-HTML input, use plain-text
|
|
649
|
+
* detection directly.
|
|
650
|
+
*
|
|
651
|
+
* @param text - Raw input text (HTML or plain text)
|
|
652
|
+
* @returns FootnoteMap with zones in input-text coordinates, sorted by start
|
|
653
|
+
*/
|
|
654
|
+
declare function detectFootnotes(text: string): FootnoteMap;
|
|
655
|
+
//#endregion
|
|
656
|
+
export { type Citation, type CitationBase, type CitationOfType, type CitationSignal, type CitationType, type CleanTextResult, type ConstitutionalCitation, type CourtInference, DocumentResolver, type ExtractOptions, type ExtractorMap, type FederalRegisterCitation, type FootnoteMap, type FootnoteZone, type FullCaseCitation, type FullCitation, type FullCitationType, type HistorySignal, type IdCitation, type JournalCitation, type NeutralCitation, type Parenthetical, type ParentheticalType, type PinciteInfo, type PublicLawCitation, type ResolutionOptions, type ResolutionResult, type ResolvedCitation, type ScopeStrategy, type ShortFormCaseCitation, type ShortFormCitation, type ShortFormCitationType, type Span, type StatuteCitation, type StatutesAtLargeCitation, type SubsequentHistoryEntry, type SupraCitation, type Token, type TransformationMap, type Warning, applyFalsePositiveFilters, assertUnreachable, cleanText, detectFootnotes, extractCase, extractCitations, extractCitationsAsync, extractConstitutional, extractFederalRegister, extractJournal, extractNeutral, extractPublicLaw, extractStatute, extractStatutesAtLarge, isCaseCitation, isCitationType, isFullCitation, isShortFormCitation, normalizeCourt, parsePincite, resolveCitations, tokenize };
|
|
675
657
|
//# sourceMappingURL=index.d.mts.map
|
package/dist/index.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/types/guards.ts","../src/patterns/casePatterns.ts","../src/
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/types/guards.ts","../src/patterns/casePatterns.ts","../src/extract/extractCitations.ts","../src/extract/filterFalsePositives.ts","../src/clean/cleanText.ts","../src/tokenize/tokenizer.ts","../src/extract/extractCase.ts","../src/extract/extractConstitutional.ts","../src/extract/extractFederalRegister.ts","../src/extract/extractJournal.ts","../src/extract/extractNeutral.ts","../src/extract/extractPublicLaw.ts","../src/extract/extractStatute.ts","../src/extract/extractStatutesAtLarge.ts","../src/extract/courtNormalization.ts","../src/resolve/DocumentResolver.ts","../src/resolve/index.ts","../src/footnotes/detectFootnotes.ts"],"mappings":";;;;;;;iBAYgB,cAAA,CAAe,QAAA,EAAU,QAAA,GAAW,QAAA,IAAY,YAAA;;;;iBAgBhD,mBAAA,CAAoB,QAAA,EAAU,QAAA,GAAW,QAAA,IAAY,iBAAA;;;;iBAOrD,cAAA,CAAe,QAAA,EAAU,QAAA,GAAW,QAAA,IAAY,gBAAA;;AAPhE;;;iBAegB,cAAA,WAAyB,YAAA,CAAA,CACvC,QAAA,EAAU,QAAA,EACV,IAAA,EAAM,CAAA,GACL,QAAA,IAAY,cAAA,CAAe,CAAA;;;;;;;AAX9B;;;;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