Giter Site home page Giter Site logo

kipa's Introduction

KIPA

Convert Kurdish text and words to IPA phonetics.

Why to use it?

  • Convert texts to IPA with different alternatives
  • Convert numbers to its corresponding Kurdish text
  • It prioritizes the word's sound in the Kurdish Wiktionary (Wikiferheng) and return the generalized one if it doesn't exist.

Quick example:

from kipa import kipa

print(kipa.translate_text("Dema we baş be! Ev kîpa ye,
                    \n û ew 1ekemîn mektebe ye
                     ji bo  mijarê!"))
| dɛmɑː wɛ bɑːʃ bɛ |
 ɛv kiːpɑː jɛ |
 uː ɛw jɛkɛkɛmiːn mɛktɛbɛ jɛ ʒɪ boː veː mɪʒɑːɾeː |

Installation

pip install kipa

Usages:

  • To get only the translated text (IPA phonetics text):
import kipa 

ipa_text = kipa.translate_text('SOME_KURDISH_TEXT')
  • To get an object of the result:
import kipa 

ipa_text = kipa.get_ipa('SOME_KURDISH_TEXT')
  • To convert a number to its Kurdish text:
import kipa

number_in_text = kipa.convert(382442)
number_ordinal = kipa.get_ordinal(32)
normal_fraction = kipa.get_fraction('4/5')
fraction_has_name = kipa.get_fraction('1/2')
numerator_bigger_than_denominator = kipa.get_fraction('45/12')
decimal_simple = kipa.get_decimal('34.675', False)
decimal_complex = kipa.get_decimal('34.675', False)
negative_fraction = kipa.get_fraction('-14/22')
negative_complex_decimal = kipa.get_decimal('-1.00067', True)
negaive_weird_decimal = kipa.get_decimal('-00000000000001.000000000000000067', True)
negative_weird_fraction = kipa.get_fraction('-0001/0003')
negative_fraction_with_decimals = kipa.get_fraction('-000.9999/0009.999')
sêsed û heştê û du hezar û çarsed û çil û du
sî û duyemîn
ji pêncan çar
nîv
çil û pênc belavî dwanzdehan
sî û çar nûqte şeşsed û heftê û pênc
sî û çar û ji hezaran şeşsed û heftê û pênc
negatîf ji bîst û duan çardeh
negatîf yek û ji sed hezaran şêst û heft
negatîf yek nûqte sifir sifir sifir sifir sifir sifir sifir sifir sifir sifir sifir sifir sifir sifir sifir sifir şêst û heft
negatîf ji sêyan yek
negatîf ji neh nûqte nehsed û nod û nehan sifir nûqte neh hezar û nehsed û nod û ne

Note: Kipa automatically translates the numbers to its corresponding IPA phonetics too.

kipa's People

Contributors

jagaryousef 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.