Page 1 of 1
Partial Proximity query
Posted: Wed Apr 03, 2002 4:40 pm
by kzinda
How would I write a query in which I want to find sentences that include all three terms: word1 number1 word2, where number1 and word2 have a proximity relationship to each, and neither number1 and word2 have a proximity relationship with word1 other than they all are in the same sentence?
Partial Proximity query
Posted: Wed Apr 03, 2002 5:00 pm
by Kai
If number1 and word2 are to be required to be adjacent and in that order, make them a phrase:
word1 "number1 word2" w/sent
Otherwise:
word1 number1 word2 w/sent
Use LIKEP to rank hits with these words closer together as higher. Note that you may have to use <apicp alwithin on> and <apicp alpostproc on> to enable the within operator (requires post-processing, which is slower).
Partial Proximity query
Posted: Wed Apr 03, 2002 5:09 pm
by kzinda
I don't have the flexibility to change any of the api's because I am working with the final application. Is there a way to nest REX operations if word2 and number1 have some non-adjacent proximity?
Partial Proximity query
Posted: Wed Apr 03, 2002 6:02 pm
by mark
Presumably you have alwithin and post proc on already to be able to do w/ and rex. You might try:
word1 />>number1=!word2{1,10}word2 w/sent
It could be somewhat slower than desired if word1 occurs a lot though.