New user registration is currently disabled due to spam abuse / Регистрация новых пользователей в настоящее время приостановлена из-за злоупотреблений спаммерами

The full text search state?

General discussion

The full text search state?

Postby The waiter » Mon Jan 30, 2012 12:26 pm

I just want to ask about the state of Full text search engine. In past I read someone was already written a piece of code for it, but as I download every new release I still can not see this feature. Can you inform me about its state?

Thanx
The waiter
 
Posts: 53
Joined: Sat Jun 18, 2011 9:26 pm

Re: The full text search state?

Postby The waiter » Sat Mar 03, 2012 1:19 pm

Hmm, no answer after weeks. Maybe it was told already about the state somewhere in this forum. Sorry for that.
I have seen this request among issues. I just wanted to feel the hope for the future. As I saw many people hold other dictionary apps because of full text searching. I of course can not force anyone to something. This is a free project. I want me only inform if full text code is so hard to program?
The waiter
 
Posts: 53
Joined: Sat Jun 18, 2011 9:26 pm

Re: The full text search state?

Postby freefall » Fri Mar 09, 2012 6:33 am

hope full text search will be available on GD soon and that will make GD even more powerful . after all, even an Android app called Bluedict can do keyword search in full dict text
freefall
 
Posts: 10
Joined: Tue Jul 19, 2011 5:38 am

Re: The full text search state?

Postby embar » Fri Dec 14, 2012 8:39 am

See issue:https://github.com/goldendict/goldendict/issues/8

Babiloo also realised full-text search. Source code here:
http://bazaar.launchpad.net/~babiloo-de ... runk/files
(older: http://code.google.com/p/babiloo/source/browse/)

I found a description, how to add full-text in GoldenDict for DSL format:
http://lisok3ajr.wordpress.com/2012/09/ ... oldendict/

Maybe this program (or its ideas) could help to create fast full-text search:
http://gitorious.org/dumbfts/mainline/trees/master
embar
 
Posts: 13
Joined: Sat Nov 20, 2010 11:43 am

Re: The full text search state?

Postby embar » Thu Apr 18, 2013 9:51 pm

Good news.
There is some plugin to enable GoldenDict full-text-search for StarDict type dictionaries . (Potencial is for SlowoDictionary.)

But you must have more recent version than GoldenDict 1.0.1: GoldenDict 1.0.1 not support external program as plugin. The more recent version (Early Access Builds) can be found via https://github.com/goldendict/goldendict/wiki/_pages . But openSUSE Linux users can use this „1-click install“ link.

You also need Python 2.7 version (Python 3.x may not work). Windows users can download it from http://www.portablepython.com/ . Today the newest Python2 version is 2.7.3.2 and is here. For plugin your need only minimal installation of Python ( ~50MB, not ~500MB).

- You must download GoldenDict_plugin_for_full-text-search_in_StarDict_dictionaries.zip and extract it.
- start GoldenDict ;
- press F3 key;
- select tab „Progams“
- press „Add...“
- Select type "html"
- write name of pseudo-dictionary
- Enable it.
- write as command line
Code: Select all
python /path/to/full-text-search.py "%GDWORD%" "/path/to/dictionary/dictionary_prefix"

(dictionary_prefix means name of dictionary file, but witout .dict, without .ifo, witout .dict.dz)
Example for Linux:
Code: Select all
python2 "/home/user/.goldendict/GoldenDict_plugin_for_full-text-search_in_StarDict_dictionaries/full-text-search.py" "%GDWORD%" "/usr/share/stardict/dic/LIKIT EKZ 2008/LIKIT EKZ 2008"

Example for Windows:
Code: Select all
"F:\Portable Python 2.7.3.2\App\python.exe" "F:\GoldenDict\GoldenDict_plugin_for_full-text-search_in_StarDict_dictionaries\full-text-search.py" "%GDWORD%" "F:\GoldenDict\content\dic\LIKIT EKZ 2008\LIKIT EKZ 2008"


- try search text like „|word“ („|“ is mandatory)

- If you want always use this pseudo-dictionary, then change "%GDWORD%" to "|%GDWORD%" ( this will add „|“ before search word).

Tested in openSUSE 12.3 Linux with Python 2.7.3.
To avoid conflict between both installed Python 2 and 3, execute python2

Tested in Windows 7 with Python 2.7.3.2.

Fox text highlighting using BeautifulSoup, but this module is plugin archive („bs4“ folder).
But you can use simpler script full-text-search-simpler.py (and not full-text-search.py) if you want work faster or if you have problems with BeautifulSoup.

--
For SlowoDictionary, we need incorporate http://bazaar.launchpad.net/~babiloo-de ... tionary.py

Image
Image
embar
 
Posts: 13
Joined: Sat Nov 20, 2010 11:43 am

Re: The full text search state?

Postby chigre-GD » Tue May 07, 2013 11:13 pm

I've done it following the instructions but without success.
OS: Windows 8
GD Version: #738
chigre-GD
 
Posts: 18
Joined: Wed Oct 12, 2011 2:33 am

Re: The full text search state?

Postby embar » Wed May 08, 2013 4:47 am

And What error you see then try to search with "|word"?
Or you don't see you new pseudo-dictionary?

Or maybe your dictionary is very big, so it takes much more time to scan it and process it?
You may use full-text-search-simpler.py (and not full-text-search.py) to work faster.
embar
 
Posts: 13
Joined: Sat Nov 20, 2010 11:43 am

Re: The full text search state?

Postby embar » Wed May 08, 2013 5:08 am

The error you may see:

If you made error in path to Python executable, you may don't see any error or may see this:
Query error: The program has returned exit code 255.

If you path to Python executable contains space character, must quote path like "C:\Program Files\Python27\python.exe"


If you try use Python3 (and not Python 2.7):
Query error: The program has returned exit code 1. Traceback (most recent call last): File "GoldenDict_plugin_for_full-text-search_in_StarDict_dictionaries/full-text-search-simpler.py", line 105, in <module> print(do_search(args.word,args.file)) File "GoldenDict_plugin_for_full-text-search_in_StarDict_dictionaries/full-text-search-simpler.py", line 72, in do_search text=text.decode(sys.getfilesystemencoding()) AttributeError: 'str' object has no attribute 'decode'



If you made error in path to python script:
Query error: The program has returned exit code 2. python: can't open file 'GoldenDict_plugin_for_full-text-search_in_StarDict_dictionaries/full-text-search-simpler.py': [Errno 2] No such file or directory

If you path contains space character, must quote path.


If you made error in path to StarDict dictionary, you may see:
Query error: The program has returned exit code 1. Traceback (most recent call last): File "GoldenDict_plugin_for_full-text-search_in_StarDict_dictionaries/full-text-search-simpler.py", line 105, in <module> print(do_search(args.word,args.file)) File "GoldenDict_plugin_for_full-text-search_in_StarDict_dictionaries/full-text-search-simpler.py", line 74, in do_search dict = pystardict.StarDict(dictionary_file_prefix) File "GoldenDict_plugin_for_full-text-search_in_StarDict_dictionaries/pystardict.py", line 426, in __init__ DictionaryType.__init__(self, filename_prefix) File "GoldenDict_plugin_for_full-text-search_in_StarDict_dictionaries/dictionary.py", line 71, in __init__ self.load(self.__filepath) File "GoldenDict_plugin_for_full-text-search_in_StarDict_dictionaries/pystardict.py", line 454, in load raise DictFormatError(e) dictionary.DictFormatError: Exception('.ifo file does not exists',)

For example, if you dictionary is
"F:\GoldenDict\content\dic\LIKIT EKZ 2008\LIKIT EKZ 2008.ifo"
you should specify path to it as
"F:\GoldenDict\content\dic\LIKIT EKZ 2008\LIKIT EKZ 2008"
(without .ifo)
embar
 
Posts: 13
Joined: Sat Nov 20, 2010 11:43 am

Re: The full text search state?

Postby chigre-GD » Wed May 08, 2013 9:08 am

embar, thanks for your explanation.
--------------------------------------------
Code: Select all
"F:\Portable Python 2.7.3.2\App\python.exe" "C:\Program Files\GoldenDict\FULLTEXT\full-text-search.py" "%GDWORD%" "F:\Dropbox\CHIGRE DIZIONARI\[STARDICT]_IT\il_Sabatini_Coletti\il_Sabatini_Coletti"

--------------------------------------------
PYTHON: F:\Portable Python 2.7.3.2\App\python.exe
DICT: F:\Dropbox\CHIGRE DIZIONARI\[STARDICT]_IT\il_Sabatini_Coletti\il_Sabatini_Coletti (.ifo, .dict.dz, .idx, .bmp)
Full-text-search.py: C:\Program Files\GoldenDict\FULLTEXT\full-text-search.py
--------------------------------------------
I've tried to search keyword like "|ser",
the programma doesn't show any error...
it just doesn't show anything, I don't know why...
--------------------------------------------
chigre-GD
 
Posts: 18
Joined: Wed Oct 12, 2011 2:33 am

Re: The full text search state?

Postby embar » Wed May 08, 2013 1:43 pm

I think that you have very big dictionary. Scanning with this plugin is not as fast as with StarDict program.
For example, I have dictionary with 60000 articles; scanning of articles takes ~12 seconds.
embar
 
Posts: 13
Joined: Sat Nov 20, 2010 11:43 am


Return to General

Who is online

Users browsing this forum: No registered users and 34 guests