Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Texts from the HTDL corpus that is not in the public domain are not available for download, which limits its usefulness for research. However,  a great deal of fruitful research, especially in the form of text mining, can be performed on the basis of non-consumptive reading using extracted features (features extracted from the text) even when the full text is not available. To this end, the HathiTrust Research Center (HTRC) has started making available a set of page-level features extracted from the HTDL's public domain volumes. These extracted features can be the basis for certain kinds of  algorithmic analysis. For example, topic modeling works with bags of words (sets of tokens). Since tokens and their frequencies are provided as features, the EF dataset can enable a user to perform topic modeling with the data.

Worksets and the Extracted Features (EF) Dataset

 

Currently, the extracted features dataset is being provided in connection with worksets. (If you are not familiar with HathiTrust worksets, you may want to review the tutorial available elsewhere in this Wiki regarding the HTRC Workset Builder.)

The EF dataset for any HTRC workset can be retrieved as follows. A user first creates a workset (or choose an existing workset) from the HTRC Portal. The EF datasets for the workset are transferred via rsync, a robust file synchronization/transfer utility. The user executes the EF rsync script generator algorithm (available as one of the algorithms provided at the HTRC Portal) with that workset. This produces a script that the user can then download and execute on his/her own machine. When executed on the user’s machine, the script transfers the EF data files for that workset from the HTRC’s server to the user’s hard disk, resulting, for each volume in the selected workset, in two zipped files containing “basic” and “advanced” EF data. The EF data is in JSON (JavaScript Object Notation) format — a commonly used lightweight data interchange format.

Content of an EF Dataset

 

An EF data file for a volume consists of volume-level metadata, and of the extracted feature data for each page in the volume, in JSON format.  The volume-level metadata consists of both metadata about the volume and metadata about the extracted features.

Metadata about the volume consists of the following pieces of data:

...

1.schemaVersion: A version identifier for the format and structure of this metadata object.

...

Metadata about the extracted features consists of the following pieces of data:

 

1.schemaVersion: A version identifier for the format and structure of the feature data.
2.dateCreated: The time the batch of metadata was processed and recorded.
3.pageCount: The number of pages in the volume.
4.pages: An array of JSON objects, each representing a page of the volume. 

“Extracted features” data:

...

The extracted features that HTRC currently provides include part-of-speech (POS) -tagged token counts, header and footer identification, and various line-level information. (Providing token information at the page level makes it possible to separate paratext from text — e.g. identify pages of publishers’ ads at the back of a book.)  Each page is broken up into three parts: header, body, and footer. Correction of hyphenation of tokens at end of lines has been carried out, but not any additional data cleaning or OCR correction. 

“Basic” features

...

1.seq: A sequence number (pertaining to the page’s position)

...

The corresponding fields for header, body, and footer are the same, but apply to different parts of the page:

1.tokenCount: Number of tokens in this page section.

...

5.tokenPosCount: An unordered list of all tokens (characterized by part of speech using OpenNLP), and their corresponding frequency counts, in this page section. 

“Advanced” features

This information is provided to help clarify genre and volume structure; for instance, it can help distinguish poetry from prose, or body text from an index.

 

1.seq: A sequence number (same as in “basic” features)

...

A simplified EF data file for basic features, with metadata and features for a single page:

...

{  "id":"loc.ark:/13960/t1fj34w02",

...