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

< Previous Comment | Next Comment >Help | Reply To Comment | Reply To Topic
Author Comment/Response
Mark
09/27/12 12:00pm

In Response To 'Re: Re: Re: Re: DictionaryLookup for a pair of ...'
---------
Thank you, Bill

The code is now:

bword=Map[{Rest[Characters[#]],#}&,DictionaryLookup[RegularExpression["^b......$"]]];
mword=Map[{Rest[Characters[#]],#}&,DictionaryLookup[RegularExpression["^m......$"]]];
matches=Intersection[Map[First,bword],Map[First,mword]];
Map[{Cases[bword,{#,_}],Cases[mword,{#,_}]}&,matches]


The results are correct except that BUCK UP and MUCK UP is returned because space counts as a character. It would be better to remove all punctuation before searching (and get BUCKS UP and MUCKS UP) but that is probably rather difficult unless we do so in the dictionary itself. I have used a better dictionary than the inbuilt one and I get 128 cases (the inbuilt one only gave 74 cases).



URL: ,

Subject (listing for 'DictionaryLookup for a pair of words')
Author Date Posted
DictionaryLookup for a pair of words Mark 09/26/12 07:53am
Re: DictionaryLookup for a pair of words Forum Modera... 09/26/12 11:47am
Re: Re: DictionaryLookup for a pair of words Bill Simpson 09/26/12 3:03pm
Re: Re: Re: DictionaryLookup for a pair of words Mark 09/26/12 4:35pm
Re: Re: Re: Re: DictionaryLookup for a pair of ... Bill Simpson 09/26/12 7:57pm
Re: Re: Re: Re: Re: DictionaryLookup for a pair... Mark 09/27/12 01:04am
Re: Re: Re: Re: DictionaryLookup for a pair of ... Bill Simpson 09/26/12 8:41pm
Re: Re: Re: Re: Re: DictionaryLookup for a pair... Mark 09/27/12 12:00pm
Re: DictionaryLookup for a pair of words Mark 09/26/12 2:09pm
< Previous Comment | Next Comment >Help | Reply To Comment | Reply To Topic