Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hokim98/pretty-grammar
A library that supports simple grammar correction of dynamic strings.
https://github.com/hokim98/pretty-grammar
Last synced: about 8 hours ago
JSON representation
A library that supports simple grammar correction of dynamic strings.
- Host: GitHub
- URL: https://github.com/hokim98/pretty-grammar
- Owner: HoKim98
- License: mit
- Created: 2019-03-07T06:08:17.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-03-07T11:29:51.000Z (over 5 years ago)
- Last Synced: 2024-10-31T12:01:58.734Z (16 days ago)
- Language: Rust
- Size: 8.79 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# PrettyGrammar
[![Version](https://docs.rs/pretty_grammar/badge.svg)](https://crates.io/crates/pretty_grammar)
A library that supports simple grammar correction of dynamic strings.# Installation
```toml
[dependencies]
pretty_grammar = "0.1"
```# Usage
```rust
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](https://docs.rs/pretty_grammar)# License
Distributed under MIT License since 2019.