@diplodoc/sentenizer
Advanced tools
Comparing version 0.0.1 to 0.0.2
@@ -43,2 +43,3 @@ var __defProp = Object.defineProperty; | ||
var second = () => (0, import_ramda.lensIndex)(1); | ||
var last = () => (0, import_ramda.lensIndex)(-1); | ||
@@ -50,2 +51,4 @@ // src/parsers/index.ts | ||
var snd = (0, import_ramda2.compose)((0, import_ramda2.defaultTo)(""), (0, import_ramda2.view)(secondString)); | ||
var lastString = last(); | ||
var lst = (0, import_ramda2.compose)((0, import_ramda2.defaultTo)(""), (0, import_ramda2.view)(lastString)); | ||
var sentencePattern = `([^${SENTENCE_END_MARKERS}]*?[${SENTENCE_END_MARKERS}]+)`; | ||
@@ -69,3 +72,6 @@ var senteceFlags = "gmu"; | ||
var lstToken = (0, import_ramda2.compose)((0, import_ramda2.defaultTo)(""), snd, (0, import_ramda2.match)(lstTokenRegExp)); | ||
var lstWord = (0, import_ramda2.compose)(lstToken, words); | ||
var wordPattern = /[\w\-а-яА-Я]+/; | ||
var wordFlags = "gmu"; | ||
var wordRegExp = new RegExp(wordPattern, wordFlags); | ||
var lstWord = (0, import_ramda2.compose)((0, import_ramda2.compose)(lst, (0, import_ramda2.match)(wordRegExp)), lstToken, words); | ||
var fstChars = (width = WINDOW_WIDTH) => { | ||
@@ -72,0 +78,0 @@ const fstCharsPattern = `^[\\s\\S]{0,${width}}`; |
declare const first: <T>() => import("ramda").Lens<T[], T>; | ||
declare const second: <T>() => import("ramda").Lens<T[], T>; | ||
export { first, second }; | ||
declare const last: <T>() => import("ramda").Lens<T[], T>; | ||
export { first, second, last }; |
{ | ||
"name": "@diplodoc/sentenizer", | ||
"version": "0.0.1", | ||
"version": "0.0.2", | ||
"description": "text segmentation into sentences", | ||
@@ -5,0 +5,0 @@ "homepage": "https://github.com/diplodoc-platform/sentenizer", |
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
30555
630