1.0.8 • Published 7 years ago

fin-negation v1.0.8

Weekly downloads
-
License
MIT
Repository
-
Last release
7 years ago

Fin-negation

A negation detection for the Fin Natural language processor. It will exclude counter negated tokens.

Installation

npm i --save fin-negation

Usage

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:

[
    [
        false,
        false,
        false,
        true, // good is negated
    ]
]
[
    [
        false,
        false,
        false,
        false,
        false
        // ... all are false
        // no negation should be detected
        // because it's been counter negated
        // by the "only" token
    ]
]
1.0.8

7 years ago

1.0.7

7 years ago

1.0.6

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago