word definition

KMandalia
Posts: 301
Joined: Fri Jul 09, 2004 3:50 pm

word definition

Post 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
User avatar
mark
Site Admin
Posts: 5519
Joined: Tue Apr 25, 2000 6:56 pm

word definition

Post 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}
KMandalia
Posts: 301
Joined: Fri Jul 09, 2004 3:50 pm

word definition

Post 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}
User avatar
mark
Site Admin
Posts: 5519
Joined: Tue Apr 25, 2000 6:56 pm

word definition

Post 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}
KMandalia
Posts: 301
Joined: Fri Jul 09, 2004 3:50 pm

word definition

Post 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?
KMandalia
Posts: 301
Joined: Fri Jul 09, 2004 3:50 pm

word definition

Post 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?
User avatar
mark
Site Admin
Posts: 5519
Joined: Tue Apr 25, 2000 6:56 pm

word definition

Post 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.
KMandalia
Posts: 301
Joined: Fri Jul 09, 2004 3:50 pm

word definition

Post 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...
User avatar
mark
Site Admin
Posts: 5519
Joined: Tue Apr 25, 2000 6:56 pm

word definition

Post 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}
User avatar
mark
Site Admin
Posts: 5519
Joined: Tue Apr 25, 2000 6:56 pm

word definition

Post 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}
Post Reply