indic-dict / stardict-sanskrit-vyAkaraNa

3 stars 4 forks source link

internal references in SK #4

Open drdhaval2785 opened 7 years ago

drdhaval2785 commented 7 years ago

There are a lot of references in SK where the commentary refers to another rule in SK. Is there a way in which they can be linked in stardict format?

E.g

6.1.104
नादिचि ६.१.१०४ 
 अवर्णादिचिपरे न पूर्वसवर्णदीर्घः । आद्गुणः {*69*} । एङः पदान्तादति {*86*} । शिवोऽर्च्यः । अत इति तपरः किम् । देवा अत्र । अतीति तपरः किम् । श्व आगन्ता । अप्लुतात्किम् । एहि सुस्रोत3 अत्र स्नाहि । प्लुतस्यासिद्धत्वादतः परोऽयम् । अप्लुतादिति विशेषणे तु तत्सामर्थ्यान्नासिद्धत्वम् । तपरकरणस्य तु न सामर्थ्यं दीर्घनिवृत्त्या चरितार्थत्वात् । अप्लुते इति किम् । तिष्ठतु पय अ3ग्निदत्त । गुरोरनृत {*97*} इति प्लुतः ॥

Here 69, 86, 97 etc are references and are properly marked with markup. Is there a way by which they can be converted to clickable items which open those particular entries in SK.

Whats your take @damooo?

Nyasa also has similar references in brackets. This feature will open up a possibility of better linked commentaries.

drdhaval2785 commented 7 years ago

Something like Panini Ashtadhyayi app.

vvasuki commented 7 years ago

Take a look at purANa encyclopedia file and you'll see links like: <a class="pe_a_pada" href="पार्वती">pārvatī</a>

damooo commented 7 years ago

Yes, we can add hyperlinks. , and we can use html for linking, divison, redirection, organising. to enable html tags in compilation, we have to add fallowiong lines at starting of babylon file.

`#stripmethod=keep

sametypesequence=h

bookname=పారిభాషిక పదకోశం

` book name is the name which we want to appear in golden dict. after those three lines, one empty line, and then remaining entries. (as in vedicindex.babylon file). if we add them, compiler will keep all html tags we used in babylon file.

Now to add hyperlinks, we can add just like in html, like <a class="sk_hyperlink_internal" href="HEADWORD">DISPLAY_TEXT</a> . here HEADWORD should be the one of the head words of destination. i.e. like "6.1.904" .

for example if we have entry like

అనంత|ananta|anaMta|anMtaM infinite in telugu. used with pratyaya 'mu' or 'M' in general

then we can use any of head words in link which points to this word. <a href="అనంత">ananta</a>, like that. display text can be what ever we want to display.

If those terms are too generic, and may give results from other dictionaries too, we can give an id for all words in headwords, which are not actual searchable pattern but unique id for linking. like fallowing.

అనంత|ananta|anaMta|anMtaM|SK@WORD119 infinite in telugu. used with pratyaya 'mu' or 'M' in general

above SK@WORD119 is given as headword, which we are sure that maynot be used any other dicts. so we can link to this word from anywhere like follow <a href=" _SK_@WORD119">ananta</a> then it will only give exact this word, with out remaing entries from other dicts.

drdhaval2785 commented 7 years ago

As of now, I feel that adding HTML markups did add to clumsiness. Will defer it till more appropriate time.

gasyoun commented 7 years ago

If those terms are too generic, and may give results from other dictionaries too, we can give an id for all words in headwords, which are not actual searchable pattern but unique id for linking. like fallowing.

Dhaval, why not?

adding HTML markups did add to clumsiness.

Only for coder, not for the user. User above all, Dhaval!

drdhaval2785 commented 7 years ago

Only for coder, not for the user. User above all, Dhaval!

Thats the precise reason. HTML had a lot of disgruntled users. Txt is hot cake. In HTML different applications render differently. Desktop units do render them well and mobile units throw a lot of styling junk, making it unreadable.

gasyoun commented 7 years ago

mobile units throw a lot of styling junk, making it unreadable.

Screenshot proof?

drdhaval2785 commented 7 years ago

tmp_21537-screenshot_20170402-215522258252240

drdhaval2785 commented 7 years ago

In colordict for android, textview shows this junk. Only textview has some kind of hyperlinking shown. webview doesnt even have hyperlinks. It doesnt have this styling remnants, but doesnt do anythin useful.

vvasuki commented 7 years ago

@drdhaval2785 - I am a bit skeptical. The screenshot you show above is not simple html - it includes wasteful css. I don't think just adding anchor links will make things go bad. Please do a test.