All Projects → words → double-metaphone

words / double-metaphone

Licence: MIT license
Fast Double Metaphone algorithm

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to double-metaphone

phonetic-algorithms
Phonetic-Algorithms for fuzzy searching | PHP
Stars: ✭ 14 (-80%)
Mutual labels:  phonetic, metaphone
phonix
Phonetic libray for .NET
Stars: ✭ 63 (-10%)
Mutual labels:  soundex, metaphone
Jellyfish
🎐 a python library for doing approximate and phonetic matching of strings.
Stars: ✭ 1,571 (+2144.29%)
Mutual labels:  soundex, metaphone
Parse English
English (natural language) parser
Stars: ✭ 137 (+95.71%)
Mutual labels:  natural-language
Freelb
Adversarial Training for Natural Language Understanding
Stars: ✭ 147 (+110%)
Mutual labels:  natural-language
Go Naturaldate
Natural date/time parsing for Go.
Stars: ✭ 217 (+210%)
Mutual labels:  natural-language
levenshtein-edit-distance
Levenshtein edit distance
Stars: ✭ 59 (-15.71%)
Mutual labels:  natural-language
Pytextrank
Python implementation of TextRank for phrase extraction and summarization of text documents
Stars: ✭ 1,675 (+2292.86%)
Mutual labels:  natural-language
Low Resource Languages
Resources for conservation, development, and documentation of low resource (human) languages.
Stars: ✭ 247 (+252.86%)
Mutual labels:  natural-language
Deeplearning.ai
该存储库包含由deeplearning.ai提供的相关课程的个人的笔记和实现代码。
Stars: ✭ 181 (+158.57%)
Mutual labels:  natural-language
Opencog
A framework for integrated Artificial Intelligence & Artificial General Intelligence (AGI)
Stars: ✭ 2,132 (+2945.71%)
Mutual labels:  natural-language
Awesome Sentence Embedding
A curated list of pretrained sentence and word embedding models
Stars: ✭ 1,973 (+2718.57%)
Mutual labels:  natural-language
Cs224d
Code for Stanford CS224D: deep learning for natural language understanding
Stars: ✭ 222 (+217.14%)
Mutual labels:  natural-language
Natural Regex
Create regex from natural language
Stars: ✭ 147 (+110%)
Mutual labels:  natural-language
LibN3L
LibN3L: A light-weight neural network package for natural language
Stars: ✭ 81 (+15.71%)
Mutual labels:  natural-language
Retext Equality
plugin to check for possible insensitive, inconsiderate language
Stars: ✭ 118 (+68.57%)
Mutual labels:  natural-language
Soulvercore
A powerful Swift framework for evaluating mathematical expressions
Stars: ✭ 245 (+250%)
Mutual labels:  natural-language
Retext
natural language processor powered by plugins part of the @unifiedjs collective
Stars: ✭ 2,119 (+2927.14%)
Mutual labels:  natural-language
Programming Language Classifier
An example of how to use CreateML in Xcode 10 to create a Core ML model for classifying text
Stars: ✭ 172 (+145.71%)
Mutual labels:  natural-language
Commit Autosuggestions
A tool that AI automatically recommends commit messages.
Stars: ✭ 207 (+195.71%)
Mutual labels:  natural-language

double-metaphone

Build Coverage Downloads Size

Double metaphone algorithm.

Contents

What is this?

This package exposes a phonetic algorithm. That means it gets a certain string (typically an English word), and turns it into codes, which can then be compared to other codes (of other words), to check if they are (likely) pronounced the same.

When should I use this?

You’re probably dealing with natural language, and know you need this, if you’re here!

Depending on your goals, you likely want to additionally use a stemmer (such as stemmer).

Install

This package is ESM only. In Node.js (version 14.14+, 16.0+), install with npm:

npm install double-metaphone

In Deno with esm.sh:

import {doubleMetaphone} from 'https://esm.sh/double-metaphone@2'

In browsers with esm.sh:

<script type="module">
  import {doubleMetaphone} from 'https://esm.sh/double-metaphone@2?bundle'
</script>

Use

import {doubleMetaphone} from 'double-metaphone'

doubleMetaphone('michael') // => ['MKL', 'MXL']
doubleMetaphone('crevalle') // => ['KRFL', 'KRF']
doubleMetaphone('Filipowitz') // => ['FLPTS', 'FLPFX']
doubleMetaphone('Xavier') // => ['SF', 'SFR']
doubleMetaphone('delicious') // => ['TLSS', 'TLXS']
doubleMetaphone('acceptingness') // => ['AKSPTNNS', 'AKSPTNKNS']
doubleMetaphone('allegrettos') // => ['ALKRTS', 'AKRTS']

With stemmer:

import {doubleMetaphone} from 'double-metaphone'
import {stemmer} from 'stemmer'

doubleMetaphone(stemmer('acceptingness')) // => ['AKSPTNK', 'AKSPTNK']
doubleMetaphone(stemmer('allegrettos')) // => ['ALKRT', 'AKRT']

API

This package exports the identifier doubleMetaphone. There is no default export.

doubleMetaphone(value)

Get the double metaphone codes from a given value.

value

Value to use (string, required).

Returns

Double metaphone codes for value ([string, string]).

CLI

Usage: double-metaphone [options] <words...>

Double Metaphone algorithm

Options:

  -h, --help           output usage information
  -v, --version        output version number

Usage:

# output phonetics
$ double-metaphone michael
# MKL MXL

# output phonetics from stdin
$ echo 'Xavier' | double-metaphone
# SF  SFR

# with stemmer
$ echo 'acceptingness' | stemmer | double-metaphone
# AKSPTNK AKSPTNK

Types

This package is fully typed with TypeScript. It exports no additional types.

Compatibility

This package is at least compatible with all maintained versions of Node.js. As of now, that is Node.js 14.14+ and 16.0+. It also works in Deno and modern browsers.

Related

Contribute

Yes please! See How to Contribute to Open Source.

Security

This package is safe.

License

MIT © Titus Wormer

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].