Skip to content

Commit

Permalink
difflog
Browse files Browse the repository at this point in the history
  • Loading branch information
drdhaval2785 committed Mar 13, 2016
1 parent 9605edd commit 238333c
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 70 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,5 @@ Data/allsutrani/*.*
suspectforms/*.*
generatedforms/*.*
nounoutput/*.*
Data/dhaatupaatha/*
Data/dhaatupaatha/*
sutrarelations/*.*
Expand Down
14 changes: 11 additions & 3 deletions scripts/sutrarelationdisplay.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
<?php
include 'function.php';
include 'slp-dev.php';
$data = file('../sutrarelations/difflog2.txt');
if (isset($argv[0]))
{
$data = file('../sutrarelations/difflog1.txt');
}
else
{
$data = file('../sutrarelations/difflog2.txt');
}
$data = array_map('trim',$data);

function sutradisplay($sutra_number)
Expand Down Expand Up @@ -78,11 +85,11 @@ function sutradisplay($sutra_number)
}
}


$counter = 1;
foreach($data as $datum)
{
$parts = explode(':',$datum);
echo convert($parts[1])."-".convert($parts[2])."<br/>\n";
echo $counter." - ".convert($parts[1])." - ".convert($parts[2])."<br/>\n";
echo "If rule <b>".sutradisplay($parts[0])." didn't exist</b>, the following rules would <b>not have applied</b>.<br/>\n";
$barredsutras = explode(',',$parts[3]);
$barr = array();
Expand All @@ -100,5 +107,6 @@ function sutradisplay($sutra_number)
}
echo implode(', ',$neww)."<br/>\n";
echo "<hr/>\n";
$counter++;
}
?>
3 changes: 0 additions & 3 deletions sutrarelations/difflog2.txt

This file was deleted.

27 changes: 0 additions & 27 deletions sutrarelations/temp3.txt

This file was deleted.

25 changes: 0 additions & 25 deletions sutrarelations/temp4.txt

This file was deleted.

8 changes: 4 additions & 4 deletions sutrarelations/vidhi.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
1.3.9
3.4.78
7.3.88
3.1.68
2.4.72
8.4.55
1.3.4
8.2.66
8.3.15
7.1.3
6.4.77
8.3.24
8.4.58
8.3.59
8.4.58
15 changes: 8 additions & 7 deletions understandsutra.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,13 @@ LIST1=(10.0460 10.0328 01.0722 01.0901 01.0742 01.0902 10.0473 01.0092 10.0474 0
LIST3=(01.0742 10.0473 01.0155 01.0262 01.1000 01.0998 01.0215 10.0266 10.0021 07.0316 01.0332 01.0038 02.0001 04.0072 02.0065 10.0471 01.0536 10.0245 10.0447 10.0365 01.0057 10.0257 10.0367 01.0841 01.0684 09.0059 05.0020 04.0106 01.1029 02.0060 05.0029 05.0016 10.0376 02.0011 02.0042 02.0041 02.0040 01.0163 01.0065 07.0011 01.0670 10.0084 06.0167 06.0078 04.0022 09.0061 01.0694 01.0151 10.0009 02.0183 10.0008 02.0342 02.0010 01.0780 01.0695 01.0719 01.0745 04.0135 06.0024 06.0014 01.0243 10.0385 07.0020 06.0045 01.0792 10.0023 01.0735 03.0017 05.0038 01.1086 06.0022 01.0200 05.0027 04.0160 06.0007 01.0203 01.0267 01.0002 01.0418 10.0067 01.0316 01.0037 01.0531 01.0511 01.0435 01.0570 01.0781 02.0015 01.0996 01.0760 04.0058 01.0734 01.0602 01.0211 06.0095 01.0993 10.0093 06.0222 10.0070 01.0397 10.0068 01.0303 10.0009 01.0362 10.0220 01.0045 09.0050 10.0146 04.0310 01.0976 06.0137 01.0254 08.0010 05.0007 06.0171 07.0010 10.0278 01.0866 04.0140 06.0006 01.1145 06.0145 09.0018 01.0866 01.0879 01.0074 01.0545 09.0001 01.0405 01.0213 04.0086 01.0992 04.0104 04.0157 04.0057 09.0058 01.0981 10.0487 01.0935 04.0103 01.0510 01.0986 10.0086 05.0033 01.0269 06.0143 06.0005 04.0015 02.0031 07.0006 04.0087 09.0055 04.0154 01.0854 10.0066 01.0317 01.1020 01.0051 07.0012 04.0066 06.0172 01.0617 02.0055 10.0149 01.0279 10.0399 01.0054 01.1137 10.0177 01.0258 01.0059 10.0178 10.0449 01.0723 10.0383 01.0627 10.0223 01.0457 01.1101 03.0026 01.0736 01.0231 10.0071 10.0147 01.1125 01.0461 04.0302 06.0043 06.0131 01.1043 04.0161 06.0033 10.0146 09.0231 01.0036 10.0049 10.0362 09.0375 01.0717 10.0279 09.0071 01.1051 10.0297 01.0867 10.0248 10.0125 01.0292 01.0812 01.0741 10.0251 06.0065 01.0506 03.0152 10.0015 01.1088 01.0805 01.1075 02.0069 02.0007 01.0217 10.0246 01.0331 01.1003 01.0071 01.0540 05.0540 01.0640 10.0274 01.0966 10.0083 06.0097 10.0325 10.0005 05.0124 10.0192 01.0039 10.0459 10.0002 10.0081 01.0495 10.0130 10.0001 01.0767 01.0289 10.0275 10.0062 07.0003 10.0469 06.0099 02.0066 03.0025 04.0044 01.0463 01.0453 01.0542 01.0464 10.0243 04.0184 10.0108 02.0067 10.0324 01.0642 01.1096 10.0325 01.0678 01.0643 10.0008 06.0371 01.0454 04.0027 10.0025 09.0346 09.0258 10.0043 09.0034 01.0043 01.0885 01.0916 01.0965 04.0030 01.1123 01.0124 01.0756 01.0743 01.0218 07.0022 10.0064 08.0377 10.0001 04.0350 10.0054 01.1140 04.0099 10.0311 10.0201 01.0259 01.1126 10.0154 06.0001 06.0032 01.0470 10.0088 04.0081 07.0009 06.0355 10.0028 10.0092 05.0351 04.0028 04.0141 01.1124 01.1141 01.0434 04.0269 10.0011 10.0102 06.0221 01.1120 01.0744 01.0884 01.1156 01.0635 10.0295 10.0193 01.1144 01.0874 01.0692 05.0030 10.0472 04.0100 01.0553 10.0281 01.0629 10.0110 04.0195 01.1146 03.0010 01.1079 02.0054 01.1025 06.0003 02.0005 01.0693 04.0045 01.1094 05.0476 10.0011 04.0082 01.0839 02.0004 06.0835 06.0356 10.0093 04.0036 06.0357 10.0048 10.0358 01.0834 09.0026 01.0573 01.1143 01.0842 02.0049 01.1095 04.0094 02.0003 03.0011 01.0685 04.0031 01.0686 06.0020 05.0133 10.0010 09.0372 01.1047 06.0148 01.1115 10.0025 05.0388 06.0135 01.1093 01.0858 01.0933 01.0962 01.0765 01.1089 01.0752 01.0347 10.0322 10.0018 01.0890 01.0056 01.0070 01.1136 01.0058 04.0091 04.0062 01.0007 03.0012 01.0069 01.1049 06.0132 02.0030 06.0002 06.0162 04.0010 01.1151 01.0333 01.0381 01.0507 01.0979 10.0029 01.0982 04.0065 10.0244 01.1074 02.0051 06.0293 10.0020 10.0287 02.0047 10.0173 06.0105 07.0015 10.0017 10.0013 04.0306 04.0121 10.0079 04.0065 09.0280 01.0797 09.0014 01.1121 10.0144 01.0557 03.0005 05.0013 06.0138 10.0024 07.0339 02.0025 10.0028 01.0802 10.0004 09.0022 03.0004 10.0027 01.0869 02.0056 10.0039 09.0373 04.0002 01.1111 01.1112 04.0122 04.0009 01.0801 09.0064 01.0608 01.0594 01.0610 01.0720 10.0044 09.0021 10.0123 01.0974 01.0005 04.0068 01.0994 01.1016 01.0836 06.0074 02.0039 01.1039 10.0033 10.0259 01.1153 10.0016 07.0290 01.0515 10.0077 01.0306 01.0012 10.0202 01.0791 04.0113 03.0019 02.0046 01.0696 01.0711 07.0002 01.0844 03.0002 06.0153 07.0017 10.0382 10.0277 01.0001 01.0777 10.0255 03.0318 01.0137 01.0860 04.0138 04.0102 01.0985 01.0205 01.0957 10.0330 01.0721 06.0151 01.0305 10.0076 01.0361 10.0105 04.0229 08.0233 04.0009 10.0073 09.0047 01.0048 01.0044 01.0013 01.0831 04.0037 02.0057 03.0007 10.0384 05.0004 01.1008 01.1006 10.0158 04.0012 06.0091 06.0165 10.0466 01.0795 06.0079 01.1147 10.0032 04.0004 09.0361 01.0595 10.0166 06.0272 10.0268 01.0016 09.0066 04.0095 10.0451 01.0770 06.0139 10.0442 02.0386 10.0061 09.0052 06.0053 09.0051 01.1015 06.0161 10.0060 04.0387 01.0804 10.0256 01.1078 01.0328 01.1157 10.0261 01.0030 01.1135 01.1139 10.0119 04.0107 02.0044 01.1001 10.0027 09.0235 02.0011 10.0074 07.0338 04.0007 04.0069 10.0329 01.0833 01.0746 04.0063 01.1154 01.0904 01.0513 01.0055 04.0090 01.1129 01.0989 10.0477 01.0832 02.0052 01.0956 05.0018 04.0077 05.0032 06.0140 10.0004 07.0348 04.0144 01.0790 01.0319 02.0321 01.0847 06.0335 10.0152 02.0062 07.0001 04.0187 01.0789 10.0143 01.0995 10.0452 10.0219 10.0006 10.0263 01.0895 01.0154 10.0291 10.0327 01.0113 01.0182 06.0011 01.0468 01.1130 01.0439 01.0437 10.0210 01.1033 01.0811 10.0253 01.0235 06.0092 06.0169 04.0076 06.0157 02.0006 10.0034 04.0036 01.0390 06.0110 10.0040 01.0374 01.0398 01.0401 06.0167 04.0153 06.0025 09.0016 10.0307 01.0080 10.0308 01.0188 01.0753 10.0058 02.0380 01.0216 10.0227 10.0379 01.1164 01.0534 01.0915 08.0008 01.0533 01.0011 01.1158 01.0984 10.0484 10.0025 01.0564 01.0152 02.0075 02.0111 01.1160 04.0273 01.1159 02.0045 01.0236 04.0059 10.0426 07.0005 03.0013 06.0009 07.0023 02.0067 06.0013 07.0232 04.0168 06.0050 10.0138 06.0160 09.0062 03.0014 02.0043 01.0209 10.0837 05.0008 09.0299 10.0022 02.0024 07.0344 10.0055 04.0312 01.0862 10.0313 01.0863 01.0803 10.0228 01.0836 06.0073 01.0288 01.0868 04.0078 01.0247 01.0286 10.0109 10.0483 06.0012 04.0021 01.0829 04.0084 05.0017 01.0091 06.0164 01.0991 04.0064 01.1155 10.0098 04.0218 01.0977 01.0563 01.0827 01.0828 02.0070 01.0689 01.0783 10.0014 07.0349 02.0026 01.0601 04.0061 01.0210 04.0088 06.0046 01.0500 01.0501 06.0047 04.0080 09.0021 04.0101 01.0458 01.1044 01.1092 01.0122 01.0799 04.0059 10.0083 02.0064 01.0843 01.0187 01.1152 01.1142 06.0163 01.0990 08.0002 01.0535 01.0466 04.0341 10.0023 01.0988 05.0019 01.0049 01.0050 04.0089 05.0001 01.1091 02.0036 10.0475 06.0066 02.0025 04.0027 06.0144 10.0450 01.0025 10.0242 03.0018 01.1085 04.0075 06.0150 01.1138 01.0574 01.1134 09.0009 01.0452 01.0625 01.0532 01.0451 09.0007 02.0038 01.0460 09.0017 10.0439 01.1077 02.0047 04.0055 10.0097 02.0033 04.0096 01.0014 01.0003 10.0200 01.1032 06.0158 06.0124 10.0100 06.0247 01.0293 01.0379 06.0121 10.0058 01.1099 05.0015 01.0919 01.1082 01.0857 01.1090 01.1131 01.0018 10.0336 01.0961 01.0936 02.0063 04.0085 01.0845 01.0388 01.1132 02.0002 01.0822 03.0008 03.0009 05.0019 10.0012 07.0366 01.0997 03.0001 01.0302 01.0310 03.0016 01.1046 01.0806 04.0142 02.0076 01.0808 01.0026 03.0003 01.0027 01.0917 01.1080 01.1084)
# LIST4 is the list of representative verbs (verbs dealt with in SK)
LIST4=(01.0001 01.0002 01.0003 01.0004 01.0005 01.0006 01.0008 01.0009 01.0017 01.0018 01.0020 01.0038 01.0040 01.0047 01.0050 01.0052 01.0054 01.0056 01.0057 01.0070 01.0097 01.0099 01.0136 01.0200 01.0267 01.0215 01.0222 01.0223 01.0233 01.0238 01.0239 01.0262 01.0269 01.0286 01.0359 01.0379 01.0420 01.0434 01.0453 01.0461 01.0462 01.0510 01.0511 01.0535 01.0540 01.0545 01.0546 01.0561 01.0593 01.0642 01.0677 01.0736 01.0737 01.0742 01.0756 01.0789 01.0792 01.0812 01.0842 01.0843 01.0844 01.0862 01.0865 01.0866 01.0868 01.0955 01.0979 01.0985 01.0988 01.0990 01.0991 01.1020 01.1043 01.1044 01.1045 01.1050 01.1051 01.1084 01.1081 01.1085 01.1086 01.1091 01.1092 01.1117 01.1124 01.1128 01.1131 01.1134 01.1137 01.1138 01.1140 01.1143 01.1157 01.1160 01.1161 01.1162 01.1163 01.1165 02.0001 02.0002 02.0003 02.0007 02.0183 02.0026 02.0011 02.0321 02.0034 02.0039 02.0040 02.0041 02.0044 02.0059 02.0060 02.0386 02.0062 02.0063 02.0065 02.0066 02.0067 02.0068 02.0069 02.0070 02.0071 03.0001 03.0002 03.0004 03.0318 03.0007 03.0009 03.0010 03.0011 03.0012 03.0025 04.0249 04.0010 04.0029 04.0040 04.0044 04.0065 04.0059 04.0091 04.0218 04.0106 04.0107 05.0001 05.0124 05.0006 05.0008 05.0012 05.0018 05.0020 06.0001 06.0004 06.0009 06.0121 06.0139 06.0145 06.0272 07.0001 07.0011 07.0018 07.0316 08.0377 08.0010 09.0001 09.0006 09.0014 09.0034 09.0054 09.0055 09.0067 09.0071 10.0001 10.0017 10.0027 10.0028 10.0118 10.0005 10.0155 10.0307 10.0391)
LIST1=(01.0001 02.0001 03.0001 04.0001 05.0001 06.0001 07.0001 08.0001 09.0001)
LIST1=(01.0001 01.0002 02.0001 02.0183 03.0001 03.0002 04.0001 04.0027 05.0001 05.0020 06.0001 06.0371 07.0001 07.0012 08.0001 08.0008 09.0001 09.0299 10.0001)
LIST2=(law liw luw lfw low laN ASIrliN viDiliN luN lfN)
number=1
rm -rf sutrarelations
mkdir sutrarelations
echo "Starting the analysis of verb forms generated by tiGanta.php"
echo
echo "The suspect forms will be stored in suspectverbforms.txt file."
echo
for VALUE1 in "${LIST1[@]}"
do
echo "$number - processing verb number $VALUE1 started at $(timestamp)"
Expand All @@ -30,13 +28,16 @@ do
php panini.php ${VALUE1} ${VALUE2}
while read name
do
echo "started ignoring $name and storing in sutrarelations/difflog.txt"
echo "started ignoring $name and storing in sutrarelations/difflog1.txt"
php panini.php ${VALUE1} ${VALUE2} $name
done < sutrarelations/vidhi.txt
done
((number++))
echo
done
echo '</forms>' >> generatedforms.xml
php scripts/slp-dev.php suspectverbforms.txt suspecverbforms_deva.txt
#php scripts/slp-dev.php suspectverbforms.txt suspecverbforms_deva.txt
#python comparewithdb.py
rm -rf scripts/sutrarelations.html
cd scripts
echo '<html><body>' >> ../sutrarelations/sutrarelations.html
php sutrarelationdisplay.php >> ../sutrarelations/sutrarelations.html
echo '</body></html>' >> ../sutrarelations/sutrarelations.html

0 comments on commit 238333c

Please sign in to comment.