Closed (fixed)
Project:
Porter Algorithm Search Stemmer
Version:
6.x-2.x-dev
Component:
User interface
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
28 Jun 2010 at 21:10 UTC
Updated:
14 Jul 2010 at 14:30 UTC
Comments
Comment #1
jhodgdonCan you explain in a few words what the purpose of the module is? Porter Stemmer doesn't need a user interface, as it uses a pre-defined algorithm. So all you can do really is turn it on or off, which you do by enabling/disabling the module.
Comment #2
schildi commentedOf course the algorithm itself is not effected, but
Thanks for your question
Comment #3
jhodgdonHmmm...
Being able to check the results of stemming on the fly -- sounds like material for a completely separate module, as it's independent of whether you are using stemming or some other kind of preprocessing.
What do you mean by "stop words" resulting in a "bloated index"?
Comment #4
schildi commentedIn every language you have a number of words which don't need to be indexed because they do not really contribute a certain amount of information.
In the above sentence these stop words might be:
in every you have a of which "don't" to be because they do not really certain
That means, most words can be wiped out before indexing the sentence. Remaining word are then:
language number words need indexed contribute amount information
This will reduce the resulting index about 50-60 percent and results in quicker responses.
By the way: It IS a module, but what I want to know is whether to set it up as a own module or - when developers of other stemmers signal me that there is no need for these functionalities - to deliver it together with the existing "de_stemmer" only.
Comment #5
jhodgdonI see. It seems to me that stop words are not related to stemming. Stemming makes words match linguistically-related words, and what you are talking about is eliminating things like "the", "that", etc. in English (I think).
So I think that should be a separate module, since it is a separate function. There actually might already be a module that does this on drupal.org, so I would do a comprehensive search before creating a new module.
Good luck with your project!
Comment #6
jhodgdonBUT... be careful about stop words actually! The core Drupal Search module uses the search index when it does a search for a phrase. So if you elmiinate stop words, you have to make sure that phrases still work correctly. See:
http://drupal.org/node/1202#comment-40156
Anyway, I think we can mark this issue "fixed" now? Please feel free to re-open if you have more questions related to Porter Stemmer.
Comment #7
schildi commentedIt seems to me that stop words are not related to stemming. Stemming makes words match linguistically-related words
Not really. There is no one to one relation between linguistic stems and the results of a stemming process according to a porter algorithm. The latter only aims to reduce words to a distinct form.
Phrases: Currently all Drupal stemmers are implementing hook_search_preprocess. Text to be indexed as well as search phrases undergo the same procedure and so there should be no issue.
I just verified this by searching for a phrase Schloss in Bensberg which contains the stop word "in". I got hits for the original phrase like Schloss in Bensberg as well as for Schloss Bensberg.
From my point of view using stop words is a procedure bound tight to indexing. For technical reasons (stop words could be changed by the stemming algorithm) they should be handled before stemming applies. So it looks logical to implement it as part of the stemmer in hook_search_preprocess.
Regards
Close issue
Comment #8
jhodgdonSearching by phrase: You need to put the phrase in quotes, like "Schloss in Bensberg", to tell Drupal to search for the phrase, and you should only get nodes that have that exact phrase in them.
I agree, stop words should be applied before stemming, but I don't agree that it should be part of the same module as stemming. It should be a separate module with its own hook_search_preprocess.