Comparing version 5.2.1 to 5.2.2
@@ -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": { |
12878760