fin-emphasis
TypeScript icon, indicating that this package has built-in type declarations

1.0.6 • Public • Published

Fin-emphasis

Detecting emphasized tokens for the Fin natural language processor.

What it detects

  • Superlative adjectives: greatest, biggest, fastest ...etc.
  • Superlative adverbs.
  • Adverbs of emphasis: audibly, surely, literally ...etc.

Installation

npm i --save fin-emphasis

Usage

import * as Fin from "finnlp";
import "fin-emphasis";
 
const sentence = "He was demonstrably wrong about being the biggest winner."
const instance = new Fin.Run(sentence);
const result = instance.emphasis();
console.log(result);
 

The above example would give:

[
    [
        0,
        0,
        0,
        0,
        2.5, // emphasis on "wrong" caused by "demonstrably".
        0,
        0,
        0,
        1, // emphasis on "biggest" because it's a superlative adjective.
        0
    ]
]

Readme

Keywords

none

Package Sidebar

Install

npm i fin-emphasis

Weekly Downloads

2

Version

1.0.6

License

MIT

Last publish

Collaborators

  • alexcorvi