Ejemplo n.º 1
0
';
} else {
    if (isset($options['file'])) {
        $verse = file_get_contents($options['file']);
    } else {
        $verse = file_get_contents('php://stdin');
    }
    if ($options['lang'] == 'en') {
        $lang = 'en';
    } else {
        $lang = 'ta';
    }
    $ptree = new ProsodyParseTree($verse, $lang);
    if (isset($options['xml'])) {
        echo $ptree->DisplayXML();
        echo "end";
    } else {
        $xml = simplexml_load_string($ptree->DisplayXML());
        echo "\n";
        if (isset($options['verse'])) {
            echo lancon($verse, $lang) . "\n\n";
        }
        if (isset($options['type']) || !$showPartial) {
            echo lancon(lat2tam($ptree->MetreType), $lang);
            echo "\n\n";
        }
        if (isset($options['count']) || !$showPartial) {
            echo lancon(lat2tam("_uyireZu_ttu"), $lang) . " " . $ptree->LetterCount['Vowel'] . "\n";
            echo lancon(lat2tam("me_yyeZu_ttu"), $lang) . " " . $ptree->LetterCount['Consonant'] . "\n";
            echo lancon(lat2tam("_uyi_rme_yyeZu_ttu"), $lang) . " " . $ptree->LetterCount['ConsonantVowel'] . "\n";
Ejemplo n.º 2
0
				<!-- 
<div id="checkbox">
	<input type="checkbox" id="radio1" name="aytham" /><label for="aytham"><small><span class="uiTran">ஆய்தம் குற்றெழுத்தாக",$lang) ?></small></label>
	<input type="checkbox" id="radio2" name="alabedai" /><label for="alabedai"><small><span class="uiTran">அளபெடை ஓரெழுத்தாக",$lang) ?></small></label>	
</div>
 -->
				<!--  <div id="checkbox">
	<input type="checkbox" id="radio1" name="aytham" /><label for="yv"><small><span class="uiTran">பழைய யாப்பு வாய்ப்பாடுகளையும் காட்டுக",$lang) ?></small></label>
 </div>  -->
			</form>
		</div>

<?php 
if ($formsubmit) {
    $_SESSION['xml'] = $ptree->DisplayXML();
    ?>
<div id="accord">
			<div>
				<!--				<h3><a href="#">பகுக்கப்பட்டது</a></h3> -->
				<!--	<div> <?php 
    // $ptree->analyze()
    ?>
  </div> -->
				<div id="uruppu">
					<ul>
						<li><a href="#ezhuttu"><span class="uiTran"><?php 
    echo lanconTrnL("எழுத்து", $_SESSION['lang']);
    ?>
</span>
						</a>
Ejemplo n.º 3
0
 * Affero General Public License along with this program. If not, see
 * <http://www.gnu.org/licenses/>.
 */
Header('Content-type: text/xml');
ob_start();
require_once "parsetreeclass.php";
ob_end_clean();
// API for Avalokitam
// Returns an XML for a post request with the following parameters
// Verse - Verse in Tamil Unicode
// Langa - en or ta ; Default ta
// Kurilu - 0 or 1 ; Default 0
if (isset($_REQUEST['verse'])) {
    if (isset($_REQUEST['lang'])) {
        $lang = $_REQUEST['lang'];
    } else {
        $lang = 'ta';
    }
    if ($_REQUEST['kurilu'] == 1) {
        $kurilu = True;
    } else {
        $kurilu = False;
    }
    if ($_REQUEST['vencheck'] == 1) {
        $vencheck = True;
    } else {
        $vencheck = False;
    }
    $ptree = new ProsodyParseTree($_REQUEST['verse'], $lang, $kurilu);
    echo $ptree->DisplayXML($venCheck = $vencheck);
}