@echogarden/text-segmentation 0.2.1 → 0.3.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 CHANGED
@@ -30,7 +30,7 @@ npm install @echogarden/icu-segmentation-wasm
30
30
  import { splitToWords } from '@echogarden/text-segmentation'
31
31
 
32
32
  const wordSequence: WordSequence =
33
- await splitToWords('Hello, world! How are you doing today?', { language: 'en' })
33
+ await splitToWords('Hello, world! How are you doing today?', { language: 'en' })
34
34
 
35
35
  console.log(wordSequence.words)
36
36
  ```
@@ -64,22 +64,22 @@ prints a list of objects, including metadata on each word:
64
64
 
65
65
  ```ts
66
66
  [
67
- { text: 'Hello', startOffset: 0, endOffset: 5, isPunctuation: false },
68
- { text: ',', startOffset: 5, endOffset: 6, isPunctuation: true },
69
- { text: ' ', startOffset: 6, endOffset: 7, isPunctuation: true },
70
- { text: 'world', startOffset: 7, endOffset: 12, isPunctuation: false },
71
- { text: '!', startOffset: 12, endOffset: 13, isPunctuation: true },
72
- { text: ' ', startOffset: 13, endOffset: 14, isPunctuation: true },
73
- { text: 'How', startOffset: 14, endOffset: 17, isPunctuation: false },
74
- { text: ' ', startOffset: 17, endOffset: 18, isPunctuation: true },
75
- { text: 'are', startOffset: 18, endOffset: 21, isPunctuation: false },
76
- { text: ' ', startOffset: 21, endOffset: 22, isPunctuation: true },
77
- { text: 'you', startOffset: 22, endOffset: 25, isPunctuation: false },
78
- { text: ' ', startOffset: 25, endOffset: 26, isPunctuation: true },
79
- { text: 'doing', startOffset: 26, endOffset: 31, isPunctuation: false },
80
- { text: ' ', startOffset: 31, endOffset: 32, isPunctuation: true },
81
- { text: 'today', startOffset: 32, endOffset: 37, isPunctuation: false },
82
- { text: '?', startOffset: 37, endOffset: 38, isPunctuation: true }
67
+ { text: 'Hello', startOffset: 0, endOffset: 5, isPunctuation: false },
68
+ { text: ',', startOffset: 5, endOffset: 6, isPunctuation: true },
69
+ { text: ' ', startOffset: 6, endOffset: 7, isPunctuation: true },
70
+ { text: 'world', startOffset: 7, endOffset: 12, isPunctuation: false },
71
+ { text: '!', startOffset: 12, endOffset: 13, isPunctuation: true },
72
+ { text: ' ', startOffset: 13, endOffset: 14, isPunctuation: true },
73
+ { text: 'How', startOffset: 14, endOffset: 17, isPunctuation: false },
74
+ { text: ' ', startOffset: 17, endOffset: 18, isPunctuation: true },
75
+ { text: 'are', startOffset: 18, endOffset: 21, isPunctuation: false },
76
+ { text: ' ', startOffset: 21, endOffset: 22, isPunctuation: true },
77
+ { text: 'you', startOffset: 22, endOffset: 25, isPunctuation: false },
78
+ { text: ' ', startOffset: 25, endOffset: 26, isPunctuation: true },
79
+ { text: 'doing', startOffset: 26, endOffset: 31, isPunctuation: false },
80
+ { text: ' ', startOffset: 31, endOffset: 32, isPunctuation: true },
81
+ { text: 'today', startOffset: 32, endOffset: 37, isPunctuation: false },
82
+ { text: '?', startOffset: 37, endOffset: 38, isPunctuation: true }
83
83
  ]
84
84
  ```
85
85
 
@@ -87,13 +87,13 @@ prints a list of objects, including metadata on each word:
87
87
 
88
88
  ```ts
89
89
  const result: SegmentationResult =
90
- await segmentText(`Hello, world! How are you doing today?`)
90
+ await segmentText(`Hello, world! How are you doing today?`)
91
91
  ```
92
92
 
93
93
  `result` is a nested object containing a breakdown of sentences, phrases and words in the given text. It is described by these TypeScript types:
94
94
  ```ts
95
95
  interface SegmentationResult {
96
- wordSequence: WordSequence
96
+ words: WordSequence
97
97
  sentences: Sentence[]
98
98
  }
99
99
 
@@ -101,7 +101,7 @@ interface Sentence {
101
101
  text: string
102
102
  charRange: Range
103
103
  wordRange: Range
104
- wordSequence: WordSequence
104
+ words: WordSequence
105
105
 
106
106
  phrases: Phrase[]
107
107
  }
@@ -110,7 +110,7 @@ interface Phrase {
110
110
  text: string
111
111
  charRange: Range
112
112
  wordRange: Range
113
- wordSequence: WordSequence
113
+ words: WordSequence
114
114
  }
115
115
 
116
116
  interface Range {
@@ -140,12 +140,17 @@ There are several types of accepted patterns, evaluated in this order:
140
140
  * Language-specific suppressions. For example, in English it would include abbreviations like `Mr.`, `Mrs.`, `e.g.`, `i.e`, `etc.`, or contractions like and `'cause`, `'bout` in English, `'n` in Afrikaans
141
141
  * Noun suppressions, shared in all languages, like names of brands, misc. abbreviations and programming languages. Examples: `C#`, `F#`, `C++`, `Yahoo!`, `Toys"R"Us`, `Dunkin'`, `Ke$ha`, `Sky+`, `I/O`, `A/C`, `A/V`
142
142
  * Top-level domains, like `.com`, `.org`, `.net` (also doubling as the noun `.NET` as in the ".NET framework")
143
- * Number patterns, consisting of a sequences of digits separated by various separator characters, like decimal separators `3.14`, `3,14`, and thousands separators like `233,421` (`,`), `233.421` (`.`) or `233 421` (` `). optional `-` or `+` signs like `-34,534.123`, `+43 345,344`
144
- * Date, time, and phone number patterns, consisting of digits separated by characters like `/`, `:`, `-`, like `15:23:23`, `1953/11/06`, `64-534-756`
145
- * Percentage patterns, which are a subset of number patterns preceded or followed by `%`, like `53.243%` or `%34.12`
143
+ * Number patterns, consisting of a sequences of digits separated by various separator characters, like decimal separators `3.14`, `3,14`, and thousands separators like `233,421` (`,`), `233.421` (`.`) or `233 421` (` `). optional `-` or `+` signs like `-34,534.123`, `+43 345,344`, or scientific notation like `1.554e-34`
144
+ * Time patterns like `15:12` and `06:34:23`
145
+ * Date patterns like `10/15/2021` (currently disabled)
146
+ * Dimension patterns like `53x545x76`
147
+ * Percentage patterns, which are number patterns preceded or followed by `%`, like `53.243%` or `%34.12`
146
148
  * Currency patterns like `$101.25`, `€50`, `20£`, `-53.23¥`, which, like percentage patterns, are number patterns preceded or followed by a currency symbol
147
149
  * Abbreviation patterns like `Y.M.C.A`: these patterns will be automatically matched (no special suppressions needed) if there is a sequence of single `.` alternating between single letters (like `x.y.z`), optionally, there may be a space between the characters, like `x. y. z.`
148
- * **And finally** (but most importantly): word character sequences consisting of letter characters (Unicode category `Letter`), mark characters (Unicode category `Mark`) or digit characters (Unicode category `Decimal_Number`), which may include inner apostrophes like `'` and `’` and inner separators like `-`, `_` `·`
150
+ * Dot connected word sequences like `abc.def.g12`
151
+ * Underscore connected word sequence `abc_def_g12`
152
+ * Interpunct connected word sequence `abc·def·g12`
153
+ * **And finally**: word character sequences consisting of letter characters (Unicode category `Letter`), mark characters (Unicode category `Mark`) or digit characters (Unicode category `Decimal_Number`), which may include inner apostrophes like `'` and `’` and inner separators like `-`, `_` `·`
149
154
 
150
155
  **Current limitations**:
151
156
  * No current general identification of preceding or trailing apostrophes, like in English possessive plurals "The brothers' friend" or "The diplomats' contracts". **Reason**: this requires a large lexicon or more sophisticated language understanding, since the apostrophe is generally ambiguous with a single quote.
@@ -1,7 +1 @@
1
- export declare const chineseCharacterRanges: import("regexp-composer").AnyOf;
2
- export declare const japaneseHiraganaCharacterRanges: import("regexp-composer").AnyOf;
3
- export declare const japaneseKatakanaCharacterRanges: import("regexp-composer").AnyOf;
4
- export declare const thaiLetterRanges: import("regexp-composer").AnyOf;
5
- export declare const khmerLetterRanges: import("regexp-composer").AnyOf;
6
- export declare const eastAsianCharRanges: import("regexp-composer").AnyOf;
7
1
  export declare const eastAsianCharRangesRegExp: RegExp;
@@ -1,14 +1,14 @@
1
1
  import { anyOf, buildRegExp, codepointRange } from 'regexp-composer';
2
- export const chineseCharacterRanges = anyOf(codepointRange('4E00', '9FFF'), // Main
2
+ const chineseCharacterRanges = anyOf(codepointRange('4E00', '9FFF'), // Main
3
3
  codepointRange('3400', '4DBF'), // CJK Unified Ideographs Extension A
4
4
  codepointRange('20000', '2A6DF') // CJK Unified Ideographs Extension B
5
5
  );
6
- export const japaneseHiraganaCharacterRanges = anyOf(codepointRange('3040', '309F'), // Hiragana
6
+ const japaneseHiraganaCharacterRanges = anyOf(codepointRange('3040', '309F'), // Hiragana
7
7
  codepointRange('1AFF0', '1AFFF'), // Kana Extended-B
8
8
  codepointRange('1B000', '1B0FF'), // Kana Supplement
9
9
  codepointRange('1B100', '1B12F'), // Kana Extended-A
10
10
  codepointRange('1B130', '1B16F'));
11
- export const japaneseKatakanaCharacterRanges = anyOf(codepointRange('30A0', '30FF'), // Katakana
11
+ const japaneseKatakanaCharacterRanges = anyOf(codepointRange('30A0', '30FF'), // Katakana
12
12
  codepointRange('31F0', '31FF'), // Katakana Phonetic Extensions
13
13
  codepointRange('3200', '32FF'), // Enclosed CJK Letters and Months
14
14
  codepointRange('FF00', 'FFEF'), // Halfwidth and Fullwidth Forms
@@ -16,9 +16,9 @@ codepointRange('1AFF0', '1AFFF'), // Kana Extended-B
16
16
  codepointRange('1B000', '1B0FF'), // Kana Supplement
17
17
  codepointRange('1B100', '1B12F'), // Kana Extended-A
18
18
  codepointRange('1B130', '1B16F'));
19
- export const thaiLetterRanges = anyOf(codepointRange('0E00', '0E7F'));
20
- export const khmerLetterRanges = anyOf(codepointRange('1780', '17FF'), // Letters
19
+ const thaiLetterRanges = anyOf(codepointRange('0E00', '0E7F'));
20
+ const khmerLetterRanges = anyOf(codepointRange('1780', '17FF'), // Letters
21
21
  codepointRange('19E0', '19FF'));
22
- export const eastAsianCharRanges = anyOf(chineseCharacterRanges, japaneseHiraganaCharacterRanges, japaneseKatakanaCharacterRanges, thaiLetterRanges, khmerLetterRanges);
22
+ const eastAsianCharRanges = anyOf(chineseCharacterRanges, japaneseHiraganaCharacterRanges, japaneseKatakanaCharacterRanges, thaiLetterRanges, khmerLetterRanges);
23
23
  export const eastAsianCharRangesRegExp = buildRegExp(eastAsianCharRanges);
24
24
  //# sourceMappingURL=EastAsianCharacterPatterns.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"EastAsianCharacterPatterns.js","sourceRoot":"","sources":["../src/EastAsianCharacterPatterns.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAA;AAEpE,MAAM,CAAC,MAAM,sBAAsB,GAAG,KAAK,CAC1C,cAAc,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,OAAO;AACvC,cAAc,CAAC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EAAE,OAAO,CAAC,EAAE,kBAAkB;AACpD,cAAc,CAAC,OAAO,EAAE,OAAO,CAAC,CAChC,CAAA;AAED,MAAM,gBAAgB,GAAG,KAAK,CAC7B,cAAc,CAAC,MAAM,EAAE,MAAM,CAAC,CAC9B,CAAA;AAED,MAAM,iBAAiB,GAAG,KAAK,CAC9B,cAAc,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,UAAU;AAC1C,cAAc,CAAC,MAAM,EAAE,MAAM,CAAC,CAC9B,CAAA;AAED,MAAM,mBAAmB,GAAG,KAAK,CAChC,sBAAsB,EACtB,+BAA+B,EAC/B,+BAA+B,EAC/B,gBAAgB,EAChB,iBAAiB,CACjB,CAAA;AAED,MAAM,CAAC,MAAM,yBAAyB,GAAG,WAAW,CAAC,mBAAmB,CAAC,CAAA"}
@@ -1,34 +1,9 @@
1
1
  export declare function buildWordOrNumberPattern(suppressions: string[]): import("regexp-composer").AnyOf;
2
2
  export declare function buildSuppressionPattern(suppressions: string[]): import("regexp-composer").Pattern;
3
- export declare const punctuationPattern: import("regexp-composer").SpecialToken;
4
- export declare const digitPattern: import("regexp-composer").SpecialToken;
5
- export declare const arabicNumeralPattern: import("regexp-composer").SpecialToken;
6
- export declare const numericSeparatorPattern: import("regexp-composer").Pattern;
7
- export declare const dateTimeSeparatorPattern: import("regexp-composer").Pattern;
8
- export declare const dateTimePattern: import("regexp-composer").OneOrMore;
9
- export declare const spacedThousandsSeparatorPattern: import("regexp-composer").Pattern;
10
- export declare const numericSignPattern: import("regexp-composer").Pattern;
11
- export declare const numberPattern: import("regexp-composer").OneOrMore[];
12
- export declare const prefixPercentageOrCurrencyPattern: import("regexp-composer").Pattern;
13
- export declare const suffixPercentagePattern: import("regexp-composer").Pattern;
14
- export declare const percentagePattern: import("regexp-composer").AnyOf;
15
- export declare const letterPattern: import("regexp-composer").SpecialToken;
16
- export declare const markPattern: import("regexp-composer").SpecialToken;
17
- export declare const apostrophPattern: import("regexp-composer").AnyOf;
18
- export declare const letterOrMarkPattern: import("regexp-composer").AnyOf;
19
- export declare const dottedAbbreviationSequencePattern: import("regexp-composer").Pattern;
20
- export declare const wordCharacterPattern: import("regexp-composer").AnyOf;
21
- export declare const wordSeparatorPattern: import("regexp-composer").Pattern;
22
- export declare const wordInnerApostrophPattern: import("regexp-composer").Pattern;
23
- export declare const wordStartApostrophPattern: import("regexp-composer").Pattern;
24
- export declare const basicWordPattern: import("regexp-composer").OneOrMore;
25
- export declare const wordSegmentPattern: import("regexp-composer").AnyOf;
26
- export declare const phraseSeparators: string[];
3
+ export declare const wordCharacterRegExp: RegExp;
4
+ export declare const whitespacePatternRegExp: RegExp;
5
+ export declare const letterPatternGlobalRegExp: RegExp;
27
6
  export declare const phraseSeparatorRegExp: RegExp;
28
- export declare const sentenceSeparators: string[];
7
+ export declare const phraseSeparatorTrailingPunctuationRegExp: RegExp;
29
8
  export declare const sentenceSeparatorRegExp: RegExp;
30
9
  export declare const sentenceSeparatorTrailingPunctuationRegExp: RegExp;
31
- export declare const phraseSeparatorTrailingPunctuationRegExp: RegExp;
32
- export declare const oneOrMoreSpacesRegExp: RegExp;
33
- export declare const wordCharacterRegExp: RegExp;
34
- export declare const whitespacePatternRegExp: RegExp;
package/dist/Patterns.js CHANGED
@@ -1,4 +1,7 @@
1
- import { anyOf, buildRegExp, charRange, inputEnd, inputStart, matches, oneOrMore, possibly, repeated, tab, unicodeProperty, whitespace } from 'regexp-composer';
1
+ import { anyOf, buildRegExp, charRange, inputEnd, inputStart, matches, oneOrMore, possibly, repeated, tab, unicodeProperty, whitespace, zeroOrMore } from 'regexp-composer';
2
+ ////////////////////////////////////////////////////////////////////////////////////////////////
3
+ // Pattern builder methods
4
+ ////////////////////////////////////////////////////////////////////////////////////////////////
2
5
  export function buildWordOrNumberPattern(suppressions) {
3
6
  return anyOf(buildSuppressionPattern(suppressions), wordSegmentPattern);
4
7
  }
@@ -7,57 +10,96 @@ export function buildSuppressionPattern(suppressions) {
7
10
  return suppressionsPattern;
8
11
  }
9
12
  ////////////////////////////////////////////////////////////////////////////////////////////////
13
+ // Single character patterns
14
+ ////////////////////////////////////////////////////////////////////////////////////////////////
15
+ const letterPattern = unicodeProperty('Letter');
16
+ const markPattern = unicodeProperty('Mark');
17
+ const letterOrMarkPattern = anyOf(letterPattern, markPattern);
18
+ const apostrophPattern = anyOf(`'`, `’`, `‘`);
19
+ const punctuationPattern = unicodeProperty('Punctuation');
20
+ const digitPattern = unicodeProperty('Decimal_Number');
21
+ const arabicNumeralPattern = charRange('0', '9');
22
+ const percentageCharacters = ['%'];
23
+ const currencyCharacters = ['$', '¥', '€', '£', '₩', '₭', '₽', '₫', '฿', '¢', '₮', '؋', '₦', '₱', '₴', '₪'];
24
+ const percentageOrCurrencyCharacterPattern = anyOf(...percentageCharacters, ...currencyCharacters);
25
+ ////////////////////////////////////////////////////////////////////////////////////////////////
10
26
  // Numeric patterns
11
27
  ////////////////////////////////////////////////////////////////////////////////////////////////
12
- export const punctuationPattern = unicodeProperty('Punctuation');
13
- export const digitPattern = unicodeProperty('Decimal_Number');
14
- export const arabicNumeralPattern = charRange('0', '9');
15
- export const numericSeparatorPattern = matches(anyOf('.', ',', '٬', '_'), {
28
+ const numericSeparatorPattern = matches(anyOf('.', ',', '٬', '_'), {
16
29
  ifPrecededBy: arabicNumeralPattern,
17
30
  ifFollowedBy: arabicNumeralPattern
18
31
  });
19
- export const dateTimeSeparatorPattern = matches(anyOf('/', '-', ':'), {
20
- ifPrecededBy: arabicNumeralPattern,
21
- ifFollowedBy: arabicNumeralPattern
32
+ const dimensionsPattern = matches([
33
+ oneOrMore(arabicNumeralPattern),
34
+ oneOrMore([
35
+ 'x',
36
+ oneOrMore(arabicNumeralPattern),
37
+ ]),
38
+ ], {
39
+ ifPrecededBy: anyOf(whitespace, punctuationPattern, inputStart),
40
+ ifFollowedBy: anyOf(whitespace, punctuationPattern, inputEnd)
22
41
  });
23
- export const dateTimePattern = oneOrMore(anyOf(arabicNumeralPattern, dateTimeSeparatorPattern));
24
- export const spacedThousandsSeparatorPattern = matches(' ', {
42
+ const spacedThousandsSeparatorPattern = matches(' ', {
25
43
  ifPrecededBy: arabicNumeralPattern,
26
- ifFollowedBy: repeated(2, arabicNumeralPattern)
44
+ ifFollowedBy: [
45
+ repeated(3, arabicNumeralPattern),
46
+ anyOf(whitespace, punctuationPattern, inputEnd)
47
+ ]
27
48
  });
28
- export const numericSignPattern = matches(anyOf('-', '+'), {
29
- ifPrecededBy: anyOf(whitespace, punctuationPattern),
49
+ const numericSignPattern = matches(anyOf('-', '+'), {
50
+ ifPrecededBy: anyOf(whitespace, punctuationPattern, inputStart),
30
51
  ifFollowedBy: arabicNumeralPattern,
31
52
  });
32
- export const numberPattern = [
33
- oneOrMore(anyOf(digitPattern, numericSeparatorPattern, spacedThousandsSeparatorPattern, numericSignPattern)),
53
+ const numberPattern = [
54
+ possibly(numericSignPattern),
55
+ digitPattern,
56
+ zeroOrMore(anyOf(digitPattern, numericSeparatorPattern, spacedThousandsSeparatorPattern))
57
+ ];
58
+ const exponentPattern = [
59
+ anyOf('e', 'E'),
60
+ possibly(anyOf('+', '-')),
61
+ oneOrMore(arabicNumeralPattern),
62
+ ];
63
+ const numberPossiblyFollowedByExponentOrLettersPattern = [
64
+ numberPattern,
65
+ possibly(anyOf(exponentPattern, matches(zeroOrMore(unicodeProperty('Letter')), {
66
+ ifNotFollowedBy: digitPattern,
67
+ })))
34
68
  ];
35
- const percentageChars = ['%'];
36
- const currencySpecialChars = ['$', '¥', '€', '£', '¥', '₩', '₭', '₽', '₫', '฿', '¢', '₮', '؋', '₦', '₱', '₴', '₪'];
37
- const percentageOrCurrencyPattern = anyOf(...percentageChars, ...currencySpecialChars);
38
- export const prefixPercentageOrCurrencyPattern = matches([
39
- percentageOrCurrencyPattern,
69
+ const precedingPercentageOrCurrencyPattern = matches([
70
+ percentageOrCurrencyCharacterPattern,
40
71
  numberPattern,
41
72
  ], {
42
73
  ifNotPrecededBy: digitPattern,
43
- ifFollowedBy: anyOf(whitespace, punctuationPattern),
74
+ ifFollowedBy: anyOf(whitespace, punctuationPattern, inputEnd),
44
75
  });
45
- export const suffixPercentagePattern = matches([
76
+ const followingPercentageOrCurrencyPattern = matches([
46
77
  numberPattern,
47
- percentageOrCurrencyPattern,
78
+ percentageOrCurrencyCharacterPattern,
79
+ ], {
80
+ ifPrecededBy: anyOf(whitespace, punctuationPattern, inputStart),
81
+ ifNotFollowedBy: anyOf(digitPattern),
82
+ });
83
+ const percentageOrCurrencyPattern = anyOf(precedingPercentageOrCurrencyPattern, followingPercentageOrCurrencyPattern);
84
+ ////////////////////////////////////////////////////////////////////////////////////////////////
85
+ // Time patterns
86
+ ////////////////////////////////////////////////////////////////////////////////////////////////
87
+ const timePattern = matches([
88
+ anyOf(arabicNumeralPattern, [charRange('0', '1'), arabicNumeralPattern], ['2', charRange('0', '3')]),
89
+ repeated([1, 2], [
90
+ ':',
91
+ anyOf(arabicNumeralPattern, [charRange('0', '5'), arabicNumeralPattern]),
92
+ ])
48
93
  ], {
49
- ifPrecededBy: anyOf(whitespace, punctuationPattern),
50
- ifNotFollowedBy: digitPattern,
94
+ ifPrecededBy: anyOf(whitespace, punctuationPattern, inputStart),
95
+ ifNotPrecededBy: ':',
96
+ ifFollowedBy: anyOf(whitespace, punctuationPattern, inputEnd),
97
+ ifNotFollowedBy: ':',
51
98
  });
52
- export const percentagePattern = anyOf(prefixPercentageOrCurrencyPattern, suffixPercentagePattern);
53
99
  ////////////////////////////////////////////////////////////////////////////////////////////////
54
100
  // Letter patterns
55
101
  ////////////////////////////////////////////////////////////////////////////////////////////////
56
- export const letterPattern = unicodeProperty('Letter');
57
- export const markPattern = unicodeProperty('Mark');
58
- export const apostrophPattern = anyOf(`'`, `’`, `‘`);
59
- export const letterOrMarkPattern = anyOf(letterPattern, markPattern);
60
- export const dottedAbbreviationSequencePattern = matches(anyOf([
102
+ const dottedAbbreviationSequencePattern = matches(anyOf([
61
103
  letterPattern,
62
104
  oneOrMore([
63
105
  '. ',
@@ -76,51 +118,84 @@ export const dottedAbbreviationSequencePattern = matches(anyOf([
76
118
  ifNotPrecededBy: anyOf(letterOrMarkPattern, digitPattern),
77
119
  ifNotFollowedBy: anyOf(letterOrMarkPattern, digitPattern)
78
120
  });
79
- export const wordCharacterPattern = anyOf(letterPattern, markPattern, digitPattern);
80
- export const wordSeparatorPattern = matches(anyOf('-', '_', '·', '‧', '&'), {
81
- ifPrecededBy: letterOrMarkPattern,
82
- ifFollowedBy: letterOrMarkPattern
83
- });
84
- export const wordInnerApostrophPattern = matches(apostrophPattern, {
121
+ const wordCharacterPattern = anyOf(letterPattern, markPattern, digitPattern);
122
+ const wordInnerApostrophPattern = matches(apostrophPattern, {
85
123
  ifPrecededBy: letterOrMarkPattern,
86
124
  ifFollowedBy: letterOrMarkPattern,
87
125
  });
88
- export const wordStartApostrophPattern = matches(apostrophPattern, {
126
+ const wordStartApostrophPattern = matches(apostrophPattern, {
89
127
  ifPrecededBy: whitespace,
90
- ifFollowedBy: [letterOrMarkPattern, letterOrMarkPattern, whitespace]
128
+ ifFollowedBy: [letterOrMarkPattern, letterOrMarkPattern, anyOf(whitespace, inputEnd)]
129
+ });
130
+ const basicWordPattern = oneOrMore(anyOf(wordCharacterPattern, wordInnerApostrophPattern));
131
+ const hyphenatedWordPattern = [
132
+ basicWordPattern,
133
+ oneOrMore([
134
+ '-',
135
+ basicWordPattern,
136
+ ]),
137
+ ];
138
+ const dotSeparatedWordPattern = matches([
139
+ basicWordPattern,
140
+ oneOrMore([
141
+ '.',
142
+ basicWordPattern,
143
+ ]),
144
+ ], {
145
+ //ifPrecededBy: anyOf(whitespace, inputStart),
146
+ //ifFollowedBy: anyOf(whitespace, inputEnd)
91
147
  });
92
- export const basicWordPattern = oneOrMore(anyOf(wordCharacterPattern, wordSeparatorPattern, wordInnerApostrophPattern));
93
- export const wordSegmentPattern = anyOf(dottedAbbreviationSequencePattern, dateTimeSeparatorPattern, percentagePattern, numberPattern, basicWordPattern);
148
+ const interpunctSeparatedWordPattern = [
149
+ basicWordPattern,
150
+ oneOrMore([
151
+ anyOf('·', '‧'),
152
+ basicWordPattern,
153
+ ]),
154
+ ];
155
+ const underscoreSeparatedWordPattern = [
156
+ basicWordPattern,
157
+ oneOrMore([
158
+ '_',
159
+ basicWordPattern,
160
+ ]),
161
+ ];
162
+ const wordSegmentPattern = anyOf(timePattern, dimensionsPattern, percentageOrCurrencyPattern, numberPossiblyFollowedByExponentOrLettersPattern, interpunctSeparatedWordPattern, dotSeparatedWordPattern, dottedAbbreviationSequencePattern, underscoreSeparatedWordPattern, basicWordPattern);
94
163
  ////////////////////////////////////////////////////////////////////////////////////////////////
95
- // Prebuilt regular expressions
164
+ // Phrase separation patterns
96
165
  ////////////////////////////////////////////////////////////////////////////////////////////////
97
- export const phraseSeparators = [',', '、', ',', '،', ';', ';', ':', ':', '—'];
98
- export const phraseSeparatorRegExp = buildRegExp([
166
+ const phraseSeparatorCharacters = [',', '、', ',', '،', ';', ';', ':', ':', '—'];
167
+ const phraseSeparatorPattern = [
99
168
  inputStart,
100
- anyOf(...phraseSeparators),
169
+ anyOf(...phraseSeparatorCharacters),
101
170
  inputEnd
102
- ]);
103
- export const sentenceSeparators = ['.', '。', '?', '?', '!', '!', '\n'];
104
- export const sentenceSeparatorRegExp = buildRegExp([
105
- inputStart,
106
- anyOf(...sentenceSeparators),
107
- inputEnd
108
- ]);
109
- export const sentenceSeparatorTrailingPunctuationRegExp = buildRegExp([
171
+ ];
172
+ const phraseSeparatorTrailingPunctuationPattern = [
110
173
  inputStart,
111
- anyOf('"', '”', '’', ')', ']', '}', '»', ...sentenceSeparators, ...phraseSeparators, oneOrMore(whitespace)),
174
+ anyOf(...phraseSeparatorCharacters, ' ', tab),
112
175
  inputEnd
113
- ]);
114
- export const phraseSeparatorTrailingPunctuationRegExp = buildRegExp([
176
+ ];
177
+ ////////////////////////////////////////////////////////////////////////////////////////////////
178
+ // Sentence separation patterns
179
+ ////////////////////////////////////////////////////////////////////////////////////////////////
180
+ const sentenceSeparatorCharacters = ['.', '。', '?', '?', '!', '!', '\n'];
181
+ const sentenceSeparatorPattern = [
115
182
  inputStart,
116
- anyOf(...phraseSeparators, ' ', tab),
183
+ anyOf(...sentenceSeparatorCharacters),
117
184
  inputEnd
118
- ]);
119
- export const oneOrMoreSpacesRegExp = buildRegExp([
185
+ ];
186
+ const sentenceSeparatorTrailingPunctuationPattern = [
120
187
  inputStart,
121
- oneOrMore(' '),
188
+ anyOf('"', '”', '’', ')', ']', '}', '»', ...sentenceSeparatorCharacters, ...phraseSeparatorCharacters, oneOrMore(whitespace)),
122
189
  inputEnd
123
- ]);
190
+ ];
191
+ ////////////////////////////////////////////////////////////////////////////////////////////////
192
+ // Prebuilt regular expressions
193
+ ////////////////////////////////////////////////////////////////////////////////////////////////
124
194
  export const wordCharacterRegExp = buildRegExp(wordCharacterPattern);
125
195
  export const whitespacePatternRegExp = buildRegExp(whitespace);
196
+ export const letterPatternGlobalRegExp = buildRegExp(letterPattern, { global: true });
197
+ export const phraseSeparatorRegExp = buildRegExp(phraseSeparatorPattern);
198
+ export const phraseSeparatorTrailingPunctuationRegExp = buildRegExp(phraseSeparatorTrailingPunctuationPattern);
199
+ export const sentenceSeparatorRegExp = buildRegExp(sentenceSeparatorPattern);
200
+ export const sentenceSeparatorTrailingPunctuationRegExp = buildRegExp(sentenceSeparatorTrailingPunctuationPattern);
126
201
  //# sourceMappingURL=Patterns.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Patterns.js","sourceRoot":"","sources":["../src/Patterns.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,QAAQ,EAAE,UAAU,EAAE,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,QAAQ,EAAE,GAAG,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAE/J,MAAM,UAAU,wBAAwB,CAAC,YAAsB;IAC9D,OAAO,KAAK,CACX,uBAAuB,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W,CAAC,wBAAwB,CAAC,CAAA;AAC5E,MAAM,CAAC,MAAM,0CAA0C,GAAG,WAAW,CAAC,2CAA2C,CAAC,CAAA"}
@@ -1,4 +1,5 @@
1
1
  export declare const cldrSuppressions: Record<string, string[]>;
2
+ export declare const additionalSuppressions: Record<string, string[]>;
2
3
  export declare const leadingApostropheContractionSuppressions: Record<string, string[]>;
3
4
  export declare const nounSuppressions: string[];
4
5
  export declare const tldSuppressions: string[];