From 34b6a0c426a5e6bd4fde79ab2c6b117fe2ec96f8 Mon Sep 17 00:00:00 2001 From: Bartosz Zablocki Date: Wed, 7 Jun 2023 12:20:38 +0000 Subject: [PATCH 01/16] WiP: Day Zero Tutorial --- .../get-started/try-apache-beam-yaml.ipynb | 525 ++++++++++++++++++ 1 file changed, 525 insertions(+) create mode 100644 examples/notebooks/get-started/try-apache-beam-yaml.ipynb diff --git a/examples/notebooks/get-started/try-apache-beam-yaml.ipynb b/examples/notebooks/get-started/try-apache-beam-yaml.ipynb new file mode 100644 index 000000000000..22d12e1505f0 --- /dev/null +++ b/examples/notebooks/get-started/try-apache-beam-yaml.ipynb @@ -0,0 +1,525 @@ +{ + "nbformat": 4, + "nbformat_minor": 0, + "metadata": { + "colab": { + "name": "Try Apache Beam - Python", + "version": "0.3.2", + "provenance": [], + "collapsed_sections": [], + "toc_visible": true, + "include_colab_link": true + }, + "kernelspec": { + "name": "python2", + "display_name": "Python 2" + } + }, + "cells": [ + { + "cell_type": "markdown", + "metadata": { + "id": "view-in-github", + "colab_type": "text" + }, + "source": [ + "\"Open" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "source": [ + "#@title ###### Licensed to the Apache Software Foundation (ASF), Version 2.0 (the \"License\")\n", + "\n", + "# Licensed to the Apache Software Foundation (ASF) under one\n", + "# or more contributor license agreements. See the NOTICE file\n", + "# distributed with this work for additional information\n", + "# regarding copyright ownership. The ASF licenses this file\n", + "# to you under the Apache License, Version 2.0 (the\n", + "# \"License\"); you may not use this file except in compliance\n", + "# with the License. You may obtain a copy of the License at\n", + "#\n", + "# http://www.apache.org/licenses/LICENSE-2.0\n", + "#\n", + "# Unless required by applicable law or agreed to in writing,\n", + "# software distributed under the License is distributed on an\n", + "# \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n", + "# KIND, either express or implied. See the License for the\n", + "# specific language governing permissions and limitations\n", + "# under the License." + ], + "outputs": [], + "metadata": { + "cellView": "form" + } + }, + { + "metadata": { + "id": "lNKIMlEDZ_Vw", + "colab_type": "text" + }, + "cell_type": "markdown", + "source": [ + "# Try Apache Beam - Python\n", + "\n", + "In this notebook, we set up your development environment and work through a simple example using the [DirectRunner](https://beam.apache.org/documentation/runners/direct/). You can explore other runners with the [Beam Capatibility Matrix](https://beam.apache.org/documentation/runners/capability-matrix/).\n", + "\n", + "To navigate through different sections, use the table of contents. From **View** drop-down list, select **Table of contents**.\n", + "\n", + "To run a code cell, you can click the **Run cell** button at the top left of the cell, or by select it and press **`Shift+Enter`**. Try modifying a code cell and re-running it to see what happens.\n", + "\n", + "To learn more about Colab, see [Welcome to Colaboratory!](https://colab.sandbox.google.com/notebooks/welcome.ipynb)." + ] + }, + { + "metadata": { + "id": "Fz6KSQ13_3Rr", + "colab_type": "text" + }, + "cell_type": "markdown", + "source": [ + "# Setup\n", + "\n", + "First, you need to set up your environment, which includes installing `apache-beam` and downloading a text file from Cloud Storage to your local file system. We are using this file to test your pipeline." + ] + }, + { + "metadata": { + "id": "GOOk81Jj_yUy", + "colab_type": "code", + "outputId": "d283dfb2-4f51-4fec-816b-f57b0cb9b71c", + "colab": { + "base_uri": "https://localhost:8080/", + "height": 170 + } + }, + "cell_type": "code", + "source": [ + "# Run and print a shell command.\n", + "def run(cmd):\n", + " print('>> {}'.format(cmd))\n", + " !{cmd}\n", + " print('')\n", + "\n", + "# Install apache-beam.\n", + "run('pip install --quiet apache-beam')\n", + "\n", + "# Copy the input file into the local file system.\n", + "run('mkdir -p data')\n", + "run('gsutil cp gs://dataflow-samples/shakespeare/kinglear.txt data/')" + ], + "execution_count": 1, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + ">> pip install --quiet apache-beam\n", + "\n", + ">> mkdir -p data\n", + "\n", + ">> gsutil cp gs://dataflow-samples/shakespeare/kinglear.txt data/\n", + "Copying gs://dataflow-samples/shakespeare/kinglear.txt...\r\n", + "/ [1 files][153.6 KiB/153.6 KiB] \r\n", + "Operation completed over 1 objects/153.6 KiB. \r\n", + "\n" + ] + } + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + ">> \n", + "echo 'pipeline:\n", + " transforms:\n", + " - type: ReadFromText\n", + " path: data/*\n", + " - type: WriteToText\n", + " path: output.txt\n", + " input: ReadFromText' > pipeline.yaml\n", + "\n", + "\n" + ] + } + ], + "source": [ + "run('''\n", + "echo 'pipeline:\n", + " transforms:\n", + " - type: ReadFromText\n", + " path: data/*\n", + " - type: WriteToText\n", + " path: output.txt\n", + " input: ReadFromText' > pipeline.yaml\n", + "''')" + ], + "metadata": { + "collapsed": false + } + }, + { + "cell_type": "code", + "execution_count": 5, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + ">> cat pipeline.yaml\n", + "pipeline:\r\n", + " transforms:\r\n", + " - type: ReadFromText\r\n", + " path: data/*\r\n", + " - type: WriteToText\r\n", + " path: output.txt\r\n", + " input: ReadFromText\r\n", + "\n" + ] + } + ], + "source": [ + "run('cat pipeline.yaml')" + ], + "metadata": { + "collapsed": false + } + }, + { + "cell_type": "code", + "execution_count": 6, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + ">> python -m apache_beam.yaml.main --pipeline_spec_file=pipeline.yaml\n", + "Traceback (most recent call last):\r\n", + " File \"/usr/local/google/home/bzablocki/.pyenv/versions/3.8.9/lib/python3.8/runpy.py\", line 194, in _run_module_as_main\r\n", + " return _run_code(code, main_globals, None,\r\n", + " File \"/usr/local/google/home/bzablocki/.pyenv/versions/3.8.9/lib/python3.8/runpy.py\", line 87, in _run_code\r\n", + " exec(code, run_globals)\r\n", + " File \"/usr/local/google/home/bzablocki/code/beam/sdks/python/apache_beam/yaml/main.py\", line 63, in \r\n", + " run()\r\n", + " File \"/usr/local/google/home/bzablocki/code/beam/sdks/python/apache_beam/yaml/main.py\", line 28, in run\r\n", + " parser.add_argument(\r\n", + " File \"/usr/local/google/home/bzablocki/.pyenv/versions/3.8.9/lib/python3.8/argparse.py\", line 1368, in add_argument\r\n", + " action = action_class(**kwargs)\r\n", + "TypeError: __init__() got an unexpected keyword argument 'description'\r\n", + "\n" + ] + } + ], + "source": [ + "run('python -m apache_beam.yaml.main --pipeline_spec_file=pipeline.yaml')" + ], + "metadata": { + "collapsed": false + } + }, + { + "cell_type": "code", + "execution_count": null, + "outputs": [], + "source": [ + "run('cat output.txt')" + ], + "metadata": { + "collapsed": false + } + }, + { + "cell_type": "markdown", + "source": [ + "# Minimal word count\n", + "\n", + "The following example is the \"Hello, World!\" of data processing, a basic implementation of word count. We're creating a simple data processing pipeline that reads a text file and counts the number of occurrences of every word.\n", + "\n", + "There are many scenarios where all the data does not fit in memory. Notice that the outputs of the pipeline go to the file system, which allows for large processing jobs in distributed environments." + ], + "metadata": { + "collapsed": false + } + }, + { + "metadata": { + "id": "oUqfqWyMuIfR", + "colab_type": "code", + "outputId": "52de90fb-abcc-46c7-bccc-5b0416beb50c", + "colab": { + "base_uri": "https://localhost:8080/", + "height": 1173 + } + }, + "cell_type": "code", + "source": [ + "import apache_beam as beam\n", + "import re\n", + "\n", + "inputs_pattern = 'data/*'\n", + "outputs_prefix = 'outputs/part'\n", + "\n", + "# Running locally in the DirectRunner.\n", + "with beam.Pipeline() as pipeline:\n", + " (\n", + " pipeline\n", + " | 'Read lines' >> beam.io.ReadFromText(inputs_pattern)\n", + " | 'Find words' >> beam.FlatMap(lambda line: re.findall(r\"[a-zA-Z']+\", line))\n", + " | 'Pair words with 1' >> beam.Map(lambda word: (word, 1))\n", + " | 'Group and sum' >> beam.CombinePerKey(sum)\n", + " | 'Format results' >> beam.Map(lambda word_count: str(word_count))\n", + " | 'Write results' >> beam.io.WriteToText(outputs_prefix)\n", + " )\n", + "\n", + "# Sample the first 20 results, remember there are no ordering guarantees.\n", + "run('head -n 20 {}-00000-of-*'.format(outputs_prefix))" + ], + "execution_count": 2, + "outputs": [ + { + "output_type": "stream", + "text": [ + "WARNING:root:Deleting 1 existing files in target path matching: -*-of-%(num_shards)05d\n" + ], + "name": "stderr" + }, + { + "output_type": "stream", + "text": [ + ">> head -n 20 outputs/part-00000-of-*\n", + "==> outputs/part-00000-of-00001 <==\n", + "(u'canker', 1)\n", + "(u'bounty', 2)\n", + "(u'provision', 3)\n", + "(u'to', 438)\n", + "(u'terms', 2)\n", + "(u'unnecessary', 2)\n", + "(u'tongue', 5)\n", + "(u'knives', 1)\n", + "(u'Commend', 1)\n", + "(u'Hum', 2)\n", + "(u'Set', 2)\n", + "(u'smell', 6)\n", + "(u'dreadful', 3)\n", + "(u'frowning', 1)\n", + "(u'World', 1)\n", + "(u'tike', 1)\n", + "(u'yes', 3)\n", + "(u'oldness', 1)\n", + "(u'boat', 1)\n", + "(u\"in's\", 1)\n", + "\n", + "==> outputs/part-00000-of-00003 <==\n", + "wrath: 3\n", + "nicely: 2\n", + "hall: 1\n", + "Sure: 2\n", + "legs: 4\n", + "ten: 1\n", + "yourselves: 1\n", + "embossed: 1\n", + "poorly: 1\n", + "temper: 2\n", + "Dismissing: 1\n", + "Legitimate: 1\n", + "tyrannous: 1\n", + "turn: 13\n", + "gold: 2\n", + "minds: 1\n", + "dowers: 2\n", + "policy: 1\n", + "I: 708\n", + "V: 6\n", + "\n", + "==> outputs/part-00000-of-00004 <==\n", + "retinue: 1\n", + "stink: 1\n", + "beaks: 1\n", + "Ten: 1\n", + "riots: 2\n", + "Service: 1\n", + "dealing: 1\n", + "stop: 2\n", + "detain: 1\n", + "beware: 1\n", + "pilferings: 1\n", + "swimming: 1\n", + "The: 124\n", + "Been: 1\n", + "behavior: 1\n", + "impetuous: 1\n", + "Thy: 20\n", + "Tis: 24\n", + "Soldiers: 7\n", + "Juno: 1\n", + "\n" + ], + "name": "stdout" + } + ] + }, + { + "metadata": { + "id": "k-HubCrk-h_G", + "colab_type": "text" + }, + "cell_type": "markdown", + "source": [ + "# Word count with comments\n", + "\n", + "Below is mostly the same code as above, but with comments explaining every line in more detail." + ] + }, + { + "metadata": { + "id": "x_D7sxUHFzUp", + "colab_type": "code", + "outputId": "44c926df-aa4a-4bea-9247-27c7cb537717", + "colab": { + "base_uri": "https://localhost:8080/", + "height": 1173 + } + }, + "cell_type": "code", + "source": [ + "import apache_beam as beam\n", + "import re\n", + "\n", + "inputs_pattern = 'data/*'\n", + "outputs_prefix = 'outputs/part'\n", + "\n", + "# Running locally in the DirectRunner.\n", + "with beam.Pipeline() as pipeline:\n", + " # Store the word counts in a PCollection.\n", + " # Each element is a tuple of (word, count) of types (str, int).\n", + " word_counts = (\n", + " # The input PCollection is an empty pipeline.\n", + " pipeline\n", + "\n", + " # Read lines from a text file.\n", + " | 'Read lines' >> beam.io.ReadFromText(inputs_pattern)\n", + " # Element type: str - text line\n", + "\n", + " # Use a regular expression to iterate over all words in the line.\n", + " # FlatMap will yield an element for every element in an iterable.\n", + " | 'Find words' >> beam.FlatMap(lambda line: re.findall(r\"[a-zA-Z']+\", line))\n", + " # Element type: str - word\n", + "\n", + " # Create key-value pairs where the value is 1, this way we can group by\n", + " # the same word while adding those 1s and get the counts for every word.\n", + " | 'Pair words with 1' >> beam.Map(lambda word: (word, 1))\n", + " # Element type: (str, int) - key: word, value: 1\n", + "\n", + " # Group by key while combining the value using the sum() function.\n", + " | 'Group and sum' >> beam.CombinePerKey(sum)\n", + " # Element type: (str, int) - key: word, value: counts\n", + " )\n", + "\n", + " # We can process a PCollection through other pipelines too.\n", + " (\n", + " # The input PCollection is the word_counts created from the previous step.\n", + " word_counts\n", + "\n", + " # Format the results into a string so we can write them to a file.\n", + " | 'Format results' >> beam.Map(lambda word_count: str(word_count))\n", + " # Element type: str - text line\n", + "\n", + " # Finally, write the results to a file.\n", + " | 'Write results' >> beam.io.WriteToText(outputs_prefix)\n", + " )\n", + "\n", + "# Sample the first 20 results, remember there are no ordering guarantees.\n", + "run('head -n 20 {}-00000-of-*'.format(outputs_prefix))" + ], + "execution_count": 3, + "outputs": [ + { + "output_type": "stream", + "text": [ + "WARNING:root:Deleting 1 existing files in target path matching: -*-of-%(num_shards)05d\n" + ], + "name": "stderr" + }, + { + "output_type": "stream", + "text": [ + ">> head -n 20 outputs/part-00000-of-*\n", + "==> outputs/part-00000-of-00001 <==\n", + "(u'canker', 1)\n", + "(u'bounty', 2)\n", + "(u'provision', 3)\n", + "(u'to', 438)\n", + "(u'terms', 2)\n", + "(u'unnecessary', 2)\n", + "(u'tongue', 5)\n", + "(u'knives', 1)\n", + "(u'Commend', 1)\n", + "(u'Hum', 2)\n", + "(u'Set', 2)\n", + "(u'smell', 6)\n", + "(u'dreadful', 3)\n", + "(u'frowning', 1)\n", + "(u'World', 1)\n", + "(u'tike', 1)\n", + "(u'yes', 3)\n", + "(u'oldness', 1)\n", + "(u'boat', 1)\n", + "(u\"in's\", 1)\n", + "\n", + "==> outputs/part-00000-of-00003 <==\n", + "wrath: 3\n", + "nicely: 2\n", + "hall: 1\n", + "Sure: 2\n", + "legs: 4\n", + "ten: 1\n", + "yourselves: 1\n", + "embossed: 1\n", + "poorly: 1\n", + "temper: 2\n", + "Dismissing: 1\n", + "Legitimate: 1\n", + "tyrannous: 1\n", + "turn: 13\n", + "gold: 2\n", + "minds: 1\n", + "dowers: 2\n", + "policy: 1\n", + "I: 708\n", + "V: 6\n", + "\n", + "==> outputs/part-00000-of-00004 <==\n", + "retinue: 1\n", + "stink: 1\n", + "beaks: 1\n", + "Ten: 1\n", + "riots: 2\n", + "Service: 1\n", + "dealing: 1\n", + "stop: 2\n", + "detain: 1\n", + "beware: 1\n", + "pilferings: 1\n", + "swimming: 1\n", + "The: 124\n", + "Been: 1\n", + "behavior: 1\n", + "impetuous: 1\n", + "Thy: 20\n", + "Tis: 24\n", + "Soldiers: 7\n", + "Juno: 1\n", + "\n" + ], + "name": "stdout" + } + ] + } + ] +} From 6ac7336c498a1e6f9df8339d3351bb9a9b9bef72 Mon Sep 17 00:00:00 2001 From: Bartosz Zablocki Date: Wed, 14 Jun 2023 13:52:05 +0000 Subject: [PATCH 02/16] WiP: Yaml Day Zero tutorial. --- .../get-started/try-apache-beam-yaml.ipynb | 1430 +++++++++++++---- 1 file changed, 1120 insertions(+), 310 deletions(-) diff --git a/examples/notebooks/get-started/try-apache-beam-yaml.ipynb b/examples/notebooks/get-started/try-apache-beam-yaml.ipynb index 22d12e1505f0..92f2b0358214 100644 --- a/examples/notebooks/get-started/try-apache-beam-yaml.ipynb +++ b/examples/notebooks/get-started/try-apache-beam-yaml.ipynb @@ -23,12 +23,12 @@ "colab_type": "text" }, "source": [ - "\"Open" + "\"Open\n" ] }, { "cell_type": "code", - "execution_count": null, + "execution_count": 53, "source": [ "#@title ###### Licensed to the Apache Software Foundation (ASF), Version 2.0 (the \"License\")\n", "\n", @@ -102,14 +102,18 @@ " !{cmd}\n", " print('')\n", "\n", + "def save_to_file(content, file_name):\n", + " with open(file_name, 'w') as f:\n", + " f.write(content)\n", + "\n", "# Install apache-beam.\n", "run('pip install --quiet apache-beam')\n", "\n", "# Copy the input file into the local file system.\n", "run('mkdir -p data')\n", - "run('gsutil cp gs://dataflow-samples/shakespeare/kinglear.txt data/')" + "run('gsutil cp gs://apache-beam-samples/SMSSpamCollection/SMSSpamCollection data/SMSSpamCollection.csv')" ], - "execution_count": 1, + "execution_count": 78, "outputs": [ { "name": "stdout", @@ -119,46 +123,116 @@ "\n", ">> mkdir -p data\n", "\n", - ">> gsutil cp gs://dataflow-samples/shakespeare/kinglear.txt data/\n", - "Copying gs://dataflow-samples/shakespeare/kinglear.txt...\r\n", - "/ [1 files][153.6 KiB/153.6 KiB] \r\n", - "Operation completed over 1 objects/153.6 KiB. \r\n", + ">> gsutil cp gs://apache-beam-samples/SMSSpamCollection/SMSSpamCollection data/SMSSpamCollection.csv\n", + "Copying gs://apache-beam-samples/SMSSpamCollection/SMSSpamCollection...\r\n", + "/ [1 files][466.7 KiB/466.7 KiB] \r\n", + "Operation completed over 1 objects/466.7 KiB. \r\n", "\n" ] } ] }, + { + "cell_type": "markdown", + "source": [ + "## Inspect the data\n", + "Let’s see how our data looks like." + ], + "metadata": { + "collapsed": false + } + }, { "cell_type": "code", - "execution_count": 4, + "execution_count": 60, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - ">> \n", - "echo 'pipeline:\n", - " transforms:\n", - " - type: ReadFromText\n", - " path: data/*\n", - " - type: WriteToText\n", - " path: output.txt\n", - " input: ReadFromText' > pipeline.yaml\n", + ">> head data/SMSSpamCollection.csv\n", + "ham\tGo until jurong point, crazy.. Available only in bugis n great world la e buffet... Cine there got amore wat...\r\n", + "ham\tOk lar... Joking wif u oni...\r\n", + "spam\tFree entry in 2 a wkly comp to win FA Cup final tkts 21st May 2005. Text FA to 87121 to receive entry question(std txt rate)T&C's apply 08452810075over18's\r\n", + "ham\tU dun say so early hor... U c already then say...\r\n", + "ham\tNah I don't think he goes to usf, he lives around here though\r\n", + "spam\tFreeMsg Hey there darling it's been 3 week's now and no word back! I'd like some fun you up for it still? Tb ok! XxX std chgs to send, £1.50 to rcv\r\n", + "ham\tEven my brother is not like to speak with me. They treat me like aids patent.\r\n", + "ham\tAs per your request 'Melle Melle (Oru Minnaminunginte Nurungu Vettam)' has been set as your callertune for all Callers. Press *9 to copy your friends Callertune\r\n", + "spam\tWINNER!! As a valued network customer you have been selected to receivea £900 prize reward! To claim call 09061701461. Claim code KL341. Valid 12 hours only.\r\n", + "spam\tHad your mobile 11 months or more? U R entitled to Update to the latest colour mobiles with camera for Free! Call The Mobile Update Co FREE on 08002986030\r\n", "\n", + ">> wc -l data/SMSSpamCollection.csv\n", + "5574 data/SMSSpamCollection.csv\r\n", "\n" ] } ], "source": [ - "run('''\n", - "echo 'pipeline:\n", - " transforms:\n", - " - type: ReadFromText\n", - " path: data/*\n", - " - type: WriteToText\n", - " path: output.txt\n", - " input: ReadFromText' > pipeline.yaml\n", - "''')" + "run('head data/SMSSpamCollection.csv')\n", + "run('wc -l data/SMSSpamCollection.csv')" + ], + "metadata": { + "collapsed": false + } + }, + { + "cell_type": "markdown", + "source": [ + "This dataset is a `csv` file with 5,574 rows and 2 columns recording the following attributes separated by a tab sign:\n", + "1. `Column 1`: The label (either `ham` or `spam`)\n", + "2. `Column 2`: The SMS as raw text (type `string`)" + ], + "metadata": { + "collapsed": false + } + }, + { + "cell_type": "markdown", + "source": [ + "## First pipeline\n", + "We’ll start with creating a pipeline which loads the data, filters out valid messages, leaving spam, and prints only valid lines to the console." + ], + "metadata": { + "collapsed": false + } + }, + { + "cell_type": "code", + "execution_count": 79, + "outputs": [], + "source": [ + "pipeline = '''\n", + "pipeline:\n", + " - type: ReadFromText\n", + " name: SmsData\n", + " file_pattern: data/SMSSpamCollection.csv\n", + "\n", + " - type: PyMap\n", + " name: SplitLine\n", + " input: SmsData\n", + " fn: 'lambda line: line.split(\"\\\\t\")'\n", + "\n", + " - type: PyFilter\n", + " name: FilterOutSpam\n", + " input: SplitLine\n", + " keep: 'lambda row: row[0] == \"spam\"'\n", + "\n", + " - type: PyMap\n", + " name: PrintLines\n", + " input: FilterOutSpam\n", + " fn: 'print' # or 'lambda x: print(x)'\n", + "'''\n", + "save_to_file(pipeline, 'pipeline-01.yaml')" + ], + "metadata": { + "collapsed": false + } + }, + { + "cell_type": "markdown", + "source": [ + "The pipeline is now saved in the yaml format. To validate, run:" ], "metadata": { "collapsed": false @@ -166,26 +240,48 @@ }, { "cell_type": "code", - "execution_count": 5, + "execution_count": 80, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - ">> cat pipeline.yaml\n", + ">> cat pipeline-01.yaml\n", + "\r\n", "pipeline:\r\n", - " transforms:\r\n", - " - type: ReadFromText\r\n", - " path: data/*\r\n", - " - type: WriteToText\r\n", - " path: output.txt\r\n", - " input: ReadFromText\r\n", + " - type: ReadFromText\r\n", + " name: SmsData\r\n", + " file_pattern: data/SMSSpamCollection.csv\r\n", + "\r\n", + " - type: PyMap\r\n", + " name: SplitLine\r\n", + " input: SmsData\r\n", + " fn: 'lambda line: line.split(\"\\t\")'\r\n", + "\r\n", + " - type: PyFilter\r\n", + " name: FilterOutSpam\r\n", + " input: SplitLine\r\n", + " keep: 'lambda row: row[0] == \"spam\"'\r\n", + "\r\n", + " - type: PyMap\r\n", + " name: PrintLines\r\n", + " input: FilterOutSpam\r\n", + " fn: 'print' # or 'lambda x: print(x)'\r\n", "\n" ] } ], "source": [ - "run('cat pipeline.yaml')" + "run('cat pipeline-01.yaml')" + ], + "metadata": { + "collapsed": false + } + }, + { + "cell_type": "markdown", + "source": [ + "To run the pipeline locally, using a DirectRunner, you need to run the yaml's main python script, passing the pipline.yaml file as an input:" ], "metadata": { "collapsed": false @@ -193,42 +289,785 @@ }, { "cell_type": "code", - "execution_count": 6, + "execution_count": 49, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - ">> python -m apache_beam.yaml.main --pipeline_spec_file=pipeline.yaml\n", - "Traceback (most recent call last):\r\n", - " File \"/usr/local/google/home/bzablocki/.pyenv/versions/3.8.9/lib/python3.8/runpy.py\", line 194, in _run_module_as_main\r\n", - " return _run_code(code, main_globals, None,\r\n", - " File \"/usr/local/google/home/bzablocki/.pyenv/versions/3.8.9/lib/python3.8/runpy.py\", line 87, in _run_code\r\n", - " exec(code, run_globals)\r\n", - " File \"/usr/local/google/home/bzablocki/code/beam/sdks/python/apache_beam/yaml/main.py\", line 63, in \r\n", - " run()\r\n", - " File \"/usr/local/google/home/bzablocki/code/beam/sdks/python/apache_beam/yaml/main.py\", line 28, in run\r\n", - " parser.add_argument(\r\n", - " File \"/usr/local/google/home/bzablocki/.pyenv/versions/3.8.9/lib/python3.8/argparse.py\", line 1368, in add_argument\r\n", - " action = action_class(**kwargs)\r\n", - "TypeError: __init__() got an unexpected keyword argument 'description'\r\n", + ">> python -m apache_beam.yaml.main --pipeline_spec_file=pipeline-01.yaml\n", + "Building pipeline...\r\n", + "INFO:apache_beam.yaml.yaml_transform:Expanding \"SmsData\" at line 3 \r\n", + "INFO:apache_beam.yaml.yaml_transform:Expanding \"SplitLine\" at line 7 \r\n", + "INFO:apache_beam.yaml.yaml_transform:Expanding \"FilterOutSpam\" at line 12 \r\n", + "INFO:apache_beam.yaml.yaml_transform:Expanding \"PrintLines\" at line 17 \r\n", + "Running pipeline...\r\n", + "['spam', \"Free entry in 2 a wkly comp to win FA Cup final tkts 21st May 2005. Text FA to 87121 to receive entry question(std txt rate)T&C's apply 08452810075over18's\"]\r\n", + "['spam', \"FreeMsg Hey there darling it's been 3 week's now and no word back! I'd like some fun you up for it still? Tb ok! XxX std chgs to send, £1.50 to rcv\"]\r\n", + "['spam', 'WINNER!! As a valued network customer you have been selected to receivea £900 prize reward! To claim call 09061701461. Claim code KL341. Valid 12 hours only.']\r\n", + "['spam', 'Had your mobile 11 months or more? U R entitled to Update to the latest colour mobiles with camera for Free! Call The Mobile Update Co FREE on 08002986030']\r\n", + "['spam', 'SIX chances to win CASH! From 100 to 20,000 pounds txt> CSH11 and send to 87575. Cost 150p/day, 6days, 16+ TsandCs apply Reply HL 4 info']\r\n", + "['spam', 'URGENT! You have won a 1 week FREE membership in our £100,000 Prize Jackpot! Txt the word: CLAIM to No: 81010 T&C www.dbuk.net LCCLTD POBOX 4403LDNW1A7RW18']\r\n", + "['spam', 'XXXMobileMovieClub: To use your credit, click the WAP link in the next txt message or click here>> http://wap. xxxmobilemovieclub.com?n=QJKGIGHJJGCBL']\r\n", + "['spam', 'England v Macedonia - dont miss the goals/team news. Txt ur national team to 87077 eg ENGLAND to 87077 Try:WALES, SCOTLAND 4txt/ú1.20 POBOXox36504W45WQ 16+']\r\n", + "['spam', 'Thanks for your subscription to Ringtone UK your mobile will be charged £5/month Please confirm by replying YES or NO. If you reply NO you will not be charged']\r\n", + "['spam', '07732584351 - Rodger Burns - MSG = We tried to call you re your reply to our sms for a free nokia mobile + free camcorder. Please call now 08000930705 for delivery tomorrow']\r\n", + "['spam', 'SMS. ac Sptv: The New Jersey Devils and the Detroit Red Wings play Ice Hockey. Correct or Incorrect? End? Reply END SPTV']\r\n", + "['spam', 'Congrats! 1 year special cinema pass for 2 is yours. call 09061209465 now! C Suprman V, Matrix3, StarWars3, etc all 4 FREE! bx420-ip4-5we. 150pm. Dont miss out! ']\r\n", + "['spam', 'As a valued customer, I am pleased to advise you that following recent review of your Mob No. you are awarded with a £1500 Bonus Prize, call 09066364589']\r\n", + "['spam', 'Urgent UR awarded a complimentary trip to EuroDisinc Trav, Aco&Entry41 Or £1000. To claim txt DIS to 87121 18+6*£1.50(moreFrmMob. ShrAcomOrSglSuplt)10, LS1 3AJ']\r\n", + "['spam', 'Did you hear about the new \"Divorce Barbie\"? It comes with all of Ken\\'s stuff!']\r\n", + "['spam', 'Please call our customer service representative on 0800 169 6031 between 10am-9pm as you have WON a guaranteed £1000 cash or £5000 prize!']\r\n", + "['spam', 'Your free ringtone is waiting to be collected. Simply text the password \"MIX\" to 85069 to verify. Get Usher and Britney. FML, PO Box 5249, MK17 92H. 450Ppw 16']\r\n", + "['spam', 'GENT! We are trying to contact you. Last weekends draw shows that you won a £1000 prize GUARANTEED. Call 09064012160. Claim Code K52. Valid 12hrs only. 150ppm']\r\n", + "['spam', 'You are a winner U have been specially selected 2 receive £1000 or a 4* holiday (flights inc) speak to a live operator 2 claim 0871277810910p/min (18+) ']\r\n", + "['spam', 'PRIVATE! Your 2004 Account Statement for 07742676969 shows 786 unredeemed Bonus Points. To claim call 08719180248 Identifier Code: 45239 Expires']\r\n", + "['spam', 'URGENT! Your Mobile No. was awarded £2000 Bonus Caller Prize on 5/9/03 This is our final try to contact U! Call from Landline 09064019788 BOX42WR29C, 150PPM']\r\n", + "['spam', 'Todays Voda numbers ending 7548 are selected to receive a $350 award. If you have a match please call 08712300220 quoting claim code 4041 standard rates app']\r\n", + "['spam', 'Sunshine Quiz Wkly Q! Win a top Sony DVD player if u know which country the Algarve is in? Txt ansr to 82277. £1.50 SP:Tyrone']\r\n", + "['spam', \"Want 2 get laid tonight? Want real Dogging locations sent direct 2 ur mob? Join the UK's largest Dogging Network bt Txting GRAVEL to 69888! Nt. ec2a. 31p.msg@150p\"]\r\n", + "['spam', \"You'll not rcv any more msgs from the chat svc. For FREE Hardcore services text GO to: 69988 If u get nothing u must Age Verify with yr network & try again\"]\r\n", + "['spam', \"FreeMsg Why haven't you replied to my text? I'm Randy, sexy, female and live local. Luv to hear from u. Netcollex Ltd 08700621170150p per msg reply Stop to end\"]\r\n", + "['spam', 'Customer service annoncement. You have a New Years delivery waiting for you. Please call 07046744435 now to arrange delivery']\r\n", + "['spam', 'You are a winner U have been specially selected 2 receive £1000 cash or a 4* holiday (flights inc) speak to a live operator 2 claim 0871277810810']\r\n", + "['spam', '-PLS STOP bootydelious (32/F) is inviting you to be her friend. Reply YES-434 or NO-434 See her: www.SMS.ac/u/bootydelious STOP? Send STOP FRND to 62468']\r\n", + "['spam', 'BangBabes Ur order is on the way. U SHOULD receive a Service Msg 2 download UR content. If U do not, GoTo wap. bangb. tv on UR mobile internet/service menu']\r\n", + "['spam', 'URGENT! We are trying to contact you. Last weekends draw shows that you have won a £900 prize GUARANTEED. Call 09061701939. Claim code S89. Valid 12hrs only']\r\n", + "['spam', 'Please call our customer service representative on FREEPHONE 0808 145 4742 between 9am-11pm as you have WON a guaranteed £1000 cash or £5000 prize!']\r\n", + "['spam', 'Are you unique enough? Find out from 30th August. www.areyouunique.co.uk']\r\n", + "['spam', '500 New Mobiles from 2004, MUST GO! Txt: NOKIA to No: 89545 & collect yours today!From ONLY £1 www.4-tc.biz 2optout 087187262701.50gbp/mtmsg18']\r\n", + "['spam', 'Will u meet ur dream partner soon? Is ur career off 2 a flyng start? 2 find out free, txt HORO followed by ur star sign, e. g. HORO ARIES']\r\n", + "['spam', 'Text & meet someone sexy today. U can find a date or even flirt its up to U. Join 4 just 10p. REPLY with NAME & AGE eg Sam 25. 18 -msg recd@thirtyeight pence']\r\n", + "['spam', 'U 447801259231 have a secret admirer who is looking 2 make contact with U-find out who they R*reveal who thinks UR so special-call on 09058094597']\r\n", + "['spam', 'Congratulations ur awarded 500 of CD vouchers or 125gift guaranteed & Free entry 2 100 wkly draw txt MUSIC to 87066 TnCs www.Ldew.com1win150ppmx3age16']\r\n", + "['spam', 'We tried to contact you re your reply to our offer of a Video Handset? 750 anytime networks mins? UNLIMITED TEXT? Camcorder? Reply or call 08000930705 NOW']\r\n", + "['spam', 'Hey I am really horny want to chat or see me naked text hot to 69698 text charged at 150pm to unsubscribe text stop 69698']\r\n", + "['spam', 'Ur ringtone service has changed! 25 Free credits! Go to club4mobiles.com to choose content now! Stop? txt CLUB STOP to 87070. 150p/wk Club4 PO Box1146 MK45 2WT']\r\n", + "['spam', 'Ringtone Club: Get the UK singles chart on your mobile each week and choose any top quality ringtone! This message is free of charge.']\r\n", + "['spam', 'HMV BONUS SPECIAL 500 pounds of genuine HMV vouchers to be won. Just answer 4 easy questions. Play Now! Send HMV to 86688 More info:www.100percent-real.com']\r\n", + "['spam', \"T-Mobile customer you may now claim your FREE CAMERA PHONE upgrade & a pay & go sim card for your loyalty. Call on 0845 021 3680.Offer ends 28thFeb.T&C's apply\"]\r\n", + "['spam', 'SMS. ac Blind Date 4U!: Rodds1 is 21/m from Aberdeen, United Kingdom. Check Him out http://img. sms. ac/W/icmb3cktz8r7!-4 no Blind Dates send HIDE']\r\n", + "['spam', 'TheMob> Check out our newest selection of content, Games, Tones, Gossip, babes and sport, Keep your mobile fit and funky text WAP to 82468']\r\n", + "['spam', 'Think ur smart ? Win £200 this week in our weekly quiz, text PLAY to 85222 now!T&Cs WinnersClub PO BOX 84, M26 3UZ. 16+. GBP1.50/week']\r\n", + "['spam', 'December only! Had your mobile 11mths+? You are entitled to update to the latest colour camera mobile for Free! Call The Mobile Update Co FREE on 08002986906']\r\n", + "['spam', 'Call Germany for only 1 pence per minute! Call from a fixed line via access number 0844 861 85 85. No prepayment. Direct access!']\r\n", + "['spam', 'Valentines Day Special! Win over £1000 in our quiz and take your partner on the trip of a lifetime! Send GO to 83600 now. 150p/msg rcvd. CustCare:08718720201.']\r\n", + "['spam', 'Fancy a shag? I do.Interested? sextextuk.com txt XXUK SUZY to 69876. Txts cost 1.50 per msg. TnCs on website. X']\r\n", + "['spam', 'Congratulations ur awarded 500 of CD vouchers or 125gift guaranteed & Free entry 2 100 wkly draw txt MUSIC to 87066 TnCs www.Ldew.com1win150ppmx3age16']\r\n", + "['spam', 'Ur cash-balance is currently 500 pounds - to maximize ur cash-in now send CASH to 86688 only 150p/msg. CC: 08708800282 HG/Suite342/2Lands Row/W1J6HL']\r\n", + "['spam', 'Update_Now - Xmas Offer! Latest Motorola, SonyEricsson & Nokia & FREE Bluetooth! Double Mins & 1000 Txt on Orange. Call MobileUpd8 on 08000839402 or call2optout/F4Q=']\r\n", + "['spam', 'Here is your discount code RP176781. To stop further messages reply stop. www.regalportfolio.co.uk. Customer Services 08717205546']\r\n", + "['spam', 'Thanks for your Ringtone Order, Reference T91. You will be charged GBP 4 per week. You can unsubscribe at anytime by calling customer services on 09057039994']\r\n", + "['spam', 'Double mins and txts 4 6months FREE Bluetooth on Orange. Available on Sony, Nokia Motorola phones. Call MobileUpd8 on 08000839402 or call2optout/N9DX']\r\n", + "['spam', '4mths half price Orange line rental & latest camera phones 4 FREE. Had your phone 11mths ? Call MobilesDirect free on 08000938767 to update now! or2stoptxt']\r\n", + "['spam', 'FREE RINGTONE text FIRST to 87131 for a poly or text GET to 87131 for a true tone! Help? 0845 2814032 16 after 1st free, tones are 3x£150pw to e£nd txt stop']\r\n", + "['spam', '100 dating service cal;l 09064012103 box334sk38ch']\r\n", + "['spam', 'FREE entry into our £250 weekly competition just text the word WIN to 80086 NOW. 18 T&C www.txttowin.co.uk']\r\n", + "['spam', 'Send a logo 2 ur lover - 2 names joined by a heart. Txt LOVE NAME1 NAME2 MOBNO eg LOVE ADAM EVE 07123456789 to 87077 Yahoo! POBox36504W45WQ TxtNO 4 no ads 150p']\r\n", + "['spam', 'Someone has contacted our dating service and entered your phone because they fancy you! To find out who it is call from a landline 09111032124 . PoBox12n146tf150p']\r\n", + "['spam', 'URGENT! Your Mobile number has been awarded with a £2000 prize GUARANTEED. Call 09058094455 from land line. Claim 3030. Valid 12hrs only']\r\n", + "['spam', 'Congrats! Nokia 3650 video camera phone is your Call 09066382422 Calls cost 150ppm Ave call 3mins vary from mobiles 16+ Close 300603 post BCM4284 Ldn WC1N3XX']\r\n", + "['spam', \"Loan for any purpose £500 - £75,000. Homeowners + Tenants welcome. Have you been previously refused? We can still help. Call Free 0800 1956669 or text back 'help'\"]\r\n", + "['spam', \"UpgrdCentre Orange customer, you may now claim your FREE CAMERA PHONE upgrade for your loyalty. Call now on 0207 153 9153. Offer ends 26th July. T&C's apply. Opt-out available\"]\r\n", + "['spam', 'okmail: Dear Dave this is your final notice to collect your 4* Tenerife Holiday or #5000 CASH award! Call 09061743806 from landline. TCs SAE Box326 CW25WX 150ppm']\r\n", + "['spam', \"Want 2 get laid tonight? Want real Dogging locations sent direct 2 ur Mob? Join the UK's largest Dogging Network by txting MOAN to 69888Nyt. ec2a. 31p.msg@150p\"]\r\n", + "['spam', 'FREE MESSAGE Activate your 500 FREE Text Messages by replying to this message with the word FREE For terms & conditions, visit www.07781482378.com']\r\n", + "['spam', 'Congrats! 1 year special cinema pass for 2 is yours. call 09061209465 now! C Suprman V, Matrix3, StarWars3, etc all 4 FREE! bx420-ip4-5we. 150pm. Dont miss out!']\r\n", + "['spam', \"+123 Congratulations - in this week's competition draw u have won the £1450 prize to claim just call 09050002311 b4280703. T&Cs/stop SMS 08718727868. Over 18 only 150ppm\"]\r\n", + "['spam', 'You are guaranteed the latest Nokia Phone, a 40GB iPod MP3 player or a £500 prize! Txt word: COLLECT to No: 83355! IBHltd LdnW15H 150p/Mtmsgrcvd18+']\r\n", + "['spam', 'Boltblue tones for 150p Reply POLY# or MONO# eg POLY3 1. Cha Cha Slide 2. Yeah 3. Slow Jamz 6. Toxic 8. Come With Me or STOP 4 more tones txt MORE']\r\n", + "['spam', 'Your credits have been topped up for http://www.bubbletext.com Your renewal Pin is tgxxrz']\r\n", + "['spam', 'URGENT!: Your Mobile No. was awarded a £2,000 Bonus Caller Prize on 02/09/03! This is our 2nd attempt to contact YOU! Call 0871-872-9755 BOX95QU']\r\n", + "['spam', \"Today's Offer! Claim ur £150 worth of discount vouchers! Text YES to 85023 now! SavaMob, member offers mobile! T Cs 08717898035. £3.00 Sub. 16 . Unsub reply X\"]\r\n", + "['spam', 'You will recieve your tone within the next 24hrs. For Terms and conditions please see Channel U Teletext Pg 750']\r\n", + "['spam', 'PRIVATE! Your 2003 Account Statement for 07815296484 shows 800 un-redeemed S.I.M. points. Call 08718738001 Identifier Code 41782 Expires 18/11/04 ']\r\n", + "['spam', 'from www.Applausestore.com MonthlySubscription@50p/msg max6/month T&CsC web age16 2stop txt stop']\r\n", + "['spam', 'GENT! We are trying to contact you. Last weekends draw shows that you won a £1000 prize GUARANTEED. Call 09064012160. Claim Code K52. Valid 12hrs only. 150ppm ']\r\n", + "['spam', 'You have won ?1,000 cash or a ?2,000 prize! To claim, call09050000327']\r\n", + "['spam', 'our mobile number has won £5000, to claim calls us back or ring the claims hot line on 09050005321.']\r\n", + "['spam', 'We tried to contact you re your reply to our offer of 750 mins 150 textand a new video phone call 08002988890 now or reply for free delivery tomorrow']\r\n", + "['spam', \"For ur chance to win a £250 wkly shopping spree TXT: SHOP to 80878. T's&C's www.txt-2-shop.com custcare 08715705022, 1x150p/wk\"]\r\n", + "['spam', 'You have been specially selected to receive a 2000 pound award! Call 08712402050 BEFORE the lines close. Cost 10ppm. 16+. T&Cs apply. AG Promo']\r\n", + "['spam', 'PRIVATE! Your 2003 Account Statement for 07753741225 shows 800 un-redeemed S. I. M. points. Call 08715203677 Identifier Code: 42478 Expires 24/10/04']\r\n", + "['spam', 'You have an important customer service announcement. Call FREEPHONE 0800 542 0825 now!']\r\n", + "['spam', 'XCLUSIVE@CLUBSAISAI 2MOROW 28/5 SOIREE SPECIALE ZOUK WITH NICHOLS FROM PARIS.FREE ROSES 2 ALL LADIES !!! info: 07946746291/07880867867 ']\r\n", + "['spam', '22 days to kick off! For Euro2004 U will be kept up to date with the latest news and results daily. To be removed send GET TXT STOP to 83222']\r\n", + "['spam', 'New TEXTBUDDY Chat 2 horny guys in ur area 4 just 25p Free 2 receive Search postcode or at gaytextbuddy.com. TXT ONE name to 89693']\r\n", + "['spam', 'Todays Vodafone numbers ending with 4882 are selected to a receive a £350 award. If your number matches call 09064019014 to receive your £350 award.']\r\n", + "['spam', 'Dear Voucher Holder, 2 claim this weeks offer, at your PC go to http://www.e-tlp.co.uk/expressoffer Ts&Cs apply.2 stop texts txt STOP to 80062.']\r\n", + "['spam', 'PRIVATE! Your 2003 Account Statement for shows 800 un-redeemed S. I. M. points. Call 08715203694 Identifier Code: 40533 Expires 31/10/04']\r\n", + "['spam', 'You have won ?1,000 cash or a ?2,000 prize! To claim, call09050000327. T&C: RSTM, SW7 3SS. 150ppm']\r\n", + "['spam', '88800 and 89034 are premium phone services call 08718711108']\r\n", + "['spam', 'SMS. ac sun0819 posts HELLO:\"You seem cool, wanted to say hi. HI!!!\" Stop? Send STOP to 62468']\r\n", + "['spam', 'Get ur 1st RINGTONE FREE NOW! Reply to this msg with TONE. Gr8 TOP 20 tones to your phone every week just £1.50 per wk 2 opt out send STOP 08452810071 16']\r\n", + "['spam', \"Hi I'm sue. I am 20 years old and work as a lapdancer. I love sex. Text me live - I'm i my bedroom now. text SUE to 89555. By TextOperator G2 1DA 150ppmsg 18+\"]\r\n", + "['spam', 'Please CALL 08712404000 immediately as there is an urgent message waiting for you.']\r\n", + "['spam', 'To review and KEEP the fantastic Nokia N-Gage game deck with Club Nokia, go 2 www.cnupdates.com/newsletter. unsubscribe from alerts reply with the word OUT']\r\n", + "['spam', '4mths half price Orange line rental & latest camera phones 4 FREE. Had your phone 11mths+? Call MobilesDirect free on 08000938767 to update now! or2stoptxt T&Cs']\r\n", + "['spam', '08714712388 between 10am-7pm Cost 10p']\r\n", + "['spam', '+449071512431 URGENT! This is the 2nd attempt to contact U!U have WON £1250 CALL 09071512433 b4 050703 T&CsBCM4235WC1N3XX. callcost 150ppm mobilesvary. max£7. 50']\r\n", + "['spam', 'You have WON a guaranteed £1000 cash or a £2000 prize. To claim yr prize call our customer service representative on 08714712394 between 10am-7pm']\r\n", + "['spam', 'Email AlertFrom: Jeri StewartSize: 2KBSubject: Low-cost prescripiton drvgsTo listen to email call 123']\r\n", + "['spam', 'Hi. Customer Loyalty Offer:The NEW Nokia6650 Mobile from ONLY £10 at TXTAUCTION! Txt word: START to No: 81151 & get yours Now! 4T&Ctxt TC 150p/MTmsg']\r\n", + "['spam', 'U are subscribed to the best Mobile Content Service in the UK for £3 per 10 days until you send STOP to 82324. Helpline 08706091795']\r\n", + "['spam', \"Do you realize that in about 40 years, we'll have thousands of old ladies running around with tattoos?\"]\r\n", + "['spam', 'You have an important customer service announcement from PREMIER.']\r\n", + "['spam', 'Romantic Paris. 2 nights, 2 flights from £79 Book now 4 next year. Call 08704439680Ts&Cs apply.']\r\n", + "['spam', 'Urgent Ur £500 guaranteed award is still unclaimed! Call 09066368327 NOW closingdate04/09/02 claimcode M39M51 £1.50pmmorefrommobile2Bremoved-MobyPOBox734LS27YF']\r\n", + "['spam', 'UR awarded a City Break and could WIN a £200 Summer Shopping spree every WK. Txt STORE to 88039 . SkilGme. TsCs087147403231Winawk!Age16 £1.50perWKsub']\r\n", + "['spam', 'You have an important customer service announcement from PREMIER. Call FREEPHONE 0800 542 0578 now!']\r\n", + "['spam', 'Ever thought about living a good life with a perfect partner? Just txt back NAME and AGE to join the mobile community. (100p/SMS)']\r\n", + "['spam', '5 Free Top Polyphonic Tones call 087018728737, National Rate. Get a toppoly tune sent every week, just text SUBPOLY to 81618, £3 per pole. UnSub 08718727870.']\r\n", + "['spam', \"Orange customer, you may now claim your FREE CAMERA PHONE upgrade for your loyalty. Call now on 0207 153 9996. Offer ends 14thMarch. T&C's apply. Opt-out availa\"]\r\n", + "['spam', 'Last Chance! Claim ur £150 worth of discount vouchers today! Text SHOP to 85023 now! SavaMob, offers mobile! T Cs SavaMob POBOX84, M263UZ. £3.00 Sub. 16']\r\n", + "['spam', 'FREE for 1st week! No1 Nokia tone 4 ur mobile every week just txt NOKIA to 8077 Get txting and tell ur mates. www.getzed.co.uk POBox 36504 W45WQ 16+ norm150p/tone']\r\n", + "['spam', 'You have won a guaranteed £200 award or even £1000 cashto claim UR award call free on 08000407165 (18+) 2 stop getstop on 88222 PHP. RG21 4JX']\r\n", + "['spam', 'Congratulations ur awarded either £500 of CD gift vouchers & Free entry 2 our £100 weekly draw txt MUSIC to 87066 TnCs www.Ldew.com1win150ppmx3age16']\r\n", + "['spam', 'U were outbid by simonwatson5120 on the Shinco DVD Plyr. 2 bid again, visit sms. ac/smsrewards 2 end bid notifications, reply END OUT']\r\n", + "['spam', 'SMSSERVICES. for yourinclusive text credits, pls goto www.comuk.net login= 3qxj9 unsubscribe with STOP, no extra charge. help 08702840625.COMUK. 220-CM2 9AE']\r\n", + "['spam', \"25p 4 alfie Moon's Children in need song on ur mob. Tell ur m8s. Txt Tone charity to 8007 for Nokias or Poly charity for polys: zed 08701417012 profit 2 charity.\"]\r\n", + "['spam', 'U have a secret admirer. REVEAL who thinks U R So special. Call 09065174042. To opt out Reply REVEAL STOP. 1.50 per msg recd. Cust care 07821230901']\r\n", + "['spam', 'Dear Voucher Holder, To claim this weeks offer, at you PC please go to http://www.e-tlp.co.uk/expressoffer Ts&Cs apply. To stop texts, txt STOP to 80062']\r\n", + "['spam', 'Do you want 750 anytime any network mins 150 text and a NEW VIDEO phone for only five pounds per week call 08002888812 or reply for delivery tomorrow']\r\n", + "['spam', 'We tried to contact you re our offer of New Video Phone 750 anytime any network mins HALF PRICE Rental camcorder call 08000930705 or reply for delivery Wed']\r\n", + "['spam', 'Last chance 2 claim ur £150 worth of discount vouchers-Text YES to 85023 now!SavaMob-member offers mobile T Cs 08717898035. £3.00 Sub. 16 . Remove txt X or STOP']\r\n", + "['spam', 'Urgent! call 09066350750 from your landline. Your complimentary 4* Ibiza Holiday or 10,000 cash await collection SAE T&Cs PO BOX 434 SK3 8WP 150 ppm 18+ ']\r\n", + "['spam', \"Today's Offer! Claim ur £150 worth of discount vouchers! Text YES to 85023 now! SavaMob, member offers mobile! T Cs 08717898035. £3.00 Sub. 16 . Unsub reply X\"]\r\n", + "['spam', 'Talk sexy!! Make new friends or fall in love in the worlds most discreet text dating service. Just text VIP to 83110 and see who you could meet.']\r\n", + "['spam', 'Congratulations ur awarded either a yrs supply of CDs from Virgin Records or a Mystery Gift GUARANTEED Call 09061104283 Ts&Cs www.smsco.net £1.50pm approx 3mins']\r\n", + "['spam', 'PRIVATE! Your 2003 Account Statement for 07808 XXXXXX shows 800 un-redeemed S. I. M. points. Call 08719899217 Identifier Code: 41685 Expires 07/11/04']\r\n", + "['spam', 'Hello. We need some posh birds and chaps to user trial prods for champneys. Can i put you down? I need your address and dob asap. Ta r']\r\n", + "['spam', 'What do U want for Xmas? How about 100 free text messages & a new video phone with half price line rental? Call free now on 0800 0721072 to find out more!']\r\n", + "['spam', 'Shop till u Drop, IS IT YOU, either 10K, 5K, £500 Cash or £100 Travel voucher, Call now, 09064011000. NTT PO Box CR01327BT fixedline Cost 150ppm mobile vary']\r\n", + "['spam', 'Sunshine Quiz Wkly Q! Win a top Sony DVD player if u know which country Liverpool played in mid week? Txt ansr to 82277. £1.50 SP:Tyrone']\r\n", + "['spam', 'U have a secret admirer who is looking 2 make contact with U-find out who they R*reveal who thinks UR so special-call on 09058094565']\r\n", + "['spam', 'U have a Secret Admirer who is looking 2 make contact with U-find out who they R*reveal who thinks UR so special-call on 09065171142-stopsms-08']\r\n", + "['spam', 'Reminder: You have not downloaded the content you have already paid for. Goto http://doit. mymoby. tv/ to collect your content.']\r\n", + "['spam', 'Your free ringtone is waiting to be collected. Simply text the password \"MIX\" to 85069 to verify. Get Usher and Britney. FML, PO Box 5249, MK17 92H. 450Ppw 16']\r\n", + "['spam', 'all the lastest from Stereophonics, Marley, Dizzee Racal, Libertines and The Strokes! Win Nookii games with Flirt!! Click TheMob WAP Bookmark or text WAP to 82468']\r\n", + "['spam', 'January Male Sale! Hot Gay chat now cheaper, call 08709222922. National rate from 1.5p/min cheap to 7.8p/min peak! To stop texts call 08712460324 (10p/min)']\r\n", + "['spam', 'money!!! you r a lucky winner ! 2 claim your prize text money 2 88600 over £1million to give away ! ppt150x3+normal text rate box403 w1t1jy']\r\n", + "['spam', 'Dear Matthew please call 09063440451 from a landline, your complimentary 4*Lux Tenerife holiday or £1000 CASH await collection. ppm150 SAE T&Cs Box334 SK38XH.']\r\n", + "['spam', 'Urgent! call 09061749602 from Landline. Your complimentary 4* Tenerife Holiday or £10,000 cash await collection SAE T&Cs BOX 528 HP20 1YF 150ppm 18+']\r\n", + "['spam', 'How about getting in touch with folks waiting for company? Just txt back your NAME and AGE to opt in! Enjoy the community (150p/SMS)']\r\n", + "['spam', 'Ur cash-balance is currently 500 pounds - to maximize ur cash-in now send GO to 86688 only 150p/msg. CC: 08718720201 PO BOX 114/14 TCR/W1']\r\n", + "['spam', 'Filthy stories and GIRLS waiting for your']\r\n", + "['spam', 'URGENT! We are trying to contact U. Todays draw shows that you have won a £800 prize GUARANTEED. Call 09050001808 from land line. Claim M95. Valid12hrs only']\r\n", + "['spam', 'Congrats! 2 mobile 3G Videophones R yours. call 09063458130 now! videochat wid your mates, play java games, Dload polyPH music, noline rentl.']\r\n", + "['spam', 'Please call our customer service representative on FREEPHONE 0808 145 4742 between 9am-11pm as you have WON a guaranteed £1000 cash or £5000 prize!']\r\n", + "['spam', 'Panasonic & BluetoothHdset FREE. Nokia FREE. Motorola FREE & DoubleMins & DoubleTxt on Orange contract. Call MobileUpd8 on 08000839402 or call 2optout']\r\n", + "['spam', 'FREE for 1st week! No1 Nokia tone 4 ur mob every week just txt NOKIA to 8007 Get txting and tell ur mates www.getzed.co.uk POBox 36504 W45WQ norm150p/tone 16+']\r\n", + "['spam', 'Guess what! Somebody you know secretly fancies you! Wanna find out who it is? Give us a call on 09065394514 From Landline DATEBox1282EssexCM61XN 150p/min 18']\r\n", + "['spam', 'We know someone who you know that fancies you. Call 09058097218 to find out who. POBox 6, LS15HB 150p']\r\n", + "['spam', \"1000's flirting NOW! Txt GIRL or BLOKE & ur NAME & AGE, eg GIRL ZOE 18 to 8007 to join and get chatting!\"]\r\n", + "['spam', '18 days to Euro2004 kickoff! U will be kept informed of all the latest news and results daily. Unsubscribe send GET EURO STOP to 83222.']\r\n", + "['spam', 'EASTENDERS TV Quiz. What FLOWER does DOT compare herself to? D= VIOLET E= TULIP F= LILY txt D E or F to 84025 NOW 4 chance 2 WIN £100 Cash WKENT/150P16+']\r\n", + "['spam', 'We have new local dates in your area - Lots of new people registered in YOUR AREA. Reply DATE to start now! 18 only www.flirtparty.us REPLYS150']\r\n", + "['spam', 'Someone U know has asked our dating service 2 contact you! Cant Guess who? CALL 09058091854 NOW all will be revealed. PO BOX385 M6 6WU']\r\n", + "['spam', 'URGENT! We are trying to contact U. Todays draw shows that you have won a £800 prize GUARANTEED. Call 09050003091 from land line. Claim C52. Valid12hrs only']\r\n", + "['spam', \"Dear U've been invited to XCHAT. This is our final attempt to contact u! Txt CHAT to 86688\"]\r\n", + "['spam', 'You are awarded a SiPix Digital Camera! call 09061221061 from landline. Delivery within 28days. T Cs Box177. M221BP. 2yr warranty. 150ppm. 16 . p p£3.99']\r\n", + "['spam', 'WIN URGENT! Your mobile number has been awarded with a £2000 prize GUARANTEED call 09061790121 from land line. claim 3030 valid 12hrs only 150ppm ']\r\n", + "['spam', 'Dear Subscriber ur draw 4 £100 gift voucher will b entered on receipt of a correct ans. When was Elvis Presleys Birthday? TXT answer to 80062']\r\n", + "['spam', 'Message Important information for O2 user. Today is your lucky day! 2 find out why log onto http://www.urawinner.com there is a fantastic surprise awaiting you']\r\n", + "['spam', '449050000301 You have won a £2,000 price! To claim, call 09050000301.']\r\n", + "['spam', \"Bored of speed dating? Try SPEEDCHAT, txt SPEEDCHAT to 80155, if you don't like em txt SWAP and get a new chatter! Chat80155 POBox36504W45WQ 150p/msg rcd 16\"]\r\n", + "['spam', 'Do you want 750 anytime any network mins 150 text and a NEW video phone for only five pounds per week call 08000776320 now or reply for delivery Tomorrow']\r\n", + "['spam', 'For taking part in our mobile survey yesterday! You can now have 500 texts 2 use however you wish. 2 get txts just send TXT to 80160 T&C www.txt43.com 1.50p']\r\n", + "['spam', 'Ur HMV Quiz cash-balance is currently £500 - to maximize ur cash-in now send HMV1 to 86688 only 150p/msg']\r\n", + "['spam', 'Dont forget you can place as many FREE Requests with 1stchoice.co.uk as you wish. For more Information call 08707808226.']\r\n", + "['spam', \"I don't know u and u don't know me. Send CHAT to 86688 now and let's find each other! Only 150p/Msg rcvd. HG/Suite342/2Lands/Row/W1J6HL LDN. 18 years or over.\"]\r\n", + "['spam', 'Thank you, winner notified by sms. Good Luck! No future marketing reply STOP to 84122 customer services 08450542832']\r\n", + "['spam', \"1000's of girls many local 2 u who r virgins 2 this & r ready 2 4fil ur every sexual need. Can u 4fil theirs? text CUTE to 69911(£1.50p. m)\"]\r\n", + "['spam', \"Free entry in 2 a wkly comp to win FA Cup final tkts 21st May 2005. Text FA to 87121 to receive entry question(std txt rate)T&C's apply 08452810075over18's\"]\r\n", + "['spam', 'Got what it takes 2 take part in the WRC Rally in Oz? U can with Lucozade Energy! Text RALLY LE to 61200 (25p), see packs or lucozade.co.uk/wrc & itcould be u!']\r\n", + "['spam', 'Sex up ur mobile with a FREE sexy pic of Jordan! Just text BABE to 88600. Then every wk get a sexy celeb! PocketBabe.co.uk 4 more pics. 16 £3/wk 087016248']\r\n", + "['spam', 'You have 1 new voicemail. Please call 08719181503']\r\n", + "['spam', 'WIN a year supply of CDs 4 a store of ur choice worth £500 & enter our £100 Weekly draw txt MUSIC to 87066 Ts&Cs www.Ldew.com.subs16+1win150ppmx3']\r\n", + "['spam', 'As a SIM subscriber, you are selected to receive a Bonus! Get it delivered to your door, Txt the word OK to No: 88600 to claim. 150p/msg, EXP. 30Apr']\r\n", + "['spam', 'You have 1 new voicemail. Please call 08719181513.']\r\n", + "['spam', 'No. 1 Nokia Tone 4 ur mob every week! Just txt NOK to 87021. 1st Tone FREE ! so get txtin now and tell ur friends. 150p/tone. 16 reply HL 4info']\r\n", + "['spam', 'You are a winner U have been specially selected 2 receive £1000 cash or a 4* holiday (flights inc) speak to a live operator 2 claim 0871277810810']\r\n", + "['spam', 'Reply with your name and address and YOU WILL RECEIVE BY POST a weeks completely free accommodation at various global locations www.phb1.com ph:08700435505150p']\r\n", + "['spam', 'FREE entry into our £250 weekly comp just send the word ENTER to 84128 NOW. 18 T&C www.textcomp.com cust care 08712405020.']\r\n", + "['spam', 'Please CALL 08712402779 immediately as there is an urgent message waiting for you']\r\n", + "['spam', 'Hungry gay guys feeling hungry and up 4 it, now. Call 08718730555 just 10p/min. To stop texts call 08712460324 (10p/min)']\r\n", + "['spam', 'Can U get 2 phone NOW? I wanna chat 2 set up meet Call me NOW on 09096102316 U can cum here 2moro Luv JANE xx Calls£1/minmoremobsEMSPOBox45PO139WA']\r\n", + "['spam', \"network operator. The service is free. For T & C's visit 80488.biz\"]\r\n", + "['spam', 'Enjoy the jamster videosound gold club with your credits for 2 new videosounds+2 logos+musicnews! get more fun from jamster.co.uk! 16+only Help? call: 09701213186 ']\r\n", + "['spam', 'Get 3 Lions England tone, reply lionm 4 mono or lionp 4 poly. 4 more go 2 www.ringtones.co.uk, the original n best. Tones 3GBP network operator rates apply']\r\n", + "['spam', 'Win the newest “Harry Potter and the Order of the Phoenix (Book 5) reply HARRY, answer 5 questions - chance to be the first among readers!']\r\n", + "['spam', \"Ur balance is now £500. Ur next question is: Who sang 'Uptown Girl' in the 80's ? 2 answer txt ur ANSWER to 83600. Good luck!\"]\r\n", + "['spam', \"FREE2DAY sexy St George's Day pic of Jordan!Txt PIC to 89080 dont miss out, then every wk a saucy celeb!4 more pics c PocketBabe.co.uk 0870241182716 £3/wk\"]\r\n", + "['spam', 'HOT LIVE FANTASIES call now 08707509020 Just 20p per min NTT Ltd, PO Box 1327 Croydon CR9 5WB 0870..k']\r\n", + "['spam', 'Bears Pic Nick, and Tom, Pete and ... Dick. In fact, all types try gay chat with photo upload call 08718730666 (10p/min). 2 stop texts call 08712460324']\r\n", + "['spam', '500 New Mobiles from 2004, MUST GO! Txt: NOKIA to No: 89545 & collect yours today!From ONLY £1 www.4-tc.biz 2optout 087187262701.50gbp/mtmsg18 TXTAUCTION']\r\n", + "['spam', 'Double Mins & Double Txt & 1/2 price Linerental on Latest Orange Bluetooth mobiles. Call MobileUpd8 for the very latest offers. 08000839402 or call2optout/LF56']\r\n", + "['spam', 'No. 1 Nokia Tone 4 ur mob every week! Just txt NOK to 87021. 1st Tone FREE ! so get txtin now and tell ur friends. 150p/tone. 16 reply HL 4info']\r\n", + "['spam', 'URGENT, IMPORTANT INFORMATION FOR O2 USER. TODAY IS YOUR LUCKY DAY! 2 FIND OUT WHY LOG ONTO HTTP://WWW.URAWINNER.COM THERE IS A FANTASTIC SURPRISE AWAITING FOR YOU']\r\n", + "['spam', \"Dear U've been invited to XCHAT. This is our final attempt to contact u! Txt CHAT to 86688 150p/MsgrcvdHG/Suite342/2Lands/Row/W1J6HL LDN 18 yrs\"]\r\n", + "['spam', 'Congratulations ur awarded either £500 of CD gift vouchers & Free entry 2 our £100 weekly draw txt MUSIC to 87066 TnCs www.Ldew.com 1 win150ppmx3age16']\r\n", + "['spam', 'For sale - arsenal dartboard. Good condition but no doubles or trebles!']\r\n", + "['spam', 'Free 1st week entry 2 TEXTPOD 4 a chance 2 win 40GB iPod or £250 cash every wk. Txt POD to 84128 Ts&Cs www.textpod.net custcare 08712405020.']\r\n", + "['spam', 'As a registered optin subscriber ur draw 4 £100 gift voucher will be entered on receipt of a correct ans to 80062 Whats No1 in the BBC charts']\r\n", + "['spam', 'Summers finally here! Fancy a chat or flirt with sexy singles in yr area? To get MATCHED up just reply SUMMER now. Free 2 Join. OptOut txt STOP Help08714742804']\r\n", + "['spam', 'CLAIRE here am havin borin time & am now alone U wanna cum over 2nite? Chat now 09099725823 hope 2 C U Luv CLAIRE xx Calls£1/minmoremobsEMSPOBox45PO139WA']\r\n", + "['spam', 'Bought one ringtone and now getting texts costing 3 pound offering more tones etc']\r\n", + "['spam', '09066362231 URGENT! Your mobile No 07xxxxxxxxx won a £2,000 bonus caller prize on 02/06/03! this is the 2nd attempt to reach YOU! call 09066362231 ASAP!']\r\n", + "['spam', 'YOU 07801543489 are guaranteed the latests Nokia Phone, a 40GB iPod MP3 player or a £500 prize! Txt word:COLLECT to No:83355! TC-LLC NY-USA 150p/Mt msgrcvd18+']\r\n", + "['spam', 'Hi its LUCY Hubby at meetins all day Fri & I will B alone at hotel U fancy cumin over? Pls leave msg 2day 09099726395 Lucy x Calls£1/minMobsmoreLKPOBOX177HP51FL']\r\n", + "['spam', 'Your account has been credited with 500 FREE Text Messages. To activate, just txt the word: CREDIT to No: 80488 T&Cs www.80488.biz']\r\n", + "['spam', 'SMS. ac JSco: Energy is high, but u may not know where 2channel it. 2day ur leadership skills r strong. Psychic? Reply ANS w/question. End? Reply END JSCO']\r\n", + "['spam', 'HOT LIVE FANTASIES call now 08707509020 Just 20p per min NTT Ltd, PO Box 1327 Croydon CR9 5WB 0870 is a national rate call']\r\n", + "['spam', 'Thanks for the Vote. Now sing along with the stars with Karaoke on your mobile. For a FREE link just reply with SING now.']\r\n", + "['spam', 'Our brand new mobile music service is now live. The free music player will arrive shortly. Just install on your phone to browse content from the top artists.']\r\n", + "['spam', 'URGENT! Your Mobile No was awarded a £2,000 Bonus Caller Prize on 1/08/03! This is our 2nd attempt to contact YOU! Call 0871-4719-523 BOX95QU BT National Rate']\r\n", + "['spam', 'You have won a Nokia 7250i. This is what you get when you win our FREE auction. To take part send Nokia to 86021 now. HG/Suite342/2Lands Row/W1JHL 16+']\r\n", + "['spam', \"Hello from Orange. For 1 month's free access to games, news and sport, plus 10 free texts and 20 photo messages, reply YES. Terms apply: www.orange.co.uk/ow\"]\r\n", + "['spam', 'Ur cash-balance is currently 500 pounds - to maximize ur cash-in now send GO to 86688 only 150p/msg. CC 08718720201 HG/Suite342/2Lands Row/W1J6HL']\r\n", + "['spam', 'SMS AUCTION - A BRAND NEW Nokia 7250 is up 4 auction today! Auction is FREE 2 join & take part! Txt NOKIA to 86021 now! HG/Suite342/2Lands Row/W1J6HL']\r\n", + "['spam', 'PRIVATE! Your 2003 Account Statement for shows 800 un-redeemed S. I. M. points. Call 08719899230 Identifier Code: 41685 Expires 07/11/04']\r\n", + "['spam', 'As a Registered Subscriber yr draw 4 a £100 gift voucher will b entered on receipt of a correct ans. When are the next olympics. Txt ans to 80062']\r\n", + "['spam', 'URGENT! Your Mobile number has been awarded with a £2000 prize GUARANTEED. Call 09061790121 from land line. Claim 3030. Valid 12hrs only 150ppm']\r\n", + "['spam', 'RT-KIng Pro Video Club>> Need help? info@ringtoneking.co.uk or call 08701237397 You must be 16+ Club credits redeemable at www.ringtoneking.co.uk! Enjoy!']\r\n", + "['spam', 'U have a secret admirer who is looking 2 make contact with U-find out who they R*reveal who thinks UR so special-call on 09058094599']\r\n", + "['spam', \"500 free text msgs. Just text ok to 80488 and we'll credit your account\"]\r\n", + "['spam', 'You have been selected to stay in 1 of 250 top British hotels - FOR NOTHING! Holiday Worth £350! To Claim, Call London 02072069400. Bx 526, SW73SS']\r\n", + "['spam', 'Eerie Nokia tones 4u, rply TONE TITLE to 8007 eg TONE DRACULA to 8007 Titles: GHOST, ADDAMSFA, MUNSTERS, EXORCIST, TWILIGHT www.getzed.co.uk POBox36504W45WQ 150p']\r\n", + "['spam', '0A$NETWORKS allow companies to bill for SMS, so they are responsible for their \"suppliers\", just as a shop has to give a guarantee on what they sell. B. G.']\r\n", + "['spam', 'FreeMsg:Feelin kinda lnly hope u like 2 keep me company! Jst got a cam moby wanna c my pic?Txt or reply DATE to 82242 Msg150p 2rcv Hlp 08712317606 stop to 82242']\r\n", + "['spam', \"For ur chance to win a £250 cash every wk TXT: ACTION to 80608. T's&C's www.movietrivia.tv custcare 08712405022, 1x150p/wk\"]\r\n", + "['spam', 'RGENT! This is the 2nd attempt to contact U!U have WON £1250 CALL 09071512433 b4 050703 T&CsBCM4235WC1N3XX. callcost 150ppm mobilesvary. max£7. 50']\r\n", + "['spam', 'Hi if ur lookin 4 saucy daytime fun wiv busty married woman Am free all next week Chat now 2 sort time 09099726429 JANINExx Calls£1/minMobsmoreLKPOBOX177HP51FL']\r\n", + "['spam', 'URGENT! We are trying to contact U. Todays draw shows that you have won a £800 prize GUARANTEED. Call 09050001295 from land line. Claim A21. Valid 12hrs only']\r\n", + "['spam', 'Monthly password for wap. mobsi.com is 391784. Use your wap phone not PC.']\r\n", + "['spam', 'todays vodafone numbers ending with 0089(my last four digits) are selected to received a £350 award. If your number matches please call 09063442151 to claim your £350 award']\r\n", + "['spam', 'Free Top ringtone -sub to weekly ringtone-get 1st week free-send SUBPOLY to 81618-?3 per week-stop sms-08718727870']\r\n", + "['spam', 'Sunshine Quiz Wkly Q! Win a top Sony DVD player if u know which country the Algarve is in? Txt ansr to 82277. £1.50 SP:Tyrone']\r\n", + "['spam', 'Free msg. Sorry, a service you ordered from 81303 could not be delivered as you do not have sufficient credit. Please top up to receive the service.']\r\n", + "['spam', \"Hard LIVE 121 chat just 60p/min. Choose your girl and connect LIVE. Call 09094646899 now! Cheap Chat UK's biggest live service. VU BCM1896WC1N3XX\"]\r\n", + "['spam', 'WOW! The Boys R Back. TAKE THAT 2007 UK Tour. Win VIP Tickets & pre-book with VIP Club. Txt CLUB to 81303. Trackmarque Ltd info@vipclub4u.']\r\n", + "['spam', 'Hi, this is Mandy Sullivan calling from HOTMIX FM...you are chosen to receive £5000.00 in our Easter Prize draw.....Please telephone 09041940223 to claim before 29/03/05 or your prize will be transferred to someone else....']\r\n", + "['spam', 'UR GOING 2 BAHAMAS! CallFREEFONE 08081560665 and speak to a live operator to claim either Bahamas cruise of£2000 CASH 18+only. To opt out txt X to 07786200117']\r\n", + "['spam', 'Someone has conacted our dating service and entered your phone because they fancy you!To find out who it is call from landline 09111030116. PoBox12n146tf15']\r\n", + "['spam', 'Hi 07734396839 IBH Customer Loyalty Offer: The NEW NOKIA6600 Mobile from ONLY £10 at TXTAUCTION!Txt word:START to No:81151 & get Yours Now!4T&']\r\n", + "['spam', 'SMS AUCTION You have won a Nokia 7250i. This is what you get when you win our FREE auction. To take part send Nokia to 86021 now. HG/Suite342/2Lands Row/W1JHL 16+']\r\n", + "['spam', 'Call FREEPHONE 0800 542 0578 now!']\r\n", + "['spam', 'Buy Space Invaders 4 a chance 2 win orig Arcade Game console. Press 0 for Games Arcade (std WAP charge) See o2.co.uk/games 4 Terms + settings. No purchase']\r\n", + "['spam', \"Loan for any purpose £500 - £75,000. Homeowners + Tenants welcome. Have you been previously refused? We can still help. Call Free 0800 1956669 or text back 'help'\"]\r\n", + "['spam', 'BIG BROTHER ALERT! The computer has selected u for 10k cash or #150 voucher. Call 09064018838. NTT PO Box CRO1327 18+ BT Landline Cost 150ppm mobiles vary']\r\n", + "['spam', 'WIN: We have a winner! Mr. T. Foley won an iPod! More exciting prizes soon, so keep an eye on ur mobile or visit www.win-82050.co.uk']\r\n", + "['spam', 'Todays Voda numbers ending 1225 are selected to receive a £50award. If you have a match please call 08712300220 quoting claim code 3100 standard rates app ']\r\n", + "['spam', 'Hottest pics straight to your phone!! See me getting Wet and Wanting, just for you xx Text PICS to 89555 now! txt costs 150p textoperator g696ga 18 XxX']\r\n", + "['spam', 'Hack Chat. Get backdoor entry into 121 chat rooms at a fraction of the cost. Reply NEO69 or call 09050280520, to subscribe 25p pm. DPS, Bcm box 8027 Ldn, wc1n3xx']\r\n", + "['spam', \"FREE NOKIA Or Motorola with upto 12mths 1/2price linerental, 500 FREE x-net mins&100txt/mth FREE B'tooth*. Call Mobileupd8 on 08001950382 or call 2optout/D3WV\"]\r\n", + "['spam', 'This is the 2nd time we have tried 2 contact u. U have won the 750 Pound prize. 2 claim is easy, call 08718726970 NOW! Only 10p per min. BT-national-rate ']\r\n", + "['spam', 'You have WON a guaranteed £1000 cash or a £2000 prize.To claim yr prize call our customer service representative on']\r\n", + "['spam', 'Would you like to see my XXX pics they are so hot they were nearly banned in the uk!']\r\n", + "['spam', 'HMV BONUS SPECIAL 500 pounds of genuine HMV vouchers to be won. Just answer 4 easy questions. Play Now! Send HMV to 86688 More info:www.100percent-real.com']\r\n", + "['spam', 'U have a secret admirer who is looking 2 make contact with U-find out who they R*reveal who thinks UR so special-call on 09058094594']\r\n", + "['spam', \"Dear 0776xxxxxxx U've been invited to XCHAT. This is our final attempt to contact u! Txt CHAT to 86688 150p/MsgrcvdHG/Suite342/2Lands/Row/W1J6HL LDN 18yrs \"]\r\n", + "['spam', 'Urgent! Please call 09061743811 from landline. Your ABTA complimentary 4* Tenerife Holiday or £5000 cash await collection SAE T&Cs Box 326 CW25WX 150ppm']\r\n", + "['spam', 'CALL 09090900040 & LISTEN TO EXTREME DIRTY LIVE CHAT GOING ON IN THE OFFICE RIGHT NOW TOTAL PRIVACY NO ONE KNOWS YOUR [sic] LISTENING 60P MIN 24/7MP 0870753331018+']\r\n", + "['spam', 'FreeMsg Hey U, i just got 1 of these video/pic fones, reply WILD to this txt & ill send U my pics, hurry up Im so bored at work xxx (18 150p/rcvd STOP2stop)']\r\n", + "['spam', \"Free entry in 2 a weekly comp for a chance to win an ipod. Txt POD to 80182 to get entry (std txt rate) T&C's apply 08452810073 for details 18+\"]\r\n", + "['spam', 'New TEXTBUDDY Chat 2 horny guys in ur area 4 just 25p Free 2 receive Search postcode or at gaytextbuddy.com. TXT ONE name to 89693. 08715500022 rpl Stop 2 cnl']\r\n", + "['spam', 'Call from 08702490080 - tells u 2 call 09066358152 to claim £5000 prize. U have 2 enter all ur mobile & personal details @ the prompts. Careful!']\r\n", + "['spam', 'Free 1st week entry 2 TEXTPOD 4 a chance 2 win 40GB iPod or £250 cash every wk. Txt VPOD to 81303 Ts&Cs www.textpod.net custcare 08712405020.']\r\n", + "['spam', \"More people are dogging in your area now. Call 09090204448 and join like minded guys. Why not arrange 1 yourself. There's 1 this evening. A£1.50 minAPN LS278BB\"]\r\n", + "['spam', 'WELL DONE! Your 4* Costa Del Sol Holiday or £5000 await collection. Call 09050090044 Now toClaim. SAE, TCs, POBox334, Stockport, SK38xh, Cost£1.50/pm, Max10mins']\r\n", + "['spam', 'Guess what! Somebody you know secretly fancies you! Wanna find out who it is? Give us a call on 09065394973 from Landline DATEBox1282EssexCM61XN 150p/min 18']\r\n", + "['spam', 'it to 80488. Your 500 free text messages are valid until 31 December 2005.']\r\n", + "['spam', 'You have won a guaranteed £200 award or even £1000 cashto claim UR award call free on 08000407165 (18+) 2 stop getstop on 88222 PHP']\r\n", + "['spam', 'Reply to win £100 weekly! Where will the 2006 FIFA World Cup be held? Send STOP to 87239 to end service']\r\n", + "['spam', 'Urgent! Please call 09061743810 from landline. Your ABTA complimentary 4* Tenerife Holiday or #5000 cash await collection SAE T&Cs Box 326 CW25WX 150 ppm']\r\n", + "['spam', 'Free tones Hope you enjoyed your new content. text stop to 61610 to unsubscribe. help:08712400602450p Provided by tones2you.co.uk']\r\n", + "['spam', 'TheMob>Yo yo yo-Here comes a new selection of hot downloads for our members to get for FREE! Just click & open the next link sent to ur fone...']\r\n", + "['spam', 'Great News! Call FREEFONE 08006344447 to claim your guaranteed £1000 CASH or £2000 gift. Speak to a live operator NOW!']\r\n", + "['spam', 'U can WIN £100 of Music Gift Vouchers every week starting NOW Txt the word DRAW to 87066 TsCs www.ldew.com SkillGame,1Winaweek, age16.150ppermessSubscription']\r\n", + "['spam', '4mths half price Orange line rental & latest camera phones 4 FREE. Had your phone 11mths ? Call MobilesDirect free on 08000938767 to update now! or2stoptxt']\r\n", + "['spam', 'Call 09094100151 to use ur mins! Calls cast 10p/min (mob vary). Service provided by AOM, just GBP5/month. AOM Box61,M60 1ER until u stop. Ages 18+ only!']\r\n", + "['spam', 'URGENT! Your mobile No *********** WON a £2,000 Bonus Caller Prize on 02/06/03! This is the 2nd attempt to reach YOU! Call 09066362220 ASAP! BOX97N7QP, 150ppm']\r\n", + "['spam', 'Eerie Nokia tones 4u, rply TONE TITLE to 8007 eg TONE DRACULA to 8007 Titles: GHOST, ADDAMSFA, MUNSTERS, EXORCIST, TWILIGHT www.getzed.co.uk POBox36504W45WQ 150p ']\r\n", + "['spam', 'Sexy Singles are waiting for you! Text your AGE followed by your GENDER as wither M or F E.G.23F. For gay men text your AGE followed by a G. e.g.23G.']\r\n", + "['spam', 'FreeMsg: Claim ur 250 SMS messages-Text OK to 84025 now!Use web2mobile 2 ur mates etc. Join Txt250.com for 1.50p/wk. T&C BOX139, LA32WU. 16 . Remove txtX or stop']\r\n", + "['spam', '85233 FREE>Ringtone!Reply REAL']\r\n", + "['spam', 'Well done ENGLAND! Get the official poly ringtone or colour flag on yer mobile! text TONE or FLAG to 84199 NOW! Opt-out txt ENG STOP. Box39822 W111WX £1.50']\r\n", + "['spam', 'Final Chance! Claim ur £150 worth of discount vouchers today! Text YES to 85023 now! SavaMob, member offers mobile! T Cs SavaMob POBOX84, M263UZ. £3.00 Subs 16']\r\n", + "['spam', 'PRIVATE! Your 2004 Account Statement for 07742676969 shows 786 unredeemed Bonus Points. To claim call 08719180248 Identifier Code: 45239 Expires']\r\n", + "['spam', 'SMS SERVICES. for your inclusive text credits, pls goto www.comuk.net login= ***** unsubscribe with STOP. no extra charge. help:08700469649. PO BOX420. IP4 5WE']\r\n", + "['spam', \"FREE2DAY sexy St George's Day pic of Jordan!Txt PIC to 89080 dont miss out, then every wk a saucy celeb!4 more pics c PocketBabe.co.uk 0870241182716 £3/wk\"]\r\n", + "['spam', 'You are a winner you have been specially selected to receive £1000 cash or a £2000 award. Speak to a live operator to claim call 087123002209am-7pm. Cost 10p']\r\n", + "['spam', 'Sunshine Hols. To claim ur med holiday send a stamped self address envelope to Drinks on Us UK, PO Box 113, Bray, Wicklow, Eire. Quiz Starts Saturday! Unsub Stop']\r\n", + "['spam', 'U can WIN £100 of Music Gift Vouchers every week starting NOW Txt the word DRAW to 87066 TsCs www.Idew.com SkillGame, 1Winaweek, age16. 150ppermessSubscription']\r\n", + "['spam', \"+123 Congratulations - in this week's competition draw u have won the £1450 prize to claim just call 09050002311 b4280703. T&Cs/stop SMS 08718727868. Over 18 only 150ppm\"]\r\n", + "['spam', 'Your B4U voucher w/c 27/03 is MARSMS. Log onto www.B4Utele.com for discount credit. To opt out reply stop. Customer care call 08717168528']\r\n", + "['spam', \"FreeMsg: Hey - I'm Buffy. 25 and love to satisfy men. Home alone feeling randy. Reply 2 C my PIX! QlynnBV Help08700621170150p a msg Send stop to stop txts\"]\r\n", + "['spam', 'Sunshine Hols. To claim ur med holiday send a stamped self address envelope to Drinks on Us UK, PO Box 113, Bray, Wicklow, Eire. Quiz Starts Saturday! Unsub Stop']\r\n", + "['spam', 'FREE for 1st week! No1 Nokia tone 4 ur mob every week just txt NOKIA to 87077 Get txting and tell ur mates. zed POBox 36504 W45WQ norm150p/tone 16+']\r\n", + "['spam', 'Shop till u Drop, IS IT YOU, either 10K, 5K, £500 Cash or £100 Travel voucher, Call now, 09064011000. NTT PO Box CR01327BT fixedline Cost 150ppm mobile vary']\r\n", + "['spam', 'FREE camera phones with linerental from 4.49/month with 750 cross ntwk mins. 1/2 price txt bundle deals also avble. Call 08001950382 or call2optout/J MF']\r\n", + "['spam', 'URGENT! Your mobile No 07xxxxxxxxx won a £2,000 bonus caller prize on 02/06/03! this is the 2nd attempt to reach YOU! call 09066362231 ASAP! BOX97N7QP, 150PPM']\r\n", + "['spam', 'URGENT!! Your 4* Costa Del Sol Holiday or £5000 await collection. Call 09050090044 Now toClaim. SAE, TC s, POBox334, Stockport, SK38xh, Cost£1.50/pm, Max10mins']\r\n", + "['spam', 'You have WON a guaranteed £1000 cash or a £2000 prize. To claim yr prize call our customer service representative on 08714712379 between 10am-7pm Cost 10p']\r\n", + "['spam', 'Thanks for your ringtone order, ref number K718. Your mobile will be charged £4.50. Should your tone not arrive please call customer services on 09065069120']\r\n", + "['spam', \"Hi ya babe x u 4goten bout me?' scammers getting smart..Though this is a regular vodafone no, if you respond you get further prem rate msg/subscription. Other nos used also. Beware!\"]\r\n", + "['spam', 'Back 2 work 2morro half term over! Can U C me 2nite 4 some sexy passion B4 I have 2 go back? Chat NOW 09099726481 Luv DENA Calls £1/minMobsmoreLKPOBOX177HP51FL']\r\n", + "['spam', 'Thanks for your ringtone order, ref number R836. Your mobile will be charged £4.50. Should your tone not arrive please call customer services on 09065069154']\r\n", + "['spam', 'SplashMobile: Choose from 1000s of gr8 tones each wk! This is a subscrition service with weekly tones costing 300p. U have one credit - kick back and ENJOY']\r\n", + "['spam', 'Not heard from U4 a while. Call 4 rude chat private line 01223585334 to cum. Wan 2C pics of me gettin shagged then text PIX to 8552. 2End send STOP 8552 SAM xxx']\r\n", + "['spam', 'FREE entry into our £250 weekly comp just send the word ENTER to 88877 NOW. 18 T&C www.textcomp.com']\r\n", + "['spam', '88066 FROM 88066 LOST 3POUND HELP']\r\n", + "['spam', 'Had your mobile 11mths ? Update for FREE to Oranges latest colour camera mobiles & unlimited weekend calls. Call Mobile Upd8 on freefone 08000839402 or 2StopTx']\r\n", + "['spam', 'You have 1 new message. Please call 08718738034.']\r\n", + "['spam', 'Hi - this is your Mailbox Messaging SMS alert. You have 4 messages. You have 21 matches. Please call back on 09056242159 to retrieve your messages and matches']\r\n", + "['spam', 'Congrats! 1 year special cinema pass for 2 is yours. call 09061209465 now! C Suprman V, Matrix3, StarWars3, etc all 4 FREE! bx420-ip4-5we. 150pm. Dont miss out!']\r\n", + "['spam', 'WIN a year supply of CDs 4 a store of ur choice worth £500 & enter our £100 Weekly draw txt MUSIC to 87066 Ts&Cs www.Ldew.com.subs16+1win150ppmx3']\r\n", + "['spam', 'Moby Pub Quiz.Win a £100 High Street prize if u know who the new Duchess of Cornwall will be? Txt her first name to 82277.unsub STOP £1.50 008704050406 SP Arrow']\r\n", + "['spam', 'You have won a Nokia 7250i. This is what you get when you win our FREE auction. To take part send Nokia to 86021 now. HG/Suite342/2Lands Row/W1JHL 16+ ']\r\n", + "['spam', 'Congratulations! Thanks to a good friend U have WON the £2,000 Xmas prize. 2 claim is easy, just call 08718726971 NOW! Only 10p per minute. BT-national-rate.']\r\n", + "['spam', 'tddnewsletter@emc1.co.uk (More games from TheDailyDraw) Dear Helen, Dozens of Free Games - with great prizesWith..']\r\n", + "['spam', 'URGENT! Your mobile number *************** WON a £2000 Bonus Caller prize on 10/06/03! This is the 2nd attempt to reach you! Call 09066368753 ASAP! Box 97N7QP, 150ppm']\r\n", + "['spam', 'Double your mins & txts on Orange or 1/2 price linerental - Motorola and SonyEricsson with B/Tooth FREE-Nokia FREE Call MobileUpd8 on 08000839402 or2optout/HV9D']\r\n", + "['spam', 'Download as many ringtones as u like no restrictions, 1000s 2 choose. U can even send 2 yr buddys. Txt Sir to 80082 £3 ']\r\n", + "['spam', 'Please CALL 08712402902 immediately as there is an urgent message waiting for you.']\r\n", + "['spam', 'Spook up your mob with a Halloween collection of a logo & pic message plus a free eerie tone, txt CARD SPOOK to 8007 zed 08701417012150p per logo/pic']\r\n", + "['spam', 'Fantasy Football is back on your TV. Go to Sky Gamestar on Sky Active and play £250k Dream Team. Scoring starts on Saturday, so register now!SKY OPT OUT to 88088']\r\n", + "['spam', 'Tone Club: Your subs has now expired 2 re-sub reply MONOC 4 monos or POLYC 4 polys 1 weekly @ 150p per week Txt STOP 2 stop This msg free Stream 0871212025016']\r\n", + "['spam', 'XMAS Prize draws! We are trying to contact U. Todays draw shows that you have won a £2000 prize GUARANTEED. Call 09058094565 from land line. Valid 12hrs only']\r\n", + "['spam', 'YES! The only place in town to meet exciting adult singles is now in the UK. Txt CHAT to 86688 now! 150p/Msg.']\r\n", + "['spam', 'Someone has contacted our dating service and entered your phone becausethey fancy you! To find out who it is call from a landline 09058098002. PoBox1, W14RG 150p']\r\n", + "['spam', 'Babe: U want me dont u baby! Im nasty and have a thing 4 filthyguys. Fancy a rude time with a sexy bitch. How about we go slo n hard! Txt XXX SLO(4msgs)']\r\n", + "['spam', \"I don't know u and u don't know me. Send CHAT to 86688 now and let's find each other! Only 150p/Msg rcvd. HG/Suite342/2Lands/Row/W1J6HL LDN. 18 years or over.\"]\r\n", + "['spam', 'SMS SERVICES For your inclusive text credits pls gotto www.comuk.net login 3qxj9 unsubscribe with STOP no extra charge help 08702840625 comuk.220cm2 9AE']\r\n", + "['spam', 'Valentines Day Special! Win over £1000 in our quiz and take your partner on the trip of a lifetime! Send GO to 83600 now. 150p/msg rcvd. CustCare:08718720201']\r\n", + "['spam', \"Guess who am I?This is the first time I created a web page WWW.ASJESUS.COM read all I wrote. I'm waiting for your opinions. I want to be your friend 1/1\"]\r\n", + "['spam', \"For ur chance to win £250 cash every wk TXT: PLAY to 83370. T's&C's www.music-trivia.net custcare 08715705022, 1x150p/wk.\"]\r\n", + "['spam', 'Final Chance! Claim ur £150 worth of discount vouchers today! Text YES to 85023 now! SavaMob, member offers mobile! T Cs SavaMob POBOX84, M263UZ. £3.00 Subs 16']\r\n", + "['spam', 'Sppok up ur mob with a Halloween collection of nokia logo&pic message plus a FREE eerie tone, txt CARD SPOOK to 8007']\r\n", + "['spam', 'Urgent! call 09066612661 from landline. Your complementary 4* Tenerife Holiday or £10,000 cash await collection SAE T&Cs PO Box 3 WA14 2PX 150ppm 18+ Sender: Hol Offer']\r\n", + "['spam', 'WINNER! As a valued network customer you hvae been selected to receive a £900 reward! To collect call 09061701444. Valid 24 hours only. ACL03530150PM']\r\n", + "['spam', 'U have won a nokia 6230 plus a free digital camera. This is what u get when u win our FREE auction. To take part send NOKIA to 83383 now. POBOX114/14TCR/W1 16']\r\n", + "['spam', 'FREE entry into our £250 weekly comp just send the word WIN to 80086 NOW. 18 T&C www.txttowin.co.uk']\r\n", + "['spam', 'Text82228>> Get more ringtones, logos and games from www.txt82228.com. Questions: info@txt82228.co.uk']\r\n", + "['spam', 'FreeMSG You have been awarded a FREE mini DIGITAL CAMERA, just reply SNAP to collect your prize! (quizclub Opt out? Stop 80122300p/wk SP:RWM Ph:08704050406)']\r\n", + "['spam', 'This message is brought to you by GMW Ltd. and is not connected to the']\r\n", + "['spam', 'Congrats 2 mobile 3G Videophones R yours. call 09063458130 now! videochat wid ur mates, play java games, Dload polypH music, noline rentl. bx420. ip4. 5we. 150p']\r\n", + "['spam', 'Your next amazing xxx PICSFREE1 video will be sent to you enjoy! If one vid is not enough for 2day text back the keyword PICSFREE1 to get the next video.']\r\n", + "['spam', 'U are subscribed to the best Mobile Content Service in the UK for £3 per ten days until you send STOP to 83435. Helpline 08706091795.']\r\n", + "['spam', '3 FREE TAROT TEXTS! Find out about your love life now! TRY 3 FOR FREE! Text CHANCE to 85555 16 only! After 3 Free, Msgs £1.50 each']\r\n", + "['spam', \"Join the UK's horniest Dogging service and u can have sex 2nite!. Just sign up and follow the instructions. Txt ENTRY to 69888 now! Nyt.EC2A.3LP.msg@150p\"]\r\n", + "['spam', 'Sunshine Quiz Wkly Q! Win a top Sony DVD player if u know which country Liverpool played in mid week? Txt ansr to 82277. £1.50 SP:Tyrone']\r\n", + "['spam', 'Knock Knock Txt whose there to 80082 to enter r weekly draw 4 a £250 gift voucher 4 a store of yr choice. T&Cs www.tkls.com age16 to stoptxtstop£1.50/week']\r\n", + "['spam', 'Hi - this is your Mailbox Messaging SMS alert. You have 40 matches. Please call back on 09056242159 to retrieve your messages and matches cc100p/min']\r\n", + "['spam', 'FREE RING TONE just text \"POLYS\" to 87131. Then every week get a new tone. 0870737910216yrs only £1.50/wk.']\r\n", + "['spam', 'URGENT! Your mobile No 077xxx WON a £2,000 Bonus Caller Prize on 02/06/03! This is the 2nd attempt to reach YOU! Call 09066362206 ASAP! BOX97N7QP, 150ppm']\r\n", + "['spam', 'You are guaranteed the latest Nokia Phone, a 40GB iPod MP3 player or a £500 prize! Txt word: COLLECT to No: 83355! IBHltd LdnW15H 150p/Mtmsgrcvd18']\r\n", + "['spam', 'Hello darling how are you today? I would love to have a chat, why dont you tell me what you look like and what you are in to sexy?']\r\n", + "['spam', '8007 FREE for 1st week! No1 Nokia tone 4 ur mob every week just txt NOKIA to 8007 Get txting and tell ur mates www.getzed.co.uk POBox 36504 W4 5WQ norm 150p/tone 16+']\r\n", + "['spam', \"Wanna get laid 2nite? Want real Dogging locations sent direct to ur mobile? Join the UK's largest Dogging Network. Txt PARK to 69696 now! Nyt. ec2a. 3lp £1.50/msg\"]\r\n", + "['spam', 'we tried to contact you re your response to our offer of a new nokia fone and camcorder hit reply or call 08000930705 for delivery']\r\n", + "['spam', 'New Tones This week include: 1)McFly-All Ab.., 2) Sara Jorge-Shock.. 3) Will Smith-Switch.. To order follow instructions on next message']\r\n", + "['spam', 'URGENT! We are trying to contact U. Todays draw shows that you have won a £800 prize GUARANTEED. Call 09050003091 from land line. Claim C52. Valid 12hrs only']\r\n", + "['spam', 'sports fans - get the latest sports news str* 2 ur mobile 1 wk FREE PLUS a FREE TONE Txt SPORT ON to 8007 www.getzed.co.uk 0870141701216+ norm 4txt/120p ']\r\n", + "['spam', 'Urgent Urgent! We have 800 FREE flights to Europe to give away, call B4 10th Sept & take a friend 4 FREE. Call now to claim on 09050000555. BA128NNFWFLY150ppm']\r\n", + "['spam', 'FROM 88066 LOST £12 HELP']\r\n", + "['spam', 'FreeMsg: Fancy a flirt? Reply DATE now & join the UKs fastest growing mobile dating service. Msgs rcvd just 25p to optout txt stop to 83021. Reply DATE now!']\r\n", + "['spam', 'Great NEW Offer - DOUBLE Mins & DOUBLE Txt on best Orange tariffs AND get latest camera phones 4 FREE! Call MobileUpd8 free on 08000839402 NOW! or 2stoptxt T&Cs']\r\n", + "['spam', 'Hope you enjoyed your new content. text stop to 61610 to unsubscribe. help:08712400602450p Provided by tones2you.co.uk']\r\n", + "['spam', '18 days to Euro2004 kickoff! U will be kept informed of all the latest news and results daily. Unsubscribe send GET EURO STOP to 83222.']\r\n", + "['spam', 'Urgent Please call 09066612661 from landline. £5000 cash or a luxury 4* Canary Islands Holiday await collection. T&Cs SAE award. 20M12AQ. 150ppm. 16+ “']\r\n", + "['spam', 'Urgent! Please call 09066612661 from your landline, your complimentary 4* Lux Costa Del Sol holiday or £1000 CASH await collection. ppm 150 SAE T&Cs James 28, EH74RR']\r\n", + "['spam', \"I don't know u and u don't know me. Send CHAT to 86688 now and let's find each other! Only 150p/Msg rcvd. HG/Suite342/2Lands/Row/W1J6HL LDN. 18 years or over.\"]\r\n", + "['spam', 'Married local women looking for discreet action now! 5 real matches instantly to your phone. Text MATCH to 69969 Msg cost 150p 2 stop txt stop BCMSFWC1N3XX']\r\n", + "['spam', 'Burger King - Wanna play footy at a top stadium? Get 2 Burger King before 1st Sept and go Large or Super with Coca-Cola and walk out a winner']\r\n", + "['spam', 'How come it takes so little time for a child who is afraid of the dark to become a teenager who wants to stay out all night?']\r\n", + "['spam', \"For ur chance to win a £250 cash every wk TXT: ACTION to 80608. T's&C's www.movietrivia.tv custcare 08712405022, 1x150p/wk.\"]\r\n", + "['spam', 'U’ve Bin Awarded £50 to Play 4 Instant Cash. Call 08715203028 To Claim. EVERY 9th Player Wins Min £50-£500. OptOut 08718727870']\r\n", + "['spam', 'FreeMsg>FAV XMAS TONES!Reply REAL']\r\n", + "['spam', 'December only! Had your mobile 11mths+? You are entitled to update to the latest colour camera mobile for Free! Call The Mobile Update Co FREE on 08002986906 ']\r\n", + "['spam', 'Gr8 Poly tones 4 ALL mobs direct 2u rply with POLY TITLE to 8007 eg POLY BREATHE1 Titles: CRAZYIN, SLEEPINGWITH, FINEST, YMCA :getzed.co.uk POBox365O4W45WQ 300p']\r\n", + "['spam', \"INTERFLORA - \\x93It's not too late to order Interflora flowers for christmas call 0800 505060 to place your order before Midnight tomorrow.\"]\r\n", + "['spam', 'ROMCAPspam Everyone around should be responding well to your presence since you are so warm and outgoing. You are bringing in a real breath of sunshine.']\r\n", + "['spam', 'Congratulations - Thanks to a good friend U have WON the £2,000 Xmas prize. 2 claim is easy, just call 08712103738 NOW! Only 10p per minute. BT-national-rate']\r\n", + "['spam', 'Send a logo 2 ur lover - 2 names joined by a heart. Txt LOVE NAME1 NAME2 MOBNO eg LOVE ADAM EVE 07123456789 to 87077 Yahoo! POBox36504W45WQ TxtNO 4 no ads 150p.']\r\n", + "['spam', \"You've won tkts to the EURO2004 CUP FINAL or £800 CASH, to collect CALL 09058099801 b4190604, POBOX 7876150ppm\"]\r\n", + "['spam', \"Free-message: Jamster!Get the crazy frog sound now! For poly text MAD1, for real text MAD2 to 88888. 6 crazy sounds for just 3 GBP/week! 16+only! T&C's apply\"]\r\n", + "['spam', 'YOUR CHANCE TO BE ON A REALITY FANTASY SHOW call now = 08707509020 Just 20p per min NTT Ltd, PO Box 1327 Croydon CR9 5WB 0870 is a national = rate call']\r\n", + "['spam', 'Adult 18 Content Your video will be with you shortly']\r\n", + "['spam', 'YOUR CHANCE TO BE ON A REALITY FANTASY SHOW call now = 08707509020 Just 20p per min NTT Ltd, PO Box 1327 Croydon CR9 5WB 0870 is a national = rate call.']\r\n", + "['spam', 'Hey Boys. Want hot XXX pics sent direct 2 ur phone? Txt PORN to 69855, 24Hrs free and then just 50p per day. To stop text STOPBCM SF WC1N3XX']\r\n", + "['spam', 'Last Chance! Claim ur £150 worth of discount vouchers today! Text SHOP to 85023 now! SavaMob, offers mobile! T Cs SavaMob POBOX84, M263UZ. £3.00 Sub. 16']\r\n", + "['spam', 'pdate_Now - Double mins and 1000 txts on Orange tariffs. Latest Motorola, SonyEricsson & Nokia & Bluetooth FREE! Call MobileUpd8 on 08000839402 or call2optout/!YHL']\r\n", + "['spam', 'Ur cash-balance is currently 500 pounds - to maximize ur cash-in now send CASH to 86688 only 150p/msg. CC: 08718720201 PO BOX 114/14 TCR/W1']\r\n", + "['spam', 'URGENT! Your Mobile number has been awarded with a £2000 prize GUARANTEED. Call 09058094454 from land line. Claim 3030. Valid 12hrs only']\r\n", + "['spam', 'Sorry! U can not unsubscribe yet. THE MOB offer package has a min term of 54 weeks> pls resubmit request after expiry. Reply THEMOB HELP 4 more info']\r\n", + "['spam', 'You have 1 new message. Please call 08712400200.']\r\n", + "['spam', 'We currently have a message awaiting your collection. To collect your message just call 08718723815.']\r\n", + "['spam', 'URGENT! Your mobile was awarded a £1,500 Bonus Caller Prize on 27/6/03. Our final attempt 2 contact U! Call 08714714011']\r\n", + "['spam', 'U have a secret admirer. REVEAL who thinks U R So special. Call 09065174042. To opt out Reply REVEAL STOP. 1.50 per msg recd. Cust care 07821230901']\r\n", + "['spam', \"Do you ever notice that when you're driving, anyone going slower than you is an idiot and everyone driving faster than you is a maniac?\"]\r\n", + "['spam', 'Xmas Offer! Latest Motorola, SonyEricsson & Nokia & FREE Bluetooth or DVD! Double Mins & 1000 Txt on Orange. Call MobileUpd8 on 08000839402 or call2optout/4QF2']\r\n", + "['spam', 'Reply to win £100 weekly! What professional sport does Tiger Woods play? Send STOP to 87239 to end service']\r\n", + "['spam', 'No 1 POLYPHONIC tone 4 ur mob every week! Just txt PT2 to 87575. 1st Tone FREE ! so get txtin now and tell ur friends. 150p/tone. 16 reply HL 4info']\r\n", + "['spam', 'HOT LIVE FANTASIES call now 08707509020 Just 20p per min NTT Ltd, PO Box 1327 Croydon CR9 5WB 0870 is a national rate call']\r\n", + "['spam', 'This message is free. Welcome to the new & improved Sex & Dogging club! To unsubscribe from this service reply STOP. msgs@150p 18+only']\r\n", + "['spam', \"You've won tkts to the EURO2004 CUP FINAL or £800 CASH, to collect CALL 09058099801 b4190604, POBOX 7876150ppm\"]\r\n", + "['spam', \"Loan for any purpose £500 - £75,000. Homeowners + Tenants welcome. Have you been previously refused? We can still help. Call Free 0800 1956669 or text back 'help'\"]\r\n", + "['spam', 'Update_Now - 12Mths Half Price Orange line rental: 400mins...Call MobileUpd8 on 08000839402 or call2optout=J5Q']\r\n", + "['spam', 'FREE UNLIMITED HARDCORE PORN direct 2 your mobile Txt PORN to 69200 & get FREE access for 24 hrs then chrgd@50p per day txt Stop 2exit. This msg is free']\r\n", + "['spam', 'EASTENDERS TV Quiz. What FLOWER does DOT compare herself to? D= VIOLET E= TULIP F= LILY txt D E or F to 84025 NOW 4 chance 2 WIN £100 Cash WKENT/150P16+']\r\n", + "['spam', 'You are now unsubscribed all services. Get tons of sexy babes or hunks straight to your phone! go to http://gotbabes.co.uk. No subscriptions.']\r\n", + "['spam', 'Hi babe its Jordan, how r u? Im home from abroad and lonely, text me back if u wanna chat xxSP visionsms.com Text stop to stopCost 150p 08712400603']\r\n", + "['spam', 'Get a brand new mobile phone by being an agent of The Mob! Plus loads more goodies! For more info just text MAT to 87021.']\r\n", + "['spam', 'LORD OF THE RINGS:RETURN OF THE KING in store NOW!REPLY LOTR by 2 June 4 Chance 2 WIN LOTR soundtrack CDs StdTxtRate. Reply STOP to end txts']\r\n", + "['spam', 'Good Luck! Draw takes place 28th Feb 06. Good Luck! For removal send STOP to 87239 customer services 08708034412']\r\n", + "['spam', \"Free entry in 2 a weekly comp for a chance to win an ipod. Txt POD to 80182 to get entry (std txt rate) T&C's apply 08452810073 for details 18+\"]\r\n", + "['spam', '1st wk FREE! Gr8 tones str8 2 u each wk. Txt NOKIA ON to 8007 for Classic Nokia tones or HIT ON to 8007 for Polys. Nokia/150p Poly/200p 16+']\r\n", + "['spam', \"LookAtMe!: Thanks for your purchase of a video clip from LookAtMe!, you've been charged 35p. Think you can do better? Why not send a video in a MMSto 32323.\"]\r\n", + "['spam', 'sexy sexy cum and text me im wet and warm and ready for some porn! u up for some fun? THIS MSG IS FREE RECD MSGS 150P INC VAT 2 CANCEL TEXT STOP']\r\n", + "['spam', \"Hard LIVE 121 chat just 60p/min. Choose your girl and connect LIVE. Call 09094646899 now! Cheap Chat UK's biggest live service. VU BCM1896WC1N3XX\"]\r\n", + "['spam', 'Not heard from U4 a while. Call 4 rude chat private line 01223585334 to cum. Wan 2C pics of me gettin shagged then text PIX to 8552. 2End send STOP 8552 SAM xxx']\r\n", + "['spam', 'This is the 2nd time we have tried to contact u. U have won the £1450 prize to claim just call 09053750005 b4 310303. T&Cs/stop SMS 08718725756. 140ppm']\r\n", + "['spam', 'HOT LIVE FANTASIES call now 08707509020 Just 20p per min NTT Ltd, PO Box 1327 Croydon CR9 5WB 0870..k']\r\n", + "['spam', 'Dear Voucher Holder, To claim this weeks offer, at you PC please go to http://www.e-tlp.co.uk/reward. Ts&Cs apply.']\r\n", + "['spam', 'UR GOING 2 BAHAMAS! CallFREEFONE 08081560665 and speak to a live operator to claim either Bahamas cruise of£2000 CASH 18+only. To opt out txt X to 07786200117']\r\n", + "['spam', 'This is the 2nd time we have tried 2 contact u. U have won the 750 Pound prize. 2 claim is easy, call 08712101358 NOW! Only 10p per min. BT-national-rate']\r\n", + "['spam', 'UR awarded a City Break and could WIN a £200 Summer Shopping spree every WK. Txt STORE to 88039.SkilGme.TsCs087147403231Winawk!Age16+£1.50perWKsub']\r\n", + "['spam', 'URGENT! We are trying to contact U. Todays draw shows that you have won a £2000 prize GUARANTEED. Call 09066358361 from land line. Claim Y87. Valid 12hrs only']\r\n", + "['spam', 'Thanks for your ringtone order, reference number X29. Your mobile will be charged 4.50. Should your tone not arrive please call customer services 09065989180']\r\n", + "['spam', 'SIX chances to win CASH! From 100 to 20,000 pounds txt> CSH11 and send to 87575. Cost 150p/day, 6days, 16+ TsandCs apply Reply HL 4 info']\r\n", + "['spam', 'Ur cash-balance is currently 500 pounds - to maximize ur cash-in now send COLLECT to 83600 only 150p/msg. CC: 08718720201 PO BOX 114/14 TCR/W1']\r\n", + "['spam', 'Congratulations! Thanks to a good friend U have WON the £2,000 Xmas prize. 2 claim is easy, just call 08718726978 NOW! Only 10p per minute. BT-national-rate']\r\n", + "['spam', '44 7732584351, Do you want a New Nokia 3510i colour phone DeliveredTomorrow? With 300 free minutes to any mobile + 100 free texts + Free Camcorder reply or call 08000930705.']\r\n", + "['spam', 'You have 1 new voicemail. Please call 08719181513.']\r\n", + "['spam', 'Someone U know has asked our dating service 2 contact you! Cant Guess who? CALL 09058097189 NOW all will be revealed. POBox 6, LS15HB 150p ']\r\n", + "['spam', 'Camera - You are awarded a SiPix Digital Camera! call 09061221066 fromm landline. Delivery within 28 days']\r\n", + "['spam', 'Todays Voda numbers ending 5226 are selected to receive a ?350 award. If you hava a match please call 08712300220 quoting claim code 1131 standard rates app ']\r\n", + "['spam', 'This message is free. Welcome to the new & improved Sex & Dogging club! To unsubscribe from this service reply STOP. msgs@150p 18 only']\r\n", + "['spam', \"RCT' THNQ Adrian for U text. Rgds Vatian\"]\r\n", + "['spam', 'FREE MESSAGE Activate your 500 FREE Text Messages by replying to this message with the word FREE For terms & conditions, visit www.07781482378.com']\r\n", + "['spam', 'You are being contacted by our dating service by someone you know! To find out who it is, call from a land line 09050000928. PoBox45W2TG150P']\r\n", + "['spam', \"Sorry I missed your call let's talk when you have the time. I'm on 07090201529\"]\r\n", + "['spam', 'complimentary 4 STAR Ibiza Holiday or £10,000 cash needs your URGENT collection. 09066364349 NOW from Landline not to lose out! Box434SK38WP150PPM18+']\r\n", + "['spam', 'FREE MSG:We billed your mobile number by mistake from shortcode 83332.Please call 08081263000 to have charges refunded.This call will be free from a BT landline']\r\n", + "['spam', 'Please CALL 08712402972 immediately as there is an urgent message waiting for you']\r\n", + "['spam', 'URGENT! Your Mobile number has been awarded with a £2000 Bonus Caller Prize. Call 09058095201 from land line. Valid 12hrs only']\r\n", + "['spam', 'As a valued customer, I am pleased to advise you that following recent review of your Mob No. you are awarded with a £1500 Bonus Prize, call 09066364589']\r\n", + "['spam', 'Do you want a New Nokia 3510i colour phone DeliveredTomorrow? With 300 free minutes to any mobile + 100 free texts + Free Camcorder reply or call 08000930705']\r\n", + "['spam', \"LIFE has never been this much fun and great until you came in. You made it truly special for me. I won't forget you! enjoy @ one gbp/sms\"]\r\n", + "['spam', 'Do you want a new Video phone? 600 anytime any network mins 400 Inclusive Video calls AND downloads 5 per week Free delTOMORROW call 08002888812 or reply NOW']\r\n", + "['spam', 'As a valued customer, I am pleased to advise you that following recent review of your Mob No. you are awarded with a £1500 Bonus Prize, call 09066368470']\r\n", + "['spam', 'Welcome! Please reply with your AGE and GENDER to begin. e.g 24M']\r\n", + "['spam', 'Freemsg: 1-month unlimited free calls! Activate SmartCall Txt: CALL to No: 68866. Subscriptn3gbp/wk unlimited calls Help: 08448714184 Stop?txt stop landlineonly']\r\n", + "['spam', 'Had your mobile 10 mths? Update to latest Orange camera/video phones for FREE. Save £s with Free texts/weekend calls. Text YES for a callback orno to opt out']\r\n", + "['spam', 'Am new 2 club & dont fink we met yet Will B gr8 2 C U Please leave msg 2day wiv ur area 09099726553 reply promised CARLIE x Calls£1/minMobsmore LKPOBOX177HP51FL']\r\n", + "['spam', 'Camera - You are awarded a SiPix Digital Camera! call 09061221066 fromm landline. Delivery within 28 days.']\r\n", + "['spam', \"Get a FREE mobile video player FREE movie. To collect text GO to 89105. Its free! Extra films can be ordered t's and c's apply. 18 yrs only\"]\r\n", + "['spam', 'Save money on wedding lingerie at www.bridal.petticoatdreams.co.uk Choose from a superb selection with national delivery. Brought to you by WeddingFriend']\r\n", + "['spam', 'Not heard from U4 a while. Call me now am here all night with just my knickers on. Make me beg for it like U did last time 01223585236 XX Luv Nikiyu4.net']\r\n", + "['spam', 'Bloomberg -Message center +447797706009 Why wait? Apply for your future http://careers. bloomberg.com']\r\n", + "['spam', 'URGENT! We are trying to contact U. Todays draw shows that you have won a £800 prize GUARANTEED. Call 09050001808 from land line. Claim M95. Valid12hrs only']\r\n", + "['spam', 'Do you want a NEW video phone750 anytime any network mins 150 text for only five pounds per week call 08000776320 now or reply for delivery tomorrow']\r\n", + "['spam', 'You are being contacted by our dating service by someone you know! To find out who it is, call from a land line 09050000878. PoBox45W2TG150P']\r\n", + "['spam', 'Wan2 win a Meet+Greet with Westlife 4 U or a m8? They are currently on what tour? 1)Unbreakable, 2)Untamed, 3)Unkempt. Text 1,2 or 3 to 83049. Cost 50p +std text']\r\n", + "['spam', 'Dorothy@kiefer.com (Bank of Granite issues Strong-Buy) EXPLOSIVE PICK FOR OUR MEMBERS *****UP OVER 300% *********** Nasdaq Symbol CDGT That is a $5.00 per..']\r\n", + "['spam', 'You are a £1000 winner or Guaranteed Caller Prize, this is our Final attempt to contact you! To Claim Call 09071517866 Now! 150ppmPOBox10183BhamB64XE']\r\n", + "['spam', \"Xmas & New Years Eve tickets are now on sale from the club, during the day from 10am till 8pm, and on Thurs, Fri & Sat night this week. They're selling fast!\"]\r\n", + "['spam', \"Rock yr chik. Get 100's of filthy films &XXX pics on yr phone now. rply FILTH to 69669. Saristar Ltd, E14 9YT 08701752560. 450p per 5 days. Stop2 cancel\"]\r\n", + "['spam', 'From next month get upto 50% More Calls 4 Ur standard network charge 2 activate Call 9061100010 C Wire3.net 1st4Terms PoBox84 M26 3UZ Cost £1.50 min MobcudB more']\r\n", + "['spam', 'URGENT! We are trying to contact U Todays draw shows that you have won a £800 prize GUARANTEED. Call 09050000460 from land line. Claim J89. po box245c2150pm']\r\n", + "['spam', 'Text BANNEDUK to 89555 to see! cost 150p textoperator g696ga 18+ XXX']\r\n", + "['spam', 'Auction round 4. The highest bid is now £54. Next maximum bid is £71. To bid, send BIDS e. g. 10 (to bid £10) to 83383. Good luck.']\r\n", + "['spam', \"Collect your VALENTINE'S weekend to PARIS inc Flight & Hotel + £200 Prize guaranteed! Text: PARIS to No: 69101. www.rtf.sphosting.com\"]\r\n", + "['spam', 'Customer Loyalty Offer:The NEW Nokia6650 Mobile from ONLY £10 at TXTAUCTION! Txt word: START to No: 81151 & get yours Now! 4T&Ctxt TC 150p/MTmsg']\r\n", + "['spam', \"You won't believe it but it's true. It's Incredible Txts! Reply G now to learn truly amazing things that will blow your mind. From O2FWD only 18p/txt\"]\r\n", + "['spam', 'Hi 07734396839 IBH Customer Loyalty Offer: The NEW NOKIA6600 Mobile from ONLY £10 at TXTAUCTION!Txt word:START to No:81151 & get Yours Now!4T&']\r\n", + "['spam', 'I am hot n horny and willing I live local to you - text a reply to hear strt back from me 150p per msg Netcollex LtdHelpDesk: 02085076972 reply Stop to end']\r\n", + "['spam', 'Do you want a New Nokia 3510i Colour Phone Delivered Tomorrow? With 200 FREE minutes to any mobile + 100 FREE text + FREE camcorder Reply or Call 08000930705']\r\n", + "['spam', \"Congratulations YOU'VE Won. You're a Winner in our August £1000 Prize Draw. Call 09066660100 NOW. Prize Code 2309.\"]\r\n", + "['spam', \"8007 25p 4 Alfie Moon's Children in Need song on ur mob. Tell ur m8s. Txt TONE CHARITY to 8007 for nokias or POLY CHARITY for polys :zed 08701417012 profit 2 charity \"]\r\n", + "['spam', 'Get the official ENGLAND poly ringtone or colour flag on yer mobile for tonights game! Text TONE or FLAG to 84199. Optout txt ENG STOP Box39822 W111WX £1.50']\r\n", + "['spam', 'Customer service announcement. We recently tried to make a delivery to you but were unable to do so, please call 07090298926 to re-schedule. Ref:9307622']\r\n", + "['spam', 'You can stop further club tones by replying \"STOP MIX\" See my-tone.com/enjoy. html for terms. Club tones cost GBP4.50/week. MFL, PO Box 1146 MK45 2WT (2/3)']\r\n", + "['spam', 'wamma get laid?want real doggin locations sent direct to your mobile? join the UKs largest dogging network. txt dogs to 69696 now!nyt. ec2a. 3lp £1.50/msg.']\r\n", + "['spam', 'You have won a Nokia 7250i. This is what you get when you win our FREE auction. To take part send Nokia to 86021 now. HG/Suite342/2Lands Row/W1JHL 16+']\r\n", + "['spam', 'Promotion Number: 8714714 - UR awarded a City Break and could WIN a £200 Summer Shopping spree every WK. Txt STORE to 88039 . SkilGme. TsCs087147403231Winawk!Age16 £1.50perWKsub']\r\n", + "['spam', 'You are a winner you have been specially selected to receive £1000 cash or a £2000 award. Speak to a live operator to claim call 087147123779am-7pm. Cost 10p']\r\n", + "['spam', 'Free Top ringtone -sub to weekly ringtone-get 1st week free-send SUBPOLY to 81618-?3 per week-stop sms-08718727870']\r\n", + "['spam', 'Thanks for your ringtone order, reference number X49. Your mobile will be charged 4.50. Should your tone not arrive please call customer services 09065989182. From: [colour=red]text[/colour]TXTstar']\r\n", + "['spam', 'Hi there, 2nights ur lucky night! Uve been invited 2 XCHAT, the Uks wildest chat! Txt CHAT to 86688 now! 150p/MsgrcvdHG/Suite342/2Lands/Row/W1J6HL LDN 18yrs']\r\n", + "['spam', '2/2 146tf150p']\r\n", + "['spam', 'Dear Voucher Holder 2 claim your 1st class airport lounge passes when using Your holiday voucher call 08704439680. When booking quote 1st class x 2']\r\n", + "['spam', 'Bloomberg -Message center +447797706009 Why wait? Apply for your future http://careers. bloomberg.com']\r\n", + "['spam', 'YES! The only place in town to meet exciting adult singles is now in the UK. Txt CHAT to 86688 now! 150p/Msg.']\r\n", + "['spam', 'FREE for 1st week! No1 Nokia tone 4 ur mob every week just txt NOKIA to 8007 Get txting and tell ur mates www.getzed.co.uk POBox 36504 W45WQ norm150p/tone 16+']\r\n", + "['spam', 'Someone U know has asked our dating service 2 contact you! Cant guess who? CALL 09058095107 NOW all will be revealed. POBox 7, S3XY 150p ']\r\n", + "['spam', 'Mila, age23, blonde, new in UK. I look sex with UK guys. if u like fun with me. Text MTALK to 69866.18 . 30pp/txt 1st 5free. £1.50 increments. Help08718728876']\r\n", + "['spam', 'Claim a 200 shopping spree, just call 08717895698 now! Have you won! MobStoreQuiz10ppm']\r\n", + "['spam', 'Want to funk up ur fone with a weekly new tone reply TONES2U 2 this text. www.ringtones.co.uk, the original n best. Tones 3GBP network operator rates apply']\r\n", + "['spam', \"Twinks, bears, scallies, skins and jocks are calling now. Don't miss the weekend's fun. Call 08712466669 at 10p/min. 2 stop texts call 08712460324(nat rate)\"]\r\n", + "['spam', 'We tried to contact you re your reply to our offer of a Video Handset? 750 anytime any networks mins? UNLIMITED TEXT? Camcorder? Reply or call 08000930705 NOW']\r\n", + "['spam', 'URGENT! We are trying to contact you. Last weekends draw shows that you have won a £900 prize GUARANTEED. Call 09061701851. Claim code K61. Valid 12hours only']\r\n", + "['spam', '74355 XMAS iscoming & ur awarded either £500 CD gift vouchers & free entry 2 r £100 weekly draw txt MUSIC to 87066 TnC']\r\n", + "['spam', 'Congratulations U can claim 2 VIP row A Tickets 2 C Blu in concert in November or Blu gift guaranteed Call 09061104276 to claim TS&Cs www.smsco.net cost£3.75max ']\r\n", + "['spam', 'Fantasy Football is back on your TV. Go to Sky Gamestar on Sky Active and play £250k Dream Team. Scoring starts on Saturday, so register now!SKY OPT OUT to 88088']\r\n", + "['spam', 'Free msg: Single? Find a partner in your area! 1000s of real people are waiting to chat now!Send CHAT to 62220Cncl send STOPCS 08717890890£1.50 per msg']\r\n", + "['spam', 'Win the newest \\x93Harry Potter and the Order of the Phoenix (Book 5) reply HARRY, answer 5 questions - chance to be the first among readers!']\r\n", + "['spam', 'Free Msg: Ringtone!From: http://tms. widelive.com/index. wml?id=1b6a5ecef91ff9*37819&first=true18:0430-JUL-05']\r\n", + "['spam', \"Oh my god! I've found your number again! I'm so glad, text me back xafter this msgs cst std ntwk chg £1.50\"]\r\n", + "['spam', 'A link to your picture has been sent. You can also use http://alto18.co.uk/wave/wave.asp?o=44345']\r\n", + "['spam', 'Double Mins & 1000 txts on Orange tariffs. Latest Motorola, SonyEricsson & Nokia with Bluetooth FREE! Call MobileUpd8 on 08000839402 or call2optout/HF8']\r\n", + "['spam', 'URGENT This is our 2nd attempt to contact U. Your £900 prize from YESTERDAY is still awaiting collection. To claim CALL NOW 09061702893. ACL03530150PM']\r\n", + "['spam', 'Dear Dave this is your final notice to collect your 4* Tenerife Holiday or #5000 CASH award! Call 09061743806 from landline. TCs SAE Box326 CW25WX 150ppm']\r\n", + "['spam', 'tells u 2 call 09066358152 to claim £5000 prize. U have 2 enter all ur mobile & personal details @ the prompts. Careful!']\r\n", + "['spam', 'Your 2004 account for 07XXXXXXXXX shows 786 unredeemed points. To claim call 08719181259 Identifier code: XXXXX Expires 26.03.05']\r\n", + "['spam', 'Do you want a new video handset? 750 anytime any network mins? Half Price Line Rental? Camcorder? Reply or call 08000930705 for delivery tomorrow']\r\n", + "['spam', 'You have an important customer service announcement. Call FREEPHONE 0800 542 0825 now!']\r\n", + "['spam', 'FREE>Ringtone! Reply REAL or POLY eg REAL1 1. PushButton 2. DontCha 3. BabyGoodbye 4. GoldDigger 5. WeBeBurnin 1st tone FREE and 6 more when u join for £3/wk']\r\n", + "['spam', 'Free Msg: get Gnarls Barkleys \"Crazy\" ringtone TOTALLY FREE just reply GO to this message right now!']\r\n", + "['spam', \"Refused a loan? Secured or Unsecured? Can't get credit? Call free now 0800 195 6669 or text back 'help' & we will!\"]\r\n", + "['spam', 'You have been specially selected to receive a \"3000 award! Call 08712402050 BEFORE the lines close. Cost 10ppm. 16+. T&Cs apply. AG Promo']\r\n", + "['spam', 'YOU HAVE WON! As a valued Vodafone customer our computer has picked YOU to win a £150 prize. To collect is easy. Just call 09061743386']\r\n", + "['spam', 'Free video camera phones with Half Price line rental for 12 mths and 500 cross ntwk mins 100 txts. Call MobileUpd8 08001950382 or Call2OptOut/674&']\r\n", + "['spam', 'Great NEW Offer - DOUBLE Mins & DOUBLE Txt on best Orange tariffs AND get latest camera phones 4 FREE! Call MobileUpd8 free on 08000839402 NOW! or 2stoptxt T&Cs']\r\n", + "['spam', 'ringtoneking 84484']\r\n", + "['spam', 'Ringtone Club: Gr8 new polys direct to your mobile every week !']\r\n", + "['spam', '(Bank of Granite issues Strong-Buy) EXPLOSIVE PICK FOR OUR MEMBERS *****UP OVER 300% *********** Nasdaq Symbol CDGT That is a $5.00 per..']\r\n", + "['spam', 'Bored housewives! Chat n date now! 0871750.77.11! BT-national rate 10p/min only from landlines!']\r\n", + "['spam', 'We tried to call you re your reply to our sms for a video mobile 750 mins UNLIMITED TEXT free camcorder Reply or call now 08000930705 Del Thurs']\r\n", + "['spam', 'This is the 2nd time we have tried to contact u. U have won the £400 prize. 2 claim is easy, just call 087104711148 NOW! Only 10p per minute. BT-national-rate']\r\n", + "['spam', 'Wan2 win a Meet+Greet with Westlife 4 U or a m8? They are currently on what tour? 1)Unbreakable, 2)Untamed, 3)Unkempt. Text 1,2 or 3 to 83049. Cost 50p +std text']\r\n", + "['spam', 'Please call our customer service representative on FREEPHONE 0808 145 4742 between 9am-11pm as you have WON a guaranteed £1000 cash or £5000 prize!']\r\n", + "['spam', \"You will be receiving this week's Triple Echo ringtone shortly. Enjoy it!\"]\r\n", + "['spam', \"U've been selected to stay in 1 of 250 top British hotels - FOR NOTHING! Holiday valued at £350! Dial 08712300220 to claim - National Rate Call. Bx526, SW73SS\"]\r\n", + "['spam', 'YOU ARE CHOSEN TO RECEIVE A £350 AWARD! Pls call claim number 09066364311 to collect your award which you are selected to receive as a valued mobile customer.']\r\n", + "['spam', 'Please call our customer service representative on FREEPHONE 0808 145 4742 between 9am-11pm as you have WON a guaranteed £1000 cash or £5000 prize!']\r\n", + "['spam', 'Win a £1000 cash prize or a prize worth £5000']\r\n", + "['spam', 'Thanks for your ringtone order, reference number X49.Your mobile will be charged 4.50. Should your tone not arrive please call customer services 09065989182']\r\n", + "['spam', 'Moby Pub Quiz.Win a £100 High Street prize if u know who the new Duchess of Cornwall will be? Txt her first name to 82277.unsub STOP £1.50 008704050406 SP']\r\n", + "['spam', 'This weeks SavaMob member offers are now accessible. Just call 08709501522 for details! SavaMob, POBOX 139, LA3 2WU. Only £1.50/week. SavaMob - offers mobile!']\r\n", + "['spam', 'You are being contacted by our Dating Service by someone you know! To find out who it is, call from your mobile or landline 09064017305 PoBox75LDNS7 ']\r\n", + "['spam', 'TBS/PERSOLVO. been chasing us since Sept for£38 definitely not paying now thanks to your information. We will ignore them. Kath. Manchester.']\r\n", + "['spam', 'Loans for any purpose even if you have Bad Credit! Tenants Welcome. Call NoWorriesLoans.com on 08717111821']\r\n", + "['spam', '87077: Kick off a new season with 2wks FREE goals & news to ur mobile! Txt ur club name to 87077 eg VILLA to 87077']\r\n", + "['spam', 'Orange brings you ringtones from all time Chart Heroes, with a free hit each week! Go to Ringtones & Pics on wap. To stop receiving these tips reply STOP.']\r\n", + "['spam', 'PRIVATE! Your 2003 Account Statement for 07973788240 shows 800 un-redeemed S. I. M. points. Call 08715203649 Identifier Code: 40533 Expires 31/10/04']\r\n", + "['spam', 'We tried to call you re your reply to our sms for a video mobile 750 mins UNLIMITED TEXT + free camcorder Reply of call 08000930705 Now']\r\n", + "['spam', \"GSOH? Good with SPAM the ladies?U could b a male gigolo? 2 join the uk's fastest growing mens club reply ONCALL. mjzgroup. 08714342399.2stop reply STOP. msg@£1.50rcvd\"]\r\n", + "['spam', 'U have a secret admirer who is looking 2 make contact with U-find out who they R*reveal who thinks UR so special-call on 09058094599']\r\n", + "['spam', 'HOT LIVE FANTASIES call now 08707500020 Just 20p per min NTT Ltd, PO Box 1327 Croydon CR9 5WB 0870 is a national rate call']\r\n", + "['spam', 'URGENT! Your Mobile number has been awarded a 2000 prize GUARANTEED. Call 09061790125 from landline. Claim 3030. Valid 12hrs only 150ppm']\r\n", + "['spam', 'SPJanuary Male Sale! Hot Gay chat now cheaper, call 08709222922. National rate from 1.5p/min cheap to 7.8p/min peak! To stop texts call 08712460324 (10p/min)']\r\n", + "['spam', \"FreeMsg Today's the day if you are ready! I'm horny & live in your town. I love sex fun & games! Netcollex Ltd 08700621170150p per msg reply Stop to end\"]\r\n", + "['spam', 'In The Simpsons Movie released in July 2007 name the band that died at the start of the film? A-Green Day, B-Blue Day, C-Red Day. (Send A, B or C)']\r\n", + "['spam', \"Please call Amanda with regard to renewing or upgrading your current T-Mobile handset free of charge. Offer ends today. Tel 0845 021 3680 subject to T's and C's\"]\r\n", + "['spam', 'URGENT!! Your 4* Costa Del Sol Holiday or £5000 await collection. Call 09050090044 Now toClaim. SAE, TC s, POBox334, Stockport, SK38xh, Cost£1.50/pm, Max10mins']\r\n", + "['spam', 'Want a new Video Phone? 750 anytime any network mins? Half price line rental free text for 3 months? Reply or call 08000930705 for free delivery']\r\n", + "['spam', 'Had your mobile 11 months or more? U R entitled to Update to the latest colour mobiles with camera for Free! Call The Mobile Update Co FREE on 08002986030']\r\n", + "['spam', 'Dear Voucher Holder, To claim this weeks offer, at your PC please go to http://www.wtlp.co.uk/text. Ts&Cs apply.']\r\n", + "['spam', 'Congrats! Nokia 3650 video camera phone is your Call 09066382422 Calls cost 150ppm Ave call 3mins vary from mobiles 16+ Close 300603 post BCM4284 Ldn WC1N3XX']\r\n", + "['spam', 'Urgent! Please call 0906346330. Your ABTA complimentary 4* Spanish Holiday or £10,000 cash await collection SAE T&Cs BOX 47 PO19 2EZ 150ppm 18+']\r\n", + "['spam', 'Double mins and txts 4 6months FREE Bluetooth on Orange. Available on Sony, Nokia Motorola phones. Call MobileUpd8 on 08000839402 or call2optout/N9DX']\r\n", + "['spam', 'FREE for 1st week! No1 Nokia tone 4 ur mob every week just txt NOKIA to 8007 Get txting and tell ur mates www.getzed.co.uk POBox 36504 W45WQ norm150p/tone 16+']\r\n", + "['spam', 'Want to funk up ur fone with a weekly new tone reply TONES2U 2 this text. www.ringtones.co.uk, the original n best. Tones 3GBP network operator rates apply']\r\n", + "['spam', 'cmon babe, make me horny, *turn* me on! Txt me your fantasy now babe -) Im hot, sticky and need you now. All replies cost £1.50. 2 cancel send STOP']\r\n", + "['spam', \"IMPORTANT INFORMATION 4 ORANGE USER 0796XXXXXX. TODAY IS UR LUCKY DAY!2 FIND OUT WHY LOG ONTO http://www.urawinner.com THERE'S A FANTASTIC PRIZEAWAITING YOU!\"]\r\n", + "['spam', 'Missed call alert. These numbers called but left no message. 07008009200']\r\n", + "['spam', 'FREEMSG: Our records indicate you may be entitled to 3750 pounds for the Accident you had. To claim for free reply with YES to this msg. To opt out text STOP']\r\n", + "['spam', 'U can WIN £100 of Music Gift Vouchers every week starting NOW Txt the word DRAW to 87066 TsCs www.Idew.com SkillGame, 1Winaweek, age16. 150ppermessSubscription']\r\n", + "['spam', 'Show ur colours! Euro 2004 2-4-1 Offer! Get an England Flag & 3Lions tone on ur phone! Click on the following service message for info!']\r\n", + "['spam', 'Text PASS to 69669 to collect your polyphonic ringtones. Normal gprs charges apply only. Enjoy your tones']\r\n", + "['spam', 'accordingly. I repeat, just text the word ok on your mobile phone and send']\r\n", + "['spam', 'Block Breaker now comes in deluxe format with new features and great graphics from T-Mobile. Buy for just £5 by replying GET BBDELUXE and take the challenge']\r\n", + "['spam', \"important information 4 orange user . today is your lucky day!2find out why log onto http://www.urawinner.com THERE'S A FANTASTIC SURPRISE AWAITING YOU!\"]\r\n", + "['spam', 'Natalja (25/F) is inviting you to be her friend. Reply YES-440 or NO-440 See her: www.SMS.ac/u/nat27081980 STOP? Send STOP FRND to 62468']\r\n", + "['spam', 'URGENT. Important information for 02 user. Today is your lucky day! 2 find out why , log onto http://www.urawinner.com there is a fantastic surprise awaiting you !']\r\n", + "['spam', 'WINNER!! As a valued network customer you have been selected to receivea £900 prize reward! To claim call 09061701461. Claim code KL341. Valid 12 hours only.']\r\n", + "['spam', 'Kit Strip - you have been billed 150p. Netcollex Ltd. PO Box 1013 IG11 OJA']\r\n", + "['spam', 'HMV BONUS SPECIAL 500 pounds of genuine HMV vouchers to be won. Just answer 4 easy questions. Play Now! Send HMV to 86688 More info:www.100percent-real.com']\r\n", + "['spam', 'Please CALL 08712402578 immediately as there is an urgent message waiting for you']\r\n", + "['spam', 'thesmszone.com lets you send free anonymous and masked messages..im sending this message from there..do you see the potential for abuse???']\r\n", + "['spam', 'WELL DONE! Your 4* Costa Del Sol Holiday or £5000 await collection. Call 09050090044 Now toClaim. SAE, TCs, POBox334, Stockport, SK38xh, Cost£1.50/pm, Max10mins']\r\n", + "['spam', 'Someone U know has asked our dating service 2 contact you! Cant Guess who? CALL 09058091854 NOW all will be revealed. PO BOX385 M6 6WU']\r\n", + "['spam', 'Congrats! 2 mobile 3G Videophones R yours. call 09061744553 now! videochat wid ur mates, play java games, Dload polyH music, noline rentl. bx420. ip4. 5we. 150pm']\r\n", + "['spam', 'U 447801259231 have a secret admirer who is looking 2 make contact with U-find out who they R*reveal who thinks UR so special-call on 09058094597']\r\n", + "['spam', \"important information 4 orange user 0789xxxxxxx. today is your lucky day!2find out why log onto http://www.urawinner.com THERE'S A FANTASTIC SURPRISE AWAITING YOU!\"]\r\n", + "['spam', 'Our dating service has been asked 2 contact U by someone shy! CALL 09058091870 NOW all will be revealed. POBox84, M26 3UZ 150p']\r\n", + "['spam', 'Do you want a new Video handset? 750 any time any network mins? UNLIMITED TEXT? Camcorder? Reply or Call now 08000930705 for del Sat AM']\r\n", + "['spam', 'Ur balance is now £600. Next question: Complete the landmark, Big, A. Bob, B. Barry or C. Ben ?. Text A, B or C to 83738. Good luck!']\r\n", + "['spam', 'Ur TONEXS subscription has been renewed and you have been charged £4.50. You can choose 10 more polys this month. www.clubzed.co.uk *BILLING MSG*']\r\n", + "['spam', \"If you don't, your prize will go to another customer. T&C at www.t-c.biz 18+ 150p/min Polo Ltd Suite 373 London W1J 6HL Please call back if busy\"]\r\n", + "['spam', 'Do you want a New Nokia 3510i Colour Phone Delivered Tomorrow? With 200 FREE minutes to any mobile + 100 FREE text + FREE camcorder Reply or Call 8000930705']\r\n", + "['spam', 'RECPT 1/3. You have ordered a Ringtone. Your order is being processed...']\r\n", + "['spam', 'As one of our registered subscribers u can enter the draw 4 a 100 G.B. gift voucher by replying with ENTER. To unsubscribe text STOP']\r\n", + "['spam', 'For your chance to WIN a FREE Bluetooth Headset then simply reply back with \"ADP\"']\r\n", + "['spam', \"Don't b floppy... b snappy & happy! Only gay chat service with photo upload call 08718730666 (10p/min). 2 stop our texts call 08712460324\"]\r\n", + "['spam', 'Urgent UR awarded a complimentary trip to EuroDisinc Trav, Aco&Entry41 Or £1000. To claim txt DIS to 87121 18+6*£1.50(moreFrmMob. ShrAcomOrSglSuplt)10, LS1 3AJ']\r\n", + "['spam', 'Welcome to UK-mobile-date this msg is FREE giving you free calling to 08719839835. Future mgs billed at 150p daily. To cancel send \"go stop\" to 89123']\r\n", + "['spam', '3. You have received your mobile content. Enjoy']\r\n", + "['spam', 'Want explicit SEX in 30 secs? Ring 02073162414 now! Costs 20p/min']\r\n", + "['spam', 'Latest Nokia Mobile or iPOD MP3 Player +£400 proze GUARANTEED! Reply with: WIN to 83355 now! Norcorp Ltd.£1,50/Mtmsgrcvd18+']\r\n", + "['spam', 'SMS SERVICES. for your inclusive text credits, pls goto www.comuk.net login= 3qxj9 unsubscribe with STOP, no extra charge. help 08702840625.COMUK. 220-CM2 9AE']\r\n", + "['spam', 'Mobile Club: Choose any of the top quality items for your mobile. 7cfca1a']\r\n", + "['spam', 'Money i have won wining number 946 wot do i do next']\r\n", + "['spam', 'Congrats! 2 mobile 3G Videophones R yours. call 09061744553 now! videochat wid ur mates, play java games, Dload polyH music, noline rentl. bx420. ip4. 5we. 150pm']\r\n", + "['spam', \"I want some cock! My hubby's away, I need a real man 2 satisfy me. Txt WIFE to 89938 for no strings action. (Txt STOP 2 end, txt rec £1.50ea. OTBox 731 LA1 7WS. )\"]\r\n", + "['spam', 'Gr8 new service - live sex video chat on your mob - see the sexiest dirtiest girls live on ur phone - 4 details text horny to 89070 to cancel send STOP to 89070']\r\n", + "['spam', 'FreeMsg Hi baby wow just got a new cam moby. Wanna C a hot pic? or Fancy a chat?Im w8in 4uTxt / rply CHAT to 82242 Hlp 08712317606 Msg150p 2rcv']\r\n", + "['spam', 'Wanna have a laugh? Try CHIT-CHAT on your mobile now! Logon by txting the word: CHAT and send it to No: 8883 CM PO Box 4217 London W1A 6ZF 16+ 118p/msg rcvd']\r\n", + "['spam', '\"URGENT! This is the 2nd attempt to contact U!U have WON £1000CALL 09071512432 b4 300603t&csBCM4235WC1N3XX.callcost150ppmmobilesvary. max£7. 50\"']\r\n", + "['spam', 'Congratulations ur awarded 500 of CD vouchers or 125gift guaranteed & Free entry 2 100 wkly draw txt MUSIC to 87066']\r\n", + "['spam', 'Had your contract mobile 11 Mnths? Latest Motorola, Nokia etc. all FREE! Double Mins & Text on Orange tariffs. TEXT YES for callback, no to remove from records']\r\n", + "['spam', 'Urgent! call 09066350750 from your landline. Your complimentary 4* Ibiza Holiday or 10,000 cash await collection SAE T&Cs PO BOX 434 SK3 8WP 150 ppm 18+']\r\n", + "['spam', \"For ur chance to win a £250 wkly shopping spree TXT: SHOP to 80878. T's&C's www.txt-2-shop.com custcare 08715705022, 1x150p/wk\"]\r\n", + "['spam', 'U have a Secret Admirer who is looking 2 make contact with U-find out who they R*reveal who thinks UR so special-call on 09065171142-stopsms-08718727870150ppm']\r\n", + "['spam', 'Mila, age23, blonde, new in UK. I look sex with UK guys. if u like fun with me. Text MTALK to 69866.18 . 30pp/txt 1st 5free. £1.50 increments. Help08718728876']\r\n", + "['spam', 'Well done ENGLAND! Get the official poly ringtone or colour flag on yer mobile! text TONE or FLAG to 84199 NOW! Opt-out txt ENG STOP. Box39822 W111WX £1.50']\r\n", + "['spam', 'FreeMsg: Txt: CALL to No: 86888 & claim your reward of 3 hours talk time to use from your phone now! Subscribe6GBP/mnth inc 3hrs 16 stop?txtStop']\r\n", + "['spam', 'Sunshine Quiz! Win a super Sony DVD recorder if you canname the capital of Australia? Text MQUIZ to 82277. B']\r\n", + "['spam', 'Please call our customer service representative on 0800 169 6031 between 10am-9pm as you have WON a guaranteed £1000 cash or £5000 prize!']\r\n", + "['spam', 'Todays Voda numbers ending with 7634 are selected to receive a £350 reward. If you have a match please call 08712300220 quoting claim code 7684 standard rates apply.']\r\n", + "['spam', 'You are being ripped off! Get your mobile content from www.clubmoby.com call 08717509990 poly/true/Pix/Ringtones/Games six downloads for only 3']\r\n", + "['spam', 'We tried to contact you re your reply to our offer of a Video Phone 750 anytime any network mins Half Price Line Rental Camcorder Reply or call 08000930705']\r\n", + "['spam', 'A £400 XMAS REWARD IS WAITING FOR YOU! Our computer has randomly picked you from our loyal mobile customers to receive a £400 reward. Just call 09066380611 ']\r\n", + "['spam', 'PRIVATE! Your 2003 Account Statement for shows 800 un-redeemed S. I. M. points. Call 08718738002 Identifier Code: 48922 Expires 21/11/04']\r\n", + "['spam', 'Customer service announcement. We recently tried to make a delivery to you but were unable to do so, please call 07099833605 to re-schedule. Ref:9280114']\r\n", + "['spam', 'Hi babe its Chloe, how r u? I was smashed on saturday night, it was great! How was your weekend? U been missing me? SP visionsms.com Text stop to stop 150p/text']\r\n", + "['spam', 'URGENT! Your Mobile No 07808726822 was awarded a £2,000 Bonus Caller Prize on 02/09/03! This is our 2nd attempt to contact YOU! Call 0871-872-9758 BOX95QU']\r\n", + "['spam', 'WIN: We have a winner! Mr. T. Foley won an iPod! More exciting prizes soon, so keep an eye on ur mobile or visit www.win-82050.co.uk']\r\n", + "['spam', 'FREE GAME. Get Rayman Golf 4 FREE from the O2 Games Arcade. 1st get UR games settings. Reply POST, then save & activ8. Press 0 key for Arcade. Termsapply']\r\n", + "['spam', 'Had your mobile 10 mths? Update to the latest Camera/Video phones for FREE. KEEP UR SAME NUMBER, Get extra free mins/texts. Text YES for a call']\r\n", + "['spam', 'Buy Space Invaders 4 a chance 2 win orig Arcade Game console. Press 0 for Games Arcade (std WAP charge) See o2.co.uk/games 4 Terms + settings. No purchase']\r\n", + "['spam', 'Camera - You are awarded a SiPix Digital Camera! call 09061221066 fromm landline. Delivery within 28 days.']\r\n", + "['spam', 'Your weekly Cool-Mob tones are ready to download !This weeks new Tones include: 1) Crazy Frog-AXEL F>>> 2) Akon-Lonely>>> 3) Black Eyed-Dont P >>>More info in n']\r\n", + "['spam', 'Cashbin.co.uk (Get lots of cash this weekend!) www.cashbin.co.uk Dear Welcome to the weekend We have got our biggest and best EVER cash give away!! These..']\r\n", + "['spam', 'URGENT! Your Mobile number has been awarded with a £2000 prize GUARANTEED. Call 09061790121 from land line. Claim 3030. Valid 12hrs only 150ppm']\r\n", + "['spam', 'Thanks 4 your continued support Your question this week will enter u in2 our draw 4 £100 cash. Name the NEW US President? txt ans to 80082']\r\n", + "['spam', 'Your unique user ID is 1172. For removal send STOP to 87239 customer services 08708034412']\r\n", + "['spam', 'Urgent -call 09066649731from Landline. Your complimentary 4* Ibiza Holiday or £10,000 cash await collection SAE T&Cs PO BOX 434 SK3 8WP 150ppm 18+']\r\n", + "['spam', 'URGENT This is our 2nd attempt to contact U. Your £900 prize from YESTERDAY is still awaiting collection. To claim CALL NOW 09061702893']\r\n", + "['spam', 'Santa calling! Would your little ones like a call from Santa Xmas Eve? Call 09077818151 to book you time. Calls1.50ppm last 3mins 30s T&C www.santacalling.com']\r\n", + "['spam', 'PRIVATE! Your 2004 Account Statement for 078498****7 shows 786 unredeemed Bonus Points. To claim call 08719180219 Identifier Code: 45239 Expires 06.05.05']\r\n", + "['spam', 'Check Out Choose Your Babe Videos @ sms.shsex.netUN fgkslpoPW fgkslpo']\r\n", + "['spam', 'u r a winner U ave been specially selected 2 receive £1000 cash or a 4* holiday (flights inc) speak to a live operator 2 claim 0871277810710p/min (18 )']\r\n", + "['spam', 'New Mobiles from 2004, MUST GO! Txt: NOKIA to No: 89545 & collect yours today! From ONLY £1. www.4-tc.biz 2optout 087187262701.50gbp/mtmsg18 TXTAUCTION.']\r\n", + "['spam', 'PRIVATE! Your 2003 Account Statement for shows 800 un-redeemed S. I. M. points. Call 08715203652 Identifier Code: 42810 Expires 29/10/0']\r\n", + "['spam', 'YOU HAVE WON! As a valued Vodafone customer our computer has picked YOU to win a £150 prize. To collect is easy. Just call 09061743386 ']\r\n", + "['spam', '**FREE MESSAGE**Thanks for using the Auction Subscription Service. 18 . 150p/MSGRCVD 2 Skip an Auction txt OUT. 2 Unsubscribe txt STOP CustomerCare 08718726270']\r\n", + "['spam', 'Bored housewives! Chat n date now! 0871750.77.11! BT-national rate 10p/min only from landlines!']\r\n", + "['spam', 'lyricalladie(21/F) is inviting you to be her friend. Reply YES-910 or NO-910. See her: www.SMS.ac/u/hmmross STOP? Send STOP FRND to 62468']\r\n", + "['spam', 'No 1 POLYPHONIC tone 4 ur mob every week! Just txt PT2 to 87575. 1st Tone FREE ! so get txtin now and tell ur friends. 150p/tone. 16 reply HL 4info']\r\n", + "['spam', 'Todays Vodafone numbers ending with 4882 are selected to a receive a £350 award. If your number matches call 09064019014 to receive your £350 award.']\r\n", + "['spam', 'Want the latest Video handset? 750 anytime any network mins? Half price line rental? Reply or call 08000930705 for delivery tomorrow']\r\n", + "['spam', 'ou are guaranteed the latest Nokia Phone, a 40GB iPod MP3 player or a £500 prize! Txt word: COLLECT to No: 83355! IBHltd LdnW15H 150p/Mtmsgrcvd18']\r\n", + "['spam', '* FREE* POLYPHONIC RINGTONE Text SUPER to 87131 to get your FREE POLY TONE of the week now! 16 SN PoBox202 NR31 7ZS subscription 450pw']\r\n", + "['spam', 'Warner Village 83118 C Colin Farrell in SWAT this wkend @Warner Village & get 1 free med. Popcorn!Just show msg+ticket@kiosk.Valid 4-7/12. C t&c @kiosk. Reply SONY 4 mre film offers']\r\n", + "['spam', 'Goal! Arsenal 4 (Henry, 7 v Liverpool 2 Henry scores with a simple shot from 6 yards from a pass by Bergkamp to give Arsenal a 2 goal margin after 78 mins.']\r\n", + "['spam', 'This is the 2nd time we have tried 2 contact u. U have won the 750 Pound prize. 2 claim is easy, call 08712101358 NOW! Only 10p per min. BT-national-rate']\r\n", + "['spam', 'Got what it takes 2 take part in the WRC Rally in Oz? U can with Lucozade Energy! Text RALLY LE to 61200 (25p), see packs or lucozade.co.uk/wrc & itcould be u!']\r\n", + "['spam', 'Hi, the SEXYCHAT girls are waiting for you to text them. Text now for a great night chatting. send STOP to stop this service']\r\n", + "['spam', 'Great News! Call FREEFONE 08006344447 to claim your guaranteed £1000 CASH or £2000 gift. Speak to a live operator NOW!']\r\n", + "['spam', 'Hi this is Amy, we will be sending you a free phone number in a couple of days, which will give you an access to all the adult parties...']\r\n", + "['spam', 'Welcome to Select, an O2 service with added benefits. You can now call our specially trained advisors FREE from your mobile by dialling 402.']\r\n", + "['spam', 'Dear Voucher holder Have your next meal on us. Use the following link on your pc 2 enjoy a 2 4 1 dining experiencehttp://www.vouch4me.com/etlp/dining.asp']\r\n", + "['spam', 'URGENT! We are trying to contact U. Todays draw shows that you have won a £2000 prize GUARANTEED. Call 09058094507 from land line. Claim 3030. Valid 12hrs only']\r\n", + "['spam', \"You can donate £2.50 to UNICEF's Asian Tsunami disaster support fund by texting DONATE to 864233. £2.50 will be added to your next bill\"]\r\n", + "['spam', 'goldviking (29/M) is inviting you to be his friend. Reply YES-762 or NO-762 See him: www.SMS.ac/u/goldviking STOP? Send STOP FRND to 62468']\r\n", + "['spam', 'Phony £350 award - Todays Voda numbers ending XXXX are selected to receive a £350 award. If you have a match please call 08712300220 quoting claim code 3100 standard rates app']\r\n", + "['spam', 'CDs 4u: Congratulations ur awarded £500 of CD gift vouchers or £125 gift guaranteed & Freeentry 2 £100 wkly draw xt MUSIC to 87066 TnCs www.ldew.com1win150ppmx3age16 ']\r\n", + "['spam', 'You have WON a guaranteed £1000 cash or a £2000 prize. To claim yr prize call our customer service representative on 08714712412 between 10am-7pm Cost 10p']\r\n", + "['spam', \"Dear 0776xxxxxxx U've been invited to XCHAT. This is our final attempt to contact u! Txt CHAT to 86688 150p/MsgrcvdHG/Suite342/2Lands/Row/W1J6HL LDN 18yrs\"]\r\n", + "['spam', 'Ur cash-balance is currently 500 pounds - to maximize ur cash-in now send GO to 86688 only 150p/meg. CC: 08718720201 HG/Suite342/2lands Row/W1j6HL']\r\n", + "['spam', 'PRIVATE! Your 2003 Account Statement for shows 800 un-redeemed S.I.M. points. Call 08715203685 Identifier Code:4xx26 Expires 13/10/04']\r\n", + "['spam', \"I'd like to tell you my deepest darkest fantasies. Call me 09094646631 just 60p/min. To stop texts call 08712460324 (nat rate)\"]\r\n", + "['spam', \"You won't believe it but it's true. It's Incredible Txts! Reply G now to learn truly amazing things that will blow your mind. From O2FWD only 18p/txt\"]\r\n", + "['spam', 'Natalie (20/F) is inviting you to be her friend. Reply YES-165 or NO-165 See her: www.SMS.ac/u/natalie2k9 STOP? Send STOP FRND to 62468']\r\n", + "['spam', 'Jamster! To get your free wallpaper text HEART to 88888 now! T&C apply. 16 only. Need Help? Call 08701213186.']\r\n", + "['spam', 'Double Mins & Double Txt & 1/2 price Linerental on Latest Orange Bluetooth mobiles. Call MobileUpd8 for the very latest offers. 08000839402 or call2optout/LF56']\r\n", + "['spam', 'Free video camera phones with Half Price line rental for 12 mths and 500 cross ntwk mins 100 txts. Call MobileUpd8 08001950382 or Call2OptOut/674']\r\n", + "['spam', '83039 62735=£450 UK Break AccommodationVouchers terms & conditions apply. 2 claim you mustprovide your claim number which is 15541 ']\r\n", + "['spam', \"5p 4 alfie Moon's Children in need song on ur mob. Tell ur m8s. Txt Tone charity to 8007 for Nokias or Poly charity for polys: zed 08701417012 profit 2 charity.\"]\r\n", + "['spam', 'WIN a £200 Shopping spree every WEEK Starting NOW. 2 play text STORE to 88039. SkilGme. TsCs08714740323 1Winawk! age16 £1.50perweeksub.']\r\n", + "['spam', 'This is the 2nd attempt to contract U, you have won this weeks top prize of either £1000 cash or £200 prize. Just call 09066361921']\r\n", + "['spam', 'Do you want a New Nokia 3510i colour phone DeliveredTomorrow? With 300 free minutes to any mobile + 100 free texts + Free Camcorder reply or call 08000930705.']\r\n", + "['spam', 'TheMob>Hit the link to get a premium Pink Panther game, the new no. 1 from Sugababes, a crazy Zebra animation or a badass Hoody wallpaper-all 4 FREE!']\r\n", + "['spam', 'This msg is for your mobile content order It has been resent as previous attempt failed due to network error Queries to customersqueries@netvision.uk.com']\r\n", + "['spam', 'You have 1 new message. Please call 08715205273']\r\n", + "['spam', 'December only! Had your mobile 11mths+? You are entitled to update to the latest colour camera mobile for Free! Call The Mobile Update VCo FREE on 08002986906 ']\r\n", + "['spam', 'Get 3 Lions England tone, reply lionm 4 mono or lionp 4 poly. 4 more go 2 www.ringtones.co.uk, the original n best. Tones 3GBP network operator rates apply.']\r\n", + "['spam', 'PRIVATE! Your 2003 Account Statement for 078']\r\n", + "['spam', 'YOU VE WON! Your 4* Costa Del Sol Holiday or £5000 await collection. Call 09050090044 Now toClaim. SAE, TC s, POBox334, Stockport, SK38xh, Cost£1.50/pm, Max10mins']\r\n", + "['spam', 'FREE for 1st week! No1 Nokia tone 4 ur mobile every week just txt NOKIA to 8077 Get txting and tell ur mates. www.getzed.co.uk POBox 36504 W45WQ 16+ norm150p/tone']\r\n", + "['spam', 'Get your garden ready for summer with a FREE selection of summer bulbs and seeds worth £33:50 only with The Scotsman this Saturday. To stop go2 notxt.co.uk']\r\n", + "['spam', 'Congrats 2 mobile 3G Videophones R yours. call 09063458130 now! videochat wid ur mates, play java games, Dload polypH music, noline rentl. bx420. ip4. 5we. 150p']\r\n", + "['spam', 'SMS AUCTION - A BRAND NEW Nokia 7250 is up 4 auction today! Auction is FREE 2 join & take part! Txt NOKIA to 86021 now!']\r\n", + "['spam', \"ree entry in 2 a weekly comp for a chance to win an ipod. Txt POD to 80182 to get entry (std txt rate) T&C's apply 08452810073 for details 18+\"]\r\n", + "['spam', 'Our records indicate u maybe entitled to 5000 pounds in compensation for the Accident you had. To claim 4 free reply with CLAIM to this msg. 2 stop txt STOP']\r\n", + "['spam', 'Spook up your mob with a Halloween collection of a logo & pic message plus a free eerie tone, txt CARD SPOOK to 8007 zed 08701417012150p per logo/pic ']\r\n", + "['spam', 'Call Germany for only 1 pence per minute! Call from a fixed line via access number 0844 861 85 85. No prepayment. Direct access! www.telediscount.co.uk']\r\n", + "['spam', 'YOU VE WON! Your 4* Costa Del Sol Holiday or £5000 await collection. Call 09050090044 Now toClaim. SAE, TC s, POBox334, Stockport, SK38xh, Cost£1.50/pm, Max10mins']\r\n", + "['spam', 'Had your mobile 11mths ? Update for FREE to Oranges latest colour camera mobiles & unlimited weekend calls. Call Mobile Upd8 on freefone 08000839402 or 2StopTxt']\r\n", + "['spam', 'Natalja (25/F) is inviting you to be her friend. Reply YES-440 or NO-440 See her: www.SMS.ac/u/nat27081980 STOP? Send STOP FRND to 62468']\r\n", + "['spam', 'PRIVATE! Your 2003 Account Statement for shows 800 un-redeemed S. I. M. points. Call 08715203656 Identifier Code: 42049 Expires 26/10/04']\r\n", + "['spam', 'YOU ARE CHOSEN TO RECEIVE A £350 AWARD! Pls call claim number 09066364311 to collect your award which you are selected to receive as a valued mobile customer.']\r\n", + "['spam', 'Someonone you know is trying to contact you via our dating service! To find out who it could be call from your mobile or landline 09064015307 BOX334SK38ch ']\r\n", + "['spam', 'Urgent! Please call 09061213237 from a landline. £5000 cash or a 4* holiday await collection. T &Cs SAE PO Box 177 M227XY. 16+']\r\n", + "['spam', \"If you don't, your prize will go to another customer. T&C at www.t-c.biz 18+ 150p/min Polo Ltd Suite 373 London W1J 6HL Please call back if busy \"]\r\n", + "['spam', 'URGENT! Your Mobile number has been awarded with a £2000 prize GUARANTEED. Call 09061790126 from land line. Claim 3030. Valid 12hrs only 150ppm']\r\n", + "['spam', 'URGENT! You have won a 1 week FREE membership in our £100,000 Prize Jackpot! Txt the word: CLAIM to No: 81010 T&C www.dbuk.net LCCLTD POBOX 4403LDNW1A7RW18']\r\n", + "['spam', 'Urgent! Please call 09061213237 from landline. £5000 cash or a luxury 4* Canary Islands Holiday await collection. T&Cs SAE PO Box 177. M227XY. 150ppm. 16+']\r\n", + "['spam', 'XMAS iscoming & ur awarded either £500 CD gift vouchers & free entry 2 r £100 weekly draw txt MUSIC to 87066 TnC www.Ldew.com1win150ppmx3age16subscription ']\r\n", + "['spam', 'Get the official ENGLAND poly ringtone or colour flag on yer mobile for tonights game! Text TONE or FLAG to 84199. Optout txt ENG STOP Box39822 W111WX £1.50']\r\n", + "['spam', 'u r subscribed 2 TEXTCOMP 250 wkly comp. 1st wk?s free question follows, subsequent wks charged@150p/msg.2 unsubscribe txt STOP 2 84128,custcare 08712405020']\r\n", + "['spam', 'Call 09095350301 and send our girls into erotic ecstacy. Just 60p/min. To stop texts call 08712460324 (nat rate)']\r\n", + "['spam', 'Camera - You are awarded a SiPix Digital Camera! call 09061221066 fromm landline. Delivery within 28 days.']\r\n", + "['spam', 'A £400 XMAS REWARD IS WAITING FOR YOU! Our computer has randomly picked you from our loyal mobile customers to receive a £400 reward. Just call 09066380611']\r\n", + "['spam', 'IMPORTANT MESSAGE. This is a final contact attempt. You have important messages waiting out our customer claims dept. Expires 13/4/04. Call 08717507382 NOW!']\r\n", + "['spam', 'dating:i have had two of these. Only started after i sent a text to talk sport radio last week. Any connection do you think or coincidence?']\r\n", + "['spam', 'The current leading bid is 151. To pause this auction send OUT. Customer Care: 08718726270']\r\n", + "['spam', 'Free entry to the gr8prizes wkly comp 4 a chance to win the latest Nokia 8800, PSP or £250 cash every wk.TXT GREAT to 80878 http//www.gr8prizes.com 08715705022']\r\n", + "['spam', 'You have 1 new message. Call 0207-083-6089']\r\n", + "['spam', 'Santa Calling! Would your little ones like a call from Santa Xmas eve? Call 09058094583 to book your time.']\r\n", + "['spam', 'You have won a guaranteed 32000 award or maybe even £1000 cash to claim ur award call free on 0800 ..... (18+). Its a legitimat efreefone number wat do u think???']\r\n", + "['spam', 'Latest News! Police station toilet stolen, cops have nothing to go on!']\r\n", + "['spam', '\"For the most sparkling shopping breaks from 45 per person; call 0121 2025050 or visit www.shortbreaks.org.uk\"']\r\n", + "['spam', 'December only! Had your mobile 11mths+? You are entitled to update to the latest colour camera mobile for Free! Call The Mobile Update Co FREE on 08002986906']\r\n", + "['spam', 'Txt: CALL to No: 86888 & claim your reward of 3 hours talk time to use from your phone now! Subscribe6GBP/mnth inc 3hrs 16 stop?txtStop www.gamb.tv']\r\n", + "['spam', 'http//tms. widelive.com/index. wml?id=820554ad0a1705572711&first=true¡C C Ringtone¡']\r\n", + "['spam', 'Get your garden ready for summer with a FREE selection of summer bulbs and seeds worth £33:50 only with The Scotsman this Saturday. To stop go2 notxt.co.uk']\r\n", + "['spam', \"URGENT! Last weekend's draw shows that you have won £1000 cash or a Spanish holiday! CALL NOW 09050000332 to claim. T&C: RSTM, SW7 3SS. 150ppm\"]\r\n", + "['spam', 'URGENT We are trying to contact you Last weekends draw shows u have won a £1000 prize GUARANTEED Call 09064017295 Claim code K52 Valid 12hrs 150p pm']\r\n", + "['spam', \"2p per min to call Germany 08448350055 from your BT line. Just 2p per min. Check PlanetTalkInstant.com for info & T's & C's. Text stop to opt out\"]\r\n", + "['spam', 'Marvel Mobile Play the official Ultimate Spider-man game (£4.50) on ur mobile right now. Text SPIDER to 83338 for the game & we ll send u a FREE 8Ball wallpaper']\r\n", + "['spam', 'SMS SERVICES. for your inclusive text credits, pls goto www.comuk.net login= 3qxj9 unsubscribe with STOP, no extra charge. help 08702840625.COMUK. 220-CM2 9AE']\r\n", + "['spam', 'PRIVATE! Your 2003 Account Statement for 07808247860 shows 800 un-redeemed S. I. M. points. Call 08719899229 Identifier Code: 40411 Expires 06/11/04']\r\n", + "['spam', 'You are awarded a SiPix Digital Camera! call 09061221061 from landline. Delivery within 28days. T Cs Box177. M221BP. 2yr warranty. 150ppm. 16 . p p£3.99']\r\n", + "['spam', 'PRIVATE! Your 2003 Account Statement for shows 800 un-redeemed S.I.M. points. Call 08718738001 Identifier Code: 49557 Expires 26/11/04']\r\n", + "['spam', 'Want explicit SEX in 30 secs? Ring 02073162414 now! Costs 20p/min Gsex POBOX 2667 WC1N 3XX']\r\n", + "['spam', 'ASKED 3MOBILE IF 0870 CHATLINES INCLU IN FREE MINS. INDIA CUST SERVs SED YES. L8ER GOT MEGA BILL. 3 DONT GIV A SHIT. BAILIFF DUE IN DAYS. I O £250 3 WANT £800']\r\n", + "['spam', 'Had your contract mobile 11 Mnths? Latest Motorola, Nokia etc. all FREE! Double Mins & Text on Orange tariffs. TEXT YES for callback, no to remove from records.']\r\n", + "['spam', 'REMINDER FROM O2: To get 2.50 pounds free call credit and details of great offers pls reply 2 this text with your valid name, house no and postcode']\r\n", + "['spam', 'This is the 2nd time we have tried 2 contact u. U have won the £750 Pound prize. 2 claim is easy, call 087187272008 NOW1! Only 10p per minute. BT-national-rate.']\r\n", + "\n", + ">> echo Done\n", + "Done\r\n", "\n" ] } ], "source": [ - "run('python -m apache_beam.yaml.main --pipeline_spec_file=pipeline.yaml')" + "run('python -m apache_beam.yaml.main --pipeline_spec_file=pipeline-01.yaml')\n", + "run('echo Done')" ], "metadata": { "collapsed": false } }, { - "cell_type": "code", - "execution_count": null, - "outputs": [], + "cell_type": "markdown", "source": [ - "run('cat output.txt')" + "If everything went well, you should see only spam messages from our input dataset. Congratulations, onto the next example!" ], "metadata": { "collapsed": false @@ -237,289 +1076,260 @@ { "cell_type": "markdown", "source": [ - "# Minimal word count\n", - "\n", - "The following example is the \"Hello, World!\" of data processing, a basic implementation of word count. We're creating a simple data processing pipeline that reads a text file and counts the number of occurrences of every word.\n", + "## Count words in spam messages and write results to a file\n", "\n", - "There are many scenarios where all the data does not fit in memory. Notice that the outputs of the pipeline go to the file system, which allows for large processing jobs in distributed environments." + "Now we'd like to write a pipeline which counts words occurring in spam messages and writes the results to a file." ], "metadata": { "collapsed": false } }, { - "metadata": { - "id": "oUqfqWyMuIfR", - "colab_type": "code", - "outputId": "52de90fb-abcc-46c7-bccc-5b0416beb50c", - "colab": { - "base_uri": "https://localhost:8080/", - "height": 1173 - } - }, "cell_type": "code", + "execution_count": 74, + "outputs": [], "source": [ - "import apache_beam as beam\n", - "import re\n", + "pipeline = '''\n", + "pipeline:\n", + " - type: ReadFromText\n", + " name: SmsData\n", + " file_pattern: data/SMSSpamCollection.csv\n", + "\n", + " - type: PyMap\n", + " name: SplitLine\n", + " input: SmsData\n", + " fn: 'lambda line: line.split(\"\\\\t\")'\n", "\n", - "inputs_pattern = 'data/*'\n", - "outputs_prefix = 'outputs/part'\n", + " - type: PyFilter\n", + " name: FilterOutSpam\n", + " input: SplitLine\n", + " keep: 'lambda row: row[0] == \"spam\"'\n", "\n", - "# Running locally in the DirectRunner.\n", - "with beam.Pipeline() as pipeline:\n", - " (\n", - " pipeline\n", - " | 'Read lines' >> beam.io.ReadFromText(inputs_pattern)\n", - " | 'Find words' >> beam.FlatMap(lambda line: re.findall(r\"[a-zA-Z']+\", line))\n", - " | 'Pair words with 1' >> beam.Map(lambda word: (word, 1))\n", - " | 'Group and sum' >> beam.CombinePerKey(sum)\n", - " | 'Format results' >> beam.Map(lambda word_count: str(word_count))\n", - " | 'Write results' >> beam.io.WriteToText(outputs_prefix)\n", - " )\n", + " - type: PyMap\n", + " name: FindWords\n", + " input: FilterOutSpam\n", + " fn: 'lambda line: re.findall(r\"[a-zA-Z]+\", line[1])'\n", "\n", - "# Sample the first 20 results, remember there are no ordering guarantees.\n", - "run('head -n 20 {}-00000-of-*'.format(outputs_prefix))" + " - type: PyMap\n", + " name: PairWordsWith1\n", + " input: FindWords\n", + " fn: 'lambda word: (word, 1)'\n", + "\n", + " # todo(yaml) validate once the CombinePerKey transform is implemented in the sdk\n", + " - type: CombinePerKey\n", + " name: GroupAndSum\n", + " input: PairWordsWith1\n", + " fn: 'sum'\n", + "\n", + " - type: WriteToText\n", + " name: SaveToText\n", + " input: GroupAndSum\n", + " file_path_prefix: \"output\"\n", + " file_name_suffix: \".txt\"\n", + "\n", + "'''\n", + "save_to_file(pipeline, 'pipeline-02.yaml')" ], - "execution_count": 2, - "outputs": [ - { - "output_type": "stream", - "text": [ - "WARNING:root:Deleting 1 existing files in target path matching: -*-of-%(num_shards)05d\n" - ], - "name": "stderr" - }, - { - "output_type": "stream", - "text": [ - ">> head -n 20 outputs/part-00000-of-*\n", - "==> outputs/part-00000-of-00001 <==\n", - "(u'canker', 1)\n", - "(u'bounty', 2)\n", - "(u'provision', 3)\n", - "(u'to', 438)\n", - "(u'terms', 2)\n", - "(u'unnecessary', 2)\n", - "(u'tongue', 5)\n", - "(u'knives', 1)\n", - "(u'Commend', 1)\n", - "(u'Hum', 2)\n", - "(u'Set', 2)\n", - "(u'smell', 6)\n", - "(u'dreadful', 3)\n", - "(u'frowning', 1)\n", - "(u'World', 1)\n", - "(u'tike', 1)\n", - "(u'yes', 3)\n", - "(u'oldness', 1)\n", - "(u'boat', 1)\n", - "(u\"in's\", 1)\n", - "\n", - "==> outputs/part-00000-of-00003 <==\n", - "wrath: 3\n", - "nicely: 2\n", - "hall: 1\n", - "Sure: 2\n", - "legs: 4\n", - "ten: 1\n", - "yourselves: 1\n", - "embossed: 1\n", - "poorly: 1\n", - "temper: 2\n", - "Dismissing: 1\n", - "Legitimate: 1\n", - "tyrannous: 1\n", - "turn: 13\n", - "gold: 2\n", - "minds: 1\n", - "dowers: 2\n", - "policy: 1\n", - "I: 708\n", - "V: 6\n", - "\n", - "==> outputs/part-00000-of-00004 <==\n", - "retinue: 1\n", - "stink: 1\n", - "beaks: 1\n", - "Ten: 1\n", - "riots: 2\n", - "Service: 1\n", - "dealing: 1\n", - "stop: 2\n", - "detain: 1\n", - "beware: 1\n", - "pilferings: 1\n", - "swimming: 1\n", - "The: 124\n", - "Been: 1\n", - "behavior: 1\n", - "impetuous: 1\n", - "Thy: 20\n", - "Tis: 24\n", - "Soldiers: 7\n", - "Juno: 1\n", - "\n" - ], - "name": "stdout" - } - ] + "metadata": { + "collapsed": false + } }, { - "metadata": { - "id": "k-HubCrk-h_G", - "colab_type": "text" - }, "cell_type": "markdown", "source": [ - "# Word count with comments\n", - "\n", - "Below is mostly the same code as above, but with comments explaining every line in more detail." - ] + "And let's run the pipeline:" + ], + "metadata": { + "collapsed": false + } }, { - "metadata": { - "id": "x_D7sxUHFzUp", - "colab_type": "code", - "outputId": "44c926df-aa4a-4bea-9247-27c7cb537717", - "colab": { - "base_uri": "https://localhost:8080/", - "height": 1173 - } - }, "cell_type": "code", - "source": [ - "import apache_beam as beam\n", - "import re\n", - "\n", - "inputs_pattern = 'data/*'\n", - "outputs_prefix = 'outputs/part'\n", - "\n", - "# Running locally in the DirectRunner.\n", - "with beam.Pipeline() as pipeline:\n", - " # Store the word counts in a PCollection.\n", - " # Each element is a tuple of (word, count) of types (str, int).\n", - " word_counts = (\n", - " # The input PCollection is an empty pipeline.\n", - " pipeline\n", - "\n", - " # Read lines from a text file.\n", - " | 'Read lines' >> beam.io.ReadFromText(inputs_pattern)\n", - " # Element type: str - text line\n", - "\n", - " # Use a regular expression to iterate over all words in the line.\n", - " # FlatMap will yield an element for every element in an iterable.\n", - " | 'Find words' >> beam.FlatMap(lambda line: re.findall(r\"[a-zA-Z']+\", line))\n", - " # Element type: str - word\n", - "\n", - " # Create key-value pairs where the value is 1, this way we can group by\n", - " # the same word while adding those 1s and get the counts for every word.\n", - " | 'Pair words with 1' >> beam.Map(lambda word: (word, 1))\n", - " # Element type: (str, int) - key: word, value: 1\n", - "\n", - " # Group by key while combining the value using the sum() function.\n", - " | 'Group and sum' >> beam.CombinePerKey(sum)\n", - " # Element type: (str, int) - key: word, value: counts\n", - " )\n", - "\n", - " # We can process a PCollection through other pipelines too.\n", - " (\n", - " # The input PCollection is the word_counts created from the previous step.\n", - " word_counts\n", - "\n", - " # Format the results into a string so we can write them to a file.\n", - " | 'Format results' >> beam.Map(lambda word_count: str(word_count))\n", - " # Element type: str - text line\n", - "\n", - " # Finally, write the results to a file.\n", - " | 'Write results' >> beam.io.WriteToText(outputs_prefix)\n", - " )\n", - "\n", - "# Sample the first 20 results, remember there are no ordering guarantees.\n", - "run('head -n 20 {}-00000-of-*'.format(outputs_prefix))" - ], - "execution_count": 3, + "execution_count": 77, "outputs": [ { + "name": "stdout", "output_type": "stream", "text": [ - "WARNING:root:Deleting 1 existing files in target path matching: -*-of-%(num_shards)05d\n" - ], - "name": "stderr" - }, - { - "output_type": "stream", - "text": [ - ">> head -n 20 outputs/part-00000-of-*\n", - "==> outputs/part-00000-of-00001 <==\n", - "(u'canker', 1)\n", - "(u'bounty', 2)\n", - "(u'provision', 3)\n", - "(u'to', 438)\n", - "(u'terms', 2)\n", - "(u'unnecessary', 2)\n", - "(u'tongue', 5)\n", - "(u'knives', 1)\n", - "(u'Commend', 1)\n", - "(u'Hum', 2)\n", - "(u'Set', 2)\n", - "(u'smell', 6)\n", - "(u'dreadful', 3)\n", - "(u'frowning', 1)\n", - "(u'World', 1)\n", - "(u'tike', 1)\n", - "(u'yes', 3)\n", - "(u'oldness', 1)\n", - "(u'boat', 1)\n", - "(u\"in's\", 1)\n", - "\n", - "==> outputs/part-00000-of-00003 <==\n", - "wrath: 3\n", - "nicely: 2\n", - "hall: 1\n", - "Sure: 2\n", - "legs: 4\n", - "ten: 1\n", - "yourselves: 1\n", - "embossed: 1\n", - "poorly: 1\n", - "temper: 2\n", - "Dismissing: 1\n", - "Legitimate: 1\n", - "tyrannous: 1\n", - "turn: 13\n", - "gold: 2\n", - "minds: 1\n", - "dowers: 2\n", - "policy: 1\n", - "I: 708\n", - "V: 6\n", + ">> python -m apache_beam.yaml.main --pipeline_spec_file=pipeline-02.yaml\n", + "Building pipeline...\r\n", + "INFO:apache_beam.yaml.yaml_transform:Expanding \"SmsData\" at line 3 \r\n", + "INFO:apache_beam.yaml.yaml_transform:Expanding \"SplitLine\" at line 7 \r\n", + "INFO:apache_beam.yaml.yaml_transform:Expanding \"FilterOutSpam\" at line 12 \r\n", + "INFO:apache_beam.yaml.yaml_transform:Expanding \"FindWords\" at line 17 \r\n", + "INFO:apache_beam.yaml.yaml_transform:Expanding \"PairWordsWith1\" at line 22 \r\n", + "INFO:apache_beam.yaml.yaml_transform:Expanding \"SaveToText\" at line 33 \r\n", + "Running pipeline...\r\n", + "Traceback (most recent call last):\r\n", + " File \"/usr/local/google/home/bzablocki/code/beam/sdks/python/apache_beam/runners/common.py\", line 1418, in process\r\n", + " return self.do_fn_invoker.invoke_process(windowed_value)\r\n", + " File \"/usr/local/google/home/bzablocki/code/beam/sdks/python/apache_beam/runners/common.py\", line 625, in invoke_process\r\n", + " windowed_value, self.process_method(windowed_value.value))\r\n", + " File \"/usr/local/google/home/bzablocki/code/beam/sdks/python/apache_beam/transforms/core.py\", line 1963, in \r\n", + " wrapper = lambda x: [fn(x)]\r\n", + " File \"/usr/local/google/home/bzablocki/code/beam/sdks/python/apache_beam/utils/python_callable.py\", line 127, in __call__\r\n", + " return self._callable(*args, **kwargs)\r\n", + " File \"\", line 1, in \r\n", + "NameError: name 're' is not defined\r\n", + "\r\n", + "During handling of the above exception, another exception occurred:\r\n", + "\r\n", + "Traceback (most recent call last):\r\n", + " File \"/usr/local/google/home/bzablocki/.pyenv/versions/3.8.9/lib/python3.8/runpy.py\", line 194, in _run_module_as_main\r\n", + " return _run_code(code, main_globals, None,\r\n", + " File \"/usr/local/google/home/bzablocki/.pyenv/versions/3.8.9/lib/python3.8/runpy.py\", line 87, in _run_code\r\n", + " exec(code, run_globals)\r\n", + " File \"/usr/local/google/home/bzablocki/code/beam/sdks/python/apache_beam/yaml/main.py\", line 67, in \r\n", + " run()\r\n", + " File \"/usr/local/google/home/bzablocki/code/beam/sdks/python/apache_beam/yaml/main.py\", line 63, in run\r\n", + " print(\"Running pipeline...\")\r\n", + " File \"/usr/local/google/home/bzablocki/code/beam/sdks/python/apache_beam/pipeline.py\", line 600, in __exit__\r\n", + " self.result = self.run()\r\n", + " File \"/usr/local/google/home/bzablocki/code/beam/sdks/python/apache_beam/pipeline.py\", line 577, in run\r\n", + " return self.runner.run_pipeline(self, self._options)\r\n", + " File \"/usr/local/google/home/bzablocki/code/beam/sdks/python/apache_beam/runners/direct/direct_runner.py\", line 129, in run_pipeline\r\n", + " return runner.run_pipeline(pipeline, options)\r\n", + " File \"/usr/local/google/home/bzablocki/code/beam/sdks/python/apache_beam/runners/portability/fn_api_runner/fn_runner.py\", line 202, in run_pipeline\r\n", + " self._latest_run_result = self.run_via_runner_api(\r\n", + " File \"/usr/local/google/home/bzablocki/code/beam/sdks/python/apache_beam/runners/portability/fn_api_runner/fn_runner.py\", line 224, in run_via_runner_api\r\n", + " return self.run_stages(stage_context, stages)\r\n", + " File \"/usr/local/google/home/bzablocki/code/beam/sdks/python/apache_beam/runners/portability/fn_api_runner/fn_runner.py\", line 455, in run_stages\r\n", + " bundle_results = self._execute_bundle(\r\n", + " File \"/usr/local/google/home/bzablocki/code/beam/sdks/python/apache_beam/runners/portability/fn_api_runner/fn_runner.py\", line 783, in _execute_bundle\r\n", + " self._run_bundle(\r\n", + " File \"/usr/local/google/home/bzablocki/code/beam/sdks/python/apache_beam/runners/portability/fn_api_runner/fn_runner.py\", line 1012, in _run_bundle\r\n", + " result, splits = bundle_manager.process_bundle(\r\n", + " File \"/usr/local/google/home/bzablocki/code/beam/sdks/python/apache_beam/runners/portability/fn_api_runner/fn_runner.py\", line 1348, in process_bundle\r\n", + " result_future = self._worker_handler.control_conn.push(process_bundle_req)\r\n", + " File \"/usr/local/google/home/bzablocki/code/beam/sdks/python/apache_beam/runners/portability/fn_api_runner/worker_handlers.py\", line 379, in push\r\n", + " response = self.worker.do_instruction(request)\r\n", + " File \"/usr/local/google/home/bzablocki/code/beam/sdks/python/apache_beam/runners/worker/sdk_worker.py\", line 629, in do_instruction\r\n", + " return getattr(self, request_type)(\r\n", + " File \"/usr/local/google/home/bzablocki/code/beam/sdks/python/apache_beam/runners/worker/sdk_worker.py\", line 667, in process_bundle\r\n", + " bundle_processor.process_bundle(instruction_id))\r\n", + " File \"/usr/local/google/home/bzablocki/code/beam/sdks/python/apache_beam/runners/worker/bundle_processor.py\", line 1061, in process_bundle\r\n", + " input_op_by_transform_id[element.transform_id].process_encoded(\r\n", + " File \"/usr/local/google/home/bzablocki/code/beam/sdks/python/apache_beam/runners/worker/bundle_processor.py\", line 231, in process_encoded\r\n", + " self.output(decoded_value)\r\n", + " File \"/usr/local/google/home/bzablocki/code/beam/sdks/python/apache_beam/runners/worker/operations.py\", line 528, in output\r\n", + " _cast_to_receiver(self.receivers[output_index]).receive(windowed_value)\r\n", + " File \"/usr/local/google/home/bzablocki/code/beam/sdks/python/apache_beam/runners/worker/operations.py\", line 240, in receive\r\n", + " self.consumer.process(windowed_value)\r\n", + " File \"/usr/local/google/home/bzablocki/code/beam/sdks/python/apache_beam/runners/worker/operations.py\", line 1030, in process\r\n", + " delayed_applications = self.dofn_runner.process_with_sized_restriction(\r\n", + " File \"/usr/local/google/home/bzablocki/code/beam/sdks/python/apache_beam/runners/common.py\", line 1433, in process_with_sized_restriction\r\n", + " return self.do_fn_invoker.invoke_process(\r\n", + " File \"/usr/local/google/home/bzablocki/code/beam/sdks/python/apache_beam/runners/common.py\", line 818, in invoke_process\r\n", + " residual = self._invoke_process_per_window(\r\n", + " File \"/usr/local/google/home/bzablocki/code/beam/sdks/python/apache_beam/runners/common.py\", line 982, in _invoke_process_per_window\r\n", + " self.output_handler.handle_process_outputs(\r\n", + " File \"/usr/local/google/home/bzablocki/code/beam/sdks/python/apache_beam/runners/common.py\", line 1582, in handle_process_outputs\r\n", + " self._write_value_to_tag(tag, windowed_value, watermark_estimator)\r\n", + " File \"/usr/local/google/home/bzablocki/code/beam/sdks/python/apache_beam/runners/common.py\", line 1695, in _write_value_to_tag\r\n", + " self.main_receivers.receive(windowed_value)\r\n", + " File \"/usr/local/google/home/bzablocki/code/beam/sdks/python/apache_beam/runners/worker/operations.py\", line 240, in receive\r\n", + " self.consumer.process(windowed_value)\r\n", + " File \"/usr/local/google/home/bzablocki/code/beam/sdks/python/apache_beam/runners/worker/operations.py\", line 908, in process\r\n", + " delayed_applications = self.dofn_runner.process(o)\r\n", + " File \"/usr/local/google/home/bzablocki/code/beam/sdks/python/apache_beam/runners/common.py\", line 1420, in process\r\n", + " self._reraise_augmented(exn)\r\n", + " File \"/usr/local/google/home/bzablocki/code/beam/sdks/python/apache_beam/runners/common.py\", line 1492, in _reraise_augmented\r\n", + " raise exn\r\n", + " File \"/usr/local/google/home/bzablocki/code/beam/sdks/python/apache_beam/runners/common.py\", line 1418, in process\r\n", + " return self.do_fn_invoker.invoke_process(windowed_value)\r\n", + " File \"/usr/local/google/home/bzablocki/code/beam/sdks/python/apache_beam/runners/common.py\", line 624, in invoke_process\r\n", + " self.output_handler.handle_process_outputs(\r\n", + " File \"/usr/local/google/home/bzablocki/code/beam/sdks/python/apache_beam/runners/common.py\", line 1582, in handle_process_outputs\r\n", + " self._write_value_to_tag(tag, windowed_value, watermark_estimator)\r\n", + " File \"/usr/local/google/home/bzablocki/code/beam/sdks/python/apache_beam/runners/common.py\", line 1695, in _write_value_to_tag\r\n", + " self.main_receivers.receive(windowed_value)\r\n", + " File \"/usr/local/google/home/bzablocki/code/beam/sdks/python/apache_beam/runners/worker/operations.py\", line 240, in receive\r\n", + " self.consumer.process(windowed_value)\r\n", + " File \"/usr/local/google/home/bzablocki/code/beam/sdks/python/apache_beam/runners/worker/operations.py\", line 908, in process\r\n", + " delayed_applications = self.dofn_runner.process(o)\r\n", + " File \"/usr/local/google/home/bzablocki/code/beam/sdks/python/apache_beam/runners/common.py\", line 1420, in process\r\n", + " self._reraise_augmented(exn)\r\n", + " File \"/usr/local/google/home/bzablocki/code/beam/sdks/python/apache_beam/runners/common.py\", line 1492, in _reraise_augmented\r\n", + " raise exn\r\n", + " File \"/usr/local/google/home/bzablocki/code/beam/sdks/python/apache_beam/runners/common.py\", line 1418, in process\r\n", + " return self.do_fn_invoker.invoke_process(windowed_value)\r\n", + " File \"/usr/local/google/home/bzablocki/code/beam/sdks/python/apache_beam/runners/common.py\", line 624, in invoke_process\r\n", + " self.output_handler.handle_process_outputs(\r\n", + " File \"/usr/local/google/home/bzablocki/code/beam/sdks/python/apache_beam/runners/common.py\", line 1582, in handle_process_outputs\r\n", + " self._write_value_to_tag(tag, windowed_value, watermark_estimator)\r\n", + " File \"/usr/local/google/home/bzablocki/code/beam/sdks/python/apache_beam/runners/common.py\", line 1695, in _write_value_to_tag\r\n", + " self.main_receivers.receive(windowed_value)\r\n", + " File \"/usr/local/google/home/bzablocki/code/beam/sdks/python/apache_beam/runners/worker/operations.py\", line 240, in receive\r\n", + " self.consumer.process(windowed_value)\r\n", + " File \"/usr/local/google/home/bzablocki/code/beam/sdks/python/apache_beam/runners/worker/operations.py\", line 908, in process\r\n", + " delayed_applications = self.dofn_runner.process(o)\r\n", + " File \"/usr/local/google/home/bzablocki/code/beam/sdks/python/apache_beam/runners/common.py\", line 1420, in process\r\n", + " self._reraise_augmented(exn)\r\n", + " File \"/usr/local/google/home/bzablocki/code/beam/sdks/python/apache_beam/runners/common.py\", line 1508, in _reraise_augmented\r\n", + " raise new_exn.with_traceback(tb)\r\n", + " File \"/usr/local/google/home/bzablocki/code/beam/sdks/python/apache_beam/runners/common.py\", line 1418, in process\r\n", + " return self.do_fn_invoker.invoke_process(windowed_value)\r\n", + " File \"/usr/local/google/home/bzablocki/code/beam/sdks/python/apache_beam/runners/common.py\", line 625, in invoke_process\r\n", + " windowed_value, self.process_method(windowed_value.value))\r\n", + " File \"/usr/local/google/home/bzablocki/code/beam/sdks/python/apache_beam/transforms/core.py\", line 1963, in \r\n", + " wrapper = lambda x: [fn(x)]\r\n", + " File \"/usr/local/google/home/bzablocki/code/beam/sdks/python/apache_beam/utils/python_callable.py\", line 127, in __call__\r\n", + " return self._callable(*args, **kwargs)\r\n", + " File \"\", line 1, in \r\n", + "NameError: name 're' is not defined [while running 'FindWords']\r\n", "\n", - "==> outputs/part-00000-of-00004 <==\n", - "retinue: 1\n", - "stink: 1\n", - "beaks: 1\n", - "Ten: 1\n", - "riots: 2\n", - "Service: 1\n", - "dealing: 1\n", - "stop: 2\n", - "detain: 1\n", - "beware: 1\n", - "pilferings: 1\n", - "swimming: 1\n", - "The: 124\n", - "Been: 1\n", - "behavior: 1\n", - "impetuous: 1\n", - "Thy: 20\n", - "Tis: 24\n", - "Soldiers: 7\n", - "Juno: 1\n", + ">> head -n 20 output-00000-of-*\n", + "['ham', 'Go until jurong point, crazy.. Available only in bugis n great world la e buffet... Cine there got amore wat...']\r\n", + "['ham', 'Ok lar... Joking wif u oni...']\r\n", + "['ham', 'U dun say so early hor... U c already then say...']\r\n", + "['ham', \"Nah I don't think he goes to usf, he lives around here though\"]\r\n", + "['ham', 'Even my brother is not like to speak with me. They treat me like aids patent.']\r\n", + "['ham', \"As per your request 'Melle Melle (Oru Minnaminunginte Nurungu Vettam)' has been set as your callertune for all Callers. Press *9 to copy your friends Callertune\"]\r\n", + "['ham', \"I'm gonna be home soon and i don't want to talk about this stuff anymore tonight, k? I've cried enough today.\"]\r\n", + "['ham', \"I've been searching for the right words to thank you for this breather. I promise i wont take your help for granted and will fulfil my promise. You have been wonderful and a blessing at all times.\"]\r\n", + "['ham', 'I HAVE A DATE ON SUNDAY WITH WILL!!']\r\n", + "['ham', \"Oh k...i'm watching here:)\"]\r\n", + "['ham', 'Eh u remember how 2 spell his name... Yes i did. He v naughty make until i v wet.']\r\n", + "['ham', 'Fine if that\\x92s the way u feel. That\\x92s the way its gota b']\r\n", + "['ham', 'Is that seriously how you spell his name?']\r\n", + "['ham', 'I‘m going to try for 2 months ha ha only joking']\r\n", + "['ham', 'So ü pay first lar... Then when is da stock comin...']\r\n", + "['ham', 'Aft i finish my lunch then i go str down lor. Ard 3 smth lor. U finish ur lunch already?']\r\n", + "['ham', 'Ffffffffff. Alright no way I can meet up with you sooner?']\r\n", + "['ham', \"Just forced myself to eat a slice. I'm really not hungry tho. This sucks. Mark is getting worried. He knows I'm sick when I turn down pizza. Lol\"]\r\n", + "['ham', 'Lol your always so convincing.']\r\n", + "['ham', \"Did you catch the bus ? Are you frying an egg ? Did you make a tea? Are you eating your mom's left over dinner ? Do you feel my Love ?\"]\r\n", "\n" - ], - "name": "stdout" + ] } - ] + ], + "source": [ + "run('python -m apache_beam.yaml.main --pipeline_spec_file=pipeline-02.yaml')\n", + "run('head -n 20 {}-00000-of-*'.format(\"output\"))" + ], + "metadata": { + "collapsed": false + } + }, + { + "cell_type": "markdown", + "source": [ + "## Summary\n", + "For all the available operations visit the documentation: todo(yaml) add url\n", + "For a list of available transforms, visit.." + ], + "metadata": { + "collapsed": false + } + }, + { + "cell_type": "code", + "execution_count": null, + "outputs": [], + "source": [], + "metadata": { + "collapsed": false + } } ] } From aa4a0dee4c94296283dd59df844e6f89cf327ea9 Mon Sep 17 00:00:00 2001 From: Bartosz Zablocki Date: Wed, 28 Jun 2023 10:07:49 +0000 Subject: [PATCH 03/16] Python Notebook for getting started with Yaml API --- .../get-started/try-apache-beam-yaml.ipynb | 362 +++++++----------- 1 file changed, 146 insertions(+), 216 deletions(-) diff --git a/examples/notebooks/get-started/try-apache-beam-yaml.ipynb b/examples/notebooks/get-started/try-apache-beam-yaml.ipynb index 92f2b0358214..242298a0c596 100644 --- a/examples/notebooks/get-started/try-apache-beam-yaml.ipynb +++ b/examples/notebooks/get-started/try-apache-beam-yaml.ipynb @@ -28,7 +28,7 @@ }, { "cell_type": "code", - "execution_count": 53, + "execution_count": 1, "source": [ "#@title ###### Licensed to the Apache Software Foundation (ASF), Version 2.0 (the \"License\")\n", "\n", @@ -61,9 +61,9 @@ }, "cell_type": "markdown", "source": [ - "# Try Apache Beam - Python\n", + "# Try Apache Beam - Yaml\n", "\n", - "In this notebook, we set up your development environment and work through a simple example using the [DirectRunner](https://beam.apache.org/documentation/runners/direct/). You can explore other runners with the [Beam Capatibility Matrix](https://beam.apache.org/documentation/runners/capability-matrix/).\n", + "In this notebook, we set up your development environment and write a simple pipeline using Yaml API. We'll run it locally, using the [DirectRunner](https://beam.apache.org/documentation/runners/direct/). You can explore other runners with the [Beam Capatibility Matrix](https://beam.apache.org/documentation/runners/capability-matrix/).\n", "\n", "To navigate through different sections, use the table of contents. From **View** drop-down list, select **Table of contents**.\n", "\n", @@ -113,7 +113,7 @@ "run('mkdir -p data')\n", "run('gsutil cp gs://apache-beam-samples/SMSSpamCollection/SMSSpamCollection data/SMSSpamCollection.csv')" ], - "execution_count": 78, + "execution_count": 49, "outputs": [ { "name": "stdout", @@ -144,7 +144,7 @@ }, { "cell_type": "code", - "execution_count": 60, + "execution_count": 4, "outputs": [ { "name": "stdout", @@ -191,7 +191,7 @@ "cell_type": "markdown", "source": [ "## First pipeline\n", - "We’ll start with creating a pipeline which loads the data, filters out valid messages, leaving spam, and prints only valid lines to the console." + "We’ll start with creating a pipeline which loads the data, filters out valid messages leaving spam, and saves only valid lines to a file.\n" ], "metadata": { "collapsed": false @@ -199,7 +199,7 @@ }, { "cell_type": "code", - "execution_count": 79, + "execution_count": 107, "outputs": [], "source": [ "pipeline = '''\n", @@ -214,14 +214,15 @@ " fn: 'lambda line: line.split(\"\\\\t\")'\n", "\n", " - type: PyFilter\n", - " name: FilterOutSpam\n", + " name: KeepSpam\n", " input: SplitLine\n", " keep: 'lambda row: row[0] == \"spam\"'\n", "\n", - " - type: PyMap\n", - " name: PrintLines\n", - " input: FilterOutSpam\n", - " fn: 'print' # or 'lambda x: print(x)'\n", + " - type: WriteToText\n", + " name: SaveToText\n", + " input: KeepSpam\n", + " file_path_prefix: \"data/result-pipeline-01\"\n", + " file_name_suffix: \".txt\"\n", "'''\n", "save_to_file(pipeline, 'pipeline-01.yaml')" ], @@ -232,7 +233,48 @@ { "cell_type": "markdown", "source": [ - "The pipeline is now saved in the yaml format. To validate, run:" + "In this example, each transformation contains the 'input' key, but if the pipeline is linear, such as ours, we can let the inputs be implicit by designating the pipeline as a `chain` type.\n" + ], + "metadata": { + "collapsed": false + } + }, + { + "cell_type": "code", + "execution_count": 122, + "outputs": [], + "source": [ + "pipeline = '''\n", + "pipeline:\n", + " type: chain\n", + " transforms:\n", + " - type: ReadFromText\n", + " name: SmsData\n", + " file_pattern: data/SMSSpamCollection.csv\n", + "\n", + " - type: PyMap\n", + " name: SplitLine\n", + " fn: 'lambda line: line.split(\"\\\\t\")'\n", + "\n", + " - type: PyFilter\n", + " name: KeepSpam\n", + " keep: 'lambda row: row[0] == \"spam\"'\n", + "\n", + " - type: WriteToText\n", + " name: SaveToText\n", + " file_path_prefix: \"data/result-pipeline-01\"\n", + " file_name_suffix: \".txt\"\n", + "'''\n", + "save_to_file(pipeline, 'pipeline-01-chain.yaml')" + ], + "metadata": { + "collapsed": false + } + }, + { + "cell_type": "markdown", + "source": [ + "To run the pipeline locally, using a DirectRunner, you need to run the yaml's main python script, passing the `pipeline-01-chain.yaml` (or `pipeline-01.yaml`) file as an input:" ], "metadata": { "collapsed": false @@ -240,39 +282,26 @@ }, { "cell_type": "code", - "execution_count": 80, + "execution_count": 123, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - ">> cat pipeline-01.yaml\n", - "\r\n", - "pipeline:\r\n", - " - type: ReadFromText\r\n", - " name: SmsData\r\n", - " file_pattern: data/SMSSpamCollection.csv\r\n", - "\r\n", - " - type: PyMap\r\n", - " name: SplitLine\r\n", - " input: SmsData\r\n", - " fn: 'lambda line: line.split(\"\\t\")'\r\n", - "\r\n", - " - type: PyFilter\r\n", - " name: FilterOutSpam\r\n", - " input: SplitLine\r\n", - " keep: 'lambda row: row[0] == \"spam\"'\r\n", - "\r\n", - " - type: PyMap\r\n", - " name: PrintLines\r\n", - " input: FilterOutSpam\r\n", - " fn: 'print' # or 'lambda x: print(x)'\r\n", + ">> python -m apache_beam.yaml.main --pipeline_spec_file=pipeline-01-chain.yaml\n", + "Building pipeline...\r\n", + "INFO:apache_beam.yaml.yaml_transform:Expanding \"SmsData\" at line 5 \r\n", + "INFO:apache_beam.yaml.yaml_transform:Expanding \"SplitLine\" at line 9 \r\n", + "INFO:apache_beam.yaml.yaml_transform:Expanding \"KeepSpam\" at line 13 \r\n", + "INFO:apache_beam.yaml.yaml_transform:Expanding \"SaveToText\" at line 17 \r\n", + "Running pipeline...\r\n", + "WARNING:apache_beam.io.filebasedsink:Deleting 1 existing files in target path matching: -*-of-%(num_shards)05d\r\n", "\n" ] } ], "source": [ - "run('cat pipeline-01.yaml')" + "run('python -m apache_beam.yaml.main --pipeline_spec_file=pipeline-01-chain.yaml')" ], "metadata": { "collapsed": false @@ -281,7 +310,7 @@ { "cell_type": "markdown", "source": [ - "To run the pipeline locally, using a DirectRunner, you need to run the yaml's main python script, passing the pipline.yaml file as an input:" + "Let's verify the results and see the content of the output file." ], "metadata": { "collapsed": false @@ -289,19 +318,13 @@ }, { "cell_type": "code", - "execution_count": 49, + "execution_count": 125, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - ">> python -m apache_beam.yaml.main --pipeline_spec_file=pipeline-01.yaml\n", - "Building pipeline...\r\n", - "INFO:apache_beam.yaml.yaml_transform:Expanding \"SmsData\" at line 3 \r\n", - "INFO:apache_beam.yaml.yaml_transform:Expanding \"SplitLine\" at line 7 \r\n", - "INFO:apache_beam.yaml.yaml_transform:Expanding \"FilterOutSpam\" at line 12 \r\n", - "INFO:apache_beam.yaml.yaml_transform:Expanding \"PrintLines\" at line 17 \r\n", - "Running pipeline...\r\n", + ">> cat data/result-pipeline-01-00000-of-00001.txt\n", "['spam', \"Free entry in 2 a wkly comp to win FA Cup final tkts 21st May 2005. Text FA to 87121 to receive entry question(std txt rate)T&C's apply 08452810075over18's\"]\r\n", "['spam', \"FreeMsg Hey there darling it's been 3 week's now and no word back! I'd like some fun you up for it still? Tb ok! XxX std chgs to send, £1.50 to rcv\"]\r\n", "['spam', 'WINNER!! As a valued network customer you have been selected to receivea £900 prize reward! To claim call 09061701461. Claim code KL341. Valid 12 hours only.']\r\n", @@ -1049,16 +1072,12 @@ "['spam', 'Had your contract mobile 11 Mnths? Latest Motorola, Nokia etc. all FREE! Double Mins & Text on Orange tariffs. TEXT YES for callback, no to remove from records.']\r\n", "['spam', 'REMINDER FROM O2: To get 2.50 pounds free call credit and details of great offers pls reply 2 this text with your valid name, house no and postcode']\r\n", "['spam', 'This is the 2nd time we have tried 2 contact u. U have won the £750 Pound prize. 2 claim is easy, call 087187272008 NOW1! Only 10p per minute. BT-national-rate.']\r\n", - "\n", - ">> echo Done\n", - "Done\r\n", "\n" ] } ], "source": [ - "run('python -m apache_beam.yaml.main --pipeline_spec_file=pipeline-01.yaml')\n", - "run('echo Done')" + "run('cat data/result-pipeline-01-00000-of-00001.txt')" ], "metadata": { "collapsed": false @@ -1067,7 +1086,7 @@ { "cell_type": "markdown", "source": [ - "If everything went well, you should see only spam messages from our input dataset. Congratulations, onto the next example!" + "If everything went well, you should see only spam messages from our input dataset. Congratulations, onto the next example!\n" ], "metadata": { "collapsed": false @@ -1076,9 +1095,9 @@ { "cell_type": "markdown", "source": [ - "## Count words in spam messages and write results to a file\n", + "## Count words in spam messages, select top 10 popular words and write results to a file\n", "\n", - "Now we'd like to write a pipeline which counts words occurring in spam messages and writes the results to a file." + "Now we'd like to write a pipeline which counts words occurring in spam messages, selects the most popular ones and writes the result to a file.\n" ], "metadata": { "collapsed": false @@ -1086,47 +1105,62 @@ }, { "cell_type": "code", - "execution_count": 74, + "execution_count": 118, "outputs": [], "source": [ "pipeline = '''\n", "pipeline:\n", + "\n", + " # Read input data. Each line from the csv file is a String.\n", " - type: ReadFromText\n", " name: SmsData\n", " file_pattern: data/SMSSpamCollection.csv\n", "\n", + " # Split each line into an array, where the first element is message label (ham or spam) and the second is the content of the message.\n", " - type: PyMap\n", " name: SplitLine\n", " input: SmsData\n", " fn: 'lambda line: line.split(\"\\\\t\")'\n", "\n", + " # Select only the rows that contain spam messages, based on the label.\n", " - type: PyFilter\n", - " name: FilterOutSpam\n", + " name: SpamMessages\n", " input: SplitLine\n", " keep: 'lambda row: row[0] == \"spam\"'\n", "\n", - " - type: PyMap\n", + " # Using a regex, we'll split the content of the message (one long string) into words (list of strings)\n", + " - type: PyFlatMap\n", " name: FindWords\n", - " input: FilterOutSpam\n", - " fn: 'lambda line: re.findall(r\"[a-zA-Z]+\", line[1])'\n", + " input: SpamMessages\n", + " fn: |\n", + " import re\n", + " lambda line: re.findall(r\"[a-zA-Z]+\", line[1])\n", "\n", + " # Transforming each word to lower case and combining it with a '1'. Result of this step are pairs (word: 1).\n", " - type: PyMap\n", - " name: PairWordsWith1\n", + " name: PairLoweredWordsWith1\n", " input: FindWords\n", - " fn: 'lambda word: (word, 1)'\n", + " fn: 'lambda word: (word.lower(), 1)'\n", "\n", - " # todo(yaml) validate once the CombinePerKey transform is implemented in the sdk\n", - " - type: CombinePerKey\n", + " # Using SumPerKey transform, we'll calculate the occurence of each word.\n", + " - type: SumPerKey\n", " name: GroupAndSum\n", - " input: PairWordsWith1\n", - " fn: 'sum'\n", + " input: PairLoweredWordsWith1\n", "\n", + " # Select 10 most popular words. Input format to this step is a tuple (word: count),\n", + " # so we provide the count (row[1]) as the key to compare the numbers\n", + " - type: TopNLargest\n", + " name: Largest\n", + " input: GroupAndSum\n", + " n: 10\n", + " key: 'lambda row: row[1]'\n", + "\n", + " # Save results to a text file.\n", " - type: WriteToText\n", " name: SaveToText\n", - " input: GroupAndSum\n", - " file_path_prefix: \"output\"\n", + " input: Largest\n", + " file_path_prefix: \"data/result-pipeline-02\"\n", " file_name_suffix: \".txt\"\n", - "\n", "'''\n", "save_to_file(pipeline, 'pipeline-02.yaml')" ], @@ -1137,7 +1171,7 @@ { "cell_type": "markdown", "source": [ - "And let's run the pipeline:" + "Let's run the pipeline:" ], "metadata": { "collapsed": false @@ -1145,7 +1179,7 @@ }, { "cell_type": "code", - "execution_count": 77, + "execution_count": 119, "outputs": [ { "name": "stdout", @@ -1155,157 +1189,52 @@ "Building pipeline...\r\n", "INFO:apache_beam.yaml.yaml_transform:Expanding \"SmsData\" at line 3 \r\n", "INFO:apache_beam.yaml.yaml_transform:Expanding \"SplitLine\" at line 7 \r\n", - "INFO:apache_beam.yaml.yaml_transform:Expanding \"FilterOutSpam\" at line 12 \r\n", - "INFO:apache_beam.yaml.yaml_transform:Expanding \"FindWords\" at line 17 \r\n", - "INFO:apache_beam.yaml.yaml_transform:Expanding \"PairWordsWith1\" at line 22 \r\n", - "INFO:apache_beam.yaml.yaml_transform:Expanding \"SaveToText\" at line 33 \r\n", + "INFO:apache_beam.yaml.yaml_transform:Expanding \"SpamMessages\" at line 12 \r\n", + "INFO:apache_beam.yaml.yaml_transform:Expanding \"FindWords\" at line 22 \r\n", + "INFO:apache_beam.yaml.yaml_transform:Expanding \"PairLoweredWordsWith1\" at line 29 \r\n", + "INFO:apache_beam.yaml.yaml_transform:Expanding \"GroupAndSum\" at line 35 \r\n", + "INFO:apache_beam.yaml.yaml_transform:Expanding \"Largest\" at line 39 \r\n", + "INFO:apache_beam.yaml.yaml_transform:Expanding \"PrintLines\" at line 45 \r\n", + "INFO:apache_beam.yaml.yaml_transform:Expanding \"SaveToText\" at line 51 \r\n", "Running pipeline...\r\n", - "Traceback (most recent call last):\r\n", - " File \"/usr/local/google/home/bzablocki/code/beam/sdks/python/apache_beam/runners/common.py\", line 1418, in process\r\n", - " return self.do_fn_invoker.invoke_process(windowed_value)\r\n", - " File \"/usr/local/google/home/bzablocki/code/beam/sdks/python/apache_beam/runners/common.py\", line 625, in invoke_process\r\n", - " windowed_value, self.process_method(windowed_value.value))\r\n", - " File \"/usr/local/google/home/bzablocki/code/beam/sdks/python/apache_beam/transforms/core.py\", line 1963, in \r\n", - " wrapper = lambda x: [fn(x)]\r\n", - " File \"/usr/local/google/home/bzablocki/code/beam/sdks/python/apache_beam/utils/python_callable.py\", line 127, in __call__\r\n", - " return self._callable(*args, **kwargs)\r\n", - " File \"\", line 1, in \r\n", - "NameError: name 're' is not defined\r\n", - "\r\n", - "During handling of the above exception, another exception occurred:\r\n", - "\r\n", - "Traceback (most recent call last):\r\n", - " File \"/usr/local/google/home/bzablocki/.pyenv/versions/3.8.9/lib/python3.8/runpy.py\", line 194, in _run_module_as_main\r\n", - " return _run_code(code, main_globals, None,\r\n", - " File \"/usr/local/google/home/bzablocki/.pyenv/versions/3.8.9/lib/python3.8/runpy.py\", line 87, in _run_code\r\n", - " exec(code, run_globals)\r\n", - " File \"/usr/local/google/home/bzablocki/code/beam/sdks/python/apache_beam/yaml/main.py\", line 67, in \r\n", - " run()\r\n", - " File \"/usr/local/google/home/bzablocki/code/beam/sdks/python/apache_beam/yaml/main.py\", line 63, in run\r\n", - " print(\"Running pipeline...\")\r\n", - " File \"/usr/local/google/home/bzablocki/code/beam/sdks/python/apache_beam/pipeline.py\", line 600, in __exit__\r\n", - " self.result = self.run()\r\n", - " File \"/usr/local/google/home/bzablocki/code/beam/sdks/python/apache_beam/pipeline.py\", line 577, in run\r\n", - " return self.runner.run_pipeline(self, self._options)\r\n", - " File \"/usr/local/google/home/bzablocki/code/beam/sdks/python/apache_beam/runners/direct/direct_runner.py\", line 129, in run_pipeline\r\n", - " return runner.run_pipeline(pipeline, options)\r\n", - " File \"/usr/local/google/home/bzablocki/code/beam/sdks/python/apache_beam/runners/portability/fn_api_runner/fn_runner.py\", line 202, in run_pipeline\r\n", - " self._latest_run_result = self.run_via_runner_api(\r\n", - " File \"/usr/local/google/home/bzablocki/code/beam/sdks/python/apache_beam/runners/portability/fn_api_runner/fn_runner.py\", line 224, in run_via_runner_api\r\n", - " return self.run_stages(stage_context, stages)\r\n", - " File \"/usr/local/google/home/bzablocki/code/beam/sdks/python/apache_beam/runners/portability/fn_api_runner/fn_runner.py\", line 455, in run_stages\r\n", - " bundle_results = self._execute_bundle(\r\n", - " File \"/usr/local/google/home/bzablocki/code/beam/sdks/python/apache_beam/runners/portability/fn_api_runner/fn_runner.py\", line 783, in _execute_bundle\r\n", - " self._run_bundle(\r\n", - " File \"/usr/local/google/home/bzablocki/code/beam/sdks/python/apache_beam/runners/portability/fn_api_runner/fn_runner.py\", line 1012, in _run_bundle\r\n", - " result, splits = bundle_manager.process_bundle(\r\n", - " File \"/usr/local/google/home/bzablocki/code/beam/sdks/python/apache_beam/runners/portability/fn_api_runner/fn_runner.py\", line 1348, in process_bundle\r\n", - " result_future = self._worker_handler.control_conn.push(process_bundle_req)\r\n", - " File \"/usr/local/google/home/bzablocki/code/beam/sdks/python/apache_beam/runners/portability/fn_api_runner/worker_handlers.py\", line 379, in push\r\n", - " response = self.worker.do_instruction(request)\r\n", - " File \"/usr/local/google/home/bzablocki/code/beam/sdks/python/apache_beam/runners/worker/sdk_worker.py\", line 629, in do_instruction\r\n", - " return getattr(self, request_type)(\r\n", - " File \"/usr/local/google/home/bzablocki/code/beam/sdks/python/apache_beam/runners/worker/sdk_worker.py\", line 667, in process_bundle\r\n", - " bundle_processor.process_bundle(instruction_id))\r\n", - " File \"/usr/local/google/home/bzablocki/code/beam/sdks/python/apache_beam/runners/worker/bundle_processor.py\", line 1061, in process_bundle\r\n", - " input_op_by_transform_id[element.transform_id].process_encoded(\r\n", - " File \"/usr/local/google/home/bzablocki/code/beam/sdks/python/apache_beam/runners/worker/bundle_processor.py\", line 231, in process_encoded\r\n", - " self.output(decoded_value)\r\n", - " File \"/usr/local/google/home/bzablocki/code/beam/sdks/python/apache_beam/runners/worker/operations.py\", line 528, in output\r\n", - " _cast_to_receiver(self.receivers[output_index]).receive(windowed_value)\r\n", - " File \"/usr/local/google/home/bzablocki/code/beam/sdks/python/apache_beam/runners/worker/operations.py\", line 240, in receive\r\n", - " self.consumer.process(windowed_value)\r\n", - " File \"/usr/local/google/home/bzablocki/code/beam/sdks/python/apache_beam/runners/worker/operations.py\", line 1030, in process\r\n", - " delayed_applications = self.dofn_runner.process_with_sized_restriction(\r\n", - " File \"/usr/local/google/home/bzablocki/code/beam/sdks/python/apache_beam/runners/common.py\", line 1433, in process_with_sized_restriction\r\n", - " return self.do_fn_invoker.invoke_process(\r\n", - " File \"/usr/local/google/home/bzablocki/code/beam/sdks/python/apache_beam/runners/common.py\", line 818, in invoke_process\r\n", - " residual = self._invoke_process_per_window(\r\n", - " File \"/usr/local/google/home/bzablocki/code/beam/sdks/python/apache_beam/runners/common.py\", line 982, in _invoke_process_per_window\r\n", - " self.output_handler.handle_process_outputs(\r\n", - " File \"/usr/local/google/home/bzablocki/code/beam/sdks/python/apache_beam/runners/common.py\", line 1582, in handle_process_outputs\r\n", - " self._write_value_to_tag(tag, windowed_value, watermark_estimator)\r\n", - " File \"/usr/local/google/home/bzablocki/code/beam/sdks/python/apache_beam/runners/common.py\", line 1695, in _write_value_to_tag\r\n", - " self.main_receivers.receive(windowed_value)\r\n", - " File \"/usr/local/google/home/bzablocki/code/beam/sdks/python/apache_beam/runners/worker/operations.py\", line 240, in receive\r\n", - " self.consumer.process(windowed_value)\r\n", - " File \"/usr/local/google/home/bzablocki/code/beam/sdks/python/apache_beam/runners/worker/operations.py\", line 908, in process\r\n", - " delayed_applications = self.dofn_runner.process(o)\r\n", - " File \"/usr/local/google/home/bzablocki/code/beam/sdks/python/apache_beam/runners/common.py\", line 1420, in process\r\n", - " self._reraise_augmented(exn)\r\n", - " File \"/usr/local/google/home/bzablocki/code/beam/sdks/python/apache_beam/runners/common.py\", line 1492, in _reraise_augmented\r\n", - " raise exn\r\n", - " File \"/usr/local/google/home/bzablocki/code/beam/sdks/python/apache_beam/runners/common.py\", line 1418, in process\r\n", - " return self.do_fn_invoker.invoke_process(windowed_value)\r\n", - " File \"/usr/local/google/home/bzablocki/code/beam/sdks/python/apache_beam/runners/common.py\", line 624, in invoke_process\r\n", - " self.output_handler.handle_process_outputs(\r\n", - " File \"/usr/local/google/home/bzablocki/code/beam/sdks/python/apache_beam/runners/common.py\", line 1582, in handle_process_outputs\r\n", - " self._write_value_to_tag(tag, windowed_value, watermark_estimator)\r\n", - " File \"/usr/local/google/home/bzablocki/code/beam/sdks/python/apache_beam/runners/common.py\", line 1695, in _write_value_to_tag\r\n", - " self.main_receivers.receive(windowed_value)\r\n", - " File \"/usr/local/google/home/bzablocki/code/beam/sdks/python/apache_beam/runners/worker/operations.py\", line 240, in receive\r\n", - " self.consumer.process(windowed_value)\r\n", - " File \"/usr/local/google/home/bzablocki/code/beam/sdks/python/apache_beam/runners/worker/operations.py\", line 908, in process\r\n", - " delayed_applications = self.dofn_runner.process(o)\r\n", - " File \"/usr/local/google/home/bzablocki/code/beam/sdks/python/apache_beam/runners/common.py\", line 1420, in process\r\n", - " self._reraise_augmented(exn)\r\n", - " File \"/usr/local/google/home/bzablocki/code/beam/sdks/python/apache_beam/runners/common.py\", line 1492, in _reraise_augmented\r\n", - " raise exn\r\n", - " File \"/usr/local/google/home/bzablocki/code/beam/sdks/python/apache_beam/runners/common.py\", line 1418, in process\r\n", - " return self.do_fn_invoker.invoke_process(windowed_value)\r\n", - " File \"/usr/local/google/home/bzablocki/code/beam/sdks/python/apache_beam/runners/common.py\", line 624, in invoke_process\r\n", - " self.output_handler.handle_process_outputs(\r\n", - " File \"/usr/local/google/home/bzablocki/code/beam/sdks/python/apache_beam/runners/common.py\", line 1582, in handle_process_outputs\r\n", - " self._write_value_to_tag(tag, windowed_value, watermark_estimator)\r\n", - " File \"/usr/local/google/home/bzablocki/code/beam/sdks/python/apache_beam/runners/common.py\", line 1695, in _write_value_to_tag\r\n", - " self.main_receivers.receive(windowed_value)\r\n", - " File \"/usr/local/google/home/bzablocki/code/beam/sdks/python/apache_beam/runners/worker/operations.py\", line 240, in receive\r\n", - " self.consumer.process(windowed_value)\r\n", - " File \"/usr/local/google/home/bzablocki/code/beam/sdks/python/apache_beam/runners/worker/operations.py\", line 908, in process\r\n", - " delayed_applications = self.dofn_runner.process(o)\r\n", - " File \"/usr/local/google/home/bzablocki/code/beam/sdks/python/apache_beam/runners/common.py\", line 1420, in process\r\n", - " self._reraise_augmented(exn)\r\n", - " File \"/usr/local/google/home/bzablocki/code/beam/sdks/python/apache_beam/runners/common.py\", line 1508, in _reraise_augmented\r\n", - " raise new_exn.with_traceback(tb)\r\n", - " File \"/usr/local/google/home/bzablocki/code/beam/sdks/python/apache_beam/runners/common.py\", line 1418, in process\r\n", - " return self.do_fn_invoker.invoke_process(windowed_value)\r\n", - " File \"/usr/local/google/home/bzablocki/code/beam/sdks/python/apache_beam/runners/common.py\", line 625, in invoke_process\r\n", - " windowed_value, self.process_method(windowed_value.value))\r\n", - " File \"/usr/local/google/home/bzablocki/code/beam/sdks/python/apache_beam/transforms/core.py\", line 1963, in \r\n", - " wrapper = lambda x: [fn(x)]\r\n", - " File \"/usr/local/google/home/bzablocki/code/beam/sdks/python/apache_beam/utils/python_callable.py\", line 127, in __call__\r\n", - " return self._callable(*args, **kwargs)\r\n", - " File \"\", line 1, in \r\n", - "NameError: name 're' is not defined [while running 'FindWords']\r\n", - "\n", - ">> head -n 20 output-00000-of-*\n", - "['ham', 'Go until jurong point, crazy.. Available only in bugis n great world la e buffet... Cine there got amore wat...']\r\n", - "['ham', 'Ok lar... Joking wif u oni...']\r\n", - "['ham', 'U dun say so early hor... U c already then say...']\r\n", - "['ham', \"Nah I don't think he goes to usf, he lives around here though\"]\r\n", - "['ham', 'Even my brother is not like to speak with me. They treat me like aids patent.']\r\n", - "['ham', \"As per your request 'Melle Melle (Oru Minnaminunginte Nurungu Vettam)' has been set as your callertune for all Callers. Press *9 to copy your friends Callertune\"]\r\n", - "['ham', \"I'm gonna be home soon and i don't want to talk about this stuff anymore tonight, k? I've cried enough today.\"]\r\n", - "['ham', \"I've been searching for the right words to thank you for this breather. I promise i wont take your help for granted and will fulfil my promise. You have been wonderful and a blessing at all times.\"]\r\n", - "['ham', 'I HAVE A DATE ON SUNDAY WITH WILL!!']\r\n", - "['ham', \"Oh k...i'm watching here:)\"]\r\n", - "['ham', 'Eh u remember how 2 spell his name... Yes i did. He v naughty make until i v wet.']\r\n", - "['ham', 'Fine if that\\x92s the way u feel. That\\x92s the way its gota b']\r\n", - "['ham', 'Is that seriously how you spell his name?']\r\n", - "['ham', 'I‘m going to try for 2 months ha ha only joking']\r\n", - "['ham', 'So ü pay first lar... Then when is da stock comin...']\r\n", - "['ham', 'Aft i finish my lunch then i go str down lor. Ard 3 smth lor. U finish ur lunch already?']\r\n", - "['ham', 'Ffffffffff. Alright no way I can meet up with you sooner?']\r\n", - "['ham', \"Just forced myself to eat a slice. I'm really not hungry tho. This sucks. Mark is getting worried. He knows I'm sick when I turn down pizza. Lol\"]\r\n", - "['ham', 'Lol your always so convincing.']\r\n", - "['ham', \"Did you catch the bus ? Are you frying an egg ? Did you make a tea? Are you eating your mom's left over dinner ? Do you feel my Love ?\"]\r\n", + "[('to', 691), ('a', 393), ('call', 370), ('you', 299), ('your', 264), ('free', 228), ('the', 206), ('for', 204), ('now', 203), ('or', 192)]\r\n", + "WARNING:apache_beam.io.filebasedsink:Deleting 1 existing files in target path matching: -*-of-%(num_shards)05d\r\n", + "\n" + ] + } + ], + "source": [ + "run('python -m apache_beam.yaml.main --pipeline_spec_file=pipeline-02.yaml')" + ], + "metadata": { + "collapsed": false + } + }, + { + "cell_type": "markdown", + "source": [ + "To view the output:" + ], + "metadata": { + "collapsed": false + } + }, + { + "cell_type": "code", + "execution_count": 121, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + ">> head -n 20 data/result-pipeline-02-00000-of-*\n", + "[('to', 691), ('a', 393), ('call', 370), ('you', 299), ('your', 264), ('free', 228), ('the', 206), ('for', 204), ('now', 203), ('or', 192)]\r\n", "\n" ] } ], "source": [ - "run('python -m apache_beam.yaml.main --pipeline_spec_file=pipeline-02.yaml')\n", - "run('head -n 20 {}-00000-of-*'.format(\"output\"))" + "run('head -n 20 {}-00000-of-*'.format(\"data/result-pipeline-02\"))" ], "metadata": { "collapsed": false @@ -1315,8 +1244,9 @@ "cell_type": "markdown", "source": [ "## Summary\n", - "For all the available operations visit the documentation: todo(yaml) add url\n", - "For a list of available transforms, visit.." + "Congratulations! You've just ran yaml pipelines in Apache Beam.\n", + "For all the available operations visit the documentation: # todo(yaml) add url\n", + "For a list of available transforms, visit # todo(yaml) add url" ], "metadata": { "collapsed": false From 89582f2f83fe15dd65e9664c6eadfb6a14b9bc40 Mon Sep 17 00:00:00 2001 From: Bartosz Zablocki Date: Wed, 28 Jun 2023 10:14:24 +0000 Subject: [PATCH 04/16] Add SumPerKey and TopNLargest transforms to Yaml api --- sdks/python/apache_beam/yaml/yaml_provider.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sdks/python/apache_beam/yaml/yaml_provider.py b/sdks/python/apache_beam/yaml/yaml_provider.py index d58cb37a8811..d49ad059d084 100644 --- a/sdks/python/apache_beam/yaml/yaml_provider.py +++ b/sdks/python/apache_beam/yaml/yaml_provider.py @@ -415,6 +415,10 @@ def _parse_window_spec(spec): 'Flatten': Flatten, 'WindowInto': WindowInto, 'GroupByKey': beam.GroupByKey, + 'SumPerKey': lambda: beam.CombinePerKey(sum), + 'TopNLargest': lambda n, + key=None: beam.combiners.Top.Largest( + n=n, key=python_callable.PythonCallableWithSource(key)) }, **ios)) From abc777f97769dc5f9ba6107fd8853aa1eb76ec77 Mon Sep 17 00:00:00 2001 From: Bartosz Zablocki Date: Wed, 28 Jun 2023 10:23:59 +0000 Subject: [PATCH 05/16] Small changes to Getting started with yaml notebook --- .../get-started/try-apache-beam-yaml.ipynb | 884 +----------------- 1 file changed, 23 insertions(+), 861 deletions(-) diff --git a/examples/notebooks/get-started/try-apache-beam-yaml.ipynb b/examples/notebooks/get-started/try-apache-beam-yaml.ipynb index 242298a0c596..d111720e81da 100644 --- a/examples/notebooks/get-started/try-apache-beam-yaml.ipynb +++ b/examples/notebooks/get-started/try-apache-beam-yaml.ipynb @@ -28,7 +28,7 @@ }, { "cell_type": "code", - "execution_count": 1, + "execution_count": null, "source": [ "#@title ###### Licensed to the Apache Software Foundation (ASF), Version 2.0 (the \"License\")\n", "\n", @@ -63,6 +63,10 @@ "source": [ "# Try Apache Beam - Yaml\n", "\n", + "While Beam provides powerful APIs for authoring sophisticated data processing pipelines, it often still has too high a barrier for getting started and authoring simple pipelines. Even setting up the environment, installing the dependencies, and setting up the project can be an overwhelming amount of boilerplate for some (though https://beam.apache.org/blog/beam-starter-projects/ has gone a long way in making this easier).\n", + "\n", + "Here we provide a simple declarative syntax for describing pipelines that does not require coding experience or learning how to use an SDK—any text editor will do. Some installation may be required to actually *execute* a pipeline, but we envision various services (such as Dataflow) to accept yaml pipelines directly obviating the need for even that in the future. We also anticipate the ability to generate code directly from these higher-level yaml descriptions, should one want to graduate to a full Beam SDK (and possibly the other direction as well as far as possible).\n", + "\n", "In this notebook, we set up your development environment and write a simple pipeline using Yaml API. We'll run it locally, using the [DirectRunner](https://beam.apache.org/documentation/runners/direct/). You can explore other runners with the [Beam Capatibility Matrix](https://beam.apache.org/documentation/runners/capability-matrix/).\n", "\n", "To navigate through different sections, use the table of contents. From **View** drop-down list, select **Table of contents**.\n", @@ -113,24 +117,8 @@ "run('mkdir -p data')\n", "run('gsutil cp gs://apache-beam-samples/SMSSpamCollection/SMSSpamCollection data/SMSSpamCollection.csv')" ], - "execution_count": 49, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - ">> pip install --quiet apache-beam\n", - "\n", - ">> mkdir -p data\n", - "\n", - ">> gsutil cp gs://apache-beam-samples/SMSSpamCollection/SMSSpamCollection data/SMSSpamCollection.csv\n", - "Copying gs://apache-beam-samples/SMSSpamCollection/SMSSpamCollection...\r\n", - "/ [1 files][466.7 KiB/466.7 KiB] \r\n", - "Operation completed over 1 objects/466.7 KiB. \r\n", - "\n" - ] - } - ] + "execution_count": null, + "outputs": [] }, { "cell_type": "markdown", @@ -144,30 +132,8 @@ }, { "cell_type": "code", - "execution_count": 4, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - ">> head data/SMSSpamCollection.csv\n", - "ham\tGo until jurong point, crazy.. Available only in bugis n great world la e buffet... Cine there got amore wat...\r\n", - "ham\tOk lar... Joking wif u oni...\r\n", - "spam\tFree entry in 2 a wkly comp to win FA Cup final tkts 21st May 2005. Text FA to 87121 to receive entry question(std txt rate)T&C's apply 08452810075over18's\r\n", - "ham\tU dun say so early hor... U c already then say...\r\n", - "ham\tNah I don't think he goes to usf, he lives around here though\r\n", - "spam\tFreeMsg Hey there darling it's been 3 week's now and no word back! I'd like some fun you up for it still? Tb ok! XxX std chgs to send, £1.50 to rcv\r\n", - "ham\tEven my brother is not like to speak with me. They treat me like aids patent.\r\n", - "ham\tAs per your request 'Melle Melle (Oru Minnaminunginte Nurungu Vettam)' has been set as your callertune for all Callers. Press *9 to copy your friends Callertune\r\n", - "spam\tWINNER!! As a valued network customer you have been selected to receivea £900 prize reward! To claim call 09061701461. Claim code KL341. Valid 12 hours only.\r\n", - "spam\tHad your mobile 11 months or more? U R entitled to Update to the latest colour mobiles with camera for Free! Call The Mobile Update Co FREE on 08002986030\r\n", - "\n", - ">> wc -l data/SMSSpamCollection.csv\n", - "5574 data/SMSSpamCollection.csv\r\n", - "\n" - ] - } - ], + "execution_count": null, + "outputs": [], "source": [ "run('head data/SMSSpamCollection.csv')\n", "run('wc -l data/SMSSpamCollection.csv')" @@ -199,7 +165,7 @@ }, { "cell_type": "code", - "execution_count": 107, + "execution_count": null, "outputs": [], "source": [ "pipeline = '''\n", @@ -241,7 +207,7 @@ }, { "cell_type": "code", - "execution_count": 122, + "execution_count": null, "outputs": [], "source": [ "pipeline = '''\n", @@ -282,24 +248,8 @@ }, { "cell_type": "code", - "execution_count": 123, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - ">> python -m apache_beam.yaml.main --pipeline_spec_file=pipeline-01-chain.yaml\n", - "Building pipeline...\r\n", - "INFO:apache_beam.yaml.yaml_transform:Expanding \"SmsData\" at line 5 \r\n", - "INFO:apache_beam.yaml.yaml_transform:Expanding \"SplitLine\" at line 9 \r\n", - "INFO:apache_beam.yaml.yaml_transform:Expanding \"KeepSpam\" at line 13 \r\n", - "INFO:apache_beam.yaml.yaml_transform:Expanding \"SaveToText\" at line 17 \r\n", - "Running pipeline...\r\n", - "WARNING:apache_beam.io.filebasedsink:Deleting 1 existing files in target path matching: -*-of-%(num_shards)05d\r\n", - "\n" - ] - } - ], + "execution_count": null, + "outputs": [], "source": [ "run('python -m apache_beam.yaml.main --pipeline_spec_file=pipeline-01-chain.yaml')" ], @@ -318,766 +268,10 @@ }, { "cell_type": "code", - "execution_count": 125, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - ">> cat data/result-pipeline-01-00000-of-00001.txt\n", - "['spam', \"Free entry in 2 a wkly comp to win FA Cup final tkts 21st May 2005. Text FA to 87121 to receive entry question(std txt rate)T&C's apply 08452810075over18's\"]\r\n", - "['spam', \"FreeMsg Hey there darling it's been 3 week's now and no word back! I'd like some fun you up for it still? Tb ok! XxX std chgs to send, £1.50 to rcv\"]\r\n", - "['spam', 'WINNER!! As a valued network customer you have been selected to receivea £900 prize reward! To claim call 09061701461. Claim code KL341. Valid 12 hours only.']\r\n", - "['spam', 'Had your mobile 11 months or more? U R entitled to Update to the latest colour mobiles with camera for Free! Call The Mobile Update Co FREE on 08002986030']\r\n", - "['spam', 'SIX chances to win CASH! From 100 to 20,000 pounds txt> CSH11 and send to 87575. Cost 150p/day, 6days, 16+ TsandCs apply Reply HL 4 info']\r\n", - "['spam', 'URGENT! You have won a 1 week FREE membership in our £100,000 Prize Jackpot! Txt the word: CLAIM to No: 81010 T&C www.dbuk.net LCCLTD POBOX 4403LDNW1A7RW18']\r\n", - "['spam', 'XXXMobileMovieClub: To use your credit, click the WAP link in the next txt message or click here>> http://wap. xxxmobilemovieclub.com?n=QJKGIGHJJGCBL']\r\n", - "['spam', 'England v Macedonia - dont miss the goals/team news. Txt ur national team to 87077 eg ENGLAND to 87077 Try:WALES, SCOTLAND 4txt/ú1.20 POBOXox36504W45WQ 16+']\r\n", - "['spam', 'Thanks for your subscription to Ringtone UK your mobile will be charged £5/month Please confirm by replying YES or NO. If you reply NO you will not be charged']\r\n", - "['spam', '07732584351 - Rodger Burns - MSG = We tried to call you re your reply to our sms for a free nokia mobile + free camcorder. Please call now 08000930705 for delivery tomorrow']\r\n", - "['spam', 'SMS. ac Sptv: The New Jersey Devils and the Detroit Red Wings play Ice Hockey. Correct or Incorrect? End? Reply END SPTV']\r\n", - "['spam', 'Congrats! 1 year special cinema pass for 2 is yours. call 09061209465 now! C Suprman V, Matrix3, StarWars3, etc all 4 FREE! bx420-ip4-5we. 150pm. Dont miss out! ']\r\n", - "['spam', 'As a valued customer, I am pleased to advise you that following recent review of your Mob No. you are awarded with a £1500 Bonus Prize, call 09066364589']\r\n", - "['spam', 'Urgent UR awarded a complimentary trip to EuroDisinc Trav, Aco&Entry41 Or £1000. To claim txt DIS to 87121 18+6*£1.50(moreFrmMob. ShrAcomOrSglSuplt)10, LS1 3AJ']\r\n", - "['spam', 'Did you hear about the new \"Divorce Barbie\"? It comes with all of Ken\\'s stuff!']\r\n", - "['spam', 'Please call our customer service representative on 0800 169 6031 between 10am-9pm as you have WON a guaranteed £1000 cash or £5000 prize!']\r\n", - "['spam', 'Your free ringtone is waiting to be collected. Simply text the password \"MIX\" to 85069 to verify. Get Usher and Britney. FML, PO Box 5249, MK17 92H. 450Ppw 16']\r\n", - "['spam', 'GENT! We are trying to contact you. Last weekends draw shows that you won a £1000 prize GUARANTEED. Call 09064012160. Claim Code K52. Valid 12hrs only. 150ppm']\r\n", - "['spam', 'You are a winner U have been specially selected 2 receive £1000 or a 4* holiday (flights inc) speak to a live operator 2 claim 0871277810910p/min (18+) ']\r\n", - "['spam', 'PRIVATE! Your 2004 Account Statement for 07742676969 shows 786 unredeemed Bonus Points. To claim call 08719180248 Identifier Code: 45239 Expires']\r\n", - "['spam', 'URGENT! Your Mobile No. was awarded £2000 Bonus Caller Prize on 5/9/03 This is our final try to contact U! Call from Landline 09064019788 BOX42WR29C, 150PPM']\r\n", - "['spam', 'Todays Voda numbers ending 7548 are selected to receive a $350 award. If you have a match please call 08712300220 quoting claim code 4041 standard rates app']\r\n", - "['spam', 'Sunshine Quiz Wkly Q! Win a top Sony DVD player if u know which country the Algarve is in? Txt ansr to 82277. £1.50 SP:Tyrone']\r\n", - "['spam', \"Want 2 get laid tonight? Want real Dogging locations sent direct 2 ur mob? Join the UK's largest Dogging Network bt Txting GRAVEL to 69888! Nt. ec2a. 31p.msg@150p\"]\r\n", - "['spam', \"You'll not rcv any more msgs from the chat svc. For FREE Hardcore services text GO to: 69988 If u get nothing u must Age Verify with yr network & try again\"]\r\n", - "['spam', \"FreeMsg Why haven't you replied to my text? I'm Randy, sexy, female and live local. Luv to hear from u. Netcollex Ltd 08700621170150p per msg reply Stop to end\"]\r\n", - "['spam', 'Customer service annoncement. You have a New Years delivery waiting for you. Please call 07046744435 now to arrange delivery']\r\n", - "['spam', 'You are a winner U have been specially selected 2 receive £1000 cash or a 4* holiday (flights inc) speak to a live operator 2 claim 0871277810810']\r\n", - "['spam', '-PLS STOP bootydelious (32/F) is inviting you to be her friend. Reply YES-434 or NO-434 See her: www.SMS.ac/u/bootydelious STOP? Send STOP FRND to 62468']\r\n", - "['spam', 'BangBabes Ur order is on the way. U SHOULD receive a Service Msg 2 download UR content. If U do not, GoTo wap. bangb. tv on UR mobile internet/service menu']\r\n", - "['spam', 'URGENT! We are trying to contact you. Last weekends draw shows that you have won a £900 prize GUARANTEED. Call 09061701939. Claim code S89. Valid 12hrs only']\r\n", - "['spam', 'Please call our customer service representative on FREEPHONE 0808 145 4742 between 9am-11pm as you have WON a guaranteed £1000 cash or £5000 prize!']\r\n", - "['spam', 'Are you unique enough? Find out from 30th August. www.areyouunique.co.uk']\r\n", - "['spam', '500 New Mobiles from 2004, MUST GO! Txt: NOKIA to No: 89545 & collect yours today!From ONLY £1 www.4-tc.biz 2optout 087187262701.50gbp/mtmsg18']\r\n", - "['spam', 'Will u meet ur dream partner soon? Is ur career off 2 a flyng start? 2 find out free, txt HORO followed by ur star sign, e. g. HORO ARIES']\r\n", - "['spam', 'Text & meet someone sexy today. U can find a date or even flirt its up to U. Join 4 just 10p. REPLY with NAME & AGE eg Sam 25. 18 -msg recd@thirtyeight pence']\r\n", - "['spam', 'U 447801259231 have a secret admirer who is looking 2 make contact with U-find out who they R*reveal who thinks UR so special-call on 09058094597']\r\n", - "['spam', 'Congratulations ur awarded 500 of CD vouchers or 125gift guaranteed & Free entry 2 100 wkly draw txt MUSIC to 87066 TnCs www.Ldew.com1win150ppmx3age16']\r\n", - "['spam', 'We tried to contact you re your reply to our offer of a Video Handset? 750 anytime networks mins? UNLIMITED TEXT? Camcorder? Reply or call 08000930705 NOW']\r\n", - "['spam', 'Hey I am really horny want to chat or see me naked text hot to 69698 text charged at 150pm to unsubscribe text stop 69698']\r\n", - "['spam', 'Ur ringtone service has changed! 25 Free credits! Go to club4mobiles.com to choose content now! Stop? txt CLUB STOP to 87070. 150p/wk Club4 PO Box1146 MK45 2WT']\r\n", - "['spam', 'Ringtone Club: Get the UK singles chart on your mobile each week and choose any top quality ringtone! This message is free of charge.']\r\n", - "['spam', 'HMV BONUS SPECIAL 500 pounds of genuine HMV vouchers to be won. Just answer 4 easy questions. Play Now! Send HMV to 86688 More info:www.100percent-real.com']\r\n", - "['spam', \"T-Mobile customer you may now claim your FREE CAMERA PHONE upgrade & a pay & go sim card for your loyalty. Call on 0845 021 3680.Offer ends 28thFeb.T&C's apply\"]\r\n", - "['spam', 'SMS. ac Blind Date 4U!: Rodds1 is 21/m from Aberdeen, United Kingdom. Check Him out http://img. sms. ac/W/icmb3cktz8r7!-4 no Blind Dates send HIDE']\r\n", - "['spam', 'TheMob> Check out our newest selection of content, Games, Tones, Gossip, babes and sport, Keep your mobile fit and funky text WAP to 82468']\r\n", - "['spam', 'Think ur smart ? Win £200 this week in our weekly quiz, text PLAY to 85222 now!T&Cs WinnersClub PO BOX 84, M26 3UZ. 16+. GBP1.50/week']\r\n", - "['spam', 'December only! Had your mobile 11mths+? You are entitled to update to the latest colour camera mobile for Free! Call The Mobile Update Co FREE on 08002986906']\r\n", - "['spam', 'Call Germany for only 1 pence per minute! Call from a fixed line via access number 0844 861 85 85. No prepayment. Direct access!']\r\n", - "['spam', 'Valentines Day Special! Win over £1000 in our quiz and take your partner on the trip of a lifetime! Send GO to 83600 now. 150p/msg rcvd. CustCare:08718720201.']\r\n", - "['spam', 'Fancy a shag? I do.Interested? sextextuk.com txt XXUK SUZY to 69876. Txts cost 1.50 per msg. TnCs on website. X']\r\n", - "['spam', 'Congratulations ur awarded 500 of CD vouchers or 125gift guaranteed & Free entry 2 100 wkly draw txt MUSIC to 87066 TnCs www.Ldew.com1win150ppmx3age16']\r\n", - "['spam', 'Ur cash-balance is currently 500 pounds - to maximize ur cash-in now send CASH to 86688 only 150p/msg. CC: 08708800282 HG/Suite342/2Lands Row/W1J6HL']\r\n", - "['spam', 'Update_Now - Xmas Offer! Latest Motorola, SonyEricsson & Nokia & FREE Bluetooth! Double Mins & 1000 Txt on Orange. Call MobileUpd8 on 08000839402 or call2optout/F4Q=']\r\n", - "['spam', 'Here is your discount code RP176781. To stop further messages reply stop. www.regalportfolio.co.uk. Customer Services 08717205546']\r\n", - "['spam', 'Thanks for your Ringtone Order, Reference T91. You will be charged GBP 4 per week. You can unsubscribe at anytime by calling customer services on 09057039994']\r\n", - "['spam', 'Double mins and txts 4 6months FREE Bluetooth on Orange. Available on Sony, Nokia Motorola phones. Call MobileUpd8 on 08000839402 or call2optout/N9DX']\r\n", - "['spam', '4mths half price Orange line rental & latest camera phones 4 FREE. Had your phone 11mths ? Call MobilesDirect free on 08000938767 to update now! or2stoptxt']\r\n", - "['spam', 'FREE RINGTONE text FIRST to 87131 for a poly or text GET to 87131 for a true tone! Help? 0845 2814032 16 after 1st free, tones are 3x£150pw to e£nd txt stop']\r\n", - "['spam', '100 dating service cal;l 09064012103 box334sk38ch']\r\n", - "['spam', 'FREE entry into our £250 weekly competition just text the word WIN to 80086 NOW. 18 T&C www.txttowin.co.uk']\r\n", - "['spam', 'Send a logo 2 ur lover - 2 names joined by a heart. Txt LOVE NAME1 NAME2 MOBNO eg LOVE ADAM EVE 07123456789 to 87077 Yahoo! POBox36504W45WQ TxtNO 4 no ads 150p']\r\n", - "['spam', 'Someone has contacted our dating service and entered your phone because they fancy you! To find out who it is call from a landline 09111032124 . PoBox12n146tf150p']\r\n", - "['spam', 'URGENT! Your Mobile number has been awarded with a £2000 prize GUARANTEED. Call 09058094455 from land line. Claim 3030. Valid 12hrs only']\r\n", - "['spam', 'Congrats! Nokia 3650 video camera phone is your Call 09066382422 Calls cost 150ppm Ave call 3mins vary from mobiles 16+ Close 300603 post BCM4284 Ldn WC1N3XX']\r\n", - "['spam', \"Loan for any purpose £500 - £75,000. Homeowners + Tenants welcome. Have you been previously refused? We can still help. Call Free 0800 1956669 or text back 'help'\"]\r\n", - "['spam', \"UpgrdCentre Orange customer, you may now claim your FREE CAMERA PHONE upgrade for your loyalty. Call now on 0207 153 9153. Offer ends 26th July. T&C's apply. Opt-out available\"]\r\n", - "['spam', 'okmail: Dear Dave this is your final notice to collect your 4* Tenerife Holiday or #5000 CASH award! Call 09061743806 from landline. TCs SAE Box326 CW25WX 150ppm']\r\n", - "['spam', \"Want 2 get laid tonight? Want real Dogging locations sent direct 2 ur Mob? Join the UK's largest Dogging Network by txting MOAN to 69888Nyt. ec2a. 31p.msg@150p\"]\r\n", - "['spam', 'FREE MESSAGE Activate your 500 FREE Text Messages by replying to this message with the word FREE For terms & conditions, visit www.07781482378.com']\r\n", - "['spam', 'Congrats! 1 year special cinema pass for 2 is yours. call 09061209465 now! C Suprman V, Matrix3, StarWars3, etc all 4 FREE! bx420-ip4-5we. 150pm. Dont miss out!']\r\n", - "['spam', \"+123 Congratulations - in this week's competition draw u have won the £1450 prize to claim just call 09050002311 b4280703. T&Cs/stop SMS 08718727868. Over 18 only 150ppm\"]\r\n", - "['spam', 'You are guaranteed the latest Nokia Phone, a 40GB iPod MP3 player or a £500 prize! Txt word: COLLECT to No: 83355! IBHltd LdnW15H 150p/Mtmsgrcvd18+']\r\n", - "['spam', 'Boltblue tones for 150p Reply POLY# or MONO# eg POLY3 1. Cha Cha Slide 2. Yeah 3. Slow Jamz 6. Toxic 8. Come With Me or STOP 4 more tones txt MORE']\r\n", - "['spam', 'Your credits have been topped up for http://www.bubbletext.com Your renewal Pin is tgxxrz']\r\n", - "['spam', 'URGENT!: Your Mobile No. was awarded a £2,000 Bonus Caller Prize on 02/09/03! This is our 2nd attempt to contact YOU! Call 0871-872-9755 BOX95QU']\r\n", - "['spam', \"Today's Offer! Claim ur £150 worth of discount vouchers! Text YES to 85023 now! SavaMob, member offers mobile! T Cs 08717898035. £3.00 Sub. 16 . Unsub reply X\"]\r\n", - "['spam', 'You will recieve your tone within the next 24hrs. For Terms and conditions please see Channel U Teletext Pg 750']\r\n", - "['spam', 'PRIVATE! Your 2003 Account Statement for 07815296484 shows 800 un-redeemed S.I.M. points. Call 08718738001 Identifier Code 41782 Expires 18/11/04 ']\r\n", - "['spam', 'from www.Applausestore.com MonthlySubscription@50p/msg max6/month T&CsC web age16 2stop txt stop']\r\n", - "['spam', 'GENT! We are trying to contact you. Last weekends draw shows that you won a £1000 prize GUARANTEED. Call 09064012160. Claim Code K52. Valid 12hrs only. 150ppm ']\r\n", - "['spam', 'You have won ?1,000 cash or a ?2,000 prize! To claim, call09050000327']\r\n", - "['spam', 'our mobile number has won £5000, to claim calls us back or ring the claims hot line on 09050005321.']\r\n", - "['spam', 'We tried to contact you re your reply to our offer of 750 mins 150 textand a new video phone call 08002988890 now or reply for free delivery tomorrow']\r\n", - "['spam', \"For ur chance to win a £250 wkly shopping spree TXT: SHOP to 80878. T's&C's www.txt-2-shop.com custcare 08715705022, 1x150p/wk\"]\r\n", - "['spam', 'You have been specially selected to receive a 2000 pound award! Call 08712402050 BEFORE the lines close. Cost 10ppm. 16+. T&Cs apply. AG Promo']\r\n", - "['spam', 'PRIVATE! Your 2003 Account Statement for 07753741225 shows 800 un-redeemed S. I. M. points. Call 08715203677 Identifier Code: 42478 Expires 24/10/04']\r\n", - "['spam', 'You have an important customer service announcement. Call FREEPHONE 0800 542 0825 now!']\r\n", - "['spam', 'XCLUSIVE@CLUBSAISAI 2MOROW 28/5 SOIREE SPECIALE ZOUK WITH NICHOLS FROM PARIS.FREE ROSES 2 ALL LADIES !!! info: 07946746291/07880867867 ']\r\n", - "['spam', '22 days to kick off! For Euro2004 U will be kept up to date with the latest news and results daily. To be removed send GET TXT STOP to 83222']\r\n", - "['spam', 'New TEXTBUDDY Chat 2 horny guys in ur area 4 just 25p Free 2 receive Search postcode or at gaytextbuddy.com. TXT ONE name to 89693']\r\n", - "['spam', 'Todays Vodafone numbers ending with 4882 are selected to a receive a £350 award. If your number matches call 09064019014 to receive your £350 award.']\r\n", - "['spam', 'Dear Voucher Holder, 2 claim this weeks offer, at your PC go to http://www.e-tlp.co.uk/expressoffer Ts&Cs apply.2 stop texts txt STOP to 80062.']\r\n", - "['spam', 'PRIVATE! Your 2003 Account Statement for shows 800 un-redeemed S. I. M. points. Call 08715203694 Identifier Code: 40533 Expires 31/10/04']\r\n", - "['spam', 'You have won ?1,000 cash or a ?2,000 prize! To claim, call09050000327. T&C: RSTM, SW7 3SS. 150ppm']\r\n", - "['spam', '88800 and 89034 are premium phone services call 08718711108']\r\n", - "['spam', 'SMS. ac sun0819 posts HELLO:\"You seem cool, wanted to say hi. HI!!!\" Stop? Send STOP to 62468']\r\n", - "['spam', 'Get ur 1st RINGTONE FREE NOW! Reply to this msg with TONE. Gr8 TOP 20 tones to your phone every week just £1.50 per wk 2 opt out send STOP 08452810071 16']\r\n", - "['spam', \"Hi I'm sue. I am 20 years old and work as a lapdancer. I love sex. Text me live - I'm i my bedroom now. text SUE to 89555. By TextOperator G2 1DA 150ppmsg 18+\"]\r\n", - "['spam', 'Please CALL 08712404000 immediately as there is an urgent message waiting for you.']\r\n", - "['spam', 'To review and KEEP the fantastic Nokia N-Gage game deck with Club Nokia, go 2 www.cnupdates.com/newsletter. unsubscribe from alerts reply with the word OUT']\r\n", - "['spam', '4mths half price Orange line rental & latest camera phones 4 FREE. Had your phone 11mths+? Call MobilesDirect free on 08000938767 to update now! or2stoptxt T&Cs']\r\n", - "['spam', '08714712388 between 10am-7pm Cost 10p']\r\n", - "['spam', '+449071512431 URGENT! This is the 2nd attempt to contact U!U have WON £1250 CALL 09071512433 b4 050703 T&CsBCM4235WC1N3XX. callcost 150ppm mobilesvary. max£7. 50']\r\n", - "['spam', 'You have WON a guaranteed £1000 cash or a £2000 prize. To claim yr prize call our customer service representative on 08714712394 between 10am-7pm']\r\n", - "['spam', 'Email AlertFrom: Jeri StewartSize: 2KBSubject: Low-cost prescripiton drvgsTo listen to email call 123']\r\n", - "['spam', 'Hi. Customer Loyalty Offer:The NEW Nokia6650 Mobile from ONLY £10 at TXTAUCTION! Txt word: START to No: 81151 & get yours Now! 4T&Ctxt TC 150p/MTmsg']\r\n", - "['spam', 'U are subscribed to the best Mobile Content Service in the UK for £3 per 10 days until you send STOP to 82324. Helpline 08706091795']\r\n", - "['spam', \"Do you realize that in about 40 years, we'll have thousands of old ladies running around with tattoos?\"]\r\n", - "['spam', 'You have an important customer service announcement from PREMIER.']\r\n", - "['spam', 'Romantic Paris. 2 nights, 2 flights from £79 Book now 4 next year. Call 08704439680Ts&Cs apply.']\r\n", - "['spam', 'Urgent Ur £500 guaranteed award is still unclaimed! Call 09066368327 NOW closingdate04/09/02 claimcode M39M51 £1.50pmmorefrommobile2Bremoved-MobyPOBox734LS27YF']\r\n", - "['spam', 'UR awarded a City Break and could WIN a £200 Summer Shopping spree every WK. Txt STORE to 88039 . SkilGme. TsCs087147403231Winawk!Age16 £1.50perWKsub']\r\n", - "['spam', 'You have an important customer service announcement from PREMIER. Call FREEPHONE 0800 542 0578 now!']\r\n", - "['spam', 'Ever thought about living a good life with a perfect partner? Just txt back NAME and AGE to join the mobile community. (100p/SMS)']\r\n", - "['spam', '5 Free Top Polyphonic Tones call 087018728737, National Rate. Get a toppoly tune sent every week, just text SUBPOLY to 81618, £3 per pole. UnSub 08718727870.']\r\n", - "['spam', \"Orange customer, you may now claim your FREE CAMERA PHONE upgrade for your loyalty. Call now on 0207 153 9996. Offer ends 14thMarch. T&C's apply. Opt-out availa\"]\r\n", - "['spam', 'Last Chance! Claim ur £150 worth of discount vouchers today! Text SHOP to 85023 now! SavaMob, offers mobile! T Cs SavaMob POBOX84, M263UZ. £3.00 Sub. 16']\r\n", - "['spam', 'FREE for 1st week! No1 Nokia tone 4 ur mobile every week just txt NOKIA to 8077 Get txting and tell ur mates. www.getzed.co.uk POBox 36504 W45WQ 16+ norm150p/tone']\r\n", - "['spam', 'You have won a guaranteed £200 award or even £1000 cashto claim UR award call free on 08000407165 (18+) 2 stop getstop on 88222 PHP. RG21 4JX']\r\n", - "['spam', 'Congratulations ur awarded either £500 of CD gift vouchers & Free entry 2 our £100 weekly draw txt MUSIC to 87066 TnCs www.Ldew.com1win150ppmx3age16']\r\n", - "['spam', 'U were outbid by simonwatson5120 on the Shinco DVD Plyr. 2 bid again, visit sms. ac/smsrewards 2 end bid notifications, reply END OUT']\r\n", - "['spam', 'SMSSERVICES. for yourinclusive text credits, pls goto www.comuk.net login= 3qxj9 unsubscribe with STOP, no extra charge. help 08702840625.COMUK. 220-CM2 9AE']\r\n", - "['spam', \"25p 4 alfie Moon's Children in need song on ur mob. Tell ur m8s. Txt Tone charity to 8007 for Nokias or Poly charity for polys: zed 08701417012 profit 2 charity.\"]\r\n", - "['spam', 'U have a secret admirer. REVEAL who thinks U R So special. Call 09065174042. To opt out Reply REVEAL STOP. 1.50 per msg recd. Cust care 07821230901']\r\n", - "['spam', 'Dear Voucher Holder, To claim this weeks offer, at you PC please go to http://www.e-tlp.co.uk/expressoffer Ts&Cs apply. To stop texts, txt STOP to 80062']\r\n", - "['spam', 'Do you want 750 anytime any network mins 150 text and a NEW VIDEO phone for only five pounds per week call 08002888812 or reply for delivery tomorrow']\r\n", - "['spam', 'We tried to contact you re our offer of New Video Phone 750 anytime any network mins HALF PRICE Rental camcorder call 08000930705 or reply for delivery Wed']\r\n", - "['spam', 'Last chance 2 claim ur £150 worth of discount vouchers-Text YES to 85023 now!SavaMob-member offers mobile T Cs 08717898035. £3.00 Sub. 16 . Remove txt X or STOP']\r\n", - "['spam', 'Urgent! call 09066350750 from your landline. Your complimentary 4* Ibiza Holiday or 10,000 cash await collection SAE T&Cs PO BOX 434 SK3 8WP 150 ppm 18+ ']\r\n", - "['spam', \"Today's Offer! Claim ur £150 worth of discount vouchers! Text YES to 85023 now! SavaMob, member offers mobile! T Cs 08717898035. £3.00 Sub. 16 . Unsub reply X\"]\r\n", - "['spam', 'Talk sexy!! Make new friends or fall in love in the worlds most discreet text dating service. Just text VIP to 83110 and see who you could meet.']\r\n", - "['spam', 'Congratulations ur awarded either a yrs supply of CDs from Virgin Records or a Mystery Gift GUARANTEED Call 09061104283 Ts&Cs www.smsco.net £1.50pm approx 3mins']\r\n", - "['spam', 'PRIVATE! Your 2003 Account Statement for 07808 XXXXXX shows 800 un-redeemed S. I. M. points. Call 08719899217 Identifier Code: 41685 Expires 07/11/04']\r\n", - "['spam', 'Hello. We need some posh birds and chaps to user trial prods for champneys. Can i put you down? I need your address and dob asap. Ta r']\r\n", - "['spam', 'What do U want for Xmas? How about 100 free text messages & a new video phone with half price line rental? Call free now on 0800 0721072 to find out more!']\r\n", - "['spam', 'Shop till u Drop, IS IT YOU, either 10K, 5K, £500 Cash or £100 Travel voucher, Call now, 09064011000. NTT PO Box CR01327BT fixedline Cost 150ppm mobile vary']\r\n", - "['spam', 'Sunshine Quiz Wkly Q! Win a top Sony DVD player if u know which country Liverpool played in mid week? Txt ansr to 82277. £1.50 SP:Tyrone']\r\n", - "['spam', 'U have a secret admirer who is looking 2 make contact with U-find out who they R*reveal who thinks UR so special-call on 09058094565']\r\n", - "['spam', 'U have a Secret Admirer who is looking 2 make contact with U-find out who they R*reveal who thinks UR so special-call on 09065171142-stopsms-08']\r\n", - "['spam', 'Reminder: You have not downloaded the content you have already paid for. Goto http://doit. mymoby. tv/ to collect your content.']\r\n", - "['spam', 'Your free ringtone is waiting to be collected. Simply text the password \"MIX\" to 85069 to verify. Get Usher and Britney. FML, PO Box 5249, MK17 92H. 450Ppw 16']\r\n", - "['spam', 'all the lastest from Stereophonics, Marley, Dizzee Racal, Libertines and The Strokes! Win Nookii games with Flirt!! Click TheMob WAP Bookmark or text WAP to 82468']\r\n", - "['spam', 'January Male Sale! Hot Gay chat now cheaper, call 08709222922. National rate from 1.5p/min cheap to 7.8p/min peak! To stop texts call 08712460324 (10p/min)']\r\n", - "['spam', 'money!!! you r a lucky winner ! 2 claim your prize text money 2 88600 over £1million to give away ! ppt150x3+normal text rate box403 w1t1jy']\r\n", - "['spam', 'Dear Matthew please call 09063440451 from a landline, your complimentary 4*Lux Tenerife holiday or £1000 CASH await collection. ppm150 SAE T&Cs Box334 SK38XH.']\r\n", - "['spam', 'Urgent! call 09061749602 from Landline. Your complimentary 4* Tenerife Holiday or £10,000 cash await collection SAE T&Cs BOX 528 HP20 1YF 150ppm 18+']\r\n", - "['spam', 'How about getting in touch with folks waiting for company? Just txt back your NAME and AGE to opt in! Enjoy the community (150p/SMS)']\r\n", - "['spam', 'Ur cash-balance is currently 500 pounds - to maximize ur cash-in now send GO to 86688 only 150p/msg. CC: 08718720201 PO BOX 114/14 TCR/W1']\r\n", - "['spam', 'Filthy stories and GIRLS waiting for your']\r\n", - "['spam', 'URGENT! We are trying to contact U. Todays draw shows that you have won a £800 prize GUARANTEED. Call 09050001808 from land line. Claim M95. Valid12hrs only']\r\n", - "['spam', 'Congrats! 2 mobile 3G Videophones R yours. call 09063458130 now! videochat wid your mates, play java games, Dload polyPH music, noline rentl.']\r\n", - "['spam', 'Please call our customer service representative on FREEPHONE 0808 145 4742 between 9am-11pm as you have WON a guaranteed £1000 cash or £5000 prize!']\r\n", - "['spam', 'Panasonic & BluetoothHdset FREE. Nokia FREE. Motorola FREE & DoubleMins & DoubleTxt on Orange contract. Call MobileUpd8 on 08000839402 or call 2optout']\r\n", - "['spam', 'FREE for 1st week! No1 Nokia tone 4 ur mob every week just txt NOKIA to 8007 Get txting and tell ur mates www.getzed.co.uk POBox 36504 W45WQ norm150p/tone 16+']\r\n", - "['spam', 'Guess what! Somebody you know secretly fancies you! Wanna find out who it is? Give us a call on 09065394514 From Landline DATEBox1282EssexCM61XN 150p/min 18']\r\n", - "['spam', 'We know someone who you know that fancies you. Call 09058097218 to find out who. POBox 6, LS15HB 150p']\r\n", - "['spam', \"1000's flirting NOW! Txt GIRL or BLOKE & ur NAME & AGE, eg GIRL ZOE 18 to 8007 to join and get chatting!\"]\r\n", - "['spam', '18 days to Euro2004 kickoff! U will be kept informed of all the latest news and results daily. Unsubscribe send GET EURO STOP to 83222.']\r\n", - "['spam', 'EASTENDERS TV Quiz. What FLOWER does DOT compare herself to? D= VIOLET E= TULIP F= LILY txt D E or F to 84025 NOW 4 chance 2 WIN £100 Cash WKENT/150P16+']\r\n", - "['spam', 'We have new local dates in your area - Lots of new people registered in YOUR AREA. Reply DATE to start now! 18 only www.flirtparty.us REPLYS150']\r\n", - "['spam', 'Someone U know has asked our dating service 2 contact you! Cant Guess who? CALL 09058091854 NOW all will be revealed. PO BOX385 M6 6WU']\r\n", - "['spam', 'URGENT! We are trying to contact U. Todays draw shows that you have won a £800 prize GUARANTEED. Call 09050003091 from land line. Claim C52. Valid12hrs only']\r\n", - "['spam', \"Dear U've been invited to XCHAT. This is our final attempt to contact u! Txt CHAT to 86688\"]\r\n", - "['spam', 'You are awarded a SiPix Digital Camera! call 09061221061 from landline. Delivery within 28days. T Cs Box177. M221BP. 2yr warranty. 150ppm. 16 . p p£3.99']\r\n", - "['spam', 'WIN URGENT! Your mobile number has been awarded with a £2000 prize GUARANTEED call 09061790121 from land line. claim 3030 valid 12hrs only 150ppm ']\r\n", - "['spam', 'Dear Subscriber ur draw 4 £100 gift voucher will b entered on receipt of a correct ans. When was Elvis Presleys Birthday? TXT answer to 80062']\r\n", - "['spam', 'Message Important information for O2 user. Today is your lucky day! 2 find out why log onto http://www.urawinner.com there is a fantastic surprise awaiting you']\r\n", - "['spam', '449050000301 You have won a £2,000 price! To claim, call 09050000301.']\r\n", - "['spam', \"Bored of speed dating? Try SPEEDCHAT, txt SPEEDCHAT to 80155, if you don't like em txt SWAP and get a new chatter! Chat80155 POBox36504W45WQ 150p/msg rcd 16\"]\r\n", - "['spam', 'Do you want 750 anytime any network mins 150 text and a NEW video phone for only five pounds per week call 08000776320 now or reply for delivery Tomorrow']\r\n", - "['spam', 'For taking part in our mobile survey yesterday! You can now have 500 texts 2 use however you wish. 2 get txts just send TXT to 80160 T&C www.txt43.com 1.50p']\r\n", - "['spam', 'Ur HMV Quiz cash-balance is currently £500 - to maximize ur cash-in now send HMV1 to 86688 only 150p/msg']\r\n", - "['spam', 'Dont forget you can place as many FREE Requests with 1stchoice.co.uk as you wish. For more Information call 08707808226.']\r\n", - "['spam', \"I don't know u and u don't know me. Send CHAT to 86688 now and let's find each other! Only 150p/Msg rcvd. HG/Suite342/2Lands/Row/W1J6HL LDN. 18 years or over.\"]\r\n", - "['spam', 'Thank you, winner notified by sms. Good Luck! No future marketing reply STOP to 84122 customer services 08450542832']\r\n", - "['spam', \"1000's of girls many local 2 u who r virgins 2 this & r ready 2 4fil ur every sexual need. Can u 4fil theirs? text CUTE to 69911(£1.50p. m)\"]\r\n", - "['spam', \"Free entry in 2 a wkly comp to win FA Cup final tkts 21st May 2005. Text FA to 87121 to receive entry question(std txt rate)T&C's apply 08452810075over18's\"]\r\n", - "['spam', 'Got what it takes 2 take part in the WRC Rally in Oz? U can with Lucozade Energy! Text RALLY LE to 61200 (25p), see packs or lucozade.co.uk/wrc & itcould be u!']\r\n", - "['spam', 'Sex up ur mobile with a FREE sexy pic of Jordan! Just text BABE to 88600. Then every wk get a sexy celeb! PocketBabe.co.uk 4 more pics. 16 £3/wk 087016248']\r\n", - "['spam', 'You have 1 new voicemail. Please call 08719181503']\r\n", - "['spam', 'WIN a year supply of CDs 4 a store of ur choice worth £500 & enter our £100 Weekly draw txt MUSIC to 87066 Ts&Cs www.Ldew.com.subs16+1win150ppmx3']\r\n", - "['spam', 'As a SIM subscriber, you are selected to receive a Bonus! Get it delivered to your door, Txt the word OK to No: 88600 to claim. 150p/msg, EXP. 30Apr']\r\n", - "['spam', 'You have 1 new voicemail. Please call 08719181513.']\r\n", - "['spam', 'No. 1 Nokia Tone 4 ur mob every week! Just txt NOK to 87021. 1st Tone FREE ! so get txtin now and tell ur friends. 150p/tone. 16 reply HL 4info']\r\n", - "['spam', 'You are a winner U have been specially selected 2 receive £1000 cash or a 4* holiday (flights inc) speak to a live operator 2 claim 0871277810810']\r\n", - "['spam', 'Reply with your name and address and YOU WILL RECEIVE BY POST a weeks completely free accommodation at various global locations www.phb1.com ph:08700435505150p']\r\n", - "['spam', 'FREE entry into our £250 weekly comp just send the word ENTER to 84128 NOW. 18 T&C www.textcomp.com cust care 08712405020.']\r\n", - "['spam', 'Please CALL 08712402779 immediately as there is an urgent message waiting for you']\r\n", - "['spam', 'Hungry gay guys feeling hungry and up 4 it, now. Call 08718730555 just 10p/min. To stop texts call 08712460324 (10p/min)']\r\n", - "['spam', 'Can U get 2 phone NOW? I wanna chat 2 set up meet Call me NOW on 09096102316 U can cum here 2moro Luv JANE xx Calls£1/minmoremobsEMSPOBox45PO139WA']\r\n", - "['spam', \"network operator. The service is free. For T & C's visit 80488.biz\"]\r\n", - "['spam', 'Enjoy the jamster videosound gold club with your credits for 2 new videosounds+2 logos+musicnews! get more fun from jamster.co.uk! 16+only Help? call: 09701213186 ']\r\n", - "['spam', 'Get 3 Lions England tone, reply lionm 4 mono or lionp 4 poly. 4 more go 2 www.ringtones.co.uk, the original n best. Tones 3GBP network operator rates apply']\r\n", - "['spam', 'Win the newest “Harry Potter and the Order of the Phoenix (Book 5) reply HARRY, answer 5 questions - chance to be the first among readers!']\r\n", - "['spam', \"Ur balance is now £500. Ur next question is: Who sang 'Uptown Girl' in the 80's ? 2 answer txt ur ANSWER to 83600. Good luck!\"]\r\n", - "['spam', \"FREE2DAY sexy St George's Day pic of Jordan!Txt PIC to 89080 dont miss out, then every wk a saucy celeb!4 more pics c PocketBabe.co.uk 0870241182716 £3/wk\"]\r\n", - "['spam', 'HOT LIVE FANTASIES call now 08707509020 Just 20p per min NTT Ltd, PO Box 1327 Croydon CR9 5WB 0870..k']\r\n", - "['spam', 'Bears Pic Nick, and Tom, Pete and ... Dick. In fact, all types try gay chat with photo upload call 08718730666 (10p/min). 2 stop texts call 08712460324']\r\n", - "['spam', '500 New Mobiles from 2004, MUST GO! Txt: NOKIA to No: 89545 & collect yours today!From ONLY £1 www.4-tc.biz 2optout 087187262701.50gbp/mtmsg18 TXTAUCTION']\r\n", - "['spam', 'Double Mins & Double Txt & 1/2 price Linerental on Latest Orange Bluetooth mobiles. Call MobileUpd8 for the very latest offers. 08000839402 or call2optout/LF56']\r\n", - "['spam', 'No. 1 Nokia Tone 4 ur mob every week! Just txt NOK to 87021. 1st Tone FREE ! so get txtin now and tell ur friends. 150p/tone. 16 reply HL 4info']\r\n", - "['spam', 'URGENT, IMPORTANT INFORMATION FOR O2 USER. TODAY IS YOUR LUCKY DAY! 2 FIND OUT WHY LOG ONTO HTTP://WWW.URAWINNER.COM THERE IS A FANTASTIC SURPRISE AWAITING FOR YOU']\r\n", - "['spam', \"Dear U've been invited to XCHAT. This is our final attempt to contact u! Txt CHAT to 86688 150p/MsgrcvdHG/Suite342/2Lands/Row/W1J6HL LDN 18 yrs\"]\r\n", - "['spam', 'Congratulations ur awarded either £500 of CD gift vouchers & Free entry 2 our £100 weekly draw txt MUSIC to 87066 TnCs www.Ldew.com 1 win150ppmx3age16']\r\n", - "['spam', 'For sale - arsenal dartboard. Good condition but no doubles or trebles!']\r\n", - "['spam', 'Free 1st week entry 2 TEXTPOD 4 a chance 2 win 40GB iPod or £250 cash every wk. Txt POD to 84128 Ts&Cs www.textpod.net custcare 08712405020.']\r\n", - "['spam', 'As a registered optin subscriber ur draw 4 £100 gift voucher will be entered on receipt of a correct ans to 80062 Whats No1 in the BBC charts']\r\n", - "['spam', 'Summers finally here! Fancy a chat or flirt with sexy singles in yr area? To get MATCHED up just reply SUMMER now. Free 2 Join. OptOut txt STOP Help08714742804']\r\n", - "['spam', 'CLAIRE here am havin borin time & am now alone U wanna cum over 2nite? Chat now 09099725823 hope 2 C U Luv CLAIRE xx Calls£1/minmoremobsEMSPOBox45PO139WA']\r\n", - "['spam', 'Bought one ringtone and now getting texts costing 3 pound offering more tones etc']\r\n", - "['spam', '09066362231 URGENT! Your mobile No 07xxxxxxxxx won a £2,000 bonus caller prize on 02/06/03! this is the 2nd attempt to reach YOU! call 09066362231 ASAP!']\r\n", - "['spam', 'YOU 07801543489 are guaranteed the latests Nokia Phone, a 40GB iPod MP3 player or a £500 prize! Txt word:COLLECT to No:83355! TC-LLC NY-USA 150p/Mt msgrcvd18+']\r\n", - "['spam', 'Hi its LUCY Hubby at meetins all day Fri & I will B alone at hotel U fancy cumin over? Pls leave msg 2day 09099726395 Lucy x Calls£1/minMobsmoreLKPOBOX177HP51FL']\r\n", - "['spam', 'Your account has been credited with 500 FREE Text Messages. To activate, just txt the word: CREDIT to No: 80488 T&Cs www.80488.biz']\r\n", - "['spam', 'SMS. ac JSco: Energy is high, but u may not know where 2channel it. 2day ur leadership skills r strong. Psychic? Reply ANS w/question. End? Reply END JSCO']\r\n", - "['spam', 'HOT LIVE FANTASIES call now 08707509020 Just 20p per min NTT Ltd, PO Box 1327 Croydon CR9 5WB 0870 is a national rate call']\r\n", - "['spam', 'Thanks for the Vote. Now sing along with the stars with Karaoke on your mobile. For a FREE link just reply with SING now.']\r\n", - "['spam', 'Our brand new mobile music service is now live. The free music player will arrive shortly. Just install on your phone to browse content from the top artists.']\r\n", - "['spam', 'URGENT! Your Mobile No was awarded a £2,000 Bonus Caller Prize on 1/08/03! This is our 2nd attempt to contact YOU! Call 0871-4719-523 BOX95QU BT National Rate']\r\n", - "['spam', 'You have won a Nokia 7250i. This is what you get when you win our FREE auction. To take part send Nokia to 86021 now. HG/Suite342/2Lands Row/W1JHL 16+']\r\n", - "['spam', \"Hello from Orange. For 1 month's free access to games, news and sport, plus 10 free texts and 20 photo messages, reply YES. Terms apply: www.orange.co.uk/ow\"]\r\n", - "['spam', 'Ur cash-balance is currently 500 pounds - to maximize ur cash-in now send GO to 86688 only 150p/msg. CC 08718720201 HG/Suite342/2Lands Row/W1J6HL']\r\n", - "['spam', 'SMS AUCTION - A BRAND NEW Nokia 7250 is up 4 auction today! Auction is FREE 2 join & take part! Txt NOKIA to 86021 now! HG/Suite342/2Lands Row/W1J6HL']\r\n", - "['spam', 'PRIVATE! Your 2003 Account Statement for shows 800 un-redeemed S. I. M. points. Call 08719899230 Identifier Code: 41685 Expires 07/11/04']\r\n", - "['spam', 'As a Registered Subscriber yr draw 4 a £100 gift voucher will b entered on receipt of a correct ans. When are the next olympics. Txt ans to 80062']\r\n", - "['spam', 'URGENT! Your Mobile number has been awarded with a £2000 prize GUARANTEED. Call 09061790121 from land line. Claim 3030. Valid 12hrs only 150ppm']\r\n", - "['spam', 'RT-KIng Pro Video Club>> Need help? info@ringtoneking.co.uk or call 08701237397 You must be 16+ Club credits redeemable at www.ringtoneking.co.uk! Enjoy!']\r\n", - "['spam', 'U have a secret admirer who is looking 2 make contact with U-find out who they R*reveal who thinks UR so special-call on 09058094599']\r\n", - "['spam', \"500 free text msgs. Just text ok to 80488 and we'll credit your account\"]\r\n", - "['spam', 'You have been selected to stay in 1 of 250 top British hotels - FOR NOTHING! Holiday Worth £350! To Claim, Call London 02072069400. Bx 526, SW73SS']\r\n", - "['spam', 'Eerie Nokia tones 4u, rply TONE TITLE to 8007 eg TONE DRACULA to 8007 Titles: GHOST, ADDAMSFA, MUNSTERS, EXORCIST, TWILIGHT www.getzed.co.uk POBox36504W45WQ 150p']\r\n", - "['spam', '0A$NETWORKS allow companies to bill for SMS, so they are responsible for their \"suppliers\", just as a shop has to give a guarantee on what they sell. B. G.']\r\n", - "['spam', 'FreeMsg:Feelin kinda lnly hope u like 2 keep me company! Jst got a cam moby wanna c my pic?Txt or reply DATE to 82242 Msg150p 2rcv Hlp 08712317606 stop to 82242']\r\n", - "['spam', \"For ur chance to win a £250 cash every wk TXT: ACTION to 80608. T's&C's www.movietrivia.tv custcare 08712405022, 1x150p/wk\"]\r\n", - "['spam', 'RGENT! This is the 2nd attempt to contact U!U have WON £1250 CALL 09071512433 b4 050703 T&CsBCM4235WC1N3XX. callcost 150ppm mobilesvary. max£7. 50']\r\n", - "['spam', 'Hi if ur lookin 4 saucy daytime fun wiv busty married woman Am free all next week Chat now 2 sort time 09099726429 JANINExx Calls£1/minMobsmoreLKPOBOX177HP51FL']\r\n", - "['spam', 'URGENT! We are trying to contact U. Todays draw shows that you have won a £800 prize GUARANTEED. Call 09050001295 from land line. Claim A21. Valid 12hrs only']\r\n", - "['spam', 'Monthly password for wap. mobsi.com is 391784. Use your wap phone not PC.']\r\n", - "['spam', 'todays vodafone numbers ending with 0089(my last four digits) are selected to received a £350 award. If your number matches please call 09063442151 to claim your £350 award']\r\n", - "['spam', 'Free Top ringtone -sub to weekly ringtone-get 1st week free-send SUBPOLY to 81618-?3 per week-stop sms-08718727870']\r\n", - "['spam', 'Sunshine Quiz Wkly Q! Win a top Sony DVD player if u know which country the Algarve is in? Txt ansr to 82277. £1.50 SP:Tyrone']\r\n", - "['spam', 'Free msg. Sorry, a service you ordered from 81303 could not be delivered as you do not have sufficient credit. Please top up to receive the service.']\r\n", - "['spam', \"Hard LIVE 121 chat just 60p/min. Choose your girl and connect LIVE. Call 09094646899 now! Cheap Chat UK's biggest live service. VU BCM1896WC1N3XX\"]\r\n", - "['spam', 'WOW! The Boys R Back. TAKE THAT 2007 UK Tour. Win VIP Tickets & pre-book with VIP Club. Txt CLUB to 81303. Trackmarque Ltd info@vipclub4u.']\r\n", - "['spam', 'Hi, this is Mandy Sullivan calling from HOTMIX FM...you are chosen to receive £5000.00 in our Easter Prize draw.....Please telephone 09041940223 to claim before 29/03/05 or your prize will be transferred to someone else....']\r\n", - "['spam', 'UR GOING 2 BAHAMAS! CallFREEFONE 08081560665 and speak to a live operator to claim either Bahamas cruise of£2000 CASH 18+only. To opt out txt X to 07786200117']\r\n", - "['spam', 'Someone has conacted our dating service and entered your phone because they fancy you!To find out who it is call from landline 09111030116. PoBox12n146tf15']\r\n", - "['spam', 'Hi 07734396839 IBH Customer Loyalty Offer: The NEW NOKIA6600 Mobile from ONLY £10 at TXTAUCTION!Txt word:START to No:81151 & get Yours Now!4T&']\r\n", - "['spam', 'SMS AUCTION You have won a Nokia 7250i. This is what you get when you win our FREE auction. To take part send Nokia to 86021 now. HG/Suite342/2Lands Row/W1JHL 16+']\r\n", - "['spam', 'Call FREEPHONE 0800 542 0578 now!']\r\n", - "['spam', 'Buy Space Invaders 4 a chance 2 win orig Arcade Game console. Press 0 for Games Arcade (std WAP charge) See o2.co.uk/games 4 Terms + settings. No purchase']\r\n", - "['spam', \"Loan for any purpose £500 - £75,000. Homeowners + Tenants welcome. Have you been previously refused? We can still help. Call Free 0800 1956669 or text back 'help'\"]\r\n", - "['spam', 'BIG BROTHER ALERT! The computer has selected u for 10k cash or #150 voucher. Call 09064018838. NTT PO Box CRO1327 18+ BT Landline Cost 150ppm mobiles vary']\r\n", - "['spam', 'WIN: We have a winner! Mr. T. Foley won an iPod! More exciting prizes soon, so keep an eye on ur mobile or visit www.win-82050.co.uk']\r\n", - "['spam', 'Todays Voda numbers ending 1225 are selected to receive a £50award. If you have a match please call 08712300220 quoting claim code 3100 standard rates app ']\r\n", - "['spam', 'Hottest pics straight to your phone!! See me getting Wet and Wanting, just for you xx Text PICS to 89555 now! txt costs 150p textoperator g696ga 18 XxX']\r\n", - "['spam', 'Hack Chat. Get backdoor entry into 121 chat rooms at a fraction of the cost. Reply NEO69 or call 09050280520, to subscribe 25p pm. DPS, Bcm box 8027 Ldn, wc1n3xx']\r\n", - "['spam', \"FREE NOKIA Or Motorola with upto 12mths 1/2price linerental, 500 FREE x-net mins&100txt/mth FREE B'tooth*. Call Mobileupd8 on 08001950382 or call 2optout/D3WV\"]\r\n", - "['spam', 'This is the 2nd time we have tried 2 contact u. U have won the 750 Pound prize. 2 claim is easy, call 08718726970 NOW! Only 10p per min. BT-national-rate ']\r\n", - "['spam', 'You have WON a guaranteed £1000 cash or a £2000 prize.To claim yr prize call our customer service representative on']\r\n", - "['spam', 'Would you like to see my XXX pics they are so hot they were nearly banned in the uk!']\r\n", - "['spam', 'HMV BONUS SPECIAL 500 pounds of genuine HMV vouchers to be won. Just answer 4 easy questions. Play Now! Send HMV to 86688 More info:www.100percent-real.com']\r\n", - "['spam', 'U have a secret admirer who is looking 2 make contact with U-find out who they R*reveal who thinks UR so special-call on 09058094594']\r\n", - "['spam', \"Dear 0776xxxxxxx U've been invited to XCHAT. This is our final attempt to contact u! Txt CHAT to 86688 150p/MsgrcvdHG/Suite342/2Lands/Row/W1J6HL LDN 18yrs \"]\r\n", - "['spam', 'Urgent! Please call 09061743811 from landline. Your ABTA complimentary 4* Tenerife Holiday or £5000 cash await collection SAE T&Cs Box 326 CW25WX 150ppm']\r\n", - "['spam', 'CALL 09090900040 & LISTEN TO EXTREME DIRTY LIVE CHAT GOING ON IN THE OFFICE RIGHT NOW TOTAL PRIVACY NO ONE KNOWS YOUR [sic] LISTENING 60P MIN 24/7MP 0870753331018+']\r\n", - "['spam', 'FreeMsg Hey U, i just got 1 of these video/pic fones, reply WILD to this txt & ill send U my pics, hurry up Im so bored at work xxx (18 150p/rcvd STOP2stop)']\r\n", - "['spam', \"Free entry in 2 a weekly comp for a chance to win an ipod. Txt POD to 80182 to get entry (std txt rate) T&C's apply 08452810073 for details 18+\"]\r\n", - "['spam', 'New TEXTBUDDY Chat 2 horny guys in ur area 4 just 25p Free 2 receive Search postcode or at gaytextbuddy.com. TXT ONE name to 89693. 08715500022 rpl Stop 2 cnl']\r\n", - "['spam', 'Call from 08702490080 - tells u 2 call 09066358152 to claim £5000 prize. U have 2 enter all ur mobile & personal details @ the prompts. Careful!']\r\n", - "['spam', 'Free 1st week entry 2 TEXTPOD 4 a chance 2 win 40GB iPod or £250 cash every wk. Txt VPOD to 81303 Ts&Cs www.textpod.net custcare 08712405020.']\r\n", - "['spam', \"More people are dogging in your area now. Call 09090204448 and join like minded guys. Why not arrange 1 yourself. There's 1 this evening. A£1.50 minAPN LS278BB\"]\r\n", - "['spam', 'WELL DONE! Your 4* Costa Del Sol Holiday or £5000 await collection. Call 09050090044 Now toClaim. SAE, TCs, POBox334, Stockport, SK38xh, Cost£1.50/pm, Max10mins']\r\n", - "['spam', 'Guess what! Somebody you know secretly fancies you! Wanna find out who it is? Give us a call on 09065394973 from Landline DATEBox1282EssexCM61XN 150p/min 18']\r\n", - "['spam', 'it to 80488. Your 500 free text messages are valid until 31 December 2005.']\r\n", - "['spam', 'You have won a guaranteed £200 award or even £1000 cashto claim UR award call free on 08000407165 (18+) 2 stop getstop on 88222 PHP']\r\n", - "['spam', 'Reply to win £100 weekly! Where will the 2006 FIFA World Cup be held? Send STOP to 87239 to end service']\r\n", - "['spam', 'Urgent! Please call 09061743810 from landline. Your ABTA complimentary 4* Tenerife Holiday or #5000 cash await collection SAE T&Cs Box 326 CW25WX 150 ppm']\r\n", - "['spam', 'Free tones Hope you enjoyed your new content. text stop to 61610 to unsubscribe. help:08712400602450p Provided by tones2you.co.uk']\r\n", - "['spam', 'TheMob>Yo yo yo-Here comes a new selection of hot downloads for our members to get for FREE! Just click & open the next link sent to ur fone...']\r\n", - "['spam', 'Great News! Call FREEFONE 08006344447 to claim your guaranteed £1000 CASH or £2000 gift. Speak to a live operator NOW!']\r\n", - "['spam', 'U can WIN £100 of Music Gift Vouchers every week starting NOW Txt the word DRAW to 87066 TsCs www.ldew.com SkillGame,1Winaweek, age16.150ppermessSubscription']\r\n", - "['spam', '4mths half price Orange line rental & latest camera phones 4 FREE. Had your phone 11mths ? Call MobilesDirect free on 08000938767 to update now! or2stoptxt']\r\n", - "['spam', 'Call 09094100151 to use ur mins! Calls cast 10p/min (mob vary). Service provided by AOM, just GBP5/month. AOM Box61,M60 1ER until u stop. Ages 18+ only!']\r\n", - "['spam', 'URGENT! Your mobile No *********** WON a £2,000 Bonus Caller Prize on 02/06/03! This is the 2nd attempt to reach YOU! Call 09066362220 ASAP! BOX97N7QP, 150ppm']\r\n", - "['spam', 'Eerie Nokia tones 4u, rply TONE TITLE to 8007 eg TONE DRACULA to 8007 Titles: GHOST, ADDAMSFA, MUNSTERS, EXORCIST, TWILIGHT www.getzed.co.uk POBox36504W45WQ 150p ']\r\n", - "['spam', 'Sexy Singles are waiting for you! Text your AGE followed by your GENDER as wither M or F E.G.23F. For gay men text your AGE followed by a G. e.g.23G.']\r\n", - "['spam', 'FreeMsg: Claim ur 250 SMS messages-Text OK to 84025 now!Use web2mobile 2 ur mates etc. Join Txt250.com for 1.50p/wk. T&C BOX139, LA32WU. 16 . Remove txtX or stop']\r\n", - "['spam', '85233 FREE>Ringtone!Reply REAL']\r\n", - "['spam', 'Well done ENGLAND! Get the official poly ringtone or colour flag on yer mobile! text TONE or FLAG to 84199 NOW! Opt-out txt ENG STOP. Box39822 W111WX £1.50']\r\n", - "['spam', 'Final Chance! Claim ur £150 worth of discount vouchers today! Text YES to 85023 now! SavaMob, member offers mobile! T Cs SavaMob POBOX84, M263UZ. £3.00 Subs 16']\r\n", - "['spam', 'PRIVATE! Your 2004 Account Statement for 07742676969 shows 786 unredeemed Bonus Points. To claim call 08719180248 Identifier Code: 45239 Expires']\r\n", - "['spam', 'SMS SERVICES. for your inclusive text credits, pls goto www.comuk.net login= ***** unsubscribe with STOP. no extra charge. help:08700469649. PO BOX420. IP4 5WE']\r\n", - "['spam', \"FREE2DAY sexy St George's Day pic of Jordan!Txt PIC to 89080 dont miss out, then every wk a saucy celeb!4 more pics c PocketBabe.co.uk 0870241182716 £3/wk\"]\r\n", - "['spam', 'You are a winner you have been specially selected to receive £1000 cash or a £2000 award. Speak to a live operator to claim call 087123002209am-7pm. Cost 10p']\r\n", - "['spam', 'Sunshine Hols. To claim ur med holiday send a stamped self address envelope to Drinks on Us UK, PO Box 113, Bray, Wicklow, Eire. Quiz Starts Saturday! Unsub Stop']\r\n", - "['spam', 'U can WIN £100 of Music Gift Vouchers every week starting NOW Txt the word DRAW to 87066 TsCs www.Idew.com SkillGame, 1Winaweek, age16. 150ppermessSubscription']\r\n", - "['spam', \"+123 Congratulations - in this week's competition draw u have won the £1450 prize to claim just call 09050002311 b4280703. T&Cs/stop SMS 08718727868. Over 18 only 150ppm\"]\r\n", - "['spam', 'Your B4U voucher w/c 27/03 is MARSMS. Log onto www.B4Utele.com for discount credit. To opt out reply stop. Customer care call 08717168528']\r\n", - "['spam', \"FreeMsg: Hey - I'm Buffy. 25 and love to satisfy men. Home alone feeling randy. Reply 2 C my PIX! QlynnBV Help08700621170150p a msg Send stop to stop txts\"]\r\n", - "['spam', 'Sunshine Hols. To claim ur med holiday send a stamped self address envelope to Drinks on Us UK, PO Box 113, Bray, Wicklow, Eire. Quiz Starts Saturday! Unsub Stop']\r\n", - "['spam', 'FREE for 1st week! No1 Nokia tone 4 ur mob every week just txt NOKIA to 87077 Get txting and tell ur mates. zed POBox 36504 W45WQ norm150p/tone 16+']\r\n", - "['spam', 'Shop till u Drop, IS IT YOU, either 10K, 5K, £500 Cash or £100 Travel voucher, Call now, 09064011000. NTT PO Box CR01327BT fixedline Cost 150ppm mobile vary']\r\n", - "['spam', 'FREE camera phones with linerental from 4.49/month with 750 cross ntwk mins. 1/2 price txt bundle deals also avble. Call 08001950382 or call2optout/J MF']\r\n", - "['spam', 'URGENT! Your mobile No 07xxxxxxxxx won a £2,000 bonus caller prize on 02/06/03! this is the 2nd attempt to reach YOU! call 09066362231 ASAP! BOX97N7QP, 150PPM']\r\n", - "['spam', 'URGENT!! Your 4* Costa Del Sol Holiday or £5000 await collection. Call 09050090044 Now toClaim. SAE, TC s, POBox334, Stockport, SK38xh, Cost£1.50/pm, Max10mins']\r\n", - "['spam', 'You have WON a guaranteed £1000 cash or a £2000 prize. To claim yr prize call our customer service representative on 08714712379 between 10am-7pm Cost 10p']\r\n", - "['spam', 'Thanks for your ringtone order, ref number K718. Your mobile will be charged £4.50. Should your tone not arrive please call customer services on 09065069120']\r\n", - "['spam', \"Hi ya babe x u 4goten bout me?' scammers getting smart..Though this is a regular vodafone no, if you respond you get further prem rate msg/subscription. Other nos used also. Beware!\"]\r\n", - "['spam', 'Back 2 work 2morro half term over! Can U C me 2nite 4 some sexy passion B4 I have 2 go back? Chat NOW 09099726481 Luv DENA Calls £1/minMobsmoreLKPOBOX177HP51FL']\r\n", - "['spam', 'Thanks for your ringtone order, ref number R836. Your mobile will be charged £4.50. Should your tone not arrive please call customer services on 09065069154']\r\n", - "['spam', 'SplashMobile: Choose from 1000s of gr8 tones each wk! This is a subscrition service with weekly tones costing 300p. U have one credit - kick back and ENJOY']\r\n", - "['spam', 'Not heard from U4 a while. Call 4 rude chat private line 01223585334 to cum. Wan 2C pics of me gettin shagged then text PIX to 8552. 2End send STOP 8552 SAM xxx']\r\n", - "['spam', 'FREE entry into our £250 weekly comp just send the word ENTER to 88877 NOW. 18 T&C www.textcomp.com']\r\n", - "['spam', '88066 FROM 88066 LOST 3POUND HELP']\r\n", - "['spam', 'Had your mobile 11mths ? Update for FREE to Oranges latest colour camera mobiles & unlimited weekend calls. Call Mobile Upd8 on freefone 08000839402 or 2StopTx']\r\n", - "['spam', 'You have 1 new message. Please call 08718738034.']\r\n", - "['spam', 'Hi - this is your Mailbox Messaging SMS alert. You have 4 messages. You have 21 matches. Please call back on 09056242159 to retrieve your messages and matches']\r\n", - "['spam', 'Congrats! 1 year special cinema pass for 2 is yours. call 09061209465 now! C Suprman V, Matrix3, StarWars3, etc all 4 FREE! bx420-ip4-5we. 150pm. Dont miss out!']\r\n", - "['spam', 'WIN a year supply of CDs 4 a store of ur choice worth £500 & enter our £100 Weekly draw txt MUSIC to 87066 Ts&Cs www.Ldew.com.subs16+1win150ppmx3']\r\n", - "['spam', 'Moby Pub Quiz.Win a £100 High Street prize if u know who the new Duchess of Cornwall will be? Txt her first name to 82277.unsub STOP £1.50 008704050406 SP Arrow']\r\n", - "['spam', 'You have won a Nokia 7250i. This is what you get when you win our FREE auction. To take part send Nokia to 86021 now. HG/Suite342/2Lands Row/W1JHL 16+ ']\r\n", - "['spam', 'Congratulations! Thanks to a good friend U have WON the £2,000 Xmas prize. 2 claim is easy, just call 08718726971 NOW! Only 10p per minute. BT-national-rate.']\r\n", - "['spam', 'tddnewsletter@emc1.co.uk (More games from TheDailyDraw) Dear Helen, Dozens of Free Games - with great prizesWith..']\r\n", - "['spam', 'URGENT! Your mobile number *************** WON a £2000 Bonus Caller prize on 10/06/03! This is the 2nd attempt to reach you! Call 09066368753 ASAP! Box 97N7QP, 150ppm']\r\n", - "['spam', 'Double your mins & txts on Orange or 1/2 price linerental - Motorola and SonyEricsson with B/Tooth FREE-Nokia FREE Call MobileUpd8 on 08000839402 or2optout/HV9D']\r\n", - "['spam', 'Download as many ringtones as u like no restrictions, 1000s 2 choose. U can even send 2 yr buddys. Txt Sir to 80082 £3 ']\r\n", - "['spam', 'Please CALL 08712402902 immediately as there is an urgent message waiting for you.']\r\n", - "['spam', 'Spook up your mob with a Halloween collection of a logo & pic message plus a free eerie tone, txt CARD SPOOK to 8007 zed 08701417012150p per logo/pic']\r\n", - "['spam', 'Fantasy Football is back on your TV. Go to Sky Gamestar on Sky Active and play £250k Dream Team. Scoring starts on Saturday, so register now!SKY OPT OUT to 88088']\r\n", - "['spam', 'Tone Club: Your subs has now expired 2 re-sub reply MONOC 4 monos or POLYC 4 polys 1 weekly @ 150p per week Txt STOP 2 stop This msg free Stream 0871212025016']\r\n", - "['spam', 'XMAS Prize draws! We are trying to contact U. Todays draw shows that you have won a £2000 prize GUARANTEED. Call 09058094565 from land line. Valid 12hrs only']\r\n", - "['spam', 'YES! The only place in town to meet exciting adult singles is now in the UK. Txt CHAT to 86688 now! 150p/Msg.']\r\n", - "['spam', 'Someone has contacted our dating service and entered your phone becausethey fancy you! To find out who it is call from a landline 09058098002. PoBox1, W14RG 150p']\r\n", - "['spam', 'Babe: U want me dont u baby! Im nasty and have a thing 4 filthyguys. Fancy a rude time with a sexy bitch. How about we go slo n hard! Txt XXX SLO(4msgs)']\r\n", - "['spam', \"I don't know u and u don't know me. Send CHAT to 86688 now and let's find each other! Only 150p/Msg rcvd. HG/Suite342/2Lands/Row/W1J6HL LDN. 18 years or over.\"]\r\n", - "['spam', 'SMS SERVICES For your inclusive text credits pls gotto www.comuk.net login 3qxj9 unsubscribe with STOP no extra charge help 08702840625 comuk.220cm2 9AE']\r\n", - "['spam', 'Valentines Day Special! Win over £1000 in our quiz and take your partner on the trip of a lifetime! Send GO to 83600 now. 150p/msg rcvd. CustCare:08718720201']\r\n", - "['spam', \"Guess who am I?This is the first time I created a web page WWW.ASJESUS.COM read all I wrote. I'm waiting for your opinions. I want to be your friend 1/1\"]\r\n", - "['spam', \"For ur chance to win £250 cash every wk TXT: PLAY to 83370. T's&C's www.music-trivia.net custcare 08715705022, 1x150p/wk.\"]\r\n", - "['spam', 'Final Chance! Claim ur £150 worth of discount vouchers today! Text YES to 85023 now! SavaMob, member offers mobile! T Cs SavaMob POBOX84, M263UZ. £3.00 Subs 16']\r\n", - "['spam', 'Sppok up ur mob with a Halloween collection of nokia logo&pic message plus a FREE eerie tone, txt CARD SPOOK to 8007']\r\n", - "['spam', 'Urgent! call 09066612661 from landline. Your complementary 4* Tenerife Holiday or £10,000 cash await collection SAE T&Cs PO Box 3 WA14 2PX 150ppm 18+ Sender: Hol Offer']\r\n", - "['spam', 'WINNER! As a valued network customer you hvae been selected to receive a £900 reward! To collect call 09061701444. Valid 24 hours only. ACL03530150PM']\r\n", - "['spam', 'U have won a nokia 6230 plus a free digital camera. This is what u get when u win our FREE auction. To take part send NOKIA to 83383 now. POBOX114/14TCR/W1 16']\r\n", - "['spam', 'FREE entry into our £250 weekly comp just send the word WIN to 80086 NOW. 18 T&C www.txttowin.co.uk']\r\n", - "['spam', 'Text82228>> Get more ringtones, logos and games from www.txt82228.com. Questions: info@txt82228.co.uk']\r\n", - "['spam', 'FreeMSG You have been awarded a FREE mini DIGITAL CAMERA, just reply SNAP to collect your prize! (quizclub Opt out? Stop 80122300p/wk SP:RWM Ph:08704050406)']\r\n", - "['spam', 'This message is brought to you by GMW Ltd. and is not connected to the']\r\n", - "['spam', 'Congrats 2 mobile 3G Videophones R yours. call 09063458130 now! videochat wid ur mates, play java games, Dload polypH music, noline rentl. bx420. ip4. 5we. 150p']\r\n", - "['spam', 'Your next amazing xxx PICSFREE1 video will be sent to you enjoy! If one vid is not enough for 2day text back the keyword PICSFREE1 to get the next video.']\r\n", - "['spam', 'U are subscribed to the best Mobile Content Service in the UK for £3 per ten days until you send STOP to 83435. Helpline 08706091795.']\r\n", - "['spam', '3 FREE TAROT TEXTS! Find out about your love life now! TRY 3 FOR FREE! Text CHANCE to 85555 16 only! After 3 Free, Msgs £1.50 each']\r\n", - "['spam', \"Join the UK's horniest Dogging service and u can have sex 2nite!. Just sign up and follow the instructions. Txt ENTRY to 69888 now! Nyt.EC2A.3LP.msg@150p\"]\r\n", - "['spam', 'Sunshine Quiz Wkly Q! Win a top Sony DVD player if u know which country Liverpool played in mid week? Txt ansr to 82277. £1.50 SP:Tyrone']\r\n", - "['spam', 'Knock Knock Txt whose there to 80082 to enter r weekly draw 4 a £250 gift voucher 4 a store of yr choice. T&Cs www.tkls.com age16 to stoptxtstop£1.50/week']\r\n", - "['spam', 'Hi - this is your Mailbox Messaging SMS alert. You have 40 matches. Please call back on 09056242159 to retrieve your messages and matches cc100p/min']\r\n", - "['spam', 'FREE RING TONE just text \"POLYS\" to 87131. Then every week get a new tone. 0870737910216yrs only £1.50/wk.']\r\n", - "['spam', 'URGENT! Your mobile No 077xxx WON a £2,000 Bonus Caller Prize on 02/06/03! This is the 2nd attempt to reach YOU! Call 09066362206 ASAP! BOX97N7QP, 150ppm']\r\n", - "['spam', 'You are guaranteed the latest Nokia Phone, a 40GB iPod MP3 player or a £500 prize! Txt word: COLLECT to No: 83355! IBHltd LdnW15H 150p/Mtmsgrcvd18']\r\n", - "['spam', 'Hello darling how are you today? I would love to have a chat, why dont you tell me what you look like and what you are in to sexy?']\r\n", - "['spam', '8007 FREE for 1st week! No1 Nokia tone 4 ur mob every week just txt NOKIA to 8007 Get txting and tell ur mates www.getzed.co.uk POBox 36504 W4 5WQ norm 150p/tone 16+']\r\n", - "['spam', \"Wanna get laid 2nite? Want real Dogging locations sent direct to ur mobile? Join the UK's largest Dogging Network. Txt PARK to 69696 now! Nyt. ec2a. 3lp £1.50/msg\"]\r\n", - "['spam', 'we tried to contact you re your response to our offer of a new nokia fone and camcorder hit reply or call 08000930705 for delivery']\r\n", - "['spam', 'New Tones This week include: 1)McFly-All Ab.., 2) Sara Jorge-Shock.. 3) Will Smith-Switch.. To order follow instructions on next message']\r\n", - "['spam', 'URGENT! We are trying to contact U. Todays draw shows that you have won a £800 prize GUARANTEED. Call 09050003091 from land line. Claim C52. Valid 12hrs only']\r\n", - "['spam', 'sports fans - get the latest sports news str* 2 ur mobile 1 wk FREE PLUS a FREE TONE Txt SPORT ON to 8007 www.getzed.co.uk 0870141701216+ norm 4txt/120p ']\r\n", - "['spam', 'Urgent Urgent! We have 800 FREE flights to Europe to give away, call B4 10th Sept & take a friend 4 FREE. Call now to claim on 09050000555. BA128NNFWFLY150ppm']\r\n", - "['spam', 'FROM 88066 LOST £12 HELP']\r\n", - "['spam', 'FreeMsg: Fancy a flirt? Reply DATE now & join the UKs fastest growing mobile dating service. Msgs rcvd just 25p to optout txt stop to 83021. Reply DATE now!']\r\n", - "['spam', 'Great NEW Offer - DOUBLE Mins & DOUBLE Txt on best Orange tariffs AND get latest camera phones 4 FREE! Call MobileUpd8 free on 08000839402 NOW! or 2stoptxt T&Cs']\r\n", - "['spam', 'Hope you enjoyed your new content. text stop to 61610 to unsubscribe. help:08712400602450p Provided by tones2you.co.uk']\r\n", - "['spam', '18 days to Euro2004 kickoff! U will be kept informed of all the latest news and results daily. Unsubscribe send GET EURO STOP to 83222.']\r\n", - "['spam', 'Urgent Please call 09066612661 from landline. £5000 cash or a luxury 4* Canary Islands Holiday await collection. T&Cs SAE award. 20M12AQ. 150ppm. 16+ “']\r\n", - "['spam', 'Urgent! Please call 09066612661 from your landline, your complimentary 4* Lux Costa Del Sol holiday or £1000 CASH await collection. ppm 150 SAE T&Cs James 28, EH74RR']\r\n", - "['spam', \"I don't know u and u don't know me. Send CHAT to 86688 now and let's find each other! Only 150p/Msg rcvd. HG/Suite342/2Lands/Row/W1J6HL LDN. 18 years or over.\"]\r\n", - "['spam', 'Married local women looking for discreet action now! 5 real matches instantly to your phone. Text MATCH to 69969 Msg cost 150p 2 stop txt stop BCMSFWC1N3XX']\r\n", - "['spam', 'Burger King - Wanna play footy at a top stadium? Get 2 Burger King before 1st Sept and go Large or Super with Coca-Cola and walk out a winner']\r\n", - "['spam', 'How come it takes so little time for a child who is afraid of the dark to become a teenager who wants to stay out all night?']\r\n", - "['spam', \"For ur chance to win a £250 cash every wk TXT: ACTION to 80608. T's&C's www.movietrivia.tv custcare 08712405022, 1x150p/wk.\"]\r\n", - "['spam', 'U’ve Bin Awarded £50 to Play 4 Instant Cash. Call 08715203028 To Claim. EVERY 9th Player Wins Min £50-£500. OptOut 08718727870']\r\n", - "['spam', 'FreeMsg>FAV XMAS TONES!Reply REAL']\r\n", - "['spam', 'December only! Had your mobile 11mths+? You are entitled to update to the latest colour camera mobile for Free! Call The Mobile Update Co FREE on 08002986906 ']\r\n", - "['spam', 'Gr8 Poly tones 4 ALL mobs direct 2u rply with POLY TITLE to 8007 eg POLY BREATHE1 Titles: CRAZYIN, SLEEPINGWITH, FINEST, YMCA :getzed.co.uk POBox365O4W45WQ 300p']\r\n", - "['spam', \"INTERFLORA - \\x93It's not too late to order Interflora flowers for christmas call 0800 505060 to place your order before Midnight tomorrow.\"]\r\n", - "['spam', 'ROMCAPspam Everyone around should be responding well to your presence since you are so warm and outgoing. You are bringing in a real breath of sunshine.']\r\n", - "['spam', 'Congratulations - Thanks to a good friend U have WON the £2,000 Xmas prize. 2 claim is easy, just call 08712103738 NOW! Only 10p per minute. BT-national-rate']\r\n", - "['spam', 'Send a logo 2 ur lover - 2 names joined by a heart. Txt LOVE NAME1 NAME2 MOBNO eg LOVE ADAM EVE 07123456789 to 87077 Yahoo! POBox36504W45WQ TxtNO 4 no ads 150p.']\r\n", - "['spam', \"You've won tkts to the EURO2004 CUP FINAL or £800 CASH, to collect CALL 09058099801 b4190604, POBOX 7876150ppm\"]\r\n", - "['spam', \"Free-message: Jamster!Get the crazy frog sound now! For poly text MAD1, for real text MAD2 to 88888. 6 crazy sounds for just 3 GBP/week! 16+only! T&C's apply\"]\r\n", - "['spam', 'YOUR CHANCE TO BE ON A REALITY FANTASY SHOW call now = 08707509020 Just 20p per min NTT Ltd, PO Box 1327 Croydon CR9 5WB 0870 is a national = rate call']\r\n", - "['spam', 'Adult 18 Content Your video will be with you shortly']\r\n", - "['spam', 'YOUR CHANCE TO BE ON A REALITY FANTASY SHOW call now = 08707509020 Just 20p per min NTT Ltd, PO Box 1327 Croydon CR9 5WB 0870 is a national = rate call.']\r\n", - "['spam', 'Hey Boys. Want hot XXX pics sent direct 2 ur phone? Txt PORN to 69855, 24Hrs free and then just 50p per day. To stop text STOPBCM SF WC1N3XX']\r\n", - "['spam', 'Last Chance! Claim ur £150 worth of discount vouchers today! Text SHOP to 85023 now! SavaMob, offers mobile! T Cs SavaMob POBOX84, M263UZ. £3.00 Sub. 16']\r\n", - "['spam', 'pdate_Now - Double mins and 1000 txts on Orange tariffs. Latest Motorola, SonyEricsson & Nokia & Bluetooth FREE! Call MobileUpd8 on 08000839402 or call2optout/!YHL']\r\n", - "['spam', 'Ur cash-balance is currently 500 pounds - to maximize ur cash-in now send CASH to 86688 only 150p/msg. CC: 08718720201 PO BOX 114/14 TCR/W1']\r\n", - "['spam', 'URGENT! Your Mobile number has been awarded with a £2000 prize GUARANTEED. Call 09058094454 from land line. Claim 3030. Valid 12hrs only']\r\n", - "['spam', 'Sorry! U can not unsubscribe yet. THE MOB offer package has a min term of 54 weeks> pls resubmit request after expiry. Reply THEMOB HELP 4 more info']\r\n", - "['spam', 'You have 1 new message. Please call 08712400200.']\r\n", - "['spam', 'We currently have a message awaiting your collection. To collect your message just call 08718723815.']\r\n", - "['spam', 'URGENT! Your mobile was awarded a £1,500 Bonus Caller Prize on 27/6/03. Our final attempt 2 contact U! Call 08714714011']\r\n", - "['spam', 'U have a secret admirer. REVEAL who thinks U R So special. Call 09065174042. To opt out Reply REVEAL STOP. 1.50 per msg recd. Cust care 07821230901']\r\n", - "['spam', \"Do you ever notice that when you're driving, anyone going slower than you is an idiot and everyone driving faster than you is a maniac?\"]\r\n", - "['spam', 'Xmas Offer! Latest Motorola, SonyEricsson & Nokia & FREE Bluetooth or DVD! Double Mins & 1000 Txt on Orange. Call MobileUpd8 on 08000839402 or call2optout/4QF2']\r\n", - "['spam', 'Reply to win £100 weekly! What professional sport does Tiger Woods play? Send STOP to 87239 to end service']\r\n", - "['spam', 'No 1 POLYPHONIC tone 4 ur mob every week! Just txt PT2 to 87575. 1st Tone FREE ! so get txtin now and tell ur friends. 150p/tone. 16 reply HL 4info']\r\n", - "['spam', 'HOT LIVE FANTASIES call now 08707509020 Just 20p per min NTT Ltd, PO Box 1327 Croydon CR9 5WB 0870 is a national rate call']\r\n", - "['spam', 'This message is free. Welcome to the new & improved Sex & Dogging club! To unsubscribe from this service reply STOP. msgs@150p 18+only']\r\n", - "['spam', \"You've won tkts to the EURO2004 CUP FINAL or £800 CASH, to collect CALL 09058099801 b4190604, POBOX 7876150ppm\"]\r\n", - "['spam', \"Loan for any purpose £500 - £75,000. Homeowners + Tenants welcome. Have you been previously refused? We can still help. Call Free 0800 1956669 or text back 'help'\"]\r\n", - "['spam', 'Update_Now - 12Mths Half Price Orange line rental: 400mins...Call MobileUpd8 on 08000839402 or call2optout=J5Q']\r\n", - "['spam', 'FREE UNLIMITED HARDCORE PORN direct 2 your mobile Txt PORN to 69200 & get FREE access for 24 hrs then chrgd@50p per day txt Stop 2exit. This msg is free']\r\n", - "['spam', 'EASTENDERS TV Quiz. What FLOWER does DOT compare herself to? D= VIOLET E= TULIP F= LILY txt D E or F to 84025 NOW 4 chance 2 WIN £100 Cash WKENT/150P16+']\r\n", - "['spam', 'You are now unsubscribed all services. Get tons of sexy babes or hunks straight to your phone! go to http://gotbabes.co.uk. No subscriptions.']\r\n", - "['spam', 'Hi babe its Jordan, how r u? Im home from abroad and lonely, text me back if u wanna chat xxSP visionsms.com Text stop to stopCost 150p 08712400603']\r\n", - "['spam', 'Get a brand new mobile phone by being an agent of The Mob! Plus loads more goodies! For more info just text MAT to 87021.']\r\n", - "['spam', 'LORD OF THE RINGS:RETURN OF THE KING in store NOW!REPLY LOTR by 2 June 4 Chance 2 WIN LOTR soundtrack CDs StdTxtRate. Reply STOP to end txts']\r\n", - "['spam', 'Good Luck! Draw takes place 28th Feb 06. Good Luck! For removal send STOP to 87239 customer services 08708034412']\r\n", - "['spam', \"Free entry in 2 a weekly comp for a chance to win an ipod. Txt POD to 80182 to get entry (std txt rate) T&C's apply 08452810073 for details 18+\"]\r\n", - "['spam', '1st wk FREE! Gr8 tones str8 2 u each wk. Txt NOKIA ON to 8007 for Classic Nokia tones or HIT ON to 8007 for Polys. Nokia/150p Poly/200p 16+']\r\n", - "['spam', \"LookAtMe!: Thanks for your purchase of a video clip from LookAtMe!, you've been charged 35p. Think you can do better? Why not send a video in a MMSto 32323.\"]\r\n", - "['spam', 'sexy sexy cum and text me im wet and warm and ready for some porn! u up for some fun? THIS MSG IS FREE RECD MSGS 150P INC VAT 2 CANCEL TEXT STOP']\r\n", - "['spam', \"Hard LIVE 121 chat just 60p/min. Choose your girl and connect LIVE. Call 09094646899 now! Cheap Chat UK's biggest live service. VU BCM1896WC1N3XX\"]\r\n", - "['spam', 'Not heard from U4 a while. Call 4 rude chat private line 01223585334 to cum. Wan 2C pics of me gettin shagged then text PIX to 8552. 2End send STOP 8552 SAM xxx']\r\n", - "['spam', 'This is the 2nd time we have tried to contact u. U have won the £1450 prize to claim just call 09053750005 b4 310303. T&Cs/stop SMS 08718725756. 140ppm']\r\n", - "['spam', 'HOT LIVE FANTASIES call now 08707509020 Just 20p per min NTT Ltd, PO Box 1327 Croydon CR9 5WB 0870..k']\r\n", - "['spam', 'Dear Voucher Holder, To claim this weeks offer, at you PC please go to http://www.e-tlp.co.uk/reward. Ts&Cs apply.']\r\n", - "['spam', 'UR GOING 2 BAHAMAS! CallFREEFONE 08081560665 and speak to a live operator to claim either Bahamas cruise of£2000 CASH 18+only. To opt out txt X to 07786200117']\r\n", - "['spam', 'This is the 2nd time we have tried 2 contact u. U have won the 750 Pound prize. 2 claim is easy, call 08712101358 NOW! Only 10p per min. BT-national-rate']\r\n", - "['spam', 'UR awarded a City Break and could WIN a £200 Summer Shopping spree every WK. Txt STORE to 88039.SkilGme.TsCs087147403231Winawk!Age16+£1.50perWKsub']\r\n", - "['spam', 'URGENT! We are trying to contact U. Todays draw shows that you have won a £2000 prize GUARANTEED. Call 09066358361 from land line. Claim Y87. Valid 12hrs only']\r\n", - "['spam', 'Thanks for your ringtone order, reference number X29. Your mobile will be charged 4.50. Should your tone not arrive please call customer services 09065989180']\r\n", - "['spam', 'SIX chances to win CASH! From 100 to 20,000 pounds txt> CSH11 and send to 87575. Cost 150p/day, 6days, 16+ TsandCs apply Reply HL 4 info']\r\n", - "['spam', 'Ur cash-balance is currently 500 pounds - to maximize ur cash-in now send COLLECT to 83600 only 150p/msg. CC: 08718720201 PO BOX 114/14 TCR/W1']\r\n", - "['spam', 'Congratulations! Thanks to a good friend U have WON the £2,000 Xmas prize. 2 claim is easy, just call 08718726978 NOW! Only 10p per minute. BT-national-rate']\r\n", - "['spam', '44 7732584351, Do you want a New Nokia 3510i colour phone DeliveredTomorrow? With 300 free minutes to any mobile + 100 free texts + Free Camcorder reply or call 08000930705.']\r\n", - "['spam', 'You have 1 new voicemail. Please call 08719181513.']\r\n", - "['spam', 'Someone U know has asked our dating service 2 contact you! Cant Guess who? CALL 09058097189 NOW all will be revealed. POBox 6, LS15HB 150p ']\r\n", - "['spam', 'Camera - You are awarded a SiPix Digital Camera! call 09061221066 fromm landline. Delivery within 28 days']\r\n", - "['spam', 'Todays Voda numbers ending 5226 are selected to receive a ?350 award. If you hava a match please call 08712300220 quoting claim code 1131 standard rates app ']\r\n", - "['spam', 'This message is free. Welcome to the new & improved Sex & Dogging club! To unsubscribe from this service reply STOP. msgs@150p 18 only']\r\n", - "['spam', \"RCT' THNQ Adrian for U text. Rgds Vatian\"]\r\n", - "['spam', 'FREE MESSAGE Activate your 500 FREE Text Messages by replying to this message with the word FREE For terms & conditions, visit www.07781482378.com']\r\n", - "['spam', 'You are being contacted by our dating service by someone you know! To find out who it is, call from a land line 09050000928. PoBox45W2TG150P']\r\n", - "['spam', \"Sorry I missed your call let's talk when you have the time. I'm on 07090201529\"]\r\n", - "['spam', 'complimentary 4 STAR Ibiza Holiday or £10,000 cash needs your URGENT collection. 09066364349 NOW from Landline not to lose out! Box434SK38WP150PPM18+']\r\n", - "['spam', 'FREE MSG:We billed your mobile number by mistake from shortcode 83332.Please call 08081263000 to have charges refunded.This call will be free from a BT landline']\r\n", - "['spam', 'Please CALL 08712402972 immediately as there is an urgent message waiting for you']\r\n", - "['spam', 'URGENT! Your Mobile number has been awarded with a £2000 Bonus Caller Prize. Call 09058095201 from land line. Valid 12hrs only']\r\n", - "['spam', 'As a valued customer, I am pleased to advise you that following recent review of your Mob No. you are awarded with a £1500 Bonus Prize, call 09066364589']\r\n", - "['spam', 'Do you want a New Nokia 3510i colour phone DeliveredTomorrow? With 300 free minutes to any mobile + 100 free texts + Free Camcorder reply or call 08000930705']\r\n", - "['spam', \"LIFE has never been this much fun and great until you came in. You made it truly special for me. I won't forget you! enjoy @ one gbp/sms\"]\r\n", - "['spam', 'Do you want a new Video phone? 600 anytime any network mins 400 Inclusive Video calls AND downloads 5 per week Free delTOMORROW call 08002888812 or reply NOW']\r\n", - "['spam', 'As a valued customer, I am pleased to advise you that following recent review of your Mob No. you are awarded with a £1500 Bonus Prize, call 09066368470']\r\n", - "['spam', 'Welcome! Please reply with your AGE and GENDER to begin. e.g 24M']\r\n", - "['spam', 'Freemsg: 1-month unlimited free calls! Activate SmartCall Txt: CALL to No: 68866. Subscriptn3gbp/wk unlimited calls Help: 08448714184 Stop?txt stop landlineonly']\r\n", - "['spam', 'Had your mobile 10 mths? Update to latest Orange camera/video phones for FREE. Save £s with Free texts/weekend calls. Text YES for a callback orno to opt out']\r\n", - "['spam', 'Am new 2 club & dont fink we met yet Will B gr8 2 C U Please leave msg 2day wiv ur area 09099726553 reply promised CARLIE x Calls£1/minMobsmore LKPOBOX177HP51FL']\r\n", - "['spam', 'Camera - You are awarded a SiPix Digital Camera! call 09061221066 fromm landline. Delivery within 28 days.']\r\n", - "['spam', \"Get a FREE mobile video player FREE movie. To collect text GO to 89105. Its free! Extra films can be ordered t's and c's apply. 18 yrs only\"]\r\n", - "['spam', 'Save money on wedding lingerie at www.bridal.petticoatdreams.co.uk Choose from a superb selection with national delivery. Brought to you by WeddingFriend']\r\n", - "['spam', 'Not heard from U4 a while. Call me now am here all night with just my knickers on. Make me beg for it like U did last time 01223585236 XX Luv Nikiyu4.net']\r\n", - "['spam', 'Bloomberg -Message center +447797706009 Why wait? Apply for your future http://careers. bloomberg.com']\r\n", - "['spam', 'URGENT! We are trying to contact U. Todays draw shows that you have won a £800 prize GUARANTEED. Call 09050001808 from land line. Claim M95. Valid12hrs only']\r\n", - "['spam', 'Do you want a NEW video phone750 anytime any network mins 150 text for only five pounds per week call 08000776320 now or reply for delivery tomorrow']\r\n", - "['spam', 'You are being contacted by our dating service by someone you know! To find out who it is, call from a land line 09050000878. PoBox45W2TG150P']\r\n", - "['spam', 'Wan2 win a Meet+Greet with Westlife 4 U or a m8? They are currently on what tour? 1)Unbreakable, 2)Untamed, 3)Unkempt. Text 1,2 or 3 to 83049. Cost 50p +std text']\r\n", - "['spam', 'Dorothy@kiefer.com (Bank of Granite issues Strong-Buy) EXPLOSIVE PICK FOR OUR MEMBERS *****UP OVER 300% *********** Nasdaq Symbol CDGT That is a $5.00 per..']\r\n", - "['spam', 'You are a £1000 winner or Guaranteed Caller Prize, this is our Final attempt to contact you! To Claim Call 09071517866 Now! 150ppmPOBox10183BhamB64XE']\r\n", - "['spam', \"Xmas & New Years Eve tickets are now on sale from the club, during the day from 10am till 8pm, and on Thurs, Fri & Sat night this week. They're selling fast!\"]\r\n", - "['spam', \"Rock yr chik. Get 100's of filthy films &XXX pics on yr phone now. rply FILTH to 69669. Saristar Ltd, E14 9YT 08701752560. 450p per 5 days. Stop2 cancel\"]\r\n", - "['spam', 'From next month get upto 50% More Calls 4 Ur standard network charge 2 activate Call 9061100010 C Wire3.net 1st4Terms PoBox84 M26 3UZ Cost £1.50 min MobcudB more']\r\n", - "['spam', 'URGENT! We are trying to contact U Todays draw shows that you have won a £800 prize GUARANTEED. Call 09050000460 from land line. Claim J89. po box245c2150pm']\r\n", - "['spam', 'Text BANNEDUK to 89555 to see! cost 150p textoperator g696ga 18+ XXX']\r\n", - "['spam', 'Auction round 4. The highest bid is now £54. Next maximum bid is £71. To bid, send BIDS e. g. 10 (to bid £10) to 83383. Good luck.']\r\n", - "['spam', \"Collect your VALENTINE'S weekend to PARIS inc Flight & Hotel + £200 Prize guaranteed! Text: PARIS to No: 69101. www.rtf.sphosting.com\"]\r\n", - "['spam', 'Customer Loyalty Offer:The NEW Nokia6650 Mobile from ONLY £10 at TXTAUCTION! Txt word: START to No: 81151 & get yours Now! 4T&Ctxt TC 150p/MTmsg']\r\n", - "['spam', \"You won't believe it but it's true. It's Incredible Txts! Reply G now to learn truly amazing things that will blow your mind. From O2FWD only 18p/txt\"]\r\n", - "['spam', 'Hi 07734396839 IBH Customer Loyalty Offer: The NEW NOKIA6600 Mobile from ONLY £10 at TXTAUCTION!Txt word:START to No:81151 & get Yours Now!4T&']\r\n", - "['spam', 'I am hot n horny and willing I live local to you - text a reply to hear strt back from me 150p per msg Netcollex LtdHelpDesk: 02085076972 reply Stop to end']\r\n", - "['spam', 'Do you want a New Nokia 3510i Colour Phone Delivered Tomorrow? With 200 FREE minutes to any mobile + 100 FREE text + FREE camcorder Reply or Call 08000930705']\r\n", - "['spam', \"Congratulations YOU'VE Won. You're a Winner in our August £1000 Prize Draw. Call 09066660100 NOW. Prize Code 2309.\"]\r\n", - "['spam', \"8007 25p 4 Alfie Moon's Children in Need song on ur mob. Tell ur m8s. Txt TONE CHARITY to 8007 for nokias or POLY CHARITY for polys :zed 08701417012 profit 2 charity \"]\r\n", - "['spam', 'Get the official ENGLAND poly ringtone or colour flag on yer mobile for tonights game! Text TONE or FLAG to 84199. Optout txt ENG STOP Box39822 W111WX £1.50']\r\n", - "['spam', 'Customer service announcement. We recently tried to make a delivery to you but were unable to do so, please call 07090298926 to re-schedule. Ref:9307622']\r\n", - "['spam', 'You can stop further club tones by replying \"STOP MIX\" See my-tone.com/enjoy. html for terms. Club tones cost GBP4.50/week. MFL, PO Box 1146 MK45 2WT (2/3)']\r\n", - "['spam', 'wamma get laid?want real doggin locations sent direct to your mobile? join the UKs largest dogging network. txt dogs to 69696 now!nyt. ec2a. 3lp £1.50/msg.']\r\n", - "['spam', 'You have won a Nokia 7250i. This is what you get when you win our FREE auction. To take part send Nokia to 86021 now. HG/Suite342/2Lands Row/W1JHL 16+']\r\n", - "['spam', 'Promotion Number: 8714714 - UR awarded a City Break and could WIN a £200 Summer Shopping spree every WK. Txt STORE to 88039 . SkilGme. TsCs087147403231Winawk!Age16 £1.50perWKsub']\r\n", - "['spam', 'You are a winner you have been specially selected to receive £1000 cash or a £2000 award. Speak to a live operator to claim call 087147123779am-7pm. Cost 10p']\r\n", - "['spam', 'Free Top ringtone -sub to weekly ringtone-get 1st week free-send SUBPOLY to 81618-?3 per week-stop sms-08718727870']\r\n", - "['spam', 'Thanks for your ringtone order, reference number X49. Your mobile will be charged 4.50. Should your tone not arrive please call customer services 09065989182. From: [colour=red]text[/colour]TXTstar']\r\n", - "['spam', 'Hi there, 2nights ur lucky night! Uve been invited 2 XCHAT, the Uks wildest chat! Txt CHAT to 86688 now! 150p/MsgrcvdHG/Suite342/2Lands/Row/W1J6HL LDN 18yrs']\r\n", - "['spam', '2/2 146tf150p']\r\n", - "['spam', 'Dear Voucher Holder 2 claim your 1st class airport lounge passes when using Your holiday voucher call 08704439680. When booking quote 1st class x 2']\r\n", - "['spam', 'Bloomberg -Message center +447797706009 Why wait? Apply for your future http://careers. bloomberg.com']\r\n", - "['spam', 'YES! The only place in town to meet exciting adult singles is now in the UK. Txt CHAT to 86688 now! 150p/Msg.']\r\n", - "['spam', 'FREE for 1st week! No1 Nokia tone 4 ur mob every week just txt NOKIA to 8007 Get txting and tell ur mates www.getzed.co.uk POBox 36504 W45WQ norm150p/tone 16+']\r\n", - "['spam', 'Someone U know has asked our dating service 2 contact you! Cant guess who? CALL 09058095107 NOW all will be revealed. POBox 7, S3XY 150p ']\r\n", - "['spam', 'Mila, age23, blonde, new in UK. I look sex with UK guys. if u like fun with me. Text MTALK to 69866.18 . 30pp/txt 1st 5free. £1.50 increments. Help08718728876']\r\n", - "['spam', 'Claim a 200 shopping spree, just call 08717895698 now! Have you won! MobStoreQuiz10ppm']\r\n", - "['spam', 'Want to funk up ur fone with a weekly new tone reply TONES2U 2 this text. www.ringtones.co.uk, the original n best. Tones 3GBP network operator rates apply']\r\n", - "['spam', \"Twinks, bears, scallies, skins and jocks are calling now. Don't miss the weekend's fun. Call 08712466669 at 10p/min. 2 stop texts call 08712460324(nat rate)\"]\r\n", - "['spam', 'We tried to contact you re your reply to our offer of a Video Handset? 750 anytime any networks mins? UNLIMITED TEXT? Camcorder? Reply or call 08000930705 NOW']\r\n", - "['spam', 'URGENT! We are trying to contact you. Last weekends draw shows that you have won a £900 prize GUARANTEED. Call 09061701851. Claim code K61. Valid 12hours only']\r\n", - "['spam', '74355 XMAS iscoming & ur awarded either £500 CD gift vouchers & free entry 2 r £100 weekly draw txt MUSIC to 87066 TnC']\r\n", - "['spam', 'Congratulations U can claim 2 VIP row A Tickets 2 C Blu in concert in November or Blu gift guaranteed Call 09061104276 to claim TS&Cs www.smsco.net cost£3.75max ']\r\n", - "['spam', 'Fantasy Football is back on your TV. Go to Sky Gamestar on Sky Active and play £250k Dream Team. Scoring starts on Saturday, so register now!SKY OPT OUT to 88088']\r\n", - "['spam', 'Free msg: Single? Find a partner in your area! 1000s of real people are waiting to chat now!Send CHAT to 62220Cncl send STOPCS 08717890890£1.50 per msg']\r\n", - "['spam', 'Win the newest \\x93Harry Potter and the Order of the Phoenix (Book 5) reply HARRY, answer 5 questions - chance to be the first among readers!']\r\n", - "['spam', 'Free Msg: Ringtone!From: http://tms. widelive.com/index. wml?id=1b6a5ecef91ff9*37819&first=true18:0430-JUL-05']\r\n", - "['spam', \"Oh my god! I've found your number again! I'm so glad, text me back xafter this msgs cst std ntwk chg £1.50\"]\r\n", - "['spam', 'A link to your picture has been sent. You can also use http://alto18.co.uk/wave/wave.asp?o=44345']\r\n", - "['spam', 'Double Mins & 1000 txts on Orange tariffs. Latest Motorola, SonyEricsson & Nokia with Bluetooth FREE! Call MobileUpd8 on 08000839402 or call2optout/HF8']\r\n", - "['spam', 'URGENT This is our 2nd attempt to contact U. Your £900 prize from YESTERDAY is still awaiting collection. To claim CALL NOW 09061702893. ACL03530150PM']\r\n", - "['spam', 'Dear Dave this is your final notice to collect your 4* Tenerife Holiday or #5000 CASH award! Call 09061743806 from landline. TCs SAE Box326 CW25WX 150ppm']\r\n", - "['spam', 'tells u 2 call 09066358152 to claim £5000 prize. U have 2 enter all ur mobile & personal details @ the prompts. Careful!']\r\n", - "['spam', 'Your 2004 account for 07XXXXXXXXX shows 786 unredeemed points. To claim call 08719181259 Identifier code: XXXXX Expires 26.03.05']\r\n", - "['spam', 'Do you want a new video handset? 750 anytime any network mins? Half Price Line Rental? Camcorder? Reply or call 08000930705 for delivery tomorrow']\r\n", - "['spam', 'You have an important customer service announcement. Call FREEPHONE 0800 542 0825 now!']\r\n", - "['spam', 'FREE>Ringtone! Reply REAL or POLY eg REAL1 1. PushButton 2. DontCha 3. BabyGoodbye 4. GoldDigger 5. WeBeBurnin 1st tone FREE and 6 more when u join for £3/wk']\r\n", - "['spam', 'Free Msg: get Gnarls Barkleys \"Crazy\" ringtone TOTALLY FREE just reply GO to this message right now!']\r\n", - "['spam', \"Refused a loan? Secured or Unsecured? Can't get credit? Call free now 0800 195 6669 or text back 'help' & we will!\"]\r\n", - "['spam', 'You have been specially selected to receive a \"3000 award! Call 08712402050 BEFORE the lines close. Cost 10ppm. 16+. T&Cs apply. AG Promo']\r\n", - "['spam', 'YOU HAVE WON! As a valued Vodafone customer our computer has picked YOU to win a £150 prize. To collect is easy. Just call 09061743386']\r\n", - "['spam', 'Free video camera phones with Half Price line rental for 12 mths and 500 cross ntwk mins 100 txts. Call MobileUpd8 08001950382 or Call2OptOut/674&']\r\n", - "['spam', 'Great NEW Offer - DOUBLE Mins & DOUBLE Txt on best Orange tariffs AND get latest camera phones 4 FREE! Call MobileUpd8 free on 08000839402 NOW! or 2stoptxt T&Cs']\r\n", - "['spam', 'ringtoneking 84484']\r\n", - "['spam', 'Ringtone Club: Gr8 new polys direct to your mobile every week !']\r\n", - "['spam', '(Bank of Granite issues Strong-Buy) EXPLOSIVE PICK FOR OUR MEMBERS *****UP OVER 300% *********** Nasdaq Symbol CDGT That is a $5.00 per..']\r\n", - "['spam', 'Bored housewives! Chat n date now! 0871750.77.11! BT-national rate 10p/min only from landlines!']\r\n", - "['spam', 'We tried to call you re your reply to our sms for a video mobile 750 mins UNLIMITED TEXT free camcorder Reply or call now 08000930705 Del Thurs']\r\n", - "['spam', 'This is the 2nd time we have tried to contact u. U have won the £400 prize. 2 claim is easy, just call 087104711148 NOW! Only 10p per minute. BT-national-rate']\r\n", - "['spam', 'Wan2 win a Meet+Greet with Westlife 4 U or a m8? They are currently on what tour? 1)Unbreakable, 2)Untamed, 3)Unkempt. Text 1,2 or 3 to 83049. Cost 50p +std text']\r\n", - "['spam', 'Please call our customer service representative on FREEPHONE 0808 145 4742 between 9am-11pm as you have WON a guaranteed £1000 cash or £5000 prize!']\r\n", - "['spam', \"You will be receiving this week's Triple Echo ringtone shortly. Enjoy it!\"]\r\n", - "['spam', \"U've been selected to stay in 1 of 250 top British hotels - FOR NOTHING! Holiday valued at £350! Dial 08712300220 to claim - National Rate Call. Bx526, SW73SS\"]\r\n", - "['spam', 'YOU ARE CHOSEN TO RECEIVE A £350 AWARD! Pls call claim number 09066364311 to collect your award which you are selected to receive as a valued mobile customer.']\r\n", - "['spam', 'Please call our customer service representative on FREEPHONE 0808 145 4742 between 9am-11pm as you have WON a guaranteed £1000 cash or £5000 prize!']\r\n", - "['spam', 'Win a £1000 cash prize or a prize worth £5000']\r\n", - "['spam', 'Thanks for your ringtone order, reference number X49.Your mobile will be charged 4.50. Should your tone not arrive please call customer services 09065989182']\r\n", - "['spam', 'Moby Pub Quiz.Win a £100 High Street prize if u know who the new Duchess of Cornwall will be? Txt her first name to 82277.unsub STOP £1.50 008704050406 SP']\r\n", - "['spam', 'This weeks SavaMob member offers are now accessible. Just call 08709501522 for details! SavaMob, POBOX 139, LA3 2WU. Only £1.50/week. SavaMob - offers mobile!']\r\n", - "['spam', 'You are being contacted by our Dating Service by someone you know! To find out who it is, call from your mobile or landline 09064017305 PoBox75LDNS7 ']\r\n", - "['spam', 'TBS/PERSOLVO. been chasing us since Sept for£38 definitely not paying now thanks to your information. We will ignore them. Kath. Manchester.']\r\n", - "['spam', 'Loans for any purpose even if you have Bad Credit! Tenants Welcome. Call NoWorriesLoans.com on 08717111821']\r\n", - "['spam', '87077: Kick off a new season with 2wks FREE goals & news to ur mobile! Txt ur club name to 87077 eg VILLA to 87077']\r\n", - "['spam', 'Orange brings you ringtones from all time Chart Heroes, with a free hit each week! Go to Ringtones & Pics on wap. To stop receiving these tips reply STOP.']\r\n", - "['spam', 'PRIVATE! Your 2003 Account Statement for 07973788240 shows 800 un-redeemed S. I. M. points. Call 08715203649 Identifier Code: 40533 Expires 31/10/04']\r\n", - "['spam', 'We tried to call you re your reply to our sms for a video mobile 750 mins UNLIMITED TEXT + free camcorder Reply of call 08000930705 Now']\r\n", - "['spam', \"GSOH? Good with SPAM the ladies?U could b a male gigolo? 2 join the uk's fastest growing mens club reply ONCALL. mjzgroup. 08714342399.2stop reply STOP. msg@£1.50rcvd\"]\r\n", - "['spam', 'U have a secret admirer who is looking 2 make contact with U-find out who they R*reveal who thinks UR so special-call on 09058094599']\r\n", - "['spam', 'HOT LIVE FANTASIES call now 08707500020 Just 20p per min NTT Ltd, PO Box 1327 Croydon CR9 5WB 0870 is a national rate call']\r\n", - "['spam', 'URGENT! Your Mobile number has been awarded a 2000 prize GUARANTEED. Call 09061790125 from landline. Claim 3030. Valid 12hrs only 150ppm']\r\n", - "['spam', 'SPJanuary Male Sale! Hot Gay chat now cheaper, call 08709222922. National rate from 1.5p/min cheap to 7.8p/min peak! To stop texts call 08712460324 (10p/min)']\r\n", - "['spam', \"FreeMsg Today's the day if you are ready! I'm horny & live in your town. I love sex fun & games! Netcollex Ltd 08700621170150p per msg reply Stop to end\"]\r\n", - "['spam', 'In The Simpsons Movie released in July 2007 name the band that died at the start of the film? A-Green Day, B-Blue Day, C-Red Day. (Send A, B or C)']\r\n", - "['spam', \"Please call Amanda with regard to renewing or upgrading your current T-Mobile handset free of charge. Offer ends today. Tel 0845 021 3680 subject to T's and C's\"]\r\n", - "['spam', 'URGENT!! Your 4* Costa Del Sol Holiday or £5000 await collection. Call 09050090044 Now toClaim. SAE, TC s, POBox334, Stockport, SK38xh, Cost£1.50/pm, Max10mins']\r\n", - "['spam', 'Want a new Video Phone? 750 anytime any network mins? Half price line rental free text for 3 months? Reply or call 08000930705 for free delivery']\r\n", - "['spam', 'Had your mobile 11 months or more? U R entitled to Update to the latest colour mobiles with camera for Free! Call The Mobile Update Co FREE on 08002986030']\r\n", - "['spam', 'Dear Voucher Holder, To claim this weeks offer, at your PC please go to http://www.wtlp.co.uk/text. Ts&Cs apply.']\r\n", - "['spam', 'Congrats! Nokia 3650 video camera phone is your Call 09066382422 Calls cost 150ppm Ave call 3mins vary from mobiles 16+ Close 300603 post BCM4284 Ldn WC1N3XX']\r\n", - "['spam', 'Urgent! Please call 0906346330. Your ABTA complimentary 4* Spanish Holiday or £10,000 cash await collection SAE T&Cs BOX 47 PO19 2EZ 150ppm 18+']\r\n", - "['spam', 'Double mins and txts 4 6months FREE Bluetooth on Orange. Available on Sony, Nokia Motorola phones. Call MobileUpd8 on 08000839402 or call2optout/N9DX']\r\n", - "['spam', 'FREE for 1st week! No1 Nokia tone 4 ur mob every week just txt NOKIA to 8007 Get txting and tell ur mates www.getzed.co.uk POBox 36504 W45WQ norm150p/tone 16+']\r\n", - "['spam', 'Want to funk up ur fone with a weekly new tone reply TONES2U 2 this text. www.ringtones.co.uk, the original n best. Tones 3GBP network operator rates apply']\r\n", - "['spam', 'cmon babe, make me horny, *turn* me on! Txt me your fantasy now babe -) Im hot, sticky and need you now. All replies cost £1.50. 2 cancel send STOP']\r\n", - "['spam', \"IMPORTANT INFORMATION 4 ORANGE USER 0796XXXXXX. TODAY IS UR LUCKY DAY!2 FIND OUT WHY LOG ONTO http://www.urawinner.com THERE'S A FANTASTIC PRIZEAWAITING YOU!\"]\r\n", - "['spam', 'Missed call alert. These numbers called but left no message. 07008009200']\r\n", - "['spam', 'FREEMSG: Our records indicate you may be entitled to 3750 pounds for the Accident you had. To claim for free reply with YES to this msg. To opt out text STOP']\r\n", - "['spam', 'U can WIN £100 of Music Gift Vouchers every week starting NOW Txt the word DRAW to 87066 TsCs www.Idew.com SkillGame, 1Winaweek, age16. 150ppermessSubscription']\r\n", - "['spam', 'Show ur colours! Euro 2004 2-4-1 Offer! Get an England Flag & 3Lions tone on ur phone! Click on the following service message for info!']\r\n", - "['spam', 'Text PASS to 69669 to collect your polyphonic ringtones. Normal gprs charges apply only. Enjoy your tones']\r\n", - "['spam', 'accordingly. I repeat, just text the word ok on your mobile phone and send']\r\n", - "['spam', 'Block Breaker now comes in deluxe format with new features and great graphics from T-Mobile. Buy for just £5 by replying GET BBDELUXE and take the challenge']\r\n", - "['spam', \"important information 4 orange user . today is your lucky day!2find out why log onto http://www.urawinner.com THERE'S A FANTASTIC SURPRISE AWAITING YOU!\"]\r\n", - "['spam', 'Natalja (25/F) is inviting you to be her friend. Reply YES-440 or NO-440 See her: www.SMS.ac/u/nat27081980 STOP? Send STOP FRND to 62468']\r\n", - "['spam', 'URGENT. Important information for 02 user. Today is your lucky day! 2 find out why , log onto http://www.urawinner.com there is a fantastic surprise awaiting you !']\r\n", - "['spam', 'WINNER!! As a valued network customer you have been selected to receivea £900 prize reward! To claim call 09061701461. Claim code KL341. Valid 12 hours only.']\r\n", - "['spam', 'Kit Strip - you have been billed 150p. Netcollex Ltd. PO Box 1013 IG11 OJA']\r\n", - "['spam', 'HMV BONUS SPECIAL 500 pounds of genuine HMV vouchers to be won. Just answer 4 easy questions. Play Now! Send HMV to 86688 More info:www.100percent-real.com']\r\n", - "['spam', 'Please CALL 08712402578 immediately as there is an urgent message waiting for you']\r\n", - "['spam', 'thesmszone.com lets you send free anonymous and masked messages..im sending this message from there..do you see the potential for abuse???']\r\n", - "['spam', 'WELL DONE! Your 4* Costa Del Sol Holiday or £5000 await collection. Call 09050090044 Now toClaim. SAE, TCs, POBox334, Stockport, SK38xh, Cost£1.50/pm, Max10mins']\r\n", - "['spam', 'Someone U know has asked our dating service 2 contact you! Cant Guess who? CALL 09058091854 NOW all will be revealed. PO BOX385 M6 6WU']\r\n", - "['spam', 'Congrats! 2 mobile 3G Videophones R yours. call 09061744553 now! videochat wid ur mates, play java games, Dload polyH music, noline rentl. bx420. ip4. 5we. 150pm']\r\n", - "['spam', 'U 447801259231 have a secret admirer who is looking 2 make contact with U-find out who they R*reveal who thinks UR so special-call on 09058094597']\r\n", - "['spam', \"important information 4 orange user 0789xxxxxxx. today is your lucky day!2find out why log onto http://www.urawinner.com THERE'S A FANTASTIC SURPRISE AWAITING YOU!\"]\r\n", - "['spam', 'Our dating service has been asked 2 contact U by someone shy! CALL 09058091870 NOW all will be revealed. POBox84, M26 3UZ 150p']\r\n", - "['spam', 'Do you want a new Video handset? 750 any time any network mins? UNLIMITED TEXT? Camcorder? Reply or Call now 08000930705 for del Sat AM']\r\n", - "['spam', 'Ur balance is now £600. Next question: Complete the landmark, Big, A. Bob, B. Barry or C. Ben ?. Text A, B or C to 83738. Good luck!']\r\n", - "['spam', 'Ur TONEXS subscription has been renewed and you have been charged £4.50. You can choose 10 more polys this month. www.clubzed.co.uk *BILLING MSG*']\r\n", - "['spam', \"If you don't, your prize will go to another customer. T&C at www.t-c.biz 18+ 150p/min Polo Ltd Suite 373 London W1J 6HL Please call back if busy\"]\r\n", - "['spam', 'Do you want a New Nokia 3510i Colour Phone Delivered Tomorrow? With 200 FREE minutes to any mobile + 100 FREE text + FREE camcorder Reply or Call 8000930705']\r\n", - "['spam', 'RECPT 1/3. You have ordered a Ringtone. Your order is being processed...']\r\n", - "['spam', 'As one of our registered subscribers u can enter the draw 4 a 100 G.B. gift voucher by replying with ENTER. To unsubscribe text STOP']\r\n", - "['spam', 'For your chance to WIN a FREE Bluetooth Headset then simply reply back with \"ADP\"']\r\n", - "['spam', \"Don't b floppy... b snappy & happy! Only gay chat service with photo upload call 08718730666 (10p/min). 2 stop our texts call 08712460324\"]\r\n", - "['spam', 'Urgent UR awarded a complimentary trip to EuroDisinc Trav, Aco&Entry41 Or £1000. To claim txt DIS to 87121 18+6*£1.50(moreFrmMob. ShrAcomOrSglSuplt)10, LS1 3AJ']\r\n", - "['spam', 'Welcome to UK-mobile-date this msg is FREE giving you free calling to 08719839835. Future mgs billed at 150p daily. To cancel send \"go stop\" to 89123']\r\n", - "['spam', '3. You have received your mobile content. Enjoy']\r\n", - "['spam', 'Want explicit SEX in 30 secs? Ring 02073162414 now! Costs 20p/min']\r\n", - "['spam', 'Latest Nokia Mobile or iPOD MP3 Player +£400 proze GUARANTEED! Reply with: WIN to 83355 now! Norcorp Ltd.£1,50/Mtmsgrcvd18+']\r\n", - "['spam', 'SMS SERVICES. for your inclusive text credits, pls goto www.comuk.net login= 3qxj9 unsubscribe with STOP, no extra charge. help 08702840625.COMUK. 220-CM2 9AE']\r\n", - "['spam', 'Mobile Club: Choose any of the top quality items for your mobile. 7cfca1a']\r\n", - "['spam', 'Money i have won wining number 946 wot do i do next']\r\n", - "['spam', 'Congrats! 2 mobile 3G Videophones R yours. call 09061744553 now! videochat wid ur mates, play java games, Dload polyH music, noline rentl. bx420. ip4. 5we. 150pm']\r\n", - "['spam', \"I want some cock! My hubby's away, I need a real man 2 satisfy me. Txt WIFE to 89938 for no strings action. (Txt STOP 2 end, txt rec £1.50ea. OTBox 731 LA1 7WS. )\"]\r\n", - "['spam', 'Gr8 new service - live sex video chat on your mob - see the sexiest dirtiest girls live on ur phone - 4 details text horny to 89070 to cancel send STOP to 89070']\r\n", - "['spam', 'FreeMsg Hi baby wow just got a new cam moby. Wanna C a hot pic? or Fancy a chat?Im w8in 4uTxt / rply CHAT to 82242 Hlp 08712317606 Msg150p 2rcv']\r\n", - "['spam', 'Wanna have a laugh? Try CHIT-CHAT on your mobile now! Logon by txting the word: CHAT and send it to No: 8883 CM PO Box 4217 London W1A 6ZF 16+ 118p/msg rcvd']\r\n", - "['spam', '\"URGENT! This is the 2nd attempt to contact U!U have WON £1000CALL 09071512432 b4 300603t&csBCM4235WC1N3XX.callcost150ppmmobilesvary. max£7. 50\"']\r\n", - "['spam', 'Congratulations ur awarded 500 of CD vouchers or 125gift guaranteed & Free entry 2 100 wkly draw txt MUSIC to 87066']\r\n", - "['spam', 'Had your contract mobile 11 Mnths? Latest Motorola, Nokia etc. all FREE! Double Mins & Text on Orange tariffs. TEXT YES for callback, no to remove from records']\r\n", - "['spam', 'Urgent! call 09066350750 from your landline. Your complimentary 4* Ibiza Holiday or 10,000 cash await collection SAE T&Cs PO BOX 434 SK3 8WP 150 ppm 18+']\r\n", - "['spam', \"For ur chance to win a £250 wkly shopping spree TXT: SHOP to 80878. T's&C's www.txt-2-shop.com custcare 08715705022, 1x150p/wk\"]\r\n", - "['spam', 'U have a Secret Admirer who is looking 2 make contact with U-find out who they R*reveal who thinks UR so special-call on 09065171142-stopsms-08718727870150ppm']\r\n", - "['spam', 'Mila, age23, blonde, new in UK. I look sex with UK guys. if u like fun with me. Text MTALK to 69866.18 . 30pp/txt 1st 5free. £1.50 increments. Help08718728876']\r\n", - "['spam', 'Well done ENGLAND! Get the official poly ringtone or colour flag on yer mobile! text TONE or FLAG to 84199 NOW! Opt-out txt ENG STOP. Box39822 W111WX £1.50']\r\n", - "['spam', 'FreeMsg: Txt: CALL to No: 86888 & claim your reward of 3 hours talk time to use from your phone now! Subscribe6GBP/mnth inc 3hrs 16 stop?txtStop']\r\n", - "['spam', 'Sunshine Quiz! Win a super Sony DVD recorder if you canname the capital of Australia? Text MQUIZ to 82277. B']\r\n", - "['spam', 'Please call our customer service representative on 0800 169 6031 between 10am-9pm as you have WON a guaranteed £1000 cash or £5000 prize!']\r\n", - "['spam', 'Todays Voda numbers ending with 7634 are selected to receive a £350 reward. If you have a match please call 08712300220 quoting claim code 7684 standard rates apply.']\r\n", - "['spam', 'You are being ripped off! Get your mobile content from www.clubmoby.com call 08717509990 poly/true/Pix/Ringtones/Games six downloads for only 3']\r\n", - "['spam', 'We tried to contact you re your reply to our offer of a Video Phone 750 anytime any network mins Half Price Line Rental Camcorder Reply or call 08000930705']\r\n", - "['spam', 'A £400 XMAS REWARD IS WAITING FOR YOU! Our computer has randomly picked you from our loyal mobile customers to receive a £400 reward. Just call 09066380611 ']\r\n", - "['spam', 'PRIVATE! Your 2003 Account Statement for shows 800 un-redeemed S. I. M. points. Call 08718738002 Identifier Code: 48922 Expires 21/11/04']\r\n", - "['spam', 'Customer service announcement. We recently tried to make a delivery to you but were unable to do so, please call 07099833605 to re-schedule. Ref:9280114']\r\n", - "['spam', 'Hi babe its Chloe, how r u? I was smashed on saturday night, it was great! How was your weekend? U been missing me? SP visionsms.com Text stop to stop 150p/text']\r\n", - "['spam', 'URGENT! Your Mobile No 07808726822 was awarded a £2,000 Bonus Caller Prize on 02/09/03! This is our 2nd attempt to contact YOU! Call 0871-872-9758 BOX95QU']\r\n", - "['spam', 'WIN: We have a winner! Mr. T. Foley won an iPod! More exciting prizes soon, so keep an eye on ur mobile or visit www.win-82050.co.uk']\r\n", - "['spam', 'FREE GAME. Get Rayman Golf 4 FREE from the O2 Games Arcade. 1st get UR games settings. Reply POST, then save & activ8. Press 0 key for Arcade. Termsapply']\r\n", - "['spam', 'Had your mobile 10 mths? Update to the latest Camera/Video phones for FREE. KEEP UR SAME NUMBER, Get extra free mins/texts. Text YES for a call']\r\n", - "['spam', 'Buy Space Invaders 4 a chance 2 win orig Arcade Game console. Press 0 for Games Arcade (std WAP charge) See o2.co.uk/games 4 Terms + settings. No purchase']\r\n", - "['spam', 'Camera - You are awarded a SiPix Digital Camera! call 09061221066 fromm landline. Delivery within 28 days.']\r\n", - "['spam', 'Your weekly Cool-Mob tones are ready to download !This weeks new Tones include: 1) Crazy Frog-AXEL F>>> 2) Akon-Lonely>>> 3) Black Eyed-Dont P >>>More info in n']\r\n", - "['spam', 'Cashbin.co.uk (Get lots of cash this weekend!) www.cashbin.co.uk Dear Welcome to the weekend We have got our biggest and best EVER cash give away!! These..']\r\n", - "['spam', 'URGENT! Your Mobile number has been awarded with a £2000 prize GUARANTEED. Call 09061790121 from land line. Claim 3030. Valid 12hrs only 150ppm']\r\n", - "['spam', 'Thanks 4 your continued support Your question this week will enter u in2 our draw 4 £100 cash. Name the NEW US President? txt ans to 80082']\r\n", - "['spam', 'Your unique user ID is 1172. For removal send STOP to 87239 customer services 08708034412']\r\n", - "['spam', 'Urgent -call 09066649731from Landline. Your complimentary 4* Ibiza Holiday or £10,000 cash await collection SAE T&Cs PO BOX 434 SK3 8WP 150ppm 18+']\r\n", - "['spam', 'URGENT This is our 2nd attempt to contact U. Your £900 prize from YESTERDAY is still awaiting collection. To claim CALL NOW 09061702893']\r\n", - "['spam', 'Santa calling! Would your little ones like a call from Santa Xmas Eve? Call 09077818151 to book you time. Calls1.50ppm last 3mins 30s T&C www.santacalling.com']\r\n", - "['spam', 'PRIVATE! Your 2004 Account Statement for 078498****7 shows 786 unredeemed Bonus Points. To claim call 08719180219 Identifier Code: 45239 Expires 06.05.05']\r\n", - "['spam', 'Check Out Choose Your Babe Videos @ sms.shsex.netUN fgkslpoPW fgkslpo']\r\n", - "['spam', 'u r a winner U ave been specially selected 2 receive £1000 cash or a 4* holiday (flights inc) speak to a live operator 2 claim 0871277810710p/min (18 )']\r\n", - "['spam', 'New Mobiles from 2004, MUST GO! Txt: NOKIA to No: 89545 & collect yours today! From ONLY £1. www.4-tc.biz 2optout 087187262701.50gbp/mtmsg18 TXTAUCTION.']\r\n", - "['spam', 'PRIVATE! Your 2003 Account Statement for shows 800 un-redeemed S. I. M. points. Call 08715203652 Identifier Code: 42810 Expires 29/10/0']\r\n", - "['spam', 'YOU HAVE WON! As a valued Vodafone customer our computer has picked YOU to win a £150 prize. To collect is easy. Just call 09061743386 ']\r\n", - "['spam', '**FREE MESSAGE**Thanks for using the Auction Subscription Service. 18 . 150p/MSGRCVD 2 Skip an Auction txt OUT. 2 Unsubscribe txt STOP CustomerCare 08718726270']\r\n", - "['spam', 'Bored housewives! Chat n date now! 0871750.77.11! BT-national rate 10p/min only from landlines!']\r\n", - "['spam', 'lyricalladie(21/F) is inviting you to be her friend. Reply YES-910 or NO-910. See her: www.SMS.ac/u/hmmross STOP? Send STOP FRND to 62468']\r\n", - "['spam', 'No 1 POLYPHONIC tone 4 ur mob every week! Just txt PT2 to 87575. 1st Tone FREE ! so get txtin now and tell ur friends. 150p/tone. 16 reply HL 4info']\r\n", - "['spam', 'Todays Vodafone numbers ending with 4882 are selected to a receive a £350 award. If your number matches call 09064019014 to receive your £350 award.']\r\n", - "['spam', 'Want the latest Video handset? 750 anytime any network mins? Half price line rental? Reply or call 08000930705 for delivery tomorrow']\r\n", - "['spam', 'ou are guaranteed the latest Nokia Phone, a 40GB iPod MP3 player or a £500 prize! Txt word: COLLECT to No: 83355! IBHltd LdnW15H 150p/Mtmsgrcvd18']\r\n", - "['spam', '* FREE* POLYPHONIC RINGTONE Text SUPER to 87131 to get your FREE POLY TONE of the week now! 16 SN PoBox202 NR31 7ZS subscription 450pw']\r\n", - "['spam', 'Warner Village 83118 C Colin Farrell in SWAT this wkend @Warner Village & get 1 free med. Popcorn!Just show msg+ticket@kiosk.Valid 4-7/12. C t&c @kiosk. Reply SONY 4 mre film offers']\r\n", - "['spam', 'Goal! Arsenal 4 (Henry, 7 v Liverpool 2 Henry scores with a simple shot from 6 yards from a pass by Bergkamp to give Arsenal a 2 goal margin after 78 mins.']\r\n", - "['spam', 'This is the 2nd time we have tried 2 contact u. U have won the 750 Pound prize. 2 claim is easy, call 08712101358 NOW! Only 10p per min. BT-national-rate']\r\n", - "['spam', 'Got what it takes 2 take part in the WRC Rally in Oz? U can with Lucozade Energy! Text RALLY LE to 61200 (25p), see packs or lucozade.co.uk/wrc & itcould be u!']\r\n", - "['spam', 'Hi, the SEXYCHAT girls are waiting for you to text them. Text now for a great night chatting. send STOP to stop this service']\r\n", - "['spam', 'Great News! Call FREEFONE 08006344447 to claim your guaranteed £1000 CASH or £2000 gift. Speak to a live operator NOW!']\r\n", - "['spam', 'Hi this is Amy, we will be sending you a free phone number in a couple of days, which will give you an access to all the adult parties...']\r\n", - "['spam', 'Welcome to Select, an O2 service with added benefits. You can now call our specially trained advisors FREE from your mobile by dialling 402.']\r\n", - "['spam', 'Dear Voucher holder Have your next meal on us. Use the following link on your pc 2 enjoy a 2 4 1 dining experiencehttp://www.vouch4me.com/etlp/dining.asp']\r\n", - "['spam', 'URGENT! We are trying to contact U. Todays draw shows that you have won a £2000 prize GUARANTEED. Call 09058094507 from land line. Claim 3030. Valid 12hrs only']\r\n", - "['spam', \"You can donate £2.50 to UNICEF's Asian Tsunami disaster support fund by texting DONATE to 864233. £2.50 will be added to your next bill\"]\r\n", - "['spam', 'goldviking (29/M) is inviting you to be his friend. Reply YES-762 or NO-762 See him: www.SMS.ac/u/goldviking STOP? Send STOP FRND to 62468']\r\n", - "['spam', 'Phony £350 award - Todays Voda numbers ending XXXX are selected to receive a £350 award. If you have a match please call 08712300220 quoting claim code 3100 standard rates app']\r\n", - "['spam', 'CDs 4u: Congratulations ur awarded £500 of CD gift vouchers or £125 gift guaranteed & Freeentry 2 £100 wkly draw xt MUSIC to 87066 TnCs www.ldew.com1win150ppmx3age16 ']\r\n", - "['spam', 'You have WON a guaranteed £1000 cash or a £2000 prize. To claim yr prize call our customer service representative on 08714712412 between 10am-7pm Cost 10p']\r\n", - "['spam', \"Dear 0776xxxxxxx U've been invited to XCHAT. This is our final attempt to contact u! Txt CHAT to 86688 150p/MsgrcvdHG/Suite342/2Lands/Row/W1J6HL LDN 18yrs\"]\r\n", - "['spam', 'Ur cash-balance is currently 500 pounds - to maximize ur cash-in now send GO to 86688 only 150p/meg. CC: 08718720201 HG/Suite342/2lands Row/W1j6HL']\r\n", - "['spam', 'PRIVATE! Your 2003 Account Statement for shows 800 un-redeemed S.I.M. points. Call 08715203685 Identifier Code:4xx26 Expires 13/10/04']\r\n", - "['spam', \"I'd like to tell you my deepest darkest fantasies. Call me 09094646631 just 60p/min. To stop texts call 08712460324 (nat rate)\"]\r\n", - "['spam', \"You won't believe it but it's true. It's Incredible Txts! Reply G now to learn truly amazing things that will blow your mind. From O2FWD only 18p/txt\"]\r\n", - "['spam', 'Natalie (20/F) is inviting you to be her friend. Reply YES-165 or NO-165 See her: www.SMS.ac/u/natalie2k9 STOP? Send STOP FRND to 62468']\r\n", - "['spam', 'Jamster! To get your free wallpaper text HEART to 88888 now! T&C apply. 16 only. Need Help? Call 08701213186.']\r\n", - "['spam', 'Double Mins & Double Txt & 1/2 price Linerental on Latest Orange Bluetooth mobiles. Call MobileUpd8 for the very latest offers. 08000839402 or call2optout/LF56']\r\n", - "['spam', 'Free video camera phones with Half Price line rental for 12 mths and 500 cross ntwk mins 100 txts. Call MobileUpd8 08001950382 or Call2OptOut/674']\r\n", - "['spam', '83039 62735=£450 UK Break AccommodationVouchers terms & conditions apply. 2 claim you mustprovide your claim number which is 15541 ']\r\n", - "['spam', \"5p 4 alfie Moon's Children in need song on ur mob. Tell ur m8s. Txt Tone charity to 8007 for Nokias or Poly charity for polys: zed 08701417012 profit 2 charity.\"]\r\n", - "['spam', 'WIN a £200 Shopping spree every WEEK Starting NOW. 2 play text STORE to 88039. SkilGme. TsCs08714740323 1Winawk! age16 £1.50perweeksub.']\r\n", - "['spam', 'This is the 2nd attempt to contract U, you have won this weeks top prize of either £1000 cash or £200 prize. Just call 09066361921']\r\n", - "['spam', 'Do you want a New Nokia 3510i colour phone DeliveredTomorrow? With 300 free minutes to any mobile + 100 free texts + Free Camcorder reply or call 08000930705.']\r\n", - "['spam', 'TheMob>Hit the link to get a premium Pink Panther game, the new no. 1 from Sugababes, a crazy Zebra animation or a badass Hoody wallpaper-all 4 FREE!']\r\n", - "['spam', 'This msg is for your mobile content order It has been resent as previous attempt failed due to network error Queries to customersqueries@netvision.uk.com']\r\n", - "['spam', 'You have 1 new message. Please call 08715205273']\r\n", - "['spam', 'December only! Had your mobile 11mths+? You are entitled to update to the latest colour camera mobile for Free! Call The Mobile Update VCo FREE on 08002986906 ']\r\n", - "['spam', 'Get 3 Lions England tone, reply lionm 4 mono or lionp 4 poly. 4 more go 2 www.ringtones.co.uk, the original n best. Tones 3GBP network operator rates apply.']\r\n", - "['spam', 'PRIVATE! Your 2003 Account Statement for 078']\r\n", - "['spam', 'YOU VE WON! Your 4* Costa Del Sol Holiday or £5000 await collection. Call 09050090044 Now toClaim. SAE, TC s, POBox334, Stockport, SK38xh, Cost£1.50/pm, Max10mins']\r\n", - "['spam', 'FREE for 1st week! No1 Nokia tone 4 ur mobile every week just txt NOKIA to 8077 Get txting and tell ur mates. www.getzed.co.uk POBox 36504 W45WQ 16+ norm150p/tone']\r\n", - "['spam', 'Get your garden ready for summer with a FREE selection of summer bulbs and seeds worth £33:50 only with The Scotsman this Saturday. To stop go2 notxt.co.uk']\r\n", - "['spam', 'Congrats 2 mobile 3G Videophones R yours. call 09063458130 now! videochat wid ur mates, play java games, Dload polypH music, noline rentl. bx420. ip4. 5we. 150p']\r\n", - "['spam', 'SMS AUCTION - A BRAND NEW Nokia 7250 is up 4 auction today! Auction is FREE 2 join & take part! Txt NOKIA to 86021 now!']\r\n", - "['spam', \"ree entry in 2 a weekly comp for a chance to win an ipod. Txt POD to 80182 to get entry (std txt rate) T&C's apply 08452810073 for details 18+\"]\r\n", - "['spam', 'Our records indicate u maybe entitled to 5000 pounds in compensation for the Accident you had. To claim 4 free reply with CLAIM to this msg. 2 stop txt STOP']\r\n", - "['spam', 'Spook up your mob with a Halloween collection of a logo & pic message plus a free eerie tone, txt CARD SPOOK to 8007 zed 08701417012150p per logo/pic ']\r\n", - "['spam', 'Call Germany for only 1 pence per minute! Call from a fixed line via access number 0844 861 85 85. No prepayment. Direct access! www.telediscount.co.uk']\r\n", - "['spam', 'YOU VE WON! Your 4* Costa Del Sol Holiday or £5000 await collection. Call 09050090044 Now toClaim. SAE, TC s, POBox334, Stockport, SK38xh, Cost£1.50/pm, Max10mins']\r\n", - "['spam', 'Had your mobile 11mths ? Update for FREE to Oranges latest colour camera mobiles & unlimited weekend calls. Call Mobile Upd8 on freefone 08000839402 or 2StopTxt']\r\n", - "['spam', 'Natalja (25/F) is inviting you to be her friend. Reply YES-440 or NO-440 See her: www.SMS.ac/u/nat27081980 STOP? Send STOP FRND to 62468']\r\n", - "['spam', 'PRIVATE! Your 2003 Account Statement for shows 800 un-redeemed S. I. M. points. Call 08715203656 Identifier Code: 42049 Expires 26/10/04']\r\n", - "['spam', 'YOU ARE CHOSEN TO RECEIVE A £350 AWARD! Pls call claim number 09066364311 to collect your award which you are selected to receive as a valued mobile customer.']\r\n", - "['spam', 'Someonone you know is trying to contact you via our dating service! To find out who it could be call from your mobile or landline 09064015307 BOX334SK38ch ']\r\n", - "['spam', 'Urgent! Please call 09061213237 from a landline. £5000 cash or a 4* holiday await collection. T &Cs SAE PO Box 177 M227XY. 16+']\r\n", - "['spam', \"If you don't, your prize will go to another customer. T&C at www.t-c.biz 18+ 150p/min Polo Ltd Suite 373 London W1J 6HL Please call back if busy \"]\r\n", - "['spam', 'URGENT! Your Mobile number has been awarded with a £2000 prize GUARANTEED. Call 09061790126 from land line. Claim 3030. Valid 12hrs only 150ppm']\r\n", - "['spam', 'URGENT! You have won a 1 week FREE membership in our £100,000 Prize Jackpot! Txt the word: CLAIM to No: 81010 T&C www.dbuk.net LCCLTD POBOX 4403LDNW1A7RW18']\r\n", - "['spam', 'Urgent! Please call 09061213237 from landline. £5000 cash or a luxury 4* Canary Islands Holiday await collection. T&Cs SAE PO Box 177. M227XY. 150ppm. 16+']\r\n", - "['spam', 'XMAS iscoming & ur awarded either £500 CD gift vouchers & free entry 2 r £100 weekly draw txt MUSIC to 87066 TnC www.Ldew.com1win150ppmx3age16subscription ']\r\n", - "['spam', 'Get the official ENGLAND poly ringtone or colour flag on yer mobile for tonights game! Text TONE or FLAG to 84199. Optout txt ENG STOP Box39822 W111WX £1.50']\r\n", - "['spam', 'u r subscribed 2 TEXTCOMP 250 wkly comp. 1st wk?s free question follows, subsequent wks charged@150p/msg.2 unsubscribe txt STOP 2 84128,custcare 08712405020']\r\n", - "['spam', 'Call 09095350301 and send our girls into erotic ecstacy. Just 60p/min. To stop texts call 08712460324 (nat rate)']\r\n", - "['spam', 'Camera - You are awarded a SiPix Digital Camera! call 09061221066 fromm landline. Delivery within 28 days.']\r\n", - "['spam', 'A £400 XMAS REWARD IS WAITING FOR YOU! Our computer has randomly picked you from our loyal mobile customers to receive a £400 reward. Just call 09066380611']\r\n", - "['spam', 'IMPORTANT MESSAGE. This is a final contact attempt. You have important messages waiting out our customer claims dept. Expires 13/4/04. Call 08717507382 NOW!']\r\n", - "['spam', 'dating:i have had two of these. Only started after i sent a text to talk sport radio last week. Any connection do you think or coincidence?']\r\n", - "['spam', 'The current leading bid is 151. To pause this auction send OUT. Customer Care: 08718726270']\r\n", - "['spam', 'Free entry to the gr8prizes wkly comp 4 a chance to win the latest Nokia 8800, PSP or £250 cash every wk.TXT GREAT to 80878 http//www.gr8prizes.com 08715705022']\r\n", - "['spam', 'You have 1 new message. Call 0207-083-6089']\r\n", - "['spam', 'Santa Calling! Would your little ones like a call from Santa Xmas eve? Call 09058094583 to book your time.']\r\n", - "['spam', 'You have won a guaranteed 32000 award or maybe even £1000 cash to claim ur award call free on 0800 ..... (18+). Its a legitimat efreefone number wat do u think???']\r\n", - "['spam', 'Latest News! Police station toilet stolen, cops have nothing to go on!']\r\n", - "['spam', '\"For the most sparkling shopping breaks from 45 per person; call 0121 2025050 or visit www.shortbreaks.org.uk\"']\r\n", - "['spam', 'December only! Had your mobile 11mths+? You are entitled to update to the latest colour camera mobile for Free! Call The Mobile Update Co FREE on 08002986906']\r\n", - "['spam', 'Txt: CALL to No: 86888 & claim your reward of 3 hours talk time to use from your phone now! Subscribe6GBP/mnth inc 3hrs 16 stop?txtStop www.gamb.tv']\r\n", - "['spam', 'http//tms. widelive.com/index. wml?id=820554ad0a1705572711&first=true¡C C Ringtone¡']\r\n", - "['spam', 'Get your garden ready for summer with a FREE selection of summer bulbs and seeds worth £33:50 only with The Scotsman this Saturday. To stop go2 notxt.co.uk']\r\n", - "['spam', \"URGENT! Last weekend's draw shows that you have won £1000 cash or a Spanish holiday! CALL NOW 09050000332 to claim. T&C: RSTM, SW7 3SS. 150ppm\"]\r\n", - "['spam', 'URGENT We are trying to contact you Last weekends draw shows u have won a £1000 prize GUARANTEED Call 09064017295 Claim code K52 Valid 12hrs 150p pm']\r\n", - "['spam', \"2p per min to call Germany 08448350055 from your BT line. Just 2p per min. Check PlanetTalkInstant.com for info & T's & C's. Text stop to opt out\"]\r\n", - "['spam', 'Marvel Mobile Play the official Ultimate Spider-man game (£4.50) on ur mobile right now. Text SPIDER to 83338 for the game & we ll send u a FREE 8Ball wallpaper']\r\n", - "['spam', 'SMS SERVICES. for your inclusive text credits, pls goto www.comuk.net login= 3qxj9 unsubscribe with STOP, no extra charge. help 08702840625.COMUK. 220-CM2 9AE']\r\n", - "['spam', 'PRIVATE! Your 2003 Account Statement for 07808247860 shows 800 un-redeemed S. I. M. points. Call 08719899229 Identifier Code: 40411 Expires 06/11/04']\r\n", - "['spam', 'You are awarded a SiPix Digital Camera! call 09061221061 from landline. Delivery within 28days. T Cs Box177. M221BP. 2yr warranty. 150ppm. 16 . p p£3.99']\r\n", - "['spam', 'PRIVATE! Your 2003 Account Statement for shows 800 un-redeemed S.I.M. points. Call 08718738001 Identifier Code: 49557 Expires 26/11/04']\r\n", - "['spam', 'Want explicit SEX in 30 secs? Ring 02073162414 now! Costs 20p/min Gsex POBOX 2667 WC1N 3XX']\r\n", - "['spam', 'ASKED 3MOBILE IF 0870 CHATLINES INCLU IN FREE MINS. INDIA CUST SERVs SED YES. L8ER GOT MEGA BILL. 3 DONT GIV A SHIT. BAILIFF DUE IN DAYS. I O £250 3 WANT £800']\r\n", - "['spam', 'Had your contract mobile 11 Mnths? Latest Motorola, Nokia etc. all FREE! Double Mins & Text on Orange tariffs. TEXT YES for callback, no to remove from records.']\r\n", - "['spam', 'REMINDER FROM O2: To get 2.50 pounds free call credit and details of great offers pls reply 2 this text with your valid name, house no and postcode']\r\n", - "['spam', 'This is the 2nd time we have tried 2 contact u. U have won the £750 Pound prize. 2 claim is easy, call 087187272008 NOW1! Only 10p per minute. BT-national-rate.']\r\n", - "\n" - ] - } - ], + "execution_count": null, + "outputs": [], "source": [ - "run('cat data/result-pipeline-01-00000-of-00001.txt')" + "run('head data/result-pipeline-01-00000-of-00001.txt')" ], "metadata": { "collapsed": false @@ -1097,7 +291,7 @@ "source": [ "## Count words in spam messages, select top 10 popular words and write results to a file\n", "\n", - "Now we'd like to write a pipeline which counts words occurring in spam messages, selects the most popular ones and writes the result to a file.\n" + "We'd like to write a pipeline which counts words occurring in spam messages, selects the most popular ones and writes the result to a file.\n" ], "metadata": { "collapsed": false @@ -1105,7 +299,7 @@ }, { "cell_type": "code", - "execution_count": 118, + "execution_count": null, "outputs": [], "source": [ "pipeline = '''\n", @@ -1179,30 +373,8 @@ }, { "cell_type": "code", - "execution_count": 119, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - ">> python -m apache_beam.yaml.main --pipeline_spec_file=pipeline-02.yaml\n", - "Building pipeline...\r\n", - "INFO:apache_beam.yaml.yaml_transform:Expanding \"SmsData\" at line 3 \r\n", - "INFO:apache_beam.yaml.yaml_transform:Expanding \"SplitLine\" at line 7 \r\n", - "INFO:apache_beam.yaml.yaml_transform:Expanding \"SpamMessages\" at line 12 \r\n", - "INFO:apache_beam.yaml.yaml_transform:Expanding \"FindWords\" at line 22 \r\n", - "INFO:apache_beam.yaml.yaml_transform:Expanding \"PairLoweredWordsWith1\" at line 29 \r\n", - "INFO:apache_beam.yaml.yaml_transform:Expanding \"GroupAndSum\" at line 35 \r\n", - "INFO:apache_beam.yaml.yaml_transform:Expanding \"Largest\" at line 39 \r\n", - "INFO:apache_beam.yaml.yaml_transform:Expanding \"PrintLines\" at line 45 \r\n", - "INFO:apache_beam.yaml.yaml_transform:Expanding \"SaveToText\" at line 51 \r\n", - "Running pipeline...\r\n", - "[('to', 691), ('a', 393), ('call', 370), ('you', 299), ('your', 264), ('free', 228), ('the', 206), ('for', 204), ('now', 203), ('or', 192)]\r\n", - "WARNING:apache_beam.io.filebasedsink:Deleting 1 existing files in target path matching: -*-of-%(num_shards)05d\r\n", - "\n" - ] - } - ], + "execution_count": null, + "outputs": [], "source": [ "run('python -m apache_beam.yaml.main --pipeline_spec_file=pipeline-02.yaml')" ], @@ -1221,20 +393,10 @@ }, { "cell_type": "code", - "execution_count": 121, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - ">> head -n 20 data/result-pipeline-02-00000-of-*\n", - "[('to', 691), ('a', 393), ('call', 370), ('you', 299), ('your', 264), ('free', 228), ('the', 206), ('for', 204), ('now', 203), ('or', 192)]\r\n", - "\n" - ] - } - ], + "execution_count": null, + "outputs": [], "source": [ - "run('head -n 20 {}-00000-of-*'.format(\"data/result-pipeline-02\"))" + "run('head data/result-pipeline-02-00000-of-00001.txt')" ], "metadata": { "collapsed": false From a39362cf14bba64ca683f6950f8f208440788e4a Mon Sep 17 00:00:00 2001 From: Bartosz Zablocki Date: Wed, 28 Jun 2023 10:25:11 +0000 Subject: [PATCH 06/16] Yaml notebooks: formatting --- examples/notebooks/get-started/try-apache-beam-yaml.ipynb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/examples/notebooks/get-started/try-apache-beam-yaml.ipynb b/examples/notebooks/get-started/try-apache-beam-yaml.ipynb index d111720e81da..e90a89cc6893 100644 --- a/examples/notebooks/get-started/try-apache-beam-yaml.ipynb +++ b/examples/notebooks/get-started/try-apache-beam-yaml.ipynb @@ -407,7 +407,9 @@ "source": [ "## Summary\n", "Congratulations! You've just ran yaml pipelines in Apache Beam.\n", + "\n", "For all the available operations visit the documentation: # todo(yaml) add url\n", + "\n", "For a list of available transforms, visit # todo(yaml) add url" ], "metadata": { From dee90b2a14a1c6a8d2f061c2ae606490a5315010 Mon Sep 17 00:00:00 2001 From: Bartosz Zablocki Date: Wed, 28 Jun 2023 10:29:21 +0000 Subject: [PATCH 07/16] Yaml notebooks: change second pipeline to chain --- .../get-started/try-apache-beam-yaml.ipynb | 81 +++++++++---------- 1 file changed, 38 insertions(+), 43 deletions(-) diff --git a/examples/notebooks/get-started/try-apache-beam-yaml.ipynb b/examples/notebooks/get-started/try-apache-beam-yaml.ipynb index e90a89cc6893..a13928a6abbc 100644 --- a/examples/notebooks/get-started/try-apache-beam-yaml.ipynb +++ b/examples/notebooks/get-started/try-apache-beam-yaml.ipynb @@ -304,57 +304,52 @@ "source": [ "pipeline = '''\n", "pipeline:\n", + " type: chain\n", "\n", - " # Read input data. Each line from the csv file is a String.\n", - " - type: ReadFromText\n", - " name: SmsData\n", - " file_pattern: data/SMSSpamCollection.csv\n", + " transforms:\n", + " # Read input data. Each line from the csv file is a String.\n", + " - type: ReadFromText\n", + " name: SmsData\n", + " file_pattern: data/SMSSpamCollection.csv\n", "\n", - " # Split each line into an array, where the first element is message label (ham or spam) and the second is the content of the message.\n", - " - type: PyMap\n", - " name: SplitLine\n", - " input: SmsData\n", - " fn: 'lambda line: line.split(\"\\\\t\")'\n", + " # Split each line into an array, where the first element is message label (ham or spam) and the second is the content of the message.\n", + " - type: PyMap\n", + " name: SplitLine\n", + " fn: 'lambda line: line.split(\"\\\\t\")'\n", "\n", - " # Select only the rows that contain spam messages, based on the label.\n", - " - type: PyFilter\n", - " name: SpamMessages\n", - " input: SplitLine\n", - " keep: 'lambda row: row[0] == \"spam\"'\n", + " # Select only the rows that contain spam messages, based on the label.\n", + " - type: PyFilter\n", + " name: SpamMessages\n", + " keep: 'lambda row: row[0] == \"spam\"'\n", "\n", - " # Using a regex, we'll split the content of the message (one long string) into words (list of strings)\n", - " - type: PyFlatMap\n", - " name: FindWords\n", - " input: SpamMessages\n", - " fn: |\n", - " import re\n", - " lambda line: re.findall(r\"[a-zA-Z]+\", line[1])\n", + " # Using a regex, we'll split the content of the message (one long string) into words (list of strings)\n", + " - type: PyFlatMap\n", + " name: FindWords\n", + " fn: |\n", + " import re\n", + " lambda line: re.findall(r\"[a-zA-Z]+\", line[1])\n", "\n", - " # Transforming each word to lower case and combining it with a '1'. Result of this step are pairs (word: 1).\n", - " - type: PyMap\n", - " name: PairLoweredWordsWith1\n", - " input: FindWords\n", - " fn: 'lambda word: (word.lower(), 1)'\n", + " # Transforming each word to lower case and combining it with a '1'. Result of this step are pairs (word: 1).\n", + " - type: PyMap\n", + " name: PairLoweredWordsWith1\n", + " fn: 'lambda word: (word.lower(), 1)'\n", "\n", - " # Using SumPerKey transform, we'll calculate the occurence of each word.\n", - " - type: SumPerKey\n", - " name: GroupAndSum\n", - " input: PairLoweredWordsWith1\n", + " # Using SumPerKey transform, we'll calculate the occurence of each word.\n", + " - type: SumPerKey\n", + " name: GroupAndSum\n", "\n", - " # Select 10 most popular words. Input format to this step is a tuple (word: count),\n", - " # so we provide the count (row[1]) as the key to compare the numbers\n", - " - type: TopNLargest\n", - " name: Largest\n", - " input: GroupAndSum\n", - " n: 10\n", - " key: 'lambda row: row[1]'\n", + " # Select 10 most popular words. Input format to this step is a tuple (word: count),\n", + " # so we provide the count (row[1]) as the key to compare the numbers\n", + " - type: TopNLargest\n", + " name: Largest\n", + " n: 10\n", + " key: 'lambda row: row[1]'\n", "\n", - " # Save results to a text file.\n", - " - type: WriteToText\n", - " name: SaveToText\n", - " input: Largest\n", - " file_path_prefix: \"data/result-pipeline-02\"\n", - " file_name_suffix: \".txt\"\n", + " # Save results to a text file.\n", + " - type: WriteToText\n", + " name: SaveToText\n", + " file_path_prefix: \"data/result-pipeline-02\"\n", + " file_name_suffix: \".txt\"\n", "'''\n", "save_to_file(pipeline, 'pipeline-02.yaml')" ], From a4a9cedc58fa03540107138569038db587e008a8 Mon Sep 17 00:00:00 2001 From: Bartosz Zablocki Date: Thu, 29 Jun 2023 10:00:33 +0000 Subject: [PATCH 08/16] Small content fixes in the getting started with yaml notebook --- .../notebooks/get-started/try-apache-beam-yaml.ipynb | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/examples/notebooks/get-started/try-apache-beam-yaml.ipynb b/examples/notebooks/get-started/try-apache-beam-yaml.ipynb index a13928a6abbc..8aacb217e0a7 100644 --- a/examples/notebooks/get-started/try-apache-beam-yaml.ipynb +++ b/examples/notebooks/get-started/try-apache-beam-yaml.ipynb @@ -61,13 +61,13 @@ }, "cell_type": "markdown", "source": [ - "# Try Apache Beam - Yaml\n", + "# Try Apache Beam - YAML\n", "\n", - "While Beam provides powerful APIs for authoring sophisticated data processing pipelines, it often still has too high a barrier for getting started and authoring simple pipelines. Even setting up the environment, installing the dependencies, and setting up the project can be an overwhelming amount of boilerplate for some (though https://beam.apache.org/blog/beam-starter-projects/ has gone a long way in making this easier).\n", + "While Beam provides powerful APIs for authoring sophisticated data processing pipelines, it still has a high barrier for getting started and authoring simple pipelines. Even setting up the environment, installing the dependencies, and setting up the project can be an overwhelming amount of boilerplate.\n", "\n", - "Here we provide a simple declarative syntax for describing pipelines that does not require coding experience or learning how to use an SDK—any text editor will do. Some installation may be required to actually *execute* a pipeline, but we envision various services (such as Dataflow) to accept yaml pipelines directly obviating the need for even that in the future. We also anticipate the ability to generate code directly from these higher-level yaml descriptions, should one want to graduate to a full Beam SDK (and possibly the other direction as well as far as possible).\n", + "Here we provide a simple YAML syntax for describing pipelines that does not require coding experience or learning how to use an SDK—any text editor will do.\n", "\n", - "In this notebook, we set up your development environment and write a simple pipeline using Yaml API. We'll run it locally, using the [DirectRunner](https://beam.apache.org/documentation/runners/direct/). You can explore other runners with the [Beam Capatibility Matrix](https://beam.apache.org/documentation/runners/capability-matrix/).\n", + "In this notebook, we set up your development environment and write a simple pipeline using YAML. We'll run it locally, using the [DirectRunner](https://beam.apache.org/documentation/runners/direct/). You can explore other runners with the [Beam Capatibility Matrix](https://beam.apache.org/documentation/runners/capability-matrix/).\n", "\n", "To navigate through different sections, use the table of contents. From **View** drop-down list, select **Table of contents**.\n", "\n", @@ -124,7 +124,7 @@ "cell_type": "markdown", "source": [ "## Inspect the data\n", - "Let’s see how our data looks like." + "Let’s see how our data looks." ], "metadata": { "collapsed": false @@ -156,7 +156,7 @@ { "cell_type": "markdown", "source": [ - "## First pipeline\n", + "## Example 1\n", "We’ll start with creating a pipeline which loads the data, filters out valid messages leaving spam, and saves only valid lines to a file.\n" ], "metadata": { From a6b5c4eb963c1064cdbf6b2d935a5727cd39e1c4 Mon Sep 17 00:00:00 2001 From: Bartosz Zablocki Date: Thu, 29 Jun 2023 11:40:17 +0000 Subject: [PATCH 09/16] Adding word count example to the yaml notebook. --- .../get-started/try-apache-beam-yaml.ipynb | 281 ++++++++++++++++-- 1 file changed, 257 insertions(+), 24 deletions(-) diff --git a/examples/notebooks/get-started/try-apache-beam-yaml.ipynb b/examples/notebooks/get-started/try-apache-beam-yaml.ipynb index 8aacb217e0a7..e602168dab5e 100644 --- a/examples/notebooks/get-started/try-apache-beam-yaml.ipynb +++ b/examples/notebooks/get-started/try-apache-beam-yaml.ipynb @@ -67,6 +67,8 @@ "\n", "Here we provide a simple YAML syntax for describing pipelines that does not require coding experience or learning how to use an SDK—any text editor will do.\n", "\n", + "Please note: YAML API is still EXPERIMENTAL and subject to change.\n", + "\n", "In this notebook, we set up your development environment and write a simple pipeline using YAML. We'll run it locally, using the [DirectRunner](https://beam.apache.org/documentation/runners/direct/). You can explore other runners with the [Beam Capatibility Matrix](https://beam.apache.org/documentation/runners/capability-matrix/).\n", "\n", "To navigate through different sections, use the table of contents. From **View** drop-down list, select **Table of contents**.\n", @@ -113,18 +115,41 @@ "# Install apache-beam.\n", "run('pip install --quiet apache-beam')\n", "\n", - "# Copy the input file into the local file system.\n", + "# Copy the input files into the local file system.\n", "run('mkdir -p data')\n", + "run('gsutil cp gs://dataflow-samples/shakespeare/kinglear.txt data/kinglear.txt')\n", "run('gsutil cp gs://apache-beam-samples/SMSSpamCollection/SMSSpamCollection data/SMSSpamCollection.csv')" ], - "execution_count": null, - "outputs": [] + "execution_count": 134, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + ">> pip install --quiet apache-beam\n", + "\n", + ">> mkdir -p data\n", + "\n", + ">> gsutil cp gs://dataflow-samples/shakespeare/kinglear.txt data/kinglear.txt\n", + "Copying gs://dataflow-samples/shakespeare/kinglear.txt...\r\n", + "/ [1 files][153.6 KiB/153.6 KiB] \r\n", + "Operation completed over 1 objects/153.6 KiB. \r\n", + "\n", + ">> gsutil cp gs://apache-beam-samples/SMSSpamCollection/SMSSpamCollection data/SMSSpamCollection.csv\n", + "Copying gs://apache-beam-samples/SMSSpamCollection/SMSSpamCollection...\r\n", + "/ [1 files][466.7 KiB/466.7 KiB] \r\n", + "Operation completed over 1 objects/466.7 KiB. \r\n", + "\n" + ] + } + ] }, { "cell_type": "markdown", "source": [ "## Inspect the data\n", - "Let’s see how our data looks." + "We'll be working with 2 datasets. We'll use `kinglear.txt` for the first example - word count, and `SMSSpamCollection.csv` for the second and third.\n", + "Let's first take a loot at the `kinglear.txt` dataset." ], "metadata": { "collapsed": false @@ -132,8 +157,70 @@ }, { "cell_type": "code", - "execution_count": null, - "outputs": [], + "execution_count": 135, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + ">> head data/kinglear.txt\n", + "\tKING LEAR\r\n", + "\r\n", + "\r\n", + "\tDRAMATIS PERSONAE\r\n", + "\r\n", + "\r\n", + "LEAR\tking of Britain (KING LEAR:)\r\n", + "\r\n", + "KING OF FRANCE:\r\n", + "\r\n", + "\n" + ] + } + ], + "source": [ + "run('head data/kinglear.txt')" + ], + "metadata": { + "collapsed": false + } + }, + { + "cell_type": "markdown", + "source": [ + "This is just a `txt` file - it contains lines of text.\n", + "Let's take a look at the other dataset." + ], + "metadata": { + "collapsed": false + } + }, + { + "cell_type": "code", + "execution_count": 136, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + ">> head data/SMSSpamCollection.csv\n", + "ham\tGo until jurong point, crazy.. Available only in bugis n great world la e buffet... Cine there got amore wat...\r\n", + "ham\tOk lar... Joking wif u oni...\r\n", + "spam\tFree entry in 2 a wkly comp to win FA Cup final tkts 21st May 2005. Text FA to 87121 to receive entry question(std txt rate)T&C's apply 08452810075over18's\r\n", + "ham\tU dun say so early hor... U c already then say...\r\n", + "ham\tNah I don't think he goes to usf, he lives around here though\r\n", + "spam\tFreeMsg Hey there darling it's been 3 week's now and no word back! I'd like some fun you up for it still? Tb ok! XxX std chgs to send, £1.50 to rcv\r\n", + "ham\tEven my brother is not like to speak with me. They treat me like aids patent.\r\n", + "ham\tAs per your request 'Melle Melle (Oru Minnaminunginte Nurungu Vettam)' has been set as your callertune for all Callers. Press *9 to copy your friends Callertune\r\n", + "spam\tWINNER!! As a valued network customer you have been selected to receivea £900 prize reward! To claim call 09061701461. Claim code KL341. Valid 12 hours only.\r\n", + "spam\tHad your mobile 11 months or more? U R entitled to Update to the latest colour mobiles with camera for Free! Call The Mobile Update Co FREE on 08002986030\r\n", + "\n", + ">> wc -l data/SMSSpamCollection.csv\n", + "5574 data/SMSSpamCollection.csv\r\n", + "\n" + ] + } + ], "source": [ "run('head data/SMSSpamCollection.csv')\n", "run('wc -l data/SMSSpamCollection.csv')" @@ -156,8 +243,9 @@ { "cell_type": "markdown", "source": [ - "## Example 1\n", - "We’ll start with creating a pipeline which loads the data, filters out valid messages leaving spam, and saves only valid lines to a file.\n" + "## Example 1: word count\n", + "In this popular introductory exercise, we will build a pipeline that reads lines of text from the input dataset `kinglear.txt` and counts the number of times each word appears in the text.\n", + "To start, we'll create a `yaml` file specifying our pipeline." ], "metadata": { "collapsed": false @@ -165,11 +253,156 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 153, "outputs": [], "source": [ "pipeline = '''\n", "pipeline:\n", + " type: chain\n", + " transforms:\n", + "\n", + " # Read input data. Each line from the csv file is a String.\n", + " - type: ReadFromText\n", + " name: InputText\n", + " file_pattern: data/kinglear.txt\n", + "\n", + " # Using a regex, we'll split the content of the message (one long string) into words (list of strings).\n", + " - type: PyFlatMap\n", + " name: FindWords\n", + " fn: |\n", + " import re\n", + " lambda line: re.findall(r\"[a-zA-Z]+\", line)\n", + "\n", + " # Transforming each word to lower case and combining it with a '1'. Result of this step are pairs (word: 1).\n", + " - type: PyMap\n", + " name: PairWordsWith1\n", + " fn: 'lambda word: (word, 1)'\n", + "\n", + " # Using SumPerKey transform, we'll calculate the occurrence of each word.\n", + " - type: SumPerKey\n", + " name: GroupAndSum\n", + "\n", + " # Format results - each record should be represented as 'word: count'.\n", + " # The 'fn' parameter accepts functions written in Python\n", + " - type: PyMap\n", + " name: FormatResults\n", + " fn: \"lambda word_count_tuple: f'{word_count_tuple[0]}: {word_count_tuple[1]}'\"\n", + "\n", + " # Save results to a text file.\n", + " - type: WriteToText\n", + " name: SaveToText\n", + " file_path_prefix: \"data/result-pipeline-01\"\n", + " file_name_suffix: \".txt\"\n", + "'''\n", + "save_to_file(pipeline, 'pipeline-01.yaml')" + ], + "metadata": { + "collapsed": false + } + }, + { + "cell_type": "markdown", + "source": [ + "Let's tun the pipeline executing the Python script with the pipeline file as an argument:" + ], + "metadata": { + "collapsed": false + } + }, + { + "cell_type": "code", + "execution_count": 154, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + ">> python -m apache_beam.yaml.main --pipeline_spec_file=pipeline-01.yaml\n", + "Building pipeline...\r\n", + "INFO:apache_beam.yaml.yaml_transform:Expanding \"InputText\" at line 7 \r\n", + "INFO:apache_beam.yaml.yaml_transform:Expanding \"FindWords\" at line 12 \r\n", + "INFO:apache_beam.yaml.yaml_transform:Expanding \"PairWordsWith1\" at line 19 \r\n", + "INFO:apache_beam.yaml.yaml_transform:Expanding \"GroupAndSum\" at line 24 \r\n", + "INFO:apache_beam.yaml.yaml_transform:Expanding \"FormatResults\" at line 28 \r\n", + "INFO:apache_beam.yaml.yaml_transform:Expanding \"SaveToText\" at line 33 \r\n", + "Running pipeline...\r\n", + "WARNING:apache_beam.io.filebasedsink:Deleting 1 existing files in target path matching: -*-of-%(num_shards)05d\r\n", + "\n" + ] + } + ], + "source": [ + "run('python -m apache_beam.yaml.main --pipeline_spec_file=pipeline-01.yaml')" + ], + "metadata": { + "collapsed": false + } + }, + { + "cell_type": "markdown", + "source": [ + "Let's inspect the data. Each line contains a word and an associated count." + ], + "metadata": { + "collapsed": false + } + }, + { + "cell_type": "code", + "execution_count": 155, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + ">> head data/result-pipeline-01-00000-of-00001.txt\n", + "KING: 243\r\n", + "LEAR: 236\r\n", + "DRAMATIS: 1\r\n", + "PERSONAE: 1\r\n", + "king: 65\r\n", + "of: 447\r\n", + "Britain: 2\r\n", + "OF: 15\r\n", + "FRANCE: 10\r\n", + "DUKE: 3\r\n", + "\n" + ] + } + ], + "source": [ + "run('head data/result-pipeline-01-00000-of-00001.txt')" + ], + "metadata": { + "collapsed": false + } + }, + { + "cell_type": "markdown", + "source": [], + "metadata": { + "collapsed": false + } + }, + { + "cell_type": "markdown", + "source": [ + "## Example 2: load data, filter unwanted lines and save results to a text file.\n", + "In this example, we'll create a pipeline which loads the data, filters out valid messages leaving spam, and saves only valid lines to a file.\n", + "Please note that this time we didn't specify the top-level type as `chain`. This allows for more flexibility when creating a pipeline, but requires us to specify the `input` explicitly for each transform.\n" + ], + "metadata": { + "collapsed": false + } + }, + { + "cell_type": "code", + "execution_count": 138, + "outputs": [], + "source": [ + "pipeline = '''\n", + "pipeline:\n", + "\n", " - type: ReadFromText\n", " name: SmsData\n", " file_pattern: data/SMSSpamCollection.csv\n", @@ -190,7 +423,7 @@ " file_path_prefix: \"data/result-pipeline-01\"\n", " file_name_suffix: \".txt\"\n", "'''\n", - "save_to_file(pipeline, 'pipeline-01.yaml')" + "save_to_file(pipeline, 'pipeline-02.yaml')" ], "metadata": { "collapsed": false @@ -199,7 +432,7 @@ { "cell_type": "markdown", "source": [ - "In this example, each transformation contains the 'input' key, but if the pipeline is linear, such as ours, we can let the inputs be implicit by designating the pipeline as a `chain` type.\n" + "Since this pipeline is linear, we can rewrite it to a `chain` and drop the `input`s in transforms." ], "metadata": { "collapsed": false @@ -228,10 +461,10 @@ "\n", " - type: WriteToText\n", " name: SaveToText\n", - " file_path_prefix: \"data/result-pipeline-01\"\n", + " file_path_prefix: \"data/result-pipeline-02\"\n", " file_name_suffix: \".txt\"\n", "'''\n", - "save_to_file(pipeline, 'pipeline-01-chain.yaml')" + "save_to_file(pipeline, 'pipeline-02-chain.yaml')" ], "metadata": { "collapsed": false @@ -240,7 +473,7 @@ { "cell_type": "markdown", "source": [ - "To run the pipeline locally, using a DirectRunner, you need to run the yaml's main python script, passing the `pipeline-01-chain.yaml` (or `pipeline-01.yaml`) file as an input:" + "To run the pipeline locally, using a DirectRunner, you need to run the yaml's main python script, passing the `pipeline-02-chain.yaml` (or `pipeline-02.yaml`) file as an input:" ], "metadata": { "collapsed": false @@ -251,7 +484,7 @@ "execution_count": null, "outputs": [], "source": [ - "run('python -m apache_beam.yaml.main --pipeline_spec_file=pipeline-01-chain.yaml')" + "run('python -m apache_beam.yaml.main --pipeline_spec_file=pipeline-02-chain.yaml')" ], "metadata": { "collapsed": false @@ -271,7 +504,7 @@ "execution_count": null, "outputs": [], "source": [ - "run('head data/result-pipeline-01-00000-of-00001.txt')" + "run('head data/result-pipeline-02-00000-of-00001.txt')" ], "metadata": { "collapsed": false @@ -289,7 +522,7 @@ { "cell_type": "markdown", "source": [ - "## Count words in spam messages, select top 10 popular words and write results to a file\n", + "## Example 3: count words in spam messages, select top 10 popular words and write results to a file.\n", "\n", "We'd like to write a pipeline which counts words occurring in spam messages, selects the most popular ones and writes the result to a file.\n" ], @@ -299,7 +532,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 137, "outputs": [], "source": [ "pipeline = '''\n", @@ -334,7 +567,7 @@ " name: PairLoweredWordsWith1\n", " fn: 'lambda word: (word.lower(), 1)'\n", "\n", - " # Using SumPerKey transform, we'll calculate the occurence of each word.\n", + " # Using SumPerKey transform, we'll calculate the occurrence of each word.\n", " - type: SumPerKey\n", " name: GroupAndSum\n", "\n", @@ -348,10 +581,10 @@ " # Save results to a text file.\n", " - type: WriteToText\n", " name: SaveToText\n", - " file_path_prefix: \"data/result-pipeline-02\"\n", + " file_path_prefix: \"data/result-pipeline-03\"\n", " file_name_suffix: \".txt\"\n", "'''\n", - "save_to_file(pipeline, 'pipeline-02.yaml')" + "save_to_file(pipeline, 'pipeline-03.yaml')" ], "metadata": { "collapsed": false @@ -371,7 +604,7 @@ "execution_count": null, "outputs": [], "source": [ - "run('python -m apache_beam.yaml.main --pipeline_spec_file=pipeline-02.yaml')" + "run('python -m apache_beam.yaml.main --pipeline_spec_file=pipeline-03.yaml')" ], "metadata": { "collapsed": false @@ -391,7 +624,7 @@ "execution_count": null, "outputs": [], "source": [ - "run('head data/result-pipeline-02-00000-of-00001.txt')" + "run('head data/result-pipeline-03-00000-of-00001.txt')" ], "metadata": { "collapsed": false @@ -401,7 +634,7 @@ "cell_type": "markdown", "source": [ "## Summary\n", - "Congratulations! You've just ran yaml pipelines in Apache Beam.\n", + "Congratulations! You've just run Apache Beam pipelines using YAML.\n", "\n", "For all the available operations visit the documentation: # todo(yaml) add url\n", "\n", From fd00b1ff57d32f26727de31008fd577b3382d501 Mon Sep 17 00:00:00 2001 From: Bartosz Zablocki Date: Thu, 29 Jun 2023 12:59:25 +0000 Subject: [PATCH 10/16] Clear outputs of the notebook --- .../notebooks/get-started/try-apache-beam-yaml.ipynb | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/examples/notebooks/get-started/try-apache-beam-yaml.ipynb b/examples/notebooks/get-started/try-apache-beam-yaml.ipynb index e602168dab5e..434a934d2c7e 100644 --- a/examples/notebooks/get-started/try-apache-beam-yaml.ipynb +++ b/examples/notebooks/get-started/try-apache-beam-yaml.ipynb @@ -479,17 +479,6 @@ "collapsed": false } }, - { - "cell_type": "code", - "execution_count": null, - "outputs": [], - "source": [ - "run('python -m apache_beam.yaml.main --pipeline_spec_file=pipeline-02-chain.yaml')" - ], - "metadata": { - "collapsed": false - } - }, { "cell_type": "markdown", "source": [ From d13f4ed148300a19385f2186ecca4191e76b6543 Mon Sep 17 00:00:00 2001 From: Bartosz Zablocki Date: Fri, 30 Jun 2023 12:31:34 +0000 Subject: [PATCH 11/16] Apply PR comments. Add more information on structure of yaml pipelines --- .../get-started/try-apache-beam-yaml.ipynb | 398 +++++++----------- 1 file changed, 154 insertions(+), 244 deletions(-) diff --git a/examples/notebooks/get-started/try-apache-beam-yaml.ipynb b/examples/notebooks/get-started/try-apache-beam-yaml.ipynb index 434a934d2c7e..131d8997c387 100644 --- a/examples/notebooks/get-started/try-apache-beam-yaml.ipynb +++ b/examples/notebooks/get-started/try-apache-beam-yaml.ipynb @@ -87,7 +87,7 @@ "source": [ "# Setup\n", "\n", - "First, you need to set up your environment, which includes installing `apache-beam` and downloading a text file from Cloud Storage to your local file system. We are using this file to test your pipeline." + "First, you need to set up your environment, which includes installing `apache-beam` and downloading files from Cloud Storage to your local file system. We'll use these files as an input to the pipelines in this guide." ] }, { @@ -120,29 +120,8 @@ "run('gsutil cp gs://dataflow-samples/shakespeare/kinglear.txt data/kinglear.txt')\n", "run('gsutil cp gs://apache-beam-samples/SMSSpamCollection/SMSSpamCollection data/SMSSpamCollection.csv')" ], - "execution_count": 134, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - ">> pip install --quiet apache-beam\n", - "\n", - ">> mkdir -p data\n", - "\n", - ">> gsutil cp gs://dataflow-samples/shakespeare/kinglear.txt data/kinglear.txt\n", - "Copying gs://dataflow-samples/shakespeare/kinglear.txt...\r\n", - "/ [1 files][153.6 KiB/153.6 KiB] \r\n", - "Operation completed over 1 objects/153.6 KiB. \r\n", - "\n", - ">> gsutil cp gs://apache-beam-samples/SMSSpamCollection/SMSSpamCollection data/SMSSpamCollection.csv\n", - "Copying gs://apache-beam-samples/SMSSpamCollection/SMSSpamCollection...\r\n", - "/ [1 files][466.7 KiB/466.7 KiB] \r\n", - "Operation completed over 1 objects/466.7 KiB. \r\n", - "\n" - ] - } - ] + "execution_count": null, + "outputs": [] }, { "cell_type": "markdown", @@ -157,27 +136,8 @@ }, { "cell_type": "code", - "execution_count": 135, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - ">> head data/kinglear.txt\n", - "\tKING LEAR\r\n", - "\r\n", - "\r\n", - "\tDRAMATIS PERSONAE\r\n", - "\r\n", - "\r\n", - "LEAR\tking of Britain (KING LEAR:)\r\n", - "\r\n", - "KING OF FRANCE:\r\n", - "\r\n", - "\n" - ] - } - ], + "execution_count": null, + "outputs": [], "source": [ "run('head data/kinglear.txt')" ], @@ -197,30 +157,8 @@ }, { "cell_type": "code", - "execution_count": 136, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - ">> head data/SMSSpamCollection.csv\n", - "ham\tGo until jurong point, crazy.. Available only in bugis n great world la e buffet... Cine there got amore wat...\r\n", - "ham\tOk lar... Joking wif u oni...\r\n", - "spam\tFree entry in 2 a wkly comp to win FA Cup final tkts 21st May 2005. Text FA to 87121 to receive entry question(std txt rate)T&C's apply 08452810075over18's\r\n", - "ham\tU dun say so early hor... U c already then say...\r\n", - "ham\tNah I don't think he goes to usf, he lives around here though\r\n", - "spam\tFreeMsg Hey there darling it's been 3 week's now and no word back! I'd like some fun you up for it still? Tb ok! XxX std chgs to send, £1.50 to rcv\r\n", - "ham\tEven my brother is not like to speak with me. They treat me like aids patent.\r\n", - "ham\tAs per your request 'Melle Melle (Oru Minnaminunginte Nurungu Vettam)' has been set as your callertune for all Callers. Press *9 to copy your friends Callertune\r\n", - "spam\tWINNER!! As a valued network customer you have been selected to receivea £900 prize reward! To claim call 09061701461. Claim code KL341. Valid 12 hours only.\r\n", - "spam\tHad your mobile 11 months or more? U R entitled to Update to the latest colour mobiles with camera for Free! Call The Mobile Update Co FREE on 08002986030\r\n", - "\n", - ">> wc -l data/SMSSpamCollection.csv\n", - "5574 data/SMSSpamCollection.csv\r\n", - "\n" - ] - } - ], + "execution_count": null, + "outputs": [], "source": [ "run('head data/SMSSpamCollection.csv')\n", "run('wc -l data/SMSSpamCollection.csv')" @@ -245,7 +183,7 @@ "source": [ "## Example 1: word count\n", "In this popular introductory exercise, we will build a pipeline that reads lines of text from the input dataset `kinglear.txt` and counts the number of times each word appears in the text.\n", - "To start, we'll create a `yaml` file specifying our pipeline." + "To start, we'll create a `.yaml` file specifying our pipeline." ], "metadata": { "collapsed": false @@ -253,46 +191,49 @@ }, { "cell_type": "code", - "execution_count": 153, + "execution_count": null, "outputs": [], "source": [ "pipeline = '''\n", "pipeline:\n", - " type: chain\n", - " transforms:\n", - "\n", - " # Read input data. Each line from the csv file is a String.\n", - " - type: ReadFromText\n", - " name: InputText\n", - " file_pattern: data/kinglear.txt\n", - "\n", - " # Using a regex, we'll split the content of the message (one long string) into words (list of strings).\n", - " - type: PyFlatMap\n", - " name: FindWords\n", - " fn: |\n", - " import re\n", - " lambda line: re.findall(r\"[a-zA-Z]+\", line)\n", - "\n", - " # Transforming each word to lower case and combining it with a '1'. Result of this step are pairs (word: 1).\n", - " - type: PyMap\n", - " name: PairWordsWith1\n", - " fn: 'lambda word: (word, 1)'\n", - "\n", - " # Using SumPerKey transform, we'll calculate the occurrence of each word.\n", - " - type: SumPerKey\n", - " name: GroupAndSum\n", - "\n", - " # Format results - each record should be represented as 'word: count'.\n", - " # The 'fn' parameter accepts functions written in Python\n", - " - type: PyMap\n", - " name: FormatResults\n", - " fn: \"lambda word_count_tuple: f'{word_count_tuple[0]}: {word_count_tuple[1]}'\"\n", - "\n", - " # Save results to a text file.\n", - " - type: WriteToText\n", - " name: SaveToText\n", - " file_path_prefix: \"data/result-pipeline-01\"\n", - " file_name_suffix: \".txt\"\n", + " # Read input data. Each line from the txt file is a String.\n", + " - type: ReadFromText\n", + " name: InputText\n", + " file_pattern: data/kinglear.txt\n", + "\n", + " # Using a regex, we'll split the content of the message (one long string) into words (list of strings).\n", + " # The 'fn' parameter accepts functions written in Python\n", + " - type: PyFlatMap\n", + " name: FindWords\n", + " input: InputText\n", + " fn: |\n", + " import re\n", + " lambda line: re.findall(r\"[a-zA-Z]+\", line)\n", + "\n", + " # Transforming each word to lower case and combining it with a '1'. Result of this step are pairs (word: 1).\n", + " - type: PyMap\n", + " name: PairWordsWith1\n", + " input: FindWords\n", + " fn: 'lambda word: (word, 1)'\n", + "\n", + " # Using SumPerKey transform, we'll calculate the occurrence of each word.\n", + " - type: SumPerKey\n", + " name: GroupAndSum\n", + " input: PairWordsWith1\n", + "\n", + " # Format results - each record should be represented as 'word: count'.\n", + " # The 'fn' parameter accepts functions written in Python\n", + " - type: PyMap\n", + " name: FormatResults\n", + " input: GroupAndSum\n", + " fn: \"lambda word_count_tuple: f'{word_count_tuple[0]}: {word_count_tuple[1]}'\"\n", + "\n", + " # Save results to a text file.\n", + " - type: WriteToText\n", + " name: SaveToText\n", + " input: FormatResults\n", + " file_path_prefix: \"data/result-pipeline-01\"\n", + " file_name_suffix: \".txt\"\n", "'''\n", "save_to_file(pipeline, 'pipeline-01.yaml')" ], @@ -303,7 +244,44 @@ { "cell_type": "markdown", "source": [ - "Let's tun the pipeline executing the Python script with the pipeline file as an argument:" + "Each pipeline specification has to start with a `pipeline` key on the first line.\n", + "Following, there is a list of transforms, such as the first one:\n", + "```\n", + " # Read input data. Each line from the csv file is a String.\n", + " - type: ReadFromText\n", + " name: InputText\n", + " file_pattern: data/kinglear.txt\n", + "```\n", + "This one reads an input file for futher processing.\n", + "Remember that the indentation is important here - it specifies object hierarchy.\n", + "YAML also supports comments - everything after the `#` is always treated as a comment. Use them to improve readability.\n", + "\n", + "Each operation has to specify the `type` descriptor and other fields, such as `name` and other transform-specific parameters.\n", + "Take a look at the documentation for a list of available transforms and their parameters. # todo(yaml) add link\n", + "\n", + "To link two operations, use the `input` field, just like in the third operation:\n", + "```\n", + " # Transforming each word to lower case and combining it with a '1'. Result of this step are pairs (word: 1).\n", + " - type: PyMap\n", + " name: PairWordsWith1\n", + " input: FindWords\n", + " fn: 'lambda word: (word, 1)'\n", + "```\n", + "The `input` refers to the name of another transform, the previous one in this case.\n", + "This particular operation takes `fn` (stands for function) as an argument. Currently only Python functions are supported.\n", + "For more complicated functions, you can take advantage of YAML's multiline feature, as you can see in the second operation:\n", + "```\n", + " # Using a regex, we'll split the content of the message (one long string) into words (list of strings).\n", + " - type: PyFlatMap\n", + " name: FindWords\n", + " input: InputText\n", + " fn: |\n", + " import re\n", + " lambda line: re.findall(r\"[a-zA-Z]+\", line)\n", + "```\n", + "Here we had to import Python's regex package - `re`. To do that, we indicated a multiline string with `|` character and wrote the function in 2 lines.\n", + "\n", + "Let's run the pipeline executing the Python entry-point script (`apache_beam.yaml.main`) with our pipeline file as an argument:" ], "metadata": { "collapsed": false @@ -311,26 +289,8 @@ }, { "cell_type": "code", - "execution_count": 154, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - ">> python -m apache_beam.yaml.main --pipeline_spec_file=pipeline-01.yaml\n", - "Building pipeline...\r\n", - "INFO:apache_beam.yaml.yaml_transform:Expanding \"InputText\" at line 7 \r\n", - "INFO:apache_beam.yaml.yaml_transform:Expanding \"FindWords\" at line 12 \r\n", - "INFO:apache_beam.yaml.yaml_transform:Expanding \"PairWordsWith1\" at line 19 \r\n", - "INFO:apache_beam.yaml.yaml_transform:Expanding \"GroupAndSum\" at line 24 \r\n", - "INFO:apache_beam.yaml.yaml_transform:Expanding \"FormatResults\" at line 28 \r\n", - "INFO:apache_beam.yaml.yaml_transform:Expanding \"SaveToText\" at line 33 \r\n", - "Running pipeline...\r\n", - "WARNING:apache_beam.io.filebasedsink:Deleting 1 existing files in target path matching: -*-of-%(num_shards)05d\r\n", - "\n" - ] - } - ], + "execution_count": null, + "outputs": [], "source": [ "run('python -m apache_beam.yaml.main --pipeline_spec_file=pipeline-01.yaml')" ], @@ -341,7 +301,7 @@ { "cell_type": "markdown", "source": [ - "Let's inspect the data. Each line contains a word and an associated count." + "Let's inspect the results. Each line contains a word and an associated count." ], "metadata": { "collapsed": false @@ -349,27 +309,8 @@ }, { "cell_type": "code", - "execution_count": 155, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - ">> head data/result-pipeline-01-00000-of-00001.txt\n", - "KING: 243\r\n", - "LEAR: 236\r\n", - "DRAMATIS: 1\r\n", - "PERSONAE: 1\r\n", - "king: 65\r\n", - "of: 447\r\n", - "Britain: 2\r\n", - "OF: 15\r\n", - "FRANCE: 10\r\n", - "DUKE: 3\r\n", - "\n" - ] - } - ], + "execution_count": null, + "outputs": [], "source": [ "run('head data/result-pipeline-01-00000-of-00001.txt')" ], @@ -388,8 +329,7 @@ "cell_type": "markdown", "source": [ "## Example 2: load data, filter unwanted lines and save results to a text file.\n", - "In this example, we'll create a pipeline which loads the data, filters out valid messages leaving spam, and saves only valid lines to a file.\n", - "Please note that this time we didn't specify the top-level type as `chain`. This allows for more flexibility when creating a pipeline, but requires us to specify the `input` explicitly for each transform.\n" + "In this example, we'll create a pipeline which loads a `.csv` file containing SMS messages, filters out valid messages, and saves only valid sms messages to a file.\n" ], "metadata": { "collapsed": false @@ -397,30 +337,33 @@ }, { "cell_type": "code", - "execution_count": 138, + "execution_count": null, "outputs": [], "source": [ "pipeline = '''\n", "pipeline:\n", - "\n", + " # Read input data. Each line from the csv file is a String.\n", " - type: ReadFromText\n", " name: SmsData\n", " file_pattern: data/SMSSpamCollection.csv\n", "\n", + " # Split each line into an array, where the first element is message label (ham or spam) and the second is the content of the message.\n", " - type: PyMap\n", " name: SplitLine\n", " input: SmsData\n", " fn: 'lambda line: line.split(\"\\\\t\")'\n", "\n", + " # Keep only the rows that contain spam messages, based on the first element in the array - the label.\n", " - type: PyFilter\n", " name: KeepSpam\n", " input: SplitLine\n", - " keep: 'lambda row: row[0] == \"spam\"'\n", + " keep: 'lambda row: row[0] == \"spam\"' # this is a function in Python, similar to the 'fn' in the previous example.\n", "\n", + " # Save only the rows from the input file that are classified as spam.\n", " - type: WriteToText\n", " name: SaveToText\n", " input: KeepSpam\n", - " file_path_prefix: \"data/result-pipeline-01\"\n", + " file_path_prefix: \"data/result-pipeline-02\"\n", " file_name_suffix: \".txt\"\n", "'''\n", "save_to_file(pipeline, 'pipeline-02.yaml')" @@ -432,7 +375,7 @@ { "cell_type": "markdown", "source": [ - "Since this pipeline is linear, we can rewrite it to a `chain` and drop the `input`s in transforms." + "Let's run the pipeline with our `.yaml` file as an input:" ], "metadata": { "collapsed": false @@ -443,37 +386,7 @@ "execution_count": null, "outputs": [], "source": [ - "pipeline = '''\n", - "pipeline:\n", - " type: chain\n", - " transforms:\n", - " - type: ReadFromText\n", - " name: SmsData\n", - " file_pattern: data/SMSSpamCollection.csv\n", - "\n", - " - type: PyMap\n", - " name: SplitLine\n", - " fn: 'lambda line: line.split(\"\\\\t\")'\n", - "\n", - " - type: PyFilter\n", - " name: KeepSpam\n", - " keep: 'lambda row: row[0] == \"spam\"'\n", - "\n", - " - type: WriteToText\n", - " name: SaveToText\n", - " file_path_prefix: \"data/result-pipeline-02\"\n", - " file_name_suffix: \".txt\"\n", - "'''\n", - "save_to_file(pipeline, 'pipeline-02-chain.yaml')" - ], - "metadata": { - "collapsed": false - } - }, - { - "cell_type": "markdown", - "source": [ - "To run the pipeline locally, using a DirectRunner, you need to run the yaml's main python script, passing the `pipeline-02-chain.yaml` (or `pipeline-02.yaml`) file as an input:" + "run('python -m apache_beam.yaml.main --pipeline_spec_file=pipeline-02.yaml')" ], "metadata": { "collapsed": false @@ -521,57 +434,61 @@ }, { "cell_type": "code", - "execution_count": 137, + "execution_count": null, "outputs": [], "source": [ "pipeline = '''\n", "pipeline:\n", - " type: chain\n", - "\n", - " transforms:\n", - " # Read input data. Each line from the csv file is a String.\n", - " - type: ReadFromText\n", - " name: SmsData\n", - " file_pattern: data/SMSSpamCollection.csv\n", - "\n", - " # Split each line into an array, where the first element is message label (ham or spam) and the second is the content of the message.\n", - " - type: PyMap\n", - " name: SplitLine\n", - " fn: 'lambda line: line.split(\"\\\\t\")'\n", - "\n", - " # Select only the rows that contain spam messages, based on the label.\n", - " - type: PyFilter\n", - " name: SpamMessages\n", - " keep: 'lambda row: row[0] == \"spam\"'\n", - "\n", - " # Using a regex, we'll split the content of the message (one long string) into words (list of strings)\n", - " - type: PyFlatMap\n", - " name: FindWords\n", - " fn: |\n", - " import re\n", - " lambda line: re.findall(r\"[a-zA-Z]+\", line[1])\n", - "\n", - " # Transforming each word to lower case and combining it with a '1'. Result of this step are pairs (word: 1).\n", - " - type: PyMap\n", - " name: PairLoweredWordsWith1\n", - " fn: 'lambda word: (word.lower(), 1)'\n", - "\n", - " # Using SumPerKey transform, we'll calculate the occurrence of each word.\n", - " - type: SumPerKey\n", - " name: GroupAndSum\n", - "\n", - " # Select 10 most popular words. Input format to this step is a tuple (word: count),\n", - " # so we provide the count (row[1]) as the key to compare the numbers\n", - " - type: TopNLargest\n", - " name: Largest\n", - " n: 10\n", - " key: 'lambda row: row[1]'\n", - "\n", - " # Save results to a text file.\n", - " - type: WriteToText\n", - " name: SaveToText\n", - " file_path_prefix: \"data/result-pipeline-03\"\n", - " file_name_suffix: \".txt\"\n", + " # Read input data. Each line from the csv file is a String.\n", + " - type: ReadFromText\n", + " name: SmsData\n", + " file_pattern: data/SMSSpamCollection.csv\n", + "\n", + " # Split each line into an array, where the first element is message label (ham or spam) and the second is the content of the message.\n", + " - type: PyMap\n", + " name: SplitLine\n", + " input: SmsData\n", + " fn: 'lambda line: line.split(\"\\\\t\")'\n", + "\n", + " # Keep only the rows that contain spam messages, based on the first element in the array - the label.\n", + " - type: PyFilter\n", + " name: SpamMessages\n", + " input: SplitLine\n", + " keep: 'lambda row: row[0] == \"spam\"'\n", + "\n", + " # Using a regex, we'll split the content of the message (one long string) into words (list of strings)\n", + " - type: PyFlatMap\n", + " name: FindWords\n", + " input: SpamMessages\n", + " fn: |\n", + " import re\n", + " lambda line: re.findall(r\"[a-zA-Z]+\", line[1])\n", + "\n", + " # Transforming each word to lower case and combining it with a '1'. Result of this step are pairs (word: 1).\n", + " - type: PyMap\n", + " name: PairLoweredWordsWith1\n", + " input: FindWords\n", + " fn: 'lambda word: (word.lower(), 1)'\n", + "\n", + " # Using SumPerKey transform, we'll calculate the occurrence of each word.\n", + " - type: SumPerKey\n", + " name: GroupAndSum\n", + " input: PairLoweredWordsWith1\n", + "\n", + " # Select 10 most popular words. Input format to this step is a tuple (word: count),\n", + " # so we provide the count (row[1]) as the key to compare the numbers\n", + " - type: TopNLargest\n", + " name: MostPopular\n", + " input: GroupAndSum\n", + " n: 10\n", + " key: 'lambda row: row[1]'\n", + "\n", + " # Save results to a text file.\n", + " - type: WriteToText\n", + " name: SaveToText\n", + " input: MostPopular\n", + " file_path_prefix: \"data/result-pipeline-03\"\n", + " file_name_suffix: \".txt\"\n", "'''\n", "save_to_file(pipeline, 'pipeline-03.yaml')" ], @@ -627,20 +544,13 @@ "\n", "For all the available operations visit the documentation: # todo(yaml) add url\n", "\n", - "For a list of available transforms, visit # todo(yaml) add url" + "For a list of available transforms, visit # todo(yaml) add url\n", + "\n", + "To run your pipeline in Dataflow, you'll need to set up your Google Cloud and run the pipeline with the `DataflowRunner`. For more information, follow https://cloud.google.com/dataflow/docs/guides/deploying-a-pipeline#run-on-dataflow" ], "metadata": { "collapsed": false } - }, - { - "cell_type": "code", - "execution_count": null, - "outputs": [], - "source": [], - "metadata": { - "collapsed": false - } } ] } From bbf7f7d206055dd44558957e26be18035f85f0d4 Mon Sep 17 00:00:00 2001 From: Bartosz Zablocki Date: Mon, 31 Jul 2023 17:18:23 +0000 Subject: [PATCH 12/16] Switching from`gsutil cp` to `wget`. Dropping introduced SumPer key transform in favour of CombinePerKey with a callable argument --- examples/notebooks/get-started/try-apache-beam-yaml.ipynb | 7 ++++--- sdks/python/apache_beam/yaml/yaml_provider.py | 3 ++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/examples/notebooks/get-started/try-apache-beam-yaml.ipynb b/examples/notebooks/get-started/try-apache-beam-yaml.ipynb index 131d8997c387..2d21b5c40d93 100644 --- a/examples/notebooks/get-started/try-apache-beam-yaml.ipynb +++ b/examples/notebooks/get-started/try-apache-beam-yaml.ipynb @@ -117,8 +117,8 @@ "\n", "# Copy the input files into the local file system.\n", "run('mkdir -p data')\n", - "run('gsutil cp gs://dataflow-samples/shakespeare/kinglear.txt data/kinglear.txt')\n", - "run('gsutil cp gs://apache-beam-samples/SMSSpamCollection/SMSSpamCollection data/SMSSpamCollection.csv')" + "run('wget -O data/kinglear.txt https://storage.googleapis.com/dataflow-samples/shakespeare/kinglear.txt')\n", + "run('wget -O data/SMSSpamCollection.csv https://storage.googleapis.com/apache-beam-samples/SMSSpamCollection/SMSSpamCollection')" ], "execution_count": null, "outputs": [] @@ -217,7 +217,8 @@ " fn: 'lambda word: (word, 1)'\n", "\n", " # Using SumPerKey transform, we'll calculate the occurrence of each word.\n", - " - type: SumPerKey\n", + " - type: CombinePerKey\n", + " combine_fn: sum\n", " name: GroupAndSum\n", " input: PairWordsWith1\n", "\n", diff --git a/sdks/python/apache_beam/yaml/yaml_provider.py b/sdks/python/apache_beam/yaml/yaml_provider.py index d49ad059d084..894e223fabe2 100644 --- a/sdks/python/apache_beam/yaml/yaml_provider.py +++ b/sdks/python/apache_beam/yaml/yaml_provider.py @@ -415,7 +415,8 @@ def _parse_window_spec(spec): 'Flatten': Flatten, 'WindowInto': WindowInto, 'GroupByKey': beam.GroupByKey, - 'SumPerKey': lambda: beam.CombinePerKey(sum), + 'CombinePerKey': lambda combine_fn: beam.CombinePerKey( + python_callable.PythonCallableWithSource(combine_fn)), 'TopNLargest': lambda n, key=None: beam.combiners.Top.Largest( n=n, key=python_callable.PythonCallableWithSource(key)) From 781ee6d77b70ccacad8f6944c45416c31091d925 Mon Sep 17 00:00:00 2001 From: Bartosz Zablocki Date: Wed, 16 Aug 2023 12:33:03 +0000 Subject: [PATCH 13/16] Fixing after the merge --- .../get-started/try-apache-beam-yaml.ipynb | 90 ++++++++++++------- 1 file changed, 57 insertions(+), 33 deletions(-) diff --git a/examples/notebooks/get-started/try-apache-beam-yaml.ipynb b/examples/notebooks/get-started/try-apache-beam-yaml.ipynb index 2d21b5c40d93..1c43b5a885c1 100644 --- a/examples/notebooks/get-started/try-apache-beam-yaml.ipynb +++ b/examples/notebooks/get-started/try-apache-beam-yaml.ipynb @@ -199,26 +199,31 @@ " # Read input data. Each line from the txt file is a String.\n", " - type: ReadFromText\n", " name: InputText\n", - " file_pattern: data/kinglear.txt\n", + " config:\n", + " file_pattern: data/kinglear.txt\n", "\n", " # Using a regex, we'll split the content of the message (one long string) into words (list of strings).\n", " # The 'fn' parameter accepts functions written in Python\n", " - type: PyFlatMap\n", " name: FindWords\n", " input: InputText\n", - " fn: |\n", - " import re\n", - " lambda line: re.findall(r\"[a-zA-Z]+\", line)\n", + " config:\n", + " fn: |\n", + " import re\n", + " lambda line: re.findall(r\"[a-zA-Z]+\", line)\n", "\n", " # Transforming each word to lower case and combining it with a '1'. Result of this step are pairs (word: 1).\n", " - type: PyMap\n", " name: PairWordsWith1\n", " input: FindWords\n", - " fn: 'lambda word: (word, 1)'\n", + " config:\n", + " fn: 'lambda word: (word, 1)'\n", "\n", - " # Using SumPerKey transform, we'll calculate the occurrence of each word.\n", + " # Using CombinePerKey transform with the 'sum' function as a combine function,\n", + " # we'll calculate the occurrence of each word.\n", " - type: CombinePerKey\n", - " combine_fn: sum\n", + " config:\n", + " combine_fn: sum\n", " name: GroupAndSum\n", " input: PairWordsWith1\n", "\n", @@ -227,14 +232,16 @@ " - type: PyMap\n", " name: FormatResults\n", " input: GroupAndSum\n", - " fn: \"lambda word_count_tuple: f'{word_count_tuple[0]}: {word_count_tuple[1]}'\"\n", + " config:\n", + " fn: \"lambda word_count_tuple: f'{word_count_tuple[0]}: {word_count_tuple[1]}'\"\n", "\n", " # Save results to a text file.\n", " - type: WriteToText\n", " name: SaveToText\n", " input: FormatResults\n", - " file_path_prefix: \"data/result-pipeline-01\"\n", - " file_name_suffix: \".txt\"\n", + " config:\n", + " file_path_prefix: \"data/result-pipeline-01\"\n", + " file_name_suffix: \".txt\"\n", "'''\n", "save_to_file(pipeline, 'pipeline-01.yaml')" ], @@ -251,7 +258,8 @@ " # Read input data. Each line from the csv file is a String.\n", " - type: ReadFromText\n", " name: InputText\n", - " file_pattern: data/kinglear.txt\n", + " config:\n", + " file_pattern: data/kinglear.txt\n", "```\n", "This one reads an input file for futher processing.\n", "Remember that the indentation is important here - it specifies object hierarchy.\n", @@ -266,7 +274,8 @@ " - type: PyMap\n", " name: PairWordsWith1\n", " input: FindWords\n", - " fn: 'lambda word: (word, 1)'\n", + " config:\n", + " fn: 'lambda word: (word, 1)'\n", "```\n", "The `input` refers to the name of another transform, the previous one in this case.\n", "This particular operation takes `fn` (stands for function) as an argument. Currently only Python functions are supported.\n", @@ -276,9 +285,10 @@ " - type: PyFlatMap\n", " name: FindWords\n", " input: InputText\n", - " fn: |\n", - " import re\n", - " lambda line: re.findall(r\"[a-zA-Z]+\", line)\n", + " config:\n", + " fn: |\n", + " import re\n", + " lambda line: re.findall(r\"[a-zA-Z]+\", line)\n", "```\n", "Here we had to import Python's regex package - `re`. To do that, we indicated a multiline string with `|` character and wrote the function in 2 lines.\n", "\n", @@ -346,26 +356,30 @@ " # Read input data. Each line from the csv file is a String.\n", " - type: ReadFromText\n", " name: SmsData\n", - " file_pattern: data/SMSSpamCollection.csv\n", + " config:\n", + " file_pattern: data/SMSSpamCollection.csv\n", "\n", " # Split each line into an array, where the first element is message label (ham or spam) and the second is the content of the message.\n", " - type: PyMap\n", " name: SplitLine\n", " input: SmsData\n", - " fn: 'lambda line: line.split(\"\\\\t\")'\n", + " config:\n", + " fn: 'lambda line: line.split(\"\\\\t\")'\n", "\n", " # Keep only the rows that contain spam messages, based on the first element in the array - the label.\n", " - type: PyFilter\n", " name: KeepSpam\n", " input: SplitLine\n", - " keep: 'lambda row: row[0] == \"spam\"' # this is a function in Python, similar to the 'fn' in the previous example.\n", + " config:\n", + " keep: 'lambda row: row[0] == \"spam\"' # this is a function in Python, similar to the 'fn' in the previous example.\n", "\n", " # Save only the rows from the input file that are classified as spam.\n", " - type: WriteToText\n", " name: SaveToText\n", " input: KeepSpam\n", - " file_path_prefix: \"data/result-pipeline-02\"\n", - " file_name_suffix: \".txt\"\n", + " config:\n", + " file_path_prefix: \"data/result-pipeline-02\"\n", + " file_name_suffix: \".txt\"\n", "'''\n", "save_to_file(pipeline, 'pipeline-02.yaml')" ], @@ -443,36 +457,44 @@ " # Read input data. Each line from the csv file is a String.\n", " - type: ReadFromText\n", " name: SmsData\n", - " file_pattern: data/SMSSpamCollection.csv\n", + " config:\n", + " file_pattern: data/SMSSpamCollection.csv\n", "\n", " # Split each line into an array, where the first element is message label (ham or spam) and the second is the content of the message.\n", " - type: PyMap\n", " name: SplitLine\n", " input: SmsData\n", - " fn: 'lambda line: line.split(\"\\\\t\")'\n", + " config:\n", + " fn: 'lambda line: line.split(\"\\\\t\")'\n", "\n", " # Keep only the rows that contain spam messages, based on the first element in the array - the label.\n", " - type: PyFilter\n", " name: SpamMessages\n", " input: SplitLine\n", - " keep: 'lambda row: row[0] == \"spam\"'\n", + " config:\n", + " keep: 'lambda row: row[0] == \"spam\"'\n", "\n", " # Using a regex, we'll split the content of the message (one long string) into words (list of strings)\n", " - type: PyFlatMap\n", " name: FindWords\n", " input: SpamMessages\n", - " fn: |\n", - " import re\n", - " lambda line: re.findall(r\"[a-zA-Z]+\", line[1])\n", + " config:\n", + " fn: |\n", + " import re\n", + " lambda line: re.findall(r\"[a-zA-Z]+\", line[1])\n", "\n", " # Transforming each word to lower case and combining it with a '1'. Result of this step are pairs (word: 1).\n", " - type: PyMap\n", " name: PairLoweredWordsWith1\n", " input: FindWords\n", - " fn: 'lambda word: (word.lower(), 1)'\n", + " config:\n", + " fn: 'lambda word: (word.lower(), 1)'\n", "\n", - " # Using SumPerKey transform, we'll calculate the occurrence of each word.\n", - " - type: SumPerKey\n", + " # Using CombinePerKey transform with the 'sum' function as a combine function,\n", + " # we'll calculate the occurrence of each word.\n", + " - type: CombinePerKey\n", + " config:\n", + " combine_fn: sum\n", " name: GroupAndSum\n", " input: PairLoweredWordsWith1\n", "\n", @@ -481,15 +503,17 @@ " - type: TopNLargest\n", " name: MostPopular\n", " input: GroupAndSum\n", - " n: 10\n", - " key: 'lambda row: row[1]'\n", + " config:\n", + " n: 10\n", + " key: 'lambda row: row[1]'\n", "\n", " # Save results to a text file.\n", " - type: WriteToText\n", " name: SaveToText\n", " input: MostPopular\n", - " file_path_prefix: \"data/result-pipeline-03\"\n", - " file_name_suffix: \".txt\"\n", + " config:\n", + " file_path_prefix: \"data/result-pipeline-03\"\n", + " file_name_suffix: \".txt\"\n", "'''\n", "save_to_file(pipeline, 'pipeline-03.yaml')" ], From 615c746691d2c5179cc4f776c5bc30c003aaf753 Mon Sep 17 00:00:00 2001 From: Veronica Wasson Date: Fri, 18 Aug 2023 22:51:02 +0000 Subject: [PATCH 14/16] Editorial suggestions --- .../get-started/try-apache-beam-yaml.ipynb | 67 ++++++++++--------- 1 file changed, 34 insertions(+), 33 deletions(-) diff --git a/examples/notebooks/get-started/try-apache-beam-yaml.ipynb b/examples/notebooks/get-started/try-apache-beam-yaml.ipynb index 1c43b5a885c1..748ea4ad0f0e 100644 --- a/examples/notebooks/get-started/try-apache-beam-yaml.ipynb +++ b/examples/notebooks/get-started/try-apache-beam-yaml.ipynb @@ -63,17 +63,17 @@ "source": [ "# Try Apache Beam - YAML\n", "\n", - "While Beam provides powerful APIs for authoring sophisticated data processing pipelines, it still has a high barrier for getting started and authoring simple pipelines. Even setting up the environment, installing the dependencies, and setting up the project can be an overwhelming amount of boilerplate.\n", + "While Beam provides powerful APIs for authoring sophisticated data processing pipelines, it still has a high barrier for getting started and authoring simple pipelines. Even setting up the environment, installing the dependencies, and setting up the project can be a challenge.\n", "\n", - "Here we provide a simple YAML syntax for describing pipelines that does not require coding experience or learning how to use an SDK—any text editor will do.\n", + "Here we provide a simple YAML syntax for describing pipelines that does not require coding experience or learning how to use an SDK&mdash. You can use any text editor.\n", "\n", "Please note: YAML API is still EXPERIMENTAL and subject to change.\n", "\n", - "In this notebook, we set up your development environment and write a simple pipeline using YAML. We'll run it locally, using the [DirectRunner](https://beam.apache.org/documentation/runners/direct/). You can explore other runners with the [Beam Capatibility Matrix](https://beam.apache.org/documentation/runners/capability-matrix/).\n", + "In this notebook, you set up your development environment and write a simple pipeline using YAML. Then you run it locally, using the [DirectRunner](https://beam.apache.org/documentation/runners/direct/). You can explore other runners with the [Beam Capatibility Matrix](https://beam.apache.org/documentation/runners/capability-matrix/).\n", "\n", "To navigate through different sections, use the table of contents. From **View** drop-down list, select **Table of contents**.\n", "\n", - "To run a code cell, you can click the **Run cell** button at the top left of the cell, or by select it and press **`Shift+Enter`**. Try modifying a code cell and re-running it to see what happens.\n", + "To run a code cell, click the **Run cell** button at the top left of the cell, or select it and press **`Shift+Enter`**. Try modifying a code cell and re-running it to see what happens.\n", "\n", "To learn more about Colab, see [Welcome to Colaboratory!](https://colab.sandbox.google.com/notebooks/welcome.ipynb)." ] @@ -87,7 +87,7 @@ "source": [ "# Setup\n", "\n", - "First, you need to set up your environment, which includes installing `apache-beam` and downloading files from Cloud Storage to your local file system. We'll use these files as an input to the pipelines in this guide." + "First, you need to set up your environment. The following code installs `apache-beam` and downloads some text files from Cloud Storage to your local file system. We'll use these text files as input to the pipelines." ] }, { @@ -127,8 +127,8 @@ "cell_type": "markdown", "source": [ "## Inspect the data\n", - "We'll be working with 2 datasets. We'll use `kinglear.txt` for the first example - word count, and `SMSSpamCollection.csv` for the second and third.\n", - "Let's first take a loot at the `kinglear.txt` dataset." + "We'll be working with two datasets. We'll use `kinglear.txt` for the first example, and `SMSSpamCollection.csv` for the second and third examples.\n", + "Let's first take a look at the `kinglear.txt` dataset." ], "metadata": { "collapsed": false @@ -148,7 +148,7 @@ { "cell_type": "markdown", "source": [ - "This is just a `txt` file - it contains lines of text.\n", + "This is just a `txt` file that contains lines of text.\n", "Let's take a look at the other dataset." ], "metadata": { @@ -170,9 +170,9 @@ { "cell_type": "markdown", "source": [ - "This dataset is a `csv` file with 5,574 rows and 2 columns recording the following attributes separated by a tab sign:\n", - "1. `Column 1`: The label (either `ham` or `spam`)\n", - "2. `Column 2`: The SMS as raw text (type `string`)" + "This dataset is a `csv` file that contains 5,574 rows of SMS messages labeled either spam or not-spam (\"ham\"). Each row contains two columns separated by a tab character:\n", + "1. `Column 1`: The label, either `ham` or `spam`\n", + "2. `Column 2`: The SMS message as raw text (type `string`)" ], "metadata": { "collapsed": false @@ -181,8 +181,8 @@ { "cell_type": "markdown", "source": [ - "## Example 1: word count\n", - "In this popular introductory exercise, we will build a pipeline that reads lines of text from the input dataset `kinglear.txt` and counts the number of times each word appears in the text.\n", + "## Example 1: Word count\n", + "This example is a version of the [WordCount](https://beam.apache.org/get-started/wordcount-example/)). It reads lines of text from the input dataset `kinglear.txt` and counts the number of times each word appears in the text.\n", "To start, we'll create a `.yaml` file specifying our pipeline." ], "metadata": { @@ -252,8 +252,8 @@ { "cell_type": "markdown", "source": [ - "Each pipeline specification has to start with a `pipeline` key on the first line.\n", - "Following, there is a list of transforms, such as the first one:\n", + "Each pipeline specification must start with a `pipeline` key on the first line.\n", + "The `pipeline` keyh is followed by a list of transforms. For example, the first transform reads the input file:\n", "```\n", " # Read input data. Each line from the csv file is a String.\n", " - type: ReadFromText\n", @@ -261,14 +261,14 @@ " config:\n", " file_pattern: data/kinglear.txt\n", "```\n", - "This one reads an input file for futher processing.\n", - "Remember that the indentation is important here - it specifies object hierarchy.\n", - "YAML also supports comments - everything after the `#` is always treated as a comment. Use them to improve readability.\n", + "Note: The indentation is important, because it specifies object hierarchy.\n", + "YAML supports comments. Everything after the `#` is always treated as a comment. Use them to improve readability.\n", "\n", - "Each operation has to specify the `type` descriptor and other fields, such as `name` and other transform-specific parameters.\n", - "Take a look at the documentation for a list of available transforms and their parameters. # todo(yaml) add link\n", + "Each operation must specify the `type` descriptor and other fields, such as `name` and other transform-specific parameters.\n", + "For a list of available transforms and their parameters, see the YAML API documentation. # todo(yaml) add link\n", "\n", - "To link two operations, use the `input` field, just like in the third operation:\n", + "To link two operations, use the `input` field. The `input` field specifies the name of another transform.\n", + "For example, the third operation in this pipeline takes the `FindWords` transform as input:\n", "```\n", " # Transforming each word to lower case and combining it with a '1'. Result of this step are pairs (word: 1).\n", " - type: PyMap\n", @@ -277,9 +277,9 @@ " config:\n", " fn: 'lambda word: (word, 1)'\n", "```\n", - "The `input` refers to the name of another transform, the previous one in this case.\n", - "This particular operation takes `fn` (stands for function) as an argument. Currently only Python functions are supported.\n", - "For more complicated functions, you can take advantage of YAML's multiline feature, as you can see in the second operation:\n", + "This particular operation takes `fn` (which stands for function) as an argument. Currently only Python functions are supported.\n", + "\n", + "For more complicated functions, you can take advantage of YAML's multiline feature, as show in the second operation:\n", "```\n", " # Using a regex, we'll split the content of the message (one long string) into words (list of strings).\n", " - type: PyFlatMap\n", @@ -290,7 +290,8 @@ " import re\n", " lambda line: re.findall(r\"[a-zA-Z]+\", line)\n", "```\n", - "Here we had to import Python's regex package - `re`. To do that, we indicated a multiline string with `|` character and wrote the function in 2 lines.\n", + "In this trasnform, we need to import Python's regex package, `re`. To do that, we use the '|' character to start a multiline string.\n", + "This lets us write the function across two lines.\n", "\n", "Let's run the pipeline executing the Python entry-point script (`apache_beam.yaml.main`) with our pipeline file as an argument:" ], @@ -339,8 +340,8 @@ { "cell_type": "markdown", "source": [ - "## Example 2: load data, filter unwanted lines and save results to a text file.\n", - "In this example, we'll create a pipeline which loads a `.csv` file containing SMS messages, filters out valid messages, and saves only valid sms messages to a file.\n" + "## Example 2: Load data, filter unwanted lines, and save results to a text file.\n", + "This example creates a pipeline that loads a `.csv` file containing SMS messages, filters out valid messages, and saves the spam messages to a file.\n" ], "metadata": { "collapsed": false @@ -410,7 +411,7 @@ { "cell_type": "markdown", "source": [ - "Let's verify the results and see the content of the output file." + "Verify the results and see the content of the output file." ], "metadata": { "collapsed": false @@ -430,7 +431,7 @@ { "cell_type": "markdown", "source": [ - "If everything went well, you should see only spam messages from our input dataset. Congratulations, onto the next example!\n" + "You should see only spam messages from the input dataset. Congratulations, onto the next example!\n" ], "metadata": { "collapsed": false @@ -439,9 +440,9 @@ { "cell_type": "markdown", "source": [ - "## Example 3: count words in spam messages, select top 10 popular words and write results to a file.\n", + "## Example 3: Count words in spam messages, select the top 10 popular words, and write the results to a file.\n", "\n", - "We'd like to write a pipeline which counts words occurring in spam messages, selects the most popular ones and writes the result to a file.\n" + "This example counts words occurring in spam messages, selects the most popular words, and writes the result to a file.\n" ], "metadata": { "collapsed": false @@ -524,7 +525,7 @@ { "cell_type": "markdown", "source": [ - "Let's run the pipeline:" + "Run the pipeline:" ], "metadata": { "collapsed": false @@ -544,7 +545,7 @@ { "cell_type": "markdown", "source": [ - "To view the output:" + "Finally, view the output:" ], "metadata": { "collapsed": false From 50c8170c4c79ba92c29491108724cd433d2411e6 Mon Sep 17 00:00:00 2001 From: Bartosz Zablocki Date: Mon, 21 Aug 2023 13:30:24 +0000 Subject: [PATCH 15/16] Remove dash in the content of Getting Started with Yaml --- examples/notebooks/get-started/try-apache-beam-yaml.ipynb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/notebooks/get-started/try-apache-beam-yaml.ipynb b/examples/notebooks/get-started/try-apache-beam-yaml.ipynb index 748ea4ad0f0e..4f7b3dc5fff1 100644 --- a/examples/notebooks/get-started/try-apache-beam-yaml.ipynb +++ b/examples/notebooks/get-started/try-apache-beam-yaml.ipynb @@ -65,7 +65,7 @@ "\n", "While Beam provides powerful APIs for authoring sophisticated data processing pipelines, it still has a high barrier for getting started and authoring simple pipelines. Even setting up the environment, installing the dependencies, and setting up the project can be a challenge.\n", "\n", - "Here we provide a simple YAML syntax for describing pipelines that does not require coding experience or learning how to use an SDK&mdash. You can use any text editor.\n", + "Here we provide a simple YAML syntax for describing pipelines that does not require coding experience or learning how to use an SDK. You can use any text editor.\n", "\n", "Please note: YAML API is still EXPERIMENTAL and subject to change.\n", "\n", From 373b9e04f7c7d8428ebdd1e5c42da7fee1ca3490 Mon Sep 17 00:00:00 2001 From: Bartosz Zablocki Date: Tue, 22 Aug 2023 11:22:47 +0000 Subject: [PATCH 16/16] Fix typos --- examples/notebooks/get-started/try-apache-beam-yaml.ipynb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/notebooks/get-started/try-apache-beam-yaml.ipynb b/examples/notebooks/get-started/try-apache-beam-yaml.ipynb index 4f7b3dc5fff1..da326975bb7b 100644 --- a/examples/notebooks/get-started/try-apache-beam-yaml.ipynb +++ b/examples/notebooks/get-started/try-apache-beam-yaml.ipynb @@ -69,7 +69,7 @@ "\n", "Please note: YAML API is still EXPERIMENTAL and subject to change.\n", "\n", - "In this notebook, you set up your development environment and write a simple pipeline using YAML. Then you run it locally, using the [DirectRunner](https://beam.apache.org/documentation/runners/direct/). You can explore other runners with the [Beam Capatibility Matrix](https://beam.apache.org/documentation/runners/capability-matrix/).\n", + "In this notebook, you set up your development environment and write a simple pipeline using YAML. Then you run it locally, using the [DirectRunner](https://beam.apache.org/documentation/runners/direct/). You can explore other runners with the [Beam Capability Matrix](https://beam.apache.org/documentation/runners/capability-matrix/).\n", "\n", "To navigate through different sections, use the table of contents. From **View** drop-down list, select **Table of contents**.\n", "\n", @@ -182,7 +182,7 @@ "cell_type": "markdown", "source": [ "## Example 1: Word count\n", - "This example is a version of the [WordCount](https://beam.apache.org/get-started/wordcount-example/)). It reads lines of text from the input dataset `kinglear.txt` and counts the number of times each word appears in the text.\n", + "This example is a version of the [WordCount](https://beam.apache.org/get-started/wordcount-example/). It reads lines of text from the input dataset `kinglear.txt` and counts the number of times each word appears in the text.\n", "To start, we'll create a `.yaml` file specifying our pipeline." ], "metadata": { @@ -253,7 +253,7 @@ "cell_type": "markdown", "source": [ "Each pipeline specification must start with a `pipeline` key on the first line.\n", - "The `pipeline` keyh is followed by a list of transforms. For example, the first transform reads the input file:\n", + "The `pipeline` key is followed by a list of transforms. For example, the first transform reads the input file:\n", "```\n", " # Read input data. Each line from the csv file is a String.\n", " - type: ReadFromText\n", @@ -290,7 +290,7 @@ " import re\n", " lambda line: re.findall(r\"[a-zA-Z]+\", line)\n", "```\n", - "In this trasnform, we need to import Python's regex package, `re`. To do that, we use the '|' character to start a multiline string.\n", + "In this transform, we need to import Python's regex package, `re`. To do that, we use the '|' character to start a multiline string.\n", "This lets us write the function across two lines.\n", "\n", "Let's run the pipeline executing the Python entry-point script (`apache_beam.yaml.main`) with our pipeline file as an argument:"