This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// include the sources for the com/tamil package from | |
// https://github.com/arcturusannamalai/open-tamil/blob/master/java/OpenTamil/src | |
import java.util.Arrays; | |
import java.util.List; | |
import java.util.HashMap; | |
import com.tamil.utf8; | |
import com.tamil.Numeral; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
from __future__ import print_function | |
import collections | |
#BinaryTree = collections.namedtuple('BinaryTree',['left','right','value']) | |
class BinaryTree: | |
def __init__(self,left,right,val): | |
self.left = left | |
self.right = right | |
self.value = val |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# (C) முத்தையா அண்ணாமலை 2017 | |
# இது ஒரு எழில் தமிழ் நிரலாக்க மொழி உதாரணம் | |
நிரல்பாகம் குவிப்பு( ) | |
ப = பட்டியல்() | |
பின்கொடு ப | |
முடி | |
நிரல்பாகம் தினி( கு, மதிப்பு ) | |
பின்இணை( கு, மதிப்பு ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
# (C) 2018 Muthiah Annamalai <ezhillang@gmail.com> | |
# This code is shared under public domain. | |
from google.cloud import translate | |
import tamil | |
import codecs | |
import json | |
import sys | |
def get_translated_words(wrd,tgtLang,client): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Demonstrate Tamil Stemmer module from open-tamil library | |
from tamilstemmer import TamilStemmer | |
wordlist = [u'மலைகள்',u'பாடுதல்',u'ஓடினான்'] | |
# expected = [u'மலை',u'பாடு', u'ஓடி'] | |
ta_stemmer = TamilStemmer() | |
for word in wordlist: | |
ta_stemmer.stemWord(word) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Code for blog post: https://ezhillang.blog/2019/03/01/tamil-entry-via-keypad/ | |
# This code is in Public Domain. | |
from math import factorial as f | |
from math import log | |
def comb(n, k): | |
return (f(n) / f(k)) / f(n - k) | |
def nck(n,k): | |
return comb(float(n),float(k)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This code is in Public Domain. | |
# It requires installation of Open-Tamil module from Python Package Index. | |
# Currently Tamil text is saved in Unicode format but it wasn't always like this. | |
# If you have some of the old encoding formats like TAM, TAB, ISCII etc. you can | |
# use the encoding converters from Open-Tamil (inspired by ones from Suratha, and late Gopi of HiGopi.com) | |
# The following code demonstrates the decoding process | |
# using an intensive search algorithm written by Arulalan, T. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
# (C) 2020, முத்து அண்ணாமலை. | |
# இந்த நிரல் துண்டு MIT உரிமத்தில் வெளியிடப்பட்டது | |
import tamil | |
from pprint import pprint | |
import operator | |
from solthiruthi.scoring import bigram_scores, unigram_score | |
chol = tamil.utf8.get_letters("கணனன") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This Python file uses the following encoding: utf-8 | |
#!/bin/env python3 | |
# (C) 2020, எழில் மொழி அறக்கட்டளை | |
# இந்த நிரல் ஓப்பன்-தமிழ் நிரல் தொகுப்பில் சேர்ந்ததாகும். | |
# உரைவழி தமிழ் எண்களினை கொண்ட கணிதவியல் | |
# உள்ளீடை கணக்கிடும் ஒரு கருவி. | |
import operator | |
import re | |
import tamil |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/env python3 | |
from codecs import open | |
from tamil import utf8 | |
import re | |
with open('kuttistory.txt','r','utf-8') as fp: | |
data = fp.readlines() | |
class Stats: | |
__fields__ = ('total_words','tamil_words') |
OlderNewer