@tricoteuses/tisseuse 0.13.12 → 0.14.1
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 +10 -1
- package/dist/{html-DhGw-Yqr.js → html-BuWHzy52.js} +3171 -2933
- package/dist/index.js +65 -65
- package/dist/{resolver-DZS-DNp6.js → resolver-CLdkzY2R.js} +191 -155
- package/dist/server-f-legi.js +26 -17
- package/dist/server.js +1264 -564
- package/dist/src/lib/extractors/article_portions.d.ts +8 -0
- package/dist/src/lib/extractors/links.european.test.d.ts +1 -0
- package/dist/src/lib/extractors/portion_references.d.ts +10 -0
- package/dist/src/lib/extractors/portion_references.test.d.ts +1 -0
- package/dist/src/lib/extractors/quoted_text.d.ts +20 -0
- package/dist/src/lib/extractors/table_of_contents.d.ts +18 -8
- package/dist/src/lib/extractors/table_of_contents.test.d.ts +1 -0
- package/dist/src/lib/index.d.ts +4 -4
- package/dist/src/lib/legi/canutes_resolver_europe.test.d.ts +1 -0
- package/dist/src/lib/server/administrative_acts_autocompletion.d.ts +20 -0
- package/dist/src/lib/server/administrative_acts_autocompletion.test.d.ts +1 -0
- package/dist/src/lib/server/ameli_autocompletion.d.ts +17 -0
- package/dist/src/lib/server/ameli_autocompletion.test.d.ts +1 -0
- package/dist/src/lib/server/bofip_autocompletion.d.ts +22 -0
- package/dist/src/lib/server/bofip_autocompletion.test.d.ts +1 -0
- package/dist/src/lib/server/boss_autocompletion.d.ts +18 -0
- package/dist/src/lib/server/boss_autocompletion.test.d.ts +1 -0
- package/dist/src/lib/server/europe_autocompletion.d.ts +18 -0
- package/dist/src/lib/server/europe_autocompletion.test.d.ts +1 -0
- package/dist/src/lib/server/index.d.ts +2 -1
- package/dist/src/lib/server/international_treaties_autocompletion.d.ts +16 -0
- package/dist/src/lib/server/international_treaties_autocompletion.test.d.ts +1 -0
- package/dist/src/lib/server/local_acts_autocompletion.d.ts +20 -0
- package/dist/src/lib/server/local_acts_autocompletion.test.d.ts +1 -0
- package/dist/src/lib/server/parsed_amendments.d.ts +71 -0
- package/dist/src/lib/server/parsed_amendments.test.d.ts +1 -0
- package/dist/src/lib/server/parsed_bills.d.ts +6 -3
- package/dist/src/lib/server/raa_autocompletion.d.ts +20 -0
- package/dist/src/lib/server/raa_autocompletion.test.d.ts +1 -0
- package/dist/src/lib/server/sync_administrative_act_titles.d.ts +16 -0
- package/dist/src/lib/server/sync_administrative_act_titles.test.d.ts +1 -0
- package/dist/src/lib/server/sync_ameli_titles.d.ts +16 -0
- package/dist/src/lib/server/sync_boss_titles.d.ts +16 -0
- package/dist/src/lib/server/sync_europe_titles.d.ts +16 -0
- package/dist/src/lib/server/sync_international_treaty_titles.d.ts +16 -0
- package/dist/src/lib/server/sync_local_act_titles.d.ts +16 -0
- package/dist/src/lib/server/sync_local_act_titles.test.d.ts +1 -0
- package/dist/src/lib/server/sync_raa_titles.d.ts +16 -0
- package/dist/src/lib/server/typesense_blue_green.d.ts +15 -0
- package/dist/src/lib/server/typesense_blue_green.test.d.ts +1 -0
- package/dist/src/lib/server/typesense_index_lock.d.ts +9 -0
- package/dist/src/lib/server/typesense_index_lock.test.d.ts +1 -0
- package/dist/src/lib/text_parsers/action_citation_patterns.d.ts +2 -0
- package/dist/src/lib/text_parsers/action_citation_patterns.test.d.ts +1 -0
- package/dist/src/lib/text_parsers/action_occurrences.d.ts +3 -0
- package/dist/src/lib/text_parsers/action_occurrences.test.d.ts +1 -0
- package/dist/src/lib/text_parsers/action_position_cues.d.ts +12 -0
- package/dist/src/lib/text_parsers/action_position_cues.test.d.ts +1 -0
- package/dist/src/lib/text_parsers/action_target_scopes.d.ts +7 -0
- package/dist/src/lib/text_parsers/action_words.d.ts +10 -0
- package/dist/src/lib/text_parsers/amendment_action_directives.d.ts +17 -0
- package/dist/src/lib/text_parsers/articles.d.ts +17 -0
- package/dist/src/lib/text_parsers/citations.d.ts +4 -0
- package/dist/src/lib/text_parsers/numbers.d.ts +18 -15
- package/dist/src/lib/text_parsers/portions.d.ts +2 -2
- package/dist/src/lib/text_parsers/repeated_actions.d.ts +4 -0
- package/dist/src/lib/text_parsers/repeated_actions.test.d.ts +1 -0
- package/dist/src/lib/text_parsers/simplifiers.d.ts +1 -1
- package/dist/src/scripts/shared/assemblee_legislature.d.ts +2 -0
- package/dist/src/scripts/shared/assemblee_legislature.test.d.ts +1 -0
- package/dist/src/scripts/shared/checkpoint_cli_options.d.ts +4 -0
- package/dist/src/scripts/shared/checkpoint_cli_options.test.d.ts +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { TextParser } from './parsers.js';
|
|
2
|
+
export type RelativeInsertionCue = "before" | "after";
|
|
3
|
+
export type BoundaryPositionCue = "start" | "end";
|
|
4
|
+
export type ActionPositionCue = RelativeInsertionCue | BoundaryPositionCue;
|
|
5
|
+
export type InsertionOperationKind = "insert_before" | "insert_after";
|
|
6
|
+
export declare const relativeInsertionCuePattern = "(?:avant|apr[e\u00E8]s)";
|
|
7
|
+
export declare const boundaryPositionCuePattern = "(?:(?:au|a[u\u00F9])\\s+d[e\u00E9]but|(?:a|\u00E0)\\s+la\\s+fin)";
|
|
8
|
+
export declare const relativeInsertionCue: TextParser<RelativeInsertionCue>;
|
|
9
|
+
export declare const boundaryPositionCue: TextParser<BoundaryPositionCue>;
|
|
10
|
+
export declare function insertionKindFromRelativeCue(cue: RelativeInsertionCue): InsertionOperationKind;
|
|
11
|
+
export declare function findRelativeInsertionCue(text: string): RelativeInsertionCue | null;
|
|
12
|
+
export declare function findBoundaryPositionCue(text: string): BoundaryPositionCue | null;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { TextAstActionTargetScope, TextAstReference } from './ast.js';
|
|
2
|
+
import { TextParser } from './parsers.js';
|
|
3
|
+
type ActionTargetScopeUnit = NonNullable<TextAstActionTargetScope["unit"]>;
|
|
4
|
+
export declare const actionTargetScope: TextParser;
|
|
5
|
+
export declare function actionTargetScopeUnitFromReference(reference: TextAstReference): ActionTargetScopeUnit | undefined;
|
|
6
|
+
export declare function extractTailAfterTargetScope(text: string): TextAstActionTargetScope | null;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare const ACTION_VERB_RE: RegExp;
|
|
2
|
+
export declare function normalizeActionText(text: string): string;
|
|
3
|
+
export declare function hasActionRedactionIntro(normalizedActionScope: string, normalizedText?: string): boolean;
|
|
4
|
+
export declare function hasAfterCue(normalizedActionScope: string): boolean;
|
|
5
|
+
export declare function hasBeforeCue(normalizedActionScope: string): boolean;
|
|
6
|
+
export declare function hasReestablishAction(normalizedActionScope: string): boolean;
|
|
7
|
+
export declare function hasInsertAction(normalizedActionScope: string): boolean;
|
|
8
|
+
export declare function hasReplaceAction(normalizedActionScope: string): boolean;
|
|
9
|
+
export declare function hasDeleteAction(normalizedActionScope: string): boolean;
|
|
10
|
+
export declare function hasCitationIntroducingAction(normalizedActionScope: string): boolean;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { TextAstActionTargetScope, TextAstCitation, TextAstPosition, TextAstReference } from './ast.js';
|
|
2
|
+
import { TextParser } from './parsers.js';
|
|
3
|
+
export type TextAstAmendmentActionDirective = {
|
|
4
|
+
type: "amendment_action_directive";
|
|
5
|
+
contextText: string;
|
|
6
|
+
kind: "delete_article" | "delete_portion" | "insert_after" | "insert_before" | "insert_article_after" | "insert_article_before" | "replace" | "rewrite_portion";
|
|
7
|
+
insertCitation?: TextAstCitation;
|
|
8
|
+
replacementCitation?: TextAstCitation;
|
|
9
|
+
targetCitation?: TextAstCitation;
|
|
10
|
+
targetReference?: TextAstReference;
|
|
11
|
+
targetScope?: TextAstAmendmentActionTargetScope;
|
|
12
|
+
} & TextAstPosition;
|
|
13
|
+
export type TextAstAmendmentActionTargetScope = TextAstActionTargetScope | {
|
|
14
|
+
type: "head_of_target";
|
|
15
|
+
unit?: "phrase" | "alinéa" | "article";
|
|
16
|
+
};
|
|
17
|
+
export declare const amendmentActionDirective: TextParser;
|
|
@@ -1,3 +1,19 @@
|
|
|
1
|
+
export type BillArticleLabel = {
|
|
2
|
+
label: string;
|
|
3
|
+
num?: string;
|
|
4
|
+
title?: string;
|
|
5
|
+
};
|
|
6
|
+
export type ArticleDefinitionInCitation = {
|
|
7
|
+
num: string;
|
|
8
|
+
position: {
|
|
9
|
+
start: number;
|
|
10
|
+
stop: number;
|
|
11
|
+
};
|
|
12
|
+
start: number;
|
|
13
|
+
};
|
|
14
|
+
export declare function normalizeBillArticleNumber(value: string): string;
|
|
15
|
+
export declare function parseArticleNumber(text: string): string | undefined;
|
|
16
|
+
export declare function parseBillArticleLabel(text: string): BillArticleLabel | null;
|
|
1
17
|
/**
|
|
2
18
|
* Nom spécifique d’un article, par exemple « liminaire »
|
|
3
19
|
*/
|
|
@@ -41,6 +57,7 @@ export declare const nomArticleProjetOuPropositionLoi: import('./parsers.js').Te
|
|
|
41
57
|
* Exemple : « Art. L. 322‑66. - blablabla… en début de ligne
|
|
42
58
|
*/
|
|
43
59
|
export declare const definitionArticleDansCitation: import('./parsers.js').TextParser<import('./ast.js').TextAst>;
|
|
60
|
+
export declare function extractArticleDefinitionsFromCitation(text: string): ArticleDefinitionInCitation[];
|
|
44
61
|
/**
|
|
45
62
|
* Déclaration d'un article dans un projet ou une proposition de loi
|
|
46
63
|
* Exemple : « Article 2 » en début de ligne
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import { TextAst, TextAstCitation } from './ast.js';
|
|
2
2
|
import { TextParserContext } from './parsers.js';
|
|
3
3
|
import { TransformationLeaf } from './transformers.js';
|
|
4
|
+
type TextAstPositionRange = TextAstCitation["position"];
|
|
5
|
+
export declare function createTextAstCitation(contentPosition: TextAstPositionRange, position?: TextAstPositionRange): TextAstCitation;
|
|
4
6
|
export declare const citationLigne: import('./parsers.js').TextParser<TextAst>;
|
|
5
7
|
export declare const citationSimple: import('./parsers.js').TextParser<TextAst>;
|
|
6
8
|
export declare const citation: import('./parsers.js').TextParser<TextAst>;
|
|
7
9
|
export declare function convertCitationToText(context: TextParserContext, citation: TextAstCitation): TransformationLeaf;
|
|
10
|
+
export declare function citationToText(sourceText: string, citation: TextAstCitation): string;
|
|
11
|
+
export {};
|
|
@@ -1,24 +1,27 @@
|
|
|
1
1
|
import { TextAst } from './ast.js';
|
|
2
|
-
|
|
2
|
+
import { TextParser } from './parsers.js';
|
|
3
|
+
export declare const eme: TextParser<TextAst>;
|
|
3
4
|
/**
|
|
4
5
|
* Nombre cardinal ou ordinal
|
|
5
6
|
*/
|
|
6
|
-
export declare const nombreAsTextAstNumber:
|
|
7
|
-
export declare const nombreCardinal:
|
|
8
|
-
export declare const adjectifNumeralOrdinalCourt:
|
|
9
|
-
export declare const nombreRomainCardinal:
|
|
10
|
-
export declare const nombreRomainOrdinal:
|
|
11
|
-
export declare const nombreRomainOu0iAsTextAstNumber:
|
|
12
|
-
export declare const adjectifNumeralCardinalDix:
|
|
13
|
-
export declare const adjectifNumeralCardinalDizaine:
|
|
14
|
-
export declare const adjectifNumeralCardinalUnite:
|
|
15
|
-
export declare const adjectifNumeralCardinalLong:
|
|
16
|
-
export declare const adjectifNumeralCardinal:
|
|
17
|
-
export declare const adjectifNumeralOrdinalLong:
|
|
18
|
-
export declare const adjectifNumeralOrdinal:
|
|
7
|
+
export declare const nombreAsTextAstNumber: TextParser<TextAst>;
|
|
8
|
+
export declare const nombreCardinal: TextParser<TextAst>;
|
|
9
|
+
export declare const adjectifNumeralOrdinalCourt: TextParser<TextAst>;
|
|
10
|
+
export declare const nombreRomainCardinal: TextParser<TextAst>;
|
|
11
|
+
export declare const nombreRomainOrdinal: TextParser<TextAst>;
|
|
12
|
+
export declare const nombreRomainOu0iAsTextAstNumber: TextParser<TextAst>;
|
|
13
|
+
export declare const adjectifNumeralCardinalDix: TextParser<TextAst>;
|
|
14
|
+
export declare const adjectifNumeralCardinalDizaine: TextParser<TextAst>;
|
|
15
|
+
export declare const adjectifNumeralCardinalUnite: TextParser<TextAst>;
|
|
16
|
+
export declare const adjectifNumeralCardinalLong: TextParser<TextAst>;
|
|
17
|
+
export declare const adjectifNumeralCardinal: TextParser<TextAst>;
|
|
18
|
+
export declare const adjectifNumeralOrdinalLong: TextParser<TextAst>;
|
|
19
|
+
export declare const adjectifNumeralOrdinal: TextParser<TextAst>;
|
|
20
|
+
export declare const occurrenceIndexTokenPattern = "[0-9]+(?:e|er|ere|\u00E8re)?|[A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF'\u2019.-]+";
|
|
21
|
+
export declare function parseOccurrenceIndexFromToken(token: string): number | null;
|
|
19
22
|
export declare const multiplicativeLatinSuffixes: Array<{
|
|
20
23
|
pattern: string;
|
|
21
24
|
value: number;
|
|
22
25
|
}>;
|
|
23
26
|
export declare const multiplicativeLatinSuffixPattern: string;
|
|
24
|
-
export declare const adverbeMultiplicatifLatin:
|
|
27
|
+
export declare const adverbeMultiplicatifLatin: TextParser<TextAst>;
|
|
@@ -17,8 +17,8 @@ export declare const numeroPortion: TextParser<import('./ast.js').TextAst>;
|
|
|
17
17
|
*/
|
|
18
18
|
export declare const unePortion: TextParser<import('./ast.js').TextAst>;
|
|
19
19
|
/**
|
|
20
|
-
* Parser pour gérer des formes comme "alinéas 2 et 3"
|
|
21
|
-
*
|
|
20
|
+
* Parser pour gérer des formes comme "alinéas 2 et 3", "alinéas cinq à dix"
|
|
21
|
+
* ou "phrases 1, 2 et 3".
|
|
22
22
|
*/
|
|
23
23
|
export declare const quelquesPortionsNumerotees: TextParser<import('./ast.js').TextAst>;
|
|
24
24
|
export declare const numeroPortionOuUnePortion: TextParser<import('./ast.js').TextAst>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -12,4 +12,4 @@ export declare function simplifyHtml({ removeAWithHref, }?: {
|
|
|
12
12
|
}): TransformerNode;
|
|
13
13
|
export declare function simplifyPlainText(input: string): TransformationNode;
|
|
14
14
|
export declare function simplifyText(input: string): TransformationNode;
|
|
15
|
-
export declare function simplifyUnicodeCharacters(input: string):
|
|
15
|
+
export declare function simplifyUnicodeCharacters(input: string): TransformationNode;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|