I want to add words to android keyboard dictionary programmatically.
Am I correct to assume that speech to text will for a certain word will improve if it is in dictionary
How many words can I add in dictionary 1000, 10,000 or 100,000, is there any offical limit around size of dictionary (in MB)
You are right. If the system knows how the word is written correctly it will then match the spoken word more exactly. Otherwise it will search between the existing words and probably takes something wrong. But the algorithm is allready really strong and precise.
There is no exact number or limit (nothing published officially). It depends on the device storage. But I did a research and will provide it to you:
Way to store a large dictionary
How to achieve a little dictionary
Hope that answers your questions a bit. Cheers! :)
Related
in my Android app I need to select data from a SQLite database. However, I have a search field in which users can type the name of a location. As they may typo this name, I need to be able to draw the relevant records from the database according to this.
For example:
Input: Ferris Whrrl
Actual: Ferris Wheel
It should locate the Ferris Wheel entry correctly despite the typo. I realise that editdist3 is not implemented in Android SQLite. I'd also rather not select the entire database into RAM and loop through all Strings and calculate Levenshtein distance manually as this would be super resource intensive.
Any help will be greatly appreciated!! :)
I think the best thing you can do is to implement an Auto Suggestion function just like all search engines nowadays do.
You could implement a dynamic algorithm that searches and caches values as needed when a new letter is entered. However, if you just operate on the bare metal without the help of any external service you will have resource problems too - depending on the size of your database and other context variables.
Having a proper index will help but I still think to load the all necessary values into an array and search is faster.
Here you need to create an AI system to guess the correct word. I think this is not relevant to SQL or Android.
Or you can use online AI system to guess the correct word.
I am making a framework in order to easily "appify" books.
This framework will need to automatically detect chapter and heading to make a table of contents. The idea is to also be able to easily search through the text and find what you are looking for.
Now what I still need to figure out is:
how to store the data in such a way that I can easily detect the chapters and heading
and still be able to search through the text.
The text that is stored needs to be formatted, so I thought I would store them as HTML or Markdown (which will be translated to HTML). I don't think it would be very searchable if the text is in HTML.
P.S. it does not have to be HTML if there are other more efficient ways to format the text.
Do you really want to do such thing on the device itself?
I can suggest you to use separate sqlite database for every book. With separate tables for table of contents, chapters, summarized keywords of chapters(for faster search) and other service info.
Also here you can find full text search example
Also I recommend you to bring your own sqlite build with your app.
Now lets talk about the main problem of yours - the book scraping.
I have no competency here, I believe this problem is the same as the web sites scraping.
Upd:
Please do not store book contents as HTML, you can store it as markdown for example, it takes less amount of storage, easier to sanitize and you can always apply your styles later
I am working on an android application that will be used possibly by two sets of users. One will operate the app in English language and will enter all the information in English. However, a set of users would like to make the entries in Hindi.
Now my app can be displayed in both languages by having different sets of string.xml file and based on the language being used on phone or some setting in App. But my app will have a lot of forms in which user needs to input values that can be in hindi or english. I am not sure how to handle this. The exact questions will be:
How do I save the data entered in hindi in my database?
If somehow I do just word by word translation, there is a great chance of the meaning being lost. Is there any way to solve this?
I have to create reports based on these entries, if they are in different language, how hard will it be to insert them in database?
I would appreciate some solid pointers if you don't have time or energy to explain everything. Of course some fundamental explanations are most welcome.
By default TEXT fields in Android's sqlite3 are stored as UTF-8. I understand Hindi is encoded with UTF-8 and so is English so saving the text in one or other language shouldn´t be a problem.
Regarding the translation, see this question in SO where there is a discussion about different alternatives: https://stackoverflow.com/questions/17056168/google-translate-or-similar-api-for-android
I'm developing an android app in which we're going to display some mathematics and physics question with multiple-choice answers.
The text of the questions are ready on a Microsoft Office Word .docx format.
The text of the questions usually contains formulas and equations and we want to save them in a SQLite database and access to it on android app.
The real problem is how to manage the displaying part, since to the best of my knowledge, we should manage such complex text with html tags.
There are actually about at least 2000 of these questions and we're after an optimized solutions for the problem.
and I'm a tough guy ! :) just give me some keywords and I'll go get it done.
So, please share your experiences and suggestions.
An easy solution, mentioned in the comments, would be to use MathJAX.
An alternative, if you only have about 2000 formulas, would be to set up TeX on your local machine, generate the formulas, and convert into individual png images.
You could also use HTML+Unicode directly if the formulas are simple.
I would like any suggestions on how to implement a fast autocomplete search box on android.
Useful info:
1) Data will be stored locally on phone memory. No database or network should be needed.
2) There is no restriction on the type of file that will be used. Could be simple text file, XML file, or whatever suits best.
3) The file will contain a large amount of records that are distinguished by a unique ID/CODE.
There will be also a human readable name for the record and a text with more info on the record like
CODE: HUMAN_REPRESENTATION: EXTRA_INFO:
AF32 Orange The orange (specifically, the sweet orange) is the fruit of the citrus species Citrus...
AF33 Apple The apple is the pomaceous fruit of the apple tree...
4) The user will type on the text area the HUMAN_REPRESENTATION string he wants, and he will be shown a list of matching records to select of.
5) While typing he should be given auto-complete suggestions so he would not have to type the exact phrase.
6) The amount of records will be about 15,000.
So which is the best way to store and retrieve data as fast as possible?
What file type would you suggest? Should the data be split into many files? Can I use a specific API?
I would really be thankful for any directions here, as I am new in android development, but experienced in desktop applications.
EDIT :
Since I had no answers in many days, I would like to know if my question is not clear enough or if it has already been answered. Please comment.