You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Derek Bodin <bo...@uwec.edu> on 2002/12/07 20:42:50 UTC
[betwixt] problem with the plural stemmer
Has anyone noticed a bug in the Default Plural Stemmer? If I have
methods addPerson(Person p) and getPersonList(), the Stemmer first
checks for methods starting with person and ending in 's', then 'es' and
finally 'ies' if the property ended in y. Once it fails those three
tests it gets the keys from the hash map passed in and iterates through
them looking for the best fit. BUT, in the method
findGetCollectionDescriptor in XMLIntrospecterHelp, it hashes the
property name, in my case 'person', to the root Descriptor, so in the
Stemmer it first finds that pair, which is not the Element Descriptor
needed. Thus causing betwixt not to be able to add "People" to the
context. So I guess the problem does not lie with the Stemmer, but in
the values that are added before the map is sent to the stemmer. If
anyone knows why these values are there, or have any other insight could
you please let me know? Thanks
Derek Bodin
P.S. I changed the code so it first looks for the property name ending
with "List" and it works fine.
Re: [betwixt] problem with the plural stemmer
Posted by robert burrell donkin <ro...@blueyonder.co.uk>.
hi derek
this proved quite difficult to unravel: but i think i've done it now. the
version in cvs shouldn't exhibit this bug.
note that the xml output produced by betwixt has been changed by fixing
this bug. it's now once more producing (what i consider to be) more
correct xml. so, some people might need to check that everything still
works after they upgrade.
- robert
On Saturday, December 7, 2002, at 07:42 PM, Derek Bodin wrote:
> Has anyone noticed a bug in the Default Plural Stemmer? If I have
> methods addPerson(Person p) and getPersonList(), the Stemmer first
> checks for methods starting with person and ending in 's', then 'es' and
> finally 'ies' if the property ended in y. Once it fails those three
> tests it gets the keys from the hash map passed in and iterates through
> them looking for the best fit. BUT, in the method
> findGetCollectionDescriptor in XMLIntrospecterHelp, it hashes the
> property name, in my case 'person', to the root Descriptor, so in the
> Stemmer it first finds that pair, which is not the Element Descriptor
> needed. Thus causing betwixt not to be able to add "People" to the
> context. So I guess the problem does not lie with the Stemmer, but in
> the values that are added before the map is sent to the stemmer. If
> anyone knows why these values are there, or have any other insight could
> you please let me know? Thanks
>
> Derek Bodin
>
> P.S. I changed the code so it first looks for the property name ending
> with "List" and it works fine.
Re: [betwixt] problem with the plural stemmer
Posted by robert burrell donkin <ro...@blueyonder.co.uk>.
hi Derek
(i'm not really that much of an expert on the plural stemmer stuff but
maybe i can give you some help.)
1. i think that this is probably a bug but i don't think that it can be
fixed just by removing that key. i now have a test case and will look into
creating a fix.
2. betwixt uses interfaces for flexibility. though you've very welcome to
create a modified version of DefaultPluralStemmer, you'll probably find it
easier to maintain if you extend it.
- robert
On Saturday, December 7, 2002, at 07:42 PM, Derek Bodin wrote:
> Has anyone noticed a bug in the Default Plural Stemmer? If I have
> methods addPerson(Person p) and getPersonList(), the Stemmer first
> checks for methods starting with person and ending in 's', then 'es' and
> finally 'ies' if the property ended in y. Once it fails those three
> tests it gets the keys from the hash map passed in and iterates through
> them looking for the best fit. BUT, in the method
> findGetCollectionDescriptor in XMLIntrospecterHelp, it hashes the
> property name, in my case 'person', to the root Descriptor, so in the
> Stemmer it first finds that pair, which is not the Element Descriptor
> needed. Thus causing betwixt not to be able to add "People" to the
> context. So I guess the problem does not lie with the Stemmer, but in
> the values that are added before the map is sent to the stemmer. If
> anyone knows why these values are there, or have any other insight could
> you please let me know? Thanks
>
> Derek Bodin
>
> P.S. I changed the code so it first looks for the property name ending
> with "List" and it works fine.