Microblogi: A very long article Wikipedia article on the orientation of toilet paper [7. kes klo 22:52] [V]

Tiistai, 29. kesäkuuta 2010

DICT-NetMOT Gateway Updated

Käännös: [ Google ]

Kategoriat: [ ATK ]

The DICT-NetMOT Gateway I wrote some time ago suffered from an annoying bug: when the list of dictionaries at the source website is updated, the gateways uses the wrong dictionary (not-so-long story short: dictionaries are identified by index, and when the indexes change, it looks up in the wrong one). This has happened one time too many it seems, because I decided to fix this and get the gateway to download the list of dictionaries instead of using a hard-coded list. Currently the list is downloaded only on startup, so if it changes, the gateway needs to be restarted. If I am motivated, I may get it to reload automatically after a given timeout. EDIT: I was motivated, I just changed it; it now reloads after 1 day. (2010-06-29).

Short names for dictionaries, used as DICT identifiers, are generated automatically, so this may not work properly for dictionary names I haven't seen yet (there is a risk of short name collision, there is not checking against it).

Dictionaries which should be looked up by default can be specified with a (hard-coded) list of regexps against which the dictionary's long name is matched.

Also, some unidentified time ago, I updated the gateway to use the new NetMOT interface. I noticed that it started to use AJAX to provide the user with a list of suggestions while typing in the query box. I then used this feature to add support for ‘prefix’ and ‘glob’ matching strategies (‘prefix’ is mandatory in the DICT protocol, so before that the implementation was incomplete, but who cares?).

[ Postattu 29. kesäkuuta 2010 klo 08.08 | ei kommenttia | ]

Trackback osoite

https://weber.fi.eu.org/blog/Informatique/dict_netmot_gateway_updated.trackback

Kommentit

Ei kommenttia

Lisää kommentejä

Voit käyttää seuraavat HTML tagit: <p>, <br>, <em> <strong>, <pre>. URL:t jotka alkaavat http://-lla muuttuvat automatisesti hyperlinkkeiksi.

(harkinnanvarainen)
(harkinnanvarainen)


Tallena nimeni ja URL/s-posti ensi kerralle

7 - 5 =