Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@diplodoc/sentenizer

Package Overview
Dependencies
Maintainers
9
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@diplodoc/sentenizer - npm Package Compare versions

Comparing version 0.0.1 to 0.0.2

8

lib/index.js

@@ -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}}`;

3

lib/lenses/index.d.ts
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",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc