Re: tsearch2 dictionary for statute cites - Mailing list pgsql-general

From Kevin Grittner
Subject Re: tsearch2 dictionary for statute cites
Date
Msg-id 49DA365D.EE98.0025.0@wicourts.gov
Whole thread Raw
In response to Re: tsearch2 dictionary for statute cites  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Perhaps you could pass the texts and the queries through a regexp
> substitution that converts digit-dot-digit to digit-dash-digit?

This doesn't seem to get me anywhere.  For cite '9.125.07(4A)(3)'
I got this:

select ts_debug('9-125-07-4A-3');
                            ts_debug
----------------------------------------------------------------
 (uint,"Unsigned integer",9,{simple},simple,{9})
 (int,"Signed integer",-125,{simple},simple,{-125})
 (int,"Signed integer",-07,{simple},simple,{-07})
 (int,"Signed integer",-4,{simple},simple,{-4})
 (asciiword,"Word, all ASCII",A,{english_stem},english_stem,{})
 (int,"Signed integer",-3,{simple},simple,{-3})
(6 rows)

Would there be a reasonable generalized way to pick something like
this out of a body of text using dictionaries and treat it as a
statute cite?

-Kevin

pgsql-general by date:

Previous
From: Thomas Kellerer
Date:
Subject: Re: INSERT or UPDATE
Next
From: "Gauthier, Dave"
Date:
Subject: coalesce a null to a char ?