Skip to content

Commit 5cdd41d

Browse files
authored
Merge pull request #407 from chughts/collfix
Fix Collection Check in NLC Node
2 parents a7dcc81 + a851106 commit 5cdd41d

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ Node-RED Watson Nodes for IBM Cloud
77

88
<a href="https://cla-assistant.io/watson-developer-cloud/node-red-node-watson"><img src="https://cla-assistant.io/readme/badge/watson-developer-cloud/node-red-node-watson" alt="CLA assistant" /></a>
99

10+
### New in version 0.6.12
11+
- Fix to collection check in Natural Language Classification Node allowing for . in domain
12+
names.
13+
1014
### New in version 0.6.11
1115
- Fix to defaulting name for NLU Node.
1216
- Allow pre-check of audio format to be disabled in Speech to Text node.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
{
22
"name": "node-red-node-watson",
3-
"version": "0.6.11",
3+
"version": "0.6.12",
44
"description": "A collection of Node-RED nodes for IBM Watson services",
55
"dependencies": {
66
"async": "^1.5.2",
77
"cfenv": "~1.0.0",
88
"file-type": "^2.7.0",
9-
"request": "~2.83.0",
9+
"request": "~2.86.0",
1010
"temp": "^0.8.3",
1111
"qs": "6.x",
1212
"image-type": "^2.0.2",

services/natural_language_classifier/v1.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ module.exports = function(RED) {
8383
node.payloadCollectionCheck = function(msg, config, payloadData) {
8484
if ('classify' === config.mode) {
8585
if ('string' === typeof msg.payload) {
86-
let collection = msg.payload.match( /\(?[^\.\?\!]+[\.!\?$]\)?/g );
86+
let collection = msg.payload.match( /\(?([^.?!]|\.\w)+[.?!]\)?/g );
8787
if (collection && collection.length > 1) {
8888
payloadData.collection = [];
8989
collection.forEach((s) => {

0 commit comments

Comments
 (0)