Documentation ¶
Overview ¶
minimal_wordcount is an example that counts words in King Lear, by William Shakespeare.
This example is the first in a series of four successively more detailed 'word count' examples. Here, for simplicity, we don't show any error-checking or argument processing, and focus on construction of the pipeline, which chains together the application of core transforms.
Next, see the wordcount pipeline, then the debugging_wordcount pipeline, and finally the windowed_wordcount pipeline, for more detailed examples that introduce additional concepts.
Concepts:
- Reading data from text files
- Specifying 'inline' transforms
- Counting items in a PCollection
- Writing data to text files
No arguments are required to run this pipeline. It will be executed with the direct runner. You can see the results in the output file named "wordcounts.txt" in your current working directory.