Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

Dear Community members,

I am thinking about an interactive machine to teach a school child to write difficult words correctly. As a first step I need a collection of words. I will select a pool of words from this collection. Then I will use the pool to make the machine.

My question is: is there a way to get the words with Mathematica? A constraint is that I need German words.

share|improve this question
add comment

4 Answers

You could use the function DictionaryLookup. At least at my machine, it supports German but I'm not sure whether this depends on the installation or not. Just look it up in the documentation.

share|improve this answer
1  
I don't think it depends on installation since it grabs the data from Wolfram servers –  ssch Nov 14 '12 at 16:54
add comment

It might be overkill, but with:

DictionaryLookup[{"German", All}]

you get a list of every German word. To be a bit more precise, you could then narrow things with string searches, i.e. DictionaryLookup[{"German", "a" ~~ ___ ~~ "b"}] gets you a list of words that begin with a and end with b. Full documentation is here.

share|improve this answer
add comment

I suggest you build your own kind of database using sources from the web and copy&past the content into a text file. Afterwards you can use the Import functionalities Mathematica offers.

A possible source I think is appropriate: (you may have to filter some words out by hand which you think could be to difficult for your student)

http://www.duden.de/schwierige-woerter

Extracting words from webpages is usually straightforward after examining the structure of the page a little bit. Here is a concrete example:

page = Import["http://www.duden.de/schwierige-woerter", "XMLObject"];

Cases[page, 
 XMLElement[
   "span", {"class" -> "field-content"}, {XMLElement["a", _, {s_String}]}] :> s, Infinity]
share|improve this answer
    
I hope you don't mind that I added some example code for extracting the words. Please edit to your liking. –  Szabolcs Nov 14 '12 at 17:03
    
Very neat:) I never thought about handling the issue programmatically. I must admit compared to your method copy&paste is rather crude. –  Sascha Nov 14 '12 at 17:11
    
Actually for a simple list like this one you're right that copy-paste is much faster ... I made a small palette for these kinds of tasks a long time ago, it's here (search for "tabular" on the page---I should update that page some day ...). It works fine with this page and TSV paste, I just needed to filter the alphabet (A, B, C...) from the list. –  Szabolcs Nov 14 '12 at 18:36
    
Thank you very much. Could you please comment on the role of parameters in the operator? Just to understand, how this code works. –  Alexei Boulbitch Nov 15 '12 at 9:34
add comment

If you need a more comprehensive list of German words you could download a file such as this, unzip it and then load it with Import.

The default Mathematica German dictionary contains 76155 words, whereas the dictionary available with the link above contains 1328614 words.

share|improve this answer
1  
ideal for school children - make them work! –  cormullion Nov 14 '12 at 19:29
add comment

Your Answer

 
discard

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.