Visual Basic Developers Guide to ASP and IIS: Build Powerful Server-Side Web Applications with Visual Basic. (Visual Basic Developers Guides)

Let's now look at some samples of the algorithm using a variety of different text inputs.

In the first example, a set of quotes from Albert Einstein was used as the training file. This training set consists of 13 quotes with 377 unique words. See Listing 10.9 for example products from the Einstein corpus .

Listing 10.9: Emitted Text from Albert Einstein Quotes.

[root@plato bigram]./bigram -f einstein Imagination is shipwrecked by language and other symbolic devices. [root@plato bigram]./bigram -f einstein We all ruled in the authority of imagination.

 

Each of the generated quotes from Listing 10.9 sound reasonable and is actually thought provoking.

Consider now generated text from a corpus of Albert Camus' Absurd Man (see Listing 10.10).

Listing 10.10: Emitted Text from Albert Camus' Absurd Man.

[root@plato bigram]./bigram -f absurdman It is to speak only truth that is the breath of future actions. [root@plato bigram]./bigram -f absurdman "My field" said Goethe "is time and unfolds in a disservice to make.

 

Finally, consider a Markov Chain that was created from two separate works (see Listing 10.11). The first work is the poem "Ode to Joy" by anonymous, and the second from book one of The Odyssey by Homer.

Listing 10.11: Emitted Text from a Collection of Works.

[root@plato bigram]./bigram -f combo From chaos and beasts and hostile shores! From the woods the hunter strayed.

 

Категории