Below is what I have in my Array…
myArray = {"about","name","dsafasdf","fix"};
I want to find what are English words in this array.
Below should be output:
Words found are as below
about
name
fix
Thanks in advance!!!
Any example or link would work!!!
Actually I want to implement TextTwist Game. I have found possible words, however I would like to check whether the String found is WORD/ Grammar or not…
Update 1
Please don’t advice me to create a file and put words in it and then search word in this file… It will be the WORSTEN program….
You need a library with all english words. And you have to check every word.
And this is a similar question. And if you don’t want to use a java library you should find a text file containing all words or something like that and write your own method to find a word. Note that your text file should be sorted so you could find word with divide and conquer algorithm. Otherwise searching will take very long time.
EDIT:
And you also have to remember that names are not “English words” as says @amit. An they can meet everywhere in text. You should check if word starts with upper case letter and isn’t on the start of sentence.