1
0
Fork
You've already forked conlang-api
0
A minimal conlang api written in Typescript with Hono
  • TypeScript 100%
2025年10月07日 19:19:28 -03:00
src refactor: move rewrite to generateWords 2025年10月07日 15:35:03 -03:00
test feat: add frequen and groups 2025年10月07日 15:33:48 -03:00
.gitignore chore: remove request.json 2025年08月09日 14:45:00 -03:00
bun.lock Add the basics, with only CV structure 2025年07月21日 13:14:57 -03:00
LICENSE chore: change license to GPL3 2025年08月09日 14:49:40 -03:00
package.json chore: change script to dev instead of start:dev 2025年07月28日 03:00:05 -03:00
README.md docs: fix url on README 2025年10月07日 19:19:28 -03:00
tsconfig.json feat(tsconfig): add some excludes 2025年07月28日 02:56:06 -03:00

Why?

This is api for conlangs (Construct Languages), Good words generators are rarely then I made my own. I am extending this to be more than generate words.

Warning

this is still in development

How to build

only two dependencies in this API: Bun and Hono

  1. clone the repo
git clone https://github.com/devEducaua/lexicongenerator.git
  1. install the dependencies
bun install
  1. compile
bun run build
  1. run the api
bun run start

How to use

runs in the port :8080, all endpoints prefixed with /api/

/generate

this endpoint generate a list of words based on the informations that you send, send a POST method request. here an example body:

{
 "groups": {
 "C": [ "p", "t", "k", "l", "m", "n", "s" ],
 "V": [ "a", "i", "u" ],
 "F": [ "m", "n" ]
 }, 
 "numberWords": 30,
 "maxLength": 4,
 "minLength": 1,
 "exclusions": [ "ti" ],
 "structs": "CVF",
 "rewrites": {}
}

/frequen

this endpoint discover what is the most common phonemes on a text. send a POST method request, example body:

{
 "phonemes": [ "o", "a", "e" ],
 "text": "The quick brown fox jumps over the lazy dog"
}