Crate facet_singularize

Crate facet_singularize 

Source
Expand description

Fast, no-regex English singularization.

This crate provides functions to convert plural English words to their singular form, without using regex. It’s designed for use in deserialization where performance matters.

§Example

use facet_singularize::singularize;

assert_eq!(singularize("dependencies"), "dependency");
assert_eq!(singularize("items"), "item");
assert_eq!(singularize("children"), "child");
assert_eq!(singularize("boxes"), "box");

§Performance

This crate uses simple string operations (suffix matching, table lookups) instead of regex, making it suitable for hot paths like deserialization.

Functions§

is_singular_of
Check if a singular word could be the singular form of a plural word.
singularize
Convert a plural English word to its singular form.