help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Additional dict server for dictionary.el


From: Xah
Subject: Re: Additional dict server for dictionary.el
Date: Thu, 30 Oct 2008 15:27:13 -0700 (PDT)
User-agent: G2/1.0

On Oct 29, 2:17 pm, Sven Bretfeld <sven.bretf...@gmx.ch> wrote:
> Hello to all
>
> I'm just discovering dictionary.el.
>
> I cannot find instructions on how to add a dict server additionally to
> the default dict.org. There is a server providing a dictionary I would
> really like to use, but I don't want to lose access to dict.org. To
> complicate things, that server uses port 2629 instead of the usual
> 2628. This is, of course, not working:
>
> (setq dictionary-server "indica-et-buddhica.org")
> (setq dictionary-port 2629)
>
> because, then, only the dictionaries on that server are available.
>
> What can I do?

i also use “dictionary.el”, but i haven't several others. In
particular, i note there's a http://sourceforge.net/projects/dictem .
There are several others last discussed here, you might try emacswiki.

If you run customize-group, then “dictionary”, you'll find there's a
field to change the server and port. Not sure it can add servers as
you asked.

i'd like to set the default dict to just WordNet, 1913 Websters, and
Moby Thesaurus. However, its documention doesn't mention how.

if you run customize-group, there's default dict you can set. But it's
not clear what's the available dicts, what's the proper keyword for
them, and what's the proper syntax to use.

When doing the “[Select Dictionary]” in dictionary-mode, among the
lists are:

wn: WordNet (r) 2.0
moby-thes: Moby Thesaurus II by Grady Ward, 1.0

so, apparently, “wn” and “moby-thes” are the keywords, however, it
seems to be mising the 1913 Webster. (i want the unmodified 1913
Webster, not the “The Collaborative International Dictionary of
English” (gcide) that's derived from it. (The “1913 Webster” are often
available from other open source dict clients, such as Omni dict on
the Mac.))

also, i find it annoying that when you lookup a word, it switches the
cursor to the newly created dict panel. This is contrary to
conventional behavior.

Note: i have:

(global-set-key (kbd "<kp-0>") 'dictionary-lookup-definition)
(global-set-key (kbd "<S-kp-0>") 'lookup-word-definition-in-w3m)
(global-set-key (kbd "<C-kp-0>") 'lookup-wikipedia)

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

there are few problems with open source dictionaries...

• for example, it requires to use the singular form to find the right
word. (e.g. try search for “chairs”) This is a major pain.

• problem with phonetic system. e.g. it often uses some idiosyncratic
made-up pronunciation system (typical of American dicts) as opposed to
IPA. (For a comparison of major US dicts on pron system, see: English
Phonetics at http://xahlee.org/Periodic_dosage_dir/bangu/voksa_sinxa_ciste.html
) Worse is that ascii is used to emulate pronunciation symbols, makes
it hard to understand.

• Problem with accented letters. e.g. you can't lookup words with a
accented letter such as touché, précis, élan, lycée, passé, ... etc.

• also, often there are 2 results from “The Collaborative
International Dictionary of English”, apparently of the same version
but they differ slightly in content. e.g. lookup “precis”, then it
gives:

«From The Collaborative International Dictionary of English v.0.48
[gcide]:

Pr'ecis \Pr['e]`cis"\ (pr[asl]`s[=e]"), n. [F. See Precise.]
   A concise or abridged statement or view; an abstract; a
   summary.
   [1913 Webster]

>From The Collaborative International Dictionary of English v.0.48
[gcide]:

precis \precis\ v. t.
   To make a precis of.
   [WordNet 1.5]
»

• Of course, the definition quality and vocabulary size is often not
comparable to commercial dicts.

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

occationally i use wiktionary
( http://en.wiktionary.org/wiki/Wiktionary:Main_Page )
particularly good if you are looking up chinese chars for its
traditional/simpified version, english translation, code points, uses
in Japanese and Korean, classification of input under several input
systems.

e.g. http://en.wiktionary.org/wiki/反

does wiktionary support server request?

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

i have some code for looking up references that might be of interest.

(defun lookup-wikipedia ()
"Look up the word's in Wikipedia.\n
This command generates a url for Wikipedia.com and switches
you to browser.
If a region is active (a phrase), lookup that phrase."
 (interactive)
 (let (myword myurl)
   (setq myword
         (if (and transient-mark-mode mark-active)
             (buffer-substring-no-properties (region-beginning)
(region-end))
           (thing-at-point 'symbol)))

  (setq myword (replace-regexp-in-string " " "_" myword))
  (setq myurl (concat "http://en.wikipedia.org/wiki/"; myword))
  (shell-command (concat "open -a opera " myurl))
   ;; (browse-url myurl)
   ))


the following lookup word def in a commercial dict based on the web,
using w3m interface. You can modify it so it fires up a browser
instead. (advantage using real browser that you get voice recoded
pronunciation, easier to read, and faster load etc.)

(defun lookup-word-definition-in-w3m ()
"Look up the word's definition in a emacs-w3m.\n
If a region is active (a phrase), lookup that phrase."
 (interactive)
 (let (myword myurl)
   (setq myword
         (if (and transient-mark-mode mark-active)
             (buffer-substring-no-properties (region-beginning)
(region-end))
           (thing-at-point 'symbol)))

  (setq myword (replace-regexp-in-string " " "%20" myword))
  (setq myurl (concat "http://www.answers.com/main/ntquery?s=";
myword))
  (w3m-browse-url myurl)
   ))

See also:
• A Review of 3 Dictionaries
http://xahlee.org/Periodic_dosage_dir/bangu/dict_review.html

• English vocabulary compendium
http://xahlee.org/PageTwo_dir/Vocabulary_dir/vocabulary.html

  Xah
∑ http://xahlee.org/

reply via email to

[Prev in Thread] Current Thread [Next in Thread]