Today I found a little bug in the PDF versions of the Pali Tipitaka in the Pali Language Tipitaka available as free downloads (based on the work done by the Vipassana Research Institute).

Note 1 : If you are going to use the Romanized Pali Version of the PDF file then please don’t forget to download the free Pali font called “Time Ext Roman” and install it on your computer! You need the font to see all of the Pali characters formatted properly. You “install” the font by 1. downloading the 2 exe files (at the top of the “Times Ext Roman” web page) and then 2. double-clicking each file to run it and install it on Windows.

Note 2 : The Kobo eReader Touch Edition allows the installation of your own fonts (including Pali fonts). It is very easy to install the Pali font. Instructions are on pdf page 10 of 52 of the Kobo Touch Edition User Guide (PDF File).

Here is the little bug (at least, as of today!) :

When you download a file it is a zip file (compressed file). On Windows XP you can right-click on any zip file and choose “Extract All…” from the little pop-up menu to extract the files.

When you do this with the Pali Tipitaka zip file that you downloaded, you will see that a new Folder is created but you will get an error message when you try to open the Folder.

The problem and bug is this : There are Pali characters in the file names of the zip files. This causes “Extract All…” on Windows XP to fail (I did not try it yet on other versions of Windows or on Mac and Linux computers).

The solution : You need to Rename the zip file to a filename that does not include the Pali special characters. ( For instance, download the file Vinayapiṭaka.zip and rename it to Vinayapitaka.zip – note the .t character in the original file name ! ) After that, you should be able to “Extract All…” without any problem to get the PDF file.

(Tip : I have tested the the Pali fonts on the Kobo eReader Touch Edition and they work great. For now, I am just putting up a little screenshot of the page in the User Guide that explains how to install the fonts. )

Kobo eReader Touch Edition - Add Buddhist Pali Fonts

 

 

 

You can slow down the mp3 audio file that is part of Pariyatti’s “Pali Words of the Day” using standard features of Window Media Player and QuickTime without distorting the voice or the accent.

You can use this technique with any mp3 sound file and almost any video format.

1) Listening and reading skills : Slowing down the audio file can help you to hear the pronunciation very clearly.

2) Speaking skills and your accent : You can also use it for “speak along” exercises where you speak along with the person reading the Pali. Slowing the person down is a big help here!

3) Writing skills : simply transcribe the Pali sentences that are part of Pali Words of the Day. You can also use the sound file as a dictation exercise. Slowing the person down will give you more time so that you can hear the words clearly.

Slow down audio is a great way to improve your Pali language skills and it is already available on your computer! Nothing to install, nothing to register, easy to use.

Many thanks to Pariyatti for making their Pali Words of the Day freely available on the web.

Click here to see How to slow down audio, video, mp3 and music files

At any time, you can see Pariyatti’s Words of the Day for today on the web (and get the mp3 sound file if you wish).

(You may wish to sign up for Pariyatti’s daily email newsletter. It will let you create a little library of sound files with their texts. It is also nice little dhamma reminder!)

Click here to visit Pariyatti’s Pali Words of the Day for today on the web.

 

I think it would be fun to build the Pali Dictionary together. Yesterday I was doing some tests to figure out how to test for the existence of a file (this should be simple, easy and intuitive – it isn’t). At this point, I think I have all of the technical bits and pieces solved.

Building the dictionary like a tutorial

In my opinion, the best way to create the software is to build it step-by-step online like a tutorial. This way, the programmers in the Pali community (even if they don’t know html/css/ javascript/jQuery) will be able to follow along. They will be able to achieve a deep understanding and skills that they can use for modifying, adapting and improving the software.

Using the tutorial idea, I will post a blog post that shows the code used in each step and explain the code. I will also post a zip file for download so that people can download each step and try it out.

jQuery makes putting Tabs in Tabs easy

The software is modular. It will be very easy to add modules to the software and remove modules. JQuery makes it simple to add tabs to an application. A programmer can add their own tab and work on their own ideas while I post up the code.

Here is a screen shot of the current tabs. There is no user interface design here. I was just testing things like adding tabs, loading tabs, creating and modifying templates, the dictionary format, etc. What you are looking at will definitely change.

jQuery tabs in tabs

jQuery lets you put tabs in tabs - nice !

In the next few days, I hope to have Step 1 of the demo tutorial posted for download.

Ideas for files in the Pali dictionary definition

The dictionary content is also very important. If I can get a good pattern going for the dictionary entries then people will be able to create their own dictionary entries and share them easily.

For instance, to create a defintion for anicca you create a directory called anicca and put the following files into it (all files are optional! If you don’t have one right away, it doesn’t matter. You can still create a dictionary entry):

word.txt – a text file (UTF-8) for text related things (like the dhamma meaning – important for monastics!)
word.ogg – an audio file that speaks the word
sentence.ogg – an audio file that speaks the example sentence (that you put in word.txt with other things).
picture.jpeg – a picture (if available and useful)
video.ogv – a video (if available and useful)
defintion.png – an image of a dictionary definition for the word
defintion.ogg – an audio file that simply reads the defintion out loud to enhance the learning experience
definition.maff – a Firefox 4 maff file (for offline use of dictionary entry web pages)

The file formats may change but this gives an idea of the things that can be used for creating a nice dictionary entry. To share the dictionary entry, you can simply send it to someone as a compressed zip file. If you don’t like the picture or the accent of the sound files, you can just make your own and replace the existing files. Very easy.

The nice thing is that nothing is required in the dictionary folder and no complicated technology is required. If you have a picture – great. If you don’t have a picture – that’s fine, too. If you later get a picture from somewhere – just copy it into the dictionary entry directory like you copy any file on your computer. This offers completeness plus maximum flexibility while dictionary entries are being created.

Grammar in context

The way I have it set up right now, you can specify the grammar notes. For instance, if the word is a noun then you can simply state that in word.txt and the definition/explanation for a noun becomes part of the definition (at the bottom). This should make it much easier to learn Pali grammar while you are studying words.

Use javascript and jQuery to test for file exist

Here is the code that I have right now to test for a file using javascript and jQuery. It works in Firefox 4 but I am not certain that it is 100% optimized. In particular, I don’t know (right now) why the type : ‘HEAD’ is needed.

What I am doing here is checking if a file exists. If it does not exist then I replace the html for the span that shows the audio control. Firefox does not handle a missing audio file in a nice way. I puts a big box with a big letter x in the box. Proper behavior would be to create an image the same size as the audio control with a message on it that says ‘audio file not found’ (or something like that). Firefox 4 will mess up your web page display if it doesn’t find the audio file.

First, here is how I call the file existence test to see if sentence.ogg exists as a file :

Put this code Second in your javascript js file :


fileNameToTest = fileNameBasePath + "/sentence.ogg";

doesFileExist(
  fileNameToTest,
  "span#span_for_sentence_audio",
  "<span'>no audio for "  + fileNameBasePath + "/sentence.ogg</span>");

Note that the following function must appear before the code above ! I’m not sure, but it seems that Javascript needs to find the function definition before it is used in the code.? I’ll have to check on this.

Put this code First in your javascript js file.


function doesFileExist(urlToTest, idToReplace, replacmentHtml){
  $.ajax({
    url: urlToTest, 
    type:'HEAD',
    error:
        function(){
            //alert("File not found.");
            $(idToReplace).replaceWith(replacmentHtml);
        },
    success:
        function(){
            //alert("File found.");
        }
  });  
}

If you just want to test for a file :


// this is the function that you need to add

function yourNameFor_doesFileExist(yourNameFor_urlToTest){
  $.ajax({
    url: yourNameFor_urlToTest, 
    type:'HEAD',
    error:
        function(){ 
             alert("File not found.");
        },
    success:
        function(){
            alert("File found.");
        }
  });  
}
// a bunch of code and functions later...

// now you can call it - it can test for many types (html, jpeg, ogg, etc)

yourNameFor_doesFileExist("yourfolder/yourfile.html");

New look for blog coming up

I’ll be changing the look of the blog in the next week or so. The blog looks nice but it is very clumsy to manage the look and it requires a lot of bandwidth for people using the blog.

I hope that you got a few ideas. I hope to start the tutorial soon. The code above is just stuff that I think might help out Papli javascript and jQuery programmers while I work at getting things for the tutorial ready.

That’s all for today.

 

Buddhist Pali Dictionary Prototype Screenshot(Updated : June 4 2011) This is an unstructured blog about ways to create a beneficial Pali language dictionary – in the dhamma! Here are some of the things that I am working on right now.  This blog post is like a notepad. It will allow me to share ideas and programming code snippets that I might use in the final software. The software will run as a web page (online and offline) in Firefox 4, use the programming language Javascript and the Javascript programming toolkit called jQuery. Continue reading »

 

Hi;

I’ll just be testing some ideas I have for an online Pali Dictionary. For now, I will be working on getting the blog general settings working, the look of the blog in shape, testing the Pāli characters and fonts, etc.

evaṃ me suttaṃ

© 2011 Pāḷi Dictionary Suffusion theme by Sayontan Sinha

Bad Behavior has blocked 2 access attempts in the last 7 days.