Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/hexium310/kanatrans


https://github.com/hexium310/kanatrans

Last synced: 3 months ago
JSON representation

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(" ")')"
```