Silabacion
Convert Spanish words into syllables
Install / Use
/learn @weiwei/SilabacionREADME
Silabación
Separate Spanish words into syllables.
Installation
As with any other NPM package, you can install it with npm or yarn.
Usage
import { Word, Stress } from 'silabacion';
const word = new Word('hispanófilo');
console.log(word.word); // hispanófilo
console.log(word.length); // 11
console.log(word.syllables.length); // 5
console.log(word.syllables[0]); // { onset: 'h', nucleus: 'i', coda: 's' }
console.log(Stress[word.stress]); // Proparoxytone
console.log(word.rhyme); // ófilo
console.log(word.tonic); // { onset: 'f', nucleus: 'i', coda: '' }
const word = new Word('aéreo');
console.log(word.hiatuses);
// [
// { syllableIndex: 0, composite: 'aé', type: 1 },
// { syllableIndex: 2, composite: 'eo', type: 0 }
// ]
console.log(word.diphthongs);
// []
console.log(word.triphthongs);
// []
// Note: diphthongs and hiatuses have a enum type attribute
export enum HiatusType {
Simple,
Acentual,
}
export enum DiphthongType {
Creciente,
Decreciente,
Homogéneo,
}
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.
License
Compare
- silabas.js only separates syllables. GNU licensed.
- silabajs functionally comparable. It's in pure js instead of typescript.
Related Skills
node-connect
344.1kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
96.8kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
344.1kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
344.1kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
