An open API service indexing awesome lists of open source software.

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 )

Awesome Lists containing this project

README

        

# Syllable Separator

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

## Screenshots

![light-theme](docs/light.png)

![dark-theme](docs/dark.png)

## 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)