Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 16 additions & 23 deletions src/lab/exp4/CLExperiment4-0.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,21 +27,19 @@ function selectSize()
<div id="mainContainer" align="center">
<?php

$lang_opt=$_GET["ind"];
if(strcmp($lang_opt, "1")==0)
$dir_path="Exp4/English/";
else
$dir_path="Exp4/Hindi/";
$lang_opt = $_GET['ind'];
if (strcmp($lang_opt, '1') == 0) {
$dir_path = 'Exp4/English/';
}

$lang_opt=floatval($lang_opt);
$files = glob($dir_path . "*");
$u=0;
foreach($files as $file)
{
$file=explode("/",$file);
$file=explode(".", $file[2]);
$file_list[$u]=$file[0];
$u++;
$lang_opt = floatval($lang_opt);
$files = glob($dir_path.'*');
$u = 0;
foreach ($files as $file) {
$file = explode('/', $file);
$file = explode('.', $file[2]);
$file_list[$u] = $file[0];
++$u;
}
sort($file_list, SORT_NUMERIC);

Expand All @@ -55,17 +53,12 @@ function selectSize()


//print each file name
foreach($file_list as $file)
{


echo "<option value=\"".$lang_opt."*".$file."\">".$file."</option>";


foreach ($file_list as $file) {
echo '<option value="'.$lang_opt.'*'.$file.'">'.$file.'</option>';
}
echo "</select><br/><br/>";
echo '</select><br/><br/>';

echo "<input type=\"submit\" value=\"Generate Tokens vs. Types Graph\"></form>";
echo '<input type="submit" value="Generate Tokens vs. Types Graph"></form>';
?>

<div id="display"></div>
Expand Down
44 changes: 20 additions & 24 deletions src/lab/exp4/CLExperiment4-1.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,18 +34,17 @@ function selectSize()
<br/>
<?php

$corp_opt=$_GET["ind"];
$corp_opt=floatval($corp_opt);
$corp_opt++;
$lang_opt=$_GET["lang"];
if(strcmp($lang_opt, "1")==0)
$dir_path="Exp4/English/Corpus ".$corp_opt."/";
else
$dir_path="Exp4/Hindi/Corpus ".$corp_opt."/";

$lang_opt=floatval($lang_opt);

$files = glob($dir_path . "*");
$corp_opt = $_GET['ind'];
$corp_opt = floatval($corp_opt);
++$corp_opt;
$lang_opt = $_GET['lang'];
if (strcmp($lang_opt, '1') == 0) {
$dir_path = 'Exp4/English/Corpus '.$corp_opt.'/';
}

$lang_opt = floatval($lang_opt);

$files = glob($dir_path.'*');
?>

<form name = "selector" action="javascript:selectSize()" target="_parent" method="post" onsubmit="selectSize()">
Expand All @@ -54,20 +53,17 @@ function selectSize()

<?php

$file_id=1;
$file_id = 1;
//print each file name
foreach($files as $file)
{

$file=explode("/", $file);
echo $file[3];
$file=explode(".", $file[3]);
echo "<option value=\"".$lang_opt."*".$corp_opt."*".$file_id."\">".$file[0]."</option>";
$file_id++;

foreach ($files as $file) {
$file = explode('/', $file);
echo $file[3];
$file = explode('.', $file[3]);
echo '<option value="'.$lang_opt.'*'.$corp_opt.'*'.$file_id.'">'.$file[0].'</option>';
++$file_id;
}
echo "</select><br/><br/>";
echo "<input type=\"submit\" value=\"Generate Tokens vs. Types Graph\"></form>";
echo '</select><br/><br/>';
echo '<input type="submit" value="Generate Tokens vs. Types Graph"></form>';
?>

<div id="display"></div>
Expand Down
11 changes: 4 additions & 7 deletions src/lab/exp4/CLExperiment4-2.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,14 @@
<br/>
<?php

$tok_opt=$_GET["ind"];
$tok_opt = $_GET['ind'];
//$tok_opt=floatval($tok_opt);
$lang_opt=$_GET["lang"];
$lang_opt = $_GET['lang'];
//$lang_opt=floatval($lang_opt);

if(strcmp($lang_opt, "1")==0)
$image_path="Exp4/English/".$tok_opt.".jpg";
else
$image_path="Exp4/Hindi/".$tok_opt.".jpg";
$image_path = 'Exp4/English/'.$tok_opt.'.jpg';

echo "<img src=\"$image_path\" title=\"graph\" alt=\"Error\" />";
echo "<img src=\"$image_path\" title=\"graph\" alt=\"Error\" />";

?>
</div>
Expand Down
13 changes: 6 additions & 7 deletions src/lab/exp4/CLExperiment4.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,12 @@ function selectLang()

<div id="mainContainer" align="center">
<?php
echo "<form action=\"javascript:selectLang()\" target=\"_parent\" method=\"post\">";
echo "<select name=\"lang_opt\" id=\"lang_opt\" autocomplete=\"off\" onchange=\"selectLang(this.value);\">";
echo "<option value=\"0\" select=\"selected\">---Select Language---</option>";
echo "<option value=\"1\">English</option>";
echo "<option value=\"2\">Hindi</option>";

echo "</select>"; ?>
echo '<form action="javascript:selectLang()" target="_parent" method="post">';
echo '<select name="lang_opt" id="lang_opt" autocomplete="off" onchange="selectLang(this.value);">';
echo '<option value="0" select="selected">---Select Language---</option>';
echo '<option value="1">English</option>';

echo '</select>'; ?>
<br/><br/>
</form>
<div id=corpus_opt></div> </div>
Expand Down
Empty file removed src/lab/exp4/Exp4/Hindi/empty.pi
Empty file.
Loading