100% found this document useful (2 votes)
55 views

Download Complete Applied Text Analysis with Python Enabling Language Aware Data Products with Machine Learning 1st Edition Benjamin Bengfort PDF for All Chapters

Python

Uploaded by

degeneylmz98
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (2 votes)
55 views

Download Complete Applied Text Analysis with Python Enabling Language Aware Data Products with Machine Learning 1st Edition Benjamin Bengfort PDF for All Chapters

Python

Uploaded by

degeneylmz98
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 55

Experience Seamless Full Ebook Downloads for Every Genre at textbookfull.

com

Applied Text Analysis with Python Enabling


Language Aware Data Products with Machine Learning
1st Edition Benjamin Bengfort

https://textbookfull.com/product/applied-text-analysis-with-
python-enabling-language-aware-data-products-with-machine-
learning-1st-edition-benjamin-bengfort/

OR CLICK BUTTON

DOWNLOAD NOW

Explore and download more ebook at https://textbookfull.com


Recommended digital products (PDF, EPUB, MOBI) that
you can download immediately if you are interested.

Applied Natural Language Processing with Python:


Implementing Machine Learning and Deep Learning Algorithms
for Natural Language Processing 1st Edition Taweh Beysolow
Ii
https://textbookfull.com/product/applied-natural-language-processing-
with-python-implementing-machine-learning-and-deep-learning-
algorithms-for-natural-language-processing-1st-edition-taweh-beysolow-
ii/
textboxfull.com

Advanced Data Analytics Using Python: With Machine


Learning, Deep Learning and NLP Examples Mukhopadhyay

https://textbookfull.com/product/advanced-data-analytics-using-python-
with-machine-learning-deep-learning-and-nlp-examples-mukhopadhyay/

textboxfull.com

Machine Learning Pocket Reference Working with Structured


Data in Python 1st Edition Matt Harrison

https://textbookfull.com/product/machine-learning-pocket-reference-
working-with-structured-data-in-python-1st-edition-matt-harrison/

textboxfull.com

Practical Natural Language Processing with Python With


Case Studies from Industries Using Text Data at Scale 1st
Edition Mathangi Sri
https://textbookfull.com/product/practical-natural-language-
processing-with-python-with-case-studies-from-industries-using-text-
data-at-scale-1st-edition-mathangi-sri/
textboxfull.com
Learning Data Mining with Python Layton

https://textbookfull.com/product/learning-data-mining-with-python-
layton/

textboxfull.com

Practical Machine Learning for Data Analysis Using Python


1st Edition Abdulhamit Subasi

https://textbookfull.com/product/practical-machine-learning-for-data-
analysis-using-python-1st-edition-abdulhamit-subasi/

textboxfull.com

Learning Data Mining with Python Robert Layton

https://textbookfull.com/product/learning-data-mining-with-python-
robert-layton/

textboxfull.com

Introduction to Machine Learning with Python A Guide for


Data Scientists Andreas C. Müller

https://textbookfull.com/product/introduction-to-machine-learning-
with-python-a-guide-for-data-scientists-andreas-c-muller/

textboxfull.com

Introduction to Machine Learning with Python A Guide for


Data Scientists 1st Edition Andreas C. Müller

https://textbookfull.com/product/introduction-to-machine-learning-
with-python-a-guide-for-data-scientists-1st-edition-andreas-c-muller/

textboxfull.com
Applied Text Analysis with
Python
Enabling Language Aware Data Products with
Machine Learning

Benjamin Bengfort, Rebecca Bilbro, and Tony


Ojeda
Applied Text Analysis with Python
by Benjamin Bengfort , Tony Ojeda , and Rebecca Bilbro
Copyright © 2016 Benjamin Bengfort, Tony Ojeda, Rebecca Bilbro.
All rights reserved.
Printed in the United States of America.
Published by O’Reilly Media, Inc. , 1005 Gravenstein Highway North,
Sebastopol, CA 95472.
O’Reilly books may be purchased for educational, business, or sales
promotional use. Online editions are also available for most titles (
http://oreilly.com/safari ). For more information, contact our
corporate/institutional sales department: 800-998-9938 or
[email protected] .

Editor: Nicole Tache

Production Editor: FILL IN PRODUCTION EDITOR

Copyeditor: FILL IN COPYEDITOR

Proofreader: FILL IN PROOFREADER

Indexer: FILL IN INDEXER

Interior Designer: David Futato

Cover Designer: Karen Montgomery

Illustrator: Rebecca Demarest

January -4712: First Edition

Revision History for the First Edition


2016-12-19: First Early Release
See http://oreilly.com/catalog/errata.csp?isbn=9781491962978 for
release details.
The O’Reilly logo is a registered trademark of O’Reilly Media, Inc.
Applied Text Analysis with Python, the cover image, and related
trade dress are trademarks of O’Reilly Media, Inc.
While the publisher and the author(s) have used good faith efforts to
ensure that the information and instructions contained in this work
are accurate, the publisher and the author(s) disclaim all
responsibility for errors or omissions, including without limitation
responsibility for damages resulting from the use of or reliance on
this work. Use of the information and instructions contained in this
work is at your own risk. If any code samples or other technology
this work contains or describes is subject to open source licenses or
the intellectual property rights of others, it is your responsibility to
ensure that your use thereof complies with such licenses and/or
rights.
978-1-491-96297-8
[FILL IN]
Chapter 1. Text Ingestion and
Wrangling

As we explored the architecture of language in the previous chapter,


we began to see that it is possible to model natural language in spite
of its complexity and flexibility. And yet, the best language models
are often highly constrained and application-specific. Why is it that
models trained in a specific field or domain of the language would
perform better than ones trained on general language? Consider that
the term “bank” is very likely to be an institution that produces fiscal
and monetary tools in an economics, financial, or political domain,
whereas in an aviation or vehicular domain it is more likely to be a
form of motion that results in the change of direction of an aircraft.
By fitting models in a narrower context, the prediction space is
smaller and more specific, and therefore better able to handle the
flexible aspects of language.
The bulk of our work in the subsequent chapters will be in “feature
extraction” and “knowledge engineering” - where we’ll be concerned
with the identification of unique vocabulary words, sets of
synonyms, interrelationships between entities, and semantic
contexts. However, all of these techniques will revolve around a
central text dataset: the corpus.
Corpora are collections of related documents that contain natural
language. A corpus can be large or small, though generally they
consist of hundreds of gigabytes of data inside of thousands of
documents. For instance, considering that the average email inbox is
2GB, a moderately sized company of 200 employees would have
around a half-terabyte email corpus. Documents contained by a
corpus can also vary in size, from tweets to books. Corpora can be
annotated, meaning that the text or documents are labeled with the
correct responses for supervised learning algorithms, or
unannotated, making them candidates for topic modeling and
document clustering.

NOTE
No two corpora are exactly alike and there are many opportunities to
customize the approach taken in this chapter. This chapter presents a
general method for ingesting HTML data from the internet, a ubiquitous
text markup that is easily parsed and available in a variety of domains.
The HTML data is cleaned, parsed, segmented, tokenized, and tagged
into a preprocessed data structure that will be used for the rest of the
book.

Naturally the next question should then be “how do we construct a


dataset with which to build a language model?” In order to equip
you for the rest of the book, this chapter will explore the
preliminaries of construction and organization of a domain-specific
corpus. Working with text data is substantially different from working
with purely numeric data, and there are a number of unique
considerations that we will need to take. Whether it is done via
scraping, RSS ingestion, or an API, ingesting a raw text corpus in a
form that will support the construction of a data product is no trivial
task. Moreover, when dealing with a text corpus, we must consider
not only how the data is acquired, but also how it is organized on
disk. Since these will be very large, often unpredictable datasets, we
will need to anticipate potential performance problems and ensure
memory safety through streaming data loading and multiprocessing.
Finally, we must establish a systematic preprocessing method to
transform our raw ingested text into a corpus that is ready for
computation and modeling. By the end of this chapter, you should be
able to organize your data and establish a reader that knows how to
access the text on disk and present it in a standardized fashion for
downstream analyses.
Acquiring a Domain-Specific Corpus
Acquiring a domain-specific corpus will be essential to producing a
language-aware data product. Fortunately, the internet offers us a
seemingly infinite resource with which to construct domain-specific
corpora. Below are some examples of domains, along with
corresponding web text data sources.
Category Sources

http://www.politico.com
http://www.cnn.com/politics
Politics https://www.washingtonpost.com/politics
http://www.foxnews.com/politics.html
http://www.huffingtonpost.com/section/politics

http://www.bloomberg.com
http://www.inc.com
Business https://www.entrepreneur.com
https://hbr.org
http://fortune.com

http://espn.go.com
http://sports.yahoo.com
Sports
http://bleacherreport.com
http://www.nytimes.com/pages/sports

http://www.wired.com
https://techcrunch.com
Technology http://radar.oreilly.com
https://gigaom.com
http://gizmodo.com

http://blog.foodnetwork.com
http://www.delish.com
Cooking
http://www.epicurious.com
http://www.skinnytaste.com
One important question to address is the degree of specificity
required of a corpus for effective language modeling; how specific is
specific enough? As we increase the specificity of the domain, we
will necessarily reduce the volume of our corpus. For instance, it
would be easier to produce a large dataset about the general
category ‘sports’, but that corpus would still contain a large degree
of ambiguity. By specifically targeting text data about baseball or
basketball, we reduce this ambiguity, but we also reduce the overall
size of our corpus. This is a significant tradeoff, because we will
need a very large corpus in order to provide sufficient training
examples to our language models, thus we must find a balance
between domain specificity and corpus size.

Data Ingestion of Text


As data scientists, we rely heavily on structure and patterns, not only
in the content of our data, but in its history and provenance. In
general, good data sources have a determinable structure, where
different pieces of content are organized according to some schema
and can be extracted systematically via the application of some logic
to that schema. If there is no common structure or schema between
documents, it becomes difficult to discern any patterns for extracting
the information we want, which often results in either no data
retrieved at all or significant cleaning required to correct what the
ingestion process got wrong.
In the specific context of text, we want the result of our ingestion
process to be paragraphs of text that are ordered and complete.
However, achieving this outcome is made somewhat more or less
challenging depending on how the data is stored. When we ingest
text data from the internet, the most common format we will
encounter are HTML webpages and websites. A website is a
collection of web pages that belong to the same person or
organization, contain similar content, and most importantly, usually
share a common domain name. In the below example, we see that
districtdatalabs.com is the website, or the collection of pages, and
each of the individual documents listed below it (courses, projects,
etc.) represent the individual web pages.

districtdatalabs.com
├── /
├── /courses
├── /projects
├── /corporate-offerings
├── /about
└── blog.districtdatalabs.com
| ├── /an-introduction-to-machine-learning-with-python
| ├── /the-age-of-the-data-product
| └── /building-a-classifier-from-census-data
| └── /modern-methods-for-sentiment-analysis
...

The predictability of a common domain name makes systematic data


collection simpler and more convenient. However, most ingested
HTML does not arrive clean, ordered, and ready for analysis. For one
thing, a raw HTML document collected from the web will include
much that is not text: advertisements, headers and footers,
navigation bars, etc. Because of its loose schema, HTML makes the
systematic extraction of the text from the non-text challenging. On
the other end of the spectrum is a structured format like JSON,
which, while less common than HTML, is human-readable and
contains substantially more schema, making text extraction easier.
Somewhere in between HTML and JSON is the web syndication
format RSS. RSS often provides fields, such as publication date,
author, and URL, which help with systematic text extraction and also
offer useful metadata that can later be used in feature engineering.
On the other hand, RSS does not always contain the full text,
providing instead a summary, which may not be sufficiently robust
for language modeling.
In the following sections, we will explore each of these three further
as we investigate a range of techniques for ingesting text from the
internet, including scraping, crawling, RSS, and APIs.

Scraping and Crawling


Two of the most popular ways of ingesting data from the internet
are web scraping and web crawling. Scraping (done by scrapers)
refers to the automated extraction of specific information from a
web page. This information is often a page’s text content, but it may
also include the headers, the date the page was published, what
links are present on the page, or any other specific information the
page contains. Crawling (done by crawlers or spiders) involves the
traversal of a website’s link network, while saving or indexing all the
pages in that network. Scraping is done with an explicit purpose of
extracting specific information from a page, while crawling is done in
order to obtain information about link networks within and between
websites. It is possible to both crawl a website and scrape each of
the pages, but only if we know what specific content we want from
each page and have information about its structure in advance.

CAUTION
There are some important precautions that need to be taken into
consideration when crawling websites in order to be good web citizens
and not cause any trouble. The first of these are robot.txt files, which
are files that websites publish telling you what they do and do not allow
from crawlers. A simple Google search for the website you’re going to
crawl and “robots.txt” should get you the file.

Let’s say we wanted to automatically fetch news stories from a


variety of sources in order to quickly get a sense of what was
happening today. The first step is to start with a seed list of news
sites, crawl those sites, and save all the pages to disk. We can do
this in Python with the help of the following libraries:

requests to read the content from web pages.


BeautifulSoup to extract the links.
awesome-slugify to format the filenames when we save the
pages to disk.

In the code snippet below, we create a function crawl that uses the
get method of the requests library to make a call to a series of
webpages and read the content of the server’s response. Then we
call the content method on the result of this response to get its raw
contents as bytes. We next create a BeautifulSoup object with these
contents, and use the find_all method from bs4 to identify the links
inside the text by finding each of the a tags with an href. We then
iterate over the set of those links, using get and content to retrieve
and save the content of each of those webpages to a unique HTML
file on disk.

import bs4
import requests
from slugify import slugify

sources = ['https://www.washingtonpost.com',
'http://www.nytimes.com/',
'http://www.chicagotribune.com/',
'http://www.bostonherald.com/',
'http://www.sfchronicle.com/']

def crawl(url):
domain = url.split("//www.")[-1].split("/")[0]
html = requests.get(url).content
soup = bs4.BeautifulSoup(html, "lxml")
links = set(soup.find_all('a', href=True))
for link in links:
sub_url = link['href']
page_name = link.string
if domain in sub_url:
try:
page = requests.get(sub_url).content
filename = slugify(page_name).lower() + '.html'
with open(filename, 'wb') as f:
f.write(page)
except:
pass

if __name__ == '__main__':
for url in sources:
crawl(url)

The code above creates a series of files that contain the full HTML
content for each of the web pages linked to from the main list of
sources URLs. This includes all text, images, links, and other content
present on those pages. One thing to note is that the resultant files
are saved without hierarchy in whichever directory the script is run
from. As is, the crawl script does not segregate the saved HTML files
by their original sources, an important data management mechanism
that becomes critical as corpora increase in size, and which we will
implement in later parts of this chapter. Another consideration with
the above crawl function is that some of the resultant HTML files will
contain fulltext articles, while others will merely contain article
headlines and links that fall under a certain topic (e.g. street fashion
or local politics). In order to collect all of the fulltext articles from all
of the secondary, tertiary, etc. web pages that comprise a website,
further recursion is needed.
CAUTION
Another precaution that should be taken is rate limiting, or limiting the
frequency at which you ping a website. In practice, you should insert a
pause for a certain amount of time (usually at least a few seconds)
between each web page you call. One of the reasons for doing this is
that if we hit a website with too much traffic too fast, it might bring
down the website if it is not equipped to handle that level of traffic.
Another reason is that larger websites might not like the fact that you
are crawling their site, and they might block your IP address so that you
can’t use their site anymore.

Running the code above will take several minutes. In order to speed
it up, we may want to multiprocess this task. Multiprocessing means
performing actions in parallel, so in this case, we’d be crawling
multiple sites at the same time. We can use the multiprocessing
library to help us do this.
In the following code snippet, we are creating a multi_proc_crawl
function that accepts as arguments a list of URLs and a number of
processes across which to distribute the work. We then create a
Pool object, which can parallelize the execution of a function and
distribute the input across processes. We then call map, the parallel
equivalent of the Python built-in function, on our Pool object, which
chops the crawl iteration into chunks and submits to the Pool as
separate tasks. After the crawl tasks have been executed for all of
the items in the URL list, the close method allows the worker
processes to exit, and join acts as a synchronization point, reporting
any exceptions that occurred among the worker processes.

from multiprocessing.dummy import Pool

def multi_proc_crawl(url_list, processes=2):


pool = Pool(processes)
pool.map(crawl, url_list)
pool.close()
pool.join()

multi_proc_crawl(sources, 4)

In effect, the above code snippet will split our original job into four
processes, and then run those processes in parallel, making our
crawl function much faster. Multiprocessing is particularly handy for
large ingestion and wrangling tasks, and we will discuss it in greater
detail in a later section.
At this point, we have several HTML web pages written to disk - one
file per web page. Now, we will want to parse the HTML in each file
in order to extract just the text we want to keep. The easiest way to
do this with Python is to use the BeautifulSoup library. For example,
if we wanted to extract the text from one of the news article pages
we saved and print it to the console, we would use the code snippet
below to do so. In the code below, we first identify the tags where
text data is contained. Then we create an html_to_text function
which takes a file path, reads the HTML from the file, and uses the
get_text method to yield the text from anywhere it finds a tag that
matches our tag list.

import bs4

TAGS = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'h7', 'p', 'li']

def html_to_text(path):
with open(path, 'r') as f:
html = f.read()
soup = bs4.BeautifulSoup(html, "lxml")
for tag in soup.find_all(TAGS):
yield tag.get_text()

Just as with crawling, there are also a some considerations to take


into account when scraping content from web pages. Some websites
have dynamic content that is loaded via JavaScript. For these
websites, you would need to take a different approach in order to
obtain the content.
There are also several ways to crawl and scrape websites besides
the methods we’ve demonstrated here. For more advanced crawling
and scraping, it may be worth looking into the following tools.

Scrapy - an open source framework for extracting data from


websites.
Selenium - a Python library that allows you to simulate user
interaction with a website.
Apache Nutch - a highly extensible and scalable open source web
crawler.

Web crawling and scraping can take us a long way in our quest to
acquire text data from the web, and the tools currently available
make performing these tasks easier and more efficient. However,
there is still much work left to do after initial ingestion. While
formatted HTML is fairly easy to parse with packages like
BeautifulSoup, after a bit of experience with scraping, one quickly
realizes that while general formats are similar, different websites can
lay out content very differently. Accounting for, and working with, all
these different HTML layouts can be frustrating and time consuming,
which can make using more structured text data sources, like RSS,
look much more attractive.

Ingestion using RSS Feeds and Feedparser


RSS (Really Simple Syndication) is a standardized XML format for
syndicated text data that is primarily used by blogs, news sites, and
other online publishers who publish multiple documents (posts,
articles, etc.) using the same general layout. There are different
versions of RSS, all originally evolved from the Resource Description
Framework (RDF) data serialization model, the most common of
which is currently RSS 2.0. Atom is a newer and more standardized,
but at the time of this writing, a less widely-used approach to
providing XML content updates.
Text data structured as RSS is formatted more consistently than text
data on a regular web page, as a content feed, or a series of
documents arranged in the order they were published. This feed
means you do not need to crawl the website in order to get other
content or acquire updates, making it preferable to acquiring data
through crawling and scraping. If the desired data resides in the
body of blog posts or news articles and the website makes them
available as an RSS feed, you can merely parse that feed.
Another feature of RSS is its ability to synchronize or retrieve the
latest version of the content as articles on the source website are
updated. Routine querying ensures any changes to the content are
reflected in the XML. However, the RSS format also has some
notable drawbacks. Most feeds give the content owner the option of
displaying either the full text or just a summary of each post or
article. Content owners whose revenue depends heavily on serving
advertisements have an incentive to display only summary text via
RSS to encourage readers to visit their website to view both the full
content and the ads.
In the example below, we introduce the Python feedparser library to
assist in ingesting the RSS feeds of a list of blogs, parsing them,
extracting the text content, and then writing that content to disk as
XML files. After creating a list of feeds, the rss_parse function uses
the parse method to parse the XML for each of our feeds. From
there, the entries method retrieves the feed’s posts or articles.
Next, we iterate through each post, extracting the title for each,
using the get_text method to extract the text from inside any of the
tags from our tag list, and writing that post’s text to a file.

import bs4
import feedparser
from slugify import slugify
feeds = ['http://blog.districtdatalabs.com/feed',
'http://feeds.feedburner.com/oreilly/radar/atom',
'http://blog.kaggle.com/feed/',
'http://blog.revolutionanalytics.com/atom.xml']

def rss_parse(feed):
parsed = feedparser.parse(feed)
posts = parsed.entries
for post in posts:
html = post.content[0].get('value')
soup = bs4.BeautifulSoup(html, 'lxml')
post_title = post.title
filename = slugify(post_title).lower() + '.xml'
TAGS = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'h7', 'p', 'li']
for tag in soup.find_all(TAGS):
paragraphs = tag.get_text()
with open(filename, 'a') as f:
f.write(paragraphs + '\n \n')

When the code above is run, it generates a series of XML files, one
for each blog post or article belonging to the each RSS source listed
in our feeds list. The files contain only the text content from each
posts or article.
THE BALEEN INGESTION ENGINE
The actual implementation of ingestion can become complex;
APIs and RSS feeds can change, and significant forethought is
required to determine how best to put together an application
that will conduct not only robust, autonomous ingestion, but also
secure data management.

Figure 1-1. The Baleen RSS Ingestion Architecture

The complexity of routine text ingestion via RSS is shown in


Figure 1-1. The fixture that specifies what feeds to ingest and
how they’re categorized is an OPML file that must be read from
disk. Connecting and inserting posts, feeds, and other
information to the MongoDB store requires an object document
mapping (ODM), and tools are need to define a single ingestion
job that synchronizes entire feeds then fetches and wrangles
individual posts or articles.
With these mechanisms in place, other utilities are required to
run the ingestion job on a routine basis (e.g. hourly). Some
configuration is required to specify database connection
parameters and how often to run. Since this will be a long
running process, logging and other types of monitoring are
required. A mechanism is needed that will schedule ingestion
jobs to run every hour and deal with errors. Finally some tool is
needed to export the final corpus ready for preprocessing from
the database.

While RSS provides additional structure that makes ingesting text


data easier, the sources available in RSS format are typically blog
posts and news articles. If other types of data are needed, an
alternate ingestion method, such as ingestion from an API, may be
necessary.

APIs: Twitter and Search


An API (Application Programming Interface) is a set of programmatic
instructions for accessing a web-based software application.
Organizations frequently release their APIs to the public to enable
others to develop products on top of their data. Most modern web
and social media services have APIs that developers can access, and
they are typically accompanied by documentation with instructions
on how to access and obtain the data.

NOTE
As a web service evolves, both the API and the documentation are
usually updated as well, and as developers and data scientists, we need
to stay current on changes to the APIs we use in our data products.
A RESTful API is a type of web service API that adheres to
representational state transfer (REST) architectural constraints. REST
is a simple way to organize interactions between independent
systems, allowing for lightweight interaction with clients such as
mobile phones and other websites. REST is not exclusively tied to
the web, but it is almost always implemented as such, as it was
inspired by HTTP. As a result, wherever HTTP can be used, REST can
also be used.
In order to interact with APIs, you must usually register your
application with the service provider, obtain authorization
credentials, and agree to the web service’s terms of use. The
credentials provided usually consist of an API key, an API secret, an
access token, and an access token secret; all of which consist of
long combinations of alpha-numeric and special characters. Having a
credentialing system in place allows the service provider to monitor
and control use of their API. The primary reason they do this is so
that they can prevent abuse of their service. Many service providers
allow for registration using OAuth, which is an open authentication
standard that allows a user’s information to be communicated to a
third party without exposing confidential information such as their
password.
APIs are popular data sources among data scientists because they
provide us with a source of ingestion that is authorized, structured,
and well-documented. The service provider is giving us permission
and access to retrieve and use the data they have in a responsible
manner. This isn’t true of crawling/scraping or RSS, and for this
reason, obtaining data via API is preferable whenever it is an option.
To illustrate how we can work with an API to acquire some data, let’s
take a look at an example. The following example uses the popular
tweepy library to connect to Twitter’s API and then, given a list of
user names, retrieves the last 100 tweets from each user and saves
each tweet to disk as an individual document.
In order to do this, you must obtain credentials for accessing the
API, which can be done by following the steps below.
1. Go to https://apps.twitter.com and sign in with your Twitter
account.
2. Once you’ve signed in, click on the Create New App button.
3. Fill out the required fields on the form (Name, Description, and
Website) and check the checkbox indicating that you’ve read their
Developer Agreement.
4. Click the Create your Twitter application button.
5. On the next page, click on the Keys and Access Tokens tab,
and copy your API Key and API Secret tokens somewhere safe.
6. Scroll to the bottom of the page and click the Create my access
token button.
7. Under the Your Access Token section, you should now see your
Access Token and Access Token Secret. Copy these to a safe
place also.
You can then substitute your credentials into placeholders in the
code below, as well as experimenting with customizing the user list,
the number of tweets to retrieve from each user’s timeline, and the
number of characters from the tweet to use in the file name to suit
your needs.

CAUTION
It is worth noting that instead of explicitly storing your credentials in
your code, you should instead save them in a JSON config file and then
add that config file to a .gitignore file. This will help ensure that your
credentials do not accidentally get uploaded to Github, where others
can obtain them and potentially use them use them to abuse the
service on your behalf.
In the code snippet below, we are using the tweepy library to access
the Twitter API, passing it our credentials so that it can allow us to
proceed. Once we are connected to the API, we pass a list of Twitter
usernames to a users list. We then iterate through this list, using the
user_timeline method to fetch the last 100 tweets from each user’s
timeline. We then iterate through each tweet in the user’s timeline,
use the text method to extract the text content, and save it to disk
as a line in a JSON file for each user.

import tweepy
from slugify import slugify

API_KEY = " "


API_SECRET = " "
ACCESS_TOKEN = " "
ACCESS_TOKEN_SECRET = " "

auth = tweepy.OAuthHandler(API_KEY, API_SECRET)


auth.set_access_token(ACCESS_TOKEN, ACCESS_TOKEN_SECRET)

api = tweepy.API(auth)

users = ["tonyojeda3","bbengfort","RebeccaBilbro","OReillyMedia",
"datacommunitydc","dataelixir","pythonweekly","KirkDBorne"]

def get_tweets(user_list, tweets=20):


for user in users:
user_timeline = api.user_timeline(screen_name=user,
count=tweets)
filename = str(user) + ".json"
with open(filename, 'w+') as f:
for idx, tweet in enumerate(user_timeline):
tweet_text = user_timeline[idx].text
f.write(tweet_text + "\n")

get_tweets(users, 100)

The result of running the code above is a single JSON file for each
username. Each JSON file contains a line for each tweet published to
that user’s timeline.

CAUTION
It is important to read the documentation for an API and respect any
specified rate limits. To access data from the Twitter API, we were
required to register our application with Twitter. This ensures that they
know what you are planning to do with their data, and can monitor, and
in some cases control your access to the data. Web service providers
like Twitter often impose limits on the amount of data you can retrieve
from their service and also how quickly you can retrieve it. If you hit
those limits, they will often cut off your access for a limited amount of
time, and if you disregard those limits consistently and abuse their
service, they may block your access permanently.

Below is a review of the different methods for ingesting text from


the web, in order of our preference, and the types of data typically
obtained from each.
1. APIs - text content from web services and applications.
2. RSS - text content from blog posts and news articles.
3. Web Crawling and Scraping - text content you can’t get via APIs
or RSS.

One of the potential problems we have encountered with the crawl,


rss_parse, and get_tweets functions is that in each case, the
resultant files are saved without any hierarchy or folder structure
from which to retrieve information about the source, the corpus
category, the date of ingestion, etc. While this absence of structure
may simply be a nuisance with only a few dozen files, when we our
corpus is likely to contain hundreds of thousands of files, we must
seriously consider how to best organize and manage the text content
we are ingesting. In the following section, we will explore a workflow
that wraps a series of best practices for corpus data management
that we have developed though experience.

Corpus Data Management


After identifying a data source to ingest application-specific
language, we can then construct a corpus using the fundamental
ingestion mechanics discussed in the first part of the chapter. Often,
this is where data scientists will start when employing analytics:
collecting a single, static set of documents, and then applying
routine analyses. However, without considering routine and
programmatic data ingestion, analytics will be static and unable to
respond to change or new feedback. In the final section of this
chapter we will discuss how to monitor corpora as our ingestion
routines continue and the data change and grow.
Whether documents are routinely ingested or part of a fixed
collection, some thought must go into how manage the data and
prepare it for analytical processing and model computation. The first
assumption we should make is that the corpora we will be dealing
with will be non-trivial — that is they will contain thousands or tens
of thousands of documents comprising gigabytes of data. The
second assumption is that the language data will come from a
source that will need to be cleaned and processed into data
structures that we can perform analytics on. The former assumption
requires a computing methodology that can scale, and the latter
implies that we will be performing irreversible transformations on the
data.
Figure 1-2. WORM Storage Provides and Intermediate Wrangling Step

Data products often employ a write-once, read-many (WORM)


storage as an intermediate data management layer between
ingestion and preprocessing as shown in Figure 1-2. WORM stores
(sometimes referred to as data lakes) provide streaming read
accesses to raw data in a repeatable and scalable fashion,
addressing the requirement for performance computing. Moreover,
by keeping data in a WORM store, preprocessed data can be re-
analyzed without re-ingestion; allowing new hypotheses to be easily
explored on the raw data format. Because preprocessing is
irreversible, having the raw data stored as a backup allows you to
conduct analyses without fear.
The addition of the WORM store to our data ingestion workflow
means that we need to store data in two places: the raw corpus as
well as the preprocessed corpus, and leads to the question: where
should that data be stored? When we think of data management,
the first thought is a database. Databases are certainly valuable
tools in building language aware data products, and many provide
full-text search functionality and other types of indexing. However,
consider the fact that most databases are constructed to retrieve or
update only a couple of rows per transaction. In contrast,
computational access to a text corpus will be a complete read of
every single document, and will cause no in-place updates to the
document, nor search or select individual documents. As such,
databases tend to add overhead to computation without real benefit.

NOTE
Relational database management systems are great for transactions
that operate on a small collection of rows at a time, particularly when
those rows are updated frequently. Machine learning on a text corpus
has a different computational profile: many sequential reads of the
entire data set. As a result, storing corpora on disk (or in a document
database) is often preferred.

For text data management, the best choice is often to store data in a
NoSQL document storage database that allows streaming reads of
the documents with minimal overhead, or to simply write each
document to disk. While a NoSQL application might be worthwhile in
large applications, consider the benefits of using a file-based
approach: compression techniques on directories are well suited to
text information and the use of a file synchronization service
provides automatic replication. The construction of a corpus in a
database is thus beyond the scope of this book. In order to access
our text corpora, we will plan to structure our data on disk in a
meaningful way, which we will explore in the next section.

Corpus Disk Structure


The simplest and most common method of organizing and managing
a text-based corpus is to store individual documents in a file system
on disk. By organizing the corpus into sub directories, corpora can
be categorized or meaningfully partitioned by meta information like
dates. By maintaining each document as its own file, readers can
seek quickly to different subsets of documents and processing can
be parallelized, with each process taking a different subset of
documents. Text is also the most compressible format, making Zip
files, which leverage directory structures on disk, an ideal
distribution and storage format, in fact, NLTK CorpusReader objects,
which we will discuss in the next section, can read from either a
path to a directory or a path to a Zip file. Finally, corpora stored on
disk are generally static and treated as a whole, fulfilling the
requirement for WORM storage presented in the previous section.
Storing a single document per file could lead to some challenges,
however. Consider smaller document sizes like emails or tweets,
which don’t make sense to store as individual files. Email is typically
stored in an MBox format — a plaintext format that uses separators
to delimit multipart mime messages containing text, HTML, images,
and attachments. The MBox format can be read in Python with the
email module that comes with the standard library, making it easy to
parse with a reader, but difficult to split into multiple documents per
file. On the other hand, most email clients store an MBox file per
folder (or label), e.g. the Inbox MBox, the Starred MBox, the Archive
MBox and so forth, which gives us the idea that a corpus of MBox
files organized by category is a good idea.
Tweets are generally small JSON data structures that include not just
the text of the tweet but other meta data like user or location. The
typical way to store multiple tweets is in newline delimited JSON,
sometimes called the JSON lines format. This format makes it easy
to read one tweet at a time by parsing only a single line at a time,
but also to seek to different tweets in the file. A single file of tweets
can be large, so organizing tweets in files by user, location, or day
can reduce overall file sizes and again create a disk structure of
multiple files. Another technique is simply to write files with a
maximum size limit. E.g. keep writing data to the file, respecting
document boundaries, until it reaches some size limit (e.g. 128 MB)
then open a new file and continue writing there.
NOTE
A corpus on disk will necessarily contain many files that represent one
or more documents in the corpus - sometimes partitioned into
subdirectories that represent meaningful splits like category. Corpus and
document meta information must also be stored along with its
documents. As a result a standard structure for corpora on disk is vital
to ensuring that data can be meaningfully read by Python programs.

Whether documents are aggregated into multi-document files or


each stored as their own file, a corpus represents many files that
need to be organized. If corpus ingestion occurs over time, a
meaningful organization may be subdirectories for year, month, day -
with documents placed into each folder respectively. If the
documents are categorized, e.g. for sentiment as positive or
negative, each type of document can be grouped together into their
own category subdirectory. If there are multiple users in a system
that generate their own subcorpora of user-specific writing, for
example for reviews or tweets, then each user can have their own
subdirectory. Note, however, that the choice of organization on disk
has a large impact on how documents are read by CorpusReader
objects. All subdirectories need to be stored alongside each other in
a single corpus root directory. Importantly, corpus meta information
such as a license, manifest, readme, or citation must also be stored
along with documents such that the corpus can be treated as an
individual whole.
Random documents with unrelated
content Scribd suggests to you:
ymmärrän, että Gerry on mustasukkainen jokaiselle herratuttavalleni,
enkä minä koskaan tosissani pitänyt herra Eismania minään
Rudolph Valentinona, mutta Gerry sanoi, että selkäpiitä oikein karmii,
kun hän ajattelee, että minunlaiseni suloinen tyttö on
ystävyyssuhteissa herra Eismanin kanssa. Näin minä todella aloin
tuntea itseni varsin alakuloiseksi. Tarkoitan, että Gerry mielellään
puhuu paljon, ja minun mielestäni paljo puhuminen aina
lamaannuttaa mieltä, kiusaa aivoja asioilla, jotka eivät koskaan
juolahda mieleenkään, jos ihmisellä on hommaa. Mutta kun kerran
Gerry ei pane pahakseen, että seurustelen muiden herrasmiesten
kanssa, milloin niillä on jotakin älyllistä annettavaa, lähden puoliselle
Eddie Goldmarkin kanssa Goldmarkin filmitehtaasta, joka aina
pyytelee minua tulemaan filminäyttelijättäreksi ja allekirjoittamaan
sopimuksen. Sillä herra Goldmark on korviaan myöten rakastunut
Dorothyyn, ja Dorothy aina kiristää minua palaamaan kinemaan, sillä
Dorothy sanoo, että jos minä menen, niin hänkin tulee.

Huhtikuun 6 p:nä.

No, vihdoinkin minä nyt kirjoitan herra Eismanille, että aion mennä
naimisiin, ja hän kuuluu lähtevän heti tänne, koska hän luultavasti
haluaa antaa neuvoja. Avioliittoon meneminen on tosiaan ihan
vakavaa, ja Gerry juttelee siitä minulle tuntikausia perätysten.
Tarkoitan, ettei hän koskaan näy väsyvän puhumiseen eikä viitsi
edes käydä teatterissa tai tanssia tai tehdä mitään muuta kuin
puhua, ja jollen minä tosiaan pian saa jotakin määrättyä miettimisen
aihetta, niin alan ulvoa.
Huhtikuun 7 p:nä.

No niin, herra Eisman saapui tänä aamuna, ja meillä kahdella oli


varsin pitkä keskustelu, ja taitaapa hän ollakin oikeassa. Sillä tässä
on ensimmäinen todellinen tilaisuus, mikä minulla on oikeastaan
koskaan ollut. Minä aion matkustaa Pariisiin ja laajentaa ja kehittää
kirjoitustaitoani, ja miksi minä hylkäisin urani mennäkseni naimisiin
kirjailijan kanssa, joka itse olisi kaikki kaikessa ja minä ainoastaan
Gerald Lamsonin rouva? Ja kaiken lisäksi minut laahattaisiin
tuomioistuimen eteen, avioerojutun häpeänhälinään ja saisin nimeni
tahratuksi. Ja herra Eisman sanoi, että tilaisuuksia sattuu liian
harvoin tytön elämässä, jotta hylkäisin ensimmäisen, joka minulla
koskaan on todella ollut. Niinpä minä purjehdin Franskanmaalle ja
Lontooseen tiistaina, ottaen Dorothyn mukaani, ja herra Eisman
sanoo tapaavansa meidät siellä myöhemmin. Ja Dorothy tuntee
Pariisissa kaikki langat ja osaa käydä siellä ulos ja sisälle, ikäänkuin
taitaisi ranskaa, ja sitäpaitsi hän tuntee ranskalaisen herrasmiehen,
joka on Pariisissa syntynyt ja kasvanut ja puhuu ranskaa kuin
alkuasukas ja osaa Pariisin kuin viisi sormeaan. Ja Dorothy sanoo,
että kun tulemme Lontooseen, niin melkein jokainen puhuu
englantiakin. Niinpä on kerrassaan onnekasta, että herra Lamson on
luennoimassa Cincinnatissa ja palaa vasta keskiviikkona, joten ehdin
lähettää hänelle kirjeen ja kertoa, että minun täytyy nyt matkustaa
Eurooppaan, mutta sanon tapaavani hänet ehkä myöhemmin. Näin
minä ainakin säästyn kuuntelemasta edelleenkin hänen
ikävystyttävää keskusteluaan. Ja herra Eisman lahjoitti minulle oikein
siron helminauhan ja antoi Dorothylle timanttineulan, ja kaikki
kävimme Colonyssa päivällisellä ja kaikki kävimme teatterissa ja
sitten olimme Trocaderossa illallisella ja kaikki vietimme oikein
hauskan illan.
KOHTALO JATKAA
TAPAHTUMISTAAN

Huhtikuun 11 p:nä.

Jaha, Dorothy ja minä olemme tosiaan laivassa matkalla


Eurooppaan, kuten jokainen voisi todeta vilkaistessaan valtamereen.
Minä rakastan aina merta. Tarkoitan, että minä rakastan laivaa, ja
Majesticiä minä tosiaan rakastan siksi, ettei täällä tiedä laivassa
olevansakaan, kun on ihan kuin olisi Ritzissä, ja hovimestari sanoo,
ettei meri tässä kuussa ole niin häijy kuin se tavallisesti on. Ja herra
Eisman aikoo tavata meidät ensi kuussa Pariisissa, koska hänen
pitää olla siellä liikeasioissa. Hän näetkös sanoo, ettei missään ole
mitään paikkaa, jossa voi tarkastella viimeisiä nappimuoteja niinkuin
Pariisissa. Ja Dorothy on kävelemässä kannella edestakaisin
herrasmiehen kanssa, jonka hän kohtasi portaissa, mutta minä en
ryhdy kuluttamaan aikaani promenaadeihin herrasmiesten kanssa,
sillä jollen minä muuta tekisi kuin vetelehtisin niiden kanssa, niin en
ehtisi päättää päiväkirjaani tai lukea hyviä kirjoja, joita minä älyäni
kehittääkseni aina lueskelen. Mutta Dorothy ei välitä vähääkään
älynsä kehittämisestä, ja minä aina torun häntä siitä, ettei hän muuta
kuin kuluttaa aikaansa kuljeskelemalla herrasmiesten kanssa, joilla
on tyhjät taskut, kun sensijaan Goldmarkin filmitehtaan Eddie
Goldmark on varsin varakas ja kykenee antamaan tytölle varsin
ihania lahjoja. Mutta Dorothy ei tee muuta kuin kuluttaa aikaansa, ja
eilen, joka oli päivää ennen kuin höyrylaivamme purjehti satamasta,
hän ei lähtenyt puoliselle herra Goldmarkin kanssa, vaan meni
puoliselle tavatakseen baltimorelaisen herrasmiehen, nimeltä herra
Mencken, joka oikeastaan vain painattaa vihriäistä aikakauslehteä,
missä ei ole edes kuvia. Mutta herra Eisman sanookin aina, etteivät
kaikki tytöt halua päästä eteenpäin ja sivistyä, niinkuin minä.

Ja herra Eisman ja Lulu tulivat laivalle sanoakseen minulle


jäähyväiset, ja Lulu itki niin, että vesi tippui silmistä. Tarkoitan, etten
tosiaan uskoisi hänen pitävän minusta enempää, vaikka hän olisi
valkoihoinen eikä neekeri, niinkuin hän on. Lululla on ollut sangen
surullinen elämäntarina, sillä kun hän vielä oli ihan nuori, rakastui
muuan ravintolavaunun tarjoilija häneen silmittömästi. Ja Lulu uskoi
häntä, ja hän vietteli Lulun pois kodistaan Ashtabulaan ja petti hänet
siellä. Ja vihdoin Lulu huomasi, että hänet oli petetty, ja hänen
sydämensä vallan murtui. Ja kun hän yritti palata kotiinsa, olikin se
liian myöhäistä, sillä hänen paras tyttöystävänsä, johon hän aina oli
luottanut, oli varastanut hänen aviomiehensä, joka ei enää huolinut
Lulua takaisin. Senvuoksi minä olen aina sanonut hänelle, että hän
saa aina olla minun palveluksessani, ja nyt hän jää huoneistooni
kotimieheksi siksi aikaa, kun olen poissa, kun minä en halua
vuokrata huoneistoani kellekään asukille, sillä viime vuonna
Eurooppaan matkustaessaan Dorothy vuokrasi huoneistonsa
asukille, ja se herrasmies, joka tuli sinne asumaan, laski luokseen
tyttöjä, jotka eivät olleet hienoja.

Herra Eisman on kirjaimellisesti täyttänyt hyttimme kukkasilla, ja


hovimestarilla on ollut aika paljon puuhaa löytääkseen maljakoita
niihin kaikkiin. Tarkoitan, että hovimestari sanoi Dorothyn ja minut
nähtyään heti tietäneensä, että hänelle tulisi aika urakka maljakoiden
hankkimisessa. Ja tietysti herra Eisman on myös lähettänyt minulle
ison kasan hyviä kirjoja, niinkuin hän aina tekee, koska hän aina
tietää, että hyvät kirjat ovat aina tervetulleita. Muun muassa lähetti
hän vallan paksun niteen seurustelutapoja, sillä hän sanoo, että
Englannissa ja Lontoossa on paljon seurustelutapoja eli etikettejä,
joiden oppiminen tekisi tytölle hyvää. Minä otan sen siis puolisen
jälkeen kannelle lukeakseni, sillä usein haluaisin tietää, mitä tytön
tulisi tehdä, kun joku hänen vastikään tapaamansa herrasmies
sanoo hänelle jotakin autossa. Tietysti minä siitä aina suutahdan,
mutta minä luulen aina olevan edullista suoda herrasmiehelle uusi
tilaisuus. Ja koska hovimestari nyt ilmoittaa, että on puolisen aika,
nousen yläkertaan, sillä se herrasmies, jonka Dorothy tapasi
portaissa, on kutsunut meidät puoliselle Ritziin, joka on laivan
erikoinen ruokailuhuone. Siellä voi tuhlata melkoisesti rahoja, mutta
toisessa ruokasalissa syötetäänkin ilmaiseksi.

Huhtikuun 12 p:nä.

Minä pysyn tämän aamun vuoteessani, kun olen ihan järkkynyt


nähtyäni herrasmiehen, joka ihan järkytti minut. Tarkoitan, etten ihan
varmasti tiedä, oliko hän se herrasmies, kun näin hänet vain etäältä
tarjoiluhuoneessa, mutta jos hän todella on se herrasmies, käy siitä
ilmi, että jos tytöllä on elämässään paljon kohtaloa, niin kohtalo
varmasti jatkaa tapahtumistaan, ja luullessani nähneeni sen
herrasmiehen minä olin Dorothyn ja majuri Falconin seurassa, joka
on se Dorothyn portaissa tapaama herra, ja kun majuri Falcon
huomasi, että minut järkytettiin, pyysi hän minua kertomaan, mikä
minua vaivasi, mutta se on tosiaan niin kamalaa, etten halunnut siitä
kenellekään kertoa. Sanoin siis hyvää yötä majuri Falconille, jätin
hänet Dorothyn pariin ja menin alas hyttiimme enkä tehnyt muuta
kuin itkin. Ja lähetin hovimestarin noutamaan samppanjaa
virkistyksekseni. Tarkoitan, että samppanja aina herättää minussa
filosofista mielialaa, kun silloin tajuan, että jos tytön elämä on täynnä
kohtaloa, niinkuin minun näkyy olevan, niin ei ole muuta neuvoa kuin
antaa olla vain. Ja tänä aamuna hovimestari toi minulle kahvia ja
aika ruukullisen jäävettä, minkävuoksi minä pysyn vuoteessani enkä
juo enempää samppanjaa ennen puolista.

Dorothyn elämässä ei koskaan ole mitään kohtaloa, eikä hän tee


muuta kuin tuhlaa aikaansa, niin että tosissani epäilen teinkö oikein
ottaessani hänet mukaani enkä Lulua. Tarkoitan, että hän tosiaan
antaa herrasmiehille huonon käsityksen itsestään käyttäessään niin
paljon arkisanoja. Sillä kun minä menin ylös tavatakseni hänet ja
majuri Falconin puolisella, kuulin hänen sanovan majuri Falconille,
että hän haluaisi kerran tulla oikein "sikamaisesti" humalaan. Vaikkei
hän sanonut "humalaan", vaan käytti suorastaan rahvaankielen
sanaa, joka merkitsee humaltumista, ja minun täytyy aina hänelle
muistutella, että "sikamainen" on tosiaan siivoton sana ja ettei hänen
tosiaankaan tulisi sanoa "sikamainen".

Engelsmanniksi on majuri Falcon tosiaan vallan ihastuttava


herrasmies. Tarkoitan, että hän tosiaan tuhlaa aika paljon rahoja, ja
meillä oli vallan ihastuttava puolinen ja päivällinen Ritzissä, kunnes
luulin nähneeni sen herrasmiehen, joka minut järkytti, ja minä olen
niin järkkynyt, että luullakseni on parasta pukeutua ja mennä
kannelle nähdäkseni, onko hän tosiaan se, joksi häntä luulen.
Tarkoitan, ettei minulla ole muuta tehtävää nyt, kun olen täksi päivää
lopettanut päiväkirjani kirjoittamisen, ja minä olen päättänyt olla
lukematta sitä etikettikirjaa, sillä kun minä sitä silmäilin, ei siinä
näkynyt olevan mitään sellaista, mitä minä välittäisin tietää, koska
siinä tuhlataan paljon aikaa selittelemällä, kuinka pitää puhutella
loordia, ja kaikki tapaamani loordit ovat minulle sanoneet, miksi heitä
nimittäisin, ja tavallisesti se on joku aika visu nimi, kuten esimerk.
Coocoo, jonka oikea nimi on oikeastaan loordi Cooksleigh. En siis
viitsi tuhlata aikaani mokomaan kirjaan. Mutta kunpa en tuntisi
itseäni niin järkkyneeksi sen herrasmiehen vuoksi, jonka luulin
näkeväni.

Huhtikuun 13 p:nä.

Hän on todellakin se herrasmies, jonka luulin nähneeni. Tarkoitan,


että kun sain selville, että hän oli se herrasmies, niin sydämeni
melkein lakkasi sykkimästä. Sillä se toi mieleeni asioita, joita ei
kukaan halua muistella, olkoon kuka tahansa. Kun siis eilen menin
kannelle nähdäkseni, voisinko nähdä sen herrasmiehen ja nähdä,
oliko hän todella hän, niin tapasin oikein herttaisen herran, nimeltä
herra Ginzberg, jonka olin kerran tavannut eräissä kutsuissa. Mutta
hänen nimensä ei enää ole herra Ginzberg, sillä muuan herrasmies
Lontoossa, nimeltä herra Battenburg, joka on jotakin sukua jollekulle
kuninkaalle, muutti nimensä herra Mountbatteniksi, mikä herra
Ginzbergin sanojen mukaan merkitsee sittenkin samaa. Niinpä herra
Ginzberg muutti nimensä herra Mountginziksi, mikä hänestä tosiaan
on aristokraappisempaa. Sitten me kiertelimme kannella ja
kohtasimme sen herrasmiehen kasvoista kasvoihin, ja minä näin
todellakin, että se oli hän, ja hän näki todellakin, että minä olin minä.
Tarkoitan, että hänen kasvonsa kävivät punaisiksi, että ne melkein
näyttivät punajuurilta. Ja minä tulin niin järkkyneeksi, että sanoin
hyvästi herra Mountginzille ja ryntäsin suoraa päätä hyttiini itkemään.
Mutta mennessäni portaita alas törmäsin suoraan majuri Falconiin,
joka huomasi minun olevan järkkyneenä. Ja niin majuri Falcon
kehoitti minua tulemaan Ritziin nauttimaan hiukan samppanjaa ja
kertomaan koko asian.

Sitten kerroin majuri Falconille elämästäni Arkansasissa, kun


isäukko lähetti minut Little Rockiin oppimaan pikakirjoitusta.
Tarkoitan, että isälle ja minulle sattui pikku riitakin, kun isä ei pitänyt
eräästä herrasmiehestä, jonka tapana oli käydä minua kaupungin
puistossa tervehtimässä, minkävuoksi isä tuumi, että lyhyt poissaolo
tekisi minulle hyvää. Olin ollut viikon päivät Little Rockin
kauppaopistossa, kun eräs herra, nimeltä herra Jennings, kävi
opistossa, kun hän tarvitsi uuden pikakirjoittajattaren. Ja hän tarkkasi
kaikkia opiston tyttöjä ja valitsi minut. Ja hän sanoi opettajallemme,
että hän auttaisi minua päättämään kurssini omassa toimistossaan,
koska hän oli vain lakimies eikä minun oikeastaan tarvinnut osata
varsin paljoa. Herra Jennings auttoikin minua aika paljon, ja minä
olin hänen toimistossaan noin vuoden, kunnes huomasin, ettei hän
ollut senlaatuinen herrasmies, jonka parissa nuori tyttö on turvassa.
Tarkoitan, että kun eräänä iltana menin tapaamaan häntä hänen
asunnossaan, näin siellä tytön, joka todella oli kuuluisa kautta
kaupungin siitä, ettei hän ollut hieno. Kun siis huomasin, että moisia
tyttöjä vieraili herra Jenningsin luona, sain pahan histoorisen
kohtauksen ja aivoni olivat ihan tolkuttomat, ja kun siitä toinnuin,
kuulin, että mulla oli ollut revolveri kädessäni ja että olin sillä
revolverilla ampunut herra Jenningsin.

Ja tämä herrasmies laivalla oli todellakin se lakimies, joka oli


minua syyttämässä, ja lakituvassa hän oli tosiaan kovin ankara, ärjyi
ja nimitteli minua niin, etten siitä kehtaa päiväkirjaani kirjoittaakaan.
Sillä jokainen muu, paitsi tuo syyttäjä, esiintyi todella herttaisesti
minua kohtaan, ja kaikki valamiehistön herrat itkivät, kun minun
asianajajani osoitti minua ja sanoi heille, että heillä sentään kaikilla
oli äiti tai sisar. Sitten valamiehistö vain poistui kolmeksi minuutiksi ja
sitten se palasi ja vapautti minut, ja he olivat kaikki niin herttaisia,
että minun tosiaan täytyi suudella heitä kaikkia, ja suudellessani
tuomaria tuli hänelle vedet silmiin ja hän vei minut suoraa päätä
kotiinsa sisarensa luokse. Tarkoitan, että herra Jenningsin
ammuttuani pisti päähäni mennä eläviinkuviin, ja tuomari Hibbard
osti minulle matkalipun Hollywoodiin. Ja tuomari Hibbard minulle
tosiaan antoi nimenikin, kun hän ei pitänyt entisestä nimestäni, sillä
hän sanoi, että tytöllä piti olla nimi, joka tulkitsi hänen
henkilöllisyyttään, ja hän sanoi, että minulla tulisi olla nimenä Lorelei.
Sen niminen tyttö tuli kuuluisaksi siitä, että hän istui jollakin kalliolla
Saksassa. Olin siis Hollywoodissa filmitehtaassa siihen aikaan, kun
tapasin herra Eismanin, ja hän sanoi, että minun älylläni varustetun
tytön ei sopinut olla elävissäkuvissa, vaan pitäisi saada kasvatusta,
niin hän otti minut pois biiosta voidakseen minua kasvattaa.

Ja majuri Falconissa herätti tosiaan suurta harrastusta kaikki, mitä


juttelin, sillä hän sanoi, että tämä oli merkillinen yhteensattuma,
koska tuo lakimies, jonka nimi on herra Bartlett, puuhailee nyt
Amerikan hallituksen palveluksessa ja on matkalla Viini-nimiseen
paikkaan joissakin setä Samin asioissa, mikä on suuri salaisuus, ja
herra Falcon olisi kovin halukas tietämään, mikä se salaisuus on,
sillä Lontoon hallitus lähetti hänet vartavasten Amerikkaan ottamaan
siitä selon. Herra Bartlett vain ei tietenkään tiedä, kuka majuri Falcon
on, koska se on niin suuri salaisuus. Mutta majuri Falcon tohtii kertoa
sen minulle, koska hän tietää, keneen voi luottaa. Ja majuri Falcon
sanoo, että hänen mielestään minunlaiseni tytön tulisi antaa anteeksi
ja unohtaa, miksi herra Bartlett nimitteli minua. Hän haluaa
tutustuttaa meidät toisiimme ja hän sanoi luulevansa, että herra
Bartlett kertoisi minulle paljon asioita, kun hän todella oppii minut
tuntemaan ja jos minä annan hänelle anteeksi sen Little Rockissa
tapahtuneen välikohtauksen. Olisihan oikein romantillista, että herra
Bartlettista ja minusta tulisi ystävät, ja setä Samin hyväksi
työskentelevät herrasmiehet haluavat tulla romantillisiksi tyttöjen
kanssa. Sen vuoksi hän aikoo johdattaa meidät yhteen kannella
tänään päivällisen jälkeen, ja minä aion antaa hänelle anteeksi ja
jutella hänen kanssaan paljon, sillä suottahan on tytön kantaa
kaunaa herrasmiehelle, joka vain täytti velvollisuutensa. Ja majuri
Falcon toi minulle aika ison pullollisen hajuvettä ja aika näppärän
posliinisen mukailun isokokoisesta koirasta, joka on laivan pienessä
myymälässä. Tarkoitan, että majuri Falcon tosiaan tietää millä voi
tyttöä ilahduttaa, ja tänä iltana minä aion sopia kaikki herra Bartlettin
kanssa.

Huhtikuun 14 p:nä.

Niin, herra Bartlett ja minä sovimme kaikki viime iltana ja


päätimme tulla mitä parhaimmiksi ystäviksi ja jutella aika paljon. Kun
siis menin alas hyttiin hyvin myöhään, tuli majuri Falcon sinne
tiedustelemaan, aiommeko minä ja herra Bartlett todella tulla
ystäviksi, sillä hän sanoi, että tytöllä, jolla on minun aivoni, pitäisi olla
paljon juteltavaa herra Bartlettin kaltaisen älykkään herrasmiehen
kanssa, joka tuntee kaikki setä Samin salaisuudet.

Niin kerroin majuri Falconille, kuinka herra Bartlett ajattelee, että


hän ja minä olemme ikäänkuin näytelmässä, sillä kaiken aikaa, kun
hän minua Little Rockissa nimitteli, ajatteli hän todellakin, että minä
olin sellainen. Ja kun hän sitten havaitsi, etten minä
osoittautunutkaan sellaiseksi, sanoi hän aina luulleensa, että minä
vain käytin älyäni herrasmiehiä vastaan ja että minulla todella oli
aivan kylmä sydän. Mutta nyt hän ajattelee, että minun tulisi kirjoittaa
näytelmä siitä, miksi kaikeksi hän minua Little Rockissa nimitteli ja
kuinka meistä sitten seitsemän vuoden perästä tuli ystävät.

Sitten kerroin majuri Falconille sanoneeni herra Bartlettille, että


kylläkin haluaisin kirjoittaa sen näytelmän, mutta ettei minulla tosiaan
ollut siihen aikaa, koska kuluu varsin paljon aikaa päiväkirjani
kirjoittamiseen ja hyvien kirjojen lukemiseen. Mutta herra Bartlett ei
tiennyt, että minä luen kirjoja, mikä on omituinen yhteensattuma,
koska hänkin niitä lukee. Ja niin hän lupasi tänä iltapäivänä tuoda
minulle kirjan nimeltä "Hymyile herkeämättä", jota kaikki
Washingtonin älykkäät senaattorit lukevat ja joka on hyvin
elähdyttävä.

Sitten sanoin herra Falconille, että ystävyyssuhde herra Bartlettin


kanssa on tosiaan aivan hermostuttava, koska herra Bartlett ei juo
mitään ja hänen tanssimisestaan ei kannata puhuakaan. Mutta hän
pyysi minua päivälliselle pöytäänsä, joka ei ole Ritzissä, ja minä
sanoin, etten voinut tulla, mutta majuri Falcon sanoi, että minun olisi
pitänyt se tehdä, mutta minä sanoin majuri Falconille, että melkein
kaikella on rajansa. Niinpä minä jään hyttiin puoliseen asti ja sitten
menen Ritziin syömään puolista herra Mountginzin kanssa, joka
todella osaa kestittää tyttöjä.

Dorothy on ylhäällä kannella tuhlaten paljon aikaa herrasmiehen


kanssa, joka on vain tennisshampinjooni. Niinpä aionkin soittaa
hovimestaria ja tilata samppanjaa, joka tekee erikoisen hyvää
merimatkalla. Hovimestari on vallan hauska nuorukainen ja hänellä
on varsin surullinen elämäntarina ja hän kertoilee minulle mielellään
kaikista kokemuksistaan. Tarkoitan, että hänet kuulemma vangittiin
Flatbushissa, kun hän oli luvannut toimittaa eräälle herrasmiehelle
erinomaisen hyvää viskyä ja häntä senvuoksi erehdyttiin luulemaan
viinatrokariksi. Ja hänet pantiin kuulemma vankilaan ja samaan
koppiin kahden muun herrasmiehen kanssa, jotka olivat kovin, kovin
kuuluisia murtovarkaita. Tarkoitan, että heidän kuvansa tosiaan olivat
julkaistuina kaikissa sanomalehdissä ja jokainen puhui heistä. Niinpä
hovimestarini, jonka nimi on Fred, oli kovin, kovin ylpeä siitä, että sai
olla samassa kopissa niin kuuluisain murtovarkaitten kanssa. Ja kun
ne kysyivät häneltä, miksi hän siellä oli, ei hän kehdannut sanoa
olevansa vain pirtutrokari, vaan kertoi sytyttäneensä koko talon
palamaan ja polttaneensa ison perheen Oklahomassa. Ja kaikki
olisikin muutoin mennyt hyvin, mutta poliisit olivat asettaneet koppiin
diktafoonin ja käyttivät sitä todistuskappaleena häntä vastaan, eikä
hän voinut päästä pois, ennenkuin oli tutkittu kaikki Oklahomassa
sattuneet tulipalot. Ja minun mielestäni on aina paljoa
kasvattavampaa jutella Fredin kaltaisen pojan kanssa, joka on
kokenut paljon ja todella kärsinyt, kuin haastella sellaiselle
herrasmiehelle kuin herra Bartlett. Mutta minun täytyy keskustella
herra Bartlettin kanssa kaiken iltapäivää, koska majuri Falcon on
sopinut siitä, että viettäisin koko iltapäivän hänen parissaan.

Huhtikuun 15 p:nä.

Eilen illalla oli laivalla oikeat naamiaishuvit, jotka todella olivat


pelkkää hyväntekeväisyyttä, koska useimmilla merimiehillä kuuluu
olevan orpolapsia, jotka he jättivät lähtiessään ulapalle, kun meri on
kovin myrskyinen. Ja niin kannettiin iso kolehtikin, ja herra Bartlett
piti vallan pitkän puheen orpojen hyväksi, varsinkin sellaisten, joiden
vanhemmat ovat merimiehiä. Herra Bartlett haluaa tosiaan pitää
paljon puheita. Tarkoitan, että hän mielellään pitää puheita silloinkin,
kun hän on aivan yksinään tytön kanssa kannella kävelemässä.
Mutta ne naamiaishuvit olivat vallan kivaa, ja muuan herrasmies
näytti todella melkein herra Chaplinin jäljennökseltä. Dorothy ja minä
emme oikeastaan aikoneet mennä tähän baaliin, mutta herra Bartlett
osti meille kaksi nauhaketta laivan pienestä myymälästä, jotka me
sidoimme lanteillemme, ja jokainen sanoi, että me olimme vallan
siroja Carmen-tyyppejä. Ja herra Bartlett, majuri Falcon ja tennis-
shampinjooni olivat tuomareina. Ja Dorothy ja minä voitimme
palkinnot. Tarkoitan, että todella toivon, etten saisi useampia
isokokoisia posliinijäljennöksiä koirasta, koska minulla nyt jo on
kolme, enkä minä tosiaan käsitä, miksei kapteeni pyydä herra
Cartieria järjestämään laivalla jalokivimyymälää, koska ei
tosiaankaan ole suurta iloa mennä laivalla ostoksille herrasmiesten
kanssa, kun ei muuta osteta kuin jäljennöksiä koirista.

Ja kun olimme voittaneet palkinnot, oli minun määrä mennä


laivankannelle kävelemään herra Bartlettin kanssa, koska hän
kuuluu kovin mielellään katselevan kuutamoa. Ja minä pyysin häntä
menemään edeltäpäin minua odottamaan ja sanoin tulevani sinne
myöhemmin, koska olin luvannut tanssin herra Mountginzille. Niin
hän kysyi minulta, kuinka kauan minä vielä tanssisin, mutta minä
käskin hänen mennä sinne ylös odottamaan, sitten hän saisi nähdä.
Sitten herra Mountginz ja minä tanssimme oikein ihanan tanssin ja
joimme samppanjaa, kunnes majuri Falcon keksi meidät, sillä hän oli
etsinyt minua, ja sanoi etten minä tosiaan saisi pitää herra Bartlettia
odottamassa. Minä menin siis ylös kannelle, ja herra Bartlett odotteli
minua siellä ja hän näkyy tosiaan olevan minuun mielettömästi
rakastunut, koska hän ei ole saanut unta silmäänsä sen jälkeen, kun
meistä tuli ystävät. Sillä hän ei ollut luullut, että minulla tosiaan oli
älyä, mutta nyt kun hän sen tietää, kuuluu hän etsineen
minunlaistani tyttöä vuosikausia, ja hän sanoi minulle, että oikea
paikka minulle kotiin palattuani oli Washington, jossa hän asuu. Niin
minä mainitsin hänelle, että minun käsittääkseni sellainen oli melkein
aina kohtalon sormen jälki. Ja niin hän tahtoi, että huomenna
astuisin maihin Ranskassa ja tekisin saman matkan Viiniin kuin
hänkin, koska Viini kuuluu olevan Ranskassa. Ja jos jatkaa matkaa
Englantiin saakka, niin joutuu liian etäälle. Mutta minä sanoin
hänelle, etten sitä voinut, koska ajattelin, että jos hän todella oli
minuun sokeasti rakastunut, niin hän sensijaan matkustaisi
Lontooseen. Mutta hän sanoi minulle, että hänellä tosiaan oli hyvin
vakavia asioita Viinissä, mikä oli kovin, kovin suuri salaisuus. Mutta
minä sanoin hänelle, etten uskonut hänellä olevan asioita, vaan että
oikeastaan oli kysymys jostakin tytöstä, sillä mitkäpä asiat voivat niin
tärkeitä olla? Silloin hän sanoi, että ne olivat Washingtonissa istuvan
Yhdysvaltain hallituksen asioita, joita hän ei voinut kellekään
ilmaista. Sitten me katselimme kuutamoa melko paljon. Sitten minä
sanoin hänelle, että lähtisin kyllä Viiniin, jos todella tietäisin, että oli
kysymys asioista eikä jostakusta tytöstä, koska minä en voinut
käsittää, että asiat saattoivat olla niin tärkeitä. Niin hän kertoi minulle
kaikki. Setä Sam kuuluu haluavan joitakuita uusia ilmalaivoja, joita
jokainen muukin näkyy haluavan, varsinkin Englanti, mutta setä
Samilla on oikein ovela keino niitä saada, mikä on liian pitkä
päiväkirjaani pantavaksi. Niin me istuimme edelleen ja näimme
auringon nousevan ja minä ihan kangistuin ja sanoin hänelle, että
minun täytyy mennä hyttiini, koska laiva joka tapauksessa tänään
laskee maihin Ranskassa, ja minä sanoin, että jos minä lähden
laivasta Ranskassa matkustaakseni hänen kanssaan Viiniin, täytyy
minun sulloa tavaroitani.
Niin minä menin alas hyttiini ja panin maata. Sitten tuli Dorothy
sisälle, ja hän oli ollut kannella tennis-shampinjoonin kanssa, mutta
ei ollut huomannut auringonnousua, sillä hän ei tosiaan rakasta
luontoa, vaan aina tuhlaa aikaansa ja tärvelee vaatteensa, vaikka
minä aina sanon hänelle, ettei hänen tulisi juoda samppanjaa
pullonsuusta laivankannella, koska laivan kiikkuessa aina valuu
paljon ohi. Niinpä minä aion syödä puolista hytissäni ja lähettää
kirjelapun herra Bartlettille ilmoittaakseni hänelle, etten voi astua
maihin Ranskassa lähteäkseni hänen kanssaan Viiniin, kun minulla
on paha päänsärky, mutta tavannen hänet joskus jossakin muualla.
Ja kun majuri Falcon aikoo tulla tänne kello kahdeltatoista, niin minä
olen tullut ajatelleeksi, miksi kaikeksi herra Bartlett nimitteli minua
Little Rockissa, ja olen aivan kiihdyksissä. Tarkoitan, että herrasmies
ei koskaan kärsi tuollaisista asioista, mutta tyttö saa aina kärsiä.
Siksipä aionkin kertoa majuri Falconille koko ilmalaiva-asian, koska
hän todella haluaa tietää. Enkä minä loppujen lopuksi luule, että
herra Bartlett on herrasmies, kun hän minua niin pahoin nimitteli
Little Rockissa, olkoonpa siitä kulunutkin seitsemän vuotta.
Tarkoitan, että majuri Falcon on aina herrasmies, ja hän haluaa
todella tehdä paljon meidän hyväksemme Lontoossa, sillä hän
tuntee Walesin prinssin ja hän luulee, että Dorothy ja minä
pitäisimme Walesin prinssistä, kunhan kerran saisimme hänet todella
nähdä. Siis minä aion viipyä hytissäni, kunnes herra Bartlett
Ranskassa lähtee laivasta, sillä minä en tosiaankaan taida välittää
herra Bartlettia enää koskaan tavata.

Huomenna siis olemme Englannissa aikaisin ja reippaina, ja minä


tunnen tosiaan ihanaa väristystä, koska herra Eisman lähetti minulle
langattoman tänä aamuna, niinkuin hän tekee joka aamu, ja hän
kehoittaa minua käyttämään hyväkseni jokaista, kenet tapaamme,
koska matkustelu on korkein kasvatuksen muoto. Tarkoitan, että
herra Eisman on aina oikeassa, ja majuri Falcon tuntee kaikki
Lontoon nähtävyydet, niin että tosissaan näyttää siltä kuin Dorothylle
ja minulle tulisi Lontoossa oikein hauskaa.

LONTOO EI TODELLA OLE


MITÄÄN

Huhtikuun 17 p:nä

No niin, Dorothy ja minä olemme nyt todella Lontoossa. Tarkoitan,


että me saavuimme Lontooseen eilen junassa, kun laiva ei purjehdi
Lontooseen saakka, vaan pysähtyy rannalle, ja sitten on noustava
junaan. Tarkoitan, että New Yorkissa on kaikki paljoa paremmin, sillä
laiva tulee ihan New Yorkiin asti, ja minä alan ajatella, ettei Lontoo
sittenkään ole kovin kasvattava kaupunki. Mutta minä en kertonut
sitä herra Eismanille, kun sähkötin hänelle eilen illalla, sillä herra
Eisman lähetti minut oikeastaan Lontooseen kasvatettavaksi, ja
minusta olisi kiusallista kertoa hänelle, että Lontoo tuottaa
pettymyksen, kun me New Yorkissa olemme niin paljon pitemmällä.
Ja sitten Dorothy ja minä jouduimme Ritziin, ja se on herttaisen
täynnä ameriikkalaisia. Tarkoitan, että luulisi tosiaan olevansa New
Yorkissa, koska minun mielestäni aina on matkustelussa ihaninta se,
että aina tapaa ameriikkalaisia ja aina tuntee olevansa kotona.

Niinpä Dorothy ja minä eilen menimme Ritziin puoliselle ja näimme


oikein sievän ja vaaleaverisen tytön lähimmässä pöydässä, ja minä
nyhkäisin Dorothya pöydän alitse, kun minusta ei ole hienoa
nyhkäistä ketään pöydän yli, sillä minähän opetan Dorothylle hyviä
tapoja. Ja minä sanoin: "Tuo on aika veikeä pikku tyttö, niin että
hänen täytyy olla ameriikkalainen tyttö." Ja niin hän olikin. Hän kutsui
pääviinuria ihan ameriikkalaisella puhetavalla ja oli kovin vihainen ja
sanoi sille: "Minä olen käynyt tässä hotellissa jo kolmekymmentäviisi
vuotta ja tämä on ensi kerta, kun minun on täytynyt odottaa." Ja
minä tunsin hänen äänensä, sillä hän oli todellakin Fanny Ward.
Sitten minä pyysin häntä tulemaan meidän pöytäämme, ja kaikki
kolme olimme oikein riemuissamme, kun oli näin päästy yhteen. Sillä
minä ja Fanny olemme tunteneet toisemme jo viitisen vuotta, mutta
minusta tuntuu ikäänkuin tuntisin hänet paremminkin, koska äiti tunsi
hänet neljäkymmentäviisi vuotta sitten, kun hän ja äiti kävivät
yhdessä koulua, ja äiti on aina lukenut hänen kaikista häistään
kaikissa sanomalehdissä. Fanny asuu siis nyt Lontoossa ja on
kuuluisa yhtenä Lontoon veikeimmistä tytöistä. Tarkoitan, että Fanny
on melkein historjallinen, sillä kun tyttö pysyy veikeenä
viisikymmentä vuotta, alkaa hän todella tulla historjalliseksi. Jos siis
äiti ei olisi kuollut verisuonten kovettumiseen, niin hänellä ja Fannyllä
ja minulla olisi ollut vallan hauskaa Lontoossa, sillä Fanny käy
mielellään ostoksilla.

Sitten me menimme ostamaan hattuja, mutta sensijaan että


olisimme menneet naisten osastoon menimmekin lasten osastoon, ja
Fannyjä minä ostimme muutamia oikein veikeitä hattuja, koska
lastenhatut maksavat vain puolet ja Fanny aina ostelee niitä.
Tarkoitan, että Fanny tosiaan pitää hatuista, ja ostaessaan niitä
lasten osastosta joka viikko hän säästää tosiaan aika paljon rahaa.

Sitten palasimme Ritziin tavataksemme majuri Falconin, sillä


majuri Falcon kutsui meidät kanssaan teelle erään hienon naisen
luo, jonka nimi on lady Shelton. Ja majuri Falcon kutsui Fannyäkin
mukaamme teelle, mutta Fanny oli pahoillaan, koska hänen täytyi
mennä soittotunnilleen.

Ja siellä lady Sheltonin luona me tapasimme useita henkilöitä,


jotka näkyivät olevan englantilaisia. Tarkoitan, että jotkut Lontoon
tytöistä kuuluvat olevan ladyja, mikä näkyy olevan loordin
vastakohta. Ja jotkut, jotka eivät ole ladyja, ovat "kunnioitettavia".
Mutta jotkut taas eivät ole sitä eikä tätä, vaan ovat ihan niinkuin
mekin, niin että heitä voi nimittää vain neideiksi ja rouviksi. Mutta
lady Shelton oli ihan riemastunut, kun sai meidät ameriikkalaiset
vieraikseen. Tarkoitan, että hän vei Dorothyn ja minut peräsaliin ja
yritti myydä meille muutamia otsanauhoja. Semmoisia hän näkyy
tekevän ompelemalla joukon lasihelmiä nauhanpätkään, joka iltaisin
sidotaan pään ympäri. Niinpä minä kysyin häneltä, kuinka paljon ne
maksoivat, ja hän ilmoitti hinnaksi viisi puntaa. Silloin minä kysyin,
kuinka paljon se teki rahassa, ja se kuului olevan kaksikymmentäviisi
dollaria. Tarkoitan, että minulle tulee Lontoossa aika kiusa Dorothyn
vuoksi, sillä hän ei saisi sanoa, mitä hän sanoi englantilaisesta
ladystä. Tarkoitan, ettei hänen olisi sopinut sanoa lady Sheltonin
otsanauhojen olevan hänen mielestään todella hyödyllisiä jollekulle,
sillä jokaisen tytön, joka niistä maksaisi kaksikymmentäviisi dollaria,
pitäisi saada päänsä siteihin.
Sitten lady Shelton vei Dorothyn, majuri Falconin ja minut tätinsä
asuntoon, joka oli siinä likellä ensimmäisen kadunkulman takana.
Sillä hänen tätiään kuulutaan nimitettävän kreivittäreksi, ja hän
kasvattaa koiria. Ja hänen tädilläänkin oli vieraskutsut, ja hänen
tukkansa näytti ihan punaiselta, ja sellaiseksi vanhanpuoleiseksi
naiseksi hän oli kovin paljon maalattu. Ja ensimmäinen kysymys,
jonka hän meille teki, koski niitä hänen sisarentyttärensä
helminauhoja. Hän kysyi, olimmeko niitä ostaneet. Me vastasimme
hänelle siis kieltävästi. Mutta hän ei näkynyt käyttäytyvän niinkuin
hänenlaisensa vanhanpuoleisen kreivittären tulisi. Sillä hän sanoi:
"Siinä menettelitte ihan oikein, rakkaat ystävät, älkää salliko
sisarentyttäreni puijata teitä. Ne nauhat menevät muodista pois
ennenkuin viikkoakaan on kulunut." Sitten hän kysyi meiltä,
haluaisimmeko ostaa koiran. Enkä silloin voinut hillitä Dorothya,
ennenkuin hän ehti sanoa: "Kuinka pian ne koirat menevät
muodista?" Mutta minä en luule kreivittären menetelleen, niinkuin
kreivittären tulisi menetellä, sillä hän nauroi kovin, kovin äänekkäästi,
nimitti Dorothya ihan verrattomaksi, tarttui Dorothyyn ja suuteli häntä
ja piti kättään hänen vyötäisillään kaiken aikaa. Tarkoitan, että
kreivittären ei tulisi rohkaista Dorothya, muutoin hän on yhtä
hienostumaton kuin Dorothy näkyy olevan. Mutta minä sanoin
kreivittärelle, ettemme tarvinneet koiraa.

Sitten minä tapasin oikein ihastuttavan englantilaisen ladyn, jolla


oli hyvin, hyvin kaunis timanttidiadeemi käsilaukussaan, sillä hän
sanoi, että hän oli arvellut joitakuita ameriikkalaisia olevan
seurueessa, ja se olisi todella ollut hyvin, hyvin edullinen kauppa.
Tarkoitan, että timanttidiadeemi on minusta ihastuttava, kun en
todellakaan ennen ollut tullut ajatelleeksi timanttien käyttämistä
sellaisessa paikassa ja olin luullut, että minulla oli melkein yksi
kutakin koristelajia, kunnes sain nähdä timanttidiadeemin. Se
englantilainen rouva, jonka nimi on rouva Weeks, sanoi, että se oli
ollut hänen perheensä omaisuutena monet monituiset vuodet, mutta
timanteilla on se mainio ominaisuus, että ne aina näyttävät uusilta.
Ja minun alkoikin tehdä sitä kovin mieleni ja kysyin häneltä, mitä se
maksoi rahassa, ja sen hinta kuului olevan 7500 dollaria.

Sitten minä katselin ympärilleni huoneessa ja havaitsin


herrasmiehen, joka näytti oikein hienolta. Ja minä kysyin majuri
Falconilta, kuka hän oli, ja hän ilmoitti, että se oli sir Francis
Beekman, ja hän kuuluu olevan kovin, kovin varakas. Sitten minä
pyysin majuri Falconia esittelemään meidät toisillemme, ja kun se oli
tehty, pyysin minä sir Francis Beekmania pitämään hattuani sillä
välin, kun minä koetin timanttidiadeemia, sillä minä saatoin käyttää
sitä nauhassa takaraivolla, kun tukkani on bobattu, ja minä sanoin sir
Francis Beekmanille, että se minusta tosiaan näytti aika veikeeltä.
Niin se näytti hänestäkin, mutta hän sanoi, että häntä odotettiin
muualle. Ja sitten kreivitär tuli minun luokseni, ja hän on todella
hyvin sivistymätön, sillä hän sanoi minulle: "Älkää tuhlatko aikaanne
hänelle", ja selitti, että jos sir Francis Beekman rovonkaan tuhlaisi,
niin erään herra Nelson-nimisen herrasmiehen muistopatsas ottaisi
hatun päästään ja kumartaisi. Tarkoitan, että jotkut henkilöt ovat niin
epäsivistyneitä, että heillä näkyy olevan epäsivistyneitä ajatuksia
kaikesta.

Niin, minun sydämeni himoitsee todella sitä timanttidiadeemia, ja


ihan minä hermostuin, kun rouva Weeks sanoi menevänsä
hauskaan illatsuun eilen illalla, siellä kun olisi liuta ihastuttavia
ameriikkalaisia, jotka sen kyllä nappaisivat. Olin niin levoton, että
annoin hänelle sata dollaria, jotta hän säilyttäisi timanttidiadeemin
minun varalleni. Sillä mitäpä hyötyä on matkustelemisesta, jollei
käytä tilaisuuksia hyväkseen, ja onhan tosiaan kovin harvinaista, että
Welcome to our website – the ideal destination for book lovers and
knowledge seekers. With a mission to inspire endlessly, we offer a
vast collection of books, ranging from classic literary works to
specialized publications, self-development books, and children's
literature. Each book is a new journey of discovery, expanding
knowledge and enriching the soul of the reade

Our website is not just a platform for buying books, but a bridge
connecting readers to the timeless values of culture and wisdom. With
an elegant, user-friendly interface and an intelligent search system,
we are committed to providing a quick and convenient shopping
experience. Additionally, our special promotions and home delivery
services ensure that you save time and fully enjoy the joy of reading.

Let us accompany you on the journey of exploring knowledge and


personal growth!

textbookfull.com

You might also like