Improving FTS for Greek - Mailing list pgsql-hackers

From Florents Tselai
Subject Improving FTS for Greek
Date
Msg-id 9E76CD3A-646A-460D-A4D2-8A56E99DD4D8@gmail.com
Whole thread Raw
Responses Re: Improving FTS for Greek
List pgsql-hackers
I posted earlier in pgsql-general, that I realised there’s no greek.stop under $(pg_config —sharedir)/tsearch_data

And indeed looks like stop words are maintained with to_tsvector(‘greek’, ..). 

I wrote an extension https://github.com/Florents-Tselai/pg_fts_greek that adds another ‘greek_ext’ regconfig 

Here’s how the results compare


tto_tsvector('greek', t)to_tsvector('greek_ext', t)
'το τετράγωνο της υποτείνουσας ενός ορθογωνίου τριγώνου''εν':5 'ορθογων':6 'τ':3 'τετραγων':2 'το':1 'τριγων':7 'υποτεινουσ':4'εν':5 'ορθογων':6 'τετραγων':2 'τριγων':7 'υποτεινουσ':4
'ο γιώργος είναι πονηρός''γιωργ':2 'εινα':3 'ο':1 'πονηρ':4'γιωργ':2 'πονηρ':4
'ο ήλιος ο πράσινος o ήλιος που ανατέλλει''o':5 'ανατελλ':8 'ηλι':2,6 'ο':1,3 'π':7 'πρασιν':4'ανατελλ':8 'ηλι':2,6 'πρασιν':4

There’s another previous relevant patch [0] but was never merged. I’ve included these stop words and added some more (info in README.md).

For my personal projects looks like it yields much better results.

I’d like some feedback on the extension ; particularly on the installation infra (I’m not sure I’ve handled properly the permissions in the .sql files) 

I’ll then try to make a .patch for this. 



pgsql-hackers by date:

Previous
From: Aleksander Alekseev
Date:
Subject: Re: Should "REGRESS_OPTS = --temp-config" be working for 3rd party extensions?
Next
From: Tom Lane
Date:
Subject: Re: [BUG] pg_dump does not properly deal with BEGIN ATOMIC function