a very naive epigone and consumer of books
Fork me on GitHub

EPYGONE API

/api/rand

Returns json.

Example response:


{
  "len": 1,
  "source": "pl-szulc-sklepy.txt",
  "data": {
    "raw": "Nasłuchiwał i słyszał.",
    "html": "<span class='res-magenta'>Nasłuchiwał</span>
             <span class='res-grey'> i</span>
             <span class='res-grey'> słyszał</span>
             <span class='res-grey'>.</span>",
    "stats": [
      0.0,
      1,
      0
    ]
  }
}

/api/[book]/[num]

Returns num senteneces generetad based upon a given book. Book is matched against a startswith() string method, so the actual url can be shortened e.g api/pl-szu/4.

/api/books

Returns a list of available texts, e.g api/books.