Menu

#1597 Dictionary: Oxford dictionary online API support

5.8
closed-fixed
5
2024-02-02
2021-10-20
No

Oxford Languages(formerly Oxford Dictionaries) provide OD API and users can use it for free (with limit) and for transaction based tariff.
https://languages.oup.com/products/api/

It is great if OmegaT supports OD API for all the languages OD provides.

Now OmegaT's DictionaryFactory API don't provide an interface for online dictionary.
There are two options;

  1. Add OD API dictionary lookup feature to OmegaT.
  2. Add online dictionary registration API .

Discussion

  • Hiroshi Miura

    Hiroshi Miura - 2021-10-20
     
  • Hiroshi Miura

    Hiroshi Miura - 2021-10-24

    There is another issue than registration API.
    When implementing the plugin, I found readArticlePredicated(word) method called for each word. This preventing HTTP API communication performance. Because API is synchronously called, API client cannot call web API asynchronous or pipeline way, It forced to loop open socket + connection + send get method + close connection then parse it.

    omegat-oxford-dictionaries prototype plugin performs very slow. Because of the reason explained above and web server query/response delay, it takes about 30 second to show 12 dictionary entries.

    I'd like to request an new interface to pass a list or set of words to query, and accept articles asynchronously to solve the issue. For example

    IDicitonary interface:

    void requestArticles(Integer requestId, List<Strings> words, boolean strictMatch);
    

    DictinoaryManager class:

    void putArticles(Integer requestId, Map<String, List<DictinaryEntry>> articles);
    

    Dictionary drivers can handle the request in their own way.
    Disk based driver may query indexes and sort order by index, then read articles.
    Network based driver may send bulk request to the server and parse result in threading.

     

    Last edit: Hiroshi Miura 2021-10-24
  • Hiroshi Miura

    Hiroshi Miura - 2022-10-02
    • status: open --> open-fixed
    • Group: 5.7 --> 5.8
     
  • Hiroshi Miura

    Hiroshi Miura - 2022-10-02

    Merged to master as 1098b4f05e

     
  • Hiroshi Miura

    Hiroshi Miura - 2024-02-02
    • status: open-fixed --> closed-fixed
     

Log in to post a comment.