@chaffjs/lang-en 0.26.0 → 0.27.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/dist/emphasis.d.ts +14 -1
- package/dist/emphasis.d.ts.map +1 -1
- package/dist/emphasis.js +41 -1
- package/dist/emphasis.js.map +1 -1
- package/dist/pos.d.ts.map +1 -1
- package/dist/pos.js +13 -4
- package/dist/pos.js.map +1 -1
- package/lexicons/clock-range-joiner.yaml +12 -0
- package/lexicons/date-change-word.yaml +5 -0
- package/lexicons/name-joiner.yaml +9 -0
- package/lexicons/name-label.yaml +10 -0
- package/lexicons/name-quote.yaml +7 -0
- package/lexicons/name-stem-suffix.yaml +12 -0
- package/lexicons/name-title-joiner.yaml +9 -0
- package/lexicons/period-deadline.yaml +19 -0
- package/lexicons/period-overview-heading.yaml +10 -0
- package/lexicons/period-term-label.yaml +12 -0
- package/lexicons/proper-name-word.yaml +55 -0
- package/lexicons/requirement-heading.yaml +22 -0
- package/lexicons/requirement-item-ending.yaml +6 -0
- package/lexicons/requirement-length-unit.yaml +10 -0
- package/lexicons/requirement-length-word.yaml +14 -0
- package/lexicons/return-clause.yaml +16 -0
- package/lexicons/return-item.yaml +7 -0
- package/lexicons/return-label.yaml +10 -0
- package/lexicons/return-type-word.yaml +16 -0
- package/lexicons/return-verb.yaml +6 -0
- package/lexicons/session-count-unit.yaml +10 -0
- package/lexicons/session-total.yaml +11 -0
- package/lexicons/travel-time-word.yaml +38 -0
- package/lexicons/working-hours-break.yaml +10 -0
- package/lexicons/working-hours-total.yaml +11 -0
- package/package.json +1 -1
- package/src/emphasis.ts +53 -2
- package/src/pos.ts +11 -5
package/dist/emphasis.d.ts
CHANGED
|
@@ -1,7 +1,20 @@
|
|
|
1
|
+
type TaggedWord = {
|
|
2
|
+
readonly value: string;
|
|
3
|
+
readonly pos: string;
|
|
4
|
+
};
|
|
5
|
+
type TagsOf = (word: string) => readonly string[] | undefined;
|
|
1
6
|
/**
|
|
2
7
|
* The dictionary knows the lower-case word, and only as an adverb (never, always, also). An acronym names a thing, so a word
|
|
3
8
|
* with no noun or adjective reading cannot be one. A word that is also a noun or an adjective (fast, eagle, cheese) is kept:
|
|
4
9
|
* FAST and EAGLE are a telescope and a simulation, and the context tagger cannot tell them from emphasis.
|
|
5
10
|
*/
|
|
6
|
-
export declare const isEmphasisedAdverb: (surface: string, tagsOf:
|
|
11
|
+
export declare const isEmphasisedAdverb: (surface: string, tagsOf: TagsOf) => boolean;
|
|
12
|
+
type WordSpan = {
|
|
13
|
+
readonly start: number;
|
|
14
|
+
readonly end: number;
|
|
15
|
+
};
|
|
16
|
+
export declare const standsAlone: (text: string, span: WordSpan) => boolean;
|
|
17
|
+
/** A capitals word the sentence reads as an English word (not the adverb-only case above), so emphasis and not an acronym. */
|
|
18
|
+
export declare const isEmphasisedWord: (tagged: readonly TaggedWord[], at: number, tagsOf: TagsOf) => boolean;
|
|
19
|
+
export {};
|
|
7
20
|
//# sourceMappingURL=emphasis.d.ts.map
|
package/dist/emphasis.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"emphasis.d.ts","sourceRoot":"","sources":["../src/emphasis.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"emphasis.d.ts","sourceRoot":"","sources":["../src/emphasis.ts"],"names":[],"mappings":"AAoBA,KAAK,UAAU,GAAG;IAAE,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAA;CAAE,CAAC;AAEnE,KAAK,MAAM,GAAG,CAAC,IAAI,EAAE,MAAM,KAAK,SAAS,MAAM,EAAE,GAAG,SAAS,CAAC;AAE9D;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,GAAI,SAAS,MAAM,EAAE,QAAQ,MAAM,KAAG,OAIpE,CAAC;AAyBF,KAAK,QAAQ,GAAG;IAAE,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAA;CAAE,CAAC;AAEjE,eAAO,MAAM,WAAW,GAAI,MAAM,MAAM,EAAE,MAAM,QAAQ,KAAG,OAA2F,CAAC;AAEvJ,8HAA8H;AAC9H,eAAO,MAAM,gBAAgB,GAAI,QAAQ,SAAS,UAAU,EAAE,EAAE,IAAI,MAAM,EAAE,QAAQ,MAAM,KAAG,OAG5F,CAAC"}
|
package/dist/emphasis.js
CHANGED
|
@@ -1,6 +1,17 @@
|
|
|
1
|
-
// A word written in capitals for emphasis (the office will NEVER call you), told from an acronym by the dictionary
|
|
1
|
+
// A word written in capitals for emphasis (the office will NEVER call you), told from an acronym by the dictionary and by how
|
|
2
|
+
// the tagger read it in its sentence.
|
|
2
3
|
const CAPITALS = /^\p{Lu}{2,}$/u;
|
|
4
|
+
const LOWERCASE = /\p{Ll}/u;
|
|
3
5
|
const ADVERB_TAGS = new Set(["RB", "RBR", "RBS"]);
|
|
6
|
+
/**
|
|
7
|
+
* Penn tags of closed word classes: preposition, conjunction, determiner, numeral, pronoun, particle, modal. An acronym names a
|
|
8
|
+
* thing, so it stands where a noun stands, never where one of these does.
|
|
9
|
+
*/
|
|
10
|
+
const CLOSED_CLASS_TAGS = new Set(["IN", "CC", "DT", "PDT", "CD", "PRP", "PRP$", "TO", "RP", "MD", "WDT", "WP", "EX"]);
|
|
11
|
+
/** A determiner or possessive opens a noun phrase: what follows it (the IT team, the US office) is a name, though a numeral may come between (the ONE storm). */
|
|
12
|
+
const NOUN_PHRASE_OPENERS = new Set(["DT", "PDT", "PRP$", "POS"]);
|
|
13
|
+
/** What can stand right before a finite verb in a sentence: a common noun or pronoun subject, or a modal (a hurricane DID form). */
|
|
14
|
+
const SUBJECT_TAGS = new Set(["NN", "NNS", "PRP", "MD"]);
|
|
4
15
|
/**
|
|
5
16
|
* The dictionary knows the lower-case word, and only as an adverb (never, always, also). An acronym names a thing, so a word
|
|
6
17
|
* with no noun or adjective reading cannot be one. A word that is also a noun or an adjective (fast, eagle, cheese) is kept:
|
|
@@ -12,4 +23,33 @@ export const isEmphasisedAdverb = (surface, tagsOf) => {
|
|
|
12
23
|
const tags = tagsOf(surface.toLowerCase()) ?? [];
|
|
13
24
|
return tags.length > 0 && tags.every((tag) => ADVERB_TAGS.has(tag));
|
|
14
25
|
};
|
|
26
|
+
/** After a verb, a word the tagger read as a noun must also be a verb in the dictionary (DID form), or it is what the capitals name (DID token). */
|
|
27
|
+
const canFollowVerb = (next, tagsOf) => !next.pos.startsWith("NN") || (tagsOf(next.value.toLowerCase()) ?? []).includes("VB");
|
|
28
|
+
/**
|
|
29
|
+
* The tagger read the capitals word, in its sentence, as one of the dictionary's readings of the lower-case word, and that
|
|
30
|
+
* reading is a closed class (AFTER the departure, NOR a remote position), or a verb right after its subject (a hurricane DID
|
|
31
|
+
* form). The word sits inside lower-case prose, with a lower-case word on each side: at the start of a sentence (ON
|
|
32
|
+
* Semiconductor), at its end (via IT.) or on a line alone (AT.) there is nothing to read it in. A verb after anything but its
|
|
33
|
+
* subject, or before a noun, stays a name: on the GOES satellites, the states are: LISTEN, the user DID token. Adjectives
|
|
34
|
+
* stay too: the WHOLE month reads like the SAFE framework, and only meaning tells them apart.
|
|
35
|
+
*/
|
|
36
|
+
const isReadAsWord = (tagged, at, tagsOf) => {
|
|
37
|
+
const word = tagged[at];
|
|
38
|
+
const [previous, next] = [tagged[at - 1], tagged[at + 1]];
|
|
39
|
+
if (word === undefined || previous === undefined || next === undefined)
|
|
40
|
+
return false;
|
|
41
|
+
if (!(tagsOf(word.value.toLowerCase()) ?? []).includes(word.pos) || !LOWERCASE.test(previous.value) || !LOWERCASE.test(next.value))
|
|
42
|
+
return false;
|
|
43
|
+
if (CLOSED_CLASS_TAGS.has(word.pos))
|
|
44
|
+
return word.pos === "CD" || !NOUN_PHRASE_OPENERS.has(previous.pos);
|
|
45
|
+
return word.pos.startsWith("VB") && SUBJECT_TAGS.has(previous.pos) && canFollowVerb(next, tagsOf);
|
|
46
|
+
};
|
|
47
|
+
/** A word joined to its neighbour with no space (US-CERT, SOME/2, IT's) is part of a compound, a label or a name, not a word on its own. */
|
|
48
|
+
const JOINED = /[\p{L}\p{N}_&/'’-]/u;
|
|
49
|
+
export const standsAlone = (text, span) => !JOINED.test(text.charAt(span.start - 1)) && !JOINED.test(text.charAt(span.end));
|
|
50
|
+
/** A capitals word the sentence reads as an English word (not the adverb-only case above), so emphasis and not an acronym. */
|
|
51
|
+
export const isEmphasisedWord = (tagged, at, tagsOf) => {
|
|
52
|
+
const surface = tagged[at]?.value ?? "";
|
|
53
|
+
return CAPITALS.test(surface) && isReadAsWord(tagged, at, tagsOf);
|
|
54
|
+
};
|
|
15
55
|
//# sourceMappingURL=emphasis.js.map
|
package/dist/emphasis.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"emphasis.js","sourceRoot":"","sources":["../src/emphasis.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"emphasis.js","sourceRoot":"","sources":["../src/emphasis.ts"],"names":[],"mappings":"AAAA,8HAA8H;AAC9H,sCAAsC;AAEtC,MAAM,QAAQ,GAAG,eAAe,CAAC;AACjC,MAAM,SAAS,GAAG,SAAS,CAAC;AAE5B,MAAM,WAAW,GAAwB,IAAI,GAAG,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC;AAEvE;;;GAGG;AACH,MAAM,iBAAiB,GAAwB,IAAI,GAAG,CAAC,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC;AAE5I,iKAAiK;AACjK,MAAM,mBAAmB,GAAwB,IAAI,GAAG,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC,CAAC;A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AAC;AACpE,CAAC,CAAC"}
|
package/dist/pos.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pos.d.ts","sourceRoot":"","sources":["../src/pos.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAkF5C,eAAO,MAAM,IAAI,GAAI,KAAK,MAAM,KAAG,MAAiE,CAAC;AAkJrG,eAAO,MAAM,OAAO,QAAO,IAI1B,CAAC;AAEF,eAAO,MAAM,OAAO,QAAO,OAAoC,CAAC;
|
|
1
|
+
{"version":3,"file":"pos.d.ts","sourceRoot":"","sources":["../src/pos.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAkF5C,eAAO,MAAM,IAAI,GAAI,KAAK,MAAM,KAAG,MAAiE,CAAC;AAkJrG,eAAO,MAAM,OAAO,QAAO,IAI1B,CAAC;AAEF,eAAO,MAAM,OAAO,QAAO,OAAoC,CAAC;AAiDhE,eAAO,MAAM,QAAQ,GAAI,MAAM,MAAM,KAAG,KAAK,EAAE,GAAG,SAMjD,CAAC"}
|
package/dist/pos.js
CHANGED
|
@@ -3,7 +3,7 @@ import { loadLexicons } from "./lexicons.js";
|
|
|
3
3
|
import { blankLongRuns } from "./long-runs.js";
|
|
4
4
|
import { lowercasedAt, properNounChecked, rereadAt, sentenceInitialCommonWord } from "./proper-noun.js";
|
|
5
5
|
import { isStativeParticiple, stativeVocabulary } from "./stative-participle.js";
|
|
6
|
-
import { isEmphasisedAdverb } from "./emphasis.js";
|
|
6
|
+
import { isEmphasisedAdverb, isEmphasisedWord, standsAlone } from "./emphasis.js";
|
|
7
7
|
import { gerundFeatures } from "./gerund.js";
|
|
8
8
|
import { winkLexiconWords, winkPosTagger } from "./wink-modules.js";
|
|
9
9
|
const isRecord = (value) => typeof value === "object" && value !== null;
|
|
@@ -197,8 +197,17 @@ export const prepare = () => {
|
|
|
197
197
|
state.vocabulary = buildVocabulary();
|
|
198
198
|
};
|
|
199
199
|
export const isReady = () => state.ready !== undefined;
|
|
200
|
-
/**
|
|
201
|
-
|
|
200
|
+
/**
|
|
201
|
+
* 大文字で強調した副詞(NEVER)は、解析器が名前と付けても副詞。文の中で前置詞や動詞として読めた語(AFTER the departure、
|
|
202
|
+
* a hurricane DID form)は、解析器の読みのまま。どちらも Emph=Yes で、略語ではないと detector に伝える。
|
|
203
|
+
*/
|
|
204
|
+
const withEmphasis = (token, text, tagged, at) => {
|
|
205
|
+
if (isEmphasisedAdverb(token.surface, state.vocabulary))
|
|
206
|
+
return { ...token, pos: "ADV", lemma: token.surface.toLowerCase(), features: { Emph: "Yes" } };
|
|
207
|
+
if (!standsAlone(text, token.span) || !isEmphasisedWord(tagged, at, state.vocabulary))
|
|
208
|
+
return token;
|
|
209
|
+
return { ...token, lemma: (token.lemma ?? token.surface).toLowerCase(), features: { ...token.features, Emph: "Yes" } };
|
|
210
|
+
};
|
|
202
211
|
/**
|
|
203
212
|
* wink は位置を返さないので、表層を順に照合して復元する。
|
|
204
213
|
* 見つからないものは飛ばし、カーソルは進めない。位置の当てずっぽうを下流に流さない。
|
|
@@ -219,7 +228,7 @@ const locate = (text, tagged) => {
|
|
|
219
228
|
...(entry.lemma === undefined ? {} : { lemma: entry.lemma }),
|
|
220
229
|
...featuresOf(tagged, at),
|
|
221
230
|
};
|
|
222
|
-
tokens.push(withEmphasis(token));
|
|
231
|
+
tokens.push(withEmphasis(token, text, tagged, at));
|
|
223
232
|
cursor = end;
|
|
224
233
|
});
|
|
225
234
|
return tokens;
|
package/dist/pos.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pos.js","sourceRoot":"","sources":["../src/pos.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EAAE,aAAa,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MAAM,EAAE,aAAa,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;AAExI,kEAAkE;AAClE,MAAM,uBAAuB,GAAG,CAAC,MAAc,EAAE,IAAY,EAAE,OAA0B,EAAqB,EAAE;IAC9G,MAAM,EAAE,GAAG,yBAAyB,CAAC,OAAO,EAAE,KAAK,CAAC,UAAU,CAAC,CAAC;IAChE,MAAM,OAAO,GAAG,YAAY,CAAC,IAAI,EAAE,OAAO,CAAC,EAAE,CAAC,EAAE,KAAK,CAAC,CAAC;IACvD,OAAO,OAAO,KAAK,SAAS,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,QAAQ,CAAC,OAAO,EAAE,EAAE,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;AAC1F,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,IAAY,EAAuB,EAAE;IAC5D,MAAM,MAAM,GAAG,KAAK,CAAC,KAAK,CAAC;IAC3B,IAAI,MAAM,KAAK,SAAS;QAAE,OAAO,SAAS,CAAC;IAC3C,qDAAqD;IACrD,MAAM,KAAK,GAAG,mBAAmB,CAAC,aAAa,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC,CAAC;IAClE,OAAO,MAAM,CAAC,KAAK,EAAE,uBAAuB,CAAC,MAAM,EAAE,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC;AACtF,CAAC,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# What alone between two clock times makes a range of time ("9:00–17:30", "9 a.m. to 5:30 p.m.") (duration-mismatch, working hours).
|
|
2
|
+
id: clock-range-joiner
|
|
3
|
+
language: en
|
|
4
|
+
entries:
|
|
5
|
+
- pattern: "-"
|
|
6
|
+
- pattern: –
|
|
7
|
+
- pattern: —
|
|
8
|
+
- pattern: "~"
|
|
9
|
+
- pattern: to
|
|
10
|
+
- pattern: until
|
|
11
|
+
- pattern: till
|
|
12
|
+
- pattern: through
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# Small words inside one capitalised name (Statement of Work, Trials and Betas, the Office of Foreign Assets Control).
|
|
2
|
+
# undefined-term reads a run of capitalised words across them, so "Work" alone is not taken for a term. Matched as written.
|
|
3
|
+
id: name-joiner
|
|
4
|
+
language: en
|
|
5
|
+
entries:
|
|
6
|
+
- pattern: of
|
|
7
|
+
- pattern: for
|
|
8
|
+
- pattern: and
|
|
9
|
+
- pattern: in
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# Labels a name is written after ("Prerequisite: Foundations of Statistics"). name-variant reads what follows the colon, up
|
|
2
|
+
# to the punctuation, as a name, and compares it with names written with the same words in another order.
|
|
3
|
+
id: name-label
|
|
4
|
+
language: en
|
|
5
|
+
entries:
|
|
6
|
+
- pattern: Prerequisite
|
|
7
|
+
- pattern: Prerequisites
|
|
8
|
+
- pattern: Course
|
|
9
|
+
- pattern: Course name
|
|
10
|
+
- pattern: Course title
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
# Quotation marks around a name ("Data Lab"), the opening and the closing mark as one pair. name-variant reads a short run
|
|
2
|
+
# of words inside them as a name, and compares names written with the same words in another order.
|
|
3
|
+
id: name-quote
|
|
4
|
+
language: en
|
|
5
|
+
entries:
|
|
6
|
+
- pattern: “”
|
|
7
|
+
- pattern: '""'
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# Endings taken off a word before two names are compared for the same words in another order: "Statistics" and
|
|
2
|
+
# "Statistical" are both "statist", so "Foundations of Statistics" and "Statistical Foundations" hold the same words.
|
|
3
|
+
# The longest ending that leaves four letters or more is taken off, one only.
|
|
4
|
+
id: name-stem-suffix
|
|
5
|
+
language: en
|
|
6
|
+
entries:
|
|
7
|
+
- pattern: ical
|
|
8
|
+
- pattern: ics
|
|
9
|
+
- pattern: ic
|
|
10
|
+
- pattern: al
|
|
11
|
+
- pattern: es
|
|
12
|
+
- pattern: s
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# Small words inside a Title Case name ("Foundations of Statistics", "Bank of the West"). name-variant reads capitalised
|
|
2
|
+
# words across them as one name when it compares names written with the same words in another order. "and", "to" and
|
|
3
|
+
# "with" are left out: across them stand two names ("Texas and Florida"), not one.
|
|
4
|
+
id: name-title-joiner
|
|
5
|
+
language: en
|
|
6
|
+
entries:
|
|
7
|
+
- pattern: of
|
|
8
|
+
- pattern: for
|
|
9
|
+
- pattern: the
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Words that mark a deadline for the work of the period ("Submit the assignment by …", "Deadline: …"). For a period stated
|
|
2
|
+
# at the top of the document or in its overview section ("Term: …"), date-outside-period reports a dated item or sentence
|
|
3
|
+
# anywhere later that holds one of these and a date with a year after the period ends. Payment deadlines may fall after the
|
|
4
|
+
# period, so they are left out (period-aside keeps them silent).
|
|
5
|
+
id: period-deadline
|
|
6
|
+
language: en
|
|
7
|
+
entries:
|
|
8
|
+
- pattern: deadline
|
|
9
|
+
# Not "due" alone: "cancelled due to maintenance" names no deadline.
|
|
10
|
+
- pattern: due on
|
|
11
|
+
- pattern: due by
|
|
12
|
+
- pattern: due date
|
|
13
|
+
- pattern: is due
|
|
14
|
+
- pattern: are due
|
|
15
|
+
- pattern: "due:"
|
|
16
|
+
- pattern: submit
|
|
17
|
+
- pattern: submission
|
|
18
|
+
- pattern: hand in
|
|
19
|
+
- pattern: turn in
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# Words of a heading over what holds for the whole document ("Course overview", "Basic information"). A period line in
|
|
2
|
+
# such a section ("Term: …") is the document's period, and date-outside-period compares it with the deadlines
|
|
3
|
+
# (period-deadline) of every later section.
|
|
4
|
+
id: period-overview-heading
|
|
5
|
+
language: en
|
|
6
|
+
entries:
|
|
7
|
+
- pattern: overview
|
|
8
|
+
- pattern: basic information
|
|
9
|
+
- pattern: general information
|
|
10
|
+
- pattern: at a glance
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# Words that open a line stating the period the document's work is done in ("Term: October 6, 2026 to February 5, 2027").
|
|
2
|
+
# When stated at the top of the document or in its overview section, a deadline
|
|
3
|
+
# (period-deadline) in any later section that falls after the period's end is reported by date-outside-period. Trip and
|
|
4
|
+
# conference dates are left out: an expense report may be due after the trip.
|
|
5
|
+
id: period-term-label
|
|
6
|
+
language: en
|
|
7
|
+
entries:
|
|
8
|
+
- pattern: Course dates
|
|
9
|
+
- pattern: Class dates
|
|
10
|
+
- pattern: Term dates
|
|
11
|
+
- pattern: Semester
|
|
12
|
+
- pattern: Term
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# Words that make a capitalised run a name, not a term the document defines: of a law or a document (the Federal Trade
|
|
2
|
+
# Commission Act, Acceptable Use Policies, the GitHub Privacy Statement), of a body (the Department of Commerce), of a place
|
|
3
|
+
# (the State of New York), of the parties (the Parties, the Indemnifying Party), and words English capitalises by convention (the Internet). undefined-term leaves every run that
|
|
4
|
+
# holds one of these, in its singular or plural form, as it leaves places (place-region), weekdays and months, company
|
|
5
|
+
# forms and party roles. Matched as written, word by word.
|
|
6
|
+
id: proper-name-word
|
|
7
|
+
language: en
|
|
8
|
+
entries:
|
|
9
|
+
- pattern: Act
|
|
10
|
+
- pattern: Regulation
|
|
11
|
+
- pattern: Directive
|
|
12
|
+
- pattern: Code
|
|
13
|
+
- pattern: Statute
|
|
14
|
+
- pattern: Treaty
|
|
15
|
+
- pattern: Convention
|
|
16
|
+
- pattern: Law
|
|
17
|
+
- pattern: Rule
|
|
18
|
+
- pattern: Guideline
|
|
19
|
+
- pattern: Policy
|
|
20
|
+
- pattern: Agreement
|
|
21
|
+
- pattern: Contract
|
|
22
|
+
- pattern: Terms
|
|
23
|
+
- pattern: Conditions
|
|
24
|
+
- pattern: Statement
|
|
25
|
+
- pattern: Addendum
|
|
26
|
+
- pattern: Amendment
|
|
27
|
+
- pattern: Notice
|
|
28
|
+
- pattern: Commission
|
|
29
|
+
- pattern: Authority
|
|
30
|
+
- pattern: Agency
|
|
31
|
+
- pattern: Department
|
|
32
|
+
- pattern: Office
|
|
33
|
+
- pattern: Bureau
|
|
34
|
+
- pattern: Board
|
|
35
|
+
- pattern: Committee
|
|
36
|
+
- pattern: Council
|
|
37
|
+
- pattern: Ministry
|
|
38
|
+
- pattern: Government
|
|
39
|
+
- pattern: Court
|
|
40
|
+
- pattern: Union
|
|
41
|
+
- pattern: Nations
|
|
42
|
+
- pattern: Corporation
|
|
43
|
+
- pattern: Foundation
|
|
44
|
+
- pattern: Association
|
|
45
|
+
- pattern: Institute
|
|
46
|
+
- pattern: University
|
|
47
|
+
- pattern: List
|
|
48
|
+
- pattern: State
|
|
49
|
+
- pattern: City
|
|
50
|
+
- pattern: County
|
|
51
|
+
- pattern: Province
|
|
52
|
+
- pattern: Republic
|
|
53
|
+
- pattern: Kingdom
|
|
54
|
+
- pattern: Internet
|
|
55
|
+
- pattern: Party
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Headings and labels of the conditions of a job posting (required-listed-as-preferred). group required is what an applicant
|
|
2
|
+
# must have, preferred what is welcome. A heading is matched by its part before a colon or bracket, a label standing alone
|
|
3
|
+
# on its line ("Required:") by the whole line; case and hyphens are ignored.
|
|
4
|
+
id: requirement-heading
|
|
5
|
+
language: en
|
|
6
|
+
entries:
|
|
7
|
+
- { pattern: required, group: required }
|
|
8
|
+
- { pattern: requirements, group: required }
|
|
9
|
+
- { pattern: required skills, group: required }
|
|
10
|
+
- { pattern: required qualifications, group: required }
|
|
11
|
+
- { pattern: required experience, group: required }
|
|
12
|
+
- { pattern: minimum qualifications, group: required }
|
|
13
|
+
- { pattern: basic qualifications, group: required }
|
|
14
|
+
- { pattern: must have, group: required }
|
|
15
|
+
- { pattern: must haves, group: required }
|
|
16
|
+
- { pattern: preferred, group: preferred }
|
|
17
|
+
- { pattern: preferred skills, group: preferred }
|
|
18
|
+
- { pattern: preferred qualifications, group: preferred }
|
|
19
|
+
- { pattern: preferred experience, group: preferred }
|
|
20
|
+
- { pattern: nice to have, group: preferred }
|
|
21
|
+
- { pattern: nice to haves, group: preferred }
|
|
22
|
+
- { pattern: bonus points, group: preferred }
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# Units of a length of experience (required-listed-as-preferred), weight in months. The length is taken out of "3+ years of
|
|
2
|
+
# Python" to compare the skill, and decides whether the preferred item asks for more.
|
|
3
|
+
id: requirement-length-unit
|
|
4
|
+
language: en
|
|
5
|
+
entries:
|
|
6
|
+
- { pattern: year, weight: 12 }
|
|
7
|
+
- { pattern: years, weight: 12 }
|
|
8
|
+
- { pattern: yrs, weight: 12 }
|
|
9
|
+
- { pattern: month, weight: 1 }
|
|
10
|
+
- { pattern: months, weight: 1 }
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# Words taken out with a length of experience (required-listed-as-preferred): before stands before the number ("at least"),
|
|
2
|
+
# after follows the unit ("or more", "of"). Matched as whole words, without regard to case.
|
|
3
|
+
id: requirement-length-word
|
|
4
|
+
language: en
|
|
5
|
+
entries:
|
|
6
|
+
- { pattern: at least, group: before }
|
|
7
|
+
- { pattern: a minimum of, group: before }
|
|
8
|
+
- { pattern: minimum of, group: before }
|
|
9
|
+
- { pattern: minimum, group: before }
|
|
10
|
+
- { pattern: over, group: before }
|
|
11
|
+
- { pattern: more than, group: before }
|
|
12
|
+
- { pattern: or more, group: after }
|
|
13
|
+
- { pattern: plus, group: after }
|
|
14
|
+
- { pattern: of, group: after }
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# The words that open a clause about when or what, so a type word after them is not the returned one (return-type-mismatch):
|
|
2
|
+
# in "returns true when the string is empty", string names the input. Only the words before the first of these are read.
|
|
3
|
+
id: return-clause
|
|
4
|
+
language: en
|
|
5
|
+
entries:
|
|
6
|
+
- pattern: when
|
|
7
|
+
- pattern: whenever
|
|
8
|
+
- pattern: if
|
|
9
|
+
- pattern: unless
|
|
10
|
+
- pattern: where
|
|
11
|
+
- pattern: while
|
|
12
|
+
- pattern: until
|
|
13
|
+
- pattern: that
|
|
14
|
+
- pattern: which
|
|
15
|
+
- pattern: whose
|
|
16
|
+
- pattern: for
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
# The words that make a type word one item of the result, not the result (return-type-mismatch): "returns one string per
|
|
2
|
+
# line" returns an array. A type word followed by one of these is not read.
|
|
3
|
+
id: return-item
|
|
4
|
+
language: en
|
|
5
|
+
entries:
|
|
6
|
+
- pattern: per
|
|
7
|
+
- pattern: each
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# The label of a line that states what a function returns (Returns: `string[]`), and the header of a table column that
|
|
2
|
+
# does (return-type-mismatch).
|
|
3
|
+
id: return-label
|
|
4
|
+
language: en
|
|
5
|
+
entries:
|
|
6
|
+
- pattern: Returns
|
|
7
|
+
- pattern: Return
|
|
8
|
+
- pattern: Return value
|
|
9
|
+
- pattern: Return values
|
|
10
|
+
- pattern: Return type
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# The words that name a kind of value in a sentence or a cell, and the kind (group) each names (return-type-mismatch):
|
|
2
|
+
# "returns the width as a string" says string. A type in code (string[], int) is read by the rule itself.
|
|
3
|
+
id: return-type-word
|
|
4
|
+
language: en
|
|
5
|
+
entries:
|
|
6
|
+
- { pattern: string, group: string }
|
|
7
|
+
- { pattern: strings, group: string }
|
|
8
|
+
- { pattern: number, group: number }
|
|
9
|
+
- { pattern: numbers, group: number }
|
|
10
|
+
- { pattern: integer, group: number }
|
|
11
|
+
- { pattern: integers, group: number }
|
|
12
|
+
- { pattern: boolean, group: boolean }
|
|
13
|
+
- { pattern: booleans, group: boolean }
|
|
14
|
+
- { pattern: array, group: array }
|
|
15
|
+
- { pattern: arrays, group: array }
|
|
16
|
+
- { pattern: list, group: array }
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
# The verb of a sentence that says what a function returns, right after the function's name: "measure returns a number"
|
|
2
|
+
# (return-type-mismatch). The past (returned) tells history, as a changelog does, and is not read.
|
|
3
|
+
id: return-verb
|
|
4
|
+
language: en
|
|
5
|
+
entries:
|
|
6
|
+
- pattern: returns
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# Units of a number of sessions (duration-product-mismatch). The count times the length of one is compared with the stated total ("15 sessions of 90 minutes").
|
|
2
|
+
id: session-count-unit
|
|
3
|
+
language: en
|
|
4
|
+
entries:
|
|
5
|
+
- pattern: sessions
|
|
6
|
+
- pattern: classes
|
|
7
|
+
- pattern: lessons
|
|
8
|
+
- pattern: lectures
|
|
9
|
+
- pattern: meetings
|
|
10
|
+
- pattern: weeks
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# Words beside the total of a number of sessions times their length (duration-product-mismatch). before: written before the length ("a total of 24 hours"); after: behind it ("24 hours in total").
|
|
2
|
+
id: session-total
|
|
3
|
+
language: en
|
|
4
|
+
entries:
|
|
5
|
+
- { pattern: "total", position: before }
|
|
6
|
+
- { pattern: "total of", position: before }
|
|
7
|
+
- { pattern: "in total", position: before }
|
|
8
|
+
- { pattern: "in total", position: after }
|
|
9
|
+
- { pattern: "total", position: after }
|
|
10
|
+
- { pattern: "altogether", position: after }
|
|
11
|
+
- { pattern: "in all", position: after }
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# The words that make a length of time a travel time (connection-time-short). Group travel names a move: a length in
|
|
2
|
+
# the same sentence ("25 minutes by Metro", "allow 45 minutes") is read as the time it takes. Group bound makes a length
|
|
3
|
+
# an upper limit ("within 10 minutes"), which is not used. position says on which side of the length a bound is written.
|
|
4
|
+
# Matched as whole words, case aside.
|
|
5
|
+
id: travel-time-word
|
|
6
|
+
language: en
|
|
7
|
+
entries:
|
|
8
|
+
- { pattern: "travel", group: travel }
|
|
9
|
+
- { pattern: "travel time", group: travel }
|
|
10
|
+
- { pattern: "transfer", group: travel }
|
|
11
|
+
- { pattern: "connection", group: travel }
|
|
12
|
+
- { pattern: "minimum connection time", group: travel }
|
|
13
|
+
- { pattern: "allow", group: travel }
|
|
14
|
+
- { pattern: "walk", group: travel }
|
|
15
|
+
- { pattern: "walking", group: travel }
|
|
16
|
+
- { pattern: "on foot", group: travel }
|
|
17
|
+
- { pattern: "drive", group: travel }
|
|
18
|
+
- { pattern: "driving", group: travel }
|
|
19
|
+
- { pattern: "by car", group: travel }
|
|
20
|
+
- { pattern: "by Metro", group: travel }
|
|
21
|
+
- { pattern: "by subway", group: travel }
|
|
22
|
+
- { pattern: "by underground", group: travel }
|
|
23
|
+
- { pattern: "by Tube", group: travel }
|
|
24
|
+
- { pattern: "by rail", group: travel }
|
|
25
|
+
- { pattern: "by train", group: travel }
|
|
26
|
+
- { pattern: "train", group: travel }
|
|
27
|
+
- { pattern: "coach", group: travel }
|
|
28
|
+
- { pattern: "bus", group: travel }
|
|
29
|
+
- { pattern: "shuttle", group: travel }
|
|
30
|
+
- { pattern: "taxi", group: travel }
|
|
31
|
+
- { pattern: "cab", group: travel }
|
|
32
|
+
- { pattern: "within", position: before, group: bound }
|
|
33
|
+
- { pattern: "up to", position: before, group: bound }
|
|
34
|
+
- { pattern: "under", position: before, group: bound }
|
|
35
|
+
- { pattern: "less than", position: before, group: bound }
|
|
36
|
+
- { pattern: "no more than", position: before, group: bound }
|
|
37
|
+
- { pattern: "at most", position: before, group: bound }
|
|
38
|
+
- { pattern: "or less", position: after, group: bound }
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# Words beside the length of a break (duration-mismatch, working hours). before: written before the length ("break of 1 hour"); after: behind it ("a 1-hour break").
|
|
2
|
+
id: working-hours-break
|
|
3
|
+
language: en
|
|
4
|
+
entries:
|
|
5
|
+
- { pattern: "break", position: before }
|
|
6
|
+
- { pattern: "break of", position: before }
|
|
7
|
+
- { pattern: "lunch break", position: before }
|
|
8
|
+
- { pattern: "lunch break of", position: before }
|
|
9
|
+
- { pattern: "break", position: after }
|
|
10
|
+
- { pattern: "lunch break", position: after }
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# Words beside the hours worked once the break is taken out (duration-mismatch, working hours). before: written before the length; after: behind it ("8 hours of work", "8 hours a day").
|
|
2
|
+
id: working-hours-total
|
|
3
|
+
language: en
|
|
4
|
+
entries:
|
|
5
|
+
- { pattern: "net", position: before }
|
|
6
|
+
- { pattern: "of work", position: after }
|
|
7
|
+
- { pattern: "of working time", position: after }
|
|
8
|
+
- { pattern: "work", position: after }
|
|
9
|
+
- { pattern: "a day", position: after }
|
|
10
|
+
- { pattern: "per day", position: after }
|
|
11
|
+
- { pattern: "net", position: after }
|
package/package.json
CHANGED
package/src/emphasis.ts
CHANGED
|
@@ -1,16 +1,67 @@
|
|
|
1
|
-
// A word written in capitals for emphasis (the office will NEVER call you), told from an acronym by the dictionary
|
|
1
|
+
// A word written in capitals for emphasis (the office will NEVER call you), told from an acronym by the dictionary and by how
|
|
2
|
+
// the tagger read it in its sentence.
|
|
2
3
|
|
|
3
4
|
const CAPITALS = /^\p{Lu}{2,}$/u;
|
|
5
|
+
const LOWERCASE = /\p{Ll}/u;
|
|
4
6
|
|
|
5
7
|
const ADVERB_TAGS: ReadonlySet<string> = new Set(["RB", "RBR", "RBS"]);
|
|
6
8
|
|
|
9
|
+
/**
|
|
10
|
+
* Penn tags of closed word classes: preposition, conjunction, determiner, numeral, pronoun, particle, modal. An acronym names a
|
|
11
|
+
* thing, so it stands where a noun stands, never where one of these does.
|
|
12
|
+
*/
|
|
13
|
+
const CLOSED_CLASS_TAGS: ReadonlySet<string> = new Set(["IN", "CC", "DT", "PDT", "CD", "PRP", "PRP$", "TO", "RP", "MD", "WDT", "WP", "EX"]);
|
|
14
|
+
|
|
15
|
+
/** A determiner or possessive opens a noun phrase: what follows it (the IT team, the US office) is a name, though a numeral may come between (the ONE storm). */
|
|
16
|
+
const NOUN_PHRASE_OPENERS: ReadonlySet<string> = new Set(["DT", "PDT", "PRP$", "POS"]);
|
|
17
|
+
|
|
18
|
+
/** What can stand right before a finite verb in a sentence: a common noun or pronoun subject, or a modal (a hurricane DID form). */
|
|
19
|
+
const SUBJECT_TAGS: ReadonlySet<string> = new Set(["NN", "NNS", "PRP", "MD"]);
|
|
20
|
+
|
|
21
|
+
type TaggedWord = { readonly value: string; readonly pos: string };
|
|
22
|
+
|
|
23
|
+
type TagsOf = (word: string) => readonly string[] | undefined;
|
|
24
|
+
|
|
7
25
|
/**
|
|
8
26
|
* The dictionary knows the lower-case word, and only as an adverb (never, always, also). An acronym names a thing, so a word
|
|
9
27
|
* with no noun or adjective reading cannot be one. A word that is also a noun or an adjective (fast, eagle, cheese) is kept:
|
|
10
28
|
* FAST and EAGLE are a telescope and a simulation, and the context tagger cannot tell them from emphasis.
|
|
11
29
|
*/
|
|
12
|
-
export const isEmphasisedAdverb = (surface: string, tagsOf:
|
|
30
|
+
export const isEmphasisedAdverb = (surface: string, tagsOf: TagsOf): boolean => {
|
|
13
31
|
if (!CAPITALS.test(surface)) return false;
|
|
14
32
|
const tags = tagsOf(surface.toLowerCase()) ?? [];
|
|
15
33
|
return tags.length > 0 && tags.every((tag) => ADVERB_TAGS.has(tag));
|
|
16
34
|
};
|
|
35
|
+
|
|
36
|
+
/** After a verb, a word the tagger read as a noun must also be a verb in the dictionary (DID form), or it is what the capitals name (DID token). */
|
|
37
|
+
const canFollowVerb = (next: TaggedWord, tagsOf: TagsOf): boolean => !next.pos.startsWith("NN") || (tagsOf(next.value.toLowerCase()) ?? []).includes("VB");
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* The tagger read the capitals word, in its sentence, as one of the dictionary's readings of the lower-case word, and that
|
|
41
|
+
* reading is a closed class (AFTER the departure, NOR a remote position), or a verb right after its subject (a hurricane DID
|
|
42
|
+
* form). The word sits inside lower-case prose, with a lower-case word on each side: at the start of a sentence (ON
|
|
43
|
+
* Semiconductor), at its end (via IT.) or on a line alone (AT.) there is nothing to read it in. A verb after anything but its
|
|
44
|
+
* subject, or before a noun, stays a name: on the GOES satellites, the states are: LISTEN, the user DID token. Adjectives
|
|
45
|
+
* stay too: the WHOLE month reads like the SAFE framework, and only meaning tells them apart.
|
|
46
|
+
*/
|
|
47
|
+
const isReadAsWord = (tagged: readonly TaggedWord[], at: number, tagsOf: TagsOf): boolean => {
|
|
48
|
+
const word = tagged[at];
|
|
49
|
+
const [previous, next] = [tagged[at - 1], tagged[at + 1]];
|
|
50
|
+
if (word === undefined || previous === undefined || next === undefined) return false;
|
|
51
|
+
if (!(tagsOf(word.value.toLowerCase()) ?? []).includes(word.pos) || !LOWERCASE.test(previous.value) || !LOWERCASE.test(next.value)) return false;
|
|
52
|
+
if (CLOSED_CLASS_TAGS.has(word.pos)) return word.pos === "CD" || !NOUN_PHRASE_OPENERS.has(previous.pos);
|
|
53
|
+
return word.pos.startsWith("VB") && SUBJECT_TAGS.has(previous.pos) && canFollowVerb(next, tagsOf);
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
/** A word joined to its neighbour with no space (US-CERT, SOME/2, IT's) is part of a compound, a label or a name, not a word on its own. */
|
|
57
|
+
const JOINED = /[\p{L}\p{N}_&/'’-]/u;
|
|
58
|
+
|
|
59
|
+
type WordSpan = { readonly start: number; readonly end: number };
|
|
60
|
+
|
|
61
|
+
export const standsAlone = (text: string, span: WordSpan): boolean => !JOINED.test(text.charAt(span.start - 1)) && !JOINED.test(text.charAt(span.end));
|
|
62
|
+
|
|
63
|
+
/** A capitals word the sentence reads as an English word (not the adverb-only case above), so emphasis and not an acronym. */
|
|
64
|
+
export const isEmphasisedWord = (tagged: readonly TaggedWord[], at: number, tagsOf: TagsOf): boolean => {
|
|
65
|
+
const surface = tagged[at]?.value ?? "";
|
|
66
|
+
return CAPITALS.test(surface) && isReadAsWord(tagged, at, tagsOf);
|
|
67
|
+
};
|
package/src/pos.ts
CHANGED
|
@@ -4,7 +4,7 @@ import { loadLexicons } from "./lexicons.ts";
|
|
|
4
4
|
import { blankLongRuns } from "./long-runs.ts";
|
|
5
5
|
import { lowercasedAt, properNounChecked, rereadAt, sentenceInitialCommonWord } from "./proper-noun.ts";
|
|
6
6
|
import { isStativeParticiple, stativeVocabulary } from "./stative-participle.ts";
|
|
7
|
-
import { isEmphasisedAdverb } from "./emphasis.ts";
|
|
7
|
+
import { isEmphasisedAdverb, isEmphasisedWord, standsAlone } from "./emphasis.ts";
|
|
8
8
|
import { gerundFeatures } from "./gerund.ts";
|
|
9
9
|
import { winkLexiconWords, winkPosTagger } from "./wink-modules.ts";
|
|
10
10
|
|
|
@@ -234,9 +234,15 @@ export const prepare = (): void => {
|
|
|
234
234
|
|
|
235
235
|
export const isReady = (): boolean => state.ready !== undefined;
|
|
236
236
|
|
|
237
|
-
/**
|
|
238
|
-
|
|
239
|
-
|
|
237
|
+
/**
|
|
238
|
+
* 大文字で強調した副詞(NEVER)は、解析器が名前と付けても副詞。文の中で前置詞や動詞として読めた語(AFTER the departure、
|
|
239
|
+
* a hurricane DID form)は、解析器の読みのまま。どちらも Emph=Yes で、略語ではないと detector に伝える。
|
|
240
|
+
*/
|
|
241
|
+
const withEmphasis = (token: Token, text: string, tagged: readonly Tagged[], at: number): Token => {
|
|
242
|
+
if (isEmphasisedAdverb(token.surface, state.vocabulary)) return { ...token, pos: "ADV", lemma: token.surface.toLowerCase(), features: { Emph: "Yes" } };
|
|
243
|
+
if (!standsAlone(text, token.span) || !isEmphasisedWord(tagged, at, state.vocabulary)) return token;
|
|
244
|
+
return { ...token, lemma: (token.lemma ?? token.surface).toLowerCase(), features: { ...token.features, Emph: "Yes" } };
|
|
245
|
+
};
|
|
240
246
|
|
|
241
247
|
/**
|
|
242
248
|
* wink は位置を返さないので、表層を順に照合して復元する。
|
|
@@ -257,7 +263,7 @@ const locate = (text: string, tagged: readonly Tagged[]): Token[] => {
|
|
|
257
263
|
...(entry.lemma === undefined ? {} : { lemma: entry.lemma }),
|
|
258
264
|
...featuresOf(tagged, at),
|
|
259
265
|
};
|
|
260
|
-
tokens.push(withEmphasis(token));
|
|
266
|
+
tokens.push(withEmphasis(token, text, tagged, at));
|
|
261
267
|
cursor = end;
|
|
262
268
|
});
|
|
263
269
|
return tokens;
|