npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

smart-word-generator

v1.0.1

Published

Generate specific words depending on your needs

Downloads

2

Readme

Description

Smart word generator is a framewjavaScript library for generating words using artificial intelligence depending on your needs. It uses API call to generate words that suits the use case you are facing, you can find the original API used from here.

Philosophy

And here came the idea of smart-word-generator where you do not just generate random words when you need some real data related to some area or some meaning, or when you want to fill your database with data which is meaningful, in the past, people would just go and enter the data directly if they want meaningful data, but it is the AI era, and that is why we had created smart-word-generator.

Questions

For questions and support please email me on: [email protected]. Or just open new issue here, and for sure, PRs are very welcomed.

Features

  • Generate words have similar meaning to the word you are providing
  • Generate words have sound like the word you are providing (the results are pronounced similarly to this string of characters).
  • Generate words are spelled like the word you are providing (the results are spelled similarly to this string of characters, or that they match this wildcard pattern).
  • Generate words that appears immediately to the left of the target word in a sentence.
  • Generate words that appears immediately to the right of the target word in a sentence.
  • Provide optional parameters to get more specific data like:
    • maximum number of generated words
    • the generated words should start with a specific character
    • the generated words should end with a specific character
    • the generated words should be in which type (part-of-speech) like (noun, adj, adv, v, ...etc)
    • the generated words should be in related to which topic
    • the generated words should be represented as array of words or array of objects with extra information for each word like part of speech and the score of the word
  • In progress...

Installation

$ npm i smart-word-generator

Params which is provided to all functions by order:

  • @param {String} The input word
  • @param {Boolean} (false by default) transformToArray Specify if true then return type array of words otherwise array of objects include extra details
  • @param {String} partOfSpeech Optional param to specify the part-Of-Speech of returned words 'n' for nouns, 'v' for verbs, 'adj' for adjectives and 'adv' for adverbs
  • @param {String} topics Optional param to specify which category of the returned words belong to
  • @param {String} startWith Optional param to specify what returned words should start with
  • @param {String} endWith Optional param to specify what returned words should end with
  • @param {String} max Optional param to specify number of returned words

examples

Generate array of noun words have similar meaning to the word 'great'

const smartWordGenerator = require("smart-word-generator");

smartWordGenerator
  .generateWordMeansLike("great", true, "n")
  .then((res) => console.log(res));
# Output: ['big','corking','extraordinary', 'neat', 'bully', 'expectant', 'majuscule', 'uppercase', 'capital', 'groovy', 'pregnant', 'enceinte', 'vast', 'mega',  'massive','immense','hefty','mighty','strong','staggering','full',lot','lofty']

Generate array of objects containing words and extra info that have spelling like the word 'flower'

const smartWordGenerator = require("smart-word-generator");

smartWordGenerator
  .generateWordSpelledLike("flower", false)
  .then((res) => console.log(res));
  # Output: [{word:'flower',score:67939,tags:['n']},{word:'lower',score:879,tags:['adj']},{word:'glower',score:710,tags:['n','v']},{word:'blower',score:686,tags:['n']},{word:'slower',score:163,tags:['n']},{word:'flowed',score:129,tags:['v']},{word:'frower',score:109,tags:['n']},{word:'clower',score:95,tags:['n','prop']},{word:'plower',score:57,tags:['n']},{word:'flewer',score:38},{word:'flowen',score:17,tags:['n']},{word:'fower',score:16,tags:['n']}]

Generate only array of words which has length of 5 that sounds like the word 'flower'

const smartWordGenerator = require("smart-word-generator");

smartWordGenerator
  .generateWordSoundsLike("flower", true, null, null, null, null, 5)
  .then((res) => console.log(res));
  # Output:['flower','flour','floor','flohr','flaugher']

Generate only array of words, all of them should start with character s (Note: could be a substring not only a character) that mostly placed to the left of the word like 'computer' in most of sentences.

const smartWordGenerator = require("smart-word-generator");

smartWordGenerator
  .generateWordHasLeftContext("computer", true, null, null, 's')
  .then((res) => console.log(res));
  # Output:['science','system','systems','software','simulation','screen','simulations','society','security','services','scientists','skills','sciences','screens','storage','support','service','studies','scientist']

Generate only array of words, all of them should end with character e (Note: could be a substring not only a character) that mostly placed to the left of the word like 'medicine' in most of sentences.

const smartWordGenerator = require("smart-word-generator");

smartWordGenerator
  .generateWordHasRightContext("medicine", true, null, null, null,'e')
  .then((res) => console.log(res));
  # Output: ['the','preventive','chinese','alternative','practice','some','care','reproductive','take','like','practise','state','palliative']

Stay in touch