matlab - Split word and check spelling error within article -


I want to see the spelling error within an uncle, I have 100 articles, to see if the spelling error No, if an error occurs then the word return is 1 and 0. I want to divide this word into words, then just check. I have done all this here, but the problem is that I could not see the spelling error of the split word. However, I can check with

  deliberate_mistake = 'tabel'; Output: Suggestion =  
  'table'  

checkSpelling.m file

/ P>

 < Code> function suggestion = check spelling (word) h = actxserver ('word.application'); H.Document.Add; Correct = H. Check Keyword (word); If true suggestions = []; % Return empty if spelled correctly is% if wrong and suggest, then return them to a cell array if h.GetSpellingSuggestions (word). Count & gt; 0 count = h.GetSpellingSuggestions (words). Calculation; For I = 1: Count Suggestion {i} = h.GetSpellingSuggestions (words) .emem (i) .get ('name'); If at the end% is wrong but there are no suggestions, then return it: Suggestion = 'no suggestions'; To remove end-end% Server H. Quuit  

f20.m file

 for  i = 1: 1 data2 = fopen (strcat ('data ', Int2str (i),' '),' r ') CharData = fread (data2,' * char ')'; % Read the text file and store the data in the four data fclose (Data 2); Word = regexp (charadata, '', 'partition') [size data b] = size (word); Suggestion = check spelling (word)  

Your input is a cell array, your own single String input works for me.


Comments

Popular posts from this blog

import - Python ImportError: No module named wmi -

Editing Python Class in Shell and SQLAlchemy -

c# - MySQL Parameterized Select Query joining tables issue -