How to validate an ENGLISH WORD entered by the user - ANDROID - java

I'm developing a word-building game (similar to scrabble) that takes a user's input and checks whether it is a valid word or not. First, I thought of using an offline dictionary database with SQLite.
But later I realized that there's a built-in dictionary (that predicts the words that are being entered in the text fields).
Is there any way that I can use this built-in dictionary to validate words entered in my app?

Perhaps what you are searching Android Spelling Cheker, here is an example.

Related

How to compare words/sounds in Android Studio?

im looking for the best (and fastest) way to record a short audio input (like one word) from mobile microphone and then compare it with a long real time audio input (like speech) - from the same person and look for word occurrence.
I tried many approaches like using typical SpeechRecognizer, but there were many problems, like there is actually no way to guarantee that it will give reasults fast enough or run for many minutes.
VoiceRecognition Android Taking Too Long To React
Long audio speech recognition on Android
I dont really need to recognize which words is the person saying, only to be able to find occurences with some deviation.
It would be nice if you could give me some suggestions of how to do so.
EDIT: Im basically looking for a way to control the app with sound inputed from a user
Here are a couple ideas to consider.
(1) First, create a set of common short sounds that will likely be part of the search. For example, perhaps all phonemes, or a something like a set of all consonant-vowel combinations, e.g., bah, bay, beh, bee, etc. and the same with cah, cay, keh, key, etc.
Then, run through the "long" target sample with each, indexing the locations where these phonemes are found.
Now, when the user gives you a word, first compare it to your set of indexed phoneme fragments, and then use the matches to focus your search and test in the long target file.
(2) Break your "long" file up into fragments and sort the fragments. Then compare the input word to the items in the sorted list, using something like a binary search algorithm.

Android, Java - Fix an OCR-ed word to a valid english dictionary word in real time

My application involves scanning through the phone camera and detecting text. The only words that my application is concerned with is valid english words.
I have a list of ~354,000 valid english words that i can compare my scanned word with.
Since my application continuously detects text, i need this functionality to be very very fast. I have applied Levenshtein Distance technique. For each word, I:
Store the contents of the text file into an Arraylist<String> using Scanner
Calculate Levenshtein Distance of the word with each of the 354k words
Return the word corresponding to the minimum distance value
The problem is that it is very very slow. Without applying this, my app manages to ocr more than 20 words in around 70 to 100 millisecond. When i include this fixing routine, my app takes more that 1 full minute (60000ms) for a single word.
I was wondering if this technique is even suitable, given my case. If not, what other tested way should i go with? Any help would be greatly appreciated. I know this is possible, looking at how android keyboards are able to instantly correct our incorrectly typed words.
Other Failed endeavors:
Jaro distance. (similar)
Android internal SpellCheckerSession service. (doesn't fit my case. Result receipt via a callback is the issue)
My Solution that works:
I created a MYSQL table and uploaded the list of valid english words in it. It solves all the problems addressed in the question.
Here is my Android Application for reference:
Optical Dictionary & Vocabulary Teacher

Android Word Validation

I am developing an Android word game like Scrabble. I need to check if the word a user enters is correct (aka is a String entered by a user equal to an existing word).
All that Android seems to offer is a spell-checking api which provides you with some suggestions based on your input. This just seems silly to me because these suggestions are actual words and there seems to be nothing in the api that is able to check if a word exists in it's dictionary.
I understood that there are some other web based solutions for my problem but I can't assume these web-based solutions will work forever and that users have a stable network connection. Also, my game is time based so the only proper solution would be a local one.
So, (how) can I validate a word (String) locally on Android?
inb4 it can't be done properly and wordnik is the best solution for me
Load your dictionary into SQLite and use a query to determine if it's valid.

Designing word frequency for a word-meaning test

I am developing a personalized android program that includes "story-reading" and "Word-Meaning Quizes". First of, user takes a test to specify his level. Then he starts reading stories(of that level). He can look up a word from the pop-up dictionary while reading and this word is registered to db as "seen". After reading some stories, he goes to take a word quiz. This is where my question comes forward. Word-meaning questions must be asked to the user from the words he had seen in the stories and words he hasnt seen of his level. How can I calculate word-meaning question frequency?
I am using Item Response Theory to estimate user's level of cognition.

how to compare two wav files?

Let's say, we have taken a mic input (say "hello") and stored it as a wav file. Then we take the same input "hello" from the mic. Now if the two are identical then we trigger an action. So how do we compare and check the raw data of the two inputs?
Update: Let's suppose we want to have the exact word being spoken amd not being interested about who said the word since that would prevent making the program/software. User independent. In other words: we need to extarct the exact being spoken from the mic input of the user and then check if it was identical to any of the given predefined commands which will in turn trigger an action.
So in other words we need the followng:
extract the exact words spoken by the speaker/user.
compare/check if the word spoken by the user is same or identical to any of the words stored predefined.
So how do we get about our business?
Simple comparison of WAV files is not going to work. What you need is some kind of voice print software. But most of the Java speech processing software out there seems to be more focused on speech recognition (figuring out what was said) than on voice prints (who said it).

Categories