MathGroup Archive 2007

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Completely frivolous use of new v6 Mathematica

  • To: mathgroup at smc.vnet.net
  • Subject: [mg80304] Re: [mg80239] Completely frivolous use of new v6 Mathematica
  • From: danl at wolfram.com
  • Date: Fri, 17 Aug 2007 01:46:32 -0400 (EDT)
  • References: <200708150823.EAA10464@smc.vnet.net>

> Dear MathGroup,
>
> So, my beloved is starting to learn German. We had a bit of fun
> pantomiming
>
> the various prepositions with me, various items of furniture and so on.
> And
>
> then I realised that the new-in-v6 RandomChoice[] function made "instant
>
> random homework sheets" a snap.
>
> Some of the resulting sentences might be either anatomically impossible or
>
> simply uncomfortable, and I haven't handled the plurals properly, but I
>
> couldn't resist sharing.
>
> prepositionList = {"an", "auf" , "bei", "hinter", "vor", "zwischen" ,
>
> "unter" , "über" , "neben", "in"};
>
> nounList = {"Meerschweinchen", "Bär", "Katze" , "Tische", "Decke",
>
> "Kissen" };
>
> fillBlank = " _____ ";
>
> verbList = {" ist ", " sind ", " sitzt "};
>
> TableForm[
>
>   Table[StringJoin[fillBlank, RandomChoice[nounList],
>
> RandomChoice[verbList], RandomChoice[prepositionList], fillBlank,
>
> RandomChoice[nounList]], {30}, {2}],
>
>   TableSpacing -> 3]
>
> //TraditionalForm
>
> Cheers,
>
> Luci

You might have a look at "Data Structures and Efficient Algorithms in
Mathematica" at

http://library.wolfram.com/infocenter/Conferences/321/
Or grab notebook directly at
http://library.wolfram.com/conferences/devconf99/lichtblau/

The last section, "Tree application: A rudimentary parser", has a random
sentence generator (uses a simple LL grammar, for those who care about
such things). You can swipe the grammar and word lists, and alter to
taste.

Daniel Lichtblau
Wolfram Research





  • Prev by Date: Re: Re: Complexity explosion in linear solve
  • Next by Date: Updated gridMathematica and Mathematica Personal Grid Edition now available
  • Previous by thread: Completely frivolous use of new v6 Mathematica commands
  • Next by thread: Re: Completely frivolous use of new v6 Mathematica commands