Pluralize Bug?

Hi Clare,

If you are doing this so that you can search for both pluralized and
non-pluralized versions of a term then you'd be better off using
Ferret's StemFilter. Otherwise, I'll leave the answer to this up to
the rails people.

Cheers,
Dave

Why not set your query to return results on the singular OR the plural
form? Also you can add new inflection rules in the environment.rb
file. Don't forget to restart the server if you make edits to that
file.

Hi Brian,

That's what using the StemFilter in Ferret will do. Plus it will
search for other forms of the word. For example, "burn" will also
match "burns", "burned" and "burning".

Cheers,
Dave

glass is considered uncountable unless you mean eye glasses or drinking glasses

you don’t need to uncomment the rest because they are already loaded by default. they are there as examples.

StemFilter may be overkill unless Clare wants to search for all forms of a word.

Robert Head <rails-mailing-list@...> writes:

Clare wrote:
> inflect.plural /^(ox)$/i, '\1en'
> inflect.singular /^(ox)en/i, '\1'
>

I don't recommend these. You'll get box / boxen, which is mildly
amusing to dorks like us, but probably not what you intended.

Well, it would if there wasn't a ^ at the start of that regular expression. In
any case you don't get a choice because it's one of the default rules which is
already loaded, as mentioned above