I made the following list:
ELCo = Alphabet["English"];
Characters[ToLowerCase[WordList[Language -> "English"]]];
Select[%, SubsetQ[ELCo, ToLowerCase[#1]] &];
LPr = Map[Sort, Map[DeleteDuplicates, %]];
This list LPr
takes the English words and separates them into their characters while getting rid of duplication and capital letters. Now I make another list, basically the first five letters of the English language:
letters = Alphabet[][[1 ;; 5]];
Now I want to look at LPr
and select all those words that are made of letters "a"
, "b"
, "c"
, "d"
, or "e"
or the combination of them.
I wonder how one would to this, I tried:
tmp = Table[SubsetQ[letters, LPr[[i]]], {i, Length[LPr]}];
and then,
Pick[LPr, tmp]
but this does not give me all those required words.
LPr
does not contain any reference to original words anymore so what exactly is a desired output? Words or yourLPr
entires? $\endgroup$LPr
enteries that contains"a"
,"b"
,"c"
,"d"
, or"e"
or the combination of them. $\endgroup$Pick
returns. So I guess you should explain why do you think your result is not correct. $\endgroup$LPr
you see for instance the second entry is{"a","h"}
this element has"a"
but was not picked. As I mentioned I need the return to contain contains"a"
or"b"
or"c"
or"d"
or"e"
or the combination of them. $\endgroup$