-
Notifications
You must be signed in to change notification settings - Fork 3
செங்கோவையின்மூலம் தமிழ்தேடல் (Searching Tamil text with regular expression)
செங்கோவையின்மூலம் தேடும் வழிமுறைகளை அனைத்து கணிமொழிகளும் கொண்டிருக்கின்றன. இருப்பினும், அவைகளால் எழுத்துகளின் பண்புகளையறிந்து தேடமுடியாது. எடுத்துக்காட்டாக, ஒரு கட்டுரையிலிருக்கும் வன்றொடர்க்குற்றியலுகரங்களை ஒரேகோவையின்மூலம் தேடமுடியாது. , சொவ்வறைகள் அதற்காக தனியாக வடிவமைக்கப்படவேண்டும்.
தமிழெழுத்துகளனைத்தும் பலவிதமான பண்புகளைக்கொண்டிருக்கின்றனவென்பது நன்கு அறியப்பட்ட உண்மை. தமிழின் இந்த இயல்பை கருத்திலெடுத்து தேடுந்தேவை தமிழ்க்கணிமையில் பலவிடங்களில் எழுகின்றது. கணிமொழியான யாவாவில் தமிழ்மொழியின் இயல்பை உள்ளடக்கி, தமிழ்ச்செங்கோவையின்மூலம் தேடும் வழிமுறைகளை ஏற்படுத்துவதே இந்த முன்மொழிவு ஆகும். இந்த யோசனை யாவாவில் முதலிற்செயற்படுத்தப்பட்டாலும் வேறுகணிமொழிகளிலும் செயற்படுத்தப்படமுடியும்.
இதுபற்றி மேலுமறிய இங்கு சுட்டவும்.
Almost all the computer languages support regular expression engine to search for any text with specific patterns. However, They can not search for a pattern containing characters-with-specific-properties. It is well known that Tamil characters have many properties. An ability to search for "Tamil text with certain properties" is very much required in many areas of Tamil computing. I propose a Java Based implementation of such regular expression engine. This idea can be easily extended to other programming languages as well.
Please read more here.
செங்கோவைவழித்தேடல் மிகவும் வலிமைவாய்ந்ததாகும். நாம் தேட எண்ணும் ஒன்றை மிகவுஞ்சரியாகச்சொல்ல செங்கோவைகள் உதவுகின்றன. தமிழ்க்கணிமையில் பலநேரங்களில் தமிழ்ப்பாங்கைக்கொண்டு தேடுந்தேவை எழுகிறது. எடுத்துக்காட்டாக, கொடுக்கப்பட்ட சொல் வன்றொடர்க்குற்றியலுகரமாவென்று எப்படி அறிவது? அல்லது கொடுக்கப்பட்ட 7 சீர்களும் திருக்குறளாயிருக்கமுடியுமா? இதுபோன்ற கேள்விகளுக்கு தமிழ்ச்செங்கோவையின்மூலம் நம்மால் பதிலளிக்கமுடியும்.
Regular expressions are a powerful mechanism with respect to searching text. They are a great way to express what we want to search, in a concise and precise way. Tamil computing requires to identify a word or a series of words based on their properties. For E.g, how will we find if a Tamil word is வன்றொடர்க்குற்றியலுகரம், or if the two lines with 7 words we got could be a திருக்குறள். A regular expression engine that can search text based on properties can answer those questions. E.g) The pattern ${குறள்} can represent a pattern for திருக்குறள்.
எனது பெயர் வேல்முருகன் சுப்பிரமணியன். கடந்த 12 ஆண்டுகாலமாக பெருநிறுவனங்களுக்கான சொவ்வறைகளை வடிவமைப்பதிலும் உருவாக்குவதிலும் பங்குபெற்றுவருகிறேன். நுட்பத்தின்வழியில் விளக்கப்படவியன்றவொன்றை வடிவமைப்பதிலும் உருவாக்குவதிலும் ஆர்வங்கொண்டவன்.
My Name is Velmurugan Subramanian. I have been in the software product development industry for over 12 years. I love to model and code anything that I understand technically.
இந்த திட்டத்தின் ஆக்கம் நல்லமுடியும்நிலையை எட்டிவிட்டது. இருப்பினும், இந்த ஆக்கம் ஏற்கனவே யாவாவிலிருக்கும் அடிப்படையாக்கத்தை தழுவும்படிதான் கட்டமைக்கப்பட்டுள்ளது. யாவாவின் அடிப்படையாக்கம் தமிழ்போன்றமொழிகளின் தேவையை கருத்திற்கொண்டு அமைக்கப்பட்டதில்லை. எனவே, இந்த ஆக்கத்தின் வேகம் பலவழிகளில் தடைப்பட்டிருக்கின்றது. நாம் அடிப்படையாக்கத்தை தமிழ்போன்றமொழிகளை கருத்திற்கொண்டு செய்தால், இதன்வேகம் பன்மடங்கு கூடும். இருப்பினும், அதுபோன்றவற்றை செய்து, சோதித்து நல்லநிலையை எட்டச்செய்ய கடினவுழைப்பும் நேரமும் தேவை.
இப்போதிருக்கும் ஆக்கத்தின் பயன்பாடுகள் எந்த அளவிற்கு நமக்கு உதவுகின்றன, இதிலுள்ள வேகக்குறைபாடுகள் எந்த அளவிற்கு நமது பயன்பாட்டிற்கு தடையாயிருக்கிறதென்பதைப்பொறுத்து நாம் அடிப்படையாக்கத்தை தமிழ்வழியிற்செய்யவேண்டுமா வேண்டாமாவென்பதை தீர்மானிக்கமுடியுமென்று நான் கருதுகிறேன். இந்த ஆக்கத்தின்மூலம் சங்கத்தமிழிலக்கியங்களில் நாம் வேண்டும்பலவற்றை தேடமுடியும். தற்காலத்தின் உரைநடையில் சொல்லப்படும் சந்தியிலக்கணங்களுக்கான தேடற்பாங்குகளை அமைத்து வலிமிகுந்திருக்கிறதா இல்லையாவெனபதை தேடிக்காணமுடியும்.
This project has been almost implemented on top of the Standard Java regular expression engine. From a Tamil regular expression, the implemented Tamil regular expression engine is capable of generating standard Java regular expression which is then further compiled by Java. However, it will be much more performant if we develop a native Tamil regular expression engine. This could be proposed independently after assessing the usage and effectiveness of current implementation. The current implementation can be used to search any Tamil text source including but not limited to Tamil literatures of sangam-time. The same can also be used to detect syntactical errors and correct them in Tamil text based on its structure (not based on the interpreted meaning).
This should be implemented as a standalone library first. Then, different applications can be built using the search library. The scope of the proposal does not include implementing any end user application. However, sample applications using the library shall be created to show case how an useful application may be implemented. E.g) a web application that allows the end users to search sangam literature can be built on the library that this project can deliver.
The deliverable will provide the following capabilities
- A pre-defined set of regular expressions.(more than 100 now)
${நெடில்} will mean any நெடில் Tamil Character. $ {நெடில்}+ will mean 1 or more continuous நெடில் characters.${வெண்டளை} would match a வெண்டளை between two words after examining their யாப்பு form. Such expressions are defined on the basic primitives only. $ {குறள்} will match a குறள் after making sure it compiles all the requirements for a குறள்வெண்பா. - A way to define custom expressions. E.g) Once after defining வன்றொடர்க்குற்றியலுகரம் = ${எழுத்து}*${வலிமெய்}${வலியுகரவரிசை}, the expression ${(வன்றொடர்க்குற்றியலுகரம்)} would match any வன்றொடர்க்குற்றியலுகரம்.
- A way to compile a regular expression which could be in-built or custom defined.
- A way to search Unicode text with a compiled pattern.
The project is straight forward. This would deliver Java API that can compile a Tamil regular expression once and and the compiled expression can be used to search for that pattern for multiple times efficiently.
TamilPattern p = TamilPattern.compile("${குறள்}");
Matcher m = p.matcher("தொடிற்சுடின் அல்லது காமநோய் போல
விடிற்சுடல் ஆற்றுமோ தீ");
m.matches() will return true.
TamilPattern p = TamilPattern.compile("${வெண்டளை}");
int count = 0;
Matcher m = p.matcher("தொடிற்சுடின் அல்லது காமநோய் போல
விடிற்சுடல் ஆற்றுமோ தீ");
while(m.find()) {
count ++;
}
The value of count will be here 6.
It is to be noted that the search engine is not just for Yaappu. Eg) the expression ${வன்றொடர்க்குற்றியலுகரம்}${இடைவெளி}${வலி} can find a match at "**அவனுக்கு கொ**டுத்தான்" while it does not find any match at அவனுக்குக் கொடுத்தான்.
Since the implementation is almost ready, this can be delivered in a couple of weeks. The source code is already in the public domain. TVA might create policies for this to be used by commercial software systems developed by third parties.
இது பொதுவான யாவாவழிமுறைகளுக்கான ஆக்கக்கலைகளை பின்பற்றும்படியாக அமைக்கப்பட்டிருக்கிறது. tamil.lang.regex என்ற பொதிவின்கீழ் இந்த வழிமுறைகள் கொடுக்கப்படமுடியும்.
This follows general java API development practice. The package for the API classes could be in tamil.lang.regex
இந்த வழிமுறைகள் பொதுத்தளத்திலே பலபேரின் பார்வைக்குட்பட்டு வடிவமைக்கப்பட்டவை. சிலபேரின் அறிவுறுத்தல்களும் இதனுடைய ஆக்கத்திற்கு உதவியிருக்கின்றன. குறிப்பாக தமிழறிஞர் ஐயா அரியவர்கள் யாப்பிலக்கிணத்திற்கான நுட்பங்களை அறியத்தந்து, ஒரேசெங்கோவையின்மூலம் 1330குறள்களையும் அடையாளங்காணச்செய்யவல்ல தேடலுக்திகளை அமைக்க உதவினார். அவரின் உதவியுடன், குறள்வெண்பாவின் அமைப்பு இலக்கணவகை-3ஆல் உருவாக்கப்படும் ஒரு கோவைதானென்று சொல்லமுடிகிறது.
This was developed in the pubic domain with ideas from different folks notably from a Tamil scholar Hari Krishnan on implementing search semantics around grammar for veNba. With his help, I can assert that KuRaL structurally belongs to the language generated by Type-3 grammar.
இது யாவா(1.7)-இல் ஆக்கப்பட்டுள்ளது. இதன்மேலமைக்கப்படும் பயன்பாட்டுச்சொவ்வறைகளும் யாவாவின்மீதமைக்கப்படும் தேவையிருக்கிறது.
It is Java 1.7. As previously noted. search applications should be developed on top of this. Search application must be developed on any Java based server environments as web applications. Those web applications can be exposed for public usage.
இது யாவாவழிச்சொவ்வறைகளுக்கான வழிமுறைகளின் தரப்பாட்டுடன் உருவாக்கப்பட்டுள்ளது. இது வெறும் வழிமுறையேயொழிய பயன்பாட்டுச்சொவ்வறையன்று. பயன்பாட்டுச்சொவ்வறைகள் இந்த வழிமுறையைப்பயன்படுத்தி கட்டமைக்கப்படவேண்டும். அவற்றுக்கான தரப்பாடுகளை தனியாக வரையறுக்கமுடியும்.
It uses standard Java API guidelines. Provides API documentation, Sample code as to how it can be used. Search applications to be used by end users needs to be developed on top of this. Standards for those application could be defined outside.
இது யாவா(1.7)-இல் ஆக்கப்பட்டுள்ளது.
This API is built on Java and thus it needs Java Runtime Environment (1.7 or later) to use this API
இந்த திட்டம்மட்டுமே ஒரு பயன்பாட்டுச்சொவ்வறையைக்கொடுக்காது. இதற்குமேல் அது கட்டமைக்கப்படவேண்டும். அப்படி எந்த பயன்பாட்டுச்சொவ்வறைகளும் கட்டப்படவில்லையென்றால் இது பெரும்பாலும் பயனற்றுப்போகும். எனவே, செங்கோவைவழித்தேடலுக்கான பயன்பாட்டுச்சொவ்வறைகள் வடிவமைக்கப்படவேண்டும்.
This project as such does not have any notable risks. However, this is usable only if we develop web applications on top of this. So, We should be able to develop end-user's applications using this.
9.கண்காணிப்பு, கட்டுப்பாடு மற்றும் செயல்திறனறிக்கை (Monitoring, Controlling and Reporting Mechanisms)
இவை இதன்மேலமைக்கப்படும் பயன்பாட்டுச்சொவ்வறைகளால் கொடுக்கப்படக்கூடியவை.
Not scoped at this level. They need to be scoped in the end-user applications that can be built on top of this.
இந்த செயல்திட்டங்கொடுக்கும் வழிமுறைகளின்மூலம் கொடுக்கப்பட்டிருக்கும் கோப்பில் ஒன்றை அதற்கான செங்கோவையின்வழியில் தேடிக்காணவியலவேண்டும். இதை சோதிக்க யாவாமொழியில்(1.7) கடைநிலைப்பயன்பாட்டாளர்களுக்கான சொவ்வறைகளை வடிவமைக்கவியன்ற சொவ்வறைஞர்களின் உதவிவேண்டும். பயன்பாட்டுச்சொவ்வறைக்கான வரையறைகளையோ நிர்ப்பந்தங்களையோ ஏனைய தேவைகளையோ இந்த திட்டம் நிர்ணயிப்பதில்லை. அதுபோன்றவற்றை பயன்பாட்டுச்சொவ்வறைகளே வரையறுக்கும். இந்த திட்டத்தின் மூலநிரல் கட்டற்று அனைவருக்கும் கிடைக்கும்படியாக பொதுத்தளத்திலேயிருக்கும்.
We need Java based Application developer to evaluate this API and use it in the subsequent end user applications. This API requires JRE 1.7 or later to be tested or used. Further requirements on software and hardware will be determined by the applications that are built on top of this. The source code of this API is absolutely free and must be put on the public domain for further extension and enhancements.