Repository navigation
The first release of the Rust port of the Python inflection library 0.5.1, as the crate shapeshift-inflection (renamed from inflection-rs, which is taken on crates.io by another project).
Match rate: 4,736 of 4,736 calls recorded from the Python original answer the same in the port: 736 from its test suite (with the module's uncountable word list recorded on each call) and 4,000 random. The same 736 suite calls without the recorded list match 734 of 736; the two that differ come from a test that changes the global list, as the README explains. One known gap is open: #1, ordinal and ordinalize reject strings with non-ASCII decimal digits.
Install. The crate is shapeshift-inflection. Until it is on crates.io, add it from this tag:
cargo add shapeshift-inflection --git https://github.com/Pushkal-Gupta/shapeshift-inflection --tag v0.1.0use shapeshift_inflection::pluralize;
assert_eq!(pluralize("octopus"), "octopi");The packaged crate (cargo package) is attached. SHA-256 of shapeshift-inflection-0.1.0.crate: 3718998bd8bd1cb5d1d4b4cb584d8d0f0514bfdd24c9abc1b0e45a2882e0d2ad
The port's page: https://shapeshift.pgremlin.com/ports/inflection