open-tamil ச|வா|வால்|வாசல்|சவால்

Open-Tamil : anagrams / palindrome / combinations / generate all valid sub words

IMG_5124

My recent work from this weekend added some tools to the  solthiruthi – framework for word play #75 . This change introduces easy ways to do,

  1. Generate Anagrams
  2. Generate Combinations of words
  3. Check if word is a plaindrome

Combinagrams – all sub-words

Particularly you can use the open-tamil API listed below, to generate list of all sub-words within a word.

e.g.

import tamil
from solthiruthi.dictionary import *
TVU_dict = DictionaryBuilder.create(TamilVU)
word = u’சவால்’
q=list(tamil.wordutils.combinagrams(word,TVU_dict))
print(u”|”.join(q))

which gives you the output, ச|வா|வால்|வாசல்|சவால்

Algorithm

The algorithm for combinagrams makes use of combination generators, and filters each permutations further generated from every such combination using a publicly avialable word-list like the Tamil VU dictionary provided with open-tamil.
Finally we get a list of all possible legal words from a given word.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s