Skip to main content

Tholkaappiyam - A library for Python to globalize the ancient text of the oldest language in the world, Tamil

Project description

Tholkaappiyam - A library for Python to globalize the ancient text of the oldest language in the world, Tamil"

A Python package to understand Tholkaappiyam in English and use it for enhancing NLP

Tholkaappiyam is the most ancient extant Tamil grammar text and the oldest extant long work of Tamil literature. In order to make people all over the world understand Tamil, i18n Solutions Salem, have developed this package based on the work of P. S. Subrahmanya Sastri.

Created by Aswin Venkat aswinvenk8@gmail.com

Installation

How to install ?

pip install tholkaappiyam

Pre-Requisites

  1. Pandas
  2. JSON

Importing in python

How to import ?

from tholkaappiyam import thol

About Tholkaappiyam

Tolkāppiyam or Tholkaappiyam has 3 Adhikaarams. Each Adhikaaram has 9 Iyals in them. Each Iyal have a specific number of songs/paadal (or Sutrās). Songs are classified into Categories. If we analyse the songs as categories, it is easier to understand the core meaning of the Sutrās.

P. S. Subrahmanya Sastri

Subrahmanya Sastri was the first person to translate Tolkāppiyam into English. He worked on the Tolkappiyam, which he later translated into English. The translation of Ezhuthathikaram and Poruladhikaram were published by the Kuppuswami Sastri Research Institute, while Solladhikaram was published by Annamalai University. We have referred to Subrahmanya Sastri's text on Tholkaappiyam in Roman transliteration and English translation.

History of Tholkaappiyam

Tholkapiyam, some traditionally believe, was written by a single author named Tolkaappiyar, a disciple of Vedic sage Agastya mentioned in the Rigveda (1500–1200 BCE). His student Tholkaappiyar was asked to compile Tamil grammar, which is Tolkappiyam. In Tamil historical sources such as the 14th-century influential commentary on Tolkappiyam by Naccinarkkiniyar, the author is stated to be Tiranatumakkini (alternate name for Tolkappiyan), the son of a Brahmin rishi named Camatakkini. The earliest mention of Agastya-related Akattiyam legends are found in texts approximately dated to the 8th or 9th century. The dating of the Tolkappiyam is difficult, much debated, and it remains contested and uncertain. Proposals range between 5,320 BCE and the 8th century CE.

Displaying

# About Tholkaappiyam
>> thol.about_tholkaappiyam()

# Display Adhikaarams
>> thol.display_adhikaaram()

# Display Iyals
>> thol.display_iyal(adhikaaram_no)

# Display Tholkaappiyar
>> thol.display_tholkaapiyar()

JSON Data

# Returns the entire JSON dataset of Tholkaappiyam to the user
>> data=thol.data_json()

Methods

# Class Adhikaaram
>> thol.Adhikaaram(adhikaaram_no)
  • It has 2 methods:
    • display_total_no_of_songs() :
      • Prints total number of songs in the Adhikaaram
    • iyals_paadal_count_dict() :
      • Returns a dict containing iyals of the adhikaaram and the number of paadal in each iyal
# Class Iyal
>> thol.Iyal(adhikaaram_no,iyal_no)
  • It has 2 methods :
    • display_total_no_of_songs() :
      • Prints total number of songs in the Iyal
    • iyals_paadal_count_dict() :
      • Returns a dict containing categories of the iyal and the number of paadal in each categories
# Class Paadal
>> thol.Paadal(adhikaaram_no,iyal_no,paadal_no)
  • It has 1 important method :
    • paadal_data() :
      • Returns a dict of song data
Paadal_data =
{
paadal                  :   "paadal...",
paadal_meaning          :   "paadal in english",
paadal_category         :   "Paadal category (eng)",
paadal_iyal             :   "Iyal that the paadal belongs",
paadal_iyal_eng         :   "Iyal of the paadal belongs in English",
paadal_adhikaaram       :   "Adhikaaram that the paadal belongs",
paadal_adhikaaram_eng   :   "Adhikaaram that the paadal belongs in English"
}
# Class Category
>> thol.Category(adhikaaram_no,iyal_no)
  • It has 2 methods :
    • paadal_dict():

      • Returns a dict where,
        • Key : Name of the Category you selected
        • Value : List of the Songs in that category
    • paadal_data():

      • Returns a list of paadal data of all the songs under the given category
      • This 'list of dict' data can be further used to study the song/paadal under the given topic

Sample Code

To check the number of songs in all the iyal in an Adhikaaram (Soladhikaaram)

n=tholkaappiyam.Adhikaaram(2).iyals_paadal_count_dict()
for i in n:
    print(i,'\t\t',n[i])

To check the number of songs in all the categories in an Iyal (Ezhuthadhikaaram, Pirappiyal)

n=tholkaappiyam.Iyal(1,3).categories_paadal_count_dict()
for i in n:
    print(i,'\t',n[i])

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tholkaappiyam-0.0.1.tar.gz (178.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tholkaappiyam-0.0.1-py3-none-any.whl (179.8 kB view details)

Uploaded Python 3

File details

Details for the file tholkaappiyam-0.0.1.tar.gz.

File metadata

  • Download URL: tholkaappiyam-0.0.1.tar.gz
  • Upload date:
  • Size: 178.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.5

File hashes

Hashes for tholkaappiyam-0.0.1.tar.gz
Algorithm Hash digest
SHA256 59077ba6774a34668cfdba1daf6e6bd6f8b37b8596d2662b47df4a32cdc720ca
MD5 aa257624f42ba2b0cb1aa6c09b57eb3d
BLAKE2b-256 0f01919ff0130ed3e91a74ad5ab9db047c82b3e0234a124ee02b2b4d3ee6b4b8

See more details on using hashes here.

File details

Details for the file tholkaappiyam-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: tholkaappiyam-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 179.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.5

File hashes

Hashes for tholkaappiyam-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 036b94f1a3600cbfbebd4f4e8695e2113d5c4b61028f21f8edd276ca63dd4391
MD5 51703de1786bd0507d29a4edb2067ea8
BLAKE2b-256 0106aa0694bb1502c67c7fc90335e4b9a250920a4096b6ba374fc7bed3c17642

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page