-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit f3c4633
Showing
9 changed files
with
194 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
आदेश <neupaneaadesh@gmail.com>` | ||
Rho <rho.rhoit@gmail.com> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
This a simple rule base nepali to english converter. | ||
|
||
Files: | ||
latin.pattern : This contains all the rules for conversion | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
s/kअ/क/g | ||
s/kह्/ख्/g | ||
|
||
s/क्ह्/च्/g | ||
s/क्ह्अ/ख्/g | ||
|
||
s/ग्ह्/घ्/g | ||
s/च्ह्/च्/g | ||
s/स्ह्र/श्र/g | ||
s/त्ह्/ठ्/g | ||
s/द्ह्/ढ्/g | ||
|
||
s/अइ/ऐ/g | ||
s/क्च्/क्ष्/g | ||
s/क्ष्ह/क्ष/g | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
s/स्ठ्/ष्ठ्/g | ||
s/अअ/आ/g | ||
|
||
s/्आ//g | ||
s/्अ//g | ||
s/्इ/ि/g | ||
s/्ई/ी/g | ||
s/्उ/ु/g | ||
s/्ऊ/ू/g | ||
s/्ए/े/g | ||
s/्ऐ/ै/g | ||
s/्ओ/ो/g | ||
s/्औ/ौ/g | ||
s/्ं/ं/g | ||
s/्:/:/g | ||
|
||
s/ओम्$/ॐ/g | ||
s/ओम् /ॐ /g | ||
|
||
s/् / /g | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
s/0/०/g | ||
s/1/१/g | ||
s/2/२/g | ||
s/3/३/g | ||
s/4/४/g | ||
s/5/५/g | ||
s/6/६/g | ||
s/7/७/g | ||
s/8/८/g | ||
s/9/९/g | ||
s/[Aa]/अ/g | ||
s/[Bb]/ब्/g | ||
s/[Cc]/क्/g | ||
s/[Dd]/द्/g | ||
s/[Ee]/ए/g | ||
s/[Ff]/फ्/g | ||
s/[Gg]/ग्/g | ||
s/[Hh]/ह्/g | ||
s/[Ii]/इ/g | ||
s/[Jj]/ज्/g | ||
#s/[Kk]/क्/g | ||
s/[Ll]/ल्/g | ||
s/[Mm]/म्/g | ||
s/[Nn]/न्/g | ||
s/[Oo]/ओ/g | ||
s/[Pp]/प्/g | ||
s/[Qq]/क्यू/g | ||
s/[Rr]/र्/g | ||
s/[Ss]/स्/g | ||
s/[Tt]/त्/g | ||
s/[Uu]/उ/g | ||
s/[Ww]/व्/g | ||
s/[Vv]/भ्/g | ||
s/[Xx]/क्ष्/g | ||
s/[Yy]/य्/g | ||
s/[Zz]/ज्ए/g | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#!/bin/bash | ||
|
||
gdialog --inputbox "Type here to Translitrate" 2> /tmp/input.txt | ||
if [ $? != 0 ]; then | ||
exit 0; | ||
fi | ||
|
||
./main.sh -f /tmp/input.txt > /tmp/show.txt | ||
cat /tmp/show.txt | ||
|
||
# terminal has the problem with the devnagari script | ||
counter=1; | ||
rm -f /tmp/showgui.txt | ||
while read i; do | ||
sed "$counter!d" /tmp/input.txt >>/tmp/showgui.txt | ||
echo "$i" >>/tmp/showgui.txt | ||
counter=$(($counter+1)) | ||
done < /tmp/show.txt | ||
|
||
gdialog --textbox /tmp/showgui.txt 50 60 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
s/०/0/g | ||
s/१/1/g | ||
s/२/2/g | ||
s/३/3/g | ||
s/४/4/g | ||
s/५/5/g | ||
s/६/6/g | ||
s/७/7/g | ||
s/८/8/g | ||
s/९/9/g | ||
s/।/./g | ||
s/ा/a/g | ||
s/े/e/g | ||
s/ै/ai/g | ||
s/ौ/au/g | ||
#s/ृ//g | ||
s/ु/u/g | ||
s/ू/u/g | ||
s/ि/i/g | ||
s/ी/ii/g | ||
s/ो/o/g | ||
#s/ँ//g | ||
#s/ः//g | ||
s/अ/a/g | ||
s/आ/aa/g | ||
s/इ/i/g | ||
s/ई/ii/g | ||
s/ऊ/uu/g | ||
s/ए/e/g | ||
s/ऐ/ai/g | ||
s/ओ/o/g | ||
s/क/k/g | ||
s/ख/kh/g | ||
s/ग/g/g | ||
s/घ/gh/g | ||
s/ङ/ng/g | ||
s/च/c/g | ||
s/छ/ch/g | ||
s/ज/j/g | ||
s/झ/jh/g | ||
s/ञ/ny/g | ||
s/ट/tt/g | ||
s/ठ/tth/g | ||
s/ड/dd/g | ||
s/ढ/ddh/g | ||
s/ण/nn/g | ||
s/त/t/g | ||
s/थ/th/g | ||
s/द/d/g | ||
s/ध/dh/g | ||
s/न/n/g | ||
s/प/p/g | ||
s/फ/ph/g | ||
s/ब/b/g | ||
s/भ /bh/g | ||
s/म/m/g | ||
s/य/y/g | ||
s/र/r/g | ||
s/ल/l/g | ||
s/व/v/g | ||
s/श/sh/g | ||
s/ष/ss/g | ||
s/स/s/g | ||
s/ह/h/g |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#!/bin/bash | ||
|
||
function Usage { | ||
echo "Argument Missing"; | ||
echo -e "Usage: \ten-tlrate-ne [OPTION]... [STRING]"; | ||
echo -e "\n\t-f inputfile" | ||
} | ||
|
||
# checking arguments | ||
if [ $# -eq 0 ]; then | ||
Usage; | ||
exit; | ||
fi | ||
|
||
# latin to devnagari | ||
case $1 in | ||
-f) sed -f latin.pattern $2 > /tmp/dev.txt ;; | ||
*) echo $@ | sed -f latin.pattern > /tmp/dev.txt ;; | ||
esac | ||
|
||
# modifer | ||
sed -f exp_dev /tmp/dev.txt > /tmp/tran.txt | ||
|
||
# fixes | ||
sed -f exp_fixes /tmp/tran.txt | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
राम केदार |