Skip to content

aeternas/SwadeshNess

Repository files navigation

Build Status

Branch Status
Master Build Status
Development Build Status

Build Status

SwadeshNess

Backend for Swadesh-like lists creation. More information about Swadesh lists on Wikipedia

Powered by «Яндекс.Переводчик» so you need to acquire an API key and setup envirnoment variable:

export YANDEX_API_KEY=<your key>

Example queries:

$ curl "https://vpered.su/v1/?translate=Hello+World&group=Romanic" | jq .

{
  "results": [
    {
      "name": "Romanic",
      "results": [
        {
          "name": "Latin",
          "translation": "Salve Mundi"
        },
        {
          "name": "French",
          "translation": "Bonjour Tout Le Monde"
        },
        {
          "name": "Spanish",
          "translation": "Hola Mundo"
        },
        {
          "name": "Italian",
          "translation": "Ciao Mondo"
        },
        {
          "name": "Romanian",
          "translation": "Salut Lume"
        },
        {
          "name": "Portugal",
          "translation": "Olá Mundo"
        }
      ]
    }
  ]
}

or process several language groups simultaneously:

$ curl "https://vpered.su/v1/?translate=Hello+World&group=Romanic&group=Turkic" | jq .

{
  "results": [
    {
      "name": "Romanic",
      "results": [
        {
          "name": "Latin",
          "translation": "Salve Mundi"
        },
        {
          "name": "French",
          "translation": "Bonjour Tout Le Monde"
        },
        {
          "name": "Spanish",
          "translation": "Hola Mundo"
        },
        {
          "name": "Italian",
          "translation": "Ciao Mondo"
        },
        {
          "name": "Romanian",
          "translation": "Salut Lume"
        },
        {
          "name": "Portugal",
          "translation": "Olá Mundo"
        }
      ]
    },
    {
      "name": "Turkic",
      "results": [
        {
          "name": "Tatar",
          "translation": "Сәлам Мир"
        },
        {
          "name": "Bashkort",
          "translation": "Сәләм Донъяға"
        },
        {
          "name": "Azerbaijanian",
          "translation": "Salam Dünya"
        },
        {
          "name": "Turkish",
          "translation": "Merhaba Dünya"
        }
      ]
    }
  ]
}

Full list of languages group could be retrieved on /groups endpoint

Releases

No releases published

Packages

No packages published