README
Moby Dick
The text of Moby Dick by Herman Melville.
Installation
npm install @stdlib/datasets-moby-dick
Usage
var text = require( '@stdlib/datasets-moby-dick' );
text()
Returns the text of Moby Dick.
var data = text();
// returns [{...},{...},...]
Each array
element has the following fields:
- chapter: chapter number or identifier.
- title: chapter title (if available; otherwise, empty).
- text: chapter text.
Examples
var text = require( '@stdlib/datasets-moby-dick' );
var data;
var i;
data = text();
for ( i = 0; i < data.length; i++ ) {
console.log( 'Character Count: %d', data[ i ].text.length );
}
CLI
Installation
To use the module as a general utility, install the module globally
npm install -g @stdlib/datasets-moby-dick
Usage
Usage: moby-dick [options]
Options:
-h, --help Print this message.
-V, --version Print the package version.
--format fmt Output format: 'txt' or 'ndjson'.
Notes
- The CLI supports two output formats: plain text (
txt
) and newline-delimited JSON (NDJSON). The default output format istxt
.
Examples
$ moby-dick
CONTENTS
ETYMOLOGY.
EXTRACTS (Supplied by a Sub-Sub-Librarian).
CHAPTER 1. Loomings.
...
License
The data files (databases) are licensed under an Open Data Commons Public Domain Dedication & License 1.0 and their contents are licensed under Creative Commons Zero v1.0 Universal. The software is licensed under Apache License, Version 2.0.
Notice
This package is part of stdlib, a standard library for JavaScript and Node.js, with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more.
For more information on the project, filing bug reports and feature requests, and guidance on how to develop stdlib, see the main project repository.
Community
Copyright
Copyright © 2016-2022. The Stdlib Authors.