Engine API Documentation

High-performance C++ backend with blazing-fast response times

Drogon framework • In-memory Cap'n Proto datasets • No authentication required

Blazingly Fast API Engine ⚡

Built with Drogon (C++17) for maximum performance. All datasets are loaded in-memory using Cap'n Proto for instant lookups and conjugations.

Base URL
http://localhost:8080
GET

/

Returns a welcome message (plain text)

Response

Welcome to the Finnish Companion Blazingly Fast API Engine ⚡

Example

curl -s http://localhost:8080/
GET

/conjugate/verb/{word}

Retrieve full Finnish verb paradigms (finite forms, infinitives, participles) for a lemma. Case-insensitive.

Parameters

wordrequiredpath parameter

Verb lemma (any case)

Example Request

curl -s http://localhost:8080/conjugate/verb/olla | jq .

Notes

  • Returns 200 with {"count":0} if not found
  • When BENCHMARK_MODE==0, includes "queryTime" in the payload
GET

/conjugate/noun/{word}

Returns all nominal cases (singular/plural), possessives, and comparison (for adjectives).

Parameters

wordrequiredpath parameter

Lemma (noun/adjective/adverb)

Example Request

curl -s http://localhost:8080/conjugate/noun/talo | jq .
GET

/meanings/{word}

Lightweight meanings lookup with POS and gloss lines.

Parameters

wordrequiredpath parameter

Lemma to look up

Example Request

curl -s http://localhost:8080/meanings/talo | jq .
GET

/reverse/{inflectedForm}

Given an inflected surface form, return possible base forms + POS + declension class + tags.

Parameters

inflectedFormrequiredpath parameter

Observed form (e.g., taloissa)

Example Request

curl -s http://localhost:8080/reverse/taloissa | jq .

Notes

  • Replaces any earlier /rc/{...} route names

Root Handler Implementation

Example C++ implementation using Drogon framework:

.registerHandler(
    "/",
    [](const HttpRequestPtr&, std::function<void(const HttpResponsePtr&)>&& cb) {
      auto resp = HttpResponse::newHttpResponse();
      resp->setStatusCode(k200OK);
      resp->setContentTypeCode(CT_TEXT_PLAIN);
      resp->setBody("Welcome to the Finnish Companion Blazingly Fast API Engine ⚡");
      cb(resp);
    },
    {Get}
  )