sentence-splitter
Advanced tools
Comparing version 4.4.1 to 5.0.0
{ | ||
"name": "sentence-splitter", | ||
"version": "4.4.1", | ||
"version": "5.0.0", | ||
"description": "split {japanese, english} text into sentences.", | ||
@@ -8,3 +8,4 @@ "keywords": [ | ||
"analytics", | ||
"textlint" | ||
"textlint", | ||
"nlp" | ||
], | ||
@@ -11,0 +12,0 @@ "homepage": "https://github.com/textlint-rule/sentence-splitter", |
@@ -21,2 +21,4 @@ "use strict"; | ||
class AbbrMarker { | ||
options; | ||
lang; | ||
constructor(options) { | ||
@@ -23,0 +25,0 @@ this.options = options; |
@@ -9,2 +9,4 @@ "use strict"; | ||
class AnyValueParser { | ||
parsers; | ||
markers; | ||
/** | ||
@@ -11,0 +13,0 @@ * Eat any value without `parsers.test` |
@@ -77,10 +77,8 @@ "use strict"; | ||
class PairMaker { | ||
constructor() { | ||
this.PAIR_MARKS_KEY_Map = new Map(DEFAULT_PAIR_MARKS.flatMap((mark) => { | ||
return [ | ||
[mark.start, mark], | ||
[mark.end, mark] | ||
]; | ||
})); | ||
} | ||
PAIR_MARKS_KEY_Map = new Map(DEFAULT_PAIR_MARKS.flatMap((mark) => { | ||
return [ | ||
[mark.start, mark], | ||
[mark.end, mark] | ||
]; | ||
})); | ||
mark(sourceCode) { | ||
@@ -87,0 +85,0 @@ const string = sourceCode.read(); |
@@ -19,2 +19,4 @@ "use strict"; | ||
class SeparatorParser { | ||
options; | ||
separatorCharacters; | ||
constructor(options) { | ||
@@ -21,0 +23,0 @@ this.options = options; |
@@ -14,10 +14,15 @@ "use strict"; | ||
class SourceCode { | ||
index = 0; | ||
source; | ||
textCharacters; | ||
sourceNode; | ||
// active context | ||
contexts = []; | ||
// These context is consumed | ||
// It is used for attaching context to AST | ||
consumedContexts = []; | ||
contextRanges = []; | ||
firstChildPadding; | ||
startOffset; | ||
constructor(input) { | ||
this.index = 0; | ||
// active context | ||
this.contexts = []; | ||
// These context is consumed | ||
// It is used for attaching context to AST | ||
this.consumedContexts = []; | ||
this.contextRanges = []; | ||
if (typeof input === "string") { | ||
@@ -24,0 +29,0 @@ this.textCharacters = input.split(""); |
@@ -23,5 +23,6 @@ "use strict"; | ||
class SplitParser { | ||
sentenceNodeList = []; | ||
results = []; | ||
source; | ||
constructor(text) { | ||
this.sentenceNodeList = []; | ||
this.results = []; | ||
this.source = new SourceCode_js_1.SourceCode(text); | ||
@@ -28,0 +29,0 @@ } |
{ | ||
"name": "sentence-splitter", | ||
"version": "4.4.1", | ||
"version": "5.0.0", | ||
"description": "split {japanese, english} text into sentences.", | ||
@@ -8,3 +8,4 @@ "keywords": [ | ||
"analytics", | ||
"textlint" | ||
"textlint", | ||
"nlp" | ||
], | ||
@@ -11,0 +12,0 @@ "homepage": "https://github.com/textlint-rule/sentence-splitter", |
@@ -18,2 +18,4 @@ import { English } from "./lang/English.js"; | ||
export class AbbrMarker { | ||
options; | ||
lang; | ||
constructor(options) { | ||
@@ -20,0 +22,0 @@ this.options = options; |
@@ -6,2 +6,4 @@ import { seekLog } from "../logger.js"; | ||
export class AnyValueParser { | ||
parsers; | ||
markers; | ||
/** | ||
@@ -8,0 +10,0 @@ * Eat any value without `parsers.test` |
@@ -74,10 +74,8 @@ import { debugLog } from "../logger.js"; | ||
export class PairMaker { | ||
constructor() { | ||
this.PAIR_MARKS_KEY_Map = new Map(DEFAULT_PAIR_MARKS.flatMap((mark) => { | ||
return [ | ||
[mark.start, mark], | ||
[mark.end, mark] | ||
]; | ||
})); | ||
} | ||
PAIR_MARKS_KEY_Map = new Map(DEFAULT_PAIR_MARKS.flatMap((mark) => { | ||
return [ | ||
[mark.start, mark], | ||
[mark.end, mark] | ||
]; | ||
})); | ||
mark(sourceCode) { | ||
@@ -84,0 +82,0 @@ const string = sourceCode.read(); |
@@ -16,2 +16,4 @@ export const DefaultOptions = { | ||
export class SeparatorParser { | ||
options; | ||
separatorCharacters; | ||
constructor(options) { | ||
@@ -18,0 +20,0 @@ this.options = options; |
@@ -11,10 +11,15 @@ import { StructuredSource } from "structured-source"; | ||
export class SourceCode { | ||
index = 0; | ||
source; | ||
textCharacters; | ||
sourceNode; | ||
// active context | ||
contexts = []; | ||
// These context is consumed | ||
// It is used for attaching context to AST | ||
consumedContexts = []; | ||
contextRanges = []; | ||
firstChildPadding; | ||
startOffset; | ||
constructor(input) { | ||
this.index = 0; | ||
// active context | ||
this.contexts = []; | ||
// These context is consumed | ||
// It is used for attaching context to AST | ||
this.consumedContexts = []; | ||
this.contextRanges = []; | ||
if (typeof input === "string") { | ||
@@ -21,0 +26,0 @@ this.textCharacters = input.split(""); |
@@ -18,5 +18,6 @@ import { ASTNodeTypes } from "@textlint/ast-node-types"; | ||
class SplitParser { | ||
sentenceNodeList = []; | ||
results = []; | ||
source; | ||
constructor(text) { | ||
this.sentenceNodeList = []; | ||
this.results = []; | ||
this.source = new SourceCode(text); | ||
@@ -23,0 +24,0 @@ } |
{ | ||
"name": "sentence-splitter", | ||
"version": "4.4.1", | ||
"version": "5.0.0", | ||
"description": "split {japanese, english} text into sentences.", | ||
@@ -8,3 +8,4 @@ "keywords": [ | ||
"analytics", | ||
"textlint" | ||
"textlint", | ||
"nlp" | ||
], | ||
@@ -11,0 +12,0 @@ "homepage": "https://github.com/textlint-rule/sentence-splitter", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
214143
4212