Code covered by the BSD License  

Highlights from
dictionary

3.75

3.8 | 4 ratings Rate this file 14 Downloads (last 30 days) File Size: 1.72 KB File ID: #5408

dictionary

by Fahad Al Mahmood

 

05 Jul 2004 (Updated 08 Jul 2004)

Checks the spelling status of word(s) and returns synonyms if found.

| Watch this File

File Information
Description

[status,synonyms] = dictionary(text);
status = dictionary(text);

text: word(s) separated by a single space.
status: returns '1' if word(s) exist in dictionary or '0' otherwise.
synonyms: an array of synonyms of word(s) or otherwise returns a message 'No Synonyms Found!' or 'Incorrect Spelling!'.

Examples:
[status,synonyms] = dictionary('peddler');
[status,synonyms] = dictionary('walk match ground');
status = dictionary('hysteria');

Acknowledgements

The author wishes to acknowledge the following in the creation of this submission:
spellcheck

MATLAB release MATLAB 6.5 (R13)
Other requirements Microsoft Word
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (5)
09 Jul 2004 Brett Shoelson

Nicely done! Would be nicer still if it were more flexible. For instance, a second argument to select the language (UK English, anyone?) would be helpful.

11 Jul 2004 Sander Stepanov

it does not work
the eroor is
[status,synonyms] = dictionary('walk match ground');
??? Invoke Error, Dispatch Exception:
Source: Microsoft Word
Description: Word cannot start the thesaurus.
Help File: C:\Program Files\Microsoft Office\OFFICE11\1033\wdmain11.chm
Help Context ID: 605e.

Error in ==> E:\Sander_From_20March\A_My_Matlab_Examples\dictionary.m
On line 45 ==> X = invoke(Doc,'SynonymInfo',words{n});

>>

11 Jul 2004 Fahad Al Mahmood

Mr. Sander Stepanov,

Looks like from the error you included in your review that there is a problem with the Microsoft Word you have not being able to start the thesaurus. I would recommend that you try to type those words (walk match ground) in a Word document and try to run the thesaurus and get the synonyms directly from MS Word. If for some reason you could not get the synonyms or start the thesaurus then the problem is obviously with the Word settings or components installed. I'm not sure if part of the problem is that you are using (Office11) and I'm using (Office10).

29 Dec 2006 Joseph n

Well done.

20 Jul 2011 Alexander Wallar

This function seems to work incredibly well. Thank you very much for your contribution!

Please login to add a comment or rating.
Tag Activity for this File
Tag Applied By Date/Time
strings Fahad Al Mahmood 22 Oct 2008 07:26:19
spelling Fahad Al Mahmood 22 Oct 2008 07:26:19
spell check Fahad Al Mahmood 22 Oct 2008 07:26:19
meaning Fahad Al Mahmood 22 Oct 2008 07:26:19
synonym Fahad Al Mahmood 22 Oct 2008 07:26:19
microsoft word Fahad Al Mahmood 22 Oct 2008 07:26:19
activex Fahad Al Mahmood 22 Oct 2008 07:26:19
calculate Cristina McIntire 06 Feb 2009 11:38:13
average angle Cristina McIntire 06 Feb 2009 11:38:13
near Cristina McIntire 06 Feb 2009 11:38:13
microsoft word Venna 25 Aug 2010 01:48:33
activex Venna 25 Aug 2010 01:48:58

Contact us at files@mathworks.com