KnowledgeCaptureAndDiscovery / OBA

Ontology based APIs
Apache License 2.0
38 stars 12 forks source link

Proper pluralization for paths #179

Closed cweedall closed 6 months ago

cweedall commented 6 months ago

The existing pluralization is basically a rubber stamp method of adding s onto the word. I noticed this pluralizes words which have a different pluralization requirement, such as University, incorrectly (e.g. Universitys). It also supports other less-common pluralization, such as sex/sexes, ox/oxen, etc.

This can be corrected manually after OpenAPI generation for small ontologies. But it is unwieldy for larger ones.

Upon investigating tools that we could use to pluralize, I was shocked that Java does not support this well compared to many other programming/scripting languages. I could only find ones that handle English, and there were only a few tools available (some have not been updated for many years). Because it was currently only adding s, and I assume it was English-centric for this purpose(?), I settled with JiBX tools. JiBX tools was updated as recently as late 2022.

dgarijo commented 6 months ago

This one is awesome, we never had enough time to look around and include it.