1. About
  2. Features
    1. Technical background
  3. How to install
    1. Linux/Unix systems
    2. Windows
  4. How to use
  5. Bugs
  6. Plans for the future


skorg stands for 'sanskrit org-mode'. It is an extension of emacs org-mode in order to enable part of speech tagging of sanskrit texts inside emacs.It is used to create the grammatically annotated translations on the website here.
skorg is mainly interesting for emacs users as it is a little bit complicated to set up and use correctly. This is how it looks like now in action:skorg example


  • Manual part of speech-tagger
  • as-you-type validation of sanskrit inflected forms
  • syntax highlighting for sanskrit grammar
  • automatic display of text both in devanagari and transliteration
  • quick dictionary lookup by inflected verb-forms using sdcv (console version of stardict)
  • Create an own sanskrit dictionary
  • automatic transliteration tools
  • automatic sandhi tools
  • export tagged text to sanskrit-db.de

    Technical background

    skorg-mode is based on org-mode, so knowing org-mode will help using it. The inflected sanskrit data is taken from the great work done by Gerard Huet.Some of the key features are written modular and can be used outside of skorg-mode, see for example xliterate.el for indian transliteration tools, or skorg-sandhi.el for sandhi-functions.

How to install

Linux/Unix systems

skorg-mode is not on elpa/marmelade, but you can add it manually to emacs. You can download the tarball of skorg-mode here.
install it by extracting it to your elpa-folder:
tar xfj skorg-0.0.1.tar.bz2 -C ~/.emacs.d/elpa
In case the folder ~/.emacs.d/elpa does not exist yet, you need to create it first:
mkdir -p ~/.emacs.d/elpa  
Copy the following to your emacs-configuration-file (usualle this is ~/.emacs):
(global-set-key (kbd "C-c d") 'skorg-sdcv-search-pointer-inflected)
(global-set-key (kbd "C-c i") 'skorg-sdcv-search-input)
(setq sklm-user-name "Your Name")

(You can, of course, change the keys to whatever you prefer to use.) In order to use the sdcv-feature you need to have sdcv and some sanskrit-dictionaries for stardict installed on your system.


I really don't know. :)

How to use

The workflow is the following:

First you create a new file within emacs and give it the .skorg ending. This automaticly activates skorg-mode, as the mode is recognized by file-ending.
If not, just type m-x skorg-mode and it will start. First we give the new file a name:
skorg example

Then we add a heading (it is necessary to have one as divisions are indexed by headings):
skorg example

In order to add your first verse/sentence/block of sanskrit you just press m-enter. This creates a new division. If it is not a verse/not anustubh, just change the lines according to what you have (e.g. 'prose' instead of stanza, and 'gayatri' instead of 'anustubh')
Now the screen gets automaticly split into three frames. At the top there is the devanagari frame showing the current input in devanagari, at the bottom there is the grammar frame showing grammatical and lexical information. Both frames are updated as you type, so the cursor stays in the main frame. skorg example

You need to enter the sanskrit between the head of the current division (starting with \div) and the \trans-tag. Input is accepted in unicode or HK-transliteration, if you want to use a different transliteration this is technically possible, but not easily implemented yet.
As soon as you start to type a word you will notice that at the bottom of the screen the possible entries from the database appear. When the word resembles a real sanskrit expression, this is going to be displayed there: skorg example

Inputting words is best done without sandhi, but to some extent the engine is tolerant to sandhi and tries to dissolve as far as possible. But in order to have clean recognition of the words it is best to not apply sandhi. Compounds are entered by using vertical bars (similar to the way it is done in the sanskrit clay library):

But contrary to the sanskrit clay library, full sandhi has to be given when entering compounds!
This gets automaticly dissolved to manorathas. Not that next to every root in the grammar frame at the bottom of emacs there is a (in the beginning empty) string attached to it. You can use this string to save personal notes, such as translations etc: skorg example

This additional information gets saved every time you save the file and it is stored across sessions, so you will have your personal dictionary back the next time you run emacs.
In order to give a grammatical function to a word, use the number keys on your keyboard.
each number represents one of the seven vibhaktis, so 1 is nominative, 2 is accusative etc. 8 is for vocative, 9 is used for indeclinables and 0 is for verbs. This rough pretagging is necessary to give a general function to a word, e.h. decide wether it is a verb or a noun. Once this decision is made the database will automaticly do the fine-grained tagging. For example if you wish to enter gacchati as a verb, you type gacchati0. For gacchati as a locative present participle, you type gacchati7.
In the case that a word is not ambivalent in relation to it's grammatical function (for example devaḥ) the correct tag is assigned automaticly. After successfull tagging the number is automaticly deleted and the word is coloured. once the colour is changed the word is tagged. Different cases have different colours! Tags are stored across sessions in a persistant hashtable inside emacs, so next time you open the file the tags come back.

Once you entered a verse and have successfully tagged everything it should look this way:
skorg example The field after \trans can be used for entering a translation (but this is not necessary), the field after \notes for notes. When you want to add another verse, just move into a new line after the verse ended and press m-enter again. Quite straightforward.


There are plenty. Might not work at all. This is betabetabetabeta.

Plans for the future

Rewrite the whole thing using clojurescript. :)