crawler-ai-analysis
Advanced tools
Comparing version 1.0.1 to 1.0.2
{ | ||
"name": "crawler-ai-analysis", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "", | ||
@@ -8,3 +8,3 @@ "main": "built/app.js", | ||
"test": "echo \"Error: no test specified\" && exit 1", | ||
"built": "babel -d built/ src/ " | ||
"built": "babel -s -d built/ src/ " | ||
}, | ||
@@ -11,0 +11,0 @@ "repository": { |
@@ -5,14 +5,18 @@ import Segment from "segment"; | ||
export default (options) => { | ||
const segment = new Segment(); | ||
const segment = new Segment(); | ||
segment.useDefault(); | ||
// .loadStopwordDict(path.join(__dirname, "words", 'stopword.txt')); | ||
segment.useDefault(); | ||
// .loadStopwordDict(path.join(__dirname, "words", 'stopword.txt')); | ||
return async(ctx, next) => { | ||
ctx.queueItem.aiAnalysisResult = segment.doSegment(ctx.queueItem.responseBodyText || "", { | ||
stripPunctuation: true | ||
}); | ||
return async(ctx, next) => { | ||
if (!ctx.queueItem) { | ||
await next(); | ||
} | ||
await next(); | ||
}; | ||
} | ||
ctx.queueItem.aiAnalysisResult = segment.doSegment(ctx.queueItem.responseBodyText || "", { | ||
stripPunctuation: true | ||
}); | ||
await next(); | ||
}; | ||
}; |
3967
6
54