| 1 |
#!/bin/sh |
| 2 |
########################################################################### |
| 3 |
## ## |
| 4 |
## Language Technologies Institute ## |
| 5 |
## Carnegie Mellon University ## |
| 6 |
## Copyright (c) 2008 ## |
| 7 |
## All Rights Reserved. ## |
| 8 |
## ## |
| 9 |
## Permission is hereby granted, free of charge, to use and distribute ## |
| 10 |
## this software and its documentation without restriction, including ## |
| 11 |
## without limitation the rights to use, copy, modify, merge, publish, ## |
| 12 |
## distribute, sublicense, and/or sell copies of this work, and to ## |
| 13 |
## permit persons to whom this work is furnished to do so, subject to ## |
| 14 |
## the following conditions: ## |
| 15 |
## 1. The code must retain the above copyright notice, this list of ## |
| 16 |
## conditions and the following disclaimer. ## |
| 17 |
## 2. Any modifications must be clearly marked as such. ## |
| 18 |
## 3. Original authors' names are not deleted. ## |
| 19 |
## 4. The authors' names are not used to endorse or promote products ## |
| 20 |
## derived from this software without specific prior written ## |
| 21 |
## permission. ## |
| 22 |
## ## |
| 23 |
## CARNEGIE MELLON UNIVERSITY AND THE CONTRIBUTORS TO THIS WORK ## |
| 24 |
## DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ## |
| 25 |
## ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT ## |
| 26 |
## SHALL CARNEGIE MELLON UNIVERSITY NOR THE CONTRIBUTORS BE LIABLE ## |
| 27 |
## FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES ## |
| 28 |
## WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN ## |
| 29 |
## AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ## |
| 30 |
## ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF ## |
| 31 |
## THIS SOFTWARE. ## |
| 32 |
## ## |
| 33 |
########################################################################### |
| 34 |
## ## |
| 35 |
## Make regexes into compiled form ## |
| 36 |
## ## |
| 37 |
########################################################################### |
| 38 |
|
| 39 |
COMPILE_REGEX=$1/compile_regexes |
| 40 |
|
| 41 |
echo "/* Autogenerated from make_us_regexes */" |
| 42 |
|
| 43 |
$COMPILE_REGEX ordinal_number "[0-9][0-9,]*\\(th\\|TH\\|st\\|ST\\|nd\\|ND\\|rd\\|RD\\)" |
| 44 |
$COMPILE_REGEX hasvowel ".*[aeiouAEIOU].*" |
| 45 |
$COMPILE_REGEX usmoney "\\\$[0-9,]+\\(\\.[0-9]+\\)?" |
| 46 |
$COMPILE_REGEX illion ".*illion" |
| 47 |
$COMPILE_REGEX romannums "\\(II?I?\\|IV\\|VI?I?I?\\|IX\\|X[VIX]*\\)" |
| 48 |
$COMPILE_REGEX drst "\\([dD][Rr]\\|[Ss][tT]\\)" |
| 49 |
$COMPILE_REGEX numess "[0-9]+s" |
| 50 |
$COMPILE_REGEX leadingzerodigits "0[0-9]+" |
| 51 |
$COMPILE_REGEX sevenphonenumber "[0-9][0-9][0-9]-[0-9][0-9][0-9][0-9]" |
| 52 |
$COMPILE_REGEX fourdigits "[0-9][0-9][0-9][0-9]" |
| 53 |
$COMPILE_REGEX threedigits "[0-9][0-9][0-9]" |
| 54 |
$COMPILE_REGEX numbertime "[0-9]?[0-9]:[0-5][0-9]" |
| 55 |
$COMPILE_REGEX numbertimexm "[0-9]?[0-9][:\\.][0-5][0-9][ap]m" |
| 56 |
$COMPILE_REGEX dottedabbrevs "\\([A-Za-z]\\.\\)+[A-Za-z]\\.?" |
| 57 |
$COMPILE_REGEX digitsslashdigits "[0-9]+/[0-9]+" |
| 58 |
$COMPILE_REGEX digits2dash "\\([0-9]+-+\\)+[0-9]+" |
| 59 |
$COMPILE_REGEX wandm "[0-9,]*[0-9]+\\(lb\\|LB\\|lbs\\|LBS\\|ft\\|FT\\|kg\\|km\\|oz\\|hz\\|Hz\\|HZ\\|KHz\\|MHz\\|GHz\\|cm\\|mm\\|ml\\|KB\\|MB\\|GB\\|TB\\)" |
| 60 |
|
| 61 |
|
| 62 |
|
| 63 |
exit 0 |
| 64 |
|