Skip to content

๐Ÿ” [detector] UK US spelling detection extension for FIN NLP

Notifications You must be signed in to change notification settings

FinNLP/fin-ukus

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

2 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Fin-UKUS

Detecting and converting a sentence between the english and british spelling variations.

Installation

npm i --save fin-ukus

Usage

import * as Fin from "finnlp";
import "fin-ukus";

const sentence = "eon. theatre advertiser.";

const instance = new Fin.Run(sentence);

instance.inputScore(); // 1
instance.sentencesScore(); // [-1,2]
instance.tokensScore(); // [[-1],[1,1]]
instance.toUS(); // "eon. theater advertizer"
instance.toUK(); // "aeon. theatre advertiser"

About the scores

  • The token scores:
    • -1 An american spelling variation.
    • 1 A british spelling variation.
    • 0 A neutral spelling.
  • The sentences scores are the sum of the token scores.
  • The input score is the sum of the sentences scores.

About

๐Ÿ” [detector] UK US spelling detection extension for FIN NLP

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published