We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fde06a3 commit f3e54baCopy full SHA for f3e54ba
2 files changed
services/personality_insights/v3.js
@@ -181,6 +181,9 @@ module.exports = function (RED) {
181
node.status({});
182
183
payloadCheck(msg)
184
+ .then(function() {
185
+ return Promise.reject(payloadutils.kuromojipath());
186
+ })
187
.then(function(){
188
return wordcountCheck(msg, config);
189
})
utilities/payload-utils.js
@@ -154,6 +154,12 @@ PayloadUtils.prototype = {
154
return code;
155
},
156
157
+ kuromojipath: function() {
158
+ var dic_path = '/../../kuromoji/dict';
159
+ var dic_dir = path.normalize(__dirname + dic_path);
160
+ return dic_dir;
161
+ },
162
+
163
// Function that is returns a function to count
164
// the characters in each language.
165
word_count: function(ct) {
0 commit comments