Sergey Pavlov
Sergey Pavlov

Reputation: 147

Get the full word by few letters, API?

I have a problem: for example, we have a few letters: b,o,s. It's a letters from some word and they go in the same order as in word (in this case word is books). But, of course, it may be another word.

So I need to get the list of the possible words, for example, lenght = 10. How can I do these? I feel, that the problem is close to crossword solving, so may be there is some services with API?

Upvotes: 0

Views: 132

Answers (1)

Louis Ricci
Louis Ricci

Reputation: 21106

  • Get yourself a word list https://www.google.com/?gws_rd=ssl#q=english+word+list
  • Put the words in a database table CREATE TABLE Words(Word VARCHAR(64) PRIMARY KEY) ... INSERT INTO Words(Word) VALUE(UPPER(@word)) ...
  • Query the table with a LIKE query SELECT Word FROM Words WHERE Word LIKE 'B%O%S'

Upvotes: 0

Related Questions