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

riman

v1.1.2

Published

checks if two words rhymes in spanish and more.

Downloads

15

Readme

riman

Check if two words rhyme in Spanish

It also provides you with relevant infromation about words such as assonace rhyme, consonant rhyme, syllables, stressed syllable...

Here is a DEMO so you can try some rhymes.

Installation

npm install riman

Usage 1

ES6

import * as riman from "riman";

OR

const riman = require("riman");
console.log(riman.analyze("maravilloso", "espantoso"));

Result 1

{
  riman: true,
  tipoRima: 'consonante', // consonante | asonante
  palabraUno: {
    palabra: 'maravilloso',
    rimaConsonante: 'oso',
    rimaAsonante: 'oo',
    longitudPalabra: 11,
    numSilabas: 5,
    silabas: [ 'ma', 'ra', 'vi', 'llo', 'so' ],
    acentuacion: 'Grave (Llana)', // Aguda | Grave (Llana) | Esdrujula
    tonica: 4,
    EsPrimeraVocal: false,
    EsUltimaVocal: true,
    EsPrimeraVocalTonica: false,
    hiato: [], // For example 'a-e' or 'i-a'
    diptongo: [], // For example ui or au
    triptongo: [] // For example uey
  },
  palabraDos: {
    palabra: 'espantoso',
    rimaConsonante: 'oso',
    rimaAsonante: 'oo',
    longitudPalabra: 9,
    numSilabas: 4,
    silabas: [ 'es', 'pan', 'to', 'so' ],
    acentuacion: 'Grave (Llana)', // Aguda | Grave (Llana) | Esdrujula
    tonica: 3,
    EsPrimeraVocal: true,
    EsUltimaVocal: true,
    EsPrimeraVocalTonica: false,
    hiato: [], // For example 'a-e' or 'i-a'
    diptongo: [], // For example ui or au
    triptongo: [] // For example uey
  }
}

Usage 2

ES6

import * as riman from "riman";

OR

const riman = require("riman");
console.log(riman.analyzeWord("aguacate"));

Result 2

{
  palabra: 'aguacate',
  rimaConsonante: 'ate',
  rimaAsonante: 'ae',
  longitudPalabra: 8,
  numSilabas: 4,
  silabas: [ 'a', 'gua', 'ca', 'te' ],
  acentuacion: 'Grave (Llana)', // Aguda | Grave (Llana) | Esdrujula
  tonica: 3,
  EsPrimeraVocal: true,
  EsUltimaVocal: true,
  EsPrimeraVocalTonica: false,
  hiato: [], // For example 'a-e' or 'i-a'
  diptongo: [ 'ua' ], // For example ui or au
  triptongo: [] // For example uey
}

Values Definitions

CHECK GITHUB FOR SPANISH/ENGLISH README

riman: boolean identify whether the two words entered rhyme.

tipoRima:string if both vowels and consonants rhyme from the stressed syllable it is consonant rhyme, if only vowels rhyme it is assonance rhyme.

palabraUno y palabraDos: object they contain the information of the two words.

palabra:string the word entered in lowercase.

rimaConsonante:string word ending from the stressed syllable taking into account consonants and vowels.

rimaAsonante:string word ending from the stressed syllable taking into account only vowels.

longitudPalabra:number number of letters in the word.

numSilabas:number number of syllables in the word.

silabas:array word separated by syllables.

acentuacion:string indicates if the word is Aguda, LLana or Esdrujula. words stressed on the last syllable are Aguda, the penultimate syllable are Llana, and the antepenultimate syllable are Esdrujula.

tonica:number indicates syllable position that has the accent of the word, but does not necessarily have an accent mark. That is to say the stressed syllable.

EsPrimeraVocal:boolean indicates if the first letter of the word is a vowel (useful for verse metrics)

EsUltimaVocal:boolean indicates if the last letter of the word is a vowel (useful for verse metrics)

EsPrimeraVocalTonica:boolean indicates if the first letter of the word is vowel and tonic or stressed (useful for the metric of verses)

hiato:array shows if there are two vowels in a row that are in different syllables (hiatus).

diptongo:array shows if there are two vowels in a row on the same syllable (diphthong).

triptongo:array shows if there are three vowels in a row on the same syllable (triphthong).

Related

I have used two npm modules, rimador and silabea. Both libraries are old, nobody maintains them and they have errors. I have redone some of its functionalities and improved them.

HELP ME IMPROVE THIS LIBRARY BY REPORTING BUGS IN GITHUB