Machine learning algorithms for correct words formation from jumbled words
Can Machine learning algorithms solve the input dataset of jumbled words and form the correct words from them?
Topic bag-of-words word
Category Data Science
Can Machine learning algorithms solve the input dataset of jumbled words and form the correct words from them?
Topic bag-of-words word
Category Data Science
from itertools import permutations
import string
permutation_list = []
s = "BOX"
a = string.ascii_letters
p = permutations(s)
# Create a dictionary
d = []
for i in list(p):
# Print only if not in dictionary
if (i not in d):
d.append(i)
permutation_list.append(''.join(i))
print(''.join(i))
import nltk
nltk.download('words')
from nltk.corpus import words
for word in permutation_list:
print(word.lower() in words.words())
output -
BOX True
BXO False
OBX False
OXB False
XBO False
XOB False
Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.