shreevatsa / sanskrit

Tool(s) to help read Sanskrit (and other) metrical verse
https://sanskritmetres.appspot.com
GNU General Public License v2.0
73 stars 14 forks source link

sanskrit.sai.uni-heidelberg.de vs 1b.sanskritmetres.appspot.com #48

Closed gasyoun closed 10 years ago

gasyoun commented 10 years ago

I must confess I'm impressed. http://sanskrit.sai.uni-heidelberg.de/Chanda/src/formChanda.py/searchChanda

से के तु प र म क्लो य्म्र्ध मि ति चो च्य ते प्र थ मे दि व से च्थ हो र्क्ल स्त त क्र म्त्प्र त्य ह तु वि व्द्ध स्य्द्धो र्य्द्व्द अ त स्र्ध हो र्स प्त मे स्य्त्त्व दे व मे दि ने ह्र्स ये द्व्द्ध व च्च्तो हो र्क्ल च तु र्द ए ए क वि अ त्य ह्न्त चे द्ध्र्त त्र तु स प्त म्त्य्व त्प च द न्त sydymrWa ह्र्स ये त्त त

It has 79 syllables. No Metre could be found for this string!

And even I use http://1b.sanskritmetres.appspot.com/identify r̥ instead of ṛ (could r̥, ṁ variants be added to the IAST, please?), it still does not badly fails.

Metre unknown. There are 110 (16 + 16 + 15 + 16 + 15 + 16 + 16) syllables (179 mātra units). Line 1: pattern GGLLLGGGGGLLLGLG (25) is Anuṣṭup (Śloka)_half Line 2: pattern LLGLLGGLGGGGLGLG (25) is Anuṣṭup (Śloka)_half Line 3: pattern GLLLGGGGGGGLGLG (25) is unknown Line 4: pattern GLGGGLGGGLGGLGLG (27) is unknown Line 5: pattern GLGLGGGGGGLLGLG (25) is unknown Line 6: pattern GLLGLGLGGGGLLGLG (25) is unknown Line 7: pattern GGGLLGGGGGGGLGLL (27) is Anuṣṭup (Śloka)_half Input read as: Line 1: seketuparamaḥkāloyāmārdhamiticocyate Line 2: prathamedivasecāthahorākālastataḥkramāt Line 3: pratyahatuvivddhaḥsyāddhorāyādvādaśāśataḥ Line 4: sārdhahorāsaptamesyāttāvadevāṣṭamedine Line 5: hrāsayedvddhavaccātohorākālacaturdaśe Line 6: ekaviśatyahāntaceddhārātatratusaptamāt Line 7: yāvatpañcadaśāntasyādyāmārdhahrāsayettataḥ

shreevatsa commented 10 years ago

Thank you for the feedback; glad you found it useful.

Is there a reason you're trying the old version http://1b.sanskritmetres.appspot.com/identify instead of the latest version at http://sanskritmetres.appspot.com ? All the last 3 versions already handle r̥ and ṁ variants.

shreevatsa commented 10 years ago

Could you give the actual input you tested it with?

gasyoun commented 10 years ago

It's hard for me to find the latest version every time. I spend from 5 to 20 minutes to find it. Can you kill old ones or interlink them? Can you place a link from here to the latest version as well? It's difficult. The input text is based on http://pastie.org/9494961 Older versions at least work. Latest one gives only Full: Error: too many lines in verse. Perhaps these are multiple verses? Lines: Halves: Quarters: When I try to scan a whole text.

shreevatsa commented 10 years ago

The latest version is at http://sanskritmetres.appspot.com/ -- the main page. It also links to the older versions. I can remove the older versions (especially 1d and older) if it's too confusing.

(Note that the web interface is intended for one verse at a time.)

gasyoun commented 10 years ago

Please leave the older ones. Only add links to latest one as well. Older ones work with several verses at a time. I don't want to install Python on every PC I'm using just to check a few lines. I want to check texts and see general patterns. The new web interface with it's Javascipt is harder to use, than the initial versions. Smarter, but harder to use. Especially because of the silly "Error: too many lines in verse. Perhaps these are multiple verses?". What if I do not know where is the end of beginning?

shreevatsa commented 10 years ago

Can you explain what is harder to use‌ (besides multiple verses)? I have definitely tried to make it easier, not harder, so it would be useful to know the details -- I'll try to make it simpler again.

(By the way, there is no Javascript anywhere so far, even in the latest version. Just basic HTML and some very minimal CSS. Though Javascript may be useful for something in future...)

As for multiple verses: The website uses computational resources, and it runs on AppE‌ngine, which beyond some limit is not free of charge. Giving the system a large amount of text and forcing it to do a lot of computation will consume resources, and it is an easy source of abuse. Thus, not allowing too many lines is an intentional decision.

If you accidentally give multiple verses (e.g. 5 or 6 lines instead of 4), it tries to do something reasonable. Only for a very large number of lines (more than anyone might accidentally think is one verse) does it complain.

gasyoun commented 10 years ago

Oh, it's CSS - still very "javascriptic" :) Like DHTML in the old days. How many lines is too many? Is 10 A4 pages of shlokas too much? When I work on GRETIL's DB, sure I should do it locally, but single (non MBh size texts) should have a chance. Now only older versions support them. A quick glance is more than enough mostly. As per now - I have to copy paste and add line by line just to know how much is too much. I know AppE‌ngine, but I would love to at least have an upload option for .txt or .html files, so I can see the results - I can wait, it does not has to give it back in seconds. I just don't have Python where I need to know the metres (for finding possible mistakes in ayurvedic texts). What is the number value of "more than anyone might accidentally think is one verse", please tell?

shreevatsa commented 10 years ago

Currently, 12 lines is the limit: https://github.com/shreevatsa/sanskrit/blob/fdf78604fded19173102cd7a49ff2f366b879876/identifier.py#L46 10 pages is definitely over that limit, unless perhaps there's only one line printed per page. :-)

For finding errors, the newer version does have better highlighting of where exactly the errors are.

But I do appreciate the "whole text at a time" use case, and your comment has suggested that a web version would be useful too. When I next get some time, I'll work on this too. Regards,

gasyoun commented 10 years ago

Great to hear. 12 lines is not enough, 24 would do, but if an upload option or window for bigger texts will be there, than it's a solved case.