This project started when I've begun to learn a Nordic language and I realized that the only good dictionaries are those online but, and don't laugh, I have no 3G Internet connection on my Android smart phone (because I am stingy when comes to money) and it would be nice if I would find some freeware (see? I'm stingy again) offline Android multi-language dictionary. Those that I've found were either limited in functionality, speed or content. So I've chose to write my own application instead.
Lexicon is a Android application that allows you to browse a dictionary without Internet connection. It was written with multi-language support in mind, multi-dictionaries, simple but effective user interface.
Because Android provides API for accessing a Sqlite databases, the choice of using Sqlite as the application backend came naturally. This choice made possible that a 46000 words dictionary search,using a Sql LIKE matching-pattern, to take only half of a second.
There are plenty of offline-dictionary programs made available out there (see Google Play) so why do we need a new one?
I think that few of the reasons could be the following:
- this project has opened its sources so anyone can contribute to it (make it better)
- the program it's free and also free of adds; I believe that everyone likes that
- the dictionaries are very well designed, a cooperation between the Institute for language and folklore and Kungliga Tekniska högskolan
- nevertheless there are over 20 available dictionaries
Works with Android SDK
At the moment when this wiki was written I've tested this application with the Android SDKs mentioned below. It might works with other versions too, though.
Note that if you would like to use the application *without OCR functionality* you have to fork the project and to remove the Tesseract API dependency and to comment the code from getTextFromOCRBitmap method from Main.java, as I've explained here.
Without OCR functionality
- >= 2.1 (API 7)
With OCR functionality
- >= 2.3.3 (API 10)
Features
- multi-language UI support
- multi-dictionary support (English,Albanian, Azerbaijani, Amharic, Arabic, Bosnian, Croatian, Finnish, Greek, Macedonian, Northern Kurdish, Pashto, Persian, Russian, Roma (Arli), Romanian, Serbian, Somali, Spanish, Swedish, South Kurdish, Tigrinya, Turkish, and Vietnamese turabdinska)
- in-place search (or only on demand)
- search using SQL pattern-matching
- scalable search result list (you can choose to show only the TOP 100 results); the list provides also a translation preview
- searching even deeper within the inflections of word (eg: you search for the participle done, it finds the infinitive do)
- customizable level of details that are shown in the detail page of the word
- word ussage statistics (keep the track of the most used words; the data is not use for the moment, but in the future it could be proved valuable)
- application/dictionary live update, independent by Android Marketplace (requires Internet connection)
- integrated OCR functionality
- take a photo of a text/page using the integrated camera of your device
- crop the image around the word you want to identify (using the crop function of your camera)
- do the OCR recognition to get that word (using the Google Tesseract OCR library), then search the dictionary for it
License
This project is licensed under the Apache License, Version 2.0.
Other dependencies
- tess-two project, a fork of tesseract-android-tools
Dictionary sources
The English Swedish dictionary is provided by Folkets lexicon, it can be used under the Distributed Creative Commons Attribution-Share Alike 2.5 Generic license.
All other available dictionaries are exclusively provided by Lexin and should be used according with their terms of use.
The project home page
The project and its code is open and free for everyone, its home page is hosted at bitbucket.org.
Screenshots
Because a pictures says more than 1000 words I made few screen shots to see the little droid at work.
You can install as many dictionaries you want. Anyway, once installed you can switch between them easily.
Every dictionary is a small SQLite database so everything you query will be fast. By the way, it chews 23000+ words like a breeze:
The application is thought to work with any kind of weird language (don't get me wrong, but what I can't read it's weired to me):
Maybe it's time to see the main window, otherwise you might think to leave quickly this page:
We have menus too:
Because we talk about the menus and because settings seems more interesting, let's see what settings one might change:
We have more:
If you want to tune the level of details:
But what are those details, anyway:
While a new dictionary is installing you know what's going on:
Once a pal asked me if it's possible to make a photo instead of typing the word because he does not have the Arabic keyboard/symbols and he want to check what a specific Arabic word means:
So my little droid knows now to take a photo, to crop the image around that word:
...another little OCR droid knows to convert the weired image to text so a picture became a text:
Now, if you think that this article was interesting don't forget to rate it. It shows me that you care and thus I will continue write about these things.
Eugen Mihailescu
Latest posts by Eugen Mihailescu (see all)
- Dual monitor setup in Xfce - January 9, 2019
- Gentoo AMD Ryzen stabilizator - April 29, 2018
- Symfony Compile Error Failed opening required Proxies - January 22, 2018
How can I create a new language file for use with your app?
The application is meant to use a SQLite dictionary language file, not to create one. Nevertheless there are over 20 available dictionaries out there (English,Albanian, Azerbaijani, Amharic, Arabic, Bosnian, Croatian, Finnish, Greek, Macedonian, Northern Kurdish, Pashto, Persian, Russian, Roma (Arli), Romanian, Serbian, Somali, Spanish, Swedish, South Kurdish, Tigrinya, Turkish, and Vietnamese turabdinska). These dictionaries are very well designed, a cooperation between the Institute for language and folklore and Kungliga Tekniska högskolan (Sweden). Unfortunately not all the dictionaries are provided as XML files but they still exists there (as a web application where you can specify the searched word in the source language then target language and it translate it) BUT what you can do is to enquiry the web application for all words that you may think of and to get as response their corresponding translation.
For instance http://lexin.nada.kth.se/lexin/service?searchinfo=to,swe_fin,katt will use the source Swedish word "katt" and the target Finish language and will provide a response HTML file with everything about that translation.
If you parse that web page then you can extract the definition. So you will end up by building a XML language file. Using that XML language file all you have to do is to create a SQLite database with the same structure like those dictionaries provided by default.
Hey, why should you bother with that? I've already created an application for you that does all these things:
I guess that nadaparser is the application you need.
Anyway, there might be situations where the online The People's dictionary does not have your target language so none of those mentioned applications will help you to create such a SQLite dictionary file. If that is the case then I see only two options:
So how can I get a ready-made sqlite database so I can input by hand or import data into it from a file?
So, if you download/compile the lexikon2sqlite project's source code then you'll got a tool that allows you to the SQLite database (which actually will be one of those many dictionaries that you might install/use in the lexikon application).
This feature is especially the one you are looking for:
So just compile that project, you will get a console application. Run it! It will provide a help for you so that you will know what parameter to use (it's very simple!). Use that XML dictionary and you'll get the SQLite script that you can use it to create the database or, depending on the options you specify, it will create the final database:
Anyway, all these information you can find on each project Wiki page, I've tried to describe as best as I could all these features. Moreover, the code is well documented so if you are a programmer (I hope you are 🙂 ) then it will help you understand each block of code.
It all sounds exciting, however being a stingy guy like you, I don't have eclipse and have not purchased premium key for Aide for Android. Can't compile a decent app without it... I know you've done the hard yards already, however, this stingy guy would like to ask for a ready made apk available for download already.... please let me know if there is...
Thank you in advance.
I can compile the application for you, that's not a problem. Just let me know what dictionary do you need (eq. English -> Spanish or Spanish -> English) and I will try in my spare time to prepare that for you. By the way, I don't have any Fijian or Fiji Hindi dictionary, so if you will need something exotic like this all that I can do for you is just to give you a prepared but empty SQLite dictionary database which you will populate with data by yourself.
PS: Eclipse is free and if you want to develop/compile applications for Android that's free too. All you need is Google's Android SDK which can be plugged-in Eclipse via Eclipse ADT plugin (read more).
I would be most appreciative if you would do that for me. I have a Fijian Dictionary in pdf format that I will be populating the sqlite database with. It isn't that comprehensive but it sure is a starting point.
Again thank you in advance.
Ok, these days I will make available a pre-compiled copy of these tools on the project's download page. Please subscribe to this page or follow me on Twitter so that you get notified.
I will certainly subscribe right after I post this.
Thanks
First of all I really appreciate for sharing the code
I successfully compiled and ran the project but have a prob
when the app runs it does not find any dic file, so popup a dialogue for downloading the dictionary files, I can download it but immediately after downloading the app tries to extract the content to sd card and unexpectedly dialogue appears again and want to does not find any dic file and wants to download it again
i tried many time would you pls let me handle it
BR
I will take a look at this, please fill an bug report at https://bitbucket.org/eugenmihailescu/lexicon/issues/new
Thanks
>> i tried many time would you pls let me handle it
If you can track down the problem you are free to fix it. I always encourage the people to take initiative and fix the things (software,hardware,etc) for themselves. That you you will understand better the product, will be able to fix it in minutes and to create enhanced versions of it.
the app not working properly.upon installation it error dialog pops up "no dictionary installed do u want to install one" upon installation only dict.xml is created in downloads folder but of no use.
The application does not come like a pre-packaged one-click install application. Instead it was made available as an open-source project that you can download, compile and run on whatever device supports it. If you find a bug or something that needs to be improved you are welcome to contribute. Furthermore, there are other applications connected to this one that allow you to grab (by parsing) other dictionaries, to compile them (as .sqlite databases) and use them. Please read the entire Wiki page of the project (https://bitbucket.org/eugenmihailescu/lexicon/wiki/Home).
after compilation only the above mentioned problem occured.can u please explain me the application constant i.e host url,root url tht u have used.Do u hav dictionary stor
after compilation only the above mentioned problem occured.can u please explain me the application constant i.e host url,root url tht u have used.Do u hav dictionary stored in dropbox???
There are some pre-compiled dictionaries (like SV_EN, EN_SV, SV_AR, SV_SO, SV_FA) available on my Google Drive. However, if need other dictionary than that you should consult the Dictionary parser section on the project's Wiki page.
where i can see source code for the app ??
The project source code link is mentioned in article at the section The project home page: https://bitbucket.org/eugenmihailescu/lexicon
why it can't to import in android eclipse ??
It can be imported in Eclipse, nevertheless its source code was created with the aid of Eclipse. Just take a look at this file:
https://bitbucket.org/eugenmihailescu/lexicon/raw/31a0846e44c428a770c7adee1f71f3a834c5c33b/lexicon/.project
how to import project in the eclipse witout OCR
Obviously you should fork the project source code and create your own version of the project where you can, for instance, to decouple entirely the OCR from the project. This means even to remove those application menus that refers the OCR option.
Thnk
I have one proble about you app it can't compile becouse your program have error syntak n when i download apk file.. compile in my devise same to not can running.. how about it??
I have no idea what could be the problem. If you are a long-time programmer you should already know that there are gazillions reason for a program which does not compile. As a programmer you have the skills and tools to identify the error and hopefully to fix it. The source are free (open) so you are on your own 🙂
Try to replace the value of DOWNLOAD_ROOT (Main.java) with the following address:
https://www.dropbox.com/sh/xoojt1qfrb29r9q/AAAFKFmnVVPX1mLjvNE6moBta?dl=0
Hi, the url private static final String DOWNLOAD_ROOT = "http://dl.dropbox.com/u/80414534"; cannot be reached which causes an exception !?! can you help me
Hi,
The old address does not work anymore. Just replace DOWNLOAD_ROOT with the following address:
https://www.dropbox.com/sh/xoojt1qfrb29r9q/AAAFKFmnVVPX1mLjvNE6moBta?dl=0
the problem talk "Project 'lexicon' is missing required Java project: 'tess-two'"
what about it ?
Tesseract is a dependency required if you want to use the OCR functionality. It was explained on the project's wiki page: https://bitbucket.org/eugenmihailescu/lexicon/wiki/WithoutOCR
If you still the Tesseract OCR functionality then grab the tess-two Java code from https://github.com/rmtheis/tess-two and use it as explained above.