Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum > General > > "DictionaryLookup for a pair of words"

Post Reply:
Name:
Email Address:

Please send email when my message is replied to.

Url (optional):
Subject:
Message: view original message?
Attachment (optional):
Please answer this:3+4 =



Original Message (ID '39103') By Mark:
In Response To 'Re: Re: Re: Re: DictionaryLookup for a pair of ...' --------- Thank you again, Bill. Now it nearly works: bindex = Map[{Sort[Rest[Characters[#]]], #} &, DictionaryLookup[RegularExpression["b......"]]]; mindex = Map[{Sort[Rest[Characters[#]]], #} &, DictionaryLookup[RegularExpression["m......"]]]; matches = Intersection[Map[First, bindex], Map[First, mindex]]; Map[{Cases[bindex, {#, _}], Cases[mindex, {#, _}]} &, matches] This returns more than I wanted since it includes, for example {barbels marbles} where the words have the correct first letters but their other six letters are anagrams of one another. However remove Sort and it does work: bindex=Map[{Rest[Characters[#]],#}&,DictionaryLookup[RegularExpression["b......"]]]; mindex=Map[{Rest[Characters[#]],#}&,DictionaryLookup[RegularExpression["m......"]]]; matches=Intersection[Map[First,bindex],Map[First,mindex]]; Map[{Cases[bindex,{#,_}],Cases[mindex,{#,_}]}&,matches] Thank you