Sanskrit Diacritics on Web Pages

47 views
Skip to first unread message

Pratyatosa

unread,
Dec 16, 2010, 1:10:54 PM12/16/10
to Sean Carolan, Madhudvisa dasa, istag...@googlegroups.com, vani...@pamho.net, Michael Zaniboni
Dear Sudama Prabhu, thanks for the link to <http://www.pendriveapps.com>. Some of those portable apps are sure to come in handy on the local university library's computers.

I don't know how Madhudvisa Prabhu does it, but if you go to <http://causelessmercy.com/a/>, you can toggle the Sanskrit diacritics on/off by pressing the "D" key. See if you can figure out how it's done by looking at the HTML source.

Your servant, Pratyatosa Dasa



On Thu, Dec 16, 2010 at 10:55 AM, Sean Carolan <scar...@gmail.com> wrote:
I have a couple of questions about the MySQL database(s):

>> The site is written in php using the mysql relational database system.

Do you store the Vedabase text in plain ASCII or with the diacritics
included?  Or both?  If you do include diacritical marks I imagine
some kind of on-the-fly translation must be used for searches, in
particular for Sanskrit words.  Most end-users will have no idea how
to make all the little marks and dots, but they can simply type
"krsna".

Will you be able to make copies of the raw database available once
it's all done?  It might be nice to have a locally-installed version
of the app + database that could run without an internet connection.
An "open" version of the Vedabase could be created using a stand-alone
WAMP server that runs off a USB stick or DVD-ROM, something like this:

http://www.pendriveapps.com/uniform-server-wamp-portable-website-server-package/

Just curious about how some of the back-end stuff is set up.

thanks

Sudama

lakshmi kary

unread,
Dec 16, 2010, 1:45:09 PM12/16/10
to istag...@googlegroups.com
Hare Krishna
Dear All,
If anyone just goes to the causeless mercy sites and sees
HOW MANY CITIES AND COUNTRIES SRILA PRABHUPADA  gave darshan and his blessing in..its really a miracle, only something a real acharya could do.
If devotees could comprehend the implications and fortune they have just by reading Sp translations, serving him, or even seeing SP picture,getting prasad from him, listening to his lectures,
and especially serving him they would faint.
Be well,
chant Hare Krishna , be happy and do what you can to serve the order of SP>
Thank-you Pratyatosa and also Madhuvisa prbahu has done enormous service over many ,many years
making these works of SP available, I hope you give them your support in all ways as yu are able.
ys
Lakshmi


 
--
You have received this email because you are a member of the Google Prabhupadanuga Group. To post to our group for all the world to see, send an email to <istag...@googlegroups.com>. Getting too many emails? Please go to <http://groups.google.com/group/istagosthi/subscribe> and change your email settings, or request Pratyatosa Dasa (praty...@gmail.com) to change your settings for you. To cancel your membership, send an email to <istagosthi+...@googlegroups.com>. For more options, go to <http://groups.google.com/group/istagosthi>.

Madhudvisa dasa

unread,
Dec 16, 2010, 5:55:11 PM12/16/10
to Pratyatosa, Sean Carolan, istag...@googlegroups.com, vani...@pamho.net, Michael Zaniboni
Hare Krishna Sudama Prabhu

Please accept my humble obeisances. All glories to Srila Prabhupada!

I haven't looked at Pratyatosa's method but I suspect he has got no database, he has just made .html pages with the text in unicode and I think you will find he has a script in the page written in Javascript that runs in the browser when you press the "D" key that goes through the text in the browser and changes the diacritical characters to plain text. This could be done with just a few lines of Javascript.

At PrabhuapdaBooks.com everything is in a database and that text is stored in the Balaram font and it is converted in the PHP script to whatever output format is required. Although I have not made any function for the users to select the font the system can display the text in any font encoding. It can display in plain text, in Balaram or in Unicode. It already displays in plain text to google and the other search engines when they send their bots to the site to index the page and it displays in Unicode to the normal visitors. That means the search engines index the diacritical words properly.

I have already got an iPhone app written 90% that contains the whole database but it takes a long time to develop for me, it is done in a language I am not familar with and I do not have the time.

The database is no good without the system to access it so there is no general use for the Prabhuapdabooks database, it is only useful for the PrabhuapdaBooks.com website.

Anyone can make a database from the folio if they want to. But realistically I think the devotees who can do this, except me, have decided to use their skills for someone like IBM or Microsoft, not Prabhupada...

That is the great pity.  Anyone who has any great intelligence or good skills doesn't think, "Let me spend my time and energy for Krishna..." No. Let me make money...

That is really the problem. Devotees don't want to work for Krishna, they want to work for money. And people with the type of skills that can do these things can make a lot of money. Way back in the 80's when I was working for money it was very easy for me to get companies to pay me $100 per hour for my skills. But I decided to work for Prabhuapda and decided to believe him when he said "If you preach the money will come." It's true.

But if you get a karmi job and spend all your time and energy serving the company how can you do anything significant for Krishna.

And we have to work together. Not that everyone will start up his own thing and compete with each other. We need to work together on a project and develop that. Together we can achieve so much more than by ourselves.

If you want Prabhuapda's books with a good search on practically any device you can get our Prabhuapda Books for the Kindle for 9.95 and Kindle have an app to read them on practically anything and their search is very good also. We will also release for .epub devices like the sony reader and the Barnes and Noble Nook shortly...

Chant Hare Krishna and be happy!

Your servant

Madhudvisa dasa


Chant Hare Krishna and be happy!


www.KrishnaStore.com

Pratyatosa

unread,
Dec 16, 2010, 9:04:10 PM12/16/10
to Madhudvisa dasa, Sean Carolan, istag...@googlegroups.com, vani...@pamho.net, Michael Zaniboni
Dear Madhudvisa Prabhu, the method that you use on <http://prabhupadabooks.com/>using PHP is ideal. Very clever! Congratulations! :-)

I would like to know exactly how you automatically provide search engine bots with diacriticless text.

<http://causelessmercy.com/> was, however, created before I knew PHP.

The method that you suspect that I use is only one of 3. It's the method that I use to strip the diacritics from the SRT subtitles when the "D" key is pressed. The following one line JavaScript function is used to do the job in fine style:

function removeSanskritDiacritics(someText)
 {
 return(someText.replace(/./g,function(T1){var T2='ÑñĀāĪīŚśŪūḌḍḤḥḶḷṀṁṄṅṆṇṚṛṜṝṢṣṬṭ’'.indexOf(T1);return((T2<0)?T1:"NnAaIiSsUuDdHhLlMmNnNnRrRrSsTt'".charAt(T2))}));
 }

SRT files are limited to ANSI and UTF-8 with signature, so the later is what I use. This has the big advantage of providing no conflict with foreign language diacritics. I hope to someday have foreign language versions of all of the subtitles for all of Srila Prabhupada's MP3s.

<http://causelessmercy.com/a/>, on the other hand, has both diacritics and non-diacritics versions with the PHP generated HTML. Pressing the "D" key switches between the two versions using the following
2 JavaScript functions:

function GEBI(theID)
 {
 return(document.getElementById(theID));
 }

function toggleDiac()
 {
 ND=!ND;
 GEBI('theTextID1').style.display=ND?'block':'none';
 GEBI('theTextID2').style.display=ND?'none':'block';
 }

The 3rd method is used for all of Srila Prabhupada's books and tape transcriptions on <http://causelessmercy.com/> & <http://causelessmercy.com/t/>. It has diacriticless text within the HTML files for the benefit of search engines, but they also have a corresponding JavaScript file containing the same text with the Sanskrit diacritics. Then it uses the following simple JavaScript function to toggle back and forth when the "D" key is pressed:

function toggleDiac()
 {
 var T1=GEBI('theText').innerHTML;
 GEBI('theText').innerHTML=undoDiac;
 undoDiac=T1;
 }

Your servant, Pratyatosa Dasa

Sean Carolan

unread,
Dec 20, 2010, 10:39:49 AM12/20/10
to Madhudvisa dasa, Pratyatosa, istag...@googlegroups.com, vani...@pamho.net, Michael Zaniboni
This is a little harsh:

> Anyone can make a database from the folio if they want to. But realistically I think the devotees who can do > this, except me, have decided to use their skills for someone like IBM or Microsoft, not Prabhupada...

> That is the great pity. Anyone who has any great intelligence or good skills doesn't think, "Let me spend >
> my time and energy for Krishna..." No. Let me make money...

Easy to say if you have no wife or kids! :-)

Anyway you all keep up the good work, while us grhamedhis wallow in
the deep well of material life...

Madhudvisa dasa

unread,
Dec 20, 2010, 12:20:25 PM12/20/10
to Sean Carolan, Pratyatosa, istag...@googlegroups.com, vani...@pamho.net, Michael Zaniboni
No Prabhu it is not harsh. The idea of Krishna consciousness is to serve Krishna. And live simply. Somehow we have to find time to serve Krishna, otherwise what is the point of our lives? We have to adjust our lives in such a way that we have time to serve Krishna. Otherwise we are wasting the human form of life.

www.KrishnaStore.com
Reply all
Reply to author
Forward
0 new messages