Mathematica Stack Exchange is a question and answer site for users of Mathematica. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is it possible to check the spelling of strings? Strings are often used to show messages in my user interfaces, and I would like to have an automatic checking.

Methods that export all the strings to a different notebook are also fine (if it can help). In this case, extracting things like \n would be a plus.

share|improve this question
Not quite clear on exactly what you're looking for, but something like (Pick[#, DictionaryLookup[#, IgnoreCase -> True] & /@ #, {}]) &[ StringSplit["this is a yourr stringg"]] will return all words in the string not found in the MM dictionary. – ciao Jan 11 '14 at 2:50
Spontaneously I feel that if you want to work with your strings like that you shouldn't embed them in your code. Use the dictionary data structure or some other way to store your strings so that you can easily retrieve them for export. – C. E. Jan 11 '14 at 9:44
@rasher I simply mean to be able to find spelling mistakes in the middle of input cells, by means of the menu "check spelling". When running it on a notebook, it finds all my mistakes, except inside input cells... Most likely to avoid finding all the user variables, name of functions, etc. To this I agree. But most strings in my code should have some checking. – P. Fonseca Jan 11 '14 at 12:35
Yes, I figured that out, but after comment edit time-out. As you're aware, there's no built-in for that. You could use the notebook read functions and parse it yourself, or if acceptable, use some 'marker' comments around desired strings, and then just parse the notebook for what they bracket. I think the best way (biased - it's what I do) is to have the strings in a list, indexing to them where I use them. That way, I can run the quick dictionary check against the list entries. – ciao Jan 11 '14 at 12:39
@Anon I sometimes do gather all my strings together. But the notion of Manipulate is simplicity and fast... And so, when I do a simple Manipulate in the middle of a meeting (I really do!) I'm not thinking on data structures... And a quick check before putting it into the big screen would be nice. For know, passing all to MS Word is a little to cumbersome... – P. Fonseca Jan 11 '14 at 12:41

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.