panther99 / cyrla Goto Github PK
View Code? Open in Web Editor NEWLibrary for two-way conversion between latin and cyrillic script written in Rust
Home Page: https://crates.io/crates/cyrla
License: MIT License
Library for two-way conversion between latin and cyrillic script written in Rust
Home Page: https://crates.io/crates/cyrla
License: MIT License
Currently, there is an issue when trying to convert text which includes punctuation signs and ignored words. For example:
#[test]
fn it_does_not_convert_ignored_latin_words() {
let mut builder = ConverterBuilder::new();
let mut ignored_words = vec!["C#", "C++", "R", "Python"];
let converter = builder
.add_ignored_latin_words(&mut ignored_words)
.build();
let cyrillic_text = converter.lat_to_cyr("Jezici koji se koriste na projektu su C#, C++, R i Python.");
assert_eq!("Језици који се користе на пројекту су C#, C++, R и Python.", cyrillic_text);
}
This will fail.
---- tests::it_does_not_convert_ignored_latin_words stdout ----
thread 'tests::it_does_not_convert_ignored_latin_words' panicked at 'assertion failed: `(left == right)`
left: `"Језици који се користе на пројекту су C#, C++, R и Python."`,
right: `"Језици који се користе на пројекту су Ц#, Ц++, R и Пyтхон."`', src/lib.rs:139:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
It's because text is being split by spaces and converter picks up punctuation signs along with the letters.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.