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

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

https://www.flickr.com/photos/d_e_/85688984/in/photolist-77oJoH-hwV1zs-8mw2Fe-2zKXNz-4y1Y1h-5C6jWF-B28fc-bNs8Jv-8zbmh-hVTWiM

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.

மறுமொழியொன்றை இடுங்கள்

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 /  மாற்று )

Google photo

You are commenting using your Google account. Log Out /  மாற்று )

Twitter picture

You are commenting using your Twitter account. Log Out /  மாற்று )

Facebook photo

You are commenting using your Facebook account. Log Out /  மாற்று )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.