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.
http://localhost:8080
/
Returns a welcome message (plain text)
Response
Welcome to the Finnish Companion Blazingly Fast API Engine ⚡
Example
curl -s http://localhost:8080/
/conjugate/verb/{word}
Retrieve full Finnish verb paradigms (finite forms, infinitives, participles) for a lemma. Case-insensitive.
Parameters
word
requiredpath parameterVerb 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
/conjugate/noun/{word}
Returns all nominal cases (singular/plural), possessives, and comparison (for adjectives).
Parameters
word
requiredpath parameterLemma (noun/adjective/adverb)
Example Request
curl -s http://localhost:8080/conjugate/noun/talo | jq .
/meanings/{word}
Lightweight meanings lookup with POS and gloss lines.
Parameters
word
requiredpath parameterLemma to look up
Example Request
curl -s http://localhost:8080/meanings/talo | jq .
/reverse/{inflectedForm}
Given an inflected surface form, return possible base forms + POS + declension class + tags.
Parameters
inflectedForm
requiredpath parameterObserved 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}
)