Closed ocean90 closed 8 months ago
As I've mentioned on #1372, I think we should have different rules per part_of_speech
, nouns, verbs, etc.
Most of the above errors are fixed in #1373, especially if verbs are inserted in the infinitive or nouns are inserted in singular.
Wrong examples above:
'Customizing|Customizings|Customizinges|Customizinged|Customizinging'
'recommended|recommendeds|recommendedes|recommendeded|recommendeding'
The problem here is that the verbs aren't in the infinitive form, requiring some effort to predict, that isn't currently coded, not even in the #1373.
If both are on infinitive and set as verbs, the result is:
customiz ( e | ed | ing )
custom ( ize | ization )
recommend ( s | ed | ing )
I have set up a glossary with these words with the https://github.com/GlotPress/GlotPress/pull/1373 PR:
The number of matches is much smaller, and with the approach I commented here, we can reduce it even further.
As I've mentioned in https://github.com/GlotPress/GlotPress/issues/1384#issuecomment-1770932902 and above in https://github.com/GlotPress/GlotPress/issues/1386#issuecomment-1191547643, I think one of the premises and best practice of the Glossary usage is adding nouns in singular, and verbs in the infinitive. Adding nouns in plurals and verbs in any other verbal form introduces unnecessary logic to the suffix matching.
Looking at some examples generated by
gp_sort_glossary_entries_terms()
and in non of them the suffixes
makes sense. Should we drop it from the default list?https://github.com/GlotPress/GlotPress-WP/blob/3304c4e0244e412c29c1b4f2d8a9e7b0f205bc73/gp-templates/helper-functions.php#L114-L116
The examples: