File tree Expand file tree Collapse file tree 4 files changed +14
-4
lines changed
services/natural_language_classifier Expand file tree Collapse file tree 4 files changed +14
-4
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,9 @@ 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.13
11+ - Added opt-out option for collection parsing of strings in Natural Language Classifier Node.
12+
1013### New in version 0.6.12
1114- Fix to collection check in Natural Language Classification Node allowing for . in domain
1215names.
Original file line number Diff line number Diff line change 11{
22 "name" : " node-red-node-watson" ,
3- "version" : " 0.6.12 " ,
3+ "version" : " 0.6.13 " ,
44 "description" : " A collection of Node-RED nodes for IBM Watson services" ,
55 "dependencies" : {
66 "async" : " ^1.5.2" ,
Original file line number Diff line number Diff line change 4848 < select type = "text" id = "node-input-mode" style = "display: inline-block; width: 70%;" >
4949 < option value = "classify" > Classify</ option >
5050 < option value = "create" > Train</ option >
51- < option value = "remove" > Remove</ option >
52- < option value = "list" > List</ option >
51+ < option value = "remove" > Remove</ option >
52+ < option value = "list" > List</ option >
5353 </ select >
5454 </ div >
5555 < div class = "form-row mode classify" >
7070 < option value = "es" > Spanish</ option >
7171 </ select >
7272 </ div >
73+ < div class = "form-row mode classify" >
74+ < label > </ label >
75+ < input type = "checkbox" id = "node-input-collections-off" style = "display: inline-block; width: auto; vertical-align: top;" >
76+ < label for = "node-input-collections-off" style = "width: 70%;" > Do not auto detect collections</ label >
77+ </ div >
78+
7379</ script >
7480
7581< script type ="text/x-red " data-help-name ="watson-natural-language-classifier ">
169175 mode : { value : "classify" } ,
170176 language : { value : "en" } ,
171177 classifier : { value : "" } ,
178+ 'collections-off' :{ value : true } ,
172179 'default-endpoint' :{ value : true } ,
173180 'service-endpoint' :{ value : 'https://gateway.watsonplatform.net/natural-language-classifier/api' }
174181 } ,
Original file line number Diff line number Diff line change @@ -82,7 +82,7 @@ module.exports = function(RED) {
8282
8383 node . payloadCollectionCheck = function ( msg , config , payloadData ) {
8484 if ( 'classify' === config . mode ) {
85- if ( 'string' === typeof msg . payload ) {
85+ if ( 'string' === typeof msg . payload && ( ! config [ 'collections-off' ] ) ) {
8686 let collection = msg . payload . match ( / \( ? ( [ ^ . ? ! ] | \. \w ) + [ . ? ! ] \) ? / g ) ;
8787 if ( collection && collection . length > 1 ) {
8888 payloadData . collection = [ ] ;
You can’t perform that action at this time.
0 commit comments