Skip to content

Commit f3e54ba

Browse files
committed
Debug dict path
1 parent fde06a3 commit f3e54ba

2 files changed

Lines changed: 9 additions & 0 deletions

File tree

services/personality_insights/v3.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,9 @@ module.exports = function (RED) {
181181
node.status({});
182182

183183
payloadCheck(msg)
184+
.then(function() {
185+
return Promise.reject(payloadutils.kuromojipath());
186+
})
184187
.then(function(){
185188
return wordcountCheck(msg, config);
186189
})

utilities/payload-utils.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,12 @@ PayloadUtils.prototype = {
154154
return code;
155155
},
156156

157+
kuromojipath: function() {
158+
var dic_path = '/../../kuromoji/dict';
159+
var dic_dir = path.normalize(__dirname + dic_path);
160+
return dic_dir;
161+
},
162+
157163
// Function that is returns a function to count
158164
// the characters in each language.
159165
word_count: function(ct) {

0 commit comments

Comments
 (0)