Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/vxern/tatoeba

📜 A complete, documented API wrapper for querying and retrieving sentences from the Tatoeba corpus.
https://github.com/vxern/tatoeba

api clean corpus documented erlang gleam language sentence tatoeba tested translation wrapper

Last synced: 2 days ago
JSON representation

📜 A complete, documented API wrapper for querying and retrieving sentences from the Tatoeba corpus.

Awesome Lists containing this project

README

        

# tatoeba

## A complete, documented API wrapper for the Tatoeba corpus, built in Gleam.

[![Package Version](https://img.shields.io/hexpm/v/tatoeba)](https://hex.pm/packages/tatoeba)
[![Hex Docs](https://img.shields.io/badge/hex-docs-ffaff3)](https://hexdocs.pm/tatoeba/)

```sh
gleam add tatoeba
```

To get a sentence, use `sentence.get(id: )`, passing a sentence ID obtained from `sentence.new_id(id: )`:

```gleam
import gleam/io
import tatoeba/sentence

pub fn main() {
let assert Ok(id) = sentence.new_id(12_212_258)
let assert Ok(Some(sentence)) = sentence.get(id)

io.println(sentence.text) // "This work is free of charge."
}
```

Further documentation can be found at .