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 22:05:33
Message-ID: 49DA365D.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:
> 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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Raymond O'Donnell 2009-04-06 22:27:15 Re: coalesce a null to a char ?
Previous Message Thomas Kellerer 2009-04-06 22:02:29 Re: INSERT or UPDATE