Page 1 of 1

matching expressions ...

PostPosted: Sun Jan 10, 2010 2:32 pm
by zigzaggazgiz
Hi everybody,

GoldenDict is a really cool dictionary!! Congrats!!!

I'd like to know if it is possible to match expressions (by using Scan Popup) as we do using babylon?

For example: let's suppose we are reading a text which contains the phrase: "... they will have to deal with cold spell". If we select the "spell" word, the GoldenDict only shows the meaning of "spell", instead of showing the meaning of expression "cold spell" as well ... The same for "take off", "get rid of", etc, etc, etc ...


Thank you all!!
Fabio

Re: matching expressions ...

PostPosted: Sun Jan 10, 2010 2:37 pm
by ikm
That's quite hard to implement, unfortunately.

Re: matching expressions ...

PostPosted: Thu Jan 14, 2010 10:28 am
by zigzaggazgiz
Ok, it could be quite hard to implement, but think about the competitive edge of GoldenDict ...

To the best of my knowledge, there is no dictionary for linux with such a nice feature!!

cheers

Re: matching expressions ...

PostPosted: Mon Mar 29, 2010 10:05 pm
by fast_rizwaan
>For example: let's suppose we are reading a text which contains the phrase: "... they will have to deal with cold spell". If we select the "spell" word, the GoldenDict only shows the meaning of "spell", instead of showing the meaning of expression "cold spell" as well ... The same for "take off", "get rid of", etc, etc, etc ...

How about if a user selects a full sentence with many words say the same sentence "they will have to deal with cold spell" instead of showing "No translation for they will have to deal with cold spell was found in group All."; the error dialog/not found dialog should suggest:

Let there be 2 rows: which allows single and multi-words in the "not found" dialog.
[ref]they[/ref] [ref]will[/ref] [ref]have[/ref][ref]to[/ref][ref]deal[/ref][ref]with[/ref][ref]cold[/ref][ref]spell[/ref] <-first line with single words
like clickable words ->they will have to deal with cold spell

Second line should "Search the index will all possible "Adjacent" combinations like word1+word2, word2+word3, word3+word4, word4+word5, word5+word6, etc... and output "successfully found"words into second line like:

have to deal with cold spell <- only three possible adjacent words could be found in the index, others they+will, will+have, etc.. are not found in the index.. so ignored!

If the dictionary articles has "multi word" entries, those too should be presented for quicker lookup. Just "grepping" "matching" all possible "adjacent words" with index, will do the trick.

So, the output of "not found dialog" should be like:
-------------------
No translation for they will have to deal with cold spell was found in group All. Try:

they will have to deal with cold spell
have to deal with cold spell

-------------------

and the colde would be like:
Code: Select all
No translation for [b]they will have to deal with cold spell[/b] was found in group[b] All[/b]. [b] Try: [/b]

[b][u]they[/u] [u]will[/u] [u]have[/u] [u]to[/u] [u]deal[/u] [u]with[/u] [u]cold[/u] [u]spell[/u][/b]
[b][u]have to[/u] [u]deal with[/u] [u]cold spell[/u] [/b]


In this way Golden Dictionary can really help the user get the informaton quickly and efficiently...

Re: matching expressions ...

PostPosted: Tue Mar 30, 2010 1:49 pm
by ikm
Since this feature is indeed very useful, I've just implemented it. You can try it out in Git. Thanks.

Re: matching expressions ...

PostPosted: Tue Mar 30, 2010 5:15 pm
by fast_rizwaan
ikm wrote:Since this feature is indeed very useful, I've just implemented it. You can try it out in Git. Thanks.

Beautiful, wonderful, awesome!!!

Thank you ikm! You are a good programmer!! :D