Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hexium310/kanatrans
https://github.com/hexium310/kanatrans
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/hexium310/kanatrans
- Owner: hexium310
- License: mit
- Created: 2024-06-06T22:25:07.000Z (7 months ago)
- Default Branch: master
- Last Pushed: 2024-09-13T20:59:19.000Z (4 months ago)
- Last Synced: 2024-09-14T11:57:39.392Z (4 months ago)
- Language: Rust
- Size: 271 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Kanatrans
This is a web application that converts an English word to Katakana.
## Dependency
- [flite](https://github.com/festvox/flite)
If the `vendored` Cargo feature is enabled, it compiles and statically links to a copy of flite.
## Usage
```sh
# Get ARPAbet list
$ curl -s localhost:8080/arpabet/kanatrans
{"word":"kanatrans","pronunciation":["k","ae1","n","ax0","t","r","ax0","n","z"]}# Get Katakana: as a query parameter, pass space-separated ARPAbet to `pronunciation`
# The parameter `word` is optional; if it's set the given `word` will be responded as it is
$ curl -s localhost:8080/katakana --get --data-urlencode pronunciation="k ae1 n ax0 t r ax0 n z"
{"word":null,"pronunciation":"カナトランズ"}# Oneliner
$ curl -s localhost:8080/katakana --get --data-urlencode pronunciation="$(curl -s localhost:8080/arpabet/kanatrans | jq -r '.pronunciation | join(" ")')"
```