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

GoldenDict to support looking up words with " in them

General discussion

GoldenDict to support looking up words with " in them

Postby Michael72 » Sun Jun 16, 2013 11:10 am

The GoldenDict does not lookup words with " in them. Instead, it simply finds similar words without quotes and words with " cannot be looked up.

This is true for dictionaries in DICT format.

There's a Hebrew word with quotes in it. When is a Hebrew word with quotes in it this indicate that the word is an
abbreviation. Just as well the point in English.
Example
Ltd. = בע"מ
Michael72
 
Posts: 180
Joined: Tue Mar 12, 2013 1:34 pm

Re: GoldenDict to support looking up words with " in them

Postby Tvangeste » Sun Jun 16, 2013 12:41 pm

It works just fine for me:
Image

Could you please provide a sample dictionary that exhibits this problem for you? A dictionary with a couple of cards would be more than enough.
Tvangeste
 
Posts: 893
Joined: Thu Jun 02, 2011 11:42 am

Re: GoldenDict to support looking up words with " in them

Postby Michael72 » Sun Jun 16, 2013 12:59 pm

Tvangeste wrote:Could you please provide a sample dictionary that exhibits this problem for you? A dictionary with a couple of cards would be more than enough.

My problem only occurs with one dictionary in DICT format.
Here are some words that can be used to test:
אג"ח
מעו"ף
מנכ"ל
מק"מ
סה"כ
סמנכ"ל
עו"ש
פק"מ
רמ"ד
בע"מ
The attached file contains thе dictionary in DICT format that was built by dictfmt with option --index-keep-orig.
See man dictfmt:
Code: Select all
       --index-keep-orig
              When --utf-8 is specified headwords are lowercased and non-alphanumeric  characters
              are  removed  from it before saving to .index file in order to simplify the search.
              When --index-keep-orig option is used fourth column is created  (if  necessary)  in
              .index  file, and contains an original headword which is returned by MATCH command.
              This option may be useful to prevent converting " AT&T" to " ATT" or to keep proper
              nouns with uppercased first letter.
Attachments
hebrusec.tar.gz
Иврит-русский словарь: экономика
(6.87 KiB) Downloaded 967 times
Michael72
 
Posts: 180
Joined: Tue Mar 12, 2013 1:34 pm

Re: GoldenDict to support looking up words with " in them

Postby Tvangeste » Sun Jun 16, 2013 5:21 pm

Got it. We don't handle the 4th column at the moment.

Will fix.
Tvangeste
 
Posts: 893
Joined: Thu Jun 02, 2011 11:42 am

Re: GoldenDict to support looking up words with " in them

Postby Tvangeste » Sun Jun 16, 2013 5:53 pm

Michael72 wrote:The GoldenDict does not lookup words with " in them. Instead, it simply finds similar words without quotes and words with " cannot be looked up.
This is true for dictionaries in DICT format.

Michael, the bug has been fixed, you can build the latest GoldenDict source from the Git repository and try.
Tvangeste
 
Posts: 893
Joined: Thu Jun 02, 2011 11:42 am

Re: GoldenDict to support looking up words with " in them

Postby Michael72 » Mon Jun 17, 2013 6:50 am

Tvangeste wrote:Michael, the bug has been fixed, you can build the latest GoldenDict source from the Git repository and try.

I can not to build. Build latest GoldenDict Finished with error.
Michael72
 
Posts: 180
Joined: Tue Mar 12, 2013 1:34 pm

Re: GoldenDict to support looking up words with " in them

Postby Tvangeste » Mon Jun 17, 2013 12:50 pm

Michael72 wrote:
Tvangeste wrote:I can not to build. Build latest GoldenDict Finished with error.

Whoa!

What Linux version do you use, what uname -a says?
Tvangeste
 
Posts: 893
Joined: Thu Jun 02, 2011 11:42 am

Re: GoldenDict to support looking up words with " in them

Postby Michael72 » Mon Jun 17, 2013 12:55 pm

Tvangeste wrote:What Linux version do you use, what uname -a says?

Code: Select all
$ uname -a
Linux PC-Michael 3.9.0-030900rc4-generic #201303232035 SMP Sun Mar 24 00:44:55 UTC 2013 i686 athlon i686 GNU/Linux

I use Ubuntu 12.10
Code: Select all
$ sudo find / -name stdarg*
[sudo] password for michael:
/usr/include/c++/4.7/tr1/stdarg.h
/usr/lib/gcc/i686-linux-gnu/4.6/include/stdarg.h
/usr/lib/syslinux/com32/include/stdarg.h
/usr/lib/perl/5.14.2/stdarg.ph
/usr/share/man/man3/stdarg.3.gz
Last edited by Michael72 on Mon Jun 17, 2013 1:27 pm, edited 1 time in total.
Michael72
 
Posts: 180
Joined: Tue Mar 12, 2013 1:34 pm

Re: GoldenDict to support looking up words with " in them

Postby Tvangeste » Mon Jun 17, 2013 1:01 pm

Interesting... Did you modify the include paths for gcc/g++ somehow?
Did you define any variables like:
* CPATH
* C_INCLUDE_PATH
* CPLUS_INCLUDE_PATH

For me, the file is located at: /usr/lib/gcc/i686-linux-gnu/4.7/include

Also, try to invoke the following: cpp -v

It should provide a list of all include directories. Among those there should be something like /usr/lib/gcc/i686-linux-gnu/4.7/include

It looks like either your gcc instance is misconfigured or you did something to your environment (redefining some env. variables that affect the search for the headers).
Tvangeste
 
Posts: 893
Joined: Thu Jun 02, 2011 11:42 am

Re: GoldenDict to support looking up words with " in them

Postby Michael72 » Mon Jun 17, 2013 1:31 pm

Tvangeste wrote:For me, the file is located at: /usr/lib/gcc/i686-linux-gnu/4.7/include

Also, try to invoke the following: cpp -v

It should provide a list of all include directories. Among those there should be something like /usr/lib/gcc/i686-linux-gnu/4.7/include

Code: Select all
$ cpp -v
Используются внутренние спецификации.
COLLECT_GCC=cpp
Целевая архитектура: i686-linux-gnu
Параметры конфигурации: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 4.7.2-2ubuntu1' --with-bugurl=file:///usr/share/doc/gcc-4.7/README.Bugs --enable-languages=c,c++,go,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.7 --enable-shared --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.7 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --enable-plugin --enable-objc-gc --enable-targets=all --disable-werror --with-arch-32=i686 --with-tune=generic --enable-checking=release --build=i686-linux-gnu --host=i686-linux-gnu --target=i686-linux-gnu
Модель многопоточности: posix
gcc версия 4.7.2 (Ubuntu/Linaro 4.7.2-2ubuntu1)
COLLECT_GCC_OPTIONS='-E' '-v' '-mtune=generic' '-march=i686'
 /usr/lib/gcc/i686-linux-gnu/4.7/cc1 -E -quiet -v -imultiarch i386-linux-gnu - -mtune=generic -march=i686 -fstack-protector
несуществующий каталог "/usr/local/include/i386-linux-gnu" проигнорирован
несуществующий каталог "/usr/lib/gcc/i686-linux-gnu/4.7/../../../../i686-linux-gnu/include" проигнорирован
порядок поиска для #include "...":
порядок поиска для #include <...>:
 /usr/lib/gcc/i686-linux-gnu/4.7/include
 /usr/local/include
 /usr/lib/gcc/i686-linux-gnu/4.7/include-fixed
 /usr/include/i386-linux-gnu
 /usr/include
Конец списка поиска.
Michael72
 
Posts: 180
Joined: Tue Mar 12, 2013 1:34 pm

Next

Return to General

Who is online

Users browsing this forum: No registered users and 15 guests