News for hackers. Stuff that matters.
Re:Show HN: Simple Bhagavad Gita Search Web App by whistlerbrk on Sunday August 06, 2017 @11:32AM (#14941688)
Hey this is excellent! I just finished a survey philosophy course which started off with the Gita and continually returned to it, I was super disappointed when I found most online editions plastered with ads and barely readable (by modern standards).

I agree with the other commenter, I expected clicking on a verse would jump me that position in the whole body of text, but I'm sure this is just your starting point. Well done OP

Re:Show HN: Simple Bhagavad Gita Search Web App by cvaidya1986 on Sunday August 06, 2017 @01:49PM (#14942415)
So thankful! The whole body of text as in you can see below and above quotes or how do you envision the UI when you click on the quote? Would you also like this for other types of philosophy too? Shiva Sutras? Buddha? Zen?
Re:Show HN: Simple Bhagavad Gita Search Web App by whistlerbrk on Monday August 07, 2017 @01:38PM (#14949389)
Shantideva, and commentaries on his work.

Yes, anything would be great.

Re:Show HN: Simple Bhagavad Gita Search Web App by cbcoutinho on Sunday August 06, 2017 @09:52AM (#14941313)
Typing two words results in the second word being matched with non-contiguous letters. For instance, 'Krishna and' will match with

^Krishna) ^am the source of the origi^n as well as the ^dissolution of the entire universe. (7.06)

Not sure if this was intended

Re:Show HN: Simple Bhagavad Gita Search Web App by cvaidya1986 on Wednesday August 16, 2017 @12:09AM (#15024880)
Search is improved!
Re:Show HN: Simple Bhagavad Gita Search Web App by cvaidya86 on Monday August 07, 2017 @11:35AM (#14948259)
Yea point taken! Will improve search!
Re:Show HN: Simple Bhagavad Gita Search Web App by maxxxxx on Sunday August 06, 2017 @01:52PM (#14942430)
When I type "entitled" I get matches for "entities", "There", "Divine" and lot of others. Does it search for every single letter of the search term? That doesn't seem very useful.
Re:Show HN: Simple Bhagavad Gita Search Web App by cvaidya1986 on Wednesday August 16, 2017 @12:10AM (#15024883)
Ok the search should be better now!
Re:Show HN: Simple Bhagavad Gita Search Web App by cvaidya1986 on Sunday August 06, 2017 @02:00PM (#14942469)
It's a basic fuzzy search, are you looking for a more cognitive search where it tries to find the meaning of entitled and returns a response?
Re:Show HN: Simple Bhagavad Gita Search Web App by maxxxxx on Sunday August 06, 2017 @02:10PM (#14942528)
I am looking for matches that contain the word "entitled". Nothing else. This search seems way too fuzzy.
Re:Show HN: Simple Bhagavad Gita Search Web App by cvaidya1986 on Sunday August 06, 2017 @02:20PM (#14942589)
So if the word does not exist in the verses, it should show up zero matches instead of something close?
Re:Show HN: Simple Bhagavad Gita Search Web App by maxxxxx on Sunday August 06, 2017 @02:35PM (#14942677)
In what way is "there" even close to "entitled"?

Yes, the default should be not to show verses that don't contain the search word. At least to me the current implementation is not useful.

Re:Show HN: Simple Bhagavad Gita Search Web App by gordon_freeman on Sunday August 06, 2017 @02:54PM (#14942793)
Similar to this: when I type "Bhima" it also gets me "Bhisma". That means it does not recognize the structure of a word.
Re:Show HN: Simple Bhagavad Gita Search Web App by cvaidya1986 on Wednesday August 16, 2017 @12:11AM (#15024887)
Typing Bhima, you get Bhima quotes first then Bhishma now!
Re:Show HN: Simple Bhagavad Gita Search Web App by cvaidya86 on Monday August 07, 2017 @08:11AM (#14946902)
Hmm you're right. I will definitely look into improving the search.
Re:Show HN: Simple Bhagavad Gita Search Web App by cvaidya1986 on Sunday August 13, 2017 @07:29AM (#15002491)
Added click and jump into specific section and go forward and backward in that new place directly from search results.Also added chapter names!
Re:Show HN: Simple Bhagavad Gita Search Web App by magnetomax on Monday August 07, 2017 @07:40AM (#14946740)
Hey! Excellent Work! Just found a typo in following sentence: "I am the wind among the purifiers and Lord Rama among the warriors. I am the crocodile among the fishes and the holy Gariga among the rivers. (10.31)"

I think it should be Ganga. :)

Re:Show HN: Simple Bhagavad Gita Search Web App by cvaidya86 on Monday August 07, 2017 @08:10AM (#14946895)
Of course you're right! I shall correct it when I get a chance! Any more suggestions welcome!
Re:Show HN: Simple Bhagavad Gita Search Web App by cvaidya1986 on Monday August 07, 2017 @08:21AM (#14946948)
Fixed!
Re:Show HN: Simple Bhagavad Gita Search Web App by eggy on Sunday August 06, 2017 @09:38AM (#14941253)
Is there a way to click on the results to bring up the surrounding text?
Re:Show HN: Simple Bhagavad Gita Search Web App by cvaidya86 on Sunday August 06, 2017 @10:06AM (#14941371)
Ah you mean jumping to the place in the Gita? Or show the sequential quotes below and above?
Re:Show HN: Simple Bhagavad Gita Search Web App by eggy on Sunday August 06, 2017 @08:40PM (#14944544)
Yes to both, if possible. I read the Gita first when given a free copy by the ISKC (Hare Krishnas) in Brooklyn back in 1978. Then I read all sorts of texts after taking a comparative religion class in high school. I'd love to have this to study it better.
Re:Show HN: Simple Bhagavad Gita Search Web App by cvaidya1986 on Sunday August 13, 2017 @07:28AM (#15002488)
added!
Re:Show HN: Simple Bhagavad Gita Search Web App by the_common_man on Sunday August 06, 2017 @12:53PM (#14942069)
Does this only search the English translation? I tried the famous 'yada yada hi dharmasya' but it was showing some random results.
Re:Show HN: Simple Bhagavad Gita Search Web App by cvaidya1986 on Sunday August 06, 2017 @01:37PM (#14942351)
Ah yes only English translation for now. Ok I will add it!
Re:Show HN: Simple Bhagavad Gita Search Web App by schoen on Sunday August 06, 2017 @02:17PM (#14942557)
I feel like the transliteration issues may be pretty complex! Someone using the site might choose to search for any of

यदा यदा हि धर्मस्य (in Unicode)

yadā-yadā hi dharmasya

yadā yadā hi dharmasya

yadaa yadaa hi dhamasya

yada yada hi dharmasya

If you want to allow search using transliteration, there are a number of interesting algorithmic and non-algorithmic questions about the range of different transliteration mechanisms that people may use.

Also, for a reason that I don't quite understand, people transliterating Sanskrit can be very inconsistent about where they do and don't transcribe spaces. Are the spaces perhaps not present in the original? For example ग्लानिर्भवति might be transcribed as "glānir bhavati" or "glānirbhavati", which may also be treated differently for search purposes.

(I don't actually know any Sanskrit; I'm just interested in linguistics and writing systems.)

Re:Show HN: Simple Bhagavad Gita Search Web App by carlsborg on Sunday August 06, 2017 @11:33AM (#14941691)
Thats fast. Can you comment on the architecture?
Re:Show HN: Simple Bhagavad Gita Search Web App by akgoel on Sunday August 06, 2017 @12:01PM (#14941811)
Less than 1000 verses. You could naively linearly search the whole Gita as a single string.
Re:Show HN: Simple Bhagavad Gita Search Web App by kthakore2 on Sunday August 06, 2017 @11:58AM (#14941795)
Looking at the source. All the text is loaded with the HTML (in a <script> tag), which is filtered using a fuzzy search implementation.

Very simple and fast considering the text doesn't change ;)

Re:Show HN: Simple Bhagavad Gita Search Web App by cvaidya1986 on Sunday August 06, 2017 @01:35PM (#14942340)
Keep it simple :-)
Re:Show HN: Simple Bhagavad Gita Search Web App by cvaidya86 on Sunday August 06, 2017 @10:19AM (#14941422)
I'm planning to add share buttons for twitter and FB. Let me kno if you'd like other features or a mobile app?
Re:Show HN: Simple Bhagavad Gita Search Web App by wavefunction on Sunday August 06, 2017 @10:56AM (#14941544)
Ability to annotate? That's obviously a lot of work though. It could provide context or scholarly opinion/analysis.

Maybe "navigation" buttons so if you find a passage you can click next or previous to see the preceding or subsequent passages.

Re:Show HN: Simple Bhagavad Gita Search Web App by cvaidya1986 on Sunday August 06, 2017 @05:37PM (#14943714)
Hmm annotation is interesting. It could possibly also clutter the user experience. Possibly sharing could enable people to discuss it within their own social networks? I definitely heard a lot about clicking through prev and next passages especially on search result quotes. Thanks for the feedback!
Re:Show HN: Simple Bhagavad Gita Search Web App by cvaidya86 on Wednesday August 16, 2017 @12:48PM (#15028996)
Added navigation!
Re:Show HN: Simple Bhagavad Gita Search Web App by atdt on Sunday August 06, 2017 @11:17AM (#14941628)
Nice work. It would be nice if the citation were logically and visually separated from the body of each verse.
Re:Show HN: Simple Bhagavad Gita Search Web App by cvaidya86 on Monday August 07, 2017 @11:34AM (#14948247)
Like verse then Chapter name and verse number at the bottom right?
Re:Show HN: Simple Bhagavad Gita Search Web App by ramsundhar20 on Sunday August 06, 2017 @02:01PM (#14942482)
Can I help implement a full text search?
Re:Show HN: Simple Bhagavad Gita Search Web App by cvaidya1986 on Sunday August 06, 2017 @02:18PM (#14942574)
What I like about fuzzy search is that if I search something like 'Constant Remembrance' which is a spiritual concept but it doesn't exist in those exact words in the Gita, fuzzy search comes up with a quote quite close to the concept simply because it is fuzzy. How would full text search work? Would it come up with zero results if the search was not precise?
Re:Show HN: Simple Bhagavad Gita Search Web App by bill_rr on Monday August 07, 2017 @10:56AM (#14947915)
Exactly. That's how it should work. I searched "love" and got passages "Lord Krishna [...] grieve" which the search included because of LO (from LOrd) and VE (from grieVE) - no mention at all of "love," so not what I was looking for. Just go with standard search.
Re:Show HN: Simple Bhagavad Gita Search Web App by cvaidya86 on Monday August 07, 2017 @11:33AM (#14948232)
Point taken!