slayyyyer/morphex ? reverse-engineered prompt
Reverse engineered prompt
Build me a Java 17 library that pluralizes English nouns in a deterministic way.
I want it to handle regular plurals, common irregulars, compounds like mother in law, and weird casing like CHILD to CHILDREN or UFO to UFOs. It should be thread safe, have immutable per instance settings, and not depend on any runtime services or model downloads. Please include a simple builder for things like classical mode, case handling, overrides, and custom initialisms.
I also want a second API that explains the result, so I can ask why a word was pluralized a certain way and whether it came from a lexical entry, a rule, a compound, or a fallback. If a word is unsupported or the count is one, it should behave sensibly and leave the input alone when appropriate.
Use the committed data in the repo if it exists, keep the implementation clean and testable, and make sure the examples in the README work. If you need current docs for Java or Maven behavior, look them up online.
Are you gonna build this?
make sure you review the code using coderabbit