Skip to main content

Anicham(அனிச்சம்)

Tamizh language parser to parse tamizh texts of UTF-8 encoded. Provides functions for identify and manipulate tamizh strings. Structured by hierchical elements of Tamizh native grammar rules (Ezhuthu, Sol, Vaakiyam).

Contents

1.Core Elements

2.Grammatical Tools

3.Contributing

Core elements:

எழுத்து(Ezhuththu) - A Letter:

A Letter , final smallest entity of all components in a language.

Usage:

from anicham import script, NodeType
from anicham import EzhuthuType

ezhutthu_list: list = script('ஜவஹர்லால் நேரு', node=NodeType.EZHUTTHU)
assert len(ezhutthu_list) == 8

assert ezhutthu_list == [('ஜ', EzhuthuType.GRANTHA_A),
                         ('வ', EzhuthuType.UYIR_MEI_A),
                         ('ஹ', EzhuthuType.GRANTHA_A),
                         ('ர்', EzhuthuType.MEI),
                         ('லா', EzhuthuType.UYIR_MEI_AA),
                         ('ல்', EzhuthuType.MEI),
                         ('நே', EzhuthuType.UYIR_MEI_AE),
                         ('ரு', EzhuthuType.UYIR_MEI_U)]
சொல்(Sol) - A word:

A word , group of letters(ezhuththu) create Sol.

Usage:

from anicham import script, NodeType

sol_list: list = script("வெற்றிமாறன், தமிழ் திரைப்பட பிரபல முன்னணி இயக்குனர் ஆவார்",
                        node=NodeType.SOL)
assert len(sol_list) == 7
வாக்கியம்(Vaakiyam) - A Sentence:

A sentence , group of words(sorkkal) creates Vaakiyangal.

Usage:

from anicham import script, NodeType

vaakiyam_list: list = script(
    """வெற்றிமாறன், தமிழ் திரைப்பட பிரபல முன்னணி இயக்குனர் ஆவார். 
    இவர் தமிழ் திரையுலகில் திரைக்கதை எழுத்தாளராக பணியாற்றி அறிமுகமானவர். 
    பின்னர் உதவி இயக்குனராக பிரபல தமிழ் இயக்குனர்களிடம் பணியாற்றி இயக்குனராக அறிமுகமாகி தமிழ் திரையுலகில் புகழ் பெற்றுள்ளார். 
    வெற்றிமாறன் கடலூர் மாவட்டத்தை சேர்ந்தவர்.
    """,
    node=NodeType.VAAKIYAM)
assert len(vaakiyam_list) == 4
பத்தி(Patthi) - A Paragraph:

A Paragraph , group of sentences(patthigal) creates Patthi.

Usage:

from anicham import script   

patthi_list: list = script(
    "விடுதலை இந்தியாவின் முதல் சட்ட அமைச்சராகவும், இந்திய அரசியல் சாசனத்தின் தந்தையாக விளங்கியவர்,‘பீம்ராவ் ராம்ஜி அம்பேத்கர்’. இவர் ஒரு சமூக சீர்திருத்தவாதியாக மட்டுமல்லாமல், மிகச்சிறந்த பொருளியல் அறிஞராகவும், அரசியல் தத்துவமேதையாகவும், சமூக சீர்திருத்தவாதியாகவும், பகுத்தறிவு சிந்தனையாளராகவும், சிறந்த எழுத்தாளர் மற்றும் பேச்சாளராகவும், வரலாற்று ஆசானாகவும் விளங்கியவர்.\n" +
    "தலித் இன மக்களுக்கு மட்டுமல்லாமல், ஒடுக்கப்பட்ட மக்களின் வாழ்விருளைப் போக்க, உதித்த சூரியன்.\n" +
    "மகாத்மா காந்திக்கு பிறகு, சுதந்திர இந்தியாவின் மாபெரும் தலைவர் என்று போற்றப்பட்டவர், டாக்டர் அம்பேத்கர் அவர்கள். தன் வாழ்நாள் முழுவதையும் சமூகத்திற்கென அர்ப்பணித்த மாபெரும் சிற்பியான டாக்டர் அம்பேத்கர் அவர்களின் வாழ்க்கை வரலாறு மற்றும் சாதனைகளை காண்போம்.")

assert len(patthi_list) == 3

Grammatical Tools:

யாப்பு(Yappu)

Yappu literally means compilation grammar. It defines semanticity of sound,letter,word,stanza in Tamil poems. See more here

எழுத்து(ஓசை)(Oasai)

As we see earlier, Ezhuththu is first entity, in yappu , it represents phonetic length form. From the perspective of Phonetics , Tamizh letters catagorized into 3 types. Kuril, Nedil, Otru (குறில்,நெடில்,ஒற்று).

Usage:

from anicham import yappu_venba,VenbaNodeType,Oasai

ezhutthu_list: list = (
    yappu_venba("சுனை", node=VenbaNodeType.EZHUTTHU))
assert len(ezhutthu_list) == 2
assert ezhutthu_list[0].oasai == Oasai.KURIL
assert ezhutthu_list[0].letter == 'சு'

assert ezhutthu_list[1].oasai == Oasai.NEDIl
assert ezhutthu_list[1].letter == 'னை'
அசை(Asai)

Based on Phonetics of letter (Ezhuththu), Asai(sub-part of Word) , is catagorized into 2 types. Ner,Nirai (நேர்,நிரை). See the grammar file for more info.

Usage:

from anicham import yappu_venba,VenbaNodeType,Nirai,Ner,MoovasaiType


asai_list = yappu_venba("சுரையாழ", node=VenbaNodeType.ASAI)
assert len(asai_list) == 1

assert isinstance(asai_list[0].asai_one, Nirai)
assert isinstance(asai_list[0].asai_two, Ner)
assert isinstance(asai_list[0].asai_three, Ner)

assert asai_list[0].type == MoovasaiType.PULIMANGAI
சீர்(Seer)

Based on arrangement of Asai, Tamizh word which is Seer (in Yaapilakkam terminology), is catagorized into 14 types. First two types contains 1 asai , mostly comes at last point of poetry(called eetru-seer). Next 4 types contains 2 asai inside, so They are called Eerasai Seer (2 Asai Seer). and last 8 types contains 3 asai inside so, They are called Moovasai Seer (3 Asai Seer). Read about all types here

Usage:

from anicham import yappu_venba,VenbaNodeType,EerasaiType

seer_list: list= yappu_venba("இன்றுகொல்", node=VenbaNodeType.SEER)

assert len(seer_list) == 1

assert seer_list[0].eerasai.type == EerasaiType.KOOVILAM
அடி(Adi)

Basically it means line of poem. Adi contains 4 seer. Last line of the poem is called "Eetradi", which contains 3 seer. Last seer is known as eetru-seer. Read more here.

Usage:

from anicham import yappu_venba,VenbaNodeType

adi_list  = yappu_venba("""அரிய வரைகீண்டு காட்டுவார் யாரே""", node=VenbaNodeType.ADI)

assert len(adi_list) == 1
assert len(adi_list[0].seer_list) == 4
வெண்பா(Venba)

Venba is a form of classical Tamil poetry. Which is the root of all above elements, and define their rules. You can provide Venba poems as input , and it will be parsed like below. Read more about here

Usage:

from anicham import yappu_venba,EerasaiType,MoovasaiType,Venba,EetruSeerAsai

actual: Venba = yappu_venba("உடுக்கை இழந்தவன் கைபோல ஆங்கே\n" + "இடுக்கண் களைவதாம் நட்பு")
assert len(actual.adi_list) == 1

assert actual.adi_list[0].seer_list[0].eerasai.type == EerasaiType.PULIMA
assert actual.adi_list[0].seer_list[1].eerasai.type == EerasaiType.KARUVILAM
assert actual.adi_list[0].seer_list[2].moovasai.type == MoovasaiType.THEMANGAI
assert actual.adi_list[0].seer_list[3].eerasai.type == EerasaiType.THEMA

assert actual.eetradi.seer_list[0].eerasai.type == EerasaiType.PULIMA
assert actual.eetradi.seer_list[1].eerasai.type == EerasaiType.KARUVILAM
assert actual.eetradi.seer_list[2].asai.type == EerasaiType.THEMA

assert actual.eetradi.seer_list[2].get_eetru_seer_asai() == EetruSeerAsai.KAASU

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.

Metadata

Release files for anicham 0.0.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for anicham 0.0.6
File Size Uploaded
anicham-0.0.6.tar.gz 27.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for anicham 0.0.6
File Interpreter ABI Platform
anicham-0.0.6-py3-none-any.whl Python 3 none any Details

Total release size: 56.2 kB

Release files / anicham-0.0.6.tar.gz

Download URL anicham-0.0.6.tar.gz
Size 27.8 kB
Tags Source
SHA-256 checksum
How to use checksums
875bfdcb713ac079a4bc91db63bf0847186936f196f1107e2c6055db4372c48c
BLAKE2b-256 checksum
How to use checksums
de03f898428a2db9d6d5650846673bd1225b7f3f8f2605e636c4063423bf2c6d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.12.1

Release files / anicham-0.0.6-py3-none-any.whl

Download URL anicham-0.0.6-py3-none-any.whl
Size 28.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d0f67249eb3565091fda4e6a42bf124a70e495aeeb7b72de06380666fb79e8e8
BLAKE2b-256 checksum
How to use checksums
c210da9d3ecf88e122d160c2c91f57f061ac344e893695388c015ba3df64ea0d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.12.1

Release history Release notifications | RSS feed

This release

0.0.6 This release

2 release files

0.0.5

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page