Skip to content

๐Ÿ” [Detector] Emphasis detection for FIN NLP

Notifications You must be signed in to change notification settings

FinNLP/fin-emphasis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

12 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

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
    ]
]

About

๐Ÿ” [Detector] Emphasis detection for FIN NLP

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published