fin-negation

所属分类:自然语言处理
开发工具:TypeScript
文件大小:5KB
下载次数:0
上传日期:2017-03-31 18:59:25
上 传 者sh-1993
说明:  fin否定,[检测器]fin NLP的否定检测器
(fin-negation, [Detector] Negation detector for FIN NLP)

文件列表:
.npmignore (14, 2017-04-01)
package.json (490, 2017-04-01)
src (0, 2017-04-01)
src\dictionary.ts (1716, 2017-04-01)
src\find.ts (2044, 2017-04-01)
src\index.ts (1422, 2017-04-01)
test (0, 2017-04-01)
test\test.ts (1265, 2017-04-01)
tsconfig.json (452, 2017-04-01)
tslint.json (224, 2017-04-01)

# Fin-negation A negation detection for the Fin Natural language processor. It will exclude counter negated tokens. ## Installation ``` npm i --save fin-negation ``` ## Usage ```typescript import * as Fin from "finnlp"; import "fin-negation"; const inputNegated = "That's not good"; const inputCounterNegated = "I wasn't here for only few hours!"; const negatedIns = new Fin.Run(inputNegated).negation(); const counterNegatedIns = new Fin.Run(inputCounterNegated).negation(); console.log(negatedIns); console.log(counterNegatedIns); ``` The above example will give you: ```javascript [ [ false, false, false, true, // good is negated ] ] ``` ```javascript [ [ false, false, false, false, false // ... all are false // no negation should be detected // because it's been counter negated // by the "only" token ] ] ```

近期下载者

相关文件


收藏者