Page 1 of 2

word definition

Posted: Mon Nov 22, 2004 4:31 pm
by KMandalia
Is the following correct word definition for a number in the format:

xxxx-xxxx-x

\digit{4}-=\digit{4}-=\digit{1} (Source: Webinator manual example for SSN)

Also for numbers in format [+/-](one or more digits).(one or more digits)% is the following rex correct:

[+\-]?\space?>>[0-9]+\.?[0-9]*?%

I also need the rex word expression for money in the format similar to the following if someone can help:

(+/-)($)x,xx,xxx,xxxx.xx

word definition

Posted: Mon Nov 22, 2004 4:56 pm
by mark
First example ok.

? means zero or one occurance. And multiple repitition operators should not be adjacent as you have (*?). I would suggest not indexing the leading + and -. You'd have to use extra syntax to search for them.

>>[0-9]+\.=[0-9]+%

[\digit,]+\.=\digit{2}

word definition

Posted: Mon Nov 22, 2004 5:06 pm
by KMandalia
I tried searching by the first one but it didn't return any results (no html comment errors BTW)

I didn't got the second part. What do you mean by extra syntax? I just used the example for scientific numbers and since there may or may not be a '%', so I put '?'. So using the rex expression you provided, people won't be able to search for -3.14%?

In the third part, I will need to have the capability for +/- and a $ sign so should I modify your expression as,

[+\-]\$[\digit,]+\.=\digit{2}

word definition

Posted: Mon Nov 22, 2004 5:54 pm
by mark
They could search for 3.14% . If the % is optional the expression would be >>[0-9]+\.=[0-9]+%? But if it's optional they should just enter 3.14 and don't bother indexing %. To search for -3.14% (assuming you indexed it) you would have to enter =-3.14% or (-3.14%). See http://thunderstone.master.com/texis/ma ... 417d824113

[+\-]=\$?[\digit,]+\.=\digit{2}

word definition

Posted: Tue Nov 23, 2004 9:37 am
by KMandalia
\digit{4}-=\digit{4}-=\digit{1}

for numbers in format

xxxx-xxxx-x

is not working

is there any other way to form this particular word expression?

word definition

Posted: Tue Nov 23, 2004 9:41 am
by KMandalia
try searching for 3211-8037-9 below:

http://search.creditunions.com/scripts/ ... ch?pr=pubs

then try searching for 877-233-4766 and on the second listing you will notice the number 3211-8037-9 which tells me that webinator is indexing it but I may have to change the word expression...

also if I want to search for short forms like a.t.l.c.e which I am sure are indexed, the webinator is not returning any results. What changes are needed to be made in the search script?

any help?

word definition

Posted: Tue Nov 23, 2004 11:33 am
by mark
What are all of your word expressions? Using the default expressions there's no real need to add anything to find hyphenated numbers. Numbers are indexed and hyphens just bind the words or numbers together into a phrase.

Doing a test here adding that expression works fine. When you saved the settings with the new word expressions did you get a gray box on top saying it was running "reindex"? Did the reindex finish? Check the bottom of the walk status report for reindex start and finish messages.

word definition

Posted: Tue Nov 23, 2004 12:01 pm
by KMandalia
OK, here is what I have:

These two are already available:

[\alnum\x80-\xff]{1,70}
[\alnum\x80-\xff.]{1,70}>>[.&']=[\alnum\x80-\xff.]{1,70}

This one for looking up phone numbers:
1?\space?(?\digit\digit\digit?)?[\-\space]?\digit{3}-=\digit{4}

This one for looking up 5 and 9 digit zip codes

\digit{5}-=\digit{4}

This one for looking up numbers in format xxxx-xxxx-x

\digit{4}-=\digit{4}-=\digit{1}

This one for percentages like (-)xxx.xx%

>>[0-9]+\.?[0-9]*

This one for looking up currency

[+\-]=\$?[\digit,]+\.=\digit{2}

I will take out the zip code and xxxx-xxxx-x. But, I would still like you to look into why it is not searching short forms like a.t.c.l.e etc...

word definition

Posted: Tue Nov 23, 2004 12:48 pm
by mark
a.t.c.l.e search should work if you add expresion that allows arbitrary .'s in terms. One possibility would be [\alnum.]{1,70}

word definition

Posted: Tue Nov 23, 2004 1:49 pm
by mark
Finally realized the problem. You're trying to search for literal hyphens with hyphenphrase on (the default). You need to add to your script
<sql "set hyphenphrase=0"></sql>
in the fpar function. Then you have to include expressions with the hyphens to match them.
[\alnum\-]{1,70}