Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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 months ago
JSON representation
📜 A complete, documented API wrapper for querying and retrieving sentences from the Tatoeba corpus.
- Host: GitHub
- URL: https://github.com/vxern/tatoeba
- Owner: vxern
- Created: 2024-06-02T22:23:29.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2024-06-15T17:45:43.000Z (6 months ago)
- Last Synced: 2024-09-30T03:41:41.300Z (3 months ago)
- Topics: api, clean, corpus, documented, erlang, gleam, language, sentence, tatoeba, tested, translation, wrapper
- Language: Gleam
- Homepage: https://hex.pm/packages/tatoeba
- Size: 59.6 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
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/sentencepub 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 .