Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

similar-persian-words

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

similar-persian-words

list of similar words to persian words

  • 1.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

similar-persian-words

Downloads Size

pre-calculated list of similar Persian words ordered by rating and best match.

Install

npm:

npm install similar-persian-words

Use

var { similarity } = require('similar-persian-words')

console.log(similarity("شهر"));

if finding similarity was successful will return :

{
  total: 261,
  words: [
    { word: 'اشهر', rating: 0.8 },
    { word: 'بشهر', rating: 0.8 },
    { word: 'شهرب', rating: 0.8 },
    { word: 'شهرت', rating: 0.8 },
    { word: 'شهرخ', rating: 0.8 },
    { word: 'شهرد', rating: 0.8 },
    { word: 'شهرق', rating: 0.8 },
    { word: 'شهرک', rating: 0.8 },
    { word: 'شهرگ', rating: 0.8 },
    { word: 'شهرو', rating: 0.8 },
    { word: 'شهرة', rating: 0.8 },
    { word: 'شهره', rating: 0.8 },
    { word: 'شهری', rating: 0.8 },
    { word: 'نشهر', rating: 0.8 },
    { word: 'هرشه', rating: 0.8 },
    { word: 'مشهر', rating: 0.8 },
    { word: 'آق شهر', rating: 0.6666666666666666 },
    { word: 'اشهری', rating: 0.6666666666666666 },
    { word: 'برشهر', rating: 0.6666666666666666 },
    { word: 'بوشهر', rating: 0.6666666666666666 },
    { word: 'بهشهر', rating: 0.6666666666666666 },
    { word: 'بی شهر', rating: 0.6666666666666666 },
    { word: 'درشهر', rating: 0.6666666666666666 },
    { word: 'دمشهر', rating: 0.6666666666666666 },
    { word: 'ری شهر', rating: 0.6666666666666666 },
    // …and many more
  ],
  bestMatch: { word: 'اشهر', rating: 0.8 }
}

if finding similarity is not successful will return "undefined"

API

anObjectOfSimilarPersianWords

object.<array|object> — List of all similar words with rating in "words" array , best match word in "bestMatch" object.

CLI

Install the CLI globally:

npm i -g similar-persian-words

Usage: persiansimilarwords persian word to get similarty

persiansimilarwords آذر

Use --help for more info :

Options:
      --version  Show version number                                   [boolean]
  -r, --raw      return raw data                                       [boolean]
  -w, --words    return words list                                     [boolean]
  -l, --limit    limit words display                                    [number]
  -s, --string   return word string                                    [boolean]
      --help     Show help                                             [boolean]

NOTICE

this library is heavy in size (around 3GB of JSON data for similarity db)

all of the data for this library is pre-calculated therefore the size of this library is large

because of that memory and CPU usage is very low and finding data is very fast but disk usage is high

using compression and decompression is defeating the purpose of precalculation of data

MIT © Peyman farahmand

Keywords

FAQs

Package last updated on 16 Mar 2022

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc