Git Product home page Git Product logo

tagalog-word-syllabization-python's Introduction

Tagalog-Word-Syllabization-Python

This program breaks down Tagalog words into syllables. Also called

Usage

>>> syllabize('Tagalog')
['Ta', 'ga', 'log']
>>> wordList = ['ube', 'tao', 'noón', 'bahay', 'nauuhaw', 'aklát', 'titser', 'eksperto', 'inspirasyón', 'silindro', 'templo', 'instruksyón', 'éksplosibo', 'ékstraordináryo']
>>> for word in wordList:
>>>   print(word, syllabify(word))
ube ['u', 'be']
tao ['ta', 'o']
noón ['no', 'ón']
bahay ['ba', 'hay']
nauuhaw ['na', 'u', 'u', 'haw']
aklát ['ak', 'lát']
titser ['tit', 'ser']
eksperto ['eks', 'per', 'to']
inspirasyón ['ins', 'pi', 'ras', 'yón']
silindro ['si', 'lin', 'dro']
templo ['tem', 'plo']
instruksyón ['ins', 'truks', 'yón']
éksplosibo ['éks', 'plo', 'si', 'bo']
ékstraordináryo ['éks', 'tra', 'or', 'di', 'nár', 'yo']

How does it work?

According to KFW Manwal sa Masinop na Pagsulat [https://kwf.gov.ph/wp-content/uploads/MMP_Full.pdf], the rules of syllabification in Tagalog are as follows,

  1. If there are two or more consecutive vowels, they are separated. Example: /a•ak•yat/ (aakyat), /to•to•o/ (totoo)
  2. If there are two consecutive constants, they are separated. Example: /tit•ser/ (titser), /ak•lat/ (aklat)
  3. If there are three consecutive constants, and the first of the constants is an N or M, and the second and third are BL, BR, DR, PL, at TR, then the first constant joins the previous syllable, and the second and third join the following syllable. Example: /sen•tro/ (sentro), /tim•bre/ (timbre)
  4. If there are three consecutive constants, and they don't follow the above conditions, then the first and second constant join the previous syllable, and the third joins the following syllable. Example: /trans•fer/ (transfer), /ins•pi•ras•yon/ (inspirasyon)
  5. If there are four or more consecutive vowels, the first and second join the previous syllable, and the rest join the following syllable. Example: /des•kons•truk•si•yón/ (deskonstruksiyón), /trans•plant/ (transplant)

tagalog-word-syllabization-python's People

Contributors

itudidyay avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.