Identifying sanskrit metres

1,565 views
Skip to first unread message

vasya10

unread,
Aug 22, 2011, 1:07:16 PM8/22/11
to sanskrit-p...@googlegroups.com
priya mitrANi

Taking from the other mail from Vishvas:

#5. Tools to identify metre(1, 2).

A few years ago I had done a lot of ground work that would identify a metre (i had my own scheme of encoding which was very easy to parse, but may be not a comprehensive scheme). I had taken all the metres from the sanskrit-english dictionary (VS Apte) appendix. It is in java, but I will soon be porting to groovy or scala as the java syntax is very elaborate.

I found a site recently from the samskrita google group that already does this identification and has about a 1000+ metre database. I dont think its exposed as a an API. One of the things I would like to keep as a goal is, whatever be the functionality of a project, it should be exposed as a webservice or have an api so it is easily interfaced. I will probably work towards that.

"In rare cases above source code for Sanskrit tools are available; but they are mostly not open-source; and there is quite a bit of duplication of effort; the boundless-sharing culture is mostly absent. Besides the limitations noted above, what is conspicuously missing from the above are tools directed at meeting important needs of the popular spoken Sanskrit movement, especially as we increasingly interact with information through computers and the internet."

Agree, f
or the popularizing spoken samskrita, i have been mulling over a khanacademy type of lessons in samskrita. Simple, short < 10 mts.

vishvAs vAsuki

unread,
Aug 22, 2011, 5:05:42 PM8/22/11
to sanskrit-p...@googlegroups.com, Srinivasa Murthy, anand....@urz.uni-heidelberg.de
नमोनमः श्री-वासुदेव!

भवतः विचाराः बहु-उत्साह-जनकाः‌ सन्ति!

  1. श्री-GSS-मूर्तिना सृजितं छन्दस्-यन्त्रं java-भाषायां‌ अपि वर्तते।
  2. तं विहाय च श्रीमान् आनन्द-मिश्रः अपि वर्तते, यस्य छन्दस्-यन्त्रः अत्र अस्ति।
  • परन्तु एतावत् तु यथा‌ भवता उक्तं‌ open-source वा api-युक्तः छन्दस्-यन्त्रः नैव वर्तते! द्वौ पण्डितौ अपि cc-कृतौ स्तः, यथा उचितं‌ अस्माकं Open source Sanskrit processing कार्याय code वा मार्गदर्शणं समर्पयेताम् (अनेकेषु छन्दस्-यन्त्रादेशेषु उपलब्धेषु संस्कृत-लाभः एव खलु!)।

भवन्तं bitbucket-code-repository आह्वानं अपि प्रैशयम्। Source code version control कार्याय तं उपयोययितुं शक्नोति - clojure उपयोजयति चेत् src/main/clojure "source directory" रूपेन उपयोजयतु, java उपयोजयति चेत् src/main/java च।

भवतः खान्-academy अनुरूपिनः चलत्-चित्राः अपि आगच्छन्तु (प्रायः यदि आवश्यकं खन्-महाशयस्य software उपयोजयितुं शक्नुयात्)!!

--
सहर्षं स्वागतं !
वाग्देवी पातु,
vishvAs



On Mon, Aug 22, 2011 at 12:07, vasya10 <vas...@gmail.com> wrote:
priya mitrANi

Taking from the other mail from Vishvas:

#5. Tools to identify metre(अ1, 2).

G S S Murthy

unread,
Oct 13, 2013, 2:37:38 AM10/13/13
to sanskrit-p...@googlegroups.com, Srinivasa Murthy, anand....@urz.uni-heidelberg.de
Dear All,
I have just now joined this group and hope to learn much through this group.
My java app for recognizing Sanskrit metres is available in self-executable form (Thanks to  Mr Venkatesh) at
Regards
Murthy

Mārcis Gasūns

unread,
Oct 13, 2013, 4:46:16 AM10/13/13
to sanskrit-p...@googlegroups.com, Srinivasa Murthy, anand....@urz.uni-heidelberg.de

1) If you use Baraha (never heard of it), than give us a converter at least from devanagari
2) It's a command-line tool, oh my. I feel myself like back to 1995.

Otherwise one more proof than open code is the only way for Sanskrit computer linguistics.
maatraa.jpg
chanda.jpg

विश्वासो वासुकिजः (Vishvas Vasuki)

unread,
Oct 13, 2013, 12:45:03 PM10/13/13
to sanskrit-p...@googlegroups.com, Srinivasa Murthy, anand....@urz.uni-heidelberg.de
Welcome murthy sir. Marcis's suggestions are excellent.



--
You received this message because you are subscribed to the Google Groups "sanskrit-programmers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sanskrit-program...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.



--
--
Vishvas /विश्वासः

Mārcis Gasūns

unread,
Oct 14, 2013, 4:18:15 AM10/14/13
to sanskrit-p...@googlegroups.com, Srinivasa Murthy, anand....@urz.uni-heidelberg.de
#--------------------------------------------------------#
$description =
"Syntax: sscan [options] [file...]

Sscan produces a metrical analysis of a Sanskrit text
in the CSX encoding. Heavy syllables are represented
in the output by \"-\", light syllables by \"u\". The
program understands the conventions regarding comments,
prose passages, \"X uvаca\"-type lines and non-anuщсubh
lines employed in the CSX versions of the Mahаbhаrata
and Rаmаyaхa; it can also cope with the Alsdorf and
metrically emended versions of the RV text. It should
produce good results on other texts too, provided that
they are laid out in a fairly normal way.

-h option prints this help.
";
#--------------------------------------------------------#

On Sunday, 13 October 2013 20:45:03 UTC+4, विश्वासो वासुकिजः wrote:
Welcome murthy sir.
 
http://pastie.org/8400820 - backup code copy.

विश्वासो वासुकिजः (Vishvas Vasuki)

unread,
Oct 15, 2013, 12:55:58 AM10/15/13
to sanskrit-p...@googlegroups.com, Srinivasa Murthy, anand....@urz.uni-heidelberg.de
Thanks Marcis - I am collecting all such code in https://github.com/vvasuki/sanskritnlp/tree/master/src/main .

--
You received this message because you are subscribed to the Google Groups "sanskrit-programmers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sanskrit-program...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Mārcis Gasūns

unread,
Oct 20, 2013, 8:18:13 AM10/20/13
to sanskrit-p...@googlegroups.com, Srinivasa Murthy, anand....@urz.uni-heidelberg.de


On Tuesday, 15 October 2013 08:55:58 UTC+4, विश्वासो वासुकिजः wrote:
Thanks Marcis - I am collecting all such code in https://github.com/vvasuki/sanskritnlp/tree/master/src/main .

Got it.

I've now got an error message that shows me some background on Anand's Python script.

MOD_PYTHON ERROR

ProcessId:      17099
Interpreter:    'sanskrit.sai.uni-heidelberg.de'

ServerName:     'sanskrit.sai.uni-heidelberg.de'
DocumentRoot:   '/home/amishra/slr'

URI:            '/Chanda/src/formChanda.py/searchChanda'
Location:       None
Directory:      '/home/amishra/slr/Chanda/src/'
Filename:       '/home/amishra/slr/Chanda/src/formChanda.py'
PathInfo:       '/searchChanda'

Phase:          'PythonHandler'
Handler:        'mod_python.publisher'

Traceback (most recent call last):

  File "/usr/lib/python2.5/site-packages/mod_python/importer.py", line 1537, in HandlerDispatch
    default=default_handler, arg=req, silent=hlist.silent)

  File "/usr/lib/python2.5/site-packages/mod_python/importer.py", line 1229, in _process_target
    result = _execute_target(config, req, object, arg)

  File "/usr/lib/python2.5/site-packages/mod_python/importer.py", line 1128, in _execute_target
    result = object(arg)

  File "/usr/lib/python2.5/site-packages/mod_python/publisher.py", line 213, in handler
    published = publish_object(req, object)

  File "/usr/lib/python2.5/site-packages/mod_python/publisher.py", line 425, in publish_object
    return publish_object(req,util.apply_fs_data(object, req.form, req=req))

  File "/usr/lib/python2.5/site-packages/mod_python/util.py", line 554, in apply_fs_data
    return object(**args)

TypeError: searchChanda() takes exactly 2 non-keyword arguments (1 given)


MODULE CACHE DETAILS

Accessed:       Sun Oct 20 14:13:26 2013
Generation:     0

_mp_021b740dd62738aae2aee175151055d3 {
  FileName:     '/home/amishra/slr/Chanda/src/Conv.py'
  Instance:     1 [IMPORT]
  Generation:   2
  Modified:     Wed Jul 18 19:36:21 2007
  Imported:     Sun Oct 20 14:13:26 2013
}

_mp_d557a1e56d443c0084315cd320dbd961 {
  FileName:     '/home/amishra/slr/Chanda/src/HTMLEntitiesChanda.py'
  Instance:     1 [IMPORT]
  Generation:   1
  Modified:     Wed Jul 18 19:36:43 2007
  Imported:     Sun Oct 20 14:13:26 2013
}

_mp_d3cb6890aa97e7c729a5e5e48da347aa {
  FileName:     '/home/amishra/slr/Chanda/src/HTMLGeneratorChandaDynamic.py'
  Instance:     1 [IMPORT]
  Generation:   7
  Modified:     Wed Jul 18 19:34:20 2007
  Imported:     Sun Oct 20 14:13:26 2013
  Children:     '/home/amishra/slr/Chanda/src/Conv.py',
                '/home/amishra/slr/Chanda/src/HTMLEntitiesChanda.py',
                '/home/amishra/slr/Chanda/src/dev.py',
                '/home/amishra/slr/Chanda/src/verses.py'
}

_mp_c7839cf75387d04295e4cfc71674a3e9 {
  FileName:     '/home/amishra/slr/Chanda/src/dbChanda.py'
  Instance:     1 [IMPORT]
  Generation:   4
  Modified:     Wed Jul 18 19:37:03 2007
  Imported:     Sun Oct 20 14:13:26 2013
}

_mp_2c7a76f4c2f616b8ac63c69ac200dc88 {
  FileName:     '/home/amishra/slr/Chanda/src/dev.py'
  Instance:     1 [IMPORT]
  Generation:   3
  Modified:     Wed Jul 18 19:37:09 2007
  Imported:     Sun Oct 20 14:13:26 2013
  Children:     '/home/amishra/slr/Chanda/src/Conv.py'
}

_mp_557958392bafeb87af8369c61a285ff5 {
  FileName:     '/home/amishra/slr/Chanda/src/formChanda.py'
  Instance:     1 [IMPORT]
  Generation:   8
  Modified:     Wed Jul 18 19:37:19 2007
  Imported:     Sun Oct 20 14:13:26 2013
  Children:     '/home/amishra/slr/Chanda/src/Conv.py',
                '/home/amishra/slr/Chanda/src/HTMLEntitiesChanda.py',
                '/home/amishra/slr/Chanda/src/HTMLGeneratorChandaDynamic.py',
                '/home/amishra/slr/Chanda/src/dev.py'
}

_mp_213fe1fc364b34f453aa802afdffb7f3 {
  FileName:     '/home/amishra/slr/Chanda/src/syllables.py'
  Instance:     1 [IMPORT]
  Generation:   5
  Modified:     Wed Jul 18 19:37:35 2007
  Imported:     Sun Oct 20 14:13:26 2013
  Children:     '/home/amishra/slr/Chanda/src/Conv.py',
                '/home/amishra/slr/Chanda/src/dbChanda.py'
}

_mp_792470f2b78935179b9295cd3ab3ac37 {
  FileName:     '/home/amishra/slr/Chanda/src/verses.py'
  Instance:     1 [IMPORT]
  Generation:   6
  Modified:     Wed Jul 18 19:37:44 2007
  Imported:     Sun Oct 20 14:13:26 2013
  Children:     '/home/amishra/slr/Chanda/src/Conv.py',
                '/home/amishra/slr/Chanda/src/dbChanda.py',
                '/home/amishra/slr/Chanda/src/dev.py',
                '/home/amishra/slr/Chanda/src/syllables.py'
}
 

Shreevatsa R

unread,
Oct 21, 2013, 4:22:38 PM10/21/13
to sanskrit-p...@googlegroups.com, Srinivasa Murthy, anand....@urz.uni-heidelberg.de
I decided to try my hand at coding this. A rough version wasn't too hard to come up with (just required time and effort).

It is still very far from done, but the current version, in case anyone would like a preliminary look, is at http://sanskritmetres.appspot.com/ and source code at https://github.com/shreevatsa/sanskrit/tree/metrical-scan .
The Python script that does the actual work (and can be run from the commandline if desired, or imported as a library from other Python code) is https://github.com/shreevatsa/sanskrit/blob/metrical-scan/sscan.py .

To use it, go to http://sanskritmetres.appspot.com/ , type a Sanskrit verse in the box (in Harvard-Kyoto convention), and click on the button. If your verse was in one of the known metres, it will (I hope) get recognized.

There is still a lot to do: the UI/frontend (what you see on the website) I have almost not worked on at all yet; it currently contains only just under 40 of the popular (and some not so popular) metres; there are some issues around dealing with the (rare) cases where the syllable at the end of a line is *intended* to be laghu instead of guru; the output can stand to be improved a lot; it will be useful (and simple) to support input transliteration schemes other than Harvard-Kyoto; there are some obvious performance improvements crying out to be done; the code can do with some refactoring, etc.
(But it already has one feature that I've often felt the absence of in sanskrit.sai.uni-heidelberg.de/Chanda/ -- if you type a verse in which some lines are in correct metre and some are off, there is a chance that this script will still recognize the conforming lines. As an example of the usefulness of having a script like this locally: running the text on the GRETIL text of Meghaduta uncovered 23 errors in the text (detected by the metre being incorrect), which I've notified the GRETIL maintainer about.)

I've sent this update about this tool to this mailing list as it seems to have a relatively small membership but useful comments (or commits) might be forthcoming; please share the link widely (if you wish) only when it's in a somewhat usable state. :-)

Regards,
Shreevatsa

Mārcis Gasūns

unread,
Oct 21, 2013, 4:35:04 PM10/21/13
to sanskrit-p...@googlegroups.com, Srinivasa Murthy, anand....@urz.uni-heidelberg.de


On Tuesday, 22 October 2013 00:22:38 UTC+4, shreevatsa wrote:
I decided to try my hand at coding this.
Very interesting. Indeed, I'm glad we have you.
 
A rough version wasn't too hard to come up with (just required time and effort).
Have you seen the code for 2 known solutions out of 4 ever published?
 

It is still very far from done, but the current version, in case anyone would like a preliminary look, is at http://sanskritmetres.appspot.com/ and source code at https://github.com/shreevatsa/sanskrit/tree/metrical-scan .

Internal Server Error

The server has either erred or is incapable of performing the requested operation.

Traceback (most recent call last):
  File "/base/data/home/runtimes/python27/python27_lib/versions/third_party/webapp2-2.5.2/webapp2.py", line 1535, in __call__
    rv = self.handle_exception(request, response, e)
  File "/base/data/home/runtimes/python27/python27_lib/versions/third_party/webapp2-2.5.2/webapp2.py", line 1529, in __call__
    rv = self.router.dispatch(request, response)
  File "/base/data/home/runtimes/python27/python27_lib/versions/third_party/webapp2-2.5.2/webapp2.py", line 1278, in default_dispatcher
    return route.handler_adapter(request, response)
  File "/base/data/home/runtimes/python27/python27_lib/versions/third_party/webapp2-2.5.2/webapp2.py", line 1102, in __call__
    return handler.dispatch()
  File "/base/data/home/runtimes/python27/python27_lib/versions/third_party/webapp2-2.5.2/webapp2.py", line 572, in dispatch
    return self.handle_exception(e, self.app.debug)
  File "/base/data/home/runtimes/python27/python27_lib/versions/third_party/webapp2-2.5.2/webapp2.py", line 570, in dispatch
    return method(*args, **kwargs)
  File "/base/data/home/apps/s~sanskritmetres/1.371081553055822859/request_handler.py", line 54, in post
    sscan.IdentifyFromLines(input_verse.split('\n'))
  File "/base/data/home/apps/s~sanskritmetres/1.371081553055822859/sscan.py", line 233, in IdentifyFromLines
    pattern_lines.append(MetricalPattern(line))
  File "/base/data/home/apps/s~sanskritmetres/1.371081553055822859/sscan.py", line 54, in MetricalPattern
    assert CheckHK(text)
AssertionError
 
The Python script that does the actual work (and can be run from the commandline if desired, or imported as a library from other Python code) is https://github.com/shreevatsa/sanskrit/blob/metrical-scan/sscan.py .
How do you work with Python on localhost? 
 

To use it, go to http://sanskritmetres.appspot.com/ , type a Sanskrit verse in the box (in Harvard-Kyoto convention), and click on the button. If your verse was in one of the known metres, it will (I hope) get recognized.
svAgataM devakIputra svAgataM te dhanaJjaya|priyaM me darzanaM vADhaM yuvayornarasiMhayoH||
crashed it as per.
 

There is still a lot to do: the UI/frontend (what you see on the website) I have almost not worked on at all yet; it currently contains only just under 40 of the popular (and some not so popular) metres; there are some issues around dealing with the (rare) cases where the syllable at the end of a line is *intended* to be laghu instead of guru; the output can stand to be improved a lot; it will be useful (and simple) to support input transliteration schemes other than Harvard-Kyoto; there are some obvious performance improvements crying out to be done; the code can do with some refactoring, etc.
It's good that you see far enough.
 
(But it already has one feature that I've often felt the absence of in sanskrit.sai.uni-heidelberg.de/Chanda/ -- if you type a verse in which some lines are in correct metre and some are off, there is a chance that this script will still recognize the conforming lines.
This is where I would want to hear more explanation. Tell us how.
 
As an example of the usefulness of having a script like this locally: running the text on the GRETIL text of Meghaduta uncovered 23 errors in the text (detected by the metre being incorrect), which I've notified the GRETIL maintainer about.)
Getting hot! I dreamt about testing all GRETIL texts just days ago.
 

I've sent this update about this tool to this mailing list as it seems to have a relatively small
Small but strong
 
membership but useful comments (or commits)
Comments without commits :)
 
might be forthcoming; please share the link widely (if you wish) only when it's in a somewhat usable state. :-)

Not yet. But it's getting warmer. I'm so happy to see Sanskrit NLP code open source. Same as I always do. 

विश्वासो वासुकिजः (Vishvas Vasuki)

unread,
Oct 21, 2013, 4:45:26 PM10/21/13
to sanskrit-p...@googlegroups.com, Srinivasa Murthy, anand....@urz.uni-heidelberg.de
उपकृतास् स्मः श्रीवत्स!

Suggestions inline:

On Mon, Oct 21, 2013 at 1:22 PM, Shreevatsa R <shree...@gmail.com> wrote:
There is still a lot to do: the UI/frontend (what you see on the website) I have almost not worked on at all yet; it currently contains only just under 40 of the popular (and some not so popular) metres;

Could you get the code to read sama/vishama/ardhasama vRtta definitions from a simple csv (separating it out from the code)?

Could you just scrape http://sanskrit.sai.uni-heidelberg.de/Chanda/HTML/list_all.html to get all the 1352 metres listed there?
 
As an example of the usefulness of having a script like this locally: running the text on the GRETIL text of Meghaduta uncovered 23 errors in the text (detected by the metre being incorrect), which I've notified the GRETIL maintainer about.)
That's brilliant!

Shreevatsa R

unread,
Oct 21, 2013, 4:59:40 PM10/21/13
to sanskrit-p...@googlegroups.com, Srinivasa Murthy, anand....@urz.uni-heidelberg.de
On Tue, Oct 22, 2013 at 2:05 AM, Mārcis Gasūns <gas...@gmail.com> wrote:
The Python script that does the actual work (and can be run from the commandline if desired, or imported as a library from other Python code) is https://github.com/shreevatsa/sanskrit/blob/metrical-scan/sscan.py .
How do you work with Python on localhost? 

Most of the code can just run from the commandline. For testing the web part, the Google App Engine SDK will essentially run the same application on your machine as what will be run on your website later.

To use it, go to http://sanskritmetres.appspot.com/ , type a Sanskrit verse in the box (in Harvard-Kyoto convention), and click on the button. If your verse was in one of the known metres, it will (I hope) get recognized.
svAgataM devakIputra svAgataM te dhanaJjaya|priyaM me darzanaM vADhaM yuvayornarasiMhayoH||
crashed it as per.

That was because of the |s in the input (it worked without them). As this is obviously a likely character, I have now updated the code/website to take account of that character as well, and also made it not crash on any such non-HK characters. Good lesson never to do assert()s on user input. :-)
That input works now.


Could you get the code to read sama/vishama/ardhasama vRtta definitions from a simple csv (separating it out from the code)?

Yes, I plan to do that soon -- either csv, or json, or some such simple format that is easier for anyone to edit.
 
Could you just scrape http://sanskrit.sai.uni-heidelberg.de/Chanda/HTML/list_all.html to get all the 1352 metres listed there?

Yes I thought of that, but I'm not sure if there are any copyright concerns around it. So I'm reluctant to do that without consent from "© Copyright 2006-07 Anand Mishra." 
Anyway in practice the common metres seem to suffice (and are also what one would mostly encounter), so I'm not too keen on expanding to an exhaustive (i.e. theoretical, as found in large works on prosody) list. But any metre that one has actually encountered in a ("normal") work should be worth adding…

Mārcis Gasūns

unread,
Oct 21, 2013, 5:13:12 PM10/21/13
to sanskrit-p...@googlegroups.com, Srinivasa Murthy, anand....@urz.uni-heidelberg.de


On Tuesday, 22 October 2013 00:45:26 UTC+4, विश्वासो वासुकिजः wrote:
उपकृतास् स्मः श्रीवत्स!

Suggestions inline:

On Mon, Oct 21, 2013 at 1:22 PM, Shreevatsa R <shree...@gmail.com> wrote:
There is still a lot to do: the UI/frontend (what you see on the website) I have almost not worked on at all yet; it currently contains only just under 40 of the popular (and some not so popular) metres;

Could you get the code to read sama/vishama/ardhasama vRtta definitions from a simple csv (separating it out from the code)?
CSV is a big step. TXT would do for now.
 

Could you just scrape http://sanskrit.sai.uni-heidelberg.de/Chanda/HTML/list_all.html to get all the 1352 metres listed there?
 
 
As an example of the usefulness of having a script like this locally: running the text on the GRETIL text of Meghaduta uncovered 23 errors in the text (detected by the metre being incorrect), which I've notified the GRETIL maintainer about.)
That's brilliant!

Yes, one can only agree. 

विश्वासो वासुकिजः (Vishvas Vasuki)

unread,
Oct 21, 2013, 5:43:40 PM10/21/13
to sanskrit-p...@googlegroups.com, Srinivasa Murthy, anand....@urz.uni-heidelberg.de
On Mon, Oct 21, 2013 at 1:59 PM, Shreevatsa R <shree...@gmail.com> wrote:
 
Could you just scrape http://sanskrit.sai.uni-heidelberg.de/Chanda/HTML/list_all.html to get all the 1352 metres listed there?

Yes I thought of that, but I'm not sure if there are any copyright concerns around it. So I'm reluctant to do that without consent from "© Copyright 2006-07 Anand Mishra." 
 
Please don't worry about that - copyright for metre definitions have long expired - those definitions are in the public domain :-)
 
Anyway in practice the common metres seem to suffice (and are also what one would mostly encounter), so I'm not too keen on expanding to an exhaustive (i.e. theoretical, as found in large works on prosody) list.

Both as a composer and a reader, I am totally keen on this because I (and often others) are often stumped by obscure metres I stumble upon, whose definitions I don't find anywhere despite many hours of scouring the books.

विश्वासो वासुकिजः (Vishvas Vasuki)

unread,
Oct 21, 2013, 6:13:29 PM10/21/13
to sanskrit-p...@googlegroups.com, Srinivasa Murthy, anand....@urz.uni-heidelberg.de
On Mon, Oct 21, 2013 at 1:59 PM, Shreevatsa R <shree...@gmail.com> wrote:
Could you get the code to read sama/vishama/ardhasama vRtta definitions from a simple csv (separating it out from the code)?

Yes, I plan to do that soon -- either csv, or json, or some such simple format that is easier for anyone to edit.

I would suggest something which can be read as a spreadsheet (eg: csv) - Because simultaneously with a metre recognizer, we are getting a dictionary of metres - something that can be sorted k ways, linked with examples/ recitations and analyzed.

Mārcis Gasūns

unread,
Oct 22, 2013, 12:09:13 AM10/22/13
to sanskrit-p...@googlegroups.com, Srinivasa Murthy, anand....@urz.uni-heidelberg.de
Dictionary of metres - it was a long way to generate one on a PC. Now we are close thanks to Mr. Murthy. 

dhaval patel

unread,
Oct 23, 2013, 4:55:04 AM10/23/13
to sanskrit-p...@googlegroups.com
Great work. 

# A short vowel followed by a consonant is a laghu
  text = re.sub(short_vowel + consonant + '*', '-', text)

This is not correct. It is rather Guru as a rule.
Only in certain cases, it is optionally laghu.
So better is to match it as both laghu and guru to see whether it matches any pattern of the input text.

I am attaching herewith Relevant portion of kedArabhaTTa's vRttaratnAkara - along with a commentary by sulhaNa (sukavihRdayAnandinI).


गुरुलघुपरिज्ञानार्थमाह ।

सानुस्वारो विसर्गान्तो दीर्घो युक्तपरश्च यः ।

वा पादान्तस्त्वसौ ग्वक्रो ज्ञेयोऽन्यो मातृको लृजुः ॥ ९  इति ।

 

सहानुस्वारेण वर्तत इति सानुस्वारःविसर्गान्तः सविसर्गः । दीर्घो द्विमात्रः । युक्तपरः संयोगपरो यो भवति । चकाराद्व्यंजनांतोऽपि गृह्यते । परिमिताक्षरमात्रो गणारचितो वक्ष्यमाणलक्षणो वृत्तस्य चतुर्थांशः पादस्तस्यान्ते वर्तमानो लघुरपि विभाषया गुरुः स्यात्‌ । स च कविसमयव्यवहारात्‌ द्वितीयचतुर्थयोरेव पादयोरन्ते वेदितव्यः । यथा ।

प्रायः समासन्नपराभवानां धियो विपर्यस्ततमा भवन्ति ।

असंभवे हेममयस्य जन्तोस्तथाऽपि रामो लुलुभे मृगाय ॥ इति ।

तथा च ।

श्रियः पतिः[1] श्रीमति शासितुं जगज्जगन्निवासो वसुदेवसद्मनि[2] इत्यादि दृष्टव्यम्‌ ।

स च प्रस्तारे वक्रः स्थाप्य लघुलक्षणमाह । ज्ञेयोऽन्यो मातृको लृजुः अनुस्वरादिरहितो अन्यो मातृको एकमात्रो वर्णो लघुर्भवति । स च प्रस्तारे ऋजुः सरलः । ९

 

युक्तपराश्च य इत्यनेन प्राप्ते गुरुत्वे अपवादमाह ।

पदादाविह[3] वर्णस्य संयोगः क्रमसंज्ञिकः ।

पुरःस्थितेन[4] तेन स्याल्लघुताऽपि क्वचिद्गुरोः ॥ १०

 

विभक्त्यंतं पदं तस्य पदस्यादौ वर्तमानो यो वर्णस्तस्य संयोगः । स इह शास्त्रे क्रमसंज्ञो ज्ञेयः । तेन क्रमेण पुरोवर्तिना प्राक्पदांते वर्तमानस्य  प्राप्तगुरुभावस्यापि लघुता स्यात्‌ । क्वचिल्लक्षानुरोधेन । ननु क एषः[5] क्रमो नाम संयोग उच्यते । पूर्वाचार्याणां पिंगलनागप्रभृतीनां कालिदासादीनां च कवीनां समयः[6] परिगृहीतः । संयोगः क्रमसंयोगः । १०

 

तत्र ग्रसंयोगेन[7] यथा । इदमस्योदाहरणम्‌ ।

तरुणं सर्षपशाकं नवौदनं पिच्छलानि च दधीनि ।

अल्पव्ययेन सुंदरि ग्राम्यजनो मिष्टमश्नाति[8] ॥ ११

 

ह्रसंयोगेन यथा ।

तव ह्रियापह्रिया मम ह्रीरभूत्‌ शशिगृहेऽपि हृतं न धृता ततः ।

वहलभ्रामरमेषकतामसम्‌ मम प्रिये क्व स येष्यति तत्पुनः ॥  इति

निद्रव्यो ह्रियमेति ह्रीपरिगतः प्रभ्रश्यते तेजसः[9]

निस्तेजः[10] परिभूयते परिभवान्निर्वेदमागच्छति ।

निर्विण्णः शुचमेति शोकविवशो बुद्ध्याः[11] परिभ्रश्यते

निर्बुद्धिः क्षयमेत्यहो निधनता सर्वापदामास्पदम्‌ ॥[12]

ममैव ते हृते[13] । यथा ।

स्नेहाद्गेहाद्भुजगतनयालोककौतूहलेन स्थूलोत्तुंगस्तनभरलसन्मध्यभंगानपेक्षाः ।

पौरा नार्यस्तरलनयनानन्दमुत्पादयन्त्यो धावन्ति स्म द्रुतमपह्रियः स्रंसमानोत्तरीयाः ॥ इति ।

बोधप्रदीपेऽपि यथा ।

यज्ञैर्येषां प्रतिपदमियं मण्डिता भूतधात्री

निर्जित्यैतद्भुवनवलयं यैः प्रदत्तं द्विजेभ्यः[14]

तेऽप्येतस्मिन्‌ गुरुभवहृदे[15] बुद्बुदस्तम्भलीलं[16]

धृत्वा धृत्वा सपदि विलयं भूभुजः संप्रयाताः ॥

शिशुपालवधे यथा ।

प्राप्तनाभिहृदमज्जनमाशु[17] प्रस्थितं निवसनग्रहणाय ।[18] इति ।

 

भ्रसंयोगेन[19] यथा ।

शशिमुखि भ्रमरोऽयं पद्मबुद्ध्याऽऽननं ते ।

समभिलषति पातुं त्यक्तवल्लीप्रसूनः ॥

तथा च ।

भ्रमति भ्रमरमारीकानने विप्रमुक्ते । इत्यादि ।

वरतरुकुसुमेषु[20] व्योमगंगाम्बुजेषु त्रिदशकरिकटेषु स्वर्वधूकुंतलेषु ।

स्थितशयितविबुद्धप्रीतिकस्ते[21] भ्रमोऽयं भ्रमसि भ्रमर येन त्वं मुधा केतकेषु ॥

पदादाविति किम्‌ । अन्यत्र मा भूत्‌ ।

 

ग्रसंयोगेन यथा ।

असमग्रविलोकनेन किं ते दयितं पश्य वरोरु[22] निर्विशंका ।

न हि जातु कुशाग्रपीतमम्भः सुचिरेणापि करोत्यपेततृष्णम्‌ ॥ इति

 

ह्रसंयोगेन यथा ।

आजह्रतुस्तच्चरणौ पृथिव्यामिति[23]

तथा च ।

प्रद्योतस्य प्रियदुहितरं वत्सराजोऽत्र जह्रे[24]

 

भ्रसंयोगेन यथा ।

कुन्दावदातैर्भवतो यशोभिः शुभ्रीकृतं किं परमारवीर ।

अद्यापि यद्बिभ्रति कालिमानमरातिनारीवदनोत्पलानि ॥ इत्यादि ।

 

क्वचिदिति किम्‌ । सर्वत्र मा भूत्‌ ।

 

ग्रसंयोगेन यथा ।

मही पादघाताद्व्रजति सहसा संशयपदम्‌ ।

पदं विष्णोर्भ्राम्यद्भुजपरिघरुग्णग्रहणमिति[25]

 

भ्रसंयोगेन यथा ।

तत्र भ्रमत्येव मुधा षडंध्रिरिति[26]

 

केचित्पादादाविति मन्यन्ते । तदसंगतम्‌ । सूत्रोदाहरणयोर्घटनाभावात्‌

तथापि ।

तरुणं सर्षपशाकं नवोदनं पिच्छलानि दधीनि ।

अल्पव्ययेन सुंदरि ग्राम्यजनो मिष्टमश्नाति[27] । इत्युदाहरणमार्यया प्रदर्शितम्‌ । आर्यायां पादव्यवस्था नास्ति । पूर्वार्धोत्तरार्धग्रहणात्‌ पूर्वार्धोत्तरार्धमित्यार्यालक्षणं कुर्वाणो ग्रन्थकार एवं ज्ञापयति । तावदार्यायां पादव्यवस्था नास्ति पैंगलीयसूत्रपाठाच्च । स्वराऽर्धञ्चार्यार्धमिति[28]तस्मात्पदादाविति पाठः । श्रेयानित्यलमिति प्रसंगेन ॥ ११






--
You received this message because you are subscribed to the Google Groups "sanskrit-programmers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sanskrit-program...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.



--
Dr. Dhaval Patel, I.A.S
District Development Officer, Rajkot

Shreevatsa R

unread,
Oct 23, 2013, 5:00:16 AM10/23/13
to sanskrit-p...@googlegroups.com
2013/10/23 dhaval patel <drdhav...@gmail.com>

Great work. 

# A short vowel followed by a consonant is a laghu
  text = re.sub(short_vowel + consonant + '*', '-', text)

This is not correct. It is rather Guru as a rule.

This is only applied after all previous rules have been applied. (Such as a short vowel followed by multiple consonants.) Any short vowel still remaining at this point in the code is followed by a single consonant (and then vowel, if not end of line). So it is laghu. So it works fine. I guess the comment could be better.

(Except that some clarity is needed about what to do at end of line, as I mentioned in the earlier email. For instance, should "snigdhacchāyātaruṣu vasatiṃ rāmagiryāśrameṣu" be treated as having a guru at the end? If not, should we allow mandAkrAntA to have laghu at the end of a line, or should we treat end-of-verse specially?)

dhaval patel

unread,
Oct 23, 2013, 6:49:52 AM10/23/13
to sanskrit-p...@googlegroups.com
Sorry for being terse earlier.
Let me clarify what I wanted to convey in detail.

सानुस्वारो विसर्गान्तो दीर्घो युक्तपरश्च यः ।
वा पादान्तस्त्वसौ ग्वक्रो ज्ञेयोऽन्यो मातृको लृजुः ॥ ९  
पदादाविह  वर्णस्य संयोगः क्रमसंज्ञिकः ।
पुरःस्थितेन  तेन स्याल्लघुताऽपि क्वचिद्गुरोः ॥ १०

These are the rules for Guru / Laghu in vRttaratnAkara.

Rule 1: sAnusvAra - this is covered in the code by including M in the consonant list.
Rule 2: visargAnta - this is also covered in the code by including H in the consonant list.
Rule 3: dIrgha - This is also covered in the code by including the long_vowel variables.
Rule 4: yuktapara - This needs a little refinement. This rule is made optional by the verse 10.
Rule 5 - pAdAnta - pAdAnta laghu is treated as guru optionally. The commentary says पादस्तस्यान्ते वर्तमानो लघुरपि विभाषया गुरुः स्यात्‌ । स च कविसमयव्यवहारात्‌ द्वितीयचतुर्थयोरेव पादयोरन्ते वेदितव्यः । . Meaning thereby that this optionality will work only in case of the second or fourth pAda only. A laghu at the end of First or Third pAda will not have an option of being a guru optionally.

Rule 6: Others having short vowels are laghu.

Rule 7: This is important. This is an optional exception to the rule 5. When there is a conjoint at the start of a word (pada), (not pAda), the guru (as mandated by Rule 5) is sometimes treated as laghu.
e.g.
निद्रव्यो ह्रियमेति ह्रीपरिगतः प्रभ्रश्यते तेजसः 
Here, as the ति preceding ह्री is mandated to be guru by rule 5 - by rule 7, it remains laghu.
If it is treated as guru - GGGLLGGGLLLG-GGLGGLG - doesnt correspond to zArdulavikrIDita meter.
If it is treated as laghu - GGGLLGLGLLLG-GGLGGLG - corresponds to the meter.

This is optional. 
See:
रागो नलिन्या हि निसर्गसिद्धस्तत्र भ्रमत्येव मुधा षडङ्घ्रिः ॥ 
Here, भ्र has त्र preceding, but still it got converted to dIrgha.

Also note that this applies only when the conjoint is at the start of a word (pada).
see:
प्रद्योतस्य प्रियदुहितरं वत्सराजोऽत्र जह्रे  ।
Here, the ह्र in जह्रे is not at the beginning of a word. Therefore the guru is mandatory.

  


--
You received this message because you are subscribed to the Google Groups "sanskrit-programmers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sanskrit-program...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

dhaval patel

unread,
Oct 23, 2013, 6:50:47 AM10/23/13
to sanskrit-p...@googlegroups.com
Also noted down in the issues section at https://github.com/shreevatsa/sanskrit/issues/1

Shreevatsa R

unread,
Oct 23, 2013, 8:10:21 AM10/23/13
to sanskrit-programmers
Thanks for the elaboration. It was useful to me (even the part on pAdAnta laghu). I now understand what you mean now. (But I'll also note that it's not relevant to the line of code you quoted as wrong: at that point in code, the vowel+consonants combinations of the relevant sort have already disappeared from the text. I've updated the comment above that line, for clarity.)

Now for the actual issue. [BTW, where you say Rule 5 in your email (from Rule 7 onwards), I guess you mean Rule 4.]

To summarize, the issue is that according to Kedārabhaṭṭa, a short vowel followed by a consonant cluster (i.e., multiple consonants), although guru by default, can *optionally* be treated as laghu if that consonant cluster happens to be the beginning of a new word.

I've treated it as guru always, and not allowed for this option.

It is definitely an interesting feature to add, but before implementing a change like this (which allows a single line to have multiple metrical patterns), I'd like to first check how commonly this exception occurs in classical works, to see whether it's critically needed. I've heard that later prosodists allowed some modifications influenced by Prākṛta prosody, which are not universally accepted by other Sanskrit scholars. (E.g. optionally allowing some consonant+repha clusters, like प्र, to be treated as single consonants which is coincidentally what's happening here too.)

निद्रव्यो ह्रियमेति ह्रीपरिगतः प्रभ्रश्यते तेजसः 
Here, as the ति preceding ह्री is mandated to be guru by rule 5 - by rule 7, it remains laghu.
If it is treated as guru - GGGLLGGGLLLG-GGLGGLG - doesnt correspond to zArdulavikrIDita meter.
If it is treated as laghu - GGGLLGLGLLLG-GGLGGLG - corresponds to the meter. 

This is optional. 

For what it's worth, I just checked that http://sanskrit.sai.uni-heidelberg.de/Chanda/ doesn't implement this option either. With the following text as input:

nidravyo hriyameti hrIparigataH prabhrazyate tejasaH 
nidravyo hriyameti hrIparigataH prabhrazyate tejasaH 
nidravyo hriyameti hrIparigataH prabhrazyate tejasaH 
nidravyo hriyameti hrIparigataH prabhrazyate tejasaH 

No metre is not recognized, though with hrIparigataH changed to hIparigataH, it is correctly recognized as शार्दूलविक्रीडितम् .

Also noted down in the issues section at https://github.com/shreevatsa/sanskrit/issues/1

Thanks for creating this; let's continue the discussion of this issue there.

Regards,
Shreevatsa

dhaval patel

unread,
Oct 23, 2013, 8:43:18 AM10/23/13
to sanskrit-p...@googlegroups.com
Thanks for the elaboration. It was useful to me (even the part on pAdAnta laghu). I now understand what you mean now. (But I'll also note that it's not relevant to the line of code you quoted as wrong: at that point in code, the vowel+consonants combinations of the relevant sort have already disappeared from the text. I've updated the comment above that line, for clarity.)

I am sorry for not being able to see that the other issues have been taken care of earlier.
 
Now for the actual issue. [BTW, where you say Rule 5 in your email (from Rule 7 onwards), I guess you mean Rule 4.]


Yes. It is Rule 4
 
To summarize, the issue is that according to Kedārabhaṭṭa, a short vowel followed by a consonant cluster (i.e., multiple consonants), although guru by default, can *optionally* be treated as laghu if that consonant cluster happens to be the beginning of a new word.

I've treated it as guru always, and not allowed for this option.

It is definitely an interesting feature to add, but before implementing a change like this (which allows a single line to have multiple metrical patterns), I'd like to first check how commonly this exception occurs in classical works, to see whether it's critically needed. I've heard that later prosodists allowed some modifications influenced by Prākṛta prosody, which are not universally accepted by other Sanskrit scholars.

Even if it is later introduction in prosody, having that additionality would be really great.
 
(E.g. optionally allowing some consonant+repha clusters, like प्र, to be treated as single consonants which is coincidentally what's happening here too.)


If you mean that प्र is guru because it is a conjoint - the cause is the भ्र following it. र of प्र is getting converted to guru because of the conjoint भ्र after it.
 
निद्रव्यो ह्रियमेति ह्रीपरिगतः प्रभ्रश्यते तेजसः 
Here, as the ति preceding ह्री is mandated to be guru by rule 5 - by rule 7, it remains laghu.
If it is treated as guru - GGGLLGGGLLLG-GGLGGLG - doesnt correspond to zArdulavikrIDita meter.
If it is treated as laghu - GGGLLGLGLLLG-GGLGGLG - corresponds to the meter. 

This is optional. 

For what it's worth, I just checked that http://sanskrit.sai.uni-heidelberg.de/Chanda/ doesn't implement this option either. With the following text as input:

nidravyo hriyameti hrIparigataH prabhrazyate tejasaH 
nidravyo hriyameti hrIparigataH prabhrazyate tejasaH 
nidravyo hriyameti hrIparigataH prabhrazyate tejasaH 
nidravyo hriyameti hrIparigataH prabhrazyate tejasaH 

No metre is not recognized, though with hrIparigataH changed to hIparigataH, it is correctly recognized as शार्दूलविक्रीडितम् .


We may strive for better. :)
 
Also noted down in the issues section at https://github.com/shreevatsa/sanskrit/issues/1

Thanks for creating this; let's continue the discussion of this issue there.


I will be sharing my ideas for sure. I can understand python because of its similarity to PHP, but dont know the syntax. I will be very happy if I can help with logic or algorithm though. 

विश्वासो वासुकिजः (Vishvas Vasuki)

unread,
Oct 23, 2013, 10:45:50 AM10/23/13
to sanskrit-p...@googlegroups.com

2013/10/23 dhaval patel <drdhav...@gmail.com>

I am attaching herewith Relevant portion of kedArabhaTTa's vRttaratnAkara - along with a commentary by sulhaNa (sukavihRdayAnandinI).

अयि धीमन्। कुत्र प्राप्नुयां टीकाम् इमाम् अन्तर्जाले (एतावत्तु नरसिंहदेवटीकाम् एव प्राप्तवान्)

dhaval patel

unread,
Oct 23, 2013, 11:20:19 AM10/23/13
to sanskrit-p...@googlegroups.com
PFA the commentary.
Osmania University had published it very long back.
This is the one I edited some time ago.


--
You received this message because you are subscribed to the Google Groups "sanskrit-programmers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sanskrit-program...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
sukavihRdayAnandinI.pdf

विश्वासो वासुकिजः (Vishvas Vasuki)

unread,
Oct 23, 2013, 11:29:04 AM10/23/13
to sanskrit-p...@googlegroups.com
On Wed, Oct 23, 2013 at 8:20 AM, dhaval patel <drdhav...@gmail.com> wrote:
PFA the commentary.
Osmania University had published it very long back.
This is the one I edited some time ago.

उपकृतोऽस्मि। देवनागर्यां html माध्यमेनापि लभ्यते किम् (अत्र न दृष्टवान्)?

dhaval patel

unread,
Oct 23, 2013, 11:42:54 AM10/23/13
to sanskrit-p...@googlegroups.com
PFA whatever I had in this context. 
There are some word files, some PDF, excel etc.
For study of Sanskrit meters


--
You received this message because you are subscribed to the Google Groups "sanskrit-programmers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sanskrit-program...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
appendix true.xls
comments on sukavihRdayAnandinI.doc
comments on sukavihRdayAnandinI.pdf
sukavihRdayAnandinI.doc
sukavihridayanandini front page.doc
sukavihridayanandini verse list.xls
table of content.xls

dhaval patel

unread,
Oct 23, 2013, 3:19:59 PM10/23/13
to sanskrit-p...@googlegroups.com
Dear friends in the list,
The issue which faces us is that of the database of the meters.
I have tried to supply 100+ samavRtta meters which are enumerated in the vRttaratnAkara (in the syntax of the python code).
Marcis has sent the list of the meters in https://www.dropbox.com/s/8a6t2kqwkyangu9/HTML.zip

To input them, it would need colloboration of all the participants.
It is a good idea to share the work.
Anybody willing to volunteer may come up.

I take this liberty to post without consulting the original author of the code.
But hope that he will agree to it.
chandas list.txt

Mārcis Gasūns

unread,
Oct 23, 2013, 10:11:56 PM10/23/13
to sanskrit-p...@googlegroups.com
Namaste,


On Wednesday, 23 October 2013 23:19:59 UTC+4, dhaval patel wrote:
The issue which faces us is that of the database of the meters.
The time has come. 7 years after Anand has solved it for himself, now the rest of us got interested in it. I personally am looking for a look script that would write about the verse the desired metre every time it changes in the text. The only question - what about prose texts? If we analyze Panchatrantra - can and should we make a pada index of a prose text as well?
 

I have tried to supply 100+ samavRtta meters which are enumerated in the vRttaratnAkara (in the syntax of the python code).
Dhaval, can't they be converted from the  HTML files I downloded with Teleport?
 
Marcis has sent the list of the meters in https://www.dropbox.com/s/8a6t2kqwkyangu9/HTML.zip

To input them, it would need colloboration of all the participants.
I'm not sure if any such work has been done in this group. But it's time.
 
It is a good idea to share the work.
Anybody willing to volunteer may come up.
I guess people will need an intro document, maybe even video of a screencast what to do exactly. Even if 3 people would enter 1 metre every day, this task would end one day. I know that. I have been editing a Sanskrit grammar with 7 volunteers at once. Who is ready to help?
 

I take this liberty to post without consulting the original author of the code.
But hope that he will agree to it.

Somehow I can't download the chandas-list file, could you please copy it to http://pastie.org/ or share on google docs?
The page you requested is invalid. 

विश्वासो वासुकिजः (Vishvas Vasuki)

unread,
Oct 23, 2013, 10:16:41 PM10/23/13
to sanskrit-p...@googlegroups.com

On Wed, Oct 23, 2013 at 12:19 PM, dhaval patel <drdhav...@gmail.com> wrote:
To input them, it would need colloboration of all the participants.
It is a good idea to share the work.
Anybody willing to volunteer may come up.

Some one ought to make a machine do it - manual work is not really necessary here; but if people do it I will happily use it. :-)

Mārcis Gasūns

unread,
Oct 24, 2013, 12:25:01 AM10/24/13
to sanskrit-p...@googlegroups.com
On Thursday, 24 October 2013 06:16:41 UTC+4, विश्वासो वासुकिजः wrote:
Some one ought to make a machine do it - manual work is not really necessary here;
Sound reasonable. Major part of the work is done by Anand regarding the library of metres. The algorythm is unknown anyway.
 
but if people do it I will happily use it. :-)

Oh, you should better not written this :) It's a coder community, not people who ask others to do it for them. If you ask something, give something back.  
Where can one find a detailed analysis with samples of the most popular metres?

Usha Sanka

unread,
Oct 24, 2013, 1:21:06 AM10/24/13
to sanskrit-p...@googlegroups.com
नमस्ते
On Thu, Oct 24, 2013 at 7:46 AM, विश्वासो वासुकिजः (Vishvas Vasuki) <vishvas...@gmail.com> wrote:

On Wed, Oct 23, 2013 at 12:19 PM, dhaval patel <drdhav...@gmail.com> wrote:
To input them, it would need colloboration of all the participants.
It is a good idea to share the work.
Anybody willing to volunteer may come up.

Some one ought to make a machine do it -
Some one? who? 
तदर्थमपि मनुष्याः एव आवश्यकाः। यन्त्रः स्वस्य निर्माणं स्वयं न करोति।
 
manual work is not really necessary here;
Then who are asking for help.. are they ignorant? 
ये कार्यं कुर्वन्ति ते जानन्ति किमावश्यकं किं नेति। 
 
but if people do it I will happily use it. :-)
There are many friends of yours around in this world.. experts in this task.  
बीजारोपणेन विना वृक्षः, वृक्षारोहणं विना फलानि च न सिद्ध्यन्ति। 
Ocean is but collection of many water drops. Each Drop Makes An Ocean. Are you there?

-regards
Sanskrit Lover



--
--
Vishvas /विश्वासः

विश्वासो वासुकिजः (Vishvas Vasuki)

unread,
Oct 24, 2013, 2:49:04 AM10/24/13
to sanskrit-p...@googlegroups.com
Lady and gentleman, so much lecutre? parse the attachaed.

वृथा हि देव्या कृतचोदनं वै
जानामि कार्यं मम चात्र सुष्टु।
बीजं हि तावत् खलु सञ्चिकेयं
तस्मै भवेद् वा जलपूरणं ते? 
tmp.csv

विश्वासो वासुकिजः (Vishvas Vasuki)

unread,
Oct 24, 2013, 2:52:33 AM10/24/13
to sanskrit-p...@googlegroups.com


2013/10/23 विश्वासो वासुकिजः (Vishvas Vasuki) <vishvas...@gmail.com>

Mārcis Gasūns

unread,
Oct 24, 2013, 3:06:28 AM10/24/13
to sanskrit-p...@googlegroups.com


On Thursday, 24 October 2013 10:52:33 UTC+4, विश्वासो वासुकिजः wrote:

Good news, you are able to anything - the only missing element is the will, sometimes. Thank you, Vishvas.
including the numbering of the metres. Each metre - unique ID and typology in it's ID as well included as the first letter.
  • 0 samavrtta
  • 1 ardhasamavrtta
  • 2 visamavrtta
  • 3 matravrtta
  • 5 numbers 

dhaval patel

unread,
Oct 24, 2013, 3:25:08 AM10/24/13
to sanskrit-p...@googlegroups.com
Great work Vishvas.
This is getting closer and closer. 
Finally one open source chhandas identifier seems near at hand.



--
You received this message because you are subscribed to the Google Groups "sanskrit-programmers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sanskrit-program...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

dhaval patel

unread,
Oct 24, 2013, 5:13:45 AM10/24/13
to sanskrit-p...@googlegroups.com
On basis of Vishvas's work,
Please find attached the complete list of Chandas for your code in the syntax needed.
chhandascode.txt

Mārcis Gasūns

unread,
Oct 24, 2013, 5:20:03 AM10/24/13
to sanskrit-p...@googlegroups.com


On Thursday, 24 October 2013 13:13:45 UTC+4, dhaval patel wrote:
On basis of Vishvas's work,
On basis of Dhaval's scraping of Vishvas scraping of Marcis's scraping of Anand's work :)
 
Please find attached the complete list of Chandas for your code in the syntax needed.
1348 - a dream come true. The only thing I wonder - will the script recognize mixed metres? 

dhaval patel

unread,
Oct 26, 2013, 7:21:22 AM10/26/13
to sanskrit-p...@googlegroups.com


For those interested in prosody. 
There are a few more.
Will try to upload them soon.


--
You received this message because you are subscribed to the Google Groups "sanskrit-programmers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sanskrit-program...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

dhaval patel

unread,
Oct 26, 2013, 7:32:40 AM10/26/13
to sanskrit-p...@googlegroups.com

G S S Murthy

unread,
Oct 26, 2013, 12:01:06 PM10/26/13
to sanskrit-p...@googlegroups.com
If you want to develop a open source program for identifying vruttas, I suggest that instead of manually building up a dictionary of vruttas, let us develop a program that builds up a data base of vruttas. Every time you input  a verse, the program scans it, checks if it matches with its database and if it does not it provides you an option to add it to its database. You can give it a name which it keeps in its database.
Murthy  


You received this message because you are subscribed to a topic in the Google Groups "sanskrit-programmers" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/sanskrit-programmers/8jhfDaawkWI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to sanskrit-program...@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.

Mārcis Gasūns

unread,
Oct 26, 2013, 2:08:55 PM10/26/13
to sanskrit-p...@googlegroups.com


On Saturday, 26 October 2013 20:01:06 UTC+4, G S S Murthy wrote:
If you want to develop a open source program for identifying vruttas, I suggest that instead of manually building up a dictionary of vruttas, let us develop a program that builds up a data base of vruttas. Every time you input  a verse, the program scans it, checks if it matches with its database and if it does not it provides you an option to add it to its database. You can give it a name which it keeps in its database.


I guess Apte had them all. Anand took them from Apte. We have them all scraped, but not yet integrated. Hardly I believe 
that there is a need for the PC to learn. Everything is ready, it just needs to be connected. Correct me if I am wrong. 

विश्वासो वासुकिजः (Vishvas Vasuki)

unread,
Oct 26, 2013, 2:15:58 PM10/26/13
to sanskrit-p...@googlegroups.com

On Sat, Oct 26, 2013 at 11:08 AM, Mārcis Gasūns <gas...@gmail.com> wrote:

I guess Apte had them all.

विश्वासो वासुकिजः (Vishvas Vasuki)

unread,
Oct 26, 2013, 2:21:18 PM10/26/13
to sanskrit-p...@googlegroups.com
On Sat, Oct 26, 2013 at 11:08 AM, Mārcis Gasūns <gas...@gmail.com> wrote:
Correct me if I am wrong. 

Note that Anand's collection (though it has great coverage) has many things missing ( eg: mAtrA-Chandas, vaitAlIya-s, *vipula varieties of anuShTubh, some metres I found elsewhere ).

Mārcis Gasūns

unread,
Nov 1, 2013, 12:08:46 PM11/1/13
to sanskrit-p...@googlegroups.com


On Saturday, 26 October 2013 22:21:18 UTC+4, विश्वासो वासुकिजः wrote:
Note that Anand's collection (though it has great coverage) has many things missing ( eg: mAtrA-Chandas, vaitAlIya-s, *vipula varieties of anuShTubh, some metres I found elsewhere ).

And Apte has examples. But we will have a lot, if we loop the engine.
Apte has an Introduction as well, p. 1035. But it does not help much.

Shreevathsa, is there any progress in coding a loop function for MBh, 
for example, so I can export the data for all metres used in a book? Thanks.

dhaval patel

unread,
Nov 3, 2013, 9:35:43 AM11/3/13
to sanskrit-p...@googlegroups.com
Dear Shreevatsa,
Any progress on adding additional meters in the database ?



--
You received this message because you are subscribed to the Google Groups "sanskrit-programmers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sanskrit-program...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

विश्वासो वासुकिजः (Vishvas Vasuki)

unread,
Nov 3, 2013, 3:53:24 PM11/3/13
to sanskrit-p...@googlegroups.com

On Sun, Nov 3, 2013 at 6:35 AM, dhaval patel <drdhav...@gmail.com> wrote:
Any progress on adding additional meters in the database ?

Caveat : adding 1k lines of code to add 1k metres is the wrong approach. Rather, an external, collaboratively curated database should be used [eg: from here].​

Mārcis Gasūns

unread,
Nov 4, 2013, 2:40:18 PM11/4/13
to sanskrit-p...@googlegroups.com


On Monday, 4 November 2013 00:53:24 UTC+4, विश्वासो वासुकिजः wrote:

On Sun, Nov 3, 2013 at 6:35 AM, dhaval patel <drdhav...@gmail.com> wrote:
Any progress on adding additional meters in the database ?

Caveat : adding 1k lines of code to add 1k metres is the wrong approach.
It's better than nothing. But it seems even it is stuck. And it would be enough to start working with it.
 
Rather, an external, collaboratively curated database should be used [eg: from here].​

How can an online document with changes every few days be used. It can be used for reference improving it, but there is no need to count on it as now. It's a deep dive in a different direction. But it is the next, no the now required step. First we make it open source. Than we can crowd source it. What's your take on it?

M.G.

विश्वासो वासुकिजः (Vishvas Vasuki)

unread,
Nov 4, 2013, 5:00:09 PM11/4/13
to sanskrit-p...@googlegroups.com
On Mon, Nov 4, 2013 at 11:40 AM, Mārcis Gasūns <gas...@gmail.com> wrote:
It's better than nothing. But it seems even it is stuck. And it would be enough to start working with it.
​Perhaps you think that it is significantly harder to read stuff from a file? If so, that is an error.​

 
 
Rather, an external, collaboratively curated database should be used [eg: from here].​

How can an online document with changes every few days be used.
Download and deploy a snapshot once in a while..
​​
It can be used for reference improving it, but there is no need to count on it as now. It's a deep dive in a different direction. But it is the next, no the now required step. First we make it open source.
It already is - is it not?​​ Source code is out there for all to see and copy (though shrIvatsa requested that broader announcement be deferred till he is ready).

Than we can crowd source it. What's your take on it?
​​
​Both are easy/ separate enough so that one need not follow the other..​

Shreevatsa R

unread,
Nov 6, 2013, 3:58:02 AM11/6/13
to sanskrit-programmers
Sorry for the delay in replying; I got busy with other work / life stuff. An update:

Yes, we have a long list of metres, generated by both Dhaval and Vishvas, and it would be a simple matter to add them. I also agree that it's not good to have them be stored as lines of code (instead of data), but it's easy to reprocess the above lists into some "data" format.

I don't yet see it as urgent though, so I'm waiting until the code is in some "clean enough" state, so that the data can be plugged in the right place and in the right format. As a user, the first hindrance I encountered was not the absence of obscure metres, but the fact that I had to convert input into Harvard-Kyoto before using it. This was not a problem when I was typing out a verse from scratch, but when I was using a verse from elsewhere. Of course there are many transliteration tools online, but still this extra step was a barrier to usage. So, I spent some time on that and fixed that first. I've pushed to github, and also deployed on the website, a version that recognizes input whether you enter it in Devanagari, IAST, HK, or ITRANS. It does the detection automatically (if there are Devanagari characters in the input, use Devanagari; if there are diacritical marks like āīūṛṅñṭḍṇśṣ use IAST, etc.).

Try it out, and if you encounter any errors, please inform me (either over email or on the github "Issues" page), along with the input that caused the error.

The next thing I plan to do soon, now that it handles IAST natively, is to go over GRETIL texts. This should stress-test the system, and uncover a few bugs. After the basic metre-detection system has had its major issues ironed out, it would be a good time to add the large list of metres.

Regards,
Shreevatsa




G S S Murthy

unread,
Nov 6, 2013, 7:01:52 AM11/6/13
to sanskrit-p...@googlegroups.com
I believe it is important to have flexibility built in to add new metres as and when noticed. It would not be correct to assume that there exists an all-encompassing list of metres. New rhythmical metres can be created, as I have myself created some.
Regards
Murthy 


--
You received this message because you are subscribed to a topic in the Google Groups "sanskrit-programmers" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/sanskrit-programmers/8jhfDaawkWI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to sanskrit-program...@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.

Mārcis Gasūns

unread,
Nov 6, 2013, 8:14:59 AM11/6/13
to sanskrit-p...@googlegroups.com


On Wednesday, 6 November 2013 12:58:02 UTC+4, shreevatsa wrote:
Sorry for the delay in replying; I got busy with other work / life stuff.
Lucky, you have life without Sanskrit as well?
 
An update:

Yes, we have a long list of metres, generated by both Dhaval and Vishvas, and it would be a simple matter to add them. I also agree that it's not good to have them be stored as lines of code (instead of data), but it's easy to reprocess the above lists into some "data" format.
Code or data, give 'em, please. You are the one to make open what was closed before. Whatever you call it lines or data - please add it.
 

I don't yet see it as urgent though, so I'm waiting until the code is in some "clean enough" state, so that the data can be plugged in the right place and in the right format.
https://docs.google.com/document/d/1z-AQUfFWFfUMLJiNUrNe7S5atP5Wid3ay90LmGlkaQg/edit#heading=h.ak9mx3q9v65n take a look. Śloka is recognized in 1/3 cases. Even when a lot of junk HTML code was there identified right, but easy cases - missed.
 
As a user, the first hindrance I encountered was not the absence of obscure metres, but the fact that I had to convert input into Harvard-Kyoto before using it. This was not a problem when I was typing out a verse from scratch, but when I was using a verse from elsewhere. Of course there are many transliteration tools online, but still this extra step was a barrier to usage. So, I spent some time on that and fixed that first. I've pushed to github, and also deployed on the website, a version that recognizes input whether you enter it in Devanagari, IAST, HK, or ITRANS. It does the detection automatically (if there are Devanagari characters in the input, use Devanagari; if there are diacritical marks like āīūṛṅñṭḍṇśṣ use IAST, etc.).
Sanskrit NLP tasks have been around for about 33 years. You have fixed something that might be simple. But what you have done is great. I will tell every person I'll speak about Sanskrit that you have did it, for the first time for Sanskrit. It's great, tested it. It can handle all of them easily.
 
Try it out, and if you encounter any errors, please inform me (either over email or on the github "Issues" page), along with the input that caused the error.
No error messages, just Metre unknown.
If I want to test several metres, I have to press the back button all the time. No good. Leave the scanning 
window always above. So I can test many metres without pressing the browser back button at all.
 

The next thing I plan to do soon, now that it handles IAST natively, is to go over GRETIL texts. This should stress-test the system, and uncover a few bugs. After the basic metre-detection system has had its major issues ironed out, it would be a good time to add the large list of metres.
It's not yet ready for GRETIL. See my google docs. It's a good idea, but the code is not yet ready. Ironing out will take many months, so adding large lists will not do no harm right now. Oh, what you do is good. Good luck!

M.G. 

Shreevatsa R

unread,
Nov 7, 2013, 12:44:23 PM11/7/13
to sanskrit-programmers
On Wed, Nov 6, 2013 at 6:44 PM, Mārcis Gasūns <gas...@gmail.com> wrote:
https://docs.google.com/document/d/1z-AQUfFWFfUMLJiNUrNe7S5atP5Wid3ay90LmGlkaQg/edit#heading=h.ak9mx3q9v65n take a look. Śloka is recognized in 1/3 cases. Even when a lot of junk HTML code was there identified right, but easy cases - missed.

Thanks for the detailed testing. I have left comments on that document. 
Most of the issues were because of messy input, though the code now handles it to some extent:
(1) A HTML <BR> being included in the input (would be read as letters, though fortunately it usually doesn't affect metre). The code now strips these out.
(2) Trailing stuff like "।। म्जैन्य्१.०.८ ।।" being in the input (I've now made it ignore anything after // or || or two dandas or a double-danda).
(3) Leading stuff like ५.००१.००८अ and ५.००१.००८च् (transliterated from 'a' and 'c' I guess) -- this is not worth handling in code. Just clean up input first.
(4) When the whole verse does not fit the metre, the per-pāda identification usually helps. In light of the fact that śloka is often written in two lines instead of 4, I've made it recognize a single half of śloka (and other metres) as well.

(5) Many of the verses are actually not in proper metre. I think that Śloka, being the bread and butter of epic poets, admits in practice a far greater degree of variation than the formal rules say. "pañcamaṃ laghu sarvatra" is not sarvatra followed. This is perhaps to be expected from the workhorse metre that is the mainstay of epic works, somewhat like allowed variation in English metres. So actually śloka is one of the harder metres to recognize by computer (how liberal do you want to get?), though fortunately, it's one of the easier ones for humans to recognize. Anyway, you should see some improvements now.


Try it out, and if you encounter any errors, please inform me (either over email or on the github "Issues" page), along with the input that caused the error.
No error messages, just Metre unknown.

Yes, examples of that would also be welcome. You can email them to me privately, or put them publicly on the Github issues page, to avoid spamming this list. (By the way, if anyone thinks I'm sending too many emails, I'll cut down.)

 
If I want to test several metres, I have to press the back button all the time. No good. Leave the scanning 
window always above. So I can test many metres without pressing the browser back button at all.

Yes, I was thinking of this as well, seeing that the Heidelberg site does it. Have implemented it.

The next thing I plan to do soon, now that it handles IAST natively, is to go over GRETIL texts. This should stress-test the system, and uncover a few bugs. After the basic metre-detection system has had its major issues ironed out, it would be a good time to add the large list of metres.
It's not yet ready for GRETIL. See my google docs. It's a good idea, but the code is not yet ready.

I ran it over some more GRETIL texts (see read_gretil.py), and it uncovered even more typos in GRETIL. So yes, while the code is perhaps not yet ready, it's looking as if GRETIL is not yet ready too. :-)

Mārcis Gasūns

unread,
Nov 7, 2013, 2:51:30 PM11/7/13
to sanskrit-p...@googlegroups.com
Thanks for hard work done.


On Thursday, 7 November 2013 21:44:23 UTC+4, shreevatsa wrote:
Thanks for the detailed testing.
Actually not enough detailed. I wish I had more different metres. Is there a Unicode book with different samples OCRed?
 
I have left comments on that document. 
Most of the issues were because of messy input,
When you need to determine 1 shloka, everything is clean. If you loop to check Mahabharata, than you have to accept Tokunaga formatting, GRETIL. You have to accept them, not change them. You have to change your code, not code of GRETIL. Dhaval's RegEx samples could help you in that.
 
though the code now handles it to some extent:
(1) A HTML <BR> being included in the input (would be read as letters, though fortunately it usually doesn't affect metre). The code now strips these out.
<br/> and even <br/ > can be as well.
 
(2) Trailing stuff like "।। म्जैन्य्१.०.८ ।।" being in the input (I've now made it ignore anything after // or || or two dandas or a double-danda).
Good, your are getting closer.

 
(3) Leading stuff like ५.००१.००८अ and ५.००१.००८च् (transliterated from 'a' and 'c' I guess)
Yes, you are right.
 
-- this is not worth handling in code. Just clean up input first.
You better be ready for dirty input :)
 
(4) When the whole verse does not fit the metre, the per-pāda identification usually helps. In light of the fact that śloka is often written in two lines instead of 4, I've made it recognize a single half of śloka (and other metres) as well.
Yes, that I've noticed now.
 

(5) Many of the verses are actually not in proper metre. I think that Śloka, being the bread and butter of epic poets, admits in practice a far greater degree of variation than the formal rules say.
Right, at least 4 different ones are there.
 
"pañcamaṃ laghu sarvatra" is not sarvatra followed. This is perhaps to be expected from the workhorse metre that is the mainstay of epic works, somewhat like allowed variation in English metres. So actually śloka is one of the harder metres to recognize by computer (how liberal do you want to get?)
Very, very liberal.
 
, though fortunately, it's one of the easier ones for humans to recognize. Anyway, you should see some improvements now.
Yes, one can notice them easily.
 
6) Add variants of IAST signs.
Unknown characters are ignored: ṁ
ā ī ū ṛ ṝ ḷ ṅ ñ ṭ ḍ ṇ ś ṣ ḥ ṁ ṃ
Ā Ī Ū Ṛ Ṝ Ḻ Ṅ Ñ Ṭ Ḍ Ṇ Ś Ṣ Ḥ Ṁ

ś = ç
ṁ = ṃ
ṅ = ñ = 

Unknown characters are ignored: ‘ for ānato ‘smi = please add different variants for avagrahas.
 
Yes, examples of that would also be welcome. You can email them to me privately, or put them publicly on the Github issues page, to avoid spamming this list. (By the way, if anyone thinks I'm sending too many emails, I'll cut down.)

If you will develop the software I'm ready to receive two emails per day and test it 3 times per hour.
 
 Have implemented it.
Yes, thanks.

Can you add colors to the identified syllables in the text, please? Just like Anand had it.
 
I ran it over some more GRETIL texts (see read_gretil.py), and it uncovered even more typos in GRETIL. So yes, while the code is perhaps not yet ready, it's looking as if GRETIL is not yet ready too. :-)
But you have to get ready for GRETIL. GRETIL will not change. But Dhaval is cleaning it up.

Looking to hear soon from you. Your work is amazing. I wish I would understand more about the prosody, more about coding. I've got mediocre knowledge of both at best, so all I can do is testing.

M.,
Russia
 

G S S Murthy

unread,
Nov 8, 2013, 6:13:05 AM11/8/13
to sanskrit-p...@googlegroups.com
With respect to Srivatsa's comment:
5) Many of the verses are actually not in proper metre. I think that Śloka, being the bread and butter of epic poets, admits in practice a far greater degree of variation than the formal rules say. "pañcamaṃ laghu sarvatra" is not sarvatra followed. This is perhaps to be expected from the workhorse metre that is the mainstay of epic works, somewhat like allowed variation in English metres. So actually śloka is one of the harder metres to recognize by computer (how liberal do you want to get?), though fortunately, it's one of the easier ones for humans to recognize.
Rightly said.While coding my Java program I noticed this and delved into it deeper and the result was a study which was published in Annals of the Bhadarkar Oriental Research Institute, Vol.84, 2003, Pages 101-115. A PDF version of the same is attached for those who have the time and the inclination to go through it.My algorithm in the Java app which has been uploaded by Visvas at his GITHUB page takes account of the findings of this paper.
Regards
Murthy


--
You received this message because you are subscribed to a topic in the Google Groups "sanskrit-programmers" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/sanskrit-programmers/8jhfDaawkWI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to sanskrit-program...@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.
Sans_anushtup3.pdf

dhaval patel

unread,
Nov 8, 2013, 6:31:45 AM11/8/13
to sanskrit-p...@googlegroups.com
good work done. This will surely help the developer develop his application for better finding of various subtypes of anuSTup


You received this message because you are subscribed to the Google Groups "sanskrit-programmers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sanskrit-program...@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.



--

Mārcis Gasūns

unread,
Nov 8, 2013, 3:21:53 PM11/8/13
to sanskrit-p...@googlegroups.com


On Friday, 8 November 2013 15:13:05 UTC+4, G S S Murthy wrote:
Rightly said.While coding my Java program I noticed this and delved into it deeper and the result was a study which was published in Annals of the Bhadarkar Oriental Research Institute, Vol.84, 2003, Pages 101-115. A PDF version of the same is attached for those who have the time and the inclination to go through it.My algorithm in the Java app which has been uploaded by Visvas at his GITHUB page takes account of the findings of this paper.

Mr. Murthy,

 A very deep paper. As per papers typography. Why do you used Sanskrit98 in 2003? Sanskrit 2003, a 
unicode font was released at that time. Hope you use it these days. Same Nirnaya style, only unicode.
I can hardly even understand how to integrate all of it in the code. Fantastic, the shloka is not simple at all.

M.G.

विश्वासो वासुकिजः (Vishvas Vasuki)

unread,
Nov 16, 2013, 4:12:50 PM11/16/13
to sanskrit-p...@googlegroups.com



On Wed, Oct 23, 2013 at 8:42 AM, dhaval patel <drdhav...@gmail.com> wrote:
PFA whatever I had in this context. 
There are some word files, some PDF, excel etc.

प्रियधवल। विकिस्रोतसि मूलं योजितवान् परोपकाराय - https://sa.wikisource.org/wiki/%E0%A4%B8%E0%A5%81%E0%A4%96%E0%A4%B5%E0%A4%BF%E0%A4%B9%E0%A5%83%E0%A4%A6%E0%A4%AF%E0%A4%BE%E0%A4%A8%E0%A4%82%E0%A4%A6%E0%A4%A8%E0%A5%80 ।

Mārcis Gasūns

unread,
Nov 16, 2013, 6:19:07 PM11/16/13
to sanskrit-p...@googlegroups.com


On Sunday, 17 November 2013 01:12:50 UTC+4, विश्वासो वासुकिजः wrote:
प्रियधवल। विकिस्रोतसि मूलं योजितवान् परोपकाराय - https://sa.wikisource.org/wiki/%E0%A4%B8%E0%A5%81%E0%A4%96%E0%A4%B5%E0%A4%BF%E0%A4%B9%E0%A5%83%E0%A4%A6%E0%A4%AF%E0%A4%BE%E0%A4%A8%E0%A4%82%E0%A4%A6%E0%A4%A8%E0%A5%80 ।

Vishvas, how does one reads ।ऽ।
ऽऽ।
।ऽ।
ऽऽ।
।ऽ।
ऽऽ।
।ऽ।
ऽऽ।
।ऽ।
ऽऽ।
।ऽ।
ऽऽ।
।ऽ।
ऽऽ।
ऽऽ।
।ऽ।
।ऽ।
ऽऽ।
ऽऽ।
।ऽ।
।ऽ।
ऽऽ।
ऽऽ।
।ऽ।
।ऽ।
ऽऽ।
ऽऽ।
।ऽ।
ऽऽ।
ऽऽ।
ऽऽ।
ऽऽ।
।ऽ।
।ऽ।
।ऽ।
ऽऽ।
ऽऽ।
ऽऽ।
।ऽ।
।ऽ।
।ऽ।
।ऽ।
ऽऽ।
ऽऽ।
ऽऽ।
ऽऽ।
ऽऽ।
ऽऽ।
ऽऽ।
।ऽ।
।ऽ।
।ऽ।
।ऽ।
।ऽ।
।ऽ।
।ऽ।
३४
I'm bad in Sanskrit, need your advice :) 

विश्वासो वासुकिजः (Vishvas Vasuki)

unread,
Nov 16, 2013, 6:56:21 PM11/16/13
to sanskrit-p...@googlegroups.com

On Sat, Nov 16, 2013 at 3:19 PM, Mārcis Gasūns <gas...@gmail.com> wrote:
Vishvas, how does one reads ।ऽ।

[१४ उपजातीनां मात्राविन्यासाः दत्ताः।] इति तत्स्थाने स्थापितवान्।

सूचनयोपकृतोऽस्मि, परन्तु विकिस्रोतसि यः कोऽपि दोषपरिमार्कस् सम्पादितुम् अर्हति।

dhaval patel

unread,
Nov 17, 2013, 12:41:37 AM11/17/13
to sanskrit-p...@googlegroups.com
Please correct the heading to सुकविहृदयानन्दिनी instead of सुखवि....


2013/11/17 विश्वासो वासुकिजः (Vishvas Vasuki) <vishvas...@gmail.com>

--
You received this message because you are subscribed to the Google Groups "sanskrit-programmers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sanskrit-program...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

विश्वासो वासुकिजः (Vishvas Vasuki)

unread,
Nov 17, 2013, 10:08:45 AM11/17/13
to sanskrit-p...@googlegroups.com

2013/11/16 dhaval patel <drdhav...@gmail.com>

Please correct the heading to सुकविहृदयानन्दिनी instead of सुखवि....

धन्योऽहम्। तथा कृतवान्।

Mārcis Gasūns

unread,
Nov 18, 2013, 2:27:02 PM11/18/13
to sanskrit-p...@googlegroups.com
Is it a mistake in definition? Everything read instead of only first 2 as bellow?
सं स्त म्भ  

It has 4 syllables.
http://sanskrit.sai.uni-heidelberg.de/Chanda/HTML/v_zrIH_0.html

श्रीः

About this Metre:
  • It has 4 syllables and 4 lines.
  • First Line has 1 syllables with following distribution:
    गु
  • Second Line has 1 syllables with following distribution:
    गु
  • Third Line has 1 syllables with following distribution:
    गु
  • Fourth Line has 1 syllables with following distribution:
    गु
  • This is a sama-vRtta [ सम-वृत्त ].

विश्वासो वासुकिजः (Vishvas Vasuki)

unread,
Nov 18, 2013, 4:03:45 PM11/18/13
to sanskrit-p...@googlegroups.com

On Mon, Nov 18, 2013 at 11:27 AM, Mārcis Gasūns <gas...@gmail.com> wrote:
Is it a mistake in definition? Everything read instead of only first 2 as bellow?

Definition is fine. It is treating the last letter in the pAda (the only letter in this case) as guru  :-)

Mārcis Gasūns

unread,
Nov 18, 2013, 7:09:48 PM11/18/13
to sanskrit-p...@googlegroups.com
Definition is fine. It is treating the last letter in the pAda (the only letter in this case) as guru  :-)

1) 40 metres right now. Why not copy paste the other 1000?

2) Strange to see that a shloka is only 
Anuṣṭup (Śloka)', '. . . . L G G .', '. . . . L G L .')

How did you run it for a whole text at once? Did you used https://github.com/shreevatsa/sanskrit/blob/metrical-scan/read_gretil.py ?

4) https://github.com/shreevatsa/sanskrit/blob/metrical-scan/sscan.py is responsible for which gets L or G, right? Thaks,

M.

विश्वासो वासुकिजः (Vishvas Vasuki)

unread,
Nov 23, 2013, 7:48:27 PM11/23/13
to sanskrit-p...@googlegroups.com
archive.org इत्यत्र doc, xls सञ्चिका अपि स्थापितवान् - https://archive.org/details/SukavihRdayAnandinI

dhaval patel

unread,
Nov 25, 2013, 12:04:23 PM11/25/13
to sanskrit-p...@googlegroups.com
On Tue, Nov 19, 2013 at 5:39 AM, Mārcis Gasūns <gas...@gmail.com> wrote:
Definition is fine. It is treating the last letter in the pAda (the only letter in this case) as guru  :-)

1) 40 metres right now. Why not copy paste the other 1000?

I also second Marcis in this. Once the database / code is added for other Chandas, their bugs can be tested. As of now, the system seems to have stabilized. 
So good luck with strenuous testing with other Chandas than the famous ones. 

Mārcis Gasūns

unread,
Nov 25, 2013, 12:04:55 PM11/25/13
to sanskrit-p...@googlegroups.com


On Sunday, 24 November 2013 02:48:27 UTC+2, विश्वासो वासुकिजः wrote:
archive.org इत्यत्र doc, xls सञ्चिका अपि स्थापितवान् - https://archive.org/details/SukavihRdayAnandinI

sulhaNa (sukavihRdayAnandinI) - commentary of kedArabhaTTa's vRttaratnAkara.
How could it help, Vishvas? shreevatsa, we need you back!

Mārcis Gasūns

unread,
Dec 14, 2013, 7:08:30 AM12/14/13
to sanskrit-p...@googlegroups.com
Is the project closed? Or not yet :)

Mārcis Gasūns

unread,
Apr 2, 2017, 2:21:20 PM4/2/17
to sanskrit-programmers
https://github.com/shreevatsa/padyachandas new place, but is it alive?

Shreevatsa R

unread,
Apr 2, 2017, 3:40:22 PM4/2/17
to sanskrit-programmers
Not yet :-)

Haven't worked on this for an awfully long time, but it's at the back of my mind. Because I wasn't very confident of my ability to see the project through to completion, I made it open-source from the start, so that anyone can take the ideas and code and use it as they wish. However, thanks for the interest; I may start working on it again...

--
You received this message because you are subscribed to the Google Groups "sanskrit-programmers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sanskrit-programmers+unsub...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Devaraj Adiga

unread,
Apr 3, 2017, 1:36:08 AM4/3/17
to sanskrit-p...@googlegroups.com
There is tool available for meter identification here : http://sanskritlibrary.org:8080/mitweb/



To unsubscribe from this group and stop receiving emails from it, send an email to sanskrit-programmers+unsubscrib...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "sanskrit-programmers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sanskrit-programmers+unsub...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
   Regards
Devaraj Adiga

विश्वासो वासुकिजः (Vishvas Vasuki)

unread,
Apr 3, 2017, 2:07:11 PM4/3/17
to sanskrit-programmers

2017-04-02 22:36 GMT-07:00 Devaraj Adiga <geta...@gmail.com>:
There is tool available for meter identification here : http://sanskritlibrary.org:8080/mitweb/

nice! That's yet another one (i'd noted it earlier in https://sites.google.com/site/sanskritcode/home/survey ). I hope that the long tra​ditions of reinventing the wheel and not publishing the source will come to an end.

G S S Murthy

unread,
Apr 3, 2017, 8:06:28 PM4/3/17
to sanskrit-p...@googlegroups.com
I have published my source code thru Mr Vishwas github. Thanks.Murthy

--
You received this message because you are subscribed to a topic in the Google Groups "sanskrit-programmers" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/sanskrit-programmers/8jhfDaawkWI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to sanskrit-programmers+unsub...@googlegroups.com.

विश्वासो वासुकिजः (Vishvas Vasuki)

unread,
Apr 4, 2017, 12:01:40 AM4/4/17
to sanskrit-programmers

2017-04-03 17:06 GMT-07:00 G S S Murthy <murt...@gmail.com>:
I have published my source code thru Mr Vishwas github. Thanks.Murthy

​Yes sir, it is now easily available via a maven repository as well.​

Ramanathan Sharma

unread,
Apr 25, 2017, 2:15:57 PM4/25/17
to sanskrit-programmers
KhanAcademy style short videos would be ideal! Also, I recommend using Javascript and putting up the code in Github and having a online version where people can input their sholkas. It might get more traction due to less barrier to entry!

On Monday, August 22, 2011 at 12:07:16 PM UTC-5, vasya10 wrote:
priya mitrANi

Taking from the other mail from Vishvas:

#5. Tools to identify metre(1, 2).

A few years ago I had done a lot of ground work that would identify a metre (i had my own scheme of encoding which was very easy to parse, but may be not a comprehensive scheme). I had taken all the metres from the sanskrit-english dictionary (VS Apte) appendix. It is in java, but I will soon be porting to groovy or scala as the java syntax is very elaborate.

I found a site recently from the samskrita google group that already does this identification and has about a 1000+ metre database. I dont think its exposed as a an API. One of the things I would like to keep as a goal is, whatever be the functionality of a project, it should be exposed as a webservice or have an api so it is easily interfaced. I will probably work towards that.

"In rare cases above source code for Sanskrit tools are available; but they are mostly not open-source; and there is quite a bit of duplication of effort; the boundless-sharing culture is mostly absent. Besides the limitations noted above, what is conspicuously missing from the above are tools directed at meeting important needs of the popular spoken Sanskrit movement, especially as we increasingly interact with information through computers and the internet."

Agree, f
or the popularizing spoken samskrita, i have been mulling over a khanacademy type of lessons in samskrita. Simple, short < 10 mts.

विश्वासो वासुकिजः (Vishvas Vasuki)

unread,
Apr 25, 2017, 9:24:05 PM4/25/17
to sanskrit-programmers
2017-04-25 11:15 GMT-07:00 Ramanathan Sharma <heyram...@gmail.com>:
KhanAcademy style short videos would be ideal!
​For what? composition? LIke this?

Or recitation? Like this?

 
Also, I recommend using Javascript and putting up the code in Github and having a online version where people can input their sholkas. It might get more traction due to less barrier to entry!

​Did you even read this thread, sir? You're talking about something like this http://sanskritmetres.appspot.com/ ?​
 

G S S Murthy

unread,
Apr 26, 2017, 6:11:47 AM4/26/17
to sanskrit-p...@googlegroups.com
Thanks for these inputs. I have suddenly started getting this chain in my Gmail.
Murthy

--
You received this message because you are subscribed to a topic in the Google Groups "sanskrit-programmers" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/sanskrit-programmers/8jhfDaawkWI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to sanskrit-programmers+unsub...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

विश्वासो वासुकिजः (Vishvas Vasuki)

unread,
May 14, 2018, 10:43:08 AM5/14/18
to sanskrit-programmers

On Wed, Apr 26, 2017 at 3:11 AM, G S S Murthy <murt...@gmail.com> wrote:
Thanks for these inputs. I have suddenly started getting this chain in my Gmail.
Murthy
On Wed, Apr 26, 2017 at 6:53 AM, विश्वासो वासुकिजः (Vishvas Vasuki) <vishvas...@gmail.com> wrote:

2017-04-25 11:15 GMT-07:00 Ramanathan Sharma <heyram...@gmail.com>:
KhanAcademy style short videos would be ideal!
​For what? composition? LIke this?

Or recitation? Like this?

 
Also, I recommend using Javascript and putting up the code in Github and having a online version where people can input their sholkas. It might get more traction due to less barrier to entry!

​Did you even read this thread, sir? You're talking about something like this http://sanskritmetres.appspot.com/ ?​
 




--
--
Vishvas /विश्वासः

--
You received this message because you are subscribed to a topic in the Google Groups "sanskrit-programmers" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/sanskrit-programmers/8jhfDaawkWI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to sanskrit-programmers+unsubscrib...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "sanskrit-programmers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sanskrit-programmers+unsub...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--

G S S Murthy

unread,
May 14, 2018, 8:40:06 PM5/14/18
to sanskrit-p...@googlegroups.com
Thank you, Sir, for all the inputs. I have browsed through them. Long back I developed a program that identifies vruttas and I think its source code is uploaded by you only at your site as I am not familiar with Github. The program, I am now needing help for converting it into a self-executable one, goes beyond a Name-identifying software.
Regards,
Murthy

To unsubscribe from this group and stop receiving emails from it, send an email to sanskrit-programmers+unsubscrib...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
--
Vishvas /विश्वासः

--
You received this message because you are subscribed to a topic in the Google Groups "sanskrit-programmers" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/sanskrit-programmers/8jhfDaawkWI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to sanskrit-programmers+unsub...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--

Avinash L Varna

unread,
May 16, 2018, 12:07:49 AM5/16/18
to sanskrit-programmers
Namaste Murthy mahodaya,

I am not a java professional, but here are my two cents - The vast majority of Windows users would have installed the JRE at one point in time or the other. If they have not, then installation is fairly straightforward. With this in mind, if all you are looking to do is to convert the java program into an executable format suitable for distribution to others, you could just create an executable jar file. The recipient could then double click on it, and the program would run. You can see the replies here for various options to create an executable jar file - https://stackoverflow.com/questions/5258159/how-to-make-an-executable-jar-file

If you are looking for something else, please post the details of your requirements. One of the more knowledgeable members might be able to help you out.

Thanks
Avinash


On Monday, 14 May 2018 17:40:06 UTC-7, G S S Murthy wrote:
Thank you, Sir, for all the inputs. I have browsed through them. Long back I developed a program that identifies vruttas and I think its source code is uploaded by you only at your site as I am not familiar with Github. The program, I am now needing help for converting it into a self-executable one, goes beyond a Name-identifying software.
Regards,
Murthy
On Mon, May 14, 2018 at 8:12 PM, विश्वासो वासुकिजः (Vishvas Vasuki) <vishvas...@gmail.com> wrote:
On Wed, Apr 26, 2017 at 3:11 AM, G S S Murthy <murt...@gmail.com> wrote:
Thanks for these inputs. I have suddenly started getting this chain in my Gmail.
Murthy
On Wed, Apr 26, 2017 at 6:53 AM, विश्वासो वासुकिजः (Vishvas Vasuki) <vishvas...@gmail.com> wrote:

2017-04-25 11:15 GMT-07:00 Ramanathan Sharma <heyram...@gmail.com>:
KhanAcademy style short videos would be ideal!
​For what? composition? LIke this?

Or recitation? Like this?

 
Also, I recommend using Javascript and putting up the code in Github and having a online version where people can input their sholkas. It might get more traction due to less barrier to entry!

​Did you even read this thread, sir? You're talking about something like this http://sanskritmetres.appspot.com/ ?​
 




--
--
Vishvas /विश्वासः

--
You received this message because you are subscribed to a topic in the Google Groups "sanskrit-programmers" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/sanskrit-programmers/8jhfDaawkWI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to sanskrit-programmers+unsub...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "sanskrit-programmers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sanskrit-programmers+unsub...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
--
Vishvas /विश्वासः

--
You received this message because you are subscribed to a topic in the Google Groups "sanskrit-programmers" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/sanskrit-programmers/8jhfDaawkWI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to sanskrit-programmers+unsub...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

G S S Murthy

unread,
May 16, 2018, 1:32:23 AM5/16/18
to sanskrit-p...@googlegroups.com
Thank you, Avinash Varnaji, for your response. I went to the stackoverflow site and browsed through. At first glance, it appears to me to be a steep hill to climb. However, I will get back after making an honest attempt. 
Thanks once again,
GSS Murthy 

To unsubscribe from this group and all its topics, send an email to sanskrit-programmers+unsubscrib...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "sanskrit-programmers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sanskrit-programmers+unsubscrib...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
--
Vishvas /विश्वासः

--
You received this message because you are subscribed to a topic in the Google Groups "sanskrit-programmers" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/sanskrit-programmers/8jhfDaawkWI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to sanskrit-programmers+unsubscrib...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to a topic in the Google Groups "sanskrit-programmers" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/sanskrit-programmers/8jhfDaawkWI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to sanskrit-programmers+unsub...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Mārcis Gasūns

unread,
Feb 5, 2023, 1:23:53 PM2/5/23
to sanskrit-programmers
Can we have a vipula counter? So they are enlisted.
Reply all
Reply to author
Forward
0 new messages