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

silly-nlp

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

silly-nlp - npm Package Compare versions

Comparing version 0.0.11 to 0.0.12

8

esm/index.js

@@ -93,6 +93,4 @@ import { includedIn, join, letIn, lowercase, max, nonempty, pipe, range, replace, reverse, sort, split, take, trim, trimWhitespace, } from "gamla";

const allEnglishWordsAsSet = new Set(englishWords);
const fixMissingSpaceInOneWord = (x) => allEnglishWordsAsSet.has(x)
? x
: letIn(range(1, x.length - 1).find((index) => allEnglishWordsAsSet.has(x.slice(0, index)) &&
allEnglishWordsAsSet.has(x.slice(index))), (location) => location ? [x.slice(0, location), x.slice(location)].join(" ") : x);
const fixMissingSpaceInOneWord = (x) => allEnglishWordsAsSet.has(x) ? x : letIn(range(1, x.length - 1).find((index) => allEnglishWordsAsSet.has(x.slice(0, index)) &&
allEnglishWordsAsSet.has(x.slice(index))), (location) => location ? [x.slice(0, location), x.slice(location)].join(" ") : x);
const missingSpace = (x) => x.split(/\s/).map(fixMissingSpaceInOneWord).join(" ");

@@ -147,3 +145,3 @@ const removeNonSemanticDifferences = pipe(lowercase, missingSpace, simplify, replace(/\bthe\b\s*/g, ""));

const hyphen = /[―-]/;
const boundry = [/[@.-\s:/בלה[\]?&%$#=*,!()]/, /^/, /$/].reduce(regExpOr); // \b doesn't work for non ascii
const boundry = [/[_@.-\s:/בלה[\]?&%$#=*,!()]/, /^/, /$/].reduce(regExpOr); // \b doesn't work for non ascii
const speaker = [optional(hyphen), personName, /\s?:/, boundry].reduce(concatRegexp);

@@ -150,0 +148,0 @@ const speakerInEnd = [hyphen, /\s*/, personName, /$/].reduce(concatRegexp);

{
"name": "silly-nlp",
"version": "0.0.11",
"version": "0.0.12",
"description": "Silly nlp utils",

@@ -5,0 +5,0 @@ "repository": {

@@ -102,6 +102,4 @@ "use strict";

const allEnglishWordsAsSet = new Set(englishWords_js_1.englishWords);
const fixMissingSpaceInOneWord = (x) => allEnglishWordsAsSet.has(x)
? x
: (0, gamla_1.letIn)((0, gamla_1.range)(1, x.length - 1).find((index) => allEnglishWordsAsSet.has(x.slice(0, index)) &&
allEnglishWordsAsSet.has(x.slice(index))), (location) => location ? [x.slice(0, location), x.slice(location)].join(" ") : x);
const fixMissingSpaceInOneWord = (x) => allEnglishWordsAsSet.has(x) ? x : (0, gamla_1.letIn)((0, gamla_1.range)(1, x.length - 1).find((index) => allEnglishWordsAsSet.has(x.slice(0, index)) &&
allEnglishWordsAsSet.has(x.slice(index))), (location) => location ? [x.slice(0, location), x.slice(location)].join(" ") : x);
const missingSpace = (x) => x.split(/\s/).map(fixMissingSpaceInOneWord).join(" ");

@@ -166,3 +164,3 @@ const removeNonSemanticDifferences = (0, gamla_1.pipe)(gamla_1.lowercase, missingSpace, exports.simplify, (0, gamla_1.replace)(/\bthe\b\s*/g, ""));

const hyphen = /[―-]/;
const boundry = [/[@.-\s:/בלה[\]?&%$#=*,!()]/, /^/, /$/].reduce(exports.regExpOr); // \b doesn't work for non ascii
const boundry = [/[_@.-\s:/בלה[\]?&%$#=*,!()]/, /^/, /$/].reduce(exports.regExpOr); // \b doesn't work for non ascii
const speaker = [optional(hyphen), personName, /\s?:/, boundry].reduce(exports.concatRegexp);

@@ -169,0 +167,0 @@ const speakerInEnd = [hyphen, /\s*/, personName, /$/].reduce(exports.concatRegexp);

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