Thursday 8 December 2011

Matlab Find Dictionary word or not Example code | Matlab Extract Synonyms of the word

Here we give some example code of extract Synonym word from corresponding word and find the word is dictionary word or not.It very simple.Following operations are used to extract Synonym word from corresponding word in matlab.
  1. Create The activex object to the word.(Note:you have must install word on your PC).This creation using actxserver function.
  2. Invoke these object on matlab with "SynonymInfo" properties using on invoke function.In invoke function give another one Input is Finding Synonym word.
  3. Finally we extract Synonym words on Invoke object using get function.
In below example explain these above notions.
clc
clear all
close all
warning off
text = 'language';
Doc = actxserver('Word.Application');
X = invoke(Doc,'SynonymInfo',text);
Synonyms = get(X,'MeaningList');

if in above Synonyms variable is empty then give word is not a dictionary word. Here Input text is language out put synonyms are 'verbal communication', 'tongue', 'words'.Below we attach these output.




Kindly Bookmark and Share it:

No comments:

Post a Comment

Related Posts Plugin for WordPress, Blogger...