Lewis and Short Offline Dictionary for Linux

By bathtime, in 'Latin Language Resources', Mar 21, 2018.

  1. bathtime Member

    This program allows the user to look up Latin words in the Lewis & Short dictionary (full L&S, not elementary).

    Program benefits:
    • Written in C++
    • Open-source (needs to be compiled!).
    • Dictionary and all required files are automatically downloaded.
    • New dictionary indexing function which automatically creates 500 index entries (or more if the user desires, but 500 seems to be the most efficient for me). On my 10 year old spin-drive computer, this program can lookup and find 448 entries per second (this is if the entry is not found; which takes longer as it needs to search the complete index slot).
    • New search and replace algorithm designed by yours truly! :) Allows for faster parsing of the XML text (approx. 3-5x faster than using regex function and 100Kb less space needed for the executable). Supports infinite loop detection and auto-workaround. I lost much of my hair making it, so just be happy and pretend to care if you don't understand what this means. :rolleyes:
    • 55,000+ independent dictionary entries.
    • Lightweight 39,680 Kb executable. Written in <300 lines of code.
    • Less than 0.5mb of memory consumed upon running (term 'ad' searched; a fairly extensive entry). Memory is then released immediately when program exits.
    • New colourized output to make finding information more easy.
    • Definitions are spaced out to make it easier to find what you are looking for.
    • Allows multiple words to be searched at a time.
    • Displays results in a one-by-one realtime fashion; the user could select an infinite number of words and the first definitions would always display with nigh-instant response.
    The code is available https://gist.github.com/bathtime/5581898da581d4b0f3bd9d0a1794ec15.

    Here is a picture of the program:

    [IMG]

    The code is available here:
    https://gist.github.com/bathtime/5581898da581d4b0f3bd9d0a1794ec15

    It can be used in unison with the auto-decliner (internet required), here:
    https://gist.github.com/bathtime/53fcc5c19157011f41d65ab03e457ab2

    This has been updated to find only words contained within the Full L&S dictionary. You should almost never miss a definition if you use it. All definitions that Perseus is able to gather, you should be able to look up; this is the exact same XML dictionary that they use. The decliner also uses the Perseus site to do its job.

    Also, as in the Latin Dictionary app, you can look up an infinite number of entries at once. You could select an entire page if you wanted to, but you may be IP blocked from Perseus, so use with discretion.

    Enjoy! :)
    Last edited by bathtime, Mar 21, 2018
    Quasus likes this.
  2. Abbatiſſæ Scriptor Senex

    • Civis Illustris
    It was quite enough trouble for me to learn to uſe the Perſeus Project verſion.:eek:
    bathtime likes this.
  3. bathtime Member

    Much of the work was done for me. For instance, I couldn't find the Perseus file for the dictionary on their site, but I did find it on somebody elses github site.

    For anyone interested, I implimented new b-tree indexing code (which I found online) to speed things up. This program can now look up 10000-100000 words a second.

    I'll not be working on it for a while until I get a new computer (spin-drive failed). Right now, I'm using a custom usb Debian installation with 1.5G of harddrive space, so not enough to handle all the extra stuff easily. There are many things I would like to touch up and add.

Share This Page

 

Our Latin forum is a community for discussion of all topics relating to Latin language, ancient and medieval world.

Latin Boards on this Forum:

English to Latin, Latin to English translation, general Latin language, Latin grammar, Latine loquere, ancient and medieval world links.