Skip to content

diyorbek/syllabize-uz

Repository files navigation

syllabize-uz

Library for dividing Uzbek words into syllables. Used at Fonetika.Uz.

Read in

Installation

NPM

npm install syllabize-uz

Yarn

yarn add syllabize-uz

UNPKG

<script src="https://unpkg.com/syllabize-uz/dist-umd/index.min.js"></script>

Usage

Importing:

import { syllabize } from 'syllabize-uz';

When using UNPKG distribution:

<script src="https://unpkg.com/syllabize-uz/dist-umd/index.min.js"></script>
<script>
  const { syllabize } = syllabizeUz;
</script>

For words in latin alphabet use: syllabize(word)

For words in cyrillic alphabet use: syllabizeCyrillic(word)

import { syllabize, syllabizeCyrillic } from 'syllabize-uz';

const syllablesLatin = syllabize('olmaxon'); // ["ol", "ma", "xon"]
const syllablesCyrillic = syllabizeCyrillic('мўъжизавий'); // ["мўъ", "жи", "за", "вий"]

console.log(syllablesLatin.join('-')); // "ol-ma-xon"
console.log(syllablesCyrillic.join('-')); // "мўъ-жи-за-вий"