Under construction

Gutex

Text excerpt API for Project Gutenberg eBooks

Word of reference

A word of reference (wor) is expressed as a string where Work id represents the body of work identifier and Sentence index and Word index both start at zero:

[Work id][Sentence index][word index]

Such that the 3rd word of the 734th sentence of A Tale of Two Cities is encoded like this:

98.733.2

And the 5th word of the 50th sentence in The Turn of the Screw:

209.49.4

Excerpt

An Excerpt is expressed as an inclusive range between a pair of wors. The single Work id is followed by both pairs of Sentence index and Word index:

[Work id][Sentence index][Word index].[Sentence index][Word index]

Such that the excerpt in The Turn of the Screw that starts with the 5th word of the 50th sentence and extending through to the 7th word of the 150th sentence is indicated like so:

209.49.4.149.6

Wor and Excerpt retrieval

Wor retrieval

To access a single wor, request it directly from the server: https://gutex.online/98/733/2

Excerpt retrieval

To access a range in between and inclusive of two wors: https://gutex.online/209/49/3/149/6

Results format

The default encoding format for Gutex results is JSON, i.e., specifying no format is the equivalent of requesting JSON-encoded results:

https://gutex.online/209/23/4/100/2?format=json

To receive plain, UTF-8 encoded text, specify utf8 as the format:

https://gutex.online/98/733/2/736/6?format=utf8

© 2023 Gamiri