syllable-separator

1.0.0 • Public • Published

Syllable Separator

A simple syllable separator for text in Spanish ( ideal for learning or teaching Spanish )

Screenshots

light-theme

dark-theme

Description

The script separates into syllables the words that contain the letters: aeiou áéíóúü bcdfghjklmnñpqrstvwxyz.

Except for the following exceptions:
• Words ( non-native or special ) that begin with . ( dot ) For example: .beatles, .jeans, etc.
• Words containing the special characters ( # @ ) For example: #tarde, no@che, etc.
• Words enclosed in braces { ... } For example: a.que.lla  fru.ta  { roja y madura }

The script processes words that are partially separated into syllables. For example: sub-lunar, to sub.lu.nar

The script also contains a dictionary of words that do not follow the general rules. For example: fluía, to flu.í.a
There are several words that do not follow these rules, so the content of this dictionary will expand over time.

Installation

npm i syllable-separator

Usage

let text = 'Lo que sabemos es una gota y lo que ignoramos es un océano';
let syllable = require('syllable-separator');
let splittext = syllable.Separator(text);

console.log(splittext);

// lo  que  sa.be.mos  es  u.na  go.ta  y  lo  que  ig.no.ra.mos  es  un  o.cé.a.no

Test

npm test

Demo

HOME

License

MIT

Package Sidebar

Install

npm i syllable-separator

Weekly Downloads

7

Version

1.0.0

License

MIT

Unpacked Size

77 kB

Total Files

15

Last publish

Collaborators

  • harmotus