On Sat, 26 Jan 2008, Sushant Sinha wrote:
I want to remove stop words but do not want to stem the words. Is there an interface in tsearch2 that allows me to do this? Basically I am trying to implement spelling corrections and do not want to correct stop words.
Create custom dictionary using simple (or just add stop words to simple) and use it before english stemmer, which has NO stop words ! =# insert into pg_ts_dict (SELECT 'remove_stopwords', dict_init, 'contrib/english.stop', dict_lexize, 'simple dictionary with stop words' FROM pg_ts_dict WHERE dict_name = 'simple'); insert into pg_ts_dict (SELECT 'en_stem_no_stopwords', dict_init, '', dict_lexize, 'english stemmer without stop words' FROM pg_ts_dict WHERE dict_name = 'en_stem');
Thanks, -Sushant. ---------------------------(end of broadcast)--------------------------- TIP 2: Don't 'kill -9' the postmaster
Regards, Oleg _____________________________________________________________ Oleg Bartunov, Research Scientist, Head of AstroNet (www.astronet.ru), Sternberg Astronomical Institute, Moscow University, Russia Internet: oleg@xxxxxxxxxx, http://www.sai.msu.su/~megera/ phone: +007(495)939-16-83, +007(495)939-23-83 ---------------------------(end of broadcast)--------------------------- TIP 1: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to majordomo@xxxxxxxxxxxxxx so that your message can get through to the mailing list cleanly