Skip to content

devEducaua/conlang-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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"
}

About

A lexicon generator API made with Hono

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published