https://github.com/harmotus/syllable-separator
A simple syllable separator for text in Spanish ( ideal for learning or teaching Spanish )
https://github.com/harmotus/syllable-separator
diphthong diptongo espanol hiato hiatus html5 javascript palabra separador separator silaba silabas spanish syllable syllables text texto triphthong triptongo word
Last synced: 27 days ago
JSON representation
A simple syllable separator for text in Spanish ( ideal for learning or teaching Spanish )
- Host: GitHub
- URL: https://github.com/harmotus/syllable-separator
- Owner: harmotus
- License: mit
- Created: 2025-04-22T11:32:51.000Z (27 days ago)
- Default Branch: main
- Last Pushed: 2025-04-22T11:41:25.000Z (27 days ago)
- Last Synced: 2025-04-23T05:16:51.677Z (27 days ago)
- Topics: diphthong, diptongo, espanol, hiato, hiatus, html5, javascript, palabra, separador, separator, silaba, silabas, spanish, syllable, syllables, text, texto, triphthong, triptongo, word
- Language: JavaScript
- Homepage: https://harmotus.github.io/syllable-separator/
- Size: 31.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Syllable Separator
A simple syllable separator for text in Spanish ( ideal for learning or teaching Spanish )
## Screenshots


## 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
```bash
npm i syllable-separator
```## Usage
```js
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
```bash
npm test
```## Demo
[HOME](https://harmotus.github.io/syllable-separator)
## License
[MIT](https://opensource.org/license/mit)