Re: regex queries

2005-12-28 Thread Erik Hatcher
the prefix but java.util.regex for the actual matching in order to have the best of both worlds. I may have over-engineered it a bit, though I'm not sure. I'm in the process of documenting beyond just the unit tests, and likely will also document how to use regex queries along wit

regex queries

2005-12-28 Thread Erik Hatcher
g in order to have the best of both worlds. I may have over-engineered it a bit, though I'm not sure. I'm in the process of documenting beyond just the unit tests, and likely will also document how to use regex queries along with term rotation in order to really minimize term r

Re: Test code for regex queries

2005-12-04 Thread Erik Hatcher
Following up on the (Span)RegexQuery topic, I've started working on moving this code to contrib/regex so that it can leverage various regex implementations. I'm making a generic interface that currently (though subject to change) has these methods: void compile(String pattern); boolean

Re: Test code for regex queries

2005-11-26 Thread Paul Elschot
On Friday 25 November 2005 11:14, Erik Hatcher wrote: > > On 24 Nov 2005, at 20:26, Erik Hatcher wrote: > >> There are some older regex implementations in java, but I > >> have no idea about the licences and the availabiility. > >> Doesn't apache have one somewhere? > > > > Two actually! ORO and

Re: Test code for regex queries

2005-11-25 Thread Erik Hatcher
On 24 Nov 2005, at 20:26, Erik Hatcher wrote: There are some older regex implementations in java, but I have no idea about the licences and the availabiility. Doesn't apache have one somewhere? Two actually! ORO and Regexp. Here's ORO - jakarta.apache.org/oro/> (link to Regexp from there)

Re: Test code for regex queries

2005-11-24 Thread Erik Hatcher
On 24 Nov 2005, at 11:57, Paul Elschot wrote: Capturing groups and special contexts need normal brackets (). Maybe we have a terminology mismatch. I call these (parentheses) and these [brackets]. Capturing groups are used for replacements, and I don't see a use for that in a query langua

Re: Test code for regex queries

2005-11-24 Thread Paul Elschot
> enumeration a calculation of of the maximum non-regex piece is > needed, including a calculation on whether the head and tail combined > make a larger prefix. For example, using '$' to denote the end of > the string, the rotated version of this should be: > > T

Re: Test code for regex queries

2005-11-24 Thread Erik Hatcher
f this should be: Total$ThisContainsTwo[abc]RegexPieces.* With a regex parse tree, it should be possible to be wise about what is a static prefix and to compute the size of all the static pieces allowing for clever rotation to make regex queries as efficient as possible. Now where is

Re: Test code for regex queries

2005-11-24 Thread Paul Elschot
On Thursday 24 November 2005 00:06, Erik Hatcher wrote: > > On 23 Nov 2005, at 15:42, Paul Elschot wrote: > > I refactored it to have a few more tests, and all seems to work well. > > It also includes the tests from TestSpanRegexQuery.java . > > ... > > > To parse a regex query term, the surround

Re: Test code for regex queries

2005-11-23 Thread Erik Hatcher
On 23 Nov 2005, at 15:42, Paul Elschot wrote: I refactored it to have a few more tests, and all seems to work well. It also includes the tests from TestSpanRegexQuery.java . Two questions: Can I assume the APL2 on Test{,Span}RegexQuery.java? If so, I'll post the refactored version with it. Y

Test code for regex queries

2005-11-23 Thread Paul Elschot
Dear readers, I'd like to add regex queries to the surround parser, so I had a look at the test code for the regex queries. I refactored it to have a few more tests, and all seems to work well. It also includes the tests from TestSpanRegexQuery.java . Two questions: Can I assume the AP