https://github.com/varnamproject/govarnam-rust
Rust bindings for govarnam.
https://github.com/varnamproject/govarnam-rust
govarnam rust transliteration
Last synced: 7 months ago
JSON representation
Rust bindings for govarnam.
- Host: GitHub
- URL: https://github.com/varnamproject/govarnam-rust
- Owner: varnamproject
- License: mpl-2.0
- Created: 2023-08-19T16:06:13.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2024-02-17T05:17:01.000Z (over 1 year ago)
- Last Synced: 2024-04-14T14:16:29.379Z (over 1 year ago)
- Topics: govarnam, rust, transliteration
- Language: Rust
- Homepage:
- Size: 21.5 KB
- Stars: 6
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# govarnam-rust
This Rust project provides an FFI wrapper to the govarnam shared library, enabling seamless integration and utilization of its language-related functionality within Rust applications.
## Installation
> note: This library assumes that the govarnam shared library is already installed and available on your system.
Add the library to your **Cargo.toml** file using the following command.
cargo add --git https://github.com/varnamproject/govarnam-rust
## Usage
An example usages of this library.
```rs
use govarnam::Varnam;fn main() {
let varnam = Varnam::init(
"schemes/ml/ml.vst",
"schemes/learnings/ml.vst.learnings",
)
.expect("Cannot initialize varnam");let results = varnam.transliterate("namaskkaaram");
for item in results {
println!(
"Word: {}, Weight: {}, Learned on: {}",
item.to_string(),
item.weight,
item.learned_on,
);
}
}
```## License
Licensed under the terms of the [Mozilla Public License Version 2.0](LICENSE.txt)