pretty_grammar

Crates.iopretty_grammar
lib.rspretty_grammar
version0.1.3
sourcesrc
created_at2019-03-07 06:23:24.495598
updated_at2019-03-07 11:30:22.516776
descriptionA library that supports simple grammar correction of dynamic strings.
homepage
repositoryhttps://github.com/kerryeon/pretty-grammar
max_upload_size
id119279
size15,643
Ho Kim (kerryeon)

documentation

https://docs.rs/pretty_grammar

README

PrettyGrammar

Version A library that supports simple grammar correction of dynamic strings.

Installation

[dependencies]
pretty_grammar = "0.1"

Usage

use pretty_grammar::translate;
use pretty_grammar::format_dyn;

fn main() {
    let source  = "{name}<은> {obj}<를> 좋아합니다.";
    let target = translate!(source with
        lang: "kr",  // Required
        name: "철수",
        obj: "영희"
    );
    println!("{}", target);
    // 철수는 영희를 좋아합니다.
}

Supported Languages

Target Language Code Supported
Korean kr Yes
English en Not Yet

Documentation

Docs.rs

License

Distributed under MIT License since 2019.

Commit count: 6

cargo fmt