~vinodh-vinodh/avalokitam/trunk

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
<?PHP 

/*

Avalokitam - Tamil Prosody Analyzer

Avalokitam is a Tamil Prosody Analyzer. 

Given a Tamil Prosody Text, it analyzes all the Metrical information (yāppu) 
such as acai, cīr, vāypāṭu, taḷai, aṭi etc and displays them. 
It also attempts to find the metre of the Text. 
It can recognize all the 4 major types of Tamil metre namely, 
veṇpā, āciriyappā, kalippā & vañcippā & the corresponding 
pāviṉam-s : veṇpāviṉam, āciriyappāviṉam, kalippāviṉam & vañcippāviṉam

All the PHP/HTML files included come under this license.

Copyright (C) 2011 Vinodh Rajan vinodh@virtualvinodh.com

This program is free software: you  can redistribute it and/or modify it
under the  terms of the GNU  General Public License as  published by the
Free Software Foundation,  either version 3 of the License,  or (at your
option) any later version.

This  program  is distributed  in  the  hope  that  it will  be  useful,
but  WITHOUT  ANY  WARRANTY;  without   even  the  implied  warranty  of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
Public License for more details.

You should have received a copy  of the GNU General Public License along
with this program. If not, see <http://www.gnu.org/licenses/>.

*/

     require_once "parsetreeclass.php";	
     require_once "yapparungalaparsetree.php";	
	  
	  global $lang;
	  
	  $formsubmit=!empty($_POST['ttxt']);	
	  $lang = $_GET['lan'];
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Tamil Prosody Analyzer</title>
<script type="text/javascript" src="js/jquery-1.4.2.min.js"></script>
<script type="text/javascript" src="js/jquery-ui-1.8.4.custom.min.js"></script>
<script type="text/javascript" src="js/effect.js"></script>

<?PHP if($formsubmit) { ?>

<script type="text/javascript">
		$(function(){
		
		$("#accordion").accordion({active: false});
		
		});
		</script>
<?PHP } ?>
<link type="text/css" href="css/blitzer/jquery-ui-1.8.4.custom.css"	rel="stylesheet" />
<link type="text/css" href="css/avalokitam.css"	rel="stylesheet" />

</head>
<body>
<table align="center">
	<tr>
	  <td align="center">
			<img src="css/images/Avalokitesvara.gif" height="105" style="float:left;" >
	  </td>
	  <td align="center">
<h2 align=center> <span class="Header"><?PHP echo lancon("<big>அ</big>வலோகிதம்",$lang) ?></span> | <span class="subHeader"><small><?PHP echo lancon("யாப்பு மென்பொருள்",$lang) ?></small> </span></h2>
<h5 class="subtitle"><?PHP echo lancon("பன்னூறாயிரம் விதத்திற் பொலியும் புகழ் <i>அவலோகிதன்</i> மெய்த் தமிழே !",$lang); ?></h5>

	  </td>	
	  <td align="center">
	    
	  </td>
	</tr>
</table>
<?PHP if(!$formsubmit) { ?>
<div align=right><a href= <?PHP echo $_SERVER['PHP_SELF']."?lan=tamil"; ?> >தமிழ்</a> | <a href= <?PHP echo $_SERVER['PHP_SELF']."?lan=roman"; ?> >Roman</a></div>
<?PHP }?>

<div id="accordion">
<h3><a href="#"><?PHP echo lancon("செய்யுள் உள்ளிடவும்",$lang) ?> </a></h3>
<form action="<?PHP echo $_SERVER['PHP_SELF']."?lan={$lang}"; ?>" method="post">
<p><textarea cols="80" rows="8" id="itext" name="ttxt">
<?PHP if(!$formsubmit) { ?>
மாதவா போதி வரதா வருளமலா
பாதமே யோத சுரரைநீ - தீதகல
மாயா நெறியளிப்பா யின்றன் பகலாச்சீர்த்
தாயே யலகில்லா டாம்
<?PHP } else { echo $_POST['ttxt']; }?>
</textarea> <br />
<input type="submit" value="<?PHP echo lancon("ஆராய்க",$lang) ?>" id="submit" /></p>
<!-- 
<div id="checkbox">
	<input type="checkbox" id="radio1" name="aytham" /><label for="aytham"><small><?PHP echo lancon("ஆய்தம் குற்றெழுத்தாக",$lang) ?></small></label>
	<input type="checkbox" id="radio2" name="alabedai" /><label for="alabedai"><small><?PHP echo lancon("அளபெடை ஓரெழுத்தாக",$lang) ?></small></label>	
</div>
 -->
<!--  <div id="checkbox">
	<input type="checkbox" id="radio1" name="aytham" /><label for="yv"><small><?PHP echo lancon("பழைய யாப்பு வாய்ப்பாடுகளையும் காட்டுக",$lang) ?></small></label>
 </div>  -->
</form>
</div>

<?PHP if($formsubmit) {

$ptree=new ProsodyParseTree($_POST['ttxt'],$lang); 	

 ?>
<div id="accord">
<div><!--				<h3><a href="#">பகுக்கப்பட்டது</a></h3> --> <!--	<div> <?PHP // $ptree->analyze() ?>  </div> -->
<div id="uruppu">
<ul>
	<li><a href="#ezhuttu"><?PHP echo lancon("எழுத்து",$lang)?> </a>
	<li><a href="#asaiceer"><?PHP echo lancon("அசை - சீர்",$lang)?></a>
	<li><a href="#talai"><?PHP echo lancon("தளை",$lang)?></a>
	<li><a href="#adi"><?PHP echo lancon("அடி",$lang)?></a>
	<li><a href="#monai"><?PHP echo lancon("மோனை",$lang)?></a>
	<li><a href="#etukai"><?PHP echo lancon("எதுகை",$lang)?></a>	
<!-- 	<li><a href="#pazhayappu"><?PHP echo lancon("பழம்யாப்பு",$lang)?></a>  -->	
<!--	<li><a href="#paa"><?PHP echo lancon("பா",$lang)?></a>	-->
<!--	<li><a href="#XML"><?PHP echo lancon("XML",$lang)?></a> -->
</ul>
<div id="ezhuttu">
<?PHP $ptree->DisplayLetterCount(); ?>

</div>

<div id="asaiceer">
<div class="ui-state-highlight ui-corner-all"
	style="margin-top: 5px; padding: 0 .7em;">
<p><span class="ui-icon ui-icon-info"
	style="float: left; margin-right: .3em;"></span><!-- <strong> <span
	class="ner-asai">நேரசை</span> </strong><?php echo($ptree->ner);?> <strong><span
	class="nirai-asai">நிரையசை</span> </strong><?php echo($ptree->nirai); ?></p>  -->
	
	<?php 
	
	if($ptree->MetreType !=NULL)
		echo lancon(lat2tam($ptree->MetreType),$lang); 
	else 
		echo lancon(lat2tam("_e_nta pA vakYyu_m poru_ntavi_llY"),$lang); 	
	
	
	?>
	
	
</div>
<br />
<?PHP $ptree->DisplaySyllableWordClass() ?></div>

<div id="adi">
<div class="ui-state-highlight ui-corner-all"
	style="margin-top: 5px; padding: 0 .7em;">
<p><span class="ui-icon ui-icon-info"
	style="float: left; margin-right: .3em;"></span> <strong><span
	class="comon"><?PHP echo lancon("அடி",$lang) ?></span> </strong><?php echo($ptree->TotalLines);?></p>
</div>
<?PHP $ptree->DisplayLineClass() ?></div>

<div id="talai">

<div><?PHP $ptree->DisplayWordBond() ?></div>

</div>

<div id="monai">

<div><?PHP $ptree->DisplayTodai("mOVY") ?></div>

</div>

<div id="etukai">

<div><?PHP $ptree->DisplayTodai("_etukY") ?></div>

</div>
<!--
<div id="pazhayappu">
<div class="ui-state-highlight ui-corner-all"
	style="margin-top: 5px; padding: 0 .7em;">
<p><span class="ui-icon ui-icon-info"
	style="float: left; margin-right: .3em;"></span><span
	class="comon">
<?PHP echo lancon("யாப்பருங்கல விருத்தியின் பழைய யாப்பு வாய்ப்பாடு",$lang) ?>
</span>
</div>
<?php  $ytree=new YapparungalaParseTree($_POST['ttxt'],$lang);

$ytree->DisplaySyllableWordClass();

?>

<div></div>

</div>
-->

</div>
</div>


</div>
<?PHP } ?>

<table align="center">
<tr>
<td>
<img src="css/images/buddha-dharmachakra.png" height="80" style="float:left;" >
</td>
<td>
<h5 class="subtitle"><br/>
<?PHP echo lancon("மிக்கவன் போதியின் மேதக்கு இருந்தவன் மெய்த்தவத்தால்",$lang); ?><br/>
<?PHP echo lancon("தொக்கவன் யார்க்கும் தொடர ஒண்ணாதவன் தூயன் எனத்",$lang); ?><br/>
<?PHP echo lancon("தக்கவன் பாதம் தலைமேல் புனைந்து தமிழுரைக்க !",$lang); ?><br/> 
</h5>
</td>
<!--
<td>
<img src="bhah_lotus.jpg" height="70" style="float:left;" >
</td>
!-->
</tr>
</table>
</body>
</html>