New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

natural

Package Overview
Dependencies
Maintainers
3
Versions
144
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

natural - npm Package Compare versions

Comparing version 5.2.1 to 5.2.2

6

lib/natural/analyzers/sentence_analyzer.js

@@ -157,6 +157,6 @@ /*

this.senType = 'COMMAND'
} else if (_(['WDT', 'WP', 'WP$', 'WRB']).contains(this.posObj.tags[0].pos)) {
} else if (_.contains(['WDT', 'WP', 'WP$', 'WRB'], this.posObj.tags[0].pos)) {
// Sentences that start with: who, what where when why and how, then they are questions
this.senType = 'INTERROGATIVE'
} else if (_(['PRP']).contains(lastElement.pos)) {
} else if (_.contains(['PRP'], lastElement.pos)) {
// Sentences that end in a Personal pronoun are most likely questions

@@ -183,3 +183,3 @@ // eg. We should run away, should we [?]

if (callbackFunction && _(callbackFunction).isFunction()) {
if (callbackFunction && _.isFunction(callbackFunction)) {
callbackFunction(this)

@@ -186,0 +186,0 @@ } else {

@@ -40,3 +40,3 @@ /*

if (!_(sequence).isArray()) {
if (!_.isArray(sequence)) {
sequence = sequence.split('')

@@ -43,0 +43,0 @@ }

{
"name": "natural",
"description": "General natural language (tokenizing, stemming (English, Russian, Spanish), part-of-speech tagging, sentiment analysis, classification, inflection, phonetics, tfidf, WordNet, jaro-winkler, Levenshtein distance, Dice's Coefficient) facilities for node.",
"version": "5.2.1",
"version": "5.2.2",
"homepage": "https://github.com/NaturalNode/natural",

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

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