Socket
Book a DemoInstallSign in
Socket

fin-emphasis

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fin-emphasis

Emphasis detection for FIN NLP

latest
npmnpm
Version
1.0.6
Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

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

FAQs

Package last updated on 31 Mar 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts