இந்த பதிவில் ஏற்கனவே எழுதிய மயங்கொலி எழுத்துகள் பற்றிய பதிவில் (எப்படி மயங்கொலி பிழைகளை திருத்தம் செய்யலாம் என்பது பற்றி) சிந்தனைகளை வழிமுறைபடுத்தி இங்கு பதிவு செய்கிறேன்.
இந்த பதிவில் எப்படி மயங்கொலி பிழைகளை சொல்திருத்தியில் நடைமுறைப்படுத்தி open-tamil-இல் செயல்படுத்துவது என்றும், இதன் நல்ல விளைவுகளையும் பார்க்கலாம்.
திருத்தம்
“தமிழ் திருத்தி” என்ற பெயரில் இந்த (web-based) வலை வழி இடைமுகம் காணலாம் [படம் 1].
தமிழ் திருத்தியில் “பளம்” என்றும் மற்ற இரண்டு சொற்களை (“காதள்”, “எலிதில்”) உள்ளீடு செய்து, சறிபார்க்க சொல்லலாம்.
விடைகளும் மாற்றங்களும் இங்கே! தவறான சொற்கள் சிகப்பு நிர கோட்டில் சுட்டி காட்டப்படும். இதனை விரைவில் open-tamil-இல் காணலாம்.
படம்: எழுத்தாளர் சொற்களை செதுக்குகிறாள்; ஆனால் அவளுக்கு சில சொற்பிழை வந்துள்ளது. இவற்றை எப்படி அவள் நிவர்த்தி செய்தாள் ?
படம் 2: முதல் சொல் மாற்றம் பழம், கனிபடம் 3: இரண்டாம் சொல் “காதல்”படம் 4: மூன்றாம் சொல் “எளிதில்”
படம்: ஜூலை மலர், ஆண்டிற்கு ஒருமுறை மலரும். உபாயம், எனது தந்தை, வேளாண் வல்லுநர், திரு. அண்ணாமலை.
“தமிழ் தெரியுமா?” என்று நிறையபேர் ஒருவரை கேட்பது, இணையத்தின் தூரத்தில், பழக்கமான நாம் பார்க்கும் ஒரு விஷயம். காரணம் அடிக்கடி சிலரது சொற்களில் தலையெடுக்கும் சொற்பிழை. இவற்றை தவிர்க்க அவர்களுக்கு தேவை, பிழைகளை தடுக்கும்/திருத்தும் சொல்திருத்தி – spell checker – மூலம் ஒரு கட்டுரையை சோதித்தால். பல ஆண்டுகள் தமிழ் பயின்ற பொலிவு லேசுலே நமக்கும் கிடைக்கும். இந்த கட்டுரையும் அப்படி ஒரு (வளர்ச்சி நிலையில் உள்ள சொற்பிழை திருத்தியின் வாயில் சோதிக்கப்பட்டே பரிசுரம் செய்யப்பட்டது).
மாலை பொழுதில் மயக்கமென்ன ? தமிழில் உள்ள மயங்கொலி எழுத்துகள் நான்கு வரிசையில் அமைக்கலாம்,
ல, ழ, ள வரிசை.
ர, ற வரிசை.
ந, ன, ண வரிசை.
ங, ஞ, வரிசை.
சொல்திருத்தியில் கணினி நிரல் செய்யவேண்டியது இதுவே:
உள்ளீடு கொடுக்கபட்ட சொல் சரியானதா, அல்லது தவறானதா ?
தவறான சொல் என்ற பட்சத்தில் அதன் மாற்றங்கள் என்னென்ன ?
முதல் படியை எளிதாக ஒரு கையகராதியை கொண்டு செயல்படுத்தலாம். இதனை ஓபன்-தமிழ் (open-tamil) solthiruthi தொகுப்பில் Tamil VU மின் அகராதியை கொண்டு செயல்படுத்தியுள்ளோம். சரியான சொற்கள், அதாவது வேர் எடுத்த, புணர்ச்சி மற்றும் சாந்தி பிரிக்கப்பட்ட சொற்கள் அனைத்தும் சராசரி மின்அகராதியில் காணலாம். இதுவே எளிதான படி.
இரண்டாவது படிதான் ஒரு சொல்திருத்தியின் சிறப்பிற்கும், தரத்திற்கும், முக்கியமானது; இந்த பதிவில் எப்படி மயங்கொலி எழுத்து பிழைகளை திருத்தலாம் என்று சில எண்ணங்களை சமர்ப்பிக்கிறேன்.
உதாரணம் உரையின் சொல் “பளம்” என்பது பிழை என்று கண்டறியப்பட்டது. இது பள்ளம், அல்லது பழம் என்று இரு மாற்றங்களை எழுத்தாளர் நினைத்தாலும் இதனை பிழையாக உள்ளீடு செய்துள்ளார். இங்கு ள-ல-ழ மயக்கம் காணப்படுகிறது.
இதனை கணினி “பலம்”, “பழம்” என்றும் மாற்றுகளை உருவாக்கி இதில் அகராதியில் உள்ளவற்றை மட்டுமே வடிகட்டி எழுத்தாளருக்கு பரிந்துரை செய்யவேண்டும்.
இதனை கொண்டு அணைத்து மயங்கொலி பிழைகளை திருத்தும் ஒரு தன்மை கொண்ட சொல்திருத்தியை உருவாக்கலாம். உதாரணம்,
வளர்ச்சி நிலையில் உள்ள, தற்போது மென்பொருள் வடிவமைப்பில் உள்ள சொல்திருத்தி ஓபன்-தமிழ் தொகுப்பில் காணலாம்: [எச்சரிக்கை: இது இன்னும் பொது பயன்பாட்டிற்கு பொருத்தமானதல்ல]
muthu@brightone:~/devel/open-tamil$ ./spell.sh -i
>> பளம்
சொல் “பளம்” மாற்றங்கள்
(0) பம், (1) பளகு, (2) உளம், (3) பள், (4) அளம்
, (5) ஆளம், (6) பழம்
வணக்கம்!
In this article I will present a conceptual framework, a proposal, for writing a multi-pass solthiruthi spell-checker. This effort is variation on theme of other spell checkers for Tamil created by projects myspell, hunspell, navi/vani, and languagetool respectively.
N.B.: I invite interested individuals to contribute to this document, and collaborate with me, under usual open-source credit/attribution terms.
Problem
Given a Tamil text, urai, we want to find out all spelling mistakes in the text
For words which are in error, we want to further provide alternatives
For Tamil language we have to apply santhi rules, puranchi vithigal, from grammar.
We also would like to provide context sensitive help like A.I.
Solution Overview
I propose a multi-pass spell checker comprised of N-levels. Each level upto the penunltimate (Level N-1) will continue to refine the words which are found in error; we call this analysis levels. The final level will form the suggestions for the words in error; we call this synthesis level. Such an algorithm can be built from 2-Level and upwards in the complexity.
We use a dictionary of valid Tamil words, to validate the Incoming text is split into the form of words, and each word goes through the N-steps.
Typical levels for analysis include, but not limited to,
Dictionary based white-list analysis for incorrectly spelled words
Morphological analysis via stemmer – this is a requirement of agglutinative languages
Clean up proper nouns words, peyarechcham, using names of places, people, things
Bayesian classification of errors using bigram, trigram, N-gram letter probabilities
Context sensitive word suggestion by Bayesian classification using N-gram word probabilities
Keyboard models, Bamini, Tamil99, Anjal, layouts and common misspellings in these
Edit-distance based analysis for mistyped words
Santhi checker
Punarchi checker
Detect transliterated English words in Tamil and ignore
Synthesis step is usually made from the following,
Norvig algorithm for spelling suggestions modified for Tamil arichuvadi
For Tamil we need to combine Santhi, and Punarchi rule based pruning of suggestions
Pizhai : 2-Level spell checker
Pizhai spell checker algorithm uses the 2 analysis steps of whitelisted dictionary and the bigram/trigram letter analysis to flag erroneous words. Finally we suggest word alternates to the user during synthesis.
Solthiruthi : 3-Level spell checker
Solthiruthi spell checker algorithm uses the 3 analysis steps of whitelisted dictionary and the bigram/trigram letter analysis to flag erroneous words, and includes a stemmer. Finally we suggest word alternates to the user during synthesis.
Code
All of these ideas can be implemented in Python using open-tamil project, today. We welcome enthusiastic contributors – linguists, language enthusiasts and developers.