#german #translation #cargo #word #translates #meddlfrängisch

meddl_translate

Translate German to Meddlfrängisch

19 releases (3 stable)

1.2.1 Jan 14, 2024
1.2.0 Mar 15, 2023
1.0.1 Dec 5, 2022
1.0.0 Nov 30, 2022
0.2.1 Jul 25, 2021

#2 in #german

Download history 9/week @ 2024-01-08 2/week @ 2024-02-19 16/week @ 2024-02-26 8/week @ 2024-03-11 211/week @ 2024-04-01

219 downloads per month

MIT license

17KB
355 lines

meddl_translate

Translates German to Meddlfrängisch. If you don't know what that is, this is not for you.

Example:

fn main() {
  println!("{}", meddl_translate::translate("Hallo"));
}

There's also other examples available:

$ cargo run --example hello
$ cargo run --example long-text

Exceptions

It's possible to exclude words that should not be translated, e. g. "den" by adding it to the "ignored" array in the translation file:

"ignored": [
  "den"
]

To see it in action, run:

$ cargo run --example ignored

Translations file

A dictionary can be found in the src directory.


lib.rs:

Translate German to (almost) perfect Meddlfrängisch.

Usage

fn main() {
    println!("{}", meddl_translate::translate("Hallo"));
}

Examples

$ cargo run --example hello
$ cargo run --example long-text

Excluding words from being translated

"ignored": [
    "den"
]

Example containing an ignored word:

$ cargo run --example ignored

Benchmark

$ cargo bench

You need to use Rust nightly for running the benchmark.

Dependencies

~2.7–4MB
~75K SLoC