Re: tsearch2 dictionary for statute cites

From: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: <pgsql-general(at)postgresql(dot)org>
Subject: Re: tsearch2 dictionary for statute cites
Date: 2009-04-06 23:04:30
Message-ID: 49DA442E.EE98.0025.0@wicourts.gov
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> regexp substitution

I found a way to at least keep the cite in one piece. Perhaps I can
do the rest in custom dictionaries, which are more pluggable.

select ts_debug
('State Statute <cite value="SS9.125.07(4A)(3)"> pertaining to');
ts_debug
--------------------------------------------------------------------------------
(asciiword,"Word, all
ASCII",State,{english_stem},english_stem,{state})
(blank,"Space symbols"," ",{},,)
(asciiword,"Word, all
ASCII",Statute,{english_stem},english_stem,{statut})
(blank,"Space symbols"," ",{},,)
(tag,"XML tag","<cite value=""SS9.125.07(4A)(3)"">",{},,)
(blank,"Space symbols"," ",{},,)
(asciiword,"Word, all
ASCII",pertaining,{english_stem},english_stem,{pertain})
(blank,"Space symbols"," ",{},,)
(asciiword,"Word, all ASCII",to,{english_stem},english_stem,{})
(9 rows)

-Kevin

In response to

Browse pgsql-general by date

  From Date Subject
Next Message David Kerr 2009-04-06 23:32:02 Querying Large Objects
Previous Message Greg Smith 2009-04-06 23:03:24 Re: user defined aggregate for percentile calculations