Spaces:
Running on Zero
Running on Zero
Deploy ZONOS3 Mini ZeroGPU integration v0.1.0 (part 2)
Browse filesThis view is limited to 50 files because it contains too many changes. See raw diff
- vendor/zonos3/vendor/nemo_text_processing/text_normalization/en/data/whitelist/tts.tsv +3890 -0
- vendor/zonos3/vendor/nemo_text_processing/text_normalization/en/graph_utils.py +337 -0
- vendor/zonos3/vendor/nemo_text_processing/text_normalization/en/taggers/__init__.py +13 -0
- vendor/zonos3/vendor/nemo_text_processing/text_normalization/en/taggers/abbreviation.py +51 -0
- vendor/zonos3/vendor/nemo_text_processing/text_normalization/en/taggers/cardinal.py +151 -0
- vendor/zonos3/vendor/nemo_text_processing/text_normalization/en/taggers/date.py +386 -0
- vendor/zonos3/vendor/nemo_text_processing/text_normalization/en/taggers/decimal.py +130 -0
- vendor/zonos3/vendor/nemo_text_processing/text_normalization/en/taggers/electronic.py +179 -0
- vendor/zonos3/vendor/nemo_text_processing/text_normalization/en/taggers/fraction.py +56 -0
- vendor/zonos3/vendor/nemo_text_processing/text_normalization/en/taggers/measure.py +332 -0
- vendor/zonos3/vendor/nemo_text_processing/text_normalization/en/taggers/money.py +199 -0
- vendor/zonos3/vendor/nemo_text_processing/text_normalization/en/taggers/ordinal.py +62 -0
- vendor/zonos3/vendor/nemo_text_processing/text_normalization/en/taggers/punctuation.py +66 -0
- vendor/zonos3/vendor/nemo_text_processing/text_normalization/en/taggers/range.py +128 -0
- vendor/zonos3/vendor/nemo_text_processing/text_normalization/en/taggers/roman.py +115 -0
- vendor/zonos3/vendor/nemo_text_processing/text_normalization/en/taggers/serial.py +143 -0
- vendor/zonos3/vendor/nemo_text_processing/text_normalization/en/taggers/telephone.py +134 -0
- vendor/zonos3/vendor/nemo_text_processing/text_normalization/en/taggers/time.py +133 -0
- vendor/zonos3/vendor/nemo_text_processing/text_normalization/en/taggers/tokenize_and_classify.py +241 -0
- vendor/zonos3/vendor/nemo_text_processing/text_normalization/en/taggers/tokenize_and_classify_lm.py +227 -0
- vendor/zonos3/vendor/nemo_text_processing/text_normalization/en/taggers/tokenize_and_classify_with_audio.py +229 -0
- vendor/zonos3/vendor/nemo_text_processing/text_normalization/en/taggers/whitelist.py +153 -0
- vendor/zonos3/vendor/nemo_text_processing/text_normalization/en/taggers/word.py +91 -0
- vendor/zonos3/vendor/nemo_text_processing/text_normalization/en/utils.py +60 -0
- vendor/zonos3/vendor/nemo_text_processing/text_normalization/en/verbalizers/__init__.py +13 -0
- vendor/zonos3/vendor/nemo_text_processing/text_normalization/en/verbalizers/abbreviation.py +36 -0
- vendor/zonos3/vendor/nemo_text_processing/text_normalization/en/verbalizers/cardinal.py +48 -0
- vendor/zonos3/vendor/nemo_text_processing/text_normalization/en/verbalizers/date.py +107 -0
- vendor/zonos3/vendor/nemo_text_processing/text_normalization/en/verbalizers/decimal.py +85 -0
- vendor/zonos3/vendor/nemo_text_processing/text_normalization/en/verbalizers/electronic.py +122 -0
- vendor/zonos3/vendor/nemo_text_processing/text_normalization/en/verbalizers/fraction.py +89 -0
- vendor/zonos3/vendor/nemo_text_processing/text_normalization/en/verbalizers/measure.py +122 -0
- vendor/zonos3/vendor/nemo_text_processing/text_normalization/en/verbalizers/money.py +85 -0
- vendor/zonos3/vendor/nemo_text_processing/text_normalization/en/verbalizers/ordinal.py +57 -0
- vendor/zonos3/vendor/nemo_text_processing/text_normalization/en/verbalizers/post_processing.py +182 -0
- vendor/zonos3/vendor/nemo_text_processing/text_normalization/en/verbalizers/roman.py +69 -0
- vendor/zonos3/vendor/nemo_text_processing/text_normalization/en/verbalizers/telephone.py +64 -0
- vendor/zonos3/vendor/nemo_text_processing/text_normalization/en/verbalizers/time.py +103 -0
- vendor/zonos3/vendor/nemo_text_processing/text_normalization/en/verbalizers/verbalize.py +82 -0
- vendor/zonos3/vendor/nemo_text_processing/text_normalization/en/verbalizers/verbalize_final.py +75 -0
- vendor/zonos3/vendor/nemo_text_processing/text_normalization/en/verbalizers/whitelist.py +40 -0
- vendor/zonos3/vendor/nemo_text_processing/text_normalization/en/verbalizers/word.py +36 -0
- vendor/zonos3/vendor/nemo_text_processing/text_normalization/es/README.md +22 -0
- vendor/zonos3/vendor/nemo_text_processing/text_normalization/es/__init__.py +15 -0
- vendor/zonos3/vendor/nemo_text_processing/text_normalization/es/data/__init__.py +13 -0
- vendor/zonos3/vendor/nemo_text_processing/text_normalization/es/data/dates/__init__.py +13 -0
- vendor/zonos3/vendor/nemo_text_processing/text_normalization/es/data/dates/days_abbr.tsv +27 -0
- vendor/zonos3/vendor/nemo_text_processing/text_normalization/es/data/dates/months.tsv +12 -0
- vendor/zonos3/vendor/nemo_text_processing/text_normalization/es/data/dates/months_abbr.tsv +44 -0
- vendor/zonos3/vendor/nemo_text_processing/text_normalization/es/data/dates/year_suffix.tsv +51 -0
vendor/zonos3/vendor/nemo_text_processing/text_normalization/en/data/whitelist/tts.tsv
ADDED
|
@@ -0,0 +1,3890 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Ph.D. PHD
|
| 2 |
+
Hon. honorable
|
| 3 |
+
Mt. Mount
|
| 4 |
+
Maj. Major
|
| 5 |
+
Rev. Reverend
|
| 6 |
+
w/o without
|
| 7 |
+
a/c number account number
|
| 8 |
+
c/o care of
|
| 9 |
+
Gov. governor
|
| 10 |
+
vs. versus
|
| 11 |
+
vs versus
|
| 12 |
+
dept. department
|
| 13 |
+
prof. professor
|
| 14 |
+
est. estimated
|
| 15 |
+
vol volume
|
| 16 |
+
vol. volume
|
| 17 |
+
bldg. building
|
| 18 |
+
Bldg. Building
|
| 19 |
+
apt. apartment
|
| 20 |
+
Apt. Apartment
|
| 21 |
+
World War I World War one
|
| 22 |
+
World War II World War two
|
| 23 |
+
etc. etcetera.
|
| 24 |
+
SnO2 tin four oxide
|
| 25 |
+
dept department
|
| 26 |
+
HVAC H-vac
|
| 27 |
+
SPDR spider
|
| 28 |
+
ZIP zip
|
| 29 |
+
~ approximately
|
| 30 |
+
κ kappa
|
| 31 |
+
ω omega
|
| 32 |
+
α alpha
|
| 33 |
+
ν nu
|
| 34 |
+
δ delta
|
| 35 |
+
Δ delta
|
| 36 |
+
Α alpha
|
| 37 |
+
β beta
|
| 38 |
+
Β beta
|
| 39 |
+
χ chi
|
| 40 |
+
Χ chi
|
| 41 |
+
ε epsilon
|
| 42 |
+
Ε epsilon
|
| 43 |
+
φ phi
|
| 44 |
+
Φ phi
|
| 45 |
+
γ gamma
|
| 46 |
+
Γ gamma
|
| 47 |
+
η eta
|
| 48 |
+
Η eta
|
| 49 |
+
ι iota
|
| 50 |
+
Ι iota
|
| 51 |
+
κ kappa
|
| 52 |
+
Κ kappa
|
| 53 |
+
λ lambda
|
| 54 |
+
Λ lambda
|
| 55 |
+
μ mu
|
| 56 |
+
Μ mu
|
| 57 |
+
ν nu
|
| 58 |
+
Ν nu
|
| 59 |
+
ο omicron
|
| 60 |
+
Ο omicron
|
| 61 |
+
π pi
|
| 62 |
+
Π pi
|
| 63 |
+
θ theta
|
| 64 |
+
Θ theta
|
| 65 |
+
ρ rho
|
| 66 |
+
Ρ rho
|
| 67 |
+
σ sigma
|
| 68 |
+
Σ sigma
|
| 69 |
+
τ tau
|
| 70 |
+
Τ tau
|
| 71 |
+
υ upsilon
|
| 72 |
+
Υ upsilon
|
| 73 |
+
ω omega
|
| 74 |
+
Ω omega
|
| 75 |
+
ξ xi
|
| 76 |
+
Ξ xi
|
| 77 |
+
ψ psi
|
| 78 |
+
Ψ psi
|
| 79 |
+
ζ zeta
|
| 80 |
+
Ζ zeta
|
| 81 |
+
ltd limited
|
| 82 |
+
int'l international
|
| 83 |
+
A. D AD
|
| 84 |
+
A.D AD
|
| 85 |
+
a. d AD
|
| 86 |
+
a.d AD
|
| 87 |
+
a. d. AD
|
| 88 |
+
a.d. AD
|
| 89 |
+
B. C BC
|
| 90 |
+
B.C BC
|
| 91 |
+
b. c BC
|
| 92 |
+
b.c BC
|
| 93 |
+
A. D. AD
|
| 94 |
+
A.D. AD
|
| 95 |
+
B. C. BC
|
| 96 |
+
B.C. BC
|
| 97 |
+
b. c. BC
|
| 98 |
+
b.c. BC
|
| 99 |
+
A. A. a a
|
| 100 |
+
A.A. AA
|
| 101 |
+
A&A AANDA
|
| 102 |
+
A100 AONEHUNDRED
|
| 103 |
+
AAAs AAA's
|
| 104 |
+
AaB AAB
|
| 105 |
+
Aabo AABO
|
| 106 |
+
aac AAC
|
| 107 |
+
AACNo AACNO
|
| 108 |
+
AADTs AADT's
|
| 109 |
+
Aadu AADU
|
| 110 |
+
AAFld AAFLD
|
| 111 |
+
Aap AAP
|
| 112 |
+
A. B. AB
|
| 113 |
+
A.B. AB
|
| 114 |
+
Abhi ABHI
|
| 115 |
+
abl ABL
|
| 116 |
+
Abl ABL
|
| 117 |
+
Abp ABP
|
| 118 |
+
Abr ABR
|
| 119 |
+
abv ABV
|
| 120 |
+
Abz ABZ
|
| 121 |
+
A&C AANDC
|
| 122 |
+
A. C. AC
|
| 123 |
+
A.C. AC
|
| 124 |
+
A/C AC
|
| 125 |
+
acac ACAC
|
| 126 |
+
Acad ACAD
|
| 127 |
+
ACC&S ACC and S
|
| 128 |
+
Achs ACH's
|
| 129 |
+
Acis ACI's
|
| 130 |
+
acls ACLS
|
| 131 |
+
ACMs ACM's
|
| 132 |
+
AcpA ACPA
|
| 133 |
+
AcpB ACPB
|
| 134 |
+
acq ACQ
|
| 135 |
+
A&CR AANDCR
|
| 136 |
+
AcSOC ACSOC
|
| 137 |
+
acu ACU
|
| 138 |
+
AC&W AC and W
|
| 139 |
+
Acy ACY
|
| 140 |
+
A&D AANDD
|
| 141 |
+
Adab ADAB
|
| 142 |
+
A. D. AD
|
| 143 |
+
A.D. AD
|
| 144 |
+
A.D.A.M. adam
|
| 145 |
+
AdaSL ADASL
|
| 146 |
+
AdC ADC
|
| 147 |
+
ADCs ADC's
|
| 148 |
+
AD&D AD and D
|
| 149 |
+
AdK ADK
|
| 150 |
+
Adl ADL
|
| 151 |
+
ADLs ADL's
|
| 152 |
+
adm ADM
|
| 153 |
+
Adm ADM
|
| 154 |
+
admn ADMN
|
| 155 |
+
ADNs ADN's
|
| 156 |
+
AdP ADP
|
| 157 |
+
ADRs ADR's
|
| 158 |
+
ADSRs ADSR's
|
| 159 |
+
ADSs ADS's
|
| 160 |
+
Adwa ADWA
|
| 161 |
+
A&E AANDE
|
| 162 |
+
A. E. AE
|
| 163 |
+
A.E. AE
|
| 164 |
+
Aed AED
|
| 165 |
+
aegte AEGTE
|
| 166 |
+
Aeka AEKA
|
| 167 |
+
ael AEL
|
| 168 |
+
Aema AEMA
|
| 169 |
+
aen AEN
|
| 170 |
+
aere AERE
|
| 171 |
+
AEre AERE
|
| 172 |
+
AErn AERN
|
| 173 |
+
Aert AERT
|
| 174 |
+
Aes AE's
|
| 175 |
+
aet AET
|
| 176 |
+
Afa AFA
|
| 177 |
+
af AF
|
| 178 |
+
Af AF
|
| 179 |
+
A. F. AF
|
| 180 |
+
A.F. AF
|
| 181 |
+
Afaf AFAF
|
| 182 |
+
afc AFC
|
| 183 |
+
AFCSThe AFCSTHE
|
| 184 |
+
Afd AFD
|
| 185 |
+
AfD AFD
|
| 186 |
+
AfDB AFDB
|
| 187 |
+
Afe AFE
|
| 188 |
+
Aff AFF
|
| 189 |
+
Afi AFI
|
| 190 |
+
Afiq AFIQ
|
| 191 |
+
AFMs AFM's
|
| 192 |
+
AfNS AFNS
|
| 193 |
+
Afo AFO
|
| 194 |
+
Afr AFR
|
| 195 |
+
A. G. AG
|
| 196 |
+
A.G. AG
|
| 197 |
+
Agco AGCO
|
| 198 |
+
Agda AGDA
|
| 199 |
+
AG&G AG and G
|
| 200 |
+
agg AGG
|
| 201 |
+
Agi AGI
|
| 202 |
+
Agis AGI's
|
| 203 |
+
agli AGLI
|
| 204 |
+
Agn AGN
|
| 205 |
+
AgN AGN
|
| 206 |
+
AGNs AGN's
|
| 207 |
+
AGRs AGR's
|
| 208 |
+
Agsu AGSU
|
| 209 |
+
agt AGT
|
| 210 |
+
Agte AGTE
|
| 211 |
+
Agu AGU
|
| 212 |
+
A. H. AH
|
| 213 |
+
A.H. AH
|
| 214 |
+
Ahdhra AHDHRA
|
| 215 |
+
ahe AHE
|
| 216 |
+
Ahe AHE
|
| 217 |
+
Ahirs AHIR's
|
| 218 |
+
Ahk AHK
|
| 219 |
+
Ahsa'i AHSAI
|
| 220 |
+
Ahta AHTA
|
| 221 |
+
aht AHT
|
| 222 |
+
Ahu AHU
|
| 223 |
+
Ahva AHVA
|
| 224 |
+
A&I AANDI
|
| 225 |
+
A. I. AI
|
| 226 |
+
A.I. AI
|
| 227 |
+
Aias AIA's
|
| 228 |
+
aici AICI
|
| 229 |
+
Aicme AICME
|
| 230 |
+
AICs AIC's
|
| 231 |
+
Aiel AIEL
|
| 232 |
+
Aife AIFE
|
| 233 |
+
AiG AIG
|
| 234 |
+
Aigis AIGI's
|
| 235 |
+
Aija AIJA
|
| 236 |
+
Aik AIK
|
| 237 |
+
AIs AI's
|
| 238 |
+
Aist AIST
|
| 239 |
+
Aitu AITU
|
| 240 |
+
Aiud AIUD
|
| 241 |
+
aius AIUS
|
| 242 |
+
A. J. AJ
|
| 243 |
+
A.J. AJ
|
| 244 |
+
Ajba AJBA
|
| 245 |
+
Ajmi AJMI
|
| 246 |
+
Ajok AJOK
|
| 247 |
+
Ajsa AJSA
|
| 248 |
+
Aju AJU
|
| 249 |
+
Akaa AKAA
|
| 250 |
+
a.k.a. AKA
|
| 251 |
+
aka. AKA
|
| 252 |
+
aka AKA
|
| 253 |
+
Aka. AKA
|
| 254 |
+
Aka AKA
|
| 255 |
+
A&K AANDK
|
| 256 |
+
A. K. AK
|
| 257 |
+
A.K. AK
|
| 258 |
+
AKAPs AKAP's
|
| 259 |
+
akas AKA's
|
| 260 |
+
AKAs AKA's
|
| 261 |
+
akh AKH
|
| 262 |
+
Akpa AKPA
|
| 263 |
+
Aku AKU
|
| 264 |
+
A&L AANDL
|
| 265 |
+
A. L. AL
|
| 266 |
+
A.L. AL
|
| 267 |
+
Alh ALH
|
| 268 |
+
ALUs ALU's
|
| 269 |
+
A'ma AMA
|
| 270 |
+
A&M AANDM
|
| 271 |
+
a.m. AM
|
| 272 |
+
a.m AM
|
| 273 |
+
A. M. AM
|
| 274 |
+
A.M. AM
|
| 275 |
+
AMAs AMA's
|
| 276 |
+
amb AMB
|
| 277 |
+
Amb AMB
|
| 278 |
+
AmBX AMBX
|
| 279 |
+
AMCs AMC's
|
| 280 |
+
Amda AMDA
|
| 281 |
+
Amd AMD
|
| 282 |
+
AM&FM AM and FM
|
| 283 |
+
Amha AMHA
|
| 284 |
+
aml AML
|
| 285 |
+
Amli AMLI
|
| 286 |
+
Amlwch AMLWCH
|
| 287 |
+
Amm AMM
|
| 288 |
+
AM&O AM and O
|
| 289 |
+
Ampt AMPT
|
| 290 |
+
amr AMR
|
| 291 |
+
A&M's AANDM's
|
| 292 |
+
Ams' AM's
|
| 293 |
+
amsl AMSL
|
| 294 |
+
Amta AMTA
|
| 295 |
+
amt AMT
|
| 296 |
+
Amt AMT
|
| 297 |
+
Amts AMT's
|
| 298 |
+
Amu AMU
|
| 299 |
+
A. N. AN
|
| 300 |
+
A.N. AN
|
| 301 |
+
andFHL ANDFHL
|
| 302 |
+
andPPP ANDPPP
|
| 303 |
+
Anej ANEJ
|
| 304 |
+
Angti ANGTI
|
| 305 |
+
Angu ANGU
|
| 306 |
+
Anhe ANHE
|
| 307 |
+
Anr ANR
|
| 308 |
+
Anrep ANREP
|
| 309 |
+
A&O AANDO
|
| 310 |
+
A. O. AO
|
| 311 |
+
A.O. AO
|
| 312 |
+
AOCCs AOCC's
|
| 313 |
+
Aodh AODH
|
| 314 |
+
Aodla AODLA
|
| 315 |
+
Aogo AOGO
|
| 316 |
+
Aoke AOKE
|
| 317 |
+
Aoko AOKO
|
| 318 |
+
Aola AOLA
|
| 319 |
+
Aol AOL
|
| 320 |
+
Aone AONE
|
| 321 |
+
Aoni AONI
|
| 322 |
+
Aoos AOO's
|
| 323 |
+
aor AOR
|
| 324 |
+
AORs AOR's
|
| 325 |
+
aos AOS
|
| 326 |
+
AoS AOS
|
| 327 |
+
Aotus AOTU's
|
| 328 |
+
aov AOV
|
| 329 |
+
aovf AOVF
|
| 330 |
+
A&P AANDP
|
| 331 |
+
A. P. AP
|
| 332 |
+
A.P. AP
|
| 333 |
+
Apc APC
|
| 334 |
+
APCh APCH
|
| 335 |
+
APCs APC's
|
| 336 |
+
apg APG
|
| 337 |
+
Aph APH
|
| 338 |
+
Apiao APIAO
|
| 339 |
+
Api API
|
| 340 |
+
APi API
|
| 341 |
+
Apic APIC
|
| 342 |
+
APICv APICV
|
| 343 |
+
Apl APL
|
| 344 |
+
Aplu APLU
|
| 345 |
+
Apphttp APPHTTP
|
| 346 |
+
Appl APPL
|
| 347 |
+
appr APPR
|
| 348 |
+
Appts APPT's
|
| 349 |
+
appu APPU
|
| 350 |
+
Appu APPU
|
| 351 |
+
A&P's AANDP's
|
| 352 |
+
Aps AP's
|
| 353 |
+
APs AP's
|
| 354 |
+
AP&T AP and T
|
| 355 |
+
Aqa AQA
|
| 356 |
+
Aql AQL
|
| 357 |
+
Aqr AQR
|
| 358 |
+
A&R AANDR
|
| 359 |
+
A. R. AR
|
| 360 |
+
A.R. AR
|
| 361 |
+
ArgR ARGR
|
| 362 |
+
ARGs ARG's
|
| 363 |
+
ArH ARH
|
| 364 |
+
ARMv ARMV
|
| 365 |
+
Arnd ARND
|
| 366 |
+
arv ARV
|
| 367 |
+
Arv ARV
|
| 368 |
+
Arwi ARWI
|
| 369 |
+
As'ad ASAD
|
| 370 |
+
Asai ASAI
|
| 371 |
+
Asao ASAO
|
| 372 |
+
A.s A's
|
| 373 |
+
A. S. AS
|
| 374 |
+
A.S. AS
|
| 375 |
+
Asasp ASASP
|
| 376 |
+
asbl ASBL
|
| 377 |
+
asci ASCI
|
| 378 |
+
Asci ASCI
|
| 379 |
+
Asdis ASDI's
|
| 380 |
+
Asfi ASFI
|
| 381 |
+
Asn ASN
|
| 382 |
+
Aso ASO
|
| 383 |
+
Aspe ASPE
|
| 384 |
+
Asr ASR
|
| 385 |
+
Assn ASSN
|
| 386 |
+
assoc ASSOC
|
| 387 |
+
Assoc ASSOC
|
| 388 |
+
ASSPs ASSP's
|
| 389 |
+
Asst ASST
|
| 390 |
+
Aste ASTE
|
| 391 |
+
Astt ASTT
|
| 392 |
+
Aswa ASWA
|
| 393 |
+
A&T AANDT
|
| 394 |
+
atac ATAC
|
| 395 |
+
Atac ATAC
|
| 396 |
+
Atad ATAD
|
| 397 |
+
Ata's ATA's
|
| 398 |
+
Atas ATA's
|
| 399 |
+
A. T. AT
|
| 400 |
+
A.T. AT
|
| 401 |
+
ATBs ATB's
|
| 402 |
+
atc ATC
|
| 403 |
+
atcc ATCC
|
| 404 |
+
Atg ATG
|
| 405 |
+
ath ATH
|
| 406 |
+
Ath ATH
|
| 407 |
+
Atia's ATIA's
|
| 408 |
+
Ati ATI
|
| 409 |
+
ATi ATI
|
| 410 |
+
Atid ATID
|
| 411 |
+
Atiiq ATIIQ
|
| 412 |
+
Atil ATIL
|
| 413 |
+
Atiq ATIQ
|
| 414 |
+
Ativ ATIV
|
| 415 |
+
Atka ATKA
|
| 416 |
+
Atl ATL
|
| 417 |
+
Atli ATLI
|
| 418 |
+
atm ATM
|
| 419 |
+
Atm ATM
|
| 420 |
+
ATMs ATM's
|
| 421 |
+
Atos ATO's
|
| 422 |
+
ATOs ATO's
|
| 423 |
+
atpB ATPB
|
| 424 |
+
atri ATRI
|
| 425 |
+
Atri ATRI
|
| 426 |
+
A&T's AANDT's
|
| 427 |
+
A.T.s AT's
|
| 428 |
+
AT&SF AT and SF
|
| 429 |
+
AT&T ATANDT
|
| 430 |
+
attd ATTD
|
| 431 |
+
AT&T's ATANDTS
|
| 432 |
+
atv ATV
|
| 433 |
+
ATVs ATV's
|
| 434 |
+
AtxA ATXA
|
| 435 |
+
A. U. AU
|
| 436 |
+
A.U. AU
|
| 437 |
+
Aub AUB
|
| 438 |
+
Aubl AUBL
|
| 439 |
+
AUVs AUV's
|
| 440 |
+
Auw AUW
|
| 441 |
+
avab AVAB
|
| 442 |
+
A. V. AV
|
| 443 |
+
A.V. AV
|
| 444 |
+
AVCs AVC's
|
| 445 |
+
avg AVG
|
| 446 |
+
Avn AVN
|
| 447 |
+
Avo AVO
|
| 448 |
+
AvP AVP
|
| 449 |
+
AVRs AVR's
|
| 450 |
+
Avs' AV's
|
| 451 |
+
Avs AV's
|
| 452 |
+
avvo AVVO
|
| 453 |
+
Awa AWA
|
| 454 |
+
AWAs AWA's
|
| 455 |
+
A. W. AW
|
| 456 |
+
A.W. AW
|
| 457 |
+
Awo AWO
|
| 458 |
+
Awwa AWWA
|
| 459 |
+
A. X. AX
|
| 460 |
+
A. Y. AY
|
| 461 |
+
A.Y. AY
|
| 462 |
+
A. Z. AZ
|
| 463 |
+
A.Z. AZ
|
| 464 |
+
Azg AZG
|
| 465 |
+
Azi AZI
|
| 466 |
+
azm AZM
|
| 467 |
+
AzTV AZTV
|
| 468 |
+
Baad BAAD
|
| 469 |
+
Ba'al BAAL
|
| 470 |
+
Baal BAAL
|
| 471 |
+
Baam BAAM
|
| 472 |
+
Baap BAAP
|
| 473 |
+
ba'as BAA's
|
| 474 |
+
Baat BAAT
|
| 475 |
+
Ba'ath BAATH
|
| 476 |
+
B. A. BA
|
| 477 |
+
B.A. BA
|
| 478 |
+
B&A B and A
|
| 479 |
+
Bac BAC
|
| 480 |
+
bae BAE
|
| 481 |
+
Bae BAE
|
| 482 |
+
BAe BAE
|
| 483 |
+
Bauw BAUW
|
| 484 |
+
B'Av BAV
|
| 485 |
+
B&B B and B
|
| 486 |
+
bb BB
|
| 487 |
+
B. B. BB
|
| 488 |
+
B.B. BB
|
| 489 |
+
bbc BBC
|
| 490 |
+
BB&CI BB and CI
|
| 491 |
+
BBC&PJR BBC and PJR
|
| 492 |
+
BBQ'er BBQER
|
| 493 |
+
B&Bs B and B's
|
| 494 |
+
BB&S BB and S
|
| 495 |
+
BBSes BBSE's
|
| 496 |
+
BB&T BB and T
|
| 497 |
+
BbvCI BBVCI
|
| 498 |
+
bc BC
|
| 499 |
+
B. C. BC
|
| 500 |
+
B.C. BC
|
| 501 |
+
Bcci BCCI
|
| 502 |
+
B.C.'s BC's
|
| 503 |
+
BCs BC's
|
| 504 |
+
BCSic BCSIC
|
| 505 |
+
BdA BDA
|
| 506 |
+
bd BD
|
| 507 |
+
B. D. BD
|
| 508 |
+
B.D. BD
|
| 509 |
+
Bde BDE
|
| 510 |
+
bds BDS
|
| 511 |
+
BdU BDU
|
| 512 |
+
B. E. BE
|
| 513 |
+
B.E. BE
|
| 514 |
+
Bedw BEDW
|
| 515 |
+
bef BEF
|
| 516 |
+
bei BEI
|
| 517 |
+
Bei BEI
|
| 518 |
+
Beih BEIH
|
| 519 |
+
Beis BEI's
|
| 520 |
+
bej BEJ
|
| 521 |
+
BEMs BEM's
|
| 522 |
+
Ber BER
|
| 523 |
+
Bes BE's
|
| 524 |
+
bf BF
|
| 525 |
+
B. F. BF
|
| 526 |
+
B.F. BF
|
| 527 |
+
BFFs BFF's
|
| 528 |
+
bfy BFY
|
| 529 |
+
B. G. BG
|
| 530 |
+
B.G. BG
|
| 531 |
+
BglII BGLII
|
| 532 |
+
bgs BGS
|
| 533 |
+
Bgy BGY
|
| 534 |
+
Bha BHA
|
| 535 |
+
B&H B and H
|
| 536 |
+
B. H. BH
|
| 537 |
+
B.H. BH
|
| 538 |
+
BH&E BH and E
|
| 539 |
+
Bhe BHE
|
| 540 |
+
BHMs BHM's
|
| 541 |
+
bhttp BHTTP
|
| 542 |
+
B. I. BI
|
| 543 |
+
B.I. BI
|
| 544 |
+
Bie BIE
|
| 545 |
+
biedt BIEDT
|
| 546 |
+
Biem BIEM
|
| 547 |
+
B.I.G.'s BIG's
|
| 548 |
+
BiH BIH
|
| 549 |
+
B. J. BJ
|
| 550 |
+
B.J. BJ
|
| 551 |
+
BJPs BJP's
|
| 552 |
+
B.J.'s BJ's
|
| 553 |
+
B&K B and K
|
| 554 |
+
B. K. BK
|
| 555 |
+
B.K. BK
|
| 556 |
+
BKCa BKCA
|
| 557 |
+
B. L. BL
|
| 558 |
+
B.L. BL
|
| 559 |
+
ble BLE
|
| 560 |
+
bleg BLEG
|
| 561 |
+
blev BLEV
|
| 562 |
+
bli BLI
|
| 563 |
+
Blla BLLA
|
| 564 |
+
BLR&D BLR and D
|
| 565 |
+
BLTs BLT's
|
| 566 |
+
B&M B and M
|
| 567 |
+
B. M. BM
|
| 568 |
+
B.M. BM
|
| 569 |
+
bmd BMD
|
| 570 |
+
bmi BMI
|
| 571 |
+
BMPs BMP's
|
| 572 |
+
BMRs BMR's
|
| 573 |
+
bmt BMT
|
| 574 |
+
B&N B and N
|
| 575 |
+
bnb BNB
|
| 576 |
+
B. N. BN
|
| 577 |
+
B.N. BN
|
| 578 |
+
Boac BOAC
|
| 579 |
+
B&O B and O
|
| 580 |
+
B. O. BO
|
| 581 |
+
B.O. BO
|
| 582 |
+
Boc BOC
|
| 583 |
+
BoC BOC
|
| 584 |
+
BOCs BOC's
|
| 585 |
+
boj BOJ
|
| 586 |
+
Boj BOJ
|
| 587 |
+
B&O's B and O's
|
| 588 |
+
bp BP
|
| 589 |
+
B. P. BP
|
| 590 |
+
B.P. BP
|
| 591 |
+
bpl BPL
|
| 592 |
+
B&Q B and Q
|
| 593 |
+
B. Q. BQ
|
| 594 |
+
Brbic BRBIC
|
| 595 |
+
B. R. BR
|
| 596 |
+
B.R. BR
|
| 597 |
+
BRBs BRB's
|
| 598 |
+
Brne BRNE
|
| 599 |
+
Brno BRNO
|
| 600 |
+
BRTs BRT's
|
| 601 |
+
Brza BRZA
|
| 602 |
+
brzu BRZU
|
| 603 |
+
brzy BRZY
|
| 604 |
+
Brzyk BRZYK
|
| 605 |
+
BsaL BSAL
|
| 606 |
+
B. s B's
|
| 607 |
+
B.'s B's
|
| 608 |
+
Bs B's
|
| 609 |
+
B. S. BS
|
| 610 |
+
B.S. BS
|
| 611 |
+
bsd BSD
|
| 612 |
+
bt BT
|
| 613 |
+
B. T. BT
|
| 614 |
+
B.T. BT
|
| 615 |
+
Btry BTRY
|
| 616 |
+
btsan BTSAN
|
| 617 |
+
btus BTUS
|
| 618 |
+
BTUs BTU's
|
| 619 |
+
B.U. BU
|
| 620 |
+
B. V. BV
|
| 621 |
+
B.V. BV
|
| 622 |
+
Bwa BWA
|
| 623 |
+
B&W B and W
|
| 624 |
+
B. W. BW
|
| 625 |
+
B.W. BW
|
| 626 |
+
BWTs BWT's
|
| 627 |
+
bwwtv BWWTV
|
| 628 |
+
Bxa BXA
|
| 629 |
+
Bxe BXE
|
| 630 |
+
B. Y. BY
|
| 631 |
+
byc BYC
|
| 632 |
+
bygd BYGD
|
| 633 |
+
Byk BYK
|
| 634 |
+
byn BYN
|
| 635 |
+
Byo BYO
|
| 636 |
+
Byou BYOU
|
| 637 |
+
Byrl BYRL
|
| 638 |
+
bySLC BYSLC
|
| 639 |
+
byt BYT
|
| 640 |
+
B.Z. BZ
|
| 641 |
+
bzhed BZHED
|
| 642 |
+
Bzik BZIK
|
| 643 |
+
Bzyb BZYB
|
| 644 |
+
Caat CAAT
|
| 645 |
+
C. A. CA
|
| 646 |
+
C.A. CA
|
| 647 |
+
C&A CANDA
|
| 648 |
+
CA&CC CA and CC
|
| 649 |
+
Cadw CADW
|
| 650 |
+
caeca CAECA
|
| 651 |
+
Cae CAE
|
| 652 |
+
C.A.M.'s CAM's
|
| 653 |
+
Capt. captain
|
| 654 |
+
cas CAS
|
| 655 |
+
Cas CA's
|
| 656 |
+
Casc CASC
|
| 657 |
+
cb CB
|
| 658 |
+
C. B. CB
|
| 659 |
+
C.B. CB
|
| 660 |
+
cbc CBC
|
| 661 |
+
CB&CNS CB and CNS
|
| 662 |
+
CBDs CBD's
|
| 663 |
+
CBGBs CBGB's
|
| 664 |
+
CbiXS CBIXS
|
| 665 |
+
CB&Q CB and Q
|
| 666 |
+
CBs CB's
|
| 667 |
+
'c C
|
| 668 |
+
CcaA CCAA
|
| 669 |
+
cca CCA
|
| 670 |
+
Cca CCA
|
| 671 |
+
C&C C and C
|
| 672 |
+
C. C. CC
|
| 673 |
+
C.C. CC
|
| 674 |
+
ccd CCD
|
| 675 |
+
CCDev CCDEV
|
| 676 |
+
CCDs CCD's
|
| 677 |
+
CCEd CCED
|
| 678 |
+
CCi CCI
|
| 679 |
+
ccm CCM
|
| 680 |
+
CCRCs CCRC's
|
| 681 |
+
cct CCT
|
| 682 |
+
ccus CCUS
|
| 683 |
+
C&D C and D
|
| 684 |
+
cdc CDC
|
| 685 |
+
cd CD
|
| 686 |
+
C. D. CD
|
| 687 |
+
C.D. CD
|
| 688 |
+
CD&DR CD and DR
|
| 689 |
+
CDi CDI
|
| 690 |
+
cDNA CDNA
|
| 691 |
+
cdnas CDNAS
|
| 692 |
+
cDNAs CDNA's
|
| 693 |
+
CDOs CDO's
|
| 694 |
+
CDPs CDP's
|
| 695 |
+
CD&R CD and R
|
| 696 |
+
cds CDS
|
| 697 |
+
CDs CD's
|
| 698 |
+
CDSPCo CDSPCO
|
| 699 |
+
CdtA CDTA
|
| 700 |
+
CdTe CDTE
|
| 701 |
+
CDTi CDTI
|
| 702 |
+
CD&V CD and V
|
| 703 |
+
Cec CEC
|
| 704 |
+
c'e CE
|
| 705 |
+
ce CE
|
| 706 |
+
C'e CE
|
| 707 |
+
Ce CE
|
| 708 |
+
C. E. CE
|
| 709 |
+
C.E. CE
|
| 710 |
+
Ceel CEEL
|
| 711 |
+
Cefn CEFN
|
| 712 |
+
C&EI's C and EI's
|
| 713 |
+
C&EN C and EN
|
| 714 |
+
cen CEN
|
| 715 |
+
Cen CEN
|
| 716 |
+
ceo CEO
|
| 717 |
+
Ceol CEOL
|
| 718 |
+
Ceorl CEORL
|
| 719 |
+
Ceos CEO's
|
| 720 |
+
CEOs' CEO's
|
| 721 |
+
CEOs CEO's
|
| 722 |
+
cer CER
|
| 723 |
+
Cer CER
|
| 724 |
+
ces CES
|
| 725 |
+
Ces CE's
|
| 726 |
+
Cex CEX
|
| 727 |
+
CeX CEX
|
| 728 |
+
Cfa CFA
|
| 729 |
+
C&F C and F
|
| 730 |
+
cf CF
|
| 731 |
+
C. F. CF
|
| 732 |
+
C.F. CF
|
| 733 |
+
CFOs CFO's
|
| 734 |
+
CFTs CFT's
|
| 735 |
+
C&G C and G
|
| 736 |
+
C. G. CG
|
| 737 |
+
C.G. CG
|
| 738 |
+
cgl CGL
|
| 739 |
+
C&H C and H
|
| 740 |
+
C. H. CH
|
| 741 |
+
C.H. CH
|
| 742 |
+
Chhu CHHU
|
| 743 |
+
Chirs CHIR's
|
| 744 |
+
CHP'den CHPDEN
|
| 745 |
+
CHPs CHP's
|
| 746 |
+
Chy CHY
|
| 747 |
+
Cia CIA
|
| 748 |
+
ci CI
|
| 749 |
+
Ci CI
|
| 750 |
+
C. I. CI
|
| 751 |
+
C.I. CI
|
| 752 |
+
Cicic CICIC
|
| 753 |
+
cii CII
|
| 754 |
+
cim CIM
|
| 755 |
+
Cim CIM
|
| 756 |
+
Cio CIO
|
| 757 |
+
CIOs CIO's
|
| 758 |
+
Cip CIP
|
| 759 |
+
cis CIS
|
| 760 |
+
CIs CI's
|
| 761 |
+
cit CIT
|
| 762 |
+
CiTD CITD
|
| 763 |
+
citS CITS
|
| 764 |
+
CitX CITX
|
| 765 |
+
Ciuc CIUC
|
| 766 |
+
Ciu CIU
|
| 767 |
+
CiU CIU
|
| 768 |
+
Cixi CIXI
|
| 769 |
+
C. J. CJ
|
| 770 |
+
C.J. CJ
|
| 771 |
+
C. K. CK
|
| 772 |
+
C.K. CK
|
| 773 |
+
ckx CKX
|
| 774 |
+
CLBs CLB's
|
| 775 |
+
clc CLC
|
| 776 |
+
cl CL
|
| 777 |
+
C. L. CL
|
| 778 |
+
C.L. CL
|
| 779 |
+
Cle CLE
|
| 780 |
+
cllr CLLR
|
| 781 |
+
CL&N CL and N
|
| 782 |
+
Clo CLO
|
| 783 |
+
CL&P CL and P
|
| 784 |
+
CLs CL's
|
| 785 |
+
CLTs CLT's
|
| 786 |
+
Clu CLU
|
| 787 |
+
Clwyd CLWYD
|
| 788 |
+
C&MA C and MA
|
| 789 |
+
cm CM
|
| 790 |
+
C. M. CM
|
| 791 |
+
C.M. CM
|
| 792 |
+
CMCs CMC's
|
| 793 |
+
Cmde CMDE
|
| 794 |
+
cmdr CMDR
|
| 795 |
+
cml CML
|
| 796 |
+
CMMs CMM's
|
| 797 |
+
cmn CMN
|
| 798 |
+
Cmte CMTE
|
| 799 |
+
cn CN
|
| 800 |
+
C. N. CN
|
| 801 |
+
C.N. CN
|
| 802 |
+
CNMs CNM's
|
| 803 |
+
cnr CNR
|
| 804 |
+
CNs CN's
|
| 805 |
+
CNTs CNT's
|
| 806 |
+
Cnut's CNUT's
|
| 807 |
+
CNVs CNV's
|
| 808 |
+
C&O C and O
|
| 809 |
+
C. O. CO
|
| 810 |
+
C.O. CO
|
| 811 |
+
Co. company
|
| 812 |
+
Col. colonel
|
| 813 |
+
C&P C and P
|
| 814 |
+
cp CP
|
| 815 |
+
C. P. CP
|
| 816 |
+
C.P. CP
|
| 817 |
+
CPCs CPC's
|
| 818 |
+
cpo CPO
|
| 819 |
+
CPUs CPU's
|
| 820 |
+
cq CQ
|
| 821 |
+
CQDs CQD's
|
| 822 |
+
cr CR
|
| 823 |
+
C. R. CR
|
| 824 |
+
C.R. CR
|
| 825 |
+
Cre CRE
|
| 826 |
+
crk CRK
|
| 827 |
+
Crkva CRKVA
|
| 828 |
+
crkve CRKVE
|
| 829 |
+
CRLs CRL's
|
| 830 |
+
crm CRM
|
| 831 |
+
Crne CRNE
|
| 832 |
+
Crni CRNI
|
| 833 |
+
Crno CRNO
|
| 834 |
+
CRs CR's
|
| 835 |
+
csa CSA
|
| 836 |
+
Csa CSA
|
| 837 |
+
Csak CSAK
|
| 838 |
+
Csaky CSAKY
|
| 839 |
+
C&S C and S
|
| 840 |
+
cs CS
|
| 841 |
+
C.s C's
|
| 842 |
+
Cs C's
|
| 843 |
+
C. S. CS
|
| 844 |
+
C.S. CS
|
| 845 |
+
C&SF C and SF
|
| 846 |
+
csg CSG
|
| 847 |
+
CsI CSI
|
| 848 |
+
CSis CSI's
|
| 849 |
+
CSIs CSI's
|
| 850 |
+
CSOs CSO's
|
| 851 |
+
cspA CSPA
|
| 852 |
+
csp CSP
|
| 853 |
+
CSPs CSP's
|
| 854 |
+
CSSNCs CSSNC's
|
| 855 |
+
Csuz CSUZ
|
| 856 |
+
CTAs CTA's
|
| 857 |
+
C&T C and T
|
| 858 |
+
cte CTE
|
| 859 |
+
CTLs CTL's
|
| 860 |
+
ctr CTR
|
| 861 |
+
Ctrip CTRIP
|
| 862 |
+
ctv CTV
|
| 863 |
+
cu CU
|
| 864 |
+
C. U. CU
|
| 865 |
+
Cuyp CUYP
|
| 866 |
+
C&V C and V
|
| 867 |
+
cvcp CVCP
|
| 868 |
+
'cv CV
|
| 869 |
+
cv CV
|
| 870 |
+
C. V. CV
|
| 871 |
+
C.V. CV
|
| 872 |
+
CVEs CVE's
|
| 873 |
+
CVOs CVO's
|
| 874 |
+
CVs CV's
|
| 875 |
+
CVTs CVT's
|
| 876 |
+
C. W. CW
|
| 877 |
+
C.W. CW
|
| 878 |
+
Cwej CWEJ
|
| 879 |
+
Cwele CWELE
|
| 880 |
+
cwm CWM
|
| 881 |
+
cwrt CWRT
|
| 882 |
+
C.X. CX
|
| 883 |
+
C. Y. CY
|
| 884 |
+
C.Y. CY
|
| 885 |
+
cyl CYL
|
| 886 |
+
Cyn CYN
|
| 887 |
+
CyP CYP
|
| 888 |
+
Cyrl CYRL
|
| 889 |
+
Cys CY's
|
| 890 |
+
czci CZCI
|
| 891 |
+
cz CZ
|
| 892 |
+
C.Z. CZ
|
| 893 |
+
czy CZY
|
| 894 |
+
Daai DAAI
|
| 895 |
+
D. A. DA
|
| 896 |
+
D.A. DA
|
| 897 |
+
D&AD DANDAD
|
| 898 |
+
D.A.N.C.E. dance
|
| 899 |
+
Dav DAV
|
| 900 |
+
dBa DBA
|
| 901 |
+
db DB
|
| 902 |
+
D. B. DB
|
| 903 |
+
D.B. DB
|
| 904 |
+
DCCs DCC's
|
| 905 |
+
D&C D and C
|
| 906 |
+
dc DC
|
| 907 |
+
D. C. DC
|
| 908 |
+
D.C. DC
|
| 909 |
+
DCom DCOM
|
| 910 |
+
D.C.'s DC's
|
| 911 |
+
DCs DC's
|
| 912 |
+
DCUs DCU's
|
| 913 |
+
D&D D and D
|
| 914 |
+
D. D. DD
|
| 915 |
+
D.D. DD
|
| 916 |
+
DDi DDI
|
| 917 |
+
Ddoc DDOC
|
| 918 |
+
Ddu DDU
|
| 919 |
+
Deah DEAH
|
| 920 |
+
D. E. DE
|
| 921 |
+
D.E. DE
|
| 922 |
+
deg DEG
|
| 923 |
+
dei DEI
|
| 924 |
+
Dei DEI
|
| 925 |
+
DeI DEI
|
| 926 |
+
Deijm DEIJM
|
| 927 |
+
Deip DEIP
|
| 928 |
+
dez DEZ
|
| 929 |
+
Dez DEZ
|
| 930 |
+
Dfa DFA
|
| 931 |
+
DFCs DFC's
|
| 932 |
+
D. F. DF
|
| 933 |
+
D.F. DF
|
| 934 |
+
DfE DFE
|
| 935 |
+
DfES DFES
|
| 936 |
+
DFPs DFP's
|
| 937 |
+
DFs DF's
|
| 938 |
+
dfx DFX
|
| 939 |
+
D&G D and G
|
| 940 |
+
D. G. DG
|
| 941 |
+
D.G. DG
|
| 942 |
+
Dha DHA
|
| 943 |
+
DHBs DHB's
|
| 944 |
+
D&H D and H
|
| 945 |
+
dh DH
|
| 946 |
+
D. H. DH
|
| 947 |
+
D.H. DH
|
| 948 |
+
d'HEC DHEC
|
| 949 |
+
dhe DHE
|
| 950 |
+
Dheku DHEKU
|
| 951 |
+
Dhod DHOD
|
| 952 |
+
dhol DHOL
|
| 953 |
+
Dhol DHOL
|
| 954 |
+
Dhoo DHOO
|
| 955 |
+
Dhor DHOR
|
| 956 |
+
Dhou DHOU
|
| 957 |
+
dhr DHR
|
| 958 |
+
DHSs DHS's
|
| 959 |
+
D.I. DI
|
| 960 |
+
diy DIY
|
| 961 |
+
DiY DIY
|
| 962 |
+
Diyn DIYN
|
| 963 |
+
DIYs DIY's
|
| 964 |
+
Djam DJAM
|
| 965 |
+
dj DJ
|
| 966 |
+
D. J. DJ
|
| 967 |
+
D.J. DJ
|
| 968 |
+
DJ'ed DJED
|
| 969 |
+
Djem DJEM
|
| 970 |
+
Dji DJI
|
| 971 |
+
Djo DJO
|
| 972 |
+
D'Jok DJOK
|
| 973 |
+
djr DJR
|
| 974 |
+
D.J.s DJ's
|
| 975 |
+
DJs DJ's
|
| 976 |
+
DjVu DJVU
|
| 977 |
+
DjVus DJVU's
|
| 978 |
+
D. K. DK
|
| 979 |
+
D.K. DK
|
| 980 |
+
dla DLA
|
| 981 |
+
dl DL
|
| 982 |
+
D. L. DL
|
| 983 |
+
D.L. DL
|
| 984 |
+
dlia DLIA
|
| 985 |
+
DL&LR DL and LR
|
| 986 |
+
DLLs DLL's
|
| 987 |
+
dlo DLO
|
| 988 |
+
DL&W DL and W
|
| 989 |
+
D.M.C.'s DMC's
|
| 990 |
+
D&M D and M
|
| 991 |
+
D. M. DM
|
| 992 |
+
D.M. DM
|
| 993 |
+
DMed DMED
|
| 994 |
+
DM&E DM and E
|
| 995 |
+
DMs DM's
|
| 996 |
+
DMUs DMU's
|
| 997 |
+
Dna DNA
|
| 998 |
+
DnA DNA
|
| 999 |
+
DnaJ DNAJ
|
| 1000 |
+
D. N. DN
|
| 1001 |
+
D.N. DN
|
| 1002 |
+
Dnepr DNEPR
|
| 1003 |
+
dnes DNES
|
| 1004 |
+
Dnes DNE's
|
| 1005 |
+
DNFs DNF's
|
| 1006 |
+
DNSBLs DNSBL's
|
| 1007 |
+
dns DNS
|
| 1008 |
+
D.O.A.'s DOA's
|
| 1009 |
+
dod DOD
|
| 1010 |
+
Dod DOD
|
| 1011 |
+
DoD DOD
|
| 1012 |
+
D. O. DO
|
| 1013 |
+
D.O. DO
|
| 1014 |
+
D'oh DOH
|
| 1015 |
+
dok DOK
|
| 1016 |
+
Dok DOK
|
| 1017 |
+
domt DOMT
|
| 1018 |
+
Domt DOMT
|
| 1019 |
+
Dop DOP
|
| 1020 |
+
dotCMS DOTCMS
|
| 1021 |
+
DotSVN DOTSVN
|
| 1022 |
+
Douw DOUW
|
| 1023 |
+
dozd DOZD
|
| 1024 |
+
d'OZ DOZ
|
| 1025 |
+
Dozhd DOZHD
|
| 1026 |
+
dp DP
|
| 1027 |
+
D. P. DP
|
| 1028 |
+
D.P. DP
|
| 1029 |
+
dpon DPON
|
| 1030 |
+
DProf DPROF
|
| 1031 |
+
DPs DP's
|
| 1032 |
+
D.Q. DQ
|
| 1033 |
+
drc DRC
|
| 1034 |
+
Dr. doctor
|
| 1035 |
+
D. R. DR
|
| 1036 |
+
D.R. DR
|
| 1037 |
+
dri DRI
|
| 1038 |
+
Dri DRI
|
| 1039 |
+
DRIs DRI's
|
| 1040 |
+
Driu DRIU
|
| 1041 |
+
Driv DRIV
|
| 1042 |
+
Drnis DRNI's
|
| 1043 |
+
Dro DRO
|
| 1044 |
+
Drs. doctors
|
| 1045 |
+
Drska DRSKA
|
| 1046 |
+
druj DRUJ
|
| 1047 |
+
DsbA DSBA
|
| 1048 |
+
DS&BB DS and BB
|
| 1049 |
+
dsDNA DSDNA
|
| 1050 |
+
ds DS
|
| 1051 |
+
Ds D's
|
| 1052 |
+
D. S. DS
|
| 1053 |
+
D.S. DS
|
| 1054 |
+
DSGi DSGI
|
| 1055 |
+
dsi DSI
|
| 1056 |
+
DSi DSI
|
| 1057 |
+
dsl DSL
|
| 1058 |
+
DSMs DSM's
|
| 1059 |
+
dsn DSN
|
| 1060 |
+
D&SNGRR D and SNGRR
|
| 1061 |
+
dsu' DSU
|
| 1062 |
+
DTCs DTC's
|
| 1063 |
+
DTDs DTD's
|
| 1064 |
+
D. T. DT
|
| 1065 |
+
D.T. DT
|
| 1066 |
+
DT&E DT and E
|
| 1067 |
+
DT&I DT and I
|
| 1068 |
+
dtl DTL
|
| 1069 |
+
DTs DT's
|
| 1070 |
+
dty DTY
|
| 1071 |
+
D.U. DU
|
| 1072 |
+
dva DVA
|
| 1073 |
+
Dva DVA
|
| 1074 |
+
DVCs DVC's
|
| 1075 |
+
dvd DVD
|
| 1076 |
+
DVDs DVD's
|
| 1077 |
+
dv DV
|
| 1078 |
+
D. V. DV
|
| 1079 |
+
D.V. DV
|
| 1080 |
+
dve DVE
|
| 1081 |
+
dvfb DVFB
|
| 1082 |
+
dvi DVI
|
| 1083 |
+
dvije DVIJE
|
| 1084 |
+
Dvin DVIN
|
| 1085 |
+
Dvir DVIR
|
| 1086 |
+
Dwa DWA
|
| 1087 |
+
D&W D and W
|
| 1088 |
+
D. W. DW
|
| 1089 |
+
D.W. DW
|
| 1090 |
+
Dwedw DWEDW
|
| 1091 |
+
Dwi DWI
|
| 1092 |
+
dwr DWR
|
| 1093 |
+
dwur DWUR
|
| 1094 |
+
dxa DXA
|
| 1095 |
+
dx DX
|
| 1096 |
+
D.X. DX
|
| 1097 |
+
DXers DXER's
|
| 1098 |
+
Dydd DYDD
|
| 1099 |
+
dy DY
|
| 1100 |
+
Dy DY
|
| 1101 |
+
D. Y. DY
|
| 1102 |
+
dypl DYPL
|
| 1103 |
+
dyr DYR
|
| 1104 |
+
dz DZ
|
| 1105 |
+
dzis DZIS
|
| 1106 |
+
Dzog DZOG
|
| 1107 |
+
Dzor DZOR
|
| 1108 |
+
Dzus DZU's
|
| 1109 |
+
E. A. EA
|
| 1110 |
+
E.A. EA
|
| 1111 |
+
EAMs EAM's
|
| 1112 |
+
eas EAS
|
| 1113 |
+
Eas EA's
|
| 1114 |
+
Eav EAV
|
| 1115 |
+
E. B. EB
|
| 1116 |
+
E.B. EB
|
| 1117 |
+
Ebn EBN
|
| 1118 |
+
E&BR E and BR
|
| 1119 |
+
Ebru EBRU
|
| 1120 |
+
EBWs EBW's
|
| 1121 |
+
ecc ECC
|
| 1122 |
+
Eccl ECCL
|
| 1123 |
+
ec EC
|
| 1124 |
+
Ec EC
|
| 1125 |
+
E. C. EC
|
| 1126 |
+
E.C. EC
|
| 1127 |
+
ece ECE
|
| 1128 |
+
Ece ECE
|
| 1129 |
+
Ecem ECEM
|
| 1130 |
+
ecg ECG
|
| 1131 |
+
ecma ECMA
|
| 1132 |
+
ECNs ECN's
|
| 1133 |
+
ECP&DA's ECP and DA's
|
| 1134 |
+
eCRM ECRM
|
| 1135 |
+
ect ECT
|
| 1136 |
+
ECVs ECV's
|
| 1137 |
+
edb EDB
|
| 1138 |
+
E. D. ED
|
| 1139 |
+
E.D. ED
|
| 1140 |
+
Edh EDH
|
| 1141 |
+
edhe EDHE
|
| 1142 |
+
EDMs EDM's
|
| 1143 |
+
Edmx EDMX
|
| 1144 |
+
edn EDN
|
| 1145 |
+
Edn EDN
|
| 1146 |
+
eds EDS
|
| 1147 |
+
Eds ED's
|
| 1148 |
+
Edw EDW
|
| 1149 |
+
Eeb EEB
|
| 1150 |
+
E. E. EE
|
| 1151 |
+
E.E. EE
|
| 1152 |
+
Eef EEF
|
| 1153 |
+
Eega EEGA
|
| 1154 |
+
eene EENE
|
| 1155 |
+
eep EEP
|
| 1156 |
+
Ees EE's
|
| 1157 |
+
eeuw EEUW
|
| 1158 |
+
Eeuw EEUW
|
| 1159 |
+
EEZs EEZ's
|
| 1160 |
+
efc EFC
|
| 1161 |
+
ef EF
|
| 1162 |
+
Ef EF
|
| 1163 |
+
E. F. EF
|
| 1164 |
+
E.F. EF
|
| 1165 |
+
eFS EFS
|
| 1166 |
+
Efs EF's
|
| 1167 |
+
Efu EFU
|
| 1168 |
+
Egba EGBA
|
| 1169 |
+
egfl EGFL
|
| 1170 |
+
e.g. for example
|
| 1171 |
+
e. g. for example
|
| 1172 |
+
EG&G EG and G
|
| 1173 |
+
Egi EGI
|
| 1174 |
+
E&GR E and GR
|
| 1175 |
+
egy EGY
|
| 1176 |
+
Egyl EGYL
|
| 1177 |
+
EHAs EHA's
|
| 1178 |
+
E. H. EH
|
| 1179 |
+
E.H. EH
|
| 1180 |
+
ehf EHF
|
| 1181 |
+
Ehttp EHTTP
|
| 1182 |
+
EiCs EIC's
|
| 1183 |
+
E. I. EI
|
| 1184 |
+
E.I. EI
|
| 1185 |
+
eIF EIF
|
| 1186 |
+
Eitr EITR
|
| 1187 |
+
EITs EIT's
|
| 1188 |
+
EJBs EJB's
|
| 1189 |
+
ej EJ
|
| 1190 |
+
E. J. EJ
|
| 1191 |
+
E.J. EJ
|
| 1192 |
+
E. K. EK
|
| 1193 |
+
E.K. EK
|
| 1194 |
+
eki EKI
|
| 1195 |
+
Ekma EKMA
|
| 1196 |
+
Ekow EKOW
|
| 1197 |
+
eks EKS
|
| 1198 |
+
Eks EK's
|
| 1199 |
+
E. L. EL
|
| 1200 |
+
E.L. EL
|
| 1201 |
+
ELTs ELT's
|
| 1202 |
+
ELUs ELU's
|
| 1203 |
+
Embd EMBD
|
| 1204 |
+
eMC EMC
|
| 1205 |
+
EMDs EMD's
|
| 1206 |
+
Emea EMEA
|
| 1207 |
+
E&M E and M
|
| 1208 |
+
E. M. EM
|
| 1209 |
+
E.M. EM
|
| 1210 |
+
Emge EMGE
|
| 1211 |
+
emra EMRA
|
| 1212 |
+
E&NA E and NA
|
| 1213 |
+
Enas ENA's
|
| 1214 |
+
EnBW ENBW
|
| 1215 |
+
EncFS ENCFS
|
| 1216 |
+
Encyc ENCYC
|
| 1217 |
+
E. N. EN
|
| 1218 |
+
E.N. EN
|
| 1219 |
+
Enes ENE's
|
| 1220 |
+
engl ENGL
|
| 1221 |
+
Engl ENGL
|
| 1222 |
+
Engr ENGR
|
| 1223 |
+
Eni ENI
|
| 1224 |
+
enn ENN
|
| 1225 |
+
Enn ENN
|
| 1226 |
+
ens ENS
|
| 1227 |
+
Ens EN's
|
| 1228 |
+
Enso ENSO
|
| 1229 |
+
ENTJs ENTJ's
|
| 1230 |
+
EoD EOD
|
| 1231 |
+
E. O. EO
|
| 1232 |
+
E.O. EO
|
| 1233 |
+
Eois EOI's
|
| 1234 |
+
eok EOK
|
| 1235 |
+
Eole EOLE
|
| 1236 |
+
Eol EOL
|
| 1237 |
+
Eolss EOLS's
|
| 1238 |
+
Eom EOM
|
| 1239 |
+
eop EOP
|
| 1240 |
+
eoptta EOPTTA
|
| 1241 |
+
Eora EORA
|
| 1242 |
+
Eorl EORL
|
| 1243 |
+
Eors EOR's
|
| 1244 |
+
E&P E and P
|
| 1245 |
+
Epe EPE
|
| 1246 |
+
ep EP
|
| 1247 |
+
Ep EP
|
| 1248 |
+
E. P. EP
|
| 1249 |
+
E.P. EP
|
| 1250 |
+
Eph EPH
|
| 1251 |
+
Ephs EPH's
|
| 1252 |
+
epi EPI
|
| 1253 |
+
Epi EPI
|
| 1254 |
+
ePO EPO
|
| 1255 |
+
epos' EPO's
|
| 1256 |
+
epos EPOS
|
| 1257 |
+
Epos EPO's
|
| 1258 |
+
E.P.s EP's
|
| 1259 |
+
eq EQ
|
| 1260 |
+
Eq EQ
|
| 1261 |
+
E. R. ER
|
| 1262 |
+
E.R. ER
|
| 1263 |
+
ERJs ERJ's
|
| 1264 |
+
Eru ERU
|
| 1265 |
+
Eruv ERUV
|
| 1266 |
+
Erv ERV
|
| 1267 |
+
ES3 ES three
|
| 1268 |
+
Esa ESA
|
| 1269 |
+
Esam ESAM
|
| 1270 |
+
Esa's ESA's
|
| 1271 |
+
Esat ESAT
|
| 1272 |
+
ESCs ESC's
|
| 1273 |
+
Esd ESD
|
| 1274 |
+
E. S. ES
|
| 1275 |
+
E.S. ES
|
| 1276 |
+
esi ESI
|
| 1277 |
+
espn ESPN
|
| 1278 |
+
ESPNhttp ESPNHTTP
|
| 1279 |
+
esq ESQ
|
| 1280 |
+
Esq ESQ
|
| 1281 |
+
Esq. esquire
|
| 1282 |
+
Esraa ESRAA
|
| 1283 |
+
Esra ESRA
|
| 1284 |
+
Esref ESREF
|
| 1285 |
+
Esri ESRI
|
| 1286 |
+
estd ESTD
|
| 1287 |
+
Estd ESTD
|
| 1288 |
+
esu ESU
|
| 1289 |
+
Esva ESVA
|
| 1290 |
+
Etad ETAD
|
| 1291 |
+
ETBs ETB's
|
| 1292 |
+
E. T. ET
|
| 1293 |
+
E.T. ET
|
| 1294 |
+
ETFs ETF's
|
| 1295 |
+
Et'hem ETHEM
|
| 1296 |
+
Eti ETI
|
| 1297 |
+
etj ETJ
|
| 1298 |
+
Eto ETO
|
| 1299 |
+
ets ETS
|
| 1300 |
+
Ets ET's
|
| 1301 |
+
ETs ET's
|
| 1302 |
+
ett ETT
|
| 1303 |
+
Ett ETT
|
| 1304 |
+
Ettre ETTRE
|
| 1305 |
+
Etts ETT's
|
| 1306 |
+
Etz ETZ
|
| 1307 |
+
EUBs EUB's
|
| 1308 |
+
E. U. EU
|
| 1309 |
+
E.U. EU
|
| 1310 |
+
eup EUP
|
| 1311 |
+
Eurwg EURWG
|
| 1312 |
+
Euse EUSE
|
| 1313 |
+
Eusi EUSI
|
| 1314 |
+
EvaGT EVAGT
|
| 1315 |
+
E. V. EV
|
| 1316 |
+
E.V. EV
|
| 1317 |
+
evl EVL
|
| 1318 |
+
Evna EVNA
|
| 1319 |
+
evnt EVNT
|
| 1320 |
+
EVs EV's
|
| 1321 |
+
evv EVV
|
| 1322 |
+
Ewa's EWA's
|
| 1323 |
+
E. W. EW
|
| 1324 |
+
E.W. EW
|
| 1325 |
+
Ewha EWHA
|
| 1326 |
+
EWOs EWO's
|
| 1327 |
+
Ewu EWU
|
| 1328 |
+
excl EXCL
|
| 1329 |
+
exd EXD
|
| 1330 |
+
E.X. EX
|
| 1331 |
+
exhb EXHB
|
| 1332 |
+
exh EXH
|
| 1333 |
+
Exptl EXPTL
|
| 1334 |
+
exsul EXSUL
|
| 1335 |
+
E&Y E and Y
|
| 1336 |
+
E. Y. EY
|
| 1337 |
+
Eyk EYK
|
| 1338 |
+
eyu EYU
|
| 1339 |
+
Ezaa EZAA
|
| 1340 |
+
ez EZ
|
| 1341 |
+
Ez EZ
|
| 1342 |
+
Ezh EZH
|
| 1343 |
+
Ezu EZU
|
| 1344 |
+
Ezy EZY
|
| 1345 |
+
Faaa FAAA
|
| 1346 |
+
faa FAA
|
| 1347 |
+
Faa FAA
|
| 1348 |
+
faama FAAMA
|
| 1349 |
+
FabH FABH
|
| 1350 |
+
FabR FABR
|
| 1351 |
+
F.A.B.'s FAB's
|
| 1352 |
+
Fadl FADL
|
| 1353 |
+
fa FA
|
| 1354 |
+
Fa FA
|
| 1355 |
+
F. A. FA
|
| 1356 |
+
F.A. FA
|
| 1357 |
+
Faf FAF
|
| 1358 |
+
Fafhrd FAFHRD
|
| 1359 |
+
fai FAI
|
| 1360 |
+
Fai FAI
|
| 1361 |
+
FAIPs FAIP's
|
| 1362 |
+
Faiq FAIQ
|
| 1363 |
+
fajn FAJN
|
| 1364 |
+
Fal FAL
|
| 1365 |
+
farw FARW
|
| 1366 |
+
fasc FASC
|
| 1367 |
+
Fasc FASC
|
| 1368 |
+
fas FAS
|
| 1369 |
+
Fas FA's
|
| 1370 |
+
FAs FA's
|
| 1371 |
+
FasL FASL
|
| 1372 |
+
F. B. FB
|
| 1373 |
+
F.B. FB
|
| 1374 |
+
F.B.G.s FBG's
|
| 1375 |
+
FBOs FBO's
|
| 1376 |
+
fcb FCB
|
| 1377 |
+
FCBs FCB's
|
| 1378 |
+
F&C F and C
|
| 1379 |
+
fc FC
|
| 1380 |
+
F. C. FC
|
| 1381 |
+
F.C. FC
|
| 1382 |
+
F.C.'s FC's
|
| 1383 |
+
FD&C FD and C
|
| 1384 |
+
FDCPAs FDCPA's
|
| 1385 |
+
F. D. FD
|
| 1386 |
+
F.D. FD
|
| 1387 |
+
FDICs FDIC's
|
| 1388 |
+
FdI FDI
|
| 1389 |
+
F. E. FE
|
| 1390 |
+
F.E. FE
|
| 1391 |
+
FEGs FEG's
|
| 1392 |
+
Fes FE's
|
| 1393 |
+
ffc FFC
|
| 1394 |
+
ff FF
|
| 1395 |
+
F. F. FF
|
| 1396 |
+
F.F. FF
|
| 1397 |
+
ffm FFM
|
| 1398 |
+
FFs FF's
|
| 1399 |
+
F. G. FG
|
| 1400 |
+
F.G. FG
|
| 1401 |
+
fgk FGK
|
| 1402 |
+
FGs FG's
|
| 1403 |
+
F. H. FH
|
| 1404 |
+
F.H. FH
|
| 1405 |
+
fhm FHM
|
| 1406 |
+
fiadh FIADH
|
| 1407 |
+
fia FIA
|
| 1408 |
+
FiBL FIBL
|
| 1409 |
+
Fi'd FID
|
| 1410 |
+
F.I F
|
| 1411 |
+
F&I F and I
|
| 1412 |
+
F. I. FI
|
| 1413 |
+
F.I. FI
|
| 1414 |
+
Figl FIGL
|
| 1415 |
+
fija FIJA
|
| 1416 |
+
Fio FIO
|
| 1417 |
+
FiO FIO
|
| 1418 |
+
F. J. FJ
|
| 1419 |
+
F.J. FJ
|
| 1420 |
+
F. K. FK
|
| 1421 |
+
F.K. FK
|
| 1422 |
+
Fla FLA
|
| 1423 |
+
Fles FLE's
|
| 1424 |
+
fl FL
|
| 1425 |
+
F. L. FL
|
| 1426 |
+
F.L. FL
|
| 1427 |
+
fli FLI
|
| 1428 |
+
flyr FLYR
|
| 1429 |
+
fm FM
|
| 1430 |
+
F. M. FM
|
| 1431 |
+
F.M. FM
|
| 1432 |
+
fMRI FMRI
|
| 1433 |
+
FMs FM's
|
| 1434 |
+
F. N. FN
|
| 1435 |
+
F.N. FN
|
| 1436 |
+
F. O. FO
|
| 1437 |
+
FPDs FPD's
|
| 1438 |
+
fp FP
|
| 1439 |
+
F. P. FP
|
| 1440 |
+
F.P. FP
|
| 1441 |
+
FPGAs FPGA's
|
| 1442 |
+
FPM&SA FPM and SA
|
| 1443 |
+
fps FPS
|
| 1444 |
+
FPSs FPS's
|
| 1445 |
+
F.Q. FQ
|
| 1446 |
+
fr FR
|
| 1447 |
+
F. R. FR
|
| 1448 |
+
F.R. FR
|
| 1449 |
+
frs FRS
|
| 1450 |
+
Fru FRU
|
| 1451 |
+
Frwydr FRWYDR
|
| 1452 |
+
fsf FSF
|
| 1453 |
+
fs FS
|
| 1454 |
+
F. s F's
|
| 1455 |
+
Fs F's
|
| 1456 |
+
F. S. FS
|
| 1457 |
+
F.S. FS
|
| 1458 |
+
fsn FSN
|
| 1459 |
+
FSSs FSS's
|
| 1460 |
+
FTAs FTA's
|
| 1461 |
+
Ft. Fort
|
| 1462 |
+
F. T. FT
|
| 1463 |
+
F.T. FT
|
| 1464 |
+
ftp FTP
|
| 1465 |
+
FtsA FTSA
|
| 1466 |
+
Ftuh FTUH
|
| 1467 |
+
F. V. FV
|
| 1468 |
+
F.V. FV
|
| 1469 |
+
F&W F and W
|
| 1470 |
+
F. W. FW
|
| 1471 |
+
F.W. FW
|
| 1472 |
+
fwr FWR
|
| 1473 |
+
fx FX
|
| 1474 |
+
Fyb FYB
|
| 1475 |
+
F.Y. FY
|
| 1476 |
+
Fyn FYN
|
| 1477 |
+
fyi FYI
|
| 1478 |
+
fyr FYR
|
| 1479 |
+
Fyw FYW
|
| 1480 |
+
F.Z. FZ
|
| 1481 |
+
Gaac GAAC
|
| 1482 |
+
G. A. GA
|
| 1483 |
+
G.A. GA
|
| 1484 |
+
Gbe GBE
|
| 1485 |
+
GbE GBE
|
| 1486 |
+
G. B. GB
|
| 1487 |
+
G.B. GB
|
| 1488 |
+
GB&NDR GB and NDR
|
| 1489 |
+
G&C G and C
|
| 1490 |
+
G. C. GC
|
| 1491 |
+
G.C. GC
|
| 1492 |
+
GCSEs GCSE's
|
| 1493 |
+
GC&SF GC and SF
|
| 1494 |
+
Gdal GDAL
|
| 1495 |
+
Gde GDE
|
| 1496 |
+
gd GD
|
| 1497 |
+
G. D. GD
|
| 1498 |
+
G.D. GD
|
| 1499 |
+
Gdow GDOW
|
| 1500 |
+
GDPs GDP's
|
| 1501 |
+
gdr GDR
|
| 1502 |
+
Gebr GEBR
|
| 1503 |
+
Gebt GEBT
|
| 1504 |
+
Ged GED
|
| 1505 |
+
ge GE
|
| 1506 |
+
G. E. GE
|
| 1507 |
+
G.E. GE
|
| 1508 |
+
Gek GEK
|
| 1509 |
+
Gen. general
|
| 1510 |
+
geq GEQ
|
| 1511 |
+
Geu GEU
|
| 1512 |
+
Gev GEV
|
| 1513 |
+
GeV GEV
|
| 1514 |
+
Gfa GFA
|
| 1515 |
+
GF&A GFANDA
|
| 1516 |
+
G. F. GF
|
| 1517 |
+
G.F. GF
|
| 1518 |
+
G. G. GG
|
| 1519 |
+
G.G. GG
|
| 1520 |
+
Ghe GHE
|
| 1521 |
+
G. H. GH
|
| 1522 |
+
G.H. GH
|
| 1523 |
+
GHGs GHG's
|
| 1524 |
+
Ghir GHIR
|
| 1525 |
+
ghra GHRA
|
| 1526 |
+
GH&SA GH and SA
|
| 1527 |
+
Giei GIEI
|
| 1528 |
+
G. I. GI
|
| 1529 |
+
G.I. GI
|
| 1530 |
+
G. J. GJ
|
| 1531 |
+
G.J. GJ
|
| 1532 |
+
G. K. GK
|
| 1533 |
+
G.K. GK
|
| 1534 |
+
Gla GLA
|
| 1535 |
+
G&L G and L
|
| 1536 |
+
G. L. GL
|
| 1537 |
+
G.L. GL
|
| 1538 |
+
gli GLI
|
| 1539 |
+
Gli GLI
|
| 1540 |
+
Glis GLI's
|
| 1541 |
+
glnA GLNA
|
| 1542 |
+
Glos GLO's
|
| 1543 |
+
gma GMA
|
| 1544 |
+
GmbH GMBH
|
| 1545 |
+
Gmel GMEL
|
| 1546 |
+
gm GM
|
| 1547 |
+
G. M. GM
|
| 1548 |
+
G.M. GM
|
| 1549 |
+
gmin GMIN
|
| 1550 |
+
GMOs GMO's
|
| 1551 |
+
GMs GM's
|
| 1552 |
+
gmt GMT
|
| 1553 |
+
Gmul GMUL
|
| 1554 |
+
gnb GNB
|
| 1555 |
+
G. N. GN
|
| 1556 |
+
G.N. GN
|
| 1557 |
+
GNP&BR GNP and BR
|
| 1558 |
+
gnp GNP
|
| 1559 |
+
GNPs GNP's
|
| 1560 |
+
G.O. GO
|
| 1561 |
+
GPCRs GPCR's
|
| 1562 |
+
GPdI GPDI
|
| 1563 |
+
G&P G and P
|
| 1564 |
+
gp GP
|
| 1565 |
+
G. P. GP
|
| 1566 |
+
G.P. GP
|
| 1567 |
+
GpIIb GPIIB
|
| 1568 |
+
GPMGs GPMG's
|
| 1569 |
+
GPRs GPR's
|
| 1570 |
+
GPUs GPU's
|
| 1571 |
+
G. Q. GQ
|
| 1572 |
+
grac GRAC
|
| 1573 |
+
gra GRA
|
| 1574 |
+
Gra GRA
|
| 1575 |
+
Grbac GRBAC
|
| 1576 |
+
GRBs GRB's
|
| 1577 |
+
grc GRC
|
| 1578 |
+
GRCs GRC's
|
| 1579 |
+
gre GRE
|
| 1580 |
+
Gre GRE
|
| 1581 |
+
gr GR
|
| 1582 |
+
G. R. GR
|
| 1583 |
+
G.R. GR
|
| 1584 |
+
grrl GRRL
|
| 1585 |
+
Gryf GRYF
|
| 1586 |
+
gry GRY
|
| 1587 |
+
Gry GRY
|
| 1588 |
+
grz GRZ
|
| 1589 |
+
G&S G and S
|
| 1590 |
+
Gs G's
|
| 1591 |
+
G. S. GS
|
| 1592 |
+
G.S. GS
|
| 1593 |
+
GSIs GSI's
|
| 1594 |
+
GSOp GSOP
|
| 1595 |
+
GTAs GTA's
|
| 1596 |
+
gt GT
|
| 1597 |
+
G. T. GT
|
| 1598 |
+
G.T. GT
|
| 1599 |
+
GTi GTI
|
| 1600 |
+
GTs GT's
|
| 1601 |
+
G. U. GU
|
| 1602 |
+
G.U. GU
|
| 1603 |
+
GUIs GUI's
|
| 1604 |
+
G. V. GV
|
| 1605 |
+
G.V. GV
|
| 1606 |
+
GvpA GVPA
|
| 1607 |
+
GWe GWE
|
| 1608 |
+
Gwet GWET
|
| 1609 |
+
gw GW
|
| 1610 |
+
G. W. GW
|
| 1611 |
+
G.W. GW
|
| 1612 |
+
Gwi GWI
|
| 1613 |
+
gwr GWR
|
| 1614 |
+
Gy GY
|
| 1615 |
+
G. Y. GY
|
| 1616 |
+
Gyn GYN
|
| 1617 |
+
Gyps GYP's
|
| 1618 |
+
gyu GYU
|
| 1619 |
+
Gyu GYU
|
| 1620 |
+
H. A. HA
|
| 1621 |
+
H.A. HA
|
| 1622 |
+
H&A H and A
|
| 1623 |
+
HBCo HBCO
|
| 1624 |
+
HBGAs HBGA's
|
| 1625 |
+
H. B. HB
|
| 1626 |
+
H.B. HB
|
| 1627 |
+
H&BR H and BR
|
| 1628 |
+
HCEs HCE's
|
| 1629 |
+
H. C. HC
|
| 1630 |
+
H.C. HC
|
| 1631 |
+
hcl HCL
|
| 1632 |
+
HClO HCLO
|
| 1633 |
+
HCoV HCOV
|
| 1634 |
+
HCPs HCP's
|
| 1635 |
+
Hcy HCY
|
| 1636 |
+
Hdad HDAD
|
| 1637 |
+
hDAF HDAF
|
| 1638 |
+
HDDs HDD's
|
| 1639 |
+
hd HD
|
| 1640 |
+
H. D. HD
|
| 1641 |
+
H.D. HD
|
| 1642 |
+
hdh HDH
|
| 1643 |
+
HDi HDI
|
| 1644 |
+
H. E. HE
|
| 1645 |
+
H.E. HE
|
| 1646 |
+
hezb HEZB
|
| 1647 |
+
Hezb HEZB
|
| 1648 |
+
H&F H and F
|
| 1649 |
+
H. F. HF
|
| 1650 |
+
H.F. HF
|
| 1651 |
+
hgcA HGCA
|
| 1652 |
+
hg HG
|
| 1653 |
+
H. G. HG
|
| 1654 |
+
H.G. HG
|
| 1655 |
+
HgO HGO
|
| 1656 |
+
HGPs HGP's
|
| 1657 |
+
HgU HGU
|
| 1658 |
+
HGVs HGV's
|
| 1659 |
+
H&H H and H
|
| 1660 |
+
H. H. HH
|
| 1661 |
+
H.H. HH
|
| 1662 |
+
H. I. HI
|
| 1663 |
+
H.I. HI
|
| 1664 |
+
Hizb HIZB
|
| 1665 |
+
hja HJA
|
| 1666 |
+
H. J. HJ
|
| 1667 |
+
H.J. HJ
|
| 1668 |
+
Hkam HKAM
|
| 1669 |
+
H&K H and K
|
| 1670 |
+
H. K. HK
|
| 1671 |
+
H.K. HK
|
| 1672 |
+
Hla HLA
|
| 1673 |
+
H. L. HL
|
| 1674 |
+
H.L. HL
|
| 1675 |
+
Hluk HLUK
|
| 1676 |
+
hlutr HLUTR
|
| 1677 |
+
Hly HLY
|
| 1678 |
+
Hman HMAN
|
| 1679 |
+
H&M H and M
|
| 1680 |
+
hm HM
|
| 1681 |
+
H. M. HM
|
| 1682 |
+
H.M. HM
|
| 1683 |
+
HMOs HMO's
|
| 1684 |
+
hMRE HMRE
|
| 1685 |
+
H&M's H and M's
|
| 1686 |
+
H. N. HN
|
| 1687 |
+
H.N. HN
|
| 1688 |
+
H. O. HO
|
| 1689 |
+
H.O. HO
|
| 1690 |
+
hpc HPC
|
| 1691 |
+
hp HP
|
| 1692 |
+
H. P. HP
|
| 1693 |
+
H.P. HP
|
| 1694 |
+
H.Q. HQ
|
| 1695 |
+
H&R H and R
|
| 1696 |
+
H. R. HR
|
| 1697 |
+
H.R. HR
|
| 1698 |
+
hroa HROA
|
| 1699 |
+
HRo HRO
|
| 1700 |
+
hrs HRS
|
| 1701 |
+
HRs HR's
|
| 1702 |
+
hscy HSCY
|
| 1703 |
+
Hsee HSEE
|
| 1704 |
+
hs HS
|
| 1705 |
+
Hs H's
|
| 1706 |
+
H. S. HS
|
| 1707 |
+
H.S. HS
|
| 1708 |
+
hsi HSI
|
| 1709 |
+
hSlo HSLO
|
| 1710 |
+
HSPs HSP's
|
| 1711 |
+
HSTs HST's
|
| 1712 |
+
hsv HSV
|
| 1713 |
+
hTAS HTAS
|
| 1714 |
+
HTAs HTA's
|
| 1715 |
+
htc HTC
|
| 1716 |
+
ht HT
|
| 1717 |
+
H. T. HT
|
| 1718 |
+
H.T. HT
|
| 1719 |
+
hti HTI
|
| 1720 |
+
Htin HTIN
|
| 1721 |
+
Htoo HTOO
|
| 1722 |
+
HtrA HTRA
|
| 1723 |
+
HTRs HTR's
|
| 1724 |
+
http HTTP
|
| 1725 |
+
https HTTPS
|
| 1726 |
+
Htwa HTWA
|
| 1727 |
+
H. U. HU
|
| 1728 |
+
HVCs HVC's
|
| 1729 |
+
hvcv HVCV
|
| 1730 |
+
hvem HVEM
|
| 1731 |
+
Hvem HVEM
|
| 1732 |
+
H. V. HV
|
| 1733 |
+
H.V. HV
|
| 1734 |
+
H. W. HW
|
| 1735 |
+
H.W. HW
|
| 1736 |
+
hwy HWY
|
| 1737 |
+
Hwy HWY
|
| 1738 |
+
hxt HXT
|
| 1739 |
+
H. Y. HY
|
| 1740 |
+
H.Y. HY
|
| 1741 |
+
H. Z. HZ
|
| 1742 |
+
HZ&PC HZ and PC
|
| 1743 |
+
iaaf IAAF
|
| 1744 |
+
IaaS IAAS
|
| 1745 |
+
Iaca IACA
|
| 1746 |
+
Iacob IACOB
|
| 1747 |
+
IACTs IACT's
|
| 1748 |
+
Iacub IACUB
|
| 1749 |
+
iagt IAGT
|
| 1750 |
+
I. A. IA
|
| 1751 |
+
I.A. IA
|
| 1752 |
+
Iapa IAPA
|
| 1753 |
+
iar IAR
|
| 1754 |
+
Iar IAR
|
| 1755 |
+
IAUCs IAUC's
|
| 1756 |
+
Iax IAX
|
| 1757 |
+
Ibac IBAC
|
| 1758 |
+
Ibaes IBAE's
|
| 1759 |
+
IBCs IBC's
|
| 1760 |
+
IBDA'A IBDAA
|
| 1761 |
+
Ibda IBDA
|
| 1762 |
+
ibdal IBDAL
|
| 1763 |
+
I. B. IB
|
| 1764 |
+
I.B. IB
|
| 1765 |
+
Ibm IBM
|
| 1766 |
+
Ibne IBNE
|
| 1767 |
+
ibn IBN
|
| 1768 |
+
Ibra IBRA
|
| 1769 |
+
Ibsa IBSA
|
| 1770 |
+
Ibs IB's
|
| 1771 |
+
iBT IBT
|
| 1772 |
+
Ibu IBU
|
| 1773 |
+
iby IBY
|
| 1774 |
+
ICBMs ICBM's
|
| 1775 |
+
Icche ICCHE
|
| 1776 |
+
icf ICF
|
| 1777 |
+
I&C I and C
|
| 1778 |
+
ic IC
|
| 1779 |
+
Ic IC
|
| 1780 |
+
I. C. IC
|
| 1781 |
+
I.C. IC
|
| 1782 |
+
Ici ICI
|
| 1783 |
+
iCN ICN
|
| 1784 |
+
Ico ICO
|
| 1785 |
+
IcRn ICRN
|
| 1786 |
+
ics ICS
|
| 1787 |
+
ICs IC's
|
| 1788 |
+
ICTs ICT's
|
| 1789 |
+
ICTVdB ICTVDB
|
| 1790 |
+
ICv ICV
|
| 1791 |
+
iCyt ICYT
|
| 1792 |
+
Iddaa IDDAA
|
| 1793 |
+
Idd IDD
|
| 1794 |
+
ID'd IDD
|
| 1795 |
+
id ID
|
| 1796 |
+
I. D. ID
|
| 1797 |
+
I.D. ID
|
| 1798 |
+
Idi IDI
|
| 1799 |
+
Idir IDIR
|
| 1800 |
+
IDLHs IDLH's
|
| 1801 |
+
Idm IDM
|
| 1802 |
+
IDPs IDP's
|
| 1803 |
+
ids IDS
|
| 1804 |
+
IDs ID's
|
| 1805 |
+
IDx IDX
|
| 1806 |
+
i.e. that is
|
| 1807 |
+
Ifa IFA
|
| 1808 |
+
ifc IFC
|
| 1809 |
+
IfF IFF
|
| 1810 |
+
Ifft IFFT
|
| 1811 |
+
ifi IFI
|
| 1812 |
+
Ifi IFI
|
| 1813 |
+
IFIs IFI's
|
| 1814 |
+
IfM IFM
|
| 1815 |
+
Ifni IFNI
|
| 1816 |
+
IFNs IFN's
|
| 1817 |
+
Ifop IFOP
|
| 1818 |
+
IFRSs IFRS's
|
| 1819 |
+
Iga IGA
|
| 1820 |
+
IgA IGA
|
| 1821 |
+
IGFs IGF's
|
| 1822 |
+
'ig IG
|
| 1823 |
+
Ig IG
|
| 1824 |
+
I.G. IG
|
| 1825 |
+
igi IGI
|
| 1826 |
+
IgM IGM
|
| 1827 |
+
ign IGN
|
| 1828 |
+
Ign IGN
|
| 1829 |
+
Ih IH
|
| 1830 |
+
I. H. IH
|
| 1831 |
+
ihi IHI
|
| 1832 |
+
ihm IHM
|
| 1833 |
+
ihn IHN
|
| 1834 |
+
Ihn IHN
|
| 1835 |
+
Ihor IHOR
|
| 1836 |
+
Iht IHT
|
| 1837 |
+
IIb IIB
|
| 1838 |
+
IIc IIC
|
| 1839 |
+
IIfx IIFX
|
| 1840 |
+
Iiga IIGA
|
| 1841 |
+
IIga IIGA
|
| 1842 |
+
IIgs IIG's
|
| 1843 |
+
IIGs IIG's
|
| 1844 |
+
IIIb IIIB
|
| 1845 |
+
IIIBy IIIBY
|
| 1846 |
+
IIIc IIIC
|
| 1847 |
+
IIId IIID
|
| 1848 |
+
I. I. II
|
| 1849 |
+
I.I. II
|
| 1850 |
+
ija IJA
|
| 1851 |
+
Ija IJA
|
| 1852 |
+
ij IJ
|
| 1853 |
+
I. J. IJ
|
| 1854 |
+
Ijok IJOK
|
| 1855 |
+
Ijui IJUI
|
| 1856 |
+
Ikh IKH
|
| 1857 |
+
I.K. IK
|
| 1858 |
+
IKr IKR
|
| 1859 |
+
Iksa IKSA
|
| 1860 |
+
Iku IKU
|
| 1861 |
+
Ilbe ILBE
|
| 1862 |
+
IL&FS IL and FS
|
| 1863 |
+
ili ILI
|
| 1864 |
+
Ili ILI
|
| 1865 |
+
I. L. IL
|
| 1866 |
+
I.L. IL
|
| 1867 |
+
Ilm ILM
|
| 1868 |
+
ilu ILU
|
| 1869 |
+
Ilu ILU
|
| 1870 |
+
IMbd IMBD
|
| 1871 |
+
imc IMC
|
| 1872 |
+
imdb IMDB
|
| 1873 |
+
IMDb. IMDB
|
| 1874 |
+
IMDb IMDB
|
| 1875 |
+
ime IME
|
| 1876 |
+
I&M I and M
|
| 1877 |
+
I. M. IM
|
| 1878 |
+
I.M. IM
|
| 1879 |
+
Iml IML
|
| 1880 |
+
Imm IMM
|
| 1881 |
+
Imms' IMM's
|
| 1882 |
+
imoa IMOA
|
| 1883 |
+
impr IMPR
|
| 1884 |
+
Impr IMPR
|
| 1885 |
+
iMSNs IMSN's
|
| 1886 |
+
Imst IMST
|
| 1887 |
+
Inba INBA
|
| 1888 |
+
inb INB
|
| 1889 |
+
incl INCL
|
| 1890 |
+
ind IND
|
| 1891 |
+
Ind IND
|
| 1892 |
+
Infs INF's
|
| 1893 |
+
inHg INHG
|
| 1894 |
+
I. N. IN
|
| 1895 |
+
I.N. IN
|
| 1896 |
+
InlB INLB
|
| 1897 |
+
InP INP
|
| 1898 |
+
Inre INRE
|
| 1899 |
+
Inspx INSPX
|
| 1900 |
+
Ints INT's
|
| 1901 |
+
INTs INT's
|
| 1902 |
+
Intu INTU
|
| 1903 |
+
inv INV
|
| 1904 |
+
Ioba IOBA
|
| 1905 |
+
IODs IOD's
|
| 1906 |
+
io. IO
|
| 1907 |
+
io IO
|
| 1908 |
+
.I.o. IO
|
| 1909 |
+
Io. IO
|
| 1910 |
+
Io IO
|
| 1911 |
+
.IO IO
|
| 1912 |
+
I/O IO
|
| 1913 |
+
Ioka IOKA
|
| 1914 |
+
Iok IOK
|
| 1915 |
+
IoM IOM
|
| 1916 |
+
IOPs IOP's
|
| 1917 |
+
iOS IOS
|
| 1918 |
+
Io's IO's
|
| 1919 |
+
I/Os IO's
|
| 1920 |
+
I.O.'s IO's
|
| 1921 |
+
Iosu IOSU
|
| 1922 |
+
IoT IOT
|
| 1923 |
+
IoW IOW
|
| 1924 |
+
IPCs IPC's
|
| 1925 |
+
ip IP
|
| 1926 |
+
Ip IP
|
| 1927 |
+
I.P. IP
|
| 1928 |
+
Ipo IPO
|
| 1929 |
+
IPPs IPP's
|
| 1930 |
+
Ippu IPPU
|
| 1931 |
+
iPPV IPPV
|
| 1932 |
+
iPSC IPSC
|
| 1933 |
+
iPSCs IPSC's
|
| 1934 |
+
ipse IPSE
|
| 1935 |
+
iPS IPS
|
| 1936 |
+
IPs IP's
|
| 1937 |
+
IPv IPV
|
| 1938 |
+
iQ IQ
|
| 1939 |
+
I.Q. IQ
|
| 1940 |
+
Irgm IRGM
|
| 1941 |
+
Irig IRIG
|
| 1942 |
+
Iril IRIL
|
| 1943 |
+
i'r IR
|
| 1944 |
+
ir IR
|
| 1945 |
+
Ir IR
|
| 1946 |
+
I. R. IR
|
| 1947 |
+
I.R. IR
|
| 1948 |
+
Irla IRLA
|
| 1949 |
+
Irmis IRMI's
|
| 1950 |
+
iro IRO
|
| 1951 |
+
Iro IRO
|
| 1952 |
+
Irra IRRA
|
| 1953 |
+
IRs IR's
|
| 1954 |
+
iru IRU
|
| 1955 |
+
Iru IRU
|
| 1956 |
+
ISAv ISAV
|
| 1957 |
+
Isba ISBA
|
| 1958 |
+
isbn ISBN
|
| 1959 |
+
ISBNs ISBN's
|
| 1960 |
+
isCf ISCF
|
| 1961 |
+
iSC ISC
|
| 1962 |
+
Isc ISC
|
| 1963 |
+
Isd ISD
|
| 1964 |
+
isdn ISDN
|
| 1965 |
+
Isgec ISGEC
|
| 1966 |
+
ishq ISHQ
|
| 1967 |
+
Ishq ISHQ
|
| 1968 |
+
I. S. IS
|
| 1969 |
+
I.S. IS
|
| 1970 |
+
Isl ISL
|
| 1971 |
+
ISMNs ISMN's
|
| 1972 |
+
ISPs ISP's
|
| 1973 |
+
Isra'il ISRAIL
|
| 1974 |
+
Isra ISRA
|
| 1975 |
+
iss ISS
|
| 1976 |
+
Iss IS's
|
| 1977 |
+
ISSNs ISSN's
|
| 1978 |
+
Isu ISU
|
| 1979 |
+
Ite ITE
|
| 1980 |
+
ITHs ITH's
|
| 1981 |
+
iti ITI
|
| 1982 |
+
Iti ITI
|
| 1983 |
+
I.T. IT
|
| 1984 |
+
itk ITK
|
| 1985 |
+
Itk ITK
|
| 1986 |
+
ITNNs ITNN's
|
| 1987 |
+
Itoi ITOI
|
| 1988 |
+
iTP ITP
|
| 1989 |
+
Itse ITSE
|
| 1990 |
+
itt ITT
|
| 1991 |
+
Itu ITU
|
| 1992 |
+
Itz ITZ
|
| 1993 |
+
Iucn IUCN
|
| 1994 |
+
IUDs IUD's
|
| 1995 |
+
Iuz IUZ
|
| 1996 |
+
I. V. IV
|
| 1997 |
+
I.V. IV
|
| 1998 |
+
IVs IV's
|
| 1999 |
+
Ivu IVU
|
| 2000 |
+
Iwas IWA's
|
| 2001 |
+
Iwaz IWAZ
|
| 2002 |
+
IWBs IWB's
|
| 2003 |
+
iwi IWI
|
| 2004 |
+
iw IW
|
| 2005 |
+
I. W. IW
|
| 2006 |
+
iwrg IWRG
|
| 2007 |
+
iwspy IWSPY
|
| 2008 |
+
Iwuh IWUH
|
| 2009 |
+
IXb IXB
|
| 2010 |
+
IXBs IXB's
|
| 2011 |
+
IXCs IXC's
|
| 2012 |
+
IXe IXE
|
| 2013 |
+
iXL IXL
|
| 2014 |
+
ixtle IXTLE
|
| 2015 |
+
Iya IYA
|
| 2016 |
+
Iyar IYAR
|
| 2017 |
+
iyem IYEM
|
| 2018 |
+
Iyi IYI
|
| 2019 |
+
iy IY
|
| 2020 |
+
I. Y. IY
|
| 2021 |
+
I.Y. IY
|
| 2022 |
+
Jaf JAF
|
| 2023 |
+
J. A. JA
|
| 2024 |
+
J&B J and B
|
| 2025 |
+
jb JB
|
| 2026 |
+
J. B. JB
|
| 2027 |
+
J.B. JB
|
| 2028 |
+
jcis JCIS
|
| 2029 |
+
jc JC
|
| 2030 |
+
J. C. JC
|
| 2031 |
+
J.C. JC
|
| 2032 |
+
JCRs JCR's
|
| 2033 |
+
JdeBP JDEBP
|
| 2034 |
+
jdi JDI
|
| 2035 |
+
jd JD
|
| 2036 |
+
J. D. JD
|
| 2037 |
+
J.D. JD
|
| 2038 |
+
jdk JDK
|
| 2039 |
+
J&D's J and D's
|
| 2040 |
+
J.D.s JD's
|
| 2041 |
+
J. E. JE
|
| 2042 |
+
J.E. JE
|
| 2043 |
+
jf JF
|
| 2044 |
+
J. F. JF
|
| 2045 |
+
J.F. JF
|
| 2046 |
+
J. G. JG
|
| 2047 |
+
J.G. JG
|
| 2048 |
+
jh JH
|
| 2049 |
+
J. H. JH
|
| 2050 |
+
J.H. JH
|
| 2051 |
+
JHs JH's
|
| 2052 |
+
JHSVs JHSV's
|
| 2053 |
+
JHud JHUD
|
| 2054 |
+
J. I. JI
|
| 2055 |
+
J.I. JI
|
| 2056 |
+
J&J JANDJ
|
| 2057 |
+
J. J. JJ
|
| 2058 |
+
J.J. JJ
|
| 2059 |
+
Jka JKA
|
| 2060 |
+
jkd JKD
|
| 2061 |
+
J&K J and K
|
| 2062 |
+
J. K. JK
|
| 2063 |
+
J.K. JK
|
| 2064 |
+
jkx JKX
|
| 2065 |
+
J. L. JL
|
| 2066 |
+
J.L. JL
|
| 2067 |
+
J. M. JM
|
| 2068 |
+
J.M. JM
|
| 2069 |
+
jnb JNB
|
| 2070 |
+
J. N. JN
|
| 2071 |
+
J.N. JN
|
| 2072 |
+
Jno JNO
|
| 2073 |
+
jnr JNR
|
| 2074 |
+
J. O. JO
|
| 2075 |
+
J.O. JO
|
| 2076 |
+
jpg JPG
|
| 2077 |
+
J&P J and P
|
| 2078 |
+
jp JP
|
| 2079 |
+
J.P. JP
|
| 2080 |
+
J.Q. JQ
|
| 2081 |
+
J&R J and R
|
| 2082 |
+
J. R. JR
|
| 2083 |
+
J.R. JR
|
| 2084 |
+
Jr. junior
|
| 2085 |
+
jr. junior
|
| 2086 |
+
Jr junior
|
| 2087 |
+
jr junior
|
| 2088 |
+
J.R.'s JR's
|
| 2089 |
+
jsb JSB
|
| 2090 |
+
Js J's
|
| 2091 |
+
J. S. JS
|
| 2092 |
+
J.S. JS
|
| 2093 |
+
J&T J and T
|
| 2094 |
+
J. T. JT
|
| 2095 |
+
J.T. JT
|
| 2096 |
+
JT&KW JT and KW
|
| 2097 |
+
J. U. JU
|
| 2098 |
+
J&V J and V
|
| 2099 |
+
J. V. JV
|
| 2100 |
+
J.V. JV
|
| 2101 |
+
Jwa JWA
|
| 2102 |
+
J. W. JW
|
| 2103 |
+
J.W. JW
|
| 2104 |
+
jx JX
|
| 2105 |
+
J. Y. JY
|
| 2106 |
+
J.Y. JY
|
| 2107 |
+
Jym JYM
|
| 2108 |
+
Jymn JYMN
|
| 2109 |
+
J. Z. JZ
|
| 2110 |
+
J.Z. JZ
|
| 2111 |
+
K8S KUBERNETES
|
| 2112 |
+
K. A. KA
|
| 2113 |
+
K.A. KA
|
| 2114 |
+
kbi KBI
|
| 2115 |
+
K&B K and B
|
| 2116 |
+
K. B. KB
|
| 2117 |
+
K.B. KB
|
| 2118 |
+
K. C. KC
|
| 2119 |
+
K.C. KC
|
| 2120 |
+
K.C.'s KC's
|
| 2121 |
+
kDa KDA
|
| 2122 |
+
kdal KDAL
|
| 2123 |
+
K&D K and D
|
| 2124 |
+
kd KD
|
| 2125 |
+
K. D. KD
|
| 2126 |
+
K.D. KD
|
| 2127 |
+
K. D.'s KD's
|
| 2128 |
+
K.D.'s KD's
|
| 2129 |
+
ke KE
|
| 2130 |
+
Ke KE
|
| 2131 |
+
K. E. KE
|
| 2132 |
+
K.E. KE
|
| 2133 |
+
kfc KFC
|
| 2134 |
+
K.F. KF
|
| 2135 |
+
kgr KGR
|
| 2136 |
+
kgt KGT
|
| 2137 |
+
KgU KGU
|
| 2138 |
+
kgv KGV
|
| 2139 |
+
Khizr KHIZR
|
| 2140 |
+
K. H. KH
|
| 2141 |
+
K.H. KH
|
| 2142 |
+
Khlav KHLAV
|
| 2143 |
+
Khmu KHMU
|
| 2144 |
+
Khri KHRI
|
| 2145 |
+
Khru KHRU
|
| 2146 |
+
K. I. KI
|
| 2147 |
+
K.I. KI
|
| 2148 |
+
Kjer KJER
|
| 2149 |
+
kj KJ
|
| 2150 |
+
K. J. KJ
|
| 2151 |
+
K.J. KJ
|
| 2152 |
+
Kjop KJOP
|
| 2153 |
+
KJo's KJO's
|
| 2154 |
+
K. K. KK
|
| 2155 |
+
K.K. KK
|
| 2156 |
+
Kle KLE
|
| 2157 |
+
kl KL
|
| 2158 |
+
K. L. KL
|
| 2159 |
+
K.L. KL
|
| 2160 |
+
K&M K and M
|
| 2161 |
+
km KM
|
| 2162 |
+
K. M. KM
|
| 2163 |
+
K.M. KM
|
| 2164 |
+
K&N K and N
|
| 2165 |
+
kn KN
|
| 2166 |
+
K. N. KN
|
| 2167 |
+
K.N. KN
|
| 2168 |
+
k'o KO
|
| 2169 |
+
K. O. KO
|
| 2170 |
+
K.O. KO
|
| 2171 |
+
KPIs KPI's
|
| 2172 |
+
K&P K and P
|
| 2173 |
+
K. P. KP
|
| 2174 |
+
K.P. KP
|
| 2175 |
+
Kppen KPPEN
|
| 2176 |
+
kptm KPTM
|
| 2177 |
+
krc KRC
|
| 2178 |
+
KRCs KRC's
|
| 2179 |
+
K.R.I.T.'s KRIT's
|
| 2180 |
+
Krka KRKA
|
| 2181 |
+
kr KR
|
| 2182 |
+
K. R. KR
|
| 2183 |
+
K.R. KR
|
| 2184 |
+
Krne KRNE
|
| 2185 |
+
kroz KROZ
|
| 2186 |
+
Kroz KROZ
|
| 2187 |
+
Kru KRU
|
| 2188 |
+
ksa KSA
|
| 2189 |
+
kset KSET
|
| 2190 |
+
Kseur KSEUR
|
| 2191 |
+
Ksevt KSEVT
|
| 2192 |
+
ks KS
|
| 2193 |
+
K. S. KS
|
| 2194 |
+
K.S. KS
|
| 2195 |
+
Ktav KTAV
|
| 2196 |
+
KT&K KT and K
|
| 2197 |
+
kt KT
|
| 2198 |
+
K. T. KT
|
| 2199 |
+
K.T. KT
|
| 2200 |
+
Kuaa KUAA
|
| 2201 |
+
Kud KUD
|
| 2202 |
+
kuih KUIH
|
| 2203 |
+
K. U. KU
|
| 2204 |
+
K.U. KU
|
| 2205 |
+
Kutb KUTB
|
| 2206 |
+
Kvik KVIK
|
| 2207 |
+
Kvit KVIT
|
| 2208 |
+
K. V. KV
|
| 2209 |
+
K.V. KV
|
| 2210 |
+
Kvyat KVYAT
|
| 2211 |
+
kwa KWA
|
| 2212 |
+
kwe KWE
|
| 2213 |
+
Kyse KYSE
|
| 2214 |
+
kyt KYT
|
| 2215 |
+
Kyt KYT
|
| 2216 |
+
kz KZ
|
| 2217 |
+
K. Z. KZ
|
| 2218 |
+
L. A. LA
|
| 2219 |
+
L.A.'s LA's
|
| 2220 |
+
Lay's LAY's
|
| 2221 |
+
LBi LBI
|
| 2222 |
+
L. B. LB
|
| 2223 |
+
L.B. LB
|
| 2224 |
+
LBPs LBP's
|
| 2225 |
+
LCAs LCA's
|
| 2226 |
+
lcc LCC
|
| 2227 |
+
LCCs LCC's
|
| 2228 |
+
LC&DR LC and DR
|
| 2229 |
+
LCDs LCD's
|
| 2230 |
+
LCIs LCI's
|
| 2231 |
+
L. C. LC
|
| 2232 |
+
L.C. LC
|
| 2233 |
+
lcn LCN
|
| 2234 |
+
LCSs LCS's
|
| 2235 |
+
LCTs LCT's
|
| 2236 |
+
LCVPs LCVP's
|
| 2237 |
+
Lda LDA
|
| 2238 |
+
LDCs LDC's
|
| 2239 |
+
L. D. LD
|
| 2240 |
+
L.D. LD
|
| 2241 |
+
L. E. LE
|
| 2242 |
+
L.E. LE
|
| 2243 |
+
LFFCs LFFC's
|
| 2244 |
+
L. F. LF
|
| 2245 |
+
L.F. LF
|
| 2246 |
+
LFs LF's
|
| 2247 |
+
LFSRs LFSR's
|
| 2248 |
+
L. G. LG
|
| 2249 |
+
L.G. LG
|
| 2250 |
+
LGMs LGM's
|
| 2251 |
+
LG&RDD LG and RDD
|
| 2252 |
+
LGs LG's
|
| 2253 |
+
LGUs LGU's
|
| 2254 |
+
LGVs LGV's
|
| 2255 |
+
Lha LHA
|
| 2256 |
+
L. H. LH
|
| 2257 |
+
L.H. LH
|
| 2258 |
+
L. I. LI
|
| 2259 |
+
L.I. LI
|
| 2260 |
+
Lje LJE
|
| 2261 |
+
L. J. LJ
|
| 2262 |
+
L.J. LJ
|
| 2263 |
+
L. K. LK
|
| 2264 |
+
lks LKS
|
| 2265 |
+
Llapi LLAPI
|
| 2266 |
+
lle LLE
|
| 2267 |
+
lli LLI
|
| 2268 |
+
L&L L and L
|
| 2269 |
+
L. L. LL
|
| 2270 |
+
L.L. LL
|
| 2271 |
+
llp LLP
|
| 2272 |
+
llu LLU
|
| 2273 |
+
LMGs LMG's
|
| 2274 |
+
lm LM
|
| 2275 |
+
L. M. LM
|
| 2276 |
+
L.M. LM
|
| 2277 |
+
LMPs LMP's
|
| 2278 |
+
LMQs LMQ's
|
| 2279 |
+
LnAIB LNAIB
|
| 2280 |
+
L&N L and N
|
| 2281 |
+
L. N. LN
|
| 2282 |
+
L.N. LN
|
| 2283 |
+
L.O.C.'s LOC's
|
| 2284 |
+
Lokk LOKK
|
| 2285 |
+
l'OL LOL
|
| 2286 |
+
L. O. LO
|
| 2287 |
+
L.O. LO
|
| 2288 |
+
LPARs LPAR's
|
| 2289 |
+
L&P L and P
|
| 2290 |
+
lp LP
|
| 2291 |
+
L. P. LP
|
| 2292 |
+
L.P. LP
|
| 2293 |
+
L&PM L and PM
|
| 2294 |
+
LPMud LPMUD
|
| 2295 |
+
LPs LP's
|
| 2296 |
+
LPThe LPTHE
|
| 2297 |
+
lr LR
|
| 2298 |
+
L. R. LR
|
| 2299 |
+
L.R. LR
|
| 2300 |
+
LRTs LRT's
|
| 2301 |
+
LRVs LRV's
|
| 2302 |
+
LSDs LSD's
|
| 2303 |
+
LSi LSI
|
| 2304 |
+
ls LS
|
| 2305 |
+
Ls L's
|
| 2306 |
+
L. S. LS
|
| 2307 |
+
L.S. LS
|
| 2308 |
+
LSTs LST's
|
| 2309 |
+
LSVCCs LSVCC's
|
| 2310 |
+
Ltda LTDA
|
| 2311 |
+
Ltd. limited
|
| 2312 |
+
L&T L and T
|
| 2313 |
+
Lt. lieutenant
|
| 2314 |
+
lt LT
|
| 2315 |
+
L. T. LT
|
| 2316 |
+
L.T. LT
|
| 2317 |
+
ltoh LTOH
|
| 2318 |
+
L. U. LU
|
| 2319 |
+
lv LV
|
| 2320 |
+
L. V. LV
|
| 2321 |
+
L.V. LV
|
| 2322 |
+
L. W. LW
|
| 2323 |
+
L.W. LW
|
| 2324 |
+
L.Y. LY
|
| 2325 |
+
L&YR L and YR
|
| 2326 |
+
M. A. MA
|
| 2327 |
+
M.A. MA
|
| 2328 |
+
MAX-Q MAXQ
|
| 2329 |
+
M&A M and A
|
| 2330 |
+
Mbewu MBEWU
|
| 2331 |
+
mbi MBI
|
| 2332 |
+
M. B. MB
|
| 2333 |
+
M.B. MB
|
| 2334 |
+
mBo MBO
|
| 2335 |
+
Mbre MBRE
|
| 2336 |
+
mbr MBR
|
| 2337 |
+
MCCs MCC's
|
| 2338 |
+
M. C. MC
|
| 2339 |
+
M.C. MC
|
| 2340 |
+
MCs MC's
|
| 2341 |
+
mcyG MCYG
|
| 2342 |
+
mdb MDB
|
| 2343 |
+
MDCs MDC's
|
| 2344 |
+
mdDA MDDA
|
| 2345 |
+
MD&DI MD and DI
|
| 2346 |
+
Mde MDE
|
| 2347 |
+
MDGs MDG's
|
| 2348 |
+
MDHUs MDHU's
|
| 2349 |
+
mDia MDIA
|
| 2350 |
+
MDic MDIC
|
| 2351 |
+
mdla MDLA
|
| 2352 |
+
md MD
|
| 2353 |
+
M. D. MD
|
| 2354 |
+
M.D. MD
|
| 2355 |
+
mdr MDR
|
| 2356 |
+
M. E. ME
|
| 2357 |
+
M.E. ME
|
| 2358 |
+
MFDs MFD's
|
| 2359 |
+
MFe MFE
|
| 2360 |
+
M. F. MF
|
| 2361 |
+
M.F. MF
|
| 2362 |
+
MFTs MFT's
|
| 2363 |
+
Mgadla MGADLA
|
| 2364 |
+
Mgal MGAL
|
| 2365 |
+
mga MGA
|
| 2366 |
+
Mga MGA
|
| 2367 |
+
Mgbo MGBO
|
| 2368 |
+
MGen MGEN
|
| 2369 |
+
M&G M and G
|
| 2370 |
+
M. G. MG
|
| 2371 |
+
M.G. MG
|
| 2372 |
+
M&GN M and GN
|
| 2373 |
+
M&GR's M and GR's
|
| 2374 |
+
Mha MHA
|
| 2375 |
+
MHCs MHC's
|
| 2376 |
+
MH&L MH and L
|
| 2377 |
+
M&H M and H
|
| 2378 |
+
M. H. MH
|
| 2379 |
+
M.H. MH
|
| 2380 |
+
Mhor MHOR
|
| 2381 |
+
Mhow MHOW
|
| 2382 |
+
M.I.A.'s MIA's
|
| 2383 |
+
M&I M and I
|
| 2384 |
+
M. I. MI
|
| 2385 |
+
M.I. MI
|
| 2386 |
+
M&J M and J
|
| 2387 |
+
M. J. MJ
|
| 2388 |
+
M.J. MJ
|
| 2389 |
+
M. K. MK
|
| 2390 |
+
M.K. MK
|
| 2391 |
+
MKs MK's
|
| 2392 |
+
MLAs MLA's
|
| 2393 |
+
mlc MLC
|
| 2394 |
+
MLCs MLC's
|
| 2395 |
+
mlg MLG
|
| 2396 |
+
mli MLI
|
| 2397 |
+
Mlle MLLE
|
| 2398 |
+
M&L M and L
|
| 2399 |
+
M. L. ML
|
| 2400 |
+
M.L. ML
|
| 2401 |
+
MLPs MLP's
|
| 2402 |
+
MM&A MMANDA
|
| 2403 |
+
M&M M and M
|
| 2404 |
+
M. M. MM
|
| 2405 |
+
M.M. MM
|
| 2406 |
+
M&M's M and M's
|
| 2407 |
+
MNCs MNC's
|
| 2408 |
+
M&NF M and NF
|
| 2409 |
+
M. N. MN
|
| 2410 |
+
M.N. MN
|
| 2411 |
+
M.O.G.U.E.R.A.'s MOGUERA's
|
| 2412 |
+
M. O. MO
|
| 2413 |
+
M.O. MO
|
| 2414 |
+
MpA MPA
|
| 2415 |
+
MPAs MPA's
|
| 2416 |
+
MPBu MPBU
|
| 2417 |
+
MP&I MP and I
|
| 2418 |
+
MPi MPI
|
| 2419 |
+
MPLMs MPLM's
|
| 2420 |
+
M&P M and P
|
| 2421 |
+
M. P. MP
|
| 2422 |
+
M.P. MP
|
| 2423 |
+
MPPs MPP's
|
| 2424 |
+
M.P.'s MP's
|
| 2425 |
+
MPs MP's
|
| 2426 |
+
MPThe MPTHE
|
| 2427 |
+
Mpu MPU
|
| 2428 |
+
M. Q. MQ
|
| 2429 |
+
Mra MRA
|
| 2430 |
+
MRBs MRB's
|
| 2431 |
+
mre MRE
|
| 2432 |
+
MR&LE MR and LE
|
| 2433 |
+
Mr. mister
|
| 2434 |
+
M. R. MR
|
| 2435 |
+
M.R. MR
|
| 2436 |
+
mRNA MRNA
|
| 2437 |
+
mRNAs MRNA's
|
| 2438 |
+
Mrs. misses
|
| 2439 |
+
MRTs MRT's
|
| 2440 |
+
msd MSD
|
| 2441 |
+
Mse MSE
|
| 2442 |
+
M&S M and S
|
| 2443 |
+
Ms. miss
|
| 2444 |
+
M. S. MS
|
| 2445 |
+
M.S. MS
|
| 2446 |
+
MSPs MSP's
|
| 2447 |
+
mst MST
|
| 2448 |
+
Mta MTA
|
| 2449 |
+
MTAs MTA's
|
| 2450 |
+
M&T M and T
|
| 2451 |
+
M. T. MT
|
| 2452 |
+
M.T. MT
|
| 2453 |
+
Mtor MTOR
|
| 2454 |
+
mtvU MTVU
|
| 2455 |
+
MTVu MTVU
|
| 2456 |
+
M. U. MU
|
| 2457 |
+
M.U.s MU's
|
| 2458 |
+
MVMs MVM's
|
| 2459 |
+
M. V. MV
|
| 2460 |
+
M.V. MV
|
| 2461 |
+
MVPs MVP's
|
| 2462 |
+
MVs MV's
|
| 2463 |
+
MWe MWE
|
| 2464 |
+
M. W. MW
|
| 2465 |
+
M.W. MW
|
| 2466 |
+
M. X. MX
|
| 2467 |
+
myb MYB
|
| 2468 |
+
myc MYC
|
| 2469 |
+
Myc MYC
|
| 2470 |
+
MyDD MYDD
|
| 2471 |
+
M. Y. MY
|
| 2472 |
+
M.Y. MY
|
| 2473 |
+
MySQL MYSQL
|
| 2474 |
+
M. Z. MZ
|
| 2475 |
+
N. A. NA
|
| 2476 |
+
N.A. NA
|
| 2477 |
+
N.B.A.'s NBA's
|
| 2478 |
+
NBAs NBA's
|
| 2479 |
+
N. B. NB
|
| 2480 |
+
N.B. NB
|
| 2481 |
+
nbs NBS
|
| 2482 |
+
NBTwo NBTWO
|
| 2483 |
+
NCAAs NCAA's
|
| 2484 |
+
NCCs NCC's
|
| 2485 |
+
N. C. NC
|
| 2486 |
+
N.C. NC
|
| 2487 |
+
NCOs NCO's
|
| 2488 |
+
N. D. ND
|
| 2489 |
+
N.D. ND
|
| 2490 |
+
N. E. NE
|
| 2491 |
+
N.E. NE
|
| 2492 |
+
ner NER
|
| 2493 |
+
NFATc NFATC
|
| 2494 |
+
nfed NFED
|
| 2495 |
+
N. F. NF
|
| 2496 |
+
N.F. NF
|
| 2497 |
+
Nge NGE
|
| 2498 |
+
N. G. NG
|
| 2499 |
+
N.G. NG
|
| 2500 |
+
NGOs NGO's
|
| 2501 |
+
Nha NHA
|
| 2502 |
+
NHCEs NHCE's
|
| 2503 |
+
NHCs NHC's
|
| 2504 |
+
nhi NHI
|
| 2505 |
+
NHM&W NHM and W
|
| 2506 |
+
N. H. NH
|
| 2507 |
+
N.H. NH
|
| 2508 |
+
NHPs NHP's
|
| 2509 |
+
N. I. NI
|
| 2510 |
+
N.I. NI
|
| 2511 |
+
N'I NI
|
| 2512 |
+
N. J. NJ
|
| 2513 |
+
N.J. NJ
|
| 2514 |
+
Njoo NJOO
|
| 2515 |
+
N.J.'s NJ's
|
| 2516 |
+
N. K. NK
|
| 2517 |
+
N.K. NK
|
| 2518 |
+
nkvd NKVD
|
| 2519 |
+
nkv NKV
|
| 2520 |
+
N. L. NL
|
| 2521 |
+
N.L. NL
|
| 2522 |
+
NLRs NLR's
|
| 2523 |
+
N. M. NM
|
| 2524 |
+
N.M. NM
|
| 2525 |
+
N. N. NN
|
| 2526 |
+
N.N. NN
|
| 2527 |
+
NPCs NPC's
|
| 2528 |
+
NPMs NPM's
|
| 2529 |
+
N. P. NP
|
| 2530 |
+
N.P. NP
|
| 2531 |
+
NPs NP's
|
| 2532 |
+
N. Q. NQ
|
| 2533 |
+
nri NRI
|
| 2534 |
+
Nri NRI
|
| 2535 |
+
NRIs NRI's
|
| 2536 |
+
NRJs NRJ's
|
| 2537 |
+
nr NR
|
| 2538 |
+
N. R. NR
|
| 2539 |
+
N.R. NR
|
| 2540 |
+
N. S. NS
|
| 2541 |
+
N.S. NS
|
| 2542 |
+
NSOs NSO's
|
| 2543 |
+
Nta NTA
|
| 2544 |
+
ntb NTB
|
| 2545 |
+
N. T. NT
|
| 2546 |
+
N.T. NT
|
| 2547 |
+
ntw NTW
|
| 2548 |
+
N.U. NU
|
| 2549 |
+
NvDA's NVDA's
|
| 2550 |
+
N. V. NV
|
| 2551 |
+
N.V. NV
|
| 2552 |
+
nwa NWA
|
| 2553 |
+
N&W N and W
|
| 2554 |
+
N. W. NW
|
| 2555 |
+
N.W. NW
|
| 2556 |
+
nyc NYC
|
| 2557 |
+
N. Y. NY
|
| 2558 |
+
N.Y. NY
|
| 2559 |
+
NX-SOC NXSOC
|
| 2560 |
+
N'Zif NZIF
|
| 2561 |
+
NZiK NZIK
|
| 2562 |
+
N'Zi NZI
|
| 2563 |
+
N.Z. NZ
|
| 2564 |
+
O. A. OA
|
| 2565 |
+
O.A. OA
|
| 2566 |
+
obl OBL
|
| 2567 |
+
Oblt OBLT
|
| 2568 |
+
O.B. OB
|
| 2569 |
+
O. C. OC
|
| 2570 |
+
O.C. OC
|
| 2571 |
+
Octl OCTL
|
| 2572 |
+
O. D. OD
|
| 2573 |
+
O.E. OE
|
| 2574 |
+
O.F. OF
|
| 2575 |
+
ofr OFR
|
| 2576 |
+
O&G O and G
|
| 2577 |
+
O. G. OG
|
| 2578 |
+
O.G. OG
|
| 2579 |
+
O. H. OH
|
| 2580 |
+
O.H. OH
|
| 2581 |
+
O. I. OI
|
| 2582 |
+
O.I. OI
|
| 2583 |
+
O. J. OJ
|
| 2584 |
+
O.J. OJ
|
| 2585 |
+
OK'd OKD
|
| 2586 |
+
OKd OKD
|
| 2587 |
+
oke OKE
|
| 2588 |
+
Oke OKE
|
| 2589 |
+
O&K O and K
|
| 2590 |
+
O. K. OK
|
| 2591 |
+
O.K. OK
|
| 2592 |
+
O. L. OL
|
| 2593 |
+
O.L. OL
|
| 2594 |
+
Olo OLO
|
| 2595 |
+
Olov OLOV
|
| 2596 |
+
ols OLS
|
| 2597 |
+
OLs OL's
|
| 2598 |
+
olvwm OLVWM
|
| 2599 |
+
olwm OLWM
|
| 2600 |
+
O&MFL O and MFL
|
| 2601 |
+
omg OMG
|
| 2602 |
+
OMGs OMG's
|
| 2603 |
+
O. M. OM
|
| 2604 |
+
O.M. OM
|
| 2605 |
+
OmOm OMOM
|
| 2606 |
+
Om's OM's
|
| 2607 |
+
oncu ONCU
|
| 2608 |
+
ond OND
|
| 2609 |
+
onf ONF
|
| 2610 |
+
O. N. ON
|
| 2611 |
+
O.N. ON
|
| 2612 |
+
O&O O and O
|
| 2613 |
+
O. O. OO
|
| 2614 |
+
O.O. OO
|
| 2615 |
+
Oop OOP
|
| 2616 |
+
oor OOR
|
| 2617 |
+
oose OOSE
|
| 2618 |
+
Oo's OO's
|
| 2619 |
+
Ootw OOTW
|
| 2620 |
+
OPMs OPM's
|
| 2621 |
+
O. P. OP
|
| 2622 |
+
O.P. OP
|
| 2623 |
+
opr OPR
|
| 2624 |
+
Opr OPR
|
| 2625 |
+
ORFs ORF's
|
| 2626 |
+
OR&N OR and N
|
| 2627 |
+
O. R. OR
|
| 2628 |
+
osaa OSAA
|
| 2629 |
+
osa OSA
|
| 2630 |
+
Osa OSA
|
| 2631 |
+
OSBs OSB's
|
| 2632 |
+
O. S. OS
|
| 2633 |
+
O.S. OS
|
| 2634 |
+
OSTs OST's
|
| 2635 |
+
osv OSV
|
| 2636 |
+
O.T. OT
|
| 2637 |
+
OTs OT's
|
| 2638 |
+
Otu OTU
|
| 2639 |
+
otv OTV
|
| 2640 |
+
O.U. OU
|
| 2641 |
+
ovca OVCA
|
| 2642 |
+
Ovca OVCA
|
| 2643 |
+
Ovda OVDA
|
| 2644 |
+
Ovo OVO
|
| 2645 |
+
ov OV
|
| 2646 |
+
Ov OV
|
| 2647 |
+
O. V. OV
|
| 2648 |
+
O.V. OV
|
| 2649 |
+
OWCs OWC's
|
| 2650 |
+
O. W. OW
|
| 2651 |
+
O.W. OW
|
| 2652 |
+
pa PA
|
| 2653 |
+
P. A. PA
|
| 2654 |
+
P.A. PA
|
| 2655 |
+
pBCE PBCE
|
| 2656 |
+
pbc PBC
|
| 2657 |
+
pb PB
|
| 2658 |
+
P. B. PB
|
| 2659 |
+
P.B. PB
|
| 2660 |
+
PCBs PCB's
|
| 2661 |
+
PCDDs PCDD's
|
| 2662 |
+
PCeU PCEU
|
| 2663 |
+
PCIe PCIE
|
| 2664 |
+
pci PCI
|
| 2665 |
+
pcl PCL
|
| 2666 |
+
PcoA PCOA
|
| 2667 |
+
pc PC
|
| 2668 |
+
P. C. PC
|
| 2669 |
+
P.C. PC
|
| 2670 |
+
PCRev PCREV
|
| 2671 |
+
pcs PCS
|
| 2672 |
+
P.C.s PC's
|
| 2673 |
+
pDAB PDAB
|
| 2674 |
+
PDAs PDA's
|
| 2675 |
+
pdbp PDBP
|
| 2676 |
+
PDBsum PDBSUM
|
| 2677 |
+
PDCs PDC's
|
| 2678 |
+
PD&D PD and D
|
| 2679 |
+
PDEs PDE's
|
| 2680 |
+
pdf PDF
|
| 2681 |
+
PDFs PDF's
|
| 2682 |
+
P&D P and D
|
| 2683 |
+
P. D. PD
|
| 2684 |
+
P.D. PD
|
| 2685 |
+
PDPs PDP's
|
| 2686 |
+
PDs PD's
|
| 2687 |
+
P.E.I.'s PEI's
|
| 2688 |
+
P. E. PE
|
| 2689 |
+
P.E. PE
|
| 2690 |
+
PFs PF's
|
| 2691 |
+
PFW&C PFW and C
|
| 2692 |
+
PGMs PGM's
|
| 2693 |
+
PG&N PG and N
|
| 2694 |
+
P&G P and G
|
| 2695 |
+
P. G. PG
|
| 2696 |
+
P.G. PG
|
| 2697 |
+
Phlo PHLO
|
| 2698 |
+
P&H P and H
|
| 2699 |
+
P. H. PH
|
| 2700 |
+
P.H. PH
|
| 2701 |
+
php PHP
|
| 2702 |
+
PHPs PHP's
|
| 2703 |
+
P&I P and I
|
| 2704 |
+
P. I. PI
|
| 2705 |
+
P.I. PI
|
| 2706 |
+
Piz PIZ
|
| 2707 |
+
pj PJ
|
| 2708 |
+
P. J. PJ
|
| 2709 |
+
P.J. PJ
|
| 2710 |
+
PJs PJ's
|
| 2711 |
+
P. K. PK
|
| 2712 |
+
P.K. PK
|
| 2713 |
+
plc PLC
|
| 2714 |
+
PLCs PLC's
|
| 2715 |
+
P. L. PL
|
| 2716 |
+
P.L. PL
|
| 2717 |
+
PMMoV PMMOV
|
| 2718 |
+
p.m. PM
|
| 2719 |
+
p.m PM
|
| 2720 |
+
P. M. PM
|
| 2721 |
+
P.M. PM
|
| 2722 |
+
PMs PM's
|
| 2723 |
+
PNaCl PNACL
|
| 2724 |
+
pna PNA
|
| 2725 |
+
Pnau PNAU
|
| 2726 |
+
pnb PNB
|
| 2727 |
+
PNEs PNE's
|
| 2728 |
+
PNETs PNET's
|
| 2729 |
+
pneus PNEUS
|
| 2730 |
+
png PNG
|
| 2731 |
+
PNNs PNN's
|
| 2732 |
+
PNoy PNOY
|
| 2733 |
+
pn PN
|
| 2734 |
+
P. N. PN
|
| 2735 |
+
P.N. PN
|
| 2736 |
+
P.O.D.'s POD's
|
| 2737 |
+
P&O P and O
|
| 2738 |
+
P. O. PO
|
| 2739 |
+
P.O. PO
|
| 2740 |
+
P.O.W.'s POW's
|
| 2741 |
+
P&PH P and PH
|
| 2742 |
+
PPi PPI
|
| 2743 |
+
P. P. PP
|
| 2744 |
+
P.P. PP
|
| 2745 |
+
PPVs PPV's
|
| 2746 |
+
PPy PPY
|
| 2747 |
+
pr PR
|
| 2748 |
+
P. R. PR
|
| 2749 |
+
P.R. PR
|
| 2750 |
+
P. s P's
|
| 2751 |
+
P.'s P's
|
| 2752 |
+
Ps P's
|
| 2753 |
+
P. S. PS
|
| 2754 |
+
P.S. PS
|
| 2755 |
+
PSSAs PSSA's
|
| 2756 |
+
pTA PTA
|
| 2757 |
+
PTAs PTA's
|
| 2758 |
+
Pte PTE
|
| 2759 |
+
PTEs PTE's
|
| 2760 |
+
ptf PTF
|
| 2761 |
+
Ptie PTIE
|
| 2762 |
+
PTLs PTL's
|
| 2763 |
+
Ptol PTOL
|
| 2764 |
+
pt PT
|
| 2765 |
+
P. T. PT
|
| 2766 |
+
P.T. PT
|
| 2767 |
+
PTTs PTT's
|
| 2768 |
+
P'Twa PTWA
|
| 2769 |
+
Puiu PUIU
|
| 2770 |
+
Pul PUL
|
| 2771 |
+
PVAs PVA's
|
| 2772 |
+
PvdA PVDA
|
| 2773 |
+
pve PVE
|
| 2774 |
+
P. V. PV
|
| 2775 |
+
P.V. PV
|
| 2776 |
+
pvr PVR
|
| 2777 |
+
PVs PV's
|
| 2778 |
+
pwll PWLL
|
| 2779 |
+
P&W P and W
|
| 2780 |
+
P. W. PW
|
| 2781 |
+
P.W. PW
|
| 2782 |
+
Pyi PYI
|
| 2783 |
+
Pyk PYK
|
| 2784 |
+
Pyl PYL
|
| 2785 |
+
PyL PYL
|
| 2786 |
+
P. Y. PY
|
| 2787 |
+
Pyu PYU
|
| 2788 |
+
Pyw PYW
|
| 2789 |
+
Pyx PYX
|
| 2790 |
+
P. Z. PZ
|
| 2791 |
+
Q. A. QA
|
| 2792 |
+
Q&A QANDA
|
| 2793 |
+
Q&A's QANDA's
|
| 2794 |
+
Q&As QANDAS
|
| 2795 |
+
QbA QBA
|
| 2796 |
+
Q.B. QB
|
| 2797 |
+
Q.C. QC
|
| 2798 |
+
Q. E. QE
|
| 2799 |
+
Q.H. QH
|
| 2800 |
+
Q.I. QI
|
| 2801 |
+
Q. J. QJ
|
| 2802 |
+
Q. N. QN
|
| 2803 |
+
QPOs QPO's
|
| 2804 |
+
Q.V. QV
|
| 2805 |
+
R. A. RA
|
| 2806 |
+
R.A. RA
|
| 2807 |
+
R&A R and A
|
| 2808 |
+
R&AW R and AW
|
| 2809 |
+
RbAg RBAG
|
| 2810 |
+
RBCs RBC's
|
| 2811 |
+
RBIs RBI's
|
| 2812 |
+
R&B R and B
|
| 2813 |
+
R. B. RB
|
| 2814 |
+
R.B. RB
|
| 2815 |
+
rca RCA
|
| 2816 |
+
R&C R and C
|
| 2817 |
+
rc RC
|
| 2818 |
+
R. C. RC
|
| 2819 |
+
R.C. RC
|
| 2820 |
+
RCTs RCT's
|
| 2821 |
+
RdE RDE
|
| 2822 |
+
R&D R and D
|
| 2823 |
+
R. D. RD
|
| 2824 |
+
R.D. RD
|
| 2825 |
+
R.E.M.'s REM's
|
| 2826 |
+
REPLs REPL's
|
| 2827 |
+
R. E. RE
|
| 2828 |
+
R.E. RE
|
| 2829 |
+
R. F. RF
|
| 2830 |
+
R.F. RF
|
| 2831 |
+
R&G R and G
|
| 2832 |
+
R. G. RG
|
| 2833 |
+
R.G. RG
|
| 2834 |
+
RHIBs RHIB's
|
| 2835 |
+
Rhiw RHIW
|
| 2836 |
+
rhl RHL
|
| 2837 |
+
RhoG RHOG
|
| 2838 |
+
Rho's RHO's
|
| 2839 |
+
R. H. RH
|
| 2840 |
+
R.H. RH
|
| 2841 |
+
R&I R and I
|
| 2842 |
+
R. I. RI
|
| 2843 |
+
R.I. RI
|
| 2844 |
+
riu RIU
|
| 2845 |
+
Riu RIU
|
| 2846 |
+
rivs RIVS
|
| 2847 |
+
Rivu RIVU
|
| 2848 |
+
Rixt RIXT
|
| 2849 |
+
rjf RJF
|
| 2850 |
+
R. J. RJ
|
| 2851 |
+
R.J. RJ
|
| 2852 |
+
R. K. RK
|
| 2853 |
+
R.K. RK
|
| 2854 |
+
R. L. RL
|
| 2855 |
+
R.L. RL
|
| 2856 |
+
rly RLY
|
| 2857 |
+
RMDs RMD's
|
| 2858 |
+
RMLs RML's
|
| 2859 |
+
rm RM
|
| 2860 |
+
R. M. RM
|
| 2861 |
+
R.M. RM
|
| 2862 |
+
RMSDs RMSD's
|
| 2863 |
+
RMs RM's
|
| 2864 |
+
rna RNA
|
| 2865 |
+
RNAs RNA's
|
| 2866 |
+
Rnet RNET
|
| 2867 |
+
Rnic RNIC
|
| 2868 |
+
RNNs RNN's
|
| 2869 |
+
RNPs RNP's
|
| 2870 |
+
R. N. RN
|
| 2871 |
+
R.N. RN
|
| 2872 |
+
rOmpB ROMPB
|
| 2873 |
+
Rooi ROOI
|
| 2874 |
+
R. O. RO
|
| 2875 |
+
R.O. RO
|
| 2876 |
+
ROVs ROV's
|
| 2877 |
+
Roxb ROXB
|
| 2878 |
+
Roxx ROXX
|
| 2879 |
+
RP&C RP and C
|
| 2880 |
+
rpc RPC
|
| 2881 |
+
Rpe RPE
|
| 2882 |
+
rpg RPG
|
| 2883 |
+
RPGs RPG's
|
| 2884 |
+
rpm RPM
|
| 2885 |
+
R. P. RP
|
| 2886 |
+
R.P. RP
|
| 2887 |
+
RPs RP's
|
| 2888 |
+
R. Q. RQ
|
| 2889 |
+
R.Q. RQ
|
| 2890 |
+
rra RRA
|
| 2891 |
+
rrd RRD
|
| 2892 |
+
Rreli RRELI
|
| 2893 |
+
rre RRE
|
| 2894 |
+
rRNA RRNA
|
| 2895 |
+
rRNAs RRNA's
|
| 2896 |
+
R&R R and R
|
| 2897 |
+
rr RR
|
| 2898 |
+
R. R. RR
|
| 2899 |
+
R.R. RR
|
| 2900 |
+
rsh RSH
|
| 2901 |
+
Rsis RSI's
|
| 2902 |
+
rsly RSLY
|
| 2903 |
+
RsmA RSMA
|
| 2904 |
+
RSpec RSPEC
|
| 2905 |
+
rs RS
|
| 2906 |
+
Rs R's
|
| 2907 |
+
R. S. RS
|
| 2908 |
+
R.S. RS
|
| 2909 |
+
RSu RSU
|
| 2910 |
+
rtb RTB
|
| 2911 |
+
RTCs RTC's
|
| 2912 |
+
RTEjr RTEJR
|
| 2913 |
+
RTeOR RTEOR
|
| 2914 |
+
RTOs RTO's
|
| 2915 |
+
rtPA RTPA
|
| 2916 |
+
rt RT
|
| 2917 |
+
R. T. RT
|
| 2918 |
+
R.T. RT
|
| 2919 |
+
rts RTS
|
| 2920 |
+
RTVFBiH RTVFBIH
|
| 2921 |
+
Ruao RUAO
|
| 2922 |
+
Rukn RUKN
|
| 2923 |
+
Ruk RUK
|
| 2924 |
+
Rupf RUPF
|
| 2925 |
+
Rupr RUPR
|
| 2926 |
+
rup RUP
|
| 2927 |
+
Rup RUP
|
| 2928 |
+
R. U. RU
|
| 2929 |
+
R.U. RU
|
| 2930 |
+
RUN:AI RUN AI
|
| 2931 |
+
RutB RUTB
|
| 2932 |
+
Ruu RUU
|
| 2933 |
+
Ruwa RUWA
|
| 2934 |
+
Ruy RUY
|
| 2935 |
+
Ruyt RUYT
|
| 2936 |
+
Rvat RVAT
|
| 2937 |
+
Rvo RVO
|
| 2938 |
+
R. V. RV
|
| 2939 |
+
R.V. RV
|
| 2940 |
+
rvs RVS
|
| 2941 |
+
rwa RWA
|
| 2942 |
+
Rwa RWA
|
| 2943 |
+
rwb RWB
|
| 2944 |
+
RWEs RWE's
|
| 2945 |
+
rwjf RWJF
|
| 2946 |
+
R. W. RW
|
| 2947 |
+
R.W. RW
|
| 2948 |
+
Rxa RXA
|
| 2949 |
+
rz RZ
|
| 2950 |
+
R. Z. RZ
|
| 2951 |
+
Sa'id SAID
|
| 2952 |
+
S. A. SA
|
| 2953 |
+
S.A. SA
|
| 2954 |
+
Saxl SAXL
|
| 2955 |
+
Sa'yo SAYO
|
| 2956 |
+
Sbai SBAI
|
| 2957 |
+
sbc SBC
|
| 2958 |
+
SBCs SBC's
|
| 2959 |
+
sbk SBK
|
| 2960 |
+
Sborz SBORZ
|
| 2961 |
+
sb SB
|
| 2962 |
+
S. B. SB
|
| 2963 |
+
S.B. SB
|
| 2964 |
+
Sbu SBU
|
| 2965 |
+
scr SCR
|
| 2966 |
+
SCRs SCR's
|
| 2967 |
+
scry SCRY
|
| 2968 |
+
sc SC
|
| 2969 |
+
S. C. SC
|
| 2970 |
+
S.C. SC
|
| 2971 |
+
Scuf SCUF
|
| 2972 |
+
Scymn SCYMN
|
| 2973 |
+
SD&AE SD and AE
|
| 2974 |
+
Sdei SDEI
|
| 2975 |
+
sde SDE
|
| 2976 |
+
Sde SDE
|
| 2977 |
+
SDG&E SDG and E
|
| 2978 |
+
sdk SDK
|
| 2979 |
+
S. D. SD
|
| 2980 |
+
S.D. SD
|
| 2981 |
+
SDSM&T's SDSM and T's
|
| 2982 |
+
Sejms SEJM's
|
| 2983 |
+
sejr SEJR
|
| 2984 |
+
Sekl SEKL
|
| 2985 |
+
Sek SEK
|
| 2986 |
+
S. E. SE
|
| 2987 |
+
S.E. SE
|
| 2988 |
+
ses SES
|
| 2989 |
+
Ses SE's
|
| 2990 |
+
SEs SE's
|
| 2991 |
+
S.E.S.'s SES's
|
| 2992 |
+
Seyh SEYH
|
| 2993 |
+
sfadb SFADB
|
| 2994 |
+
Sfax SFAX
|
| 2995 |
+
SFFCo SFFCO
|
| 2996 |
+
sfn SFN
|
| 2997 |
+
'sf SF
|
| 2998 |
+
sf SF
|
| 2999 |
+
S. F. SF
|
| 3000 |
+
S.F. SF
|
| 3001 |
+
sfs SFS
|
| 3002 |
+
S.F.'s SF's
|
| 3003 |
+
SG&A SGANDA
|
| 3004 |
+
sgb SGB
|
| 3005 |
+
Sgip SGIP
|
| 3006 |
+
sgml SGML
|
| 3007 |
+
sgra SGRA
|
| 3008 |
+
S. G. SG
|
| 3009 |
+
S.G. SG
|
| 3010 |
+
SGSNs SGSN's
|
| 3011 |
+
Sgt. sergeant
|
| 3012 |
+
sgt SGT
|
| 3013 |
+
S.H.I.E.L.D.'s SHIELD's
|
| 3014 |
+
Shma SHMA
|
| 3015 |
+
S. H. SH
|
| 3016 |
+
S.H. SH
|
| 3017 |
+
S. I. SI
|
| 3018 |
+
S.I. SI
|
| 3019 |
+
sjef SJEF
|
| 3020 |
+
Sjon SJON
|
| 3021 |
+
S. J. SJ
|
| 3022 |
+
S.J. SJ
|
| 3023 |
+
S. K. SK
|
| 3024 |
+
S.K. SK
|
| 3025 |
+
S.L.A.A.'s SLAA's
|
| 3026 |
+
sla SLA
|
| 3027 |
+
SLAs SLA's
|
| 3028 |
+
S&L S and L
|
| 3029 |
+
SLS&E SLS and E
|
| 3030 |
+
S. L. SL
|
| 3031 |
+
S.L. SL
|
| 3032 |
+
SMe SME
|
| 3033 |
+
SMEs SME's
|
| 3034 |
+
SmI SMI
|
| 3035 |
+
SMPSs SMPS's
|
| 3036 |
+
smr SMR
|
| 3037 |
+
S&M S and M
|
| 3038 |
+
sm SM
|
| 3039 |
+
S. M. SM
|
| 3040 |
+
S.M. SM
|
| 3041 |
+
S.M.'s SM's
|
| 3042 |
+
SMs SMS
|
| 3043 |
+
Smyl SMYL
|
| 3044 |
+
SNESjr SNESJR
|
| 3045 |
+
sngle SNGLE
|
| 3046 |
+
SNPs SNP's
|
| 3047 |
+
SnSe SNSE
|
| 3048 |
+
S. N. SN
|
| 3049 |
+
S.N. SN
|
| 3050 |
+
S. O. SO
|
| 3051 |
+
S.O. SO
|
| 3052 |
+
Sos SO's
|
| 3053 |
+
Sovn SOVN
|
| 3054 |
+
Sov SOV
|
| 3055 |
+
S&P 500 S and P five hundred
|
| 3056 |
+
SPCAs SPCA's
|
| 3057 |
+
Spe SPE
|
| 3058 |
+
Spoa SPOA
|
| 3059 |
+
SpPIn SPPIN
|
| 3060 |
+
S&P S and P
|
| 3061 |
+
S. P. SP
|
| 3062 |
+
S.P. SP
|
| 3063 |
+
SPs SP's
|
| 3064 |
+
SPUs SPU's
|
| 3065 |
+
sql SQL
|
| 3066 |
+
sq SQ
|
| 3067 |
+
S. Q. SQ
|
| 3068 |
+
Sra SRA
|
| 3069 |
+
SRAs SRA's
|
| 3070 |
+
Srba SRBA
|
| 3071 |
+
Srbi SRBI
|
| 3072 |
+
SRBs SRB's
|
| 3073 |
+
SRGs SRG's
|
| 3074 |
+
Srhir SRHIR
|
| 3075 |
+
SRLGs SRLG's
|
| 3076 |
+
SRMs SRM's
|
| 3077 |
+
Srni SRNI
|
| 3078 |
+
srp SRP
|
| 3079 |
+
sr SR
|
| 3080 |
+
S. R. SR
|
| 3081 |
+
S.R. SR
|
| 3082 |
+
Srul SRUL
|
| 3083 |
+
srx SRX
|
| 3084 |
+
SSAs SSA's
|
| 3085 |
+
SSDs SSD's
|
| 3086 |
+
ssl SSL
|
| 3087 |
+
SSoSV SSOSV
|
| 3088 |
+
SSRIs SSRI's
|
| 3089 |
+
S&S S and S
|
| 3090 |
+
ss SS
|
| 3091 |
+
S. s S's
|
| 3092 |
+
Ss S's
|
| 3093 |
+
S. S. SS
|
| 3094 |
+
S.S. SS
|
| 3095 |
+
Ssu SSU
|
| 3096 |
+
ssw SSW
|
| 3097 |
+
Ssy SSY
|
| 3098 |
+
ST&AJ ST and AJ
|
| 3099 |
+
STDs STD's
|
| 3100 |
+
stfv STFV
|
| 3101 |
+
STG-TWO STGTWO
|
| 3102 |
+
STGs STG's
|
| 3103 |
+
STIs STI's
|
| 3104 |
+
STi STI
|
| 3105 |
+
stl STL
|
| 3106 |
+
Stryj STRYJ
|
| 3107 |
+
S&T S and T
|
| 3108 |
+
STScI STSCI
|
| 3109 |
+
S. T. ST
|
| 3110 |
+
S.T. ST
|
| 3111 |
+
suo SUO
|
| 3112 |
+
Suo SUO
|
| 3113 |
+
S. U. SU
|
| 3114 |
+
Susz SUSZ
|
| 3115 |
+
SUTs SUT's
|
| 3116 |
+
Suu SUU
|
| 3117 |
+
SUVs SUV's
|
| 3118 |
+
Suy SUY
|
| 3119 |
+
Svac SVAC
|
| 3120 |
+
svar SVAR
|
| 3121 |
+
sve SVE
|
| 3122 |
+
Sve SVE
|
| 3123 |
+
SVMs SVM's
|
| 3124 |
+
svn SVN
|
| 3125 |
+
svom SVOM
|
| 3126 |
+
sv SV
|
| 3127 |
+
S. V. SV
|
| 3128 |
+
S.V. SV
|
| 3129 |
+
SVTs SVT's
|
| 3130 |
+
Swe SWE
|
| 3131 |
+
SwRI SWRI
|
| 3132 |
+
S&W S and W
|
| 3133 |
+
sw SW
|
| 3134 |
+
S. W. SW
|
| 3135 |
+
S.W. SW
|
| 3136 |
+
sx SX
|
| 3137 |
+
S.X. SX
|
| 3138 |
+
SysML SYSML
|
| 3139 |
+
SysRq SYSRQ
|
| 3140 |
+
Sys SY's
|
| 3141 |
+
SysV SYSV
|
| 3142 |
+
S. Y. SY
|
| 3143 |
+
S.Y. SY
|
| 3144 |
+
SyT SYT
|
| 3145 |
+
syv SYV
|
| 3146 |
+
Syxx SYXX
|
| 3147 |
+
Szasz SZASZ
|
| 3148 |
+
Szer SZER
|
| 3149 |
+
szkic SZKIC
|
| 3150 |
+
Szklo SZKLO
|
| 3151 |
+
Szlak SZLAK
|
| 3152 |
+
SzMME SZMME
|
| 3153 |
+
Szpir SZPIR
|
| 3154 |
+
sz SZ
|
| 3155 |
+
S. Z. SZ
|
| 3156 |
+
Szu SZU
|
| 3157 |
+
Szyk SZYK
|
| 3158 |
+
taf TAF
|
| 3159 |
+
Taf TAF
|
| 3160 |
+
T. A. TA
|
| 3161 |
+
T.A. TA
|
| 3162 |
+
T&A T and A
|
| 3163 |
+
TBCs TBC's
|
| 3164 |
+
TBMs TBM's
|
| 3165 |
+
tbh TBH
|
| 3166 |
+
T. B. TB
|
| 3167 |
+
T.B. TB
|
| 3168 |
+
TCiAP TCIAP
|
| 3169 |
+
TCKs TCK's
|
| 3170 |
+
tc TC
|
| 3171 |
+
T. C. TC
|
| 3172 |
+
T.C. TC
|
| 3173 |
+
TCUs TCU's
|
| 3174 |
+
tcu TCU
|
| 3175 |
+
tdb TDB
|
| 3176 |
+
TDCi TDCI
|
| 3177 |
+
TdIF TDIF
|
| 3178 |
+
TDs TD's
|
| 3179 |
+
T. D. TD
|
| 3180 |
+
T.D. TD
|
| 3181 |
+
Teatr TEATR
|
| 3182 |
+
T. E. TE
|
| 3183 |
+
T.E. TE
|
| 3184 |
+
T&F T and F
|
| 3185 |
+
tf TF
|
| 3186 |
+
T. F. TF
|
| 3187 |
+
T.F. TF
|
| 3188 |
+
tge TGE
|
| 3189 |
+
tgf TGF
|
| 3190 |
+
tg TG
|
| 3191 |
+
T. G. TG
|
| 3192 |
+
T.G. TG
|
| 3193 |
+
TGVs TGV's
|
| 3194 |
+
tgv TGV
|
| 3195 |
+
Thok THOK
|
| 3196 |
+
ThSe THSE
|
| 3197 |
+
T. H. TH
|
| 3198 |
+
T.H. TH
|
| 3199 |
+
T.I.'s TI's
|
| 3200 |
+
T.I. TI
|
| 3201 |
+
Tiu TIU
|
| 3202 |
+
tiv TIV
|
| 3203 |
+
Tiv TIV
|
| 3204 |
+
Tiy's TIY's
|
| 3205 |
+
T. J. TJ
|
| 3206 |
+
T.J. TJ
|
| 3207 |
+
t'ju TJU
|
| 3208 |
+
tjz TJZ
|
| 3209 |
+
tko TKO
|
| 3210 |
+
Tko TKO
|
| 3211 |
+
tk TK
|
| 3212 |
+
T. K. TK
|
| 3213 |
+
T.K. TK
|
| 3214 |
+
Tlas TLA's
|
| 3215 |
+
TlCu TLCU
|
| 3216 |
+
TLDs TLD's
|
| 3217 |
+
tli TLI
|
| 3218 |
+
tlp TLP
|
| 3219 |
+
TLRs TLR's
|
| 3220 |
+
TLs TL's
|
| 3221 |
+
tl TL
|
| 3222 |
+
T. L. TL
|
| 3223 |
+
T.L. TL
|
| 3224 |
+
Tluk TLUK
|
| 3225 |
+
Tluszcz TLUSZCZ
|
| 3226 |
+
tmc TMC
|
| 3227 |
+
TMGs TMG's
|
| 3228 |
+
tmos TMOS
|
| 3229 |
+
tmRNA TMRNA
|
| 3230 |
+
TMSs TMS's
|
| 3231 |
+
T.M.s TM's
|
| 3232 |
+
tm TM
|
| 3233 |
+
T. M. TM
|
| 3234 |
+
T.M. TM
|
| 3235 |
+
tna TNA
|
| 3236 |
+
tnbc TNBC
|
| 3237 |
+
TNTAs TNTA's
|
| 3238 |
+
tn TN
|
| 3239 |
+
T. N. TN
|
| 3240 |
+
T.N. TN
|
| 3241 |
+
T.O.'s TO's
|
| 3242 |
+
T. O. TO
|
| 3243 |
+
T.O. TO
|
| 3244 |
+
tou TOU
|
| 3245 |
+
Tou TOU
|
| 3246 |
+
ToU TOU
|
| 3247 |
+
tPA TPA
|
| 3248 |
+
tpr TPR
|
| 3249 |
+
tp TP
|
| 3250 |
+
T. P. TP
|
| 3251 |
+
T.P. TP
|
| 3252 |
+
TPVs TPV's
|
| 3253 |
+
T.Q. TQ
|
| 3254 |
+
tra TRA
|
| 3255 |
+
Tra TRA
|
| 3256 |
+
Trbic TRBIC
|
| 3257 |
+
Trcek TRCEK
|
| 3258 |
+
TrkA TRKA
|
| 3259 |
+
Trmcic TRMCIC
|
| 3260 |
+
tRNA TRNA
|
| 3261 |
+
TRPs TRP's
|
| 3262 |
+
trs TRS
|
| 3263 |
+
tr TR
|
| 3264 |
+
T. R. TR
|
| 3265 |
+
T.R. TR
|
| 3266 |
+
truTV TRUTV
|
| 3267 |
+
TruTV TRUTV
|
| 3268 |
+
Trve TRVE
|
| 3269 |
+
Tsa TSA
|
| 3270 |
+
tsit TSIT
|
| 3271 |
+
Tsiv TSIV
|
| 3272 |
+
tso TSO
|
| 3273 |
+
Tso TSO
|
| 3274 |
+
tsr TSR
|
| 3275 |
+
Ts T's
|
| 3276 |
+
T. S. TS
|
| 3277 |
+
T.S. TS
|
| 3278 |
+
tsus TSUS
|
| 3279 |
+
Tsvi TSVI
|
| 3280 |
+
Tta TTA
|
| 3281 |
+
tteok TTEOK
|
| 3282 |
+
tte TTE
|
| 3283 |
+
ttp TTP
|
| 3284 |
+
T&T T and T
|
| 3285 |
+
T. T. TT
|
| 3286 |
+
T.T. TT
|
| 3287 |
+
T'uqu TUQU
|
| 3288 |
+
T.U. TU
|
| 3289 |
+
Tuzk TUZK
|
| 3290 |
+
tvaan TVAAN
|
| 3291 |
+
Tvam TVAM
|
| 3292 |
+
tva TVA
|
| 3293 |
+
TVETs TVET's
|
| 3294 |
+
TVii TVII
|
| 3295 |
+
TVIn TVIN
|
| 3296 |
+
TVi TVI
|
| 3297 |
+
tvo TVO
|
| 3298 |
+
Tvo TVO
|
| 3299 |
+
TVRi TVRI
|
| 3300 |
+
tvr TVR
|
| 3301 |
+
TVSpy TVSPY
|
| 3302 |
+
tvs TVS
|
| 3303 |
+
TVs TV's
|
| 3304 |
+
tVTA TVTA
|
| 3305 |
+
tv TV
|
| 3306 |
+
T. V. TV
|
| 3307 |
+
T.V. TV
|
| 3308 |
+
Twa TWA
|
| 3309 |
+
Twi TWI
|
| 3310 |
+
TWTs TWT's
|
| 3311 |
+
T. W. TW
|
| 3312 |
+
T.W. TW
|
| 3313 |
+
TxDOT TXDOT
|
| 3314 |
+
T.X. TX
|
| 3315 |
+
tya TYA
|
| 3316 |
+
Tyk TYK
|
| 3317 |
+
Tza'ar TZAAR
|
| 3318 |
+
Tze TZE
|
| 3319 |
+
Tzrif TZRIF
|
| 3320 |
+
Tzuh TZUH
|
| 3321 |
+
Tzvi TZVI
|
| 3322 |
+
Ua's UA's
|
| 3323 |
+
UAs UA's
|
| 3324 |
+
uat UAT
|
| 3325 |
+
U.A. UA
|
| 3326 |
+
UAVs UAV's
|
| 3327 |
+
Uba UBA
|
| 3328 |
+
UbcM UBCM
|
| 3329 |
+
Ube UBE
|
| 3330 |
+
ubi UBI
|
| 3331 |
+
Ubi UBI
|
| 3332 |
+
Ucar UCAR
|
| 3333 |
+
Uca UCA
|
| 3334 |
+
Ucmak UCMAK
|
| 3335 |
+
Ucn UCN
|
| 3336 |
+
uCs UC's
|
| 3337 |
+
Uc UC
|
| 3338 |
+
U.C. UC
|
| 3339 |
+
Ucuncu UCUNCU
|
| 3340 |
+
Uczta UCZTA
|
| 3341 |
+
Uda UDA
|
| 3342 |
+
Udit UDIT
|
| 3343 |
+
Udny UDNY
|
| 3344 |
+
UDTs UDT's
|
| 3345 |
+
ud UD
|
| 3346 |
+
Ud UD
|
| 3347 |
+
U. D. UD
|
| 3348 |
+
udu UDU
|
| 3349 |
+
Udu UDU
|
| 3350 |
+
Ueda's UEDA's
|
| 3351 |
+
Uéda UE acute DA
|
| 3352 |
+
U. E. UE
|
| 3353 |
+
UFOs UFO's
|
| 3354 |
+
Ufot UFOT
|
| 3355 |
+
ufo UFO
|
| 3356 |
+
Ufo UFO
|
| 3357 |
+
U. F. UF
|
| 3358 |
+
Uga UGA
|
| 3359 |
+
Uge UGE
|
| 3360 |
+
Ugni UGNI
|
| 3361 |
+
Ugra UGRA
|
| 3362 |
+
Ugrszke UGRSZKE
|
| 3363 |
+
Ug UG
|
| 3364 |
+
Uhha UHHA
|
| 3365 |
+
uhn UHN
|
| 3366 |
+
UHTCs UHTC's
|
| 3367 |
+
Uhud UHUD
|
| 3368 |
+
U.H. UH
|
| 3369 |
+
uhur UHUR
|
| 3370 |
+
Uiam UIAM
|
| 3371 |
+
Uibh UIBH
|
| 3372 |
+
Uible UIBLE
|
| 3373 |
+
Uig UIG
|
| 3374 |
+
uisae UISAE
|
| 3375 |
+
UiS UIS
|
| 3376 |
+
UiTM UITM
|
| 3377 |
+
uit UIT
|
| 3378 |
+
Uit UIT
|
| 3379 |
+
Uiy UIY
|
| 3380 |
+
Ujed UJED
|
| 3381 |
+
Ujsag UJSAG
|
| 3382 |
+
uj UJ
|
| 3383 |
+
U.J. UJ
|
| 3384 |
+
Uka UKA
|
| 3385 |
+
Ukhra UKHRA
|
| 3386 |
+
Ukic UKIC
|
| 3387 |
+
Uki UKI
|
| 3388 |
+
Ukoh UKOH
|
| 3389 |
+
Uko UKO
|
| 3390 |
+
ukr UKR
|
| 3391 |
+
Ukr UKR
|
| 3392 |
+
Ukui UKUI
|
| 3393 |
+
u'k UK
|
| 3394 |
+
uk UK
|
| 3395 |
+
Uk UK
|
| 3396 |
+
U.K. UK
|
| 3397 |
+
Ukwu UKWU
|
| 3398 |
+
Ulic ULIC
|
| 3399 |
+
Ull ULL
|
| 3400 |
+
Ulms ULM's
|
| 3401 |
+
UlSU ULSU
|
| 3402 |
+
Uluj ULUJ
|
| 3403 |
+
U.L. UL
|
| 3404 |
+
ulus ULUS
|
| 3405 |
+
Ulus ULU's
|
| 3406 |
+
Ulwa ULWA
|
| 3407 |
+
Ulwe ULWE
|
| 3408 |
+
Umbr UMBR
|
| 3409 |
+
umelcu UMELCU
|
| 3410 |
+
UMe UME
|
| 3411 |
+
Umla UMLA
|
| 3412 |
+
Umme UMME
|
| 3413 |
+
Umno UMNO
|
| 3414 |
+
Umri UMRI
|
| 3415 |
+
U. M. UM
|
| 3416 |
+
U.M. UM
|
| 3417 |
+
Unli UNLI
|
| 3418 |
+
Unlu UNLU
|
| 3419 |
+
unm UNM
|
| 3420 |
+
unnd UNND
|
| 3421 |
+
UNSh UNSH
|
| 3422 |
+
Unst UNST
|
| 3423 |
+
Uns UN's
|
| 3424 |
+
U.N.'s UN's
|
| 3425 |
+
Unt UNT
|
| 3426 |
+
U.N. UN
|
| 3427 |
+
Unz UNZ
|
| 3428 |
+
UOCl UOCL
|
| 3429 |
+
UofM UOFM
|
| 3430 |
+
Uoho UOHO
|
| 3431 |
+
UoMs UOM's
|
| 3432 |
+
uORF UORF
|
| 3433 |
+
UoW UOW
|
| 3434 |
+
UPBs UPB's
|
| 3435 |
+
Upd UPD
|
| 3436 |
+
Upf UPF
|
| 3437 |
+
Upir UPIR
|
| 3438 |
+
UPnP UPNP
|
| 3439 |
+
Uppu UPPU
|
| 3440 |
+
U.P. UP
|
| 3441 |
+
UPyD UPYD
|
| 3442 |
+
uq UQ
|
| 3443 |
+
Urbz URBZ
|
| 3444 |
+
URCs URC's
|
| 3445 |
+
Urdd URDD
|
| 3446 |
+
Urei UREI
|
| 3447 |
+
urf URF
|
| 3448 |
+
Urla URLA
|
| 3449 |
+
URLhttp URLHTTP
|
| 3450 |
+
URLs URL's
|
| 3451 |
+
Usal USAL
|
| 3452 |
+
usan USAN
|
| 3453 |
+
Usan USAN
|
| 3454 |
+
usao USAO
|
| 3455 |
+
usata USATA
|
| 3456 |
+
usa USA
|
| 3457 |
+
.USA USA
|
| 3458 |
+
USAya USAYA
|
| 3459 |
+
USBs USB's
|
| 3460 |
+
Uscie USCIE
|
| 3461 |
+
U.S.C.'s USC's
|
| 3462 |
+
USDoE USDOE
|
| 3463 |
+
usd USD
|
| 3464 |
+
USFbA USFBA
|
| 3465 |
+
USF&WS USF and WS
|
| 3466 |
+
UShs USH's
|
| 3467 |
+
Usia USIA
|
| 3468 |
+
usih USIH
|
| 3469 |
+
Uslu USLU
|
| 3470 |
+
Usmar USMAR
|
| 3471 |
+
Usna USNA
|
| 3472 |
+
Usnic USNIC
|
| 3473 |
+
Usoi USOI
|
| 3474 |
+
Usos USO's
|
| 3475 |
+
Uso USO
|
| 3476 |
+
USPs USP's
|
| 3477 |
+
U.S.'s US's
|
| 3478 |
+
Usti USTI
|
| 3479 |
+
Ustka USTKA
|
| 3480 |
+
Usui USUI
|
| 3481 |
+
usum USUM
|
| 3482 |
+
U. S. US
|
| 3483 |
+
U.S. US
|
| 3484 |
+
Usut USUT
|
| 3485 |
+
Usvit USVIT
|
| 3486 |
+
Uta's UTA's
|
| 3487 |
+
uta UTA
|
| 3488 |
+
Uta UTA
|
| 3489 |
+
Utca UTCA
|
| 3490 |
+
Utd's UTD's
|
| 3491 |
+
Utd UTD
|
| 3492 |
+
utea UTEA
|
| 3493 |
+
Utes UTE's
|
| 3494 |
+
Uth UTH
|
| 3495 |
+
uti UTI
|
| 3496 |
+
Uti UTI
|
| 3497 |
+
Utne UTNE
|
| 3498 |
+
Utnur UTNUR
|
| 3499 |
+
Uto UTO
|
| 3500 |
+
utrci UTRCI
|
| 3501 |
+
utsav UTSAV
|
| 3502 |
+
Utsav UTSAV
|
| 3503 |
+
Utsu UTSU
|
| 3504 |
+
U.T. UT
|
| 3505 |
+
Utu UTU
|
| 3506 |
+
Utva UTVA
|
| 3507 |
+
Uuh UUH
|
| 3508 |
+
Uul UUL
|
| 3509 |
+
Uulu UULU
|
| 3510 |
+
Uusi UUSI
|
| 3511 |
+
UUs UU's
|
| 3512 |
+
Uuto UUTO
|
| 3513 |
+
Uvac UVAC
|
| 3514 |
+
Uvea UVEA
|
| 3515 |
+
uvnitr UVNITR
|
| 3516 |
+
Uvo UVO
|
| 3517 |
+
U.V. UV
|
| 3518 |
+
Uwasa UWASA
|
| 3519 |
+
UWFi UWFI
|
| 3520 |
+
V. A. VA
|
| 3521 |
+
V.A. VA
|
| 3522 |
+
V&A V and A
|
| 3523 |
+
Vav VAV
|
| 3524 |
+
Vay VAY
|
| 3525 |
+
vb VB
|
| 3526 |
+
V. B. VB
|
| 3527 |
+
V.B. VB
|
| 3528 |
+
VCDs VCD's
|
| 3529 |
+
VCRs VCR's
|
| 3530 |
+
VCSELs VCSEL's
|
| 3531 |
+
VCs VC's
|
| 3532 |
+
VCTs VCT's
|
| 3533 |
+
vc VC
|
| 3534 |
+
V. C. VC
|
| 3535 |
+
V.C. VC
|
| 3536 |
+
vda VDA
|
| 3537 |
+
Vda VDA
|
| 3538 |
+
VDCs VDC's
|
| 3539 |
+
vdiq VDIQ
|
| 3540 |
+
vdm VDM
|
| 3541 |
+
V. D. VD
|
| 3542 |
+
V.D. VD
|
| 3543 |
+
vez VEZ
|
| 3544 |
+
Vez VEZ
|
| 3545 |
+
vfp VFP
|
| 3546 |
+
vfr VFR
|
| 3547 |
+
V. F. VF
|
| 3548 |
+
V.F. VF
|
| 3549 |
+
V'Ger VGER
|
| 3550 |
+
vgmdb VGMDB
|
| 3551 |
+
VGo VGO
|
| 3552 |
+
VGSCs VGSC's
|
| 3553 |
+
VGSoM VGSOM
|
| 3554 |
+
V. G. VG
|
| 3555 |
+
V.G. VG
|
| 3556 |
+
V. H. VH
|
| 3557 |
+
V.I.C.'s VIC's
|
| 3558 |
+
Vict VICT
|
| 3559 |
+
viita VIITA
|
| 3560 |
+
vijf VIJF
|
| 3561 |
+
vij VIJ
|
| 3562 |
+
Vij VIJ
|
| 3563 |
+
V.I.P.s VIP's
|
| 3564 |
+
VIPs VIP's
|
| 3565 |
+
V. I. VI
|
| 3566 |
+
V.I. VI
|
| 3567 |
+
VJs VJ's
|
| 3568 |
+
V. J. VJ
|
| 3569 |
+
V.J. VJ
|
| 3570 |
+
V. K. VK
|
| 3571 |
+
V.K. VK
|
| 3572 |
+
Vlah VLAH
|
| 3573 |
+
VLCCs VLCC's
|
| 3574 |
+
vlei VLEI
|
| 3575 |
+
Vlijt VLIJT
|
| 3576 |
+
V. L. VL
|
| 3577 |
+
V.L. VL
|
| 3578 |
+
VMAs VMA's
|
| 3579 |
+
vm VM
|
| 3580 |
+
V. M. VM
|
| 3581 |
+
V.M. VM
|
| 3582 |
+
vner VNER
|
| 3583 |
+
V. N. VN
|
| 3584 |
+
V.N. VN
|
| 3585 |
+
V.O. VO
|
| 3586 |
+
Vov VOV
|
| 3587 |
+
Voz VOZ
|
| 3588 |
+
vpis VPIS
|
| 3589 |
+
VPNs VPN's
|
| 3590 |
+
vpu VPU
|
| 3591 |
+
V. P. VP
|
| 3592 |
+
V.P. VP
|
| 3593 |
+
vq VQ
|
| 3594 |
+
vrak VRAK
|
| 3595 |
+
Vrba VRBA
|
| 3596 |
+
Vrbuv VRBUV
|
| 3597 |
+
Vrej VREJ
|
| 3598 |
+
vrem VREM
|
| 3599 |
+
Vrin VRIN
|
| 3600 |
+
vrj VRJ
|
| 3601 |
+
vrn VRN
|
| 3602 |
+
vroee VROEE
|
| 3603 |
+
vrou VROU
|
| 3604 |
+
vrouw VROUW
|
| 3605 |
+
Vrouw VROUW
|
| 3606 |
+
Vrsac VRSAC
|
| 3607 |
+
Vrtis VRTI's
|
| 3608 |
+
V&R V and R
|
| 3609 |
+
vr VR
|
| 3610 |
+
V. R. VR
|
| 3611 |
+
V.R. VR
|
| 3612 |
+
VSANs VSAN's
|
| 3613 |
+
VSATs VSAT's
|
| 3614 |
+
Vsekh VSEKH
|
| 3615 |
+
vse VSE
|
| 3616 |
+
vso VSO
|
| 3617 |
+
VSPs VSP's
|
| 3618 |
+
vs. versus
|
| 3619 |
+
_vs._ versus
|
| 3620 |
+
vsyo VSYO
|
| 3621 |
+
VTE VT eL
|
| 3622 |
+
Vtic VTIC
|
| 3623 |
+
VTi VTI
|
| 3624 |
+
V&T's V and T's
|
| 3625 |
+
V&T V and T
|
| 3626 |
+
V.T. VT
|
| 3627 |
+
Vuur VUUR
|
| 3628 |
+
VVIPs VVIP's
|
| 3629 |
+
V. V. VV
|
| 3630 |
+
V.V. VV
|
| 3631 |
+
VWs VW's
|
| 3632 |
+
Vyg VYG
|
| 3633 |
+
vyr VYR
|
| 3634 |
+
vy VY
|
| 3635 |
+
vz VZ
|
| 3636 |
+
V. Z. VZ
|
| 3637 |
+
Waay WAAY
|
| 3638 |
+
Wa'il WAIL
|
| 3639 |
+
Wakf WAKF
|
| 3640 |
+
wa'l WAL
|
| 3641 |
+
waqf WAQF
|
| 3642 |
+
waqt WAQT
|
| 3643 |
+
Waqt WAQT
|
| 3644 |
+
Wasl WASL
|
| 3645 |
+
Watfa WATFA
|
| 3646 |
+
wau WAU
|
| 3647 |
+
Wau WAU
|
| 3648 |
+
W. A. WA
|
| 3649 |
+
W.A. WA
|
| 3650 |
+
waw WAW
|
| 3651 |
+
waza WAZA
|
| 3652 |
+
Waza WAZA
|
| 3653 |
+
WBs WB's
|
| 3654 |
+
W. B. WB
|
| 3655 |
+
W.B. WB
|
| 3656 |
+
W&CBR W and CBR
|
| 3657 |
+
wc WC
|
| 3658 |
+
W. C. WC
|
| 3659 |
+
W.C. WC
|
| 3660 |
+
W. D. WD
|
| 3661 |
+
W.D. WD
|
| 3662 |
+
W. E. WE
|
| 3663 |
+
W.E. WE
|
| 3664 |
+
WF&NW WF and NW
|
| 3665 |
+
W&F W and F
|
| 3666 |
+
W. F. WF
|
| 3667 |
+
W.F. WF
|
| 3668 |
+
wga WGA
|
| 3669 |
+
wgn WGN
|
| 3670 |
+
wg WG
|
| 3671 |
+
W. G. WG
|
| 3672 |
+
W.G. WG
|
| 3673 |
+
W&H W and H
|
| 3674 |
+
W. H. WH
|
| 3675 |
+
W.H. WH
|
| 3676 |
+
Whyld WHYLD
|
| 3677 |
+
Wica WICA
|
| 3678 |
+
wici WICI
|
| 3679 |
+
Wif WIF
|
| 3680 |
+
Wijk WIJK
|
| 3681 |
+
Wiwa WIWA
|
| 3682 |
+
W. I. WI
|
| 3683 |
+
wjaz WJAZ
|
| 3684 |
+
W&J's W and J's
|
| 3685 |
+
W&J W and J
|
| 3686 |
+
W. J. WJ
|
| 3687 |
+
W.J. WJ
|
| 3688 |
+
W. K. WK
|
| 3689 |
+
W.K. WK
|
| 3690 |
+
W&LE W and LE
|
| 3691 |
+
Wley WLEY
|
| 3692 |
+
wlrs WLRS
|
| 3693 |
+
W. L. WL
|
| 3694 |
+
W.L. WL
|
| 3695 |
+
wml WML
|
| 3696 |
+
W&M W and M
|
| 3697 |
+
W. M. WM
|
| 3698 |
+
W.M. WM
|
| 3699 |
+
W. N. WN
|
| 3700 |
+
W.N. WN
|
| 3701 |
+
wnzaa WNZAA
|
| 3702 |
+
W&OD W and OD
|
| 3703 |
+
Worh WORH
|
| 3704 |
+
W. O. WO
|
| 3705 |
+
W.O. WO
|
| 3706 |
+
wpt WPT
|
| 3707 |
+
wp WP
|
| 3708 |
+
W. P. WP
|
| 3709 |
+
W.P. WP
|
| 3710 |
+
Wrec WREC
|
| 3711 |
+
W. R. WR
|
| 3712 |
+
W.R. WR
|
| 3713 |
+
ws WS
|
| 3714 |
+
W. S. WS
|
| 3715 |
+
W.S. WS
|
| 3716 |
+
WTs WT's
|
| 3717 |
+
WTTs WTT's
|
| 3718 |
+
W. T. WT
|
| 3719 |
+
W.T. WT
|
| 3720 |
+
WUAs WUA's
|
| 3721 |
+
Wudl WUDL
|
| 3722 |
+
Wuhr WUHR
|
| 3723 |
+
Wuhu WUHU
|
| 3724 |
+
Wu's WU's
|
| 3725 |
+
wuv WUV
|
| 3726 |
+
W. U. WU
|
| 3727 |
+
Wuz WUZ
|
| 3728 |
+
WVa WVA
|
| 3729 |
+
W. V. WV
|
| 3730 |
+
W.V. WV
|
| 3731 |
+
Wwe WWE
|
| 3732 |
+
W. W. WW
|
| 3733 |
+
W.W. WW
|
| 3734 |
+
wx WX
|
| 3735 |
+
W.Y. WY
|
| 3736 |
+
wyzc WYZC
|
| 3737 |
+
W. Z. WZ
|
| 3738 |
+
xbg XBG
|
| 3739 |
+
Xbra XBRA
|
| 3740 |
+
xCo XCO
|
| 3741 |
+
X. C. XC
|
| 3742 |
+
xda XDA
|
| 3743 |
+
XDRs XDR's
|
| 3744 |
+
X. D. XD
|
| 3745 |
+
Xfce XFCE
|
| 3746 |
+
xf XF
|
| 3747 |
+
X.F. XF
|
| 3748 |
+
xh XH
|
| 3749 |
+
X. H. XH
|
| 3750 |
+
xk XK
|
| 3751 |
+
xmc XMC
|
| 3752 |
+
xml XML
|
| 3753 |
+
X.M. XM
|
| 3754 |
+
xO XO
|
| 3755 |
+
X.O. XO
|
| 3756 |
+
XPe XPE
|
| 3757 |
+
X.Q. XQ
|
| 3758 |
+
XSi XSI
|
| 3759 |
+
xsr XSR
|
| 3760 |
+
XTwas XTWA's
|
| 3761 |
+
xt XT
|
| 3762 |
+
X. W. XW
|
| 3763 |
+
xy XY
|
| 3764 |
+
xyz XYZ
|
| 3765 |
+
xyZ XYZ
|
| 3766 |
+
Y. A. YA
|
| 3767 |
+
Y.A. YA
|
| 3768 |
+
Y. B. YB
|
| 3769 |
+
Y.B. YB
|
| 3770 |
+
ycia YCIA
|
| 3771 |
+
ycie YCIE
|
| 3772 |
+
yc YC
|
| 3773 |
+
Y. C. YC
|
| 3774 |
+
Y.C. YC
|
| 3775 |
+
Ydby YDBY
|
| 3776 |
+
Yde YDE
|
| 3777 |
+
YdiB YDIB
|
| 3778 |
+
yd YD
|
| 3779 |
+
Y. D. YD
|
| 3780 |
+
Y.D. YD
|
| 3781 |
+
Y.E. YE
|
| 3782 |
+
YFCs YFC's
|
| 3783 |
+
yfle YFLE
|
| 3784 |
+
YF&R YF and R
|
| 3785 |
+
yg YG
|
| 3786 |
+
Y. G. YG
|
| 3787 |
+
Y.G. YG
|
| 3788 |
+
Y. H. YH
|
| 3789 |
+
Y. I. YI
|
| 3790 |
+
Y.I. YI
|
| 3791 |
+
yj YJ
|
| 3792 |
+
Y. J. YJ
|
| 3793 |
+
Ykt YKT
|
| 3794 |
+
Y. K. YK
|
| 3795 |
+
Y.K. YK
|
| 3796 |
+
Yle YLE
|
| 3797 |
+
yl YL
|
| 3798 |
+
Y. L. YL
|
| 3799 |
+
Ymke YMKE
|
| 3800 |
+
ym YM
|
| 3801 |
+
Y. M. YM
|
| 3802 |
+
yndi YNDI
|
| 3803 |
+
Yndi YNDI
|
| 3804 |
+
yne YNE
|
| 3805 |
+
Yngve YNGVE
|
| 3806 |
+
Ynis YNI's
|
| 3807 |
+
yn YN
|
| 3808 |
+
Yn YN
|
| 3809 |
+
Y. N. YN
|
| 3810 |
+
Y.N. YN
|
| 3811 |
+
Y.O. YO
|
| 3812 |
+
ypa YPA
|
| 3813 |
+
Y.P. YP
|
| 3814 |
+
Y. Q. YQ
|
| 3815 |
+
yra YRA
|
| 3816 |
+
Yra YRA
|
| 3817 |
+
Y&R Y and R
|
| 3818 |
+
YSK'da YSKDA
|
| 3819 |
+
YSK'ya YSKYA
|
| 3820 |
+
Ys Y's
|
| 3821 |
+
Y.S. YS
|
| 3822 |
+
yta YTA
|
| 3823 |
+
Ytre YTRE
|
| 3824 |
+
Y&T Y and T
|
| 3825 |
+
Y. T. YT
|
| 3826 |
+
Y.T. YT
|
| 3827 |
+
Y. V. YV
|
| 3828 |
+
Y. W. YW
|
| 3829 |
+
Y.Y. YY
|
| 3830 |
+
Z. A. ZA
|
| 3831 |
+
Z.A. ZA
|
| 3832 |
+
Zdar ZDAR
|
| 3833 |
+
zda ZDA
|
| 3834 |
+
zg ZG
|
| 3835 |
+
Z.G. ZG
|
| 3836 |
+
zh ZH
|
| 3837 |
+
Z. H. ZH
|
| 3838 |
+
Z.H. ZH
|
| 3839 |
+
zijn ZIJN
|
| 3840 |
+
zij ZIJ
|
| 3841 |
+
Zij ZIJ
|
| 3842 |
+
Z. I. ZI
|
| 3843 |
+
Z. J. ZJ
|
| 3844 |
+
Z.K. ZK
|
| 3845 |
+
Z.L. ZL
|
| 3846 |
+
Z.M. ZM
|
| 3847 |
+
ZnO ZNO
|
| 3848 |
+
Zpav ZPAV
|
| 3849 |
+
Z.P. ZP
|
| 3850 |
+
ZrI ZRI
|
| 3851 |
+
Zsuzsa ZSUZSA
|
| 3852 |
+
Z.W. ZW
|
| 3853 |
+
Z.X. ZX
|
| 3854 |
+
Z. Y. ZY
|
| 3855 |
+
Z.Y. ZY
|
| 3856 |
+
Z. Z. ZZ
|
| 3857 |
+
Z.Z. ZZ
|
| 3858 |
+
2.5G two point five g
|
| 3859 |
+
7-eleven seven eleven
|
| 3860 |
+
AAA triple a
|
| 3861 |
+
C# c sharp
|
| 3862 |
+
DeepMind deep mind
|
| 3863 |
+
DeepStream deep stream
|
| 3864 |
+
DevOps dev ops
|
| 3865 |
+
DisplayPort display port
|
| 3866 |
+
HuggingFace hugging face
|
| 3867 |
+
ServiceNow service now
|
| 3868 |
+
SuperCloud super cloud
|
| 3869 |
+
Wi-Fi wifi
|
| 3870 |
+
7-Eleven seven eleven
|
| 3871 |
+
Deepmind deep mind
|
| 3872 |
+
Deepstream deep stream
|
| 3873 |
+
Devops dev ops
|
| 3874 |
+
Displayport display port
|
| 3875 |
+
Huggingface hugging face
|
| 3876 |
+
Servicenow service now
|
| 3877 |
+
Supercloud super cloud
|
| 3878 |
+
wi-fi wifi
|
| 3879 |
+
deepmind deep mind
|
| 3880 |
+
deepstream deep stream
|
| 3881 |
+
devops dev ops
|
| 3882 |
+
displayport display port
|
| 3883 |
+
huggingface hugging face
|
| 3884 |
+
servicenow service now
|
| 3885 |
+
supercloud super cloud
|
| 3886 |
+
wi-fi wifi
|
| 3887 |
+
3-D three d
|
| 3888 |
+
401k four oh one k
|
| 3889 |
+
401(k) four oh one k
|
| 3890 |
+
401 (k) four oh one k
|
vendor/zonos3/vendor/nemo_text_processing/text_normalization/en/graph_utils.py
ADDED
|
@@ -0,0 +1,337 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Copyright (c) 2021, NVIDIA CORPORATION. All rights reserved.
|
| 2 |
+
# Copyright 2015 and onwards Google, Inc.
|
| 3 |
+
#
|
| 4 |
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
| 5 |
+
# you may not use this file except in compliance with the License.
|
| 6 |
+
# You may obtain a copy of the License at
|
| 7 |
+
#
|
| 8 |
+
# http://www.apache.org/licenses/LICENSE-2.0
|
| 9 |
+
#
|
| 10 |
+
# Unless required by applicable law or agreed to in writing, software
|
| 11 |
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
| 12 |
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 13 |
+
# See the License for the specific language governing permissions and
|
| 14 |
+
# limitations under the License.
|
| 15 |
+
|
| 16 |
+
import os
|
| 17 |
+
import string
|
| 18 |
+
from pathlib import Path
|
| 19 |
+
from typing import Dict
|
| 20 |
+
|
| 21 |
+
import pynini
|
| 22 |
+
from pynini import Far
|
| 23 |
+
from pynini.examples import plurals
|
| 24 |
+
from pynini.export import export
|
| 25 |
+
from pynini.lib import byte, pynutil, utf8
|
| 26 |
+
|
| 27 |
+
from zonos3.vendor.nemo_text_processing.text_normalization.en.utils import get_abs_path, load_labels
|
| 28 |
+
from zonos3.vendor.nemo_text_processing.utils.logging import logger
|
| 29 |
+
|
| 30 |
+
NEMO_CHAR = utf8.VALID_UTF8_CHAR
|
| 31 |
+
|
| 32 |
+
NEMO_DIGIT = byte.DIGIT
|
| 33 |
+
NEMO_LOWER = pynini.union(*string.ascii_lowercase).optimize()
|
| 34 |
+
NEMO_UPPER = pynini.union(*string.ascii_uppercase).optimize()
|
| 35 |
+
NEMO_ALPHA = pynini.union(NEMO_LOWER, NEMO_UPPER).optimize()
|
| 36 |
+
NEMO_ALNUM = pynini.union(NEMO_DIGIT, NEMO_ALPHA).optimize()
|
| 37 |
+
NEMO_HEX = pynini.union(*string.hexdigits).optimize()
|
| 38 |
+
NEMO_NON_BREAKING_SPACE = "\u00a0"
|
| 39 |
+
NEMO_SPACE = " "
|
| 40 |
+
NEMO_WHITE_SPACE = pynini.union(" ", "\t", "\n", "\r", "\u00a0").optimize()
|
| 41 |
+
NEMO_NOT_SPACE = pynini.difference(NEMO_CHAR, NEMO_WHITE_SPACE).optimize()
|
| 42 |
+
NEMO_NOT_QUOTE = pynini.difference(NEMO_CHAR, r'"').optimize()
|
| 43 |
+
|
| 44 |
+
NEMO_PUNCT = pynini.union(*map(pynini.escape, string.punctuation)).optimize()
|
| 45 |
+
NEMO_GRAPH = pynini.union(NEMO_ALNUM, NEMO_PUNCT).optimize()
|
| 46 |
+
|
| 47 |
+
NEMO_SIGMA = pynini.closure(NEMO_CHAR)
|
| 48 |
+
NEMO_LOWER_NOT_A = pynini.union(
|
| 49 |
+
"b",
|
| 50 |
+
"c",
|
| 51 |
+
"d",
|
| 52 |
+
"e",
|
| 53 |
+
"f",
|
| 54 |
+
"g",
|
| 55 |
+
"h",
|
| 56 |
+
"i",
|
| 57 |
+
"j",
|
| 58 |
+
"k",
|
| 59 |
+
"l",
|
| 60 |
+
"m",
|
| 61 |
+
"n",
|
| 62 |
+
"o",
|
| 63 |
+
"p",
|
| 64 |
+
"q",
|
| 65 |
+
"r",
|
| 66 |
+
"s",
|
| 67 |
+
"t",
|
| 68 |
+
"u",
|
| 69 |
+
"v",
|
| 70 |
+
"w",
|
| 71 |
+
"x",
|
| 72 |
+
"y",
|
| 73 |
+
"z",
|
| 74 |
+
).optimize()
|
| 75 |
+
|
| 76 |
+
delete_space = pynutil.delete(pynini.closure(NEMO_WHITE_SPACE))
|
| 77 |
+
delete_zero_or_one_space = pynutil.delete(pynini.closure(NEMO_WHITE_SPACE, 0, 1))
|
| 78 |
+
insert_space = pynutil.insert(" ")
|
| 79 |
+
delete_extra_space = pynini.cross(pynini.closure(NEMO_WHITE_SPACE, 1), " ")
|
| 80 |
+
delete_preserve_order = pynini.closure(
|
| 81 |
+
pynutil.delete(" preserve_order: true")
|
| 82 |
+
| (pynutil.delete(' field_order: "') + NEMO_NOT_QUOTE + pynutil.delete('"'))
|
| 83 |
+
)
|
| 84 |
+
|
| 85 |
+
|
| 86 |
+
# Common string literals; expand as you see fit.
|
| 87 |
+
username_string = "username"
|
| 88 |
+
double_quotes = '"'
|
| 89 |
+
domain_string = "domain"
|
| 90 |
+
protocol_string = "protocol"
|
| 91 |
+
slash = "/"
|
| 92 |
+
double_slash = "//"
|
| 93 |
+
triple_slash = "///"
|
| 94 |
+
file = "file"
|
| 95 |
+
period = "."
|
| 96 |
+
at = "@"
|
| 97 |
+
colon = ":"
|
| 98 |
+
https = "https"
|
| 99 |
+
http = "http"
|
| 100 |
+
www = "www"
|
| 101 |
+
|
| 102 |
+
|
| 103 |
+
suppletive = pynini.string_file(get_abs_path("data/suppletive.tsv"))
|
| 104 |
+
# _v = pynini.union("a", "e", "i", "o", "u")
|
| 105 |
+
_c = pynini.union(
|
| 106 |
+
"b",
|
| 107 |
+
"c",
|
| 108 |
+
"d",
|
| 109 |
+
"f",
|
| 110 |
+
"g",
|
| 111 |
+
"h",
|
| 112 |
+
"j",
|
| 113 |
+
"k",
|
| 114 |
+
"l",
|
| 115 |
+
"m",
|
| 116 |
+
"n",
|
| 117 |
+
"p",
|
| 118 |
+
"q",
|
| 119 |
+
"r",
|
| 120 |
+
"s",
|
| 121 |
+
"t",
|
| 122 |
+
"v",
|
| 123 |
+
"w",
|
| 124 |
+
"x",
|
| 125 |
+
"y",
|
| 126 |
+
"z",
|
| 127 |
+
)
|
| 128 |
+
_ies = NEMO_SIGMA + _c + pynini.cross("y", "ies")
|
| 129 |
+
_es = NEMO_SIGMA + pynini.union("s", "sh", "ch", "x", "z") + pynutil.insert("es")
|
| 130 |
+
_s = NEMO_SIGMA + pynutil.insert("s")
|
| 131 |
+
|
| 132 |
+
graph_plural = plurals._priority_union(
|
| 133 |
+
suppletive,
|
| 134 |
+
plurals._priority_union(_ies, plurals._priority_union(_es, _s, NEMO_SIGMA), NEMO_SIGMA),
|
| 135 |
+
NEMO_SIGMA,
|
| 136 |
+
).optimize()
|
| 137 |
+
|
| 138 |
+
SINGULAR_TO_PLURAL = graph_plural
|
| 139 |
+
PLURAL_TO_SINGULAR = pynini.invert(graph_plural)
|
| 140 |
+
TO_LOWER = pynini.union(*[pynini.cross(x, y) for x, y in zip(string.ascii_uppercase, string.ascii_lowercase)])
|
| 141 |
+
TO_UPPER = pynini.invert(TO_LOWER)
|
| 142 |
+
MIN_NEG_WEIGHT = -0.0001
|
| 143 |
+
MIN_POS_WEIGHT = 0.0001
|
| 144 |
+
INPUT_CASED = "cased"
|
| 145 |
+
INPUT_LOWER_CASED = "lower_cased"
|
| 146 |
+
MINUS = pynini.union("minus", "Minus").optimize()
|
| 147 |
+
|
| 148 |
+
|
| 149 |
+
def capitalized_input_graph(
|
| 150 |
+
graph: "pynini.FstLike",
|
| 151 |
+
original_graph_weight: float = None,
|
| 152 |
+
capitalized_graph_weight: float = None,
|
| 153 |
+
) -> "pynini.FstLike":
|
| 154 |
+
"""
|
| 155 |
+
Allow graph input to be capitalized, e.g. for ITN)
|
| 156 |
+
|
| 157 |
+
Args:
|
| 158 |
+
graph: FstGraph
|
| 159 |
+
original_graph_weight: weight to add to the original `graph`
|
| 160 |
+
capitalized_graph_weight: weight to add to the capitalized graph
|
| 161 |
+
"""
|
| 162 |
+
capitalized_graph = pynini.compose(TO_LOWER + NEMO_SIGMA, graph).optimize()
|
| 163 |
+
|
| 164 |
+
if original_graph_weight is not None:
|
| 165 |
+
graph = pynutil.add_weight(graph, weight=original_graph_weight)
|
| 166 |
+
|
| 167 |
+
if capitalized_graph_weight is not None:
|
| 168 |
+
capitalized_graph = pynutil.add_weight(capitalized_graph, weight=capitalized_graph_weight)
|
| 169 |
+
|
| 170 |
+
graph |= capitalized_graph
|
| 171 |
+
return graph
|
| 172 |
+
|
| 173 |
+
|
| 174 |
+
def generator_main(file_name: str, graphs: Dict[str, "pynini.FstLike"]):
|
| 175 |
+
"""
|
| 176 |
+
Exports graph as OpenFst finite state archive (FAR) file with given file name and rule name.
|
| 177 |
+
|
| 178 |
+
Args:
|
| 179 |
+
file_name: exported file name
|
| 180 |
+
graphs: Mapping of a rule name and Pynini WFST graph to be exported
|
| 181 |
+
"""
|
| 182 |
+
exporter = export.Exporter(file_name)
|
| 183 |
+
for rule, graph in graphs.items():
|
| 184 |
+
exporter[rule] = graph.optimize()
|
| 185 |
+
exporter.close()
|
| 186 |
+
logger.info(f"Created {file_name}")
|
| 187 |
+
|
| 188 |
+
|
| 189 |
+
def get_plurals(fst):
|
| 190 |
+
"""
|
| 191 |
+
Given singular returns plurals
|
| 192 |
+
|
| 193 |
+
Args:
|
| 194 |
+
fst: Fst
|
| 195 |
+
|
| 196 |
+
Returns plurals to given singular forms
|
| 197 |
+
"""
|
| 198 |
+
return SINGULAR_TO_PLURAL @ fst
|
| 199 |
+
|
| 200 |
+
|
| 201 |
+
def get_singulars(fst):
|
| 202 |
+
"""
|
| 203 |
+
Given plural returns singulars
|
| 204 |
+
|
| 205 |
+
Args:
|
| 206 |
+
fst: Fst
|
| 207 |
+
|
| 208 |
+
Returns singulars to given plural forms
|
| 209 |
+
"""
|
| 210 |
+
return PLURAL_TO_SINGULAR @ fst
|
| 211 |
+
|
| 212 |
+
|
| 213 |
+
def convert_space(fst) -> "pynini.FstLike":
|
| 214 |
+
"""
|
| 215 |
+
Converts space to nonbreaking space.
|
| 216 |
+
Used only in tagger grammars for transducing token values within quotes, e.g. name: "hello kitty"
|
| 217 |
+
This is making transducer significantly slower, so only use when there could be potential spaces within quotes, otherwise leave it.
|
| 218 |
+
|
| 219 |
+
Args:
|
| 220 |
+
fst: input fst
|
| 221 |
+
|
| 222 |
+
Returns output fst where breaking spaces are converted to non breaking spaces
|
| 223 |
+
"""
|
| 224 |
+
return fst @ pynini.cdrewrite(pynini.cross(NEMO_SPACE, NEMO_NON_BREAKING_SPACE), "", "", NEMO_SIGMA)
|
| 225 |
+
|
| 226 |
+
|
| 227 |
+
def string_map_cased(input_file: str, input_case: str = INPUT_LOWER_CASED):
|
| 228 |
+
labels = load_labels(input_file)
|
| 229 |
+
|
| 230 |
+
if input_case == INPUT_CASED:
|
| 231 |
+
additional_labels = []
|
| 232 |
+
for written, spoken, *weight in labels:
|
| 233 |
+
written_capitalized = written[0].upper() + written[1:]
|
| 234 |
+
additional_labels.extend(
|
| 235 |
+
[
|
| 236 |
+
[
|
| 237 |
+
written_capitalized,
|
| 238 |
+
spoken.capitalize(),
|
| 239 |
+
], # first letter capitalized
|
| 240 |
+
[
|
| 241 |
+
written_capitalized,
|
| 242 |
+
spoken.upper().replace(" AND ", " and "),
|
| 243 |
+
], # # add pairs with the all letters capitalized
|
| 244 |
+
]
|
| 245 |
+
)
|
| 246 |
+
|
| 247 |
+
spoken_no_space = spoken.replace(" ", "")
|
| 248 |
+
# add abbreviations without spaces (both lower and upper case), i.e. "BMW" not "B M W"
|
| 249 |
+
if len(spoken) == (2 * len(spoken_no_space) - 1):
|
| 250 |
+
logger.debug(f"This is weight {weight}")
|
| 251 |
+
if len(weight) == 0:
|
| 252 |
+
additional_labels.extend(
|
| 253 |
+
[
|
| 254 |
+
[written, spoken_no_space],
|
| 255 |
+
[written_capitalized, spoken_no_space.upper()],
|
| 256 |
+
]
|
| 257 |
+
)
|
| 258 |
+
else:
|
| 259 |
+
additional_labels.extend(
|
| 260 |
+
[
|
| 261 |
+
[written, spoken_no_space, weight[0]],
|
| 262 |
+
[written_capitalized, spoken_no_space.upper(), weight[0]],
|
| 263 |
+
]
|
| 264 |
+
)
|
| 265 |
+
labels += additional_labels
|
| 266 |
+
|
| 267 |
+
whitelist = pynini.string_map(labels).invert().optimize()
|
| 268 |
+
return whitelist
|
| 269 |
+
|
| 270 |
+
|
| 271 |
+
class GraphFst:
|
| 272 |
+
"""
|
| 273 |
+
Base class for all grammar fsts.
|
| 274 |
+
|
| 275 |
+
Args:
|
| 276 |
+
name: name of grammar class
|
| 277 |
+
kind: either 'classify' or 'verbalize'
|
| 278 |
+
deterministic: if True will provide a single transduction option,
|
| 279 |
+
for False multiple transduction are generated (used for audio-based normalization)
|
| 280 |
+
"""
|
| 281 |
+
|
| 282 |
+
def __init__(self, name: str, kind: str, deterministic: bool = True):
|
| 283 |
+
self.name = name
|
| 284 |
+
self.kind = kind
|
| 285 |
+
self._fst = None
|
| 286 |
+
self.deterministic = deterministic
|
| 287 |
+
|
| 288 |
+
self.far_path = Path(os.path.dirname(__file__) + "/grammars/" + kind + "/" + name + ".far")
|
| 289 |
+
if self.far_exist():
|
| 290 |
+
self._fst = Far(self.far_path, mode="r", arc_type="standard", far_type="default").get_fst()
|
| 291 |
+
|
| 292 |
+
def far_exist(self) -> bool:
|
| 293 |
+
"""
|
| 294 |
+
Returns true if FAR can be loaded
|
| 295 |
+
"""
|
| 296 |
+
return self.far_path.exists()
|
| 297 |
+
|
| 298 |
+
@property
|
| 299 |
+
def fst(self) -> "pynini.FstLike":
|
| 300 |
+
return self._fst
|
| 301 |
+
|
| 302 |
+
@fst.setter
|
| 303 |
+
def fst(self, fst):
|
| 304 |
+
self._fst = fst
|
| 305 |
+
|
| 306 |
+
def add_tokens(self, fst) -> "pynini.FstLike":
|
| 307 |
+
"""
|
| 308 |
+
Wraps class name around to given fst
|
| 309 |
+
|
| 310 |
+
Args:
|
| 311 |
+
fst: input fst
|
| 312 |
+
|
| 313 |
+
Returns:
|
| 314 |
+
Fst: fst
|
| 315 |
+
"""
|
| 316 |
+
return pynutil.insert(f"{self.name} {{ ") + fst + pynutil.insert(" }")
|
| 317 |
+
|
| 318 |
+
def delete_tokens(self, fst) -> "pynini.FstLike":
|
| 319 |
+
"""
|
| 320 |
+
Deletes class name wrap around output of given fst
|
| 321 |
+
|
| 322 |
+
Args:
|
| 323 |
+
fst: input fst
|
| 324 |
+
|
| 325 |
+
Returns:
|
| 326 |
+
Fst: fst
|
| 327 |
+
"""
|
| 328 |
+
res = (
|
| 329 |
+
pynutil.delete(f"{self.name}")
|
| 330 |
+
+ delete_space
|
| 331 |
+
+ pynutil.delete("{")
|
| 332 |
+
+ delete_space
|
| 333 |
+
+ fst
|
| 334 |
+
+ delete_space
|
| 335 |
+
+ pynutil.delete("}")
|
| 336 |
+
)
|
| 337 |
+
return res @ pynini.cdrewrite(pynini.cross("\u00a0", " "), "", "", NEMO_SIGMA)
|
vendor/zonos3/vendor/nemo_text_processing/text_normalization/en/taggers/__init__.py
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Copyright (c) 2021, NVIDIA CORPORATION. All rights reserved.
|
| 2 |
+
#
|
| 3 |
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
| 4 |
+
# you may not use this file except in compliance with the License.
|
| 5 |
+
# You may obtain a copy of the License at
|
| 6 |
+
#
|
| 7 |
+
# http://www.apache.org/licenses/LICENSE-2.0
|
| 8 |
+
#
|
| 9 |
+
# Unless required by applicable law or agreed to in writing, software
|
| 10 |
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
| 11 |
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 12 |
+
# See the License for the specific language governing permissions and
|
| 13 |
+
# limitations under the License.
|
vendor/zonos3/vendor/nemo_text_processing/text_normalization/en/taggers/abbreviation.py
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Copyright (c) 2021, NVIDIA CORPORATION. All rights reserved.
|
| 2 |
+
#
|
| 3 |
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
| 4 |
+
# you may not use this file except in compliance with the License.
|
| 5 |
+
# You may obtain a copy of the License at
|
| 6 |
+
#
|
| 7 |
+
# http://www.apache.org/licenses/LICENSE-2.0
|
| 8 |
+
#
|
| 9 |
+
# Unless required by applicable law or agreed to in writing, software
|
| 10 |
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
| 11 |
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 12 |
+
# See the License for the specific language governing permissions and
|
| 13 |
+
# limitations under the License.
|
| 14 |
+
|
| 15 |
+
|
| 16 |
+
import pynini
|
| 17 |
+
from pynini.lib import pynutil
|
| 18 |
+
|
| 19 |
+
from zonos3.vendor.nemo_text_processing.text_normalization.en.graph_utils import NEMO_UPPER, GraphFst, insert_space
|
| 20 |
+
|
| 21 |
+
|
| 22 |
+
class AbbreviationFst(GraphFst):
|
| 23 |
+
"""
|
| 24 |
+
Finite state transducer for classifying electronic: as URLs, email addresses, etc.
|
| 25 |
+
e.g. "ABC" -> tokens { abbreviation { value: "A B C" } }
|
| 26 |
+
|
| 27 |
+
Args:
|
| 28 |
+
whitelist: whitelist FST
|
| 29 |
+
deterministic: if True will provide a single transduction option,
|
| 30 |
+
for False multiple transduction are generated (used for audio-based normalization)
|
| 31 |
+
"""
|
| 32 |
+
|
| 33 |
+
def __init__(self, whitelist: 'pynini.FstLike', deterministic: bool = True):
|
| 34 |
+
super().__init__(name="abbreviation", kind="classify", deterministic=deterministic)
|
| 35 |
+
|
| 36 |
+
dot = pynini.accep(".")
|
| 37 |
+
# A.B.C. -> A. B. C.
|
| 38 |
+
graph = NEMO_UPPER + dot + pynini.closure(insert_space + NEMO_UPPER + dot, 1)
|
| 39 |
+
# A.B.C. -> A.B.C.
|
| 40 |
+
graph |= NEMO_UPPER + dot + pynini.closure(NEMO_UPPER + dot, 1)
|
| 41 |
+
# ABC -> A B C
|
| 42 |
+
graph |= NEMO_UPPER + pynini.closure(insert_space + NEMO_UPPER, 1)
|
| 43 |
+
|
| 44 |
+
# exclude words that are included in the whitelist
|
| 45 |
+
graph = pynini.compose(
|
| 46 |
+
pynini.difference(pynini.project(graph, "input"), pynini.project(whitelist.graph, "input")), graph
|
| 47 |
+
)
|
| 48 |
+
|
| 49 |
+
graph = pynutil.insert("value: \"") + graph.optimize() + pynutil.insert("\"")
|
| 50 |
+
graph = self.add_tokens(graph)
|
| 51 |
+
self.fst = graph.optimize()
|
vendor/zonos3/vendor/nemo_text_processing/text_normalization/en/taggers/cardinal.py
ADDED
|
@@ -0,0 +1,151 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Copyright (c) 2021, NVIDIA CORPORATION. All rights reserved.
|
| 2 |
+
#
|
| 3 |
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
| 4 |
+
# you may not use this file except in compliance with the License.
|
| 5 |
+
# You may obtain a copy of the License at
|
| 6 |
+
#
|
| 7 |
+
# http://www.apache.org/licenses/LICENSE-2.0
|
| 8 |
+
#
|
| 9 |
+
# Unless required by applicable law or agreed to in writing, software
|
| 10 |
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
| 11 |
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 12 |
+
# See the License for the specific language governing permissions and
|
| 13 |
+
# limitations under the License.
|
| 14 |
+
|
| 15 |
+
|
| 16 |
+
import pynini
|
| 17 |
+
from pynini.examples import plurals
|
| 18 |
+
from pynini.lib import pynutil
|
| 19 |
+
|
| 20 |
+
from zonos3.vendor.nemo_text_processing.text_normalization.en.graph_utils import (
|
| 21 |
+
NEMO_DIGIT,
|
| 22 |
+
NEMO_NOT_QUOTE,
|
| 23 |
+
NEMO_SIGMA,
|
| 24 |
+
GraphFst,
|
| 25 |
+
insert_space,
|
| 26 |
+
)
|
| 27 |
+
from zonos3.vendor.nemo_text_processing.text_normalization.en.taggers.date import get_four_digit_year_graph
|
| 28 |
+
from zonos3.vendor.nemo_text_processing.text_normalization.en.utils import get_abs_path
|
| 29 |
+
|
| 30 |
+
|
| 31 |
+
class CardinalFst(GraphFst):
|
| 32 |
+
"""
|
| 33 |
+
Finite state transducer for classifying cardinals, e.g.
|
| 34 |
+
-23 -> cardinal { negative: "true" integer: "twenty three" } }
|
| 35 |
+
|
| 36 |
+
Args:
|
| 37 |
+
deterministic: if True will provide a single transduction option,
|
| 38 |
+
for False multiple transduction are generated (used for audio-based normalization)
|
| 39 |
+
"""
|
| 40 |
+
|
| 41 |
+
def __init__(self, deterministic: bool = True, lm: bool = False):
|
| 42 |
+
super().__init__(name="cardinal", kind="classify", deterministic=deterministic)
|
| 43 |
+
|
| 44 |
+
self.lm = lm
|
| 45 |
+
self.deterministic = deterministic
|
| 46 |
+
# TODO replace to have "oh" as a default for "0"
|
| 47 |
+
graph = pynini.Far(get_abs_path("data/number/cardinal_number_name.far")).get_fst()
|
| 48 |
+
graph_au = pynini.Far(get_abs_path("data/number/cardinal_number_name_au.far")).get_fst()
|
| 49 |
+
self.graph_hundred_component_at_least_one_none_zero_digit = (
|
| 50 |
+
pynini.closure(NEMO_DIGIT, 2, 3) | pynini.difference(NEMO_DIGIT, pynini.accep("0"))
|
| 51 |
+
) @ graph
|
| 52 |
+
|
| 53 |
+
graph_digit = pynini.string_file(get_abs_path("data/number/digit.tsv"))
|
| 54 |
+
graph_zero = pynini.string_file(get_abs_path("data/number/zero.tsv"))
|
| 55 |
+
|
| 56 |
+
single_digits_graph = pynini.invert(graph_digit | graph_zero)
|
| 57 |
+
self.single_digits_graph = single_digits_graph + pynini.closure(insert_space + single_digits_graph)
|
| 58 |
+
|
| 59 |
+
if not deterministic:
|
| 60 |
+
# for a single token allow only the same normalization
|
| 61 |
+
# "007" -> {"oh oh seven", "zero zero seven"} not {"oh zero seven"}
|
| 62 |
+
single_digits_graph_zero = pynini.invert(graph_digit | graph_zero)
|
| 63 |
+
single_digits_graph_oh = pynini.invert(graph_digit) | pynini.cross("0", "oh")
|
| 64 |
+
|
| 65 |
+
self.single_digits_graph = single_digits_graph_zero + pynini.closure(
|
| 66 |
+
insert_space + single_digits_graph_zero
|
| 67 |
+
)
|
| 68 |
+
self.single_digits_graph |= single_digits_graph_oh + pynini.closure(insert_space + single_digits_graph_oh)
|
| 69 |
+
|
| 70 |
+
single_digits_graph_with_commas = pynini.closure(
|
| 71 |
+
self.single_digits_graph + insert_space, 1, 3
|
| 72 |
+
) + pynini.closure(
|
| 73 |
+
pynutil.delete(",")
|
| 74 |
+
+ single_digits_graph
|
| 75 |
+
+ insert_space
|
| 76 |
+
+ single_digits_graph
|
| 77 |
+
+ insert_space
|
| 78 |
+
+ single_digits_graph,
|
| 79 |
+
1,
|
| 80 |
+
)
|
| 81 |
+
|
| 82 |
+
optional_minus_graph = pynini.closure(pynutil.insert("negative: ") + pynini.cross("-", "\"true\" "), 0, 1)
|
| 83 |
+
|
| 84 |
+
graph = (
|
| 85 |
+
pynini.closure(NEMO_DIGIT, 1, 3)
|
| 86 |
+
+ (pynini.closure(pynutil.delete(",") + NEMO_DIGIT**3) | pynini.closure(NEMO_DIGIT**3))
|
| 87 |
+
) @ graph
|
| 88 |
+
|
| 89 |
+
self.graph = graph
|
| 90 |
+
self.graph_with_and = self.add_optional_and(graph)
|
| 91 |
+
|
| 92 |
+
if deterministic:
|
| 93 |
+
long_numbers = pynini.compose(NEMO_DIGIT ** (5, ...), self.single_digits_graph).optimize()
|
| 94 |
+
self.long_numbers = plurals._priority_union(long_numbers, self.graph_with_and, NEMO_SIGMA).optimize()
|
| 95 |
+
cardinal_with_leading_zeros = pynini.compose(
|
| 96 |
+
pynini.accep("0") + pynini.closure(NEMO_DIGIT), self.single_digits_graph
|
| 97 |
+
)
|
| 98 |
+
final_graph = self.long_numbers | cardinal_with_leading_zeros
|
| 99 |
+
final_graph |= self.add_optional_and(graph_au)
|
| 100 |
+
else:
|
| 101 |
+
leading_zeros = pynini.compose(pynini.closure(pynini.accep("0"), 1), self.single_digits_graph)
|
| 102 |
+
cardinal_with_leading_zeros = (
|
| 103 |
+
leading_zeros + pynutil.insert(" ") + pynini.compose(pynini.closure(NEMO_DIGIT), self.graph_with_and)
|
| 104 |
+
)
|
| 105 |
+
self.long_numbers = self.graph_with_and | pynutil.add_weight(self.single_digits_graph, 0.0001)
|
| 106 |
+
# add small weight to non-default graphs to make sure the deterministic option is listed first
|
| 107 |
+
final_graph = (
|
| 108 |
+
self.long_numbers
|
| 109 |
+
| get_four_digit_year_graph() # allows e.g. 4567 be pronounced as forty five sixty seven
|
| 110 |
+
| pynutil.add_weight(single_digits_graph_with_commas, 0.0001)
|
| 111 |
+
| cardinal_with_leading_zeros
|
| 112 |
+
).optimize()
|
| 113 |
+
|
| 114 |
+
one_to_a_replacement_graph = (
|
| 115 |
+
pynini.cross("one hundred", "a hundred")
|
| 116 |
+
| pynini.cross("one thousand", "thousand")
|
| 117 |
+
| pynini.cross("one million", "a million")
|
| 118 |
+
)
|
| 119 |
+
final_graph |= pynini.compose(final_graph, one_to_a_replacement_graph.optimize() + NEMO_SIGMA).optimize()
|
| 120 |
+
# remove commas for 4 digits numbers
|
| 121 |
+
four_digit_comma_graph = (NEMO_DIGIT - "0") + pynutil.delete(",") + NEMO_DIGIT**3
|
| 122 |
+
final_graph |= pynini.compose(four_digit_comma_graph.optimize(), final_graph).optimize()
|
| 123 |
+
|
| 124 |
+
self.final_graph = final_graph
|
| 125 |
+
final_graph = optional_minus_graph + pynutil.insert("integer: \"") + final_graph + pynutil.insert("\"")
|
| 126 |
+
final_graph = self.add_tokens(final_graph)
|
| 127 |
+
self.fst = final_graph.optimize()
|
| 128 |
+
|
| 129 |
+
def add_optional_and(self, graph):
|
| 130 |
+
graph_with_and = graph
|
| 131 |
+
|
| 132 |
+
if not self.lm:
|
| 133 |
+
graph_with_and = pynutil.add_weight(graph, 0.00001)
|
| 134 |
+
not_quote = pynini.closure(NEMO_NOT_QUOTE)
|
| 135 |
+
no_thousand_million = pynini.difference(
|
| 136 |
+
not_quote, not_quote + pynini.union("thousand", "million") + not_quote
|
| 137 |
+
).optimize()
|
| 138 |
+
integer = (
|
| 139 |
+
not_quote + pynutil.add_weight(pynini.cross("hundred ", "hundred and ") + no_thousand_million, -0.0001)
|
| 140 |
+
).optimize()
|
| 141 |
+
|
| 142 |
+
no_hundred = pynini.difference(NEMO_SIGMA, not_quote + pynini.accep("hundred") + not_quote).optimize()
|
| 143 |
+
integer |= (
|
| 144 |
+
not_quote + pynutil.add_weight(pynini.cross("thousand ", "thousand and ") + no_hundred, -0.0001)
|
| 145 |
+
).optimize()
|
| 146 |
+
|
| 147 |
+
optional_hundred = pynini.compose((NEMO_DIGIT - "0") ** 3, graph).optimize()
|
| 148 |
+
optional_hundred = pynini.compose(optional_hundred, NEMO_SIGMA + pynini.cross(" hundred", "") + NEMO_SIGMA)
|
| 149 |
+
graph_with_and |= pynini.compose(graph, integer).optimize()
|
| 150 |
+
graph_with_and |= optional_hundred
|
| 151 |
+
return graph_with_and
|
vendor/zonos3/vendor/nemo_text_processing/text_normalization/en/taggers/date.py
ADDED
|
@@ -0,0 +1,386 @@
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Copyright (c) 2021, NVIDIA CORPORATION. All rights reserved.
|
| 2 |
+
#
|
| 3 |
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
| 4 |
+
# you may not use this file except in compliance with the License.
|
| 5 |
+
# You may obtain a copy of the License at
|
| 6 |
+
#
|
| 7 |
+
# http://www.apache.org/licenses/LICENSE-2.0
|
| 8 |
+
#
|
| 9 |
+
# Unless required by applicable law or agreed to in writing, software
|
| 10 |
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
| 11 |
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 12 |
+
# See the License for the specific language governing permissions and
|
| 13 |
+
# limitations under the License.
|
| 14 |
+
|
| 15 |
+
import pynini
|
| 16 |
+
from pynini.examples import plurals
|
| 17 |
+
from pynini.lib import pynutil
|
| 18 |
+
|
| 19 |
+
from zonos3.vendor.nemo_text_processing.text_normalization.en.graph_utils import (
|
| 20 |
+
NEMO_CHAR,
|
| 21 |
+
NEMO_DIGIT,
|
| 22 |
+
NEMO_LOWER,
|
| 23 |
+
NEMO_SIGMA,
|
| 24 |
+
TO_LOWER,
|
| 25 |
+
GraphFst,
|
| 26 |
+
delete_extra_space,
|
| 27 |
+
delete_space,
|
| 28 |
+
insert_space,
|
| 29 |
+
)
|
| 30 |
+
from zonos3.vendor.nemo_text_processing.text_normalization.en.utils import (
|
| 31 |
+
augment_labels_with_punct_at_end,
|
| 32 |
+
get_abs_path,
|
| 33 |
+
load_labels,
|
| 34 |
+
)
|
| 35 |
+
|
| 36 |
+
graph_teen = pynini.invert(pynini.string_file(get_abs_path("data/number/teen.tsv"))).optimize()
|
| 37 |
+
graph_digit = pynini.invert(pynini.string_file(get_abs_path("data/number/digit.tsv"))).optimize()
|
| 38 |
+
ties_graph = pynini.invert(pynini.string_file(get_abs_path("data/number/ty.tsv"))).optimize()
|
| 39 |
+
year_suffix = load_labels(get_abs_path("data/date/year_suffix.tsv"))
|
| 40 |
+
year_suffix.extend(augment_labels_with_punct_at_end(year_suffix))
|
| 41 |
+
year_suffix = pynini.string_map(year_suffix).optimize()
|
| 42 |
+
|
| 43 |
+
|
| 44 |
+
def get_ties_graph(deterministic: bool = True):
|
| 45 |
+
"""
|
| 46 |
+
Returns two digit transducer, e.g.
|
| 47 |
+
03 -> o three
|
| 48 |
+
12 -> thirteen
|
| 49 |
+
20 -> twenty
|
| 50 |
+
"""
|
| 51 |
+
graph = graph_teen | ties_graph + pynutil.delete("0") | ties_graph + insert_space + graph_digit
|
| 52 |
+
|
| 53 |
+
if deterministic:
|
| 54 |
+
graph = graph | pynini.cross("0", "oh") + insert_space + graph_digit
|
| 55 |
+
else:
|
| 56 |
+
graph = graph | (pynini.cross("0", "oh") | pynini.cross("0", "zero")) + insert_space + graph_digit
|
| 57 |
+
|
| 58 |
+
return graph.optimize()
|
| 59 |
+
|
| 60 |
+
|
| 61 |
+
def get_four_digit_year_graph(deterministic: bool = True):
|
| 62 |
+
"""
|
| 63 |
+
Returns a four digit transducer which is combination of ties/teen or digits
|
| 64 |
+
(using hundred instead of thousand format), e.g.
|
| 65 |
+
1219 -> twelve nineteen
|
| 66 |
+
3900 -> thirty nine hundred
|
| 67 |
+
"""
|
| 68 |
+
graph_ties = get_ties_graph(deterministic)
|
| 69 |
+
|
| 70 |
+
graph_with_s = (
|
| 71 |
+
(graph_ties + insert_space + graph_ties)
|
| 72 |
+
| (graph_teen + insert_space + (ties_graph | pynini.cross("1", "ten")))
|
| 73 |
+
) + pynutil.delete("0s")
|
| 74 |
+
|
| 75 |
+
graph_with_s |= (graph_teen | graph_ties) + insert_space + pynini.cross("00", "hundred") + pynutil.delete("s")
|
| 76 |
+
graph_with_s = graph_with_s @ pynini.cdrewrite(
|
| 77 |
+
pynini.cross("y", "ies") | pynutil.insert("s"), "", "[EOS]", NEMO_SIGMA
|
| 78 |
+
)
|
| 79 |
+
|
| 80 |
+
graph = graph_ties + insert_space + graph_ties
|
| 81 |
+
graph |= (graph_teen | graph_ties) + insert_space + pynini.cross("00", "hundred")
|
| 82 |
+
|
| 83 |
+
thousand_graph = (
|
| 84 |
+
graph_digit
|
| 85 |
+
+ insert_space
|
| 86 |
+
+ pynini.cross("00", "thousand")
|
| 87 |
+
+ (pynutil.delete("0") | insert_space + graph_digit)
|
| 88 |
+
)
|
| 89 |
+
thousand_graph |= (
|
| 90 |
+
graph_digit
|
| 91 |
+
+ insert_space
|
| 92 |
+
+ pynini.cross("000", "thousand")
|
| 93 |
+
+ pynini.closure(pynutil.delete(" "), 0, 1)
|
| 94 |
+
+ pynini.accep("s")
|
| 95 |
+
)
|
| 96 |
+
|
| 97 |
+
graph |= graph_with_s
|
| 98 |
+
if deterministic:
|
| 99 |
+
graph = plurals._priority_union(thousand_graph, graph, NEMO_SIGMA)
|
| 100 |
+
else:
|
| 101 |
+
graph |= thousand_graph
|
| 102 |
+
|
| 103 |
+
return graph.optimize()
|
| 104 |
+
|
| 105 |
+
|
| 106 |
+
def _get_two_digit_year_with_s_graph():
|
| 107 |
+
# to handle '70s -> seventies
|
| 108 |
+
graph = (
|
| 109 |
+
pynini.closure(pynutil.delete("'"), 0, 1)
|
| 110 |
+
+ pynini.compose(
|
| 111 |
+
ties_graph + pynutil.delete("0s"), pynini.cdrewrite(pynini.cross("y", "ies"), "", "[EOS]", NEMO_SIGMA)
|
| 112 |
+
)
|
| 113 |
+
).optimize()
|
| 114 |
+
return graph
|
| 115 |
+
|
| 116 |
+
|
| 117 |
+
def _get_year_graph(cardinal_graph, deterministic: bool = True):
|
| 118 |
+
"""
|
| 119 |
+
Transducer for year, only from 1000 - 2999 e.g.
|
| 120 |
+
1290 -> twelve nineteen
|
| 121 |
+
2000 - 2009 will be verbalized as two thousand.
|
| 122 |
+
|
| 123 |
+
Transducer for 3 digit year, e.g. 123-> one twenty three
|
| 124 |
+
|
| 125 |
+
Transducer for year with suffix
|
| 126 |
+
123 A.D., 4200 B.C
|
| 127 |
+
"""
|
| 128 |
+
graph = get_four_digit_year_graph(deterministic)
|
| 129 |
+
graph = (pynini.union("1", "2") + (NEMO_DIGIT**3) + pynini.closure(pynini.cross(" s", "s") | "s", 0, 1)) @ graph
|
| 130 |
+
|
| 131 |
+
graph |= _get_two_digit_year_with_s_graph()
|
| 132 |
+
|
| 133 |
+
three_digit_year = (NEMO_DIGIT @ cardinal_graph) + insert_space + (NEMO_DIGIT**2) @ cardinal_graph
|
| 134 |
+
year_with_suffix = (
|
| 135 |
+
(get_four_digit_year_graph(deterministic=True) | three_digit_year) + delete_space + insert_space + year_suffix
|
| 136 |
+
)
|
| 137 |
+
graph |= year_with_suffix
|
| 138 |
+
return graph.optimize()
|
| 139 |
+
|
| 140 |
+
|
| 141 |
+
def _get_two_digit_year(cardinal_graph, single_digits_graph):
|
| 142 |
+
two_digit_year = NEMO_DIGIT ** (2) @ plurals._priority_union(cardinal_graph, single_digits_graph, NEMO_SIGMA)
|
| 143 |
+
return two_digit_year
|
| 144 |
+
|
| 145 |
+
|
| 146 |
+
def _get_financial_period_graph():
|
| 147 |
+
# 1H23 -> first half of twenty three
|
| 148 |
+
# 3Q22 -> third quarter of twenty two
|
| 149 |
+
|
| 150 |
+
h_ordinals = pynini.cross('1', 'first') | pynini.cross('2', 'second')
|
| 151 |
+
q_ordinals = h_ordinals | pynini.cross('3', 'third') | pynini.cross('4', 'fourth')
|
| 152 |
+
|
| 153 |
+
h_graph = h_ordinals + pynini.cross('H', ' half')
|
| 154 |
+
q_graph = q_ordinals + pynini.cross('Q', ' quarter')
|
| 155 |
+
period_graph = h_graph | q_graph
|
| 156 |
+
|
| 157 |
+
return period_graph
|
| 158 |
+
|
| 159 |
+
|
| 160 |
+
class DateFst(GraphFst):
|
| 161 |
+
"""
|
| 162 |
+
Finite state transducer for classifying date, e.g.
|
| 163 |
+
jan. 5, 2012 -> date { month: "january" day: "five" year: "twenty twelve" preserve_order: true }
|
| 164 |
+
jan. 5 -> date { month: "january" day: "five" preserve_order: true }
|
| 165 |
+
5 january 2012 -> date { day: "five" month: "january" year: "twenty twelve" preserve_order: true }
|
| 166 |
+
2012-01-05 -> date { year: "twenty twelve" month: "january" day: "five" }
|
| 167 |
+
2012.01.05 -> date { year: "twenty twelve" month: "january" day: "five" }
|
| 168 |
+
2012/01/05 -> date { year: "twenty twelve" month: "january" day: "five" }
|
| 169 |
+
2012 -> date { year: "twenty twelve" }
|
| 170 |
+
|
| 171 |
+
Args:
|
| 172 |
+
cardinal: CardinalFst
|
| 173 |
+
deterministic: if True will provide a single transduction option,
|
| 174 |
+
for False multiple transduction are generated (used for audio-based normalization)
|
| 175 |
+
"""
|
| 176 |
+
|
| 177 |
+
def __init__(self, cardinal: GraphFst, deterministic: bool, lm: bool = False):
|
| 178 |
+
super().__init__(name="date", kind="classify", deterministic=deterministic)
|
| 179 |
+
|
| 180 |
+
# january
|
| 181 |
+
month_graph = pynini.string_file(get_abs_path("data/date/month_name.tsv")).optimize()
|
| 182 |
+
# January, JANUARY
|
| 183 |
+
month_graph |= pynini.compose(TO_LOWER + pynini.closure(NEMO_CHAR), month_graph) | pynini.compose(
|
| 184 |
+
TO_LOWER ** (2, ...), month_graph
|
| 185 |
+
)
|
| 186 |
+
|
| 187 |
+
# jan
|
| 188 |
+
month_abbr_graph = pynini.string_file(get_abs_path("data/date/month_abbr.tsv")).optimize()
|
| 189 |
+
# jan, Jan, JAN
|
| 190 |
+
month_abbr_graph = (
|
| 191 |
+
month_abbr_graph
|
| 192 |
+
| pynini.compose(TO_LOWER + pynini.closure(NEMO_LOWER, 1), month_abbr_graph).optimize()
|
| 193 |
+
| pynini.compose(TO_LOWER ** (2, ...), month_abbr_graph).optimize()
|
| 194 |
+
) + pynini.closure(pynutil.delete("."), 0, 1)
|
| 195 |
+
month_graph |= month_abbr_graph.optimize()
|
| 196 |
+
|
| 197 |
+
month_numbers_labels = pynini.string_file(get_abs_path("data/date/month_number.tsv")).optimize()
|
| 198 |
+
cardinal_graph = cardinal.graph_hundred_component_at_least_one_none_zero_digit
|
| 199 |
+
|
| 200 |
+
year_graph = _get_year_graph(cardinal_graph=cardinal_graph, deterministic=deterministic)
|
| 201 |
+
|
| 202 |
+
# three_digit_year = (NEMO_DIGIT @ cardinal_graph) + insert_space + (NEMO_DIGIT ** 2) @ cardinal_graph
|
| 203 |
+
# year_graph |= three_digit_year
|
| 204 |
+
|
| 205 |
+
month_graph = pynutil.insert("month: \"") + month_graph + pynutil.insert("\"")
|
| 206 |
+
month_numbers_graph = pynutil.insert("month: \"") + month_numbers_labels + pynutil.insert("\"")
|
| 207 |
+
|
| 208 |
+
endings = ["rd", "th", "st", "nd"]
|
| 209 |
+
endings += [x.upper() for x in endings]
|
| 210 |
+
endings = pynini.union(*endings)
|
| 211 |
+
|
| 212 |
+
day_graph = (
|
| 213 |
+
pynutil.insert("day: \"")
|
| 214 |
+
+ pynini.closure(pynutil.delete("the "), 0, 1)
|
| 215 |
+
+ (
|
| 216 |
+
((pynini.union("1", "2") + NEMO_DIGIT) | NEMO_DIGIT | (pynini.accep("3") + pynini.union("0", "1")))
|
| 217 |
+
+ pynini.closure(pynutil.delete(endings), 0, 1)
|
| 218 |
+
)
|
| 219 |
+
@ cardinal_graph
|
| 220 |
+
+ pynutil.insert("\"")
|
| 221 |
+
)
|
| 222 |
+
|
| 223 |
+
two_digit_year = _get_two_digit_year(
|
| 224 |
+
cardinal_graph=cardinal_graph, single_digits_graph=cardinal.single_digits_graph
|
| 225 |
+
)
|
| 226 |
+
two_digit_year = pynutil.insert("year: \"") + two_digit_year + pynutil.insert("\"")
|
| 227 |
+
|
| 228 |
+
# if lm:
|
| 229 |
+
# two_digit_year = pynini.compose(pynini.difference(NEMO_DIGIT, "0") + NEMO_DIGIT ** (3), two_digit_year)
|
| 230 |
+
# year_graph = pynini.compose(pynini.difference(NEMO_DIGIT, "0") + NEMO_DIGIT ** (2), year_graph)
|
| 231 |
+
# year_graph |= pynini.compose(pynini.difference(NEMO_DIGIT, "0") + NEMO_DIGIT ** (4, ...), year_graph)
|
| 232 |
+
|
| 233 |
+
graph_year = pynutil.insert(" year: \"") + pynutil.delete(" ") + year_graph + pynutil.insert("\"")
|
| 234 |
+
graph_year |= (
|
| 235 |
+
pynutil.insert(" year: \"")
|
| 236 |
+
+ pynini.accep(",")
|
| 237 |
+
+ pynini.closure(pynini.accep(" "), 0, 1)
|
| 238 |
+
+ year_graph
|
| 239 |
+
+ pynutil.insert("\"")
|
| 240 |
+
)
|
| 241 |
+
optional_graph_year = pynini.closure(graph_year, 0, 1)
|
| 242 |
+
|
| 243 |
+
year_graph = pynutil.insert("year: \"") + year_graph + pynutil.insert("\"")
|
| 244 |
+
|
| 245 |
+
graph_mdy = month_graph + (
|
| 246 |
+
(delete_extra_space + day_graph)
|
| 247 |
+
| (pynini.accep(" ") + day_graph)
|
| 248 |
+
| graph_year
|
| 249 |
+
| (delete_extra_space + day_graph + graph_year)
|
| 250 |
+
)
|
| 251 |
+
|
| 252 |
+
graph_mdy |= (
|
| 253 |
+
month_graph
|
| 254 |
+
+ pynini.cross("-", " ")
|
| 255 |
+
+ day_graph
|
| 256 |
+
+ pynini.closure(((pynini.cross("-", " ") + NEMO_SIGMA) @ graph_year), 0, 1)
|
| 257 |
+
)
|
| 258 |
+
|
| 259 |
+
for x in ["-", "/", "."]:
|
| 260 |
+
delete_sep = pynutil.delete(x)
|
| 261 |
+
graph_mdy |= (
|
| 262 |
+
month_numbers_graph
|
| 263 |
+
+ delete_sep
|
| 264 |
+
+ insert_space
|
| 265 |
+
+ pynini.closure(pynutil.delete("0"), 0, 1)
|
| 266 |
+
+ day_graph
|
| 267 |
+
+ delete_sep
|
| 268 |
+
+ insert_space
|
| 269 |
+
+ (year_graph | two_digit_year)
|
| 270 |
+
)
|
| 271 |
+
|
| 272 |
+
graph_dmy = day_graph + delete_extra_space + month_graph + optional_graph_year
|
| 273 |
+
day_ex_month = (NEMO_DIGIT**2 - pynini.project(month_numbers_graph, "input")) @ day_graph
|
| 274 |
+
for x in ["-", "/", "."]:
|
| 275 |
+
delete_sep = pynutil.delete(x)
|
| 276 |
+
graph_dmy |= (
|
| 277 |
+
day_ex_month
|
| 278 |
+
+ delete_sep
|
| 279 |
+
+ insert_space
|
| 280 |
+
+ month_numbers_graph
|
| 281 |
+
+ delete_sep
|
| 282 |
+
+ insert_space
|
| 283 |
+
+ (year_graph | two_digit_year)
|
| 284 |
+
)
|
| 285 |
+
|
| 286 |
+
graph_ymd = pynini.accep("")
|
| 287 |
+
for x in ["-", "/", "."]:
|
| 288 |
+
delete_sep = pynutil.delete(x)
|
| 289 |
+
graph_ymd |= (
|
| 290 |
+
(year_graph | two_digit_year)
|
| 291 |
+
+ delete_sep
|
| 292 |
+
+ insert_space
|
| 293 |
+
+ month_numbers_graph
|
| 294 |
+
+ delete_sep
|
| 295 |
+
+ insert_space
|
| 296 |
+
+ pynini.closure(pynutil.delete("0"), 0, 1)
|
| 297 |
+
+ day_graph
|
| 298 |
+
)
|
| 299 |
+
|
| 300 |
+
final_graph = graph_mdy | graph_dmy
|
| 301 |
+
|
| 302 |
+
if not deterministic or lm:
|
| 303 |
+
final_graph += pynini.closure(pynutil.insert(" preserve_order: true"), 0, 1)
|
| 304 |
+
m_sep_d = (
|
| 305 |
+
month_numbers_graph
|
| 306 |
+
+ pynutil.delete(pynini.union("-", "/"))
|
| 307 |
+
+ insert_space
|
| 308 |
+
+ pynini.closure(pynutil.delete("0"), 0, 1)
|
| 309 |
+
+ day_graph
|
| 310 |
+
)
|
| 311 |
+
final_graph |= m_sep_d
|
| 312 |
+
else:
|
| 313 |
+
final_graph += pynutil.insert(" preserve_order: true")
|
| 314 |
+
|
| 315 |
+
period_fy = pynutil.insert("text: \"") + _get_financial_period_graph() + pynutil.insert("\"")
|
| 316 |
+
graph_fy = period_fy + insert_space + two_digit_year
|
| 317 |
+
|
| 318 |
+
final_graph |= graph_ymd | year_graph | graph_fy
|
| 319 |
+
|
| 320 |
+
if not deterministic or lm:
|
| 321 |
+
ymd_to_mdy_graph = None
|
| 322 |
+
ymd_to_dmy_graph = None
|
| 323 |
+
mdy_to_dmy_graph = None
|
| 324 |
+
md_to_dm_graph = None
|
| 325 |
+
|
| 326 |
+
for month in [x[0] for x in load_labels(get_abs_path("data/date/month_name.tsv"))]:
|
| 327 |
+
for day in [x[0] for x in load_labels(get_abs_path("data/date/day.tsv"))]:
|
| 328 |
+
ymd_to_mdy_curr = (
|
| 329 |
+
pynutil.insert("month: \"" + month + "\" day: \"" + day + "\" ")
|
| 330 |
+
+ pynini.accep('year:')
|
| 331 |
+
+ NEMO_SIGMA
|
| 332 |
+
+ pynutil.delete(" month: \"" + month + "\" day: \"" + day + "\"")
|
| 333 |
+
)
|
| 334 |
+
|
| 335 |
+
# YY-MM-DD -> MM-DD-YY
|
| 336 |
+
ymd_to_mdy_curr = pynini.compose(graph_ymd, ymd_to_mdy_curr)
|
| 337 |
+
ymd_to_mdy_graph = (
|
| 338 |
+
ymd_to_mdy_curr
|
| 339 |
+
if ymd_to_mdy_graph is None
|
| 340 |
+
else pynini.union(ymd_to_mdy_curr, ymd_to_mdy_graph)
|
| 341 |
+
)
|
| 342 |
+
|
| 343 |
+
ymd_to_dmy_curr = (
|
| 344 |
+
pynutil.insert("day: \"" + day + "\" month: \"" + month + "\" ")
|
| 345 |
+
+ pynini.accep('year:')
|
| 346 |
+
+ NEMO_SIGMA
|
| 347 |
+
+ pynutil.delete(" month: \"" + month + "\" day: \"" + day + "\"")
|
| 348 |
+
)
|
| 349 |
+
|
| 350 |
+
# YY-MM-DD -> MM-DD-YY
|
| 351 |
+
ymd_to_dmy_curr = pynini.compose(graph_ymd, ymd_to_dmy_curr).optimize()
|
| 352 |
+
ymd_to_dmy_graph = (
|
| 353 |
+
ymd_to_dmy_curr
|
| 354 |
+
if ymd_to_dmy_graph is None
|
| 355 |
+
else pynini.union(ymd_to_dmy_curr, ymd_to_dmy_graph)
|
| 356 |
+
)
|
| 357 |
+
|
| 358 |
+
mdy_to_dmy_curr = (
|
| 359 |
+
pynutil.insert("day: \"" + day + "\" month: \"" + month + "\" ")
|
| 360 |
+
+ pynutil.delete("month: \"" + month + "\" day: \"" + day + "\" ")
|
| 361 |
+
+ pynini.accep('year:')
|
| 362 |
+
+ NEMO_SIGMA
|
| 363 |
+
).optimize()
|
| 364 |
+
# MM-DD-YY -> verbalize as MM-DD-YY (February fourth 1991) or DD-MM-YY (the fourth of February 1991)
|
| 365 |
+
mdy_to_dmy_curr = pynini.compose(graph_mdy, mdy_to_dmy_curr).optimize()
|
| 366 |
+
mdy_to_dmy_graph = (
|
| 367 |
+
mdy_to_dmy_curr
|
| 368 |
+
if mdy_to_dmy_graph is None
|
| 369 |
+
else pynini.union(mdy_to_dmy_curr, mdy_to_dmy_graph).optimize()
|
| 370 |
+
).optimize()
|
| 371 |
+
|
| 372 |
+
md_to_dm_curr = pynutil.insert("day: \"" + day + "\" month: \"" + month + "\"") + pynutil.delete(
|
| 373 |
+
"month: \"" + month + "\" day: \"" + day + "\""
|
| 374 |
+
)
|
| 375 |
+
md_to_dm_curr = pynini.compose(m_sep_d, md_to_dm_curr).optimize()
|
| 376 |
+
|
| 377 |
+
md_to_dm_graph = (
|
| 378 |
+
md_to_dm_curr
|
| 379 |
+
if md_to_dm_graph is None
|
| 380 |
+
else pynini.union(md_to_dm_curr, md_to_dm_graph).optimize()
|
| 381 |
+
).optimize()
|
| 382 |
+
|
| 383 |
+
final_graph |= mdy_to_dmy_graph | md_to_dm_graph | ymd_to_mdy_graph | ymd_to_dmy_graph
|
| 384 |
+
|
| 385 |
+
final_graph = self.add_tokens(final_graph)
|
| 386 |
+
self.fst = final_graph.optimize()
|
vendor/zonos3/vendor/nemo_text_processing/text_normalization/en/taggers/decimal.py
ADDED
|
@@ -0,0 +1,130 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Copyright (c) 2021, NVIDIA CORPORATION. All rights reserved.
|
| 2 |
+
#
|
| 3 |
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
| 4 |
+
# you may not use this file except in compliance with the License.
|
| 5 |
+
# You may obtain a copy of the License at
|
| 6 |
+
#
|
| 7 |
+
# http://www.apache.org/licenses/LICENSE-2.0
|
| 8 |
+
#
|
| 9 |
+
# Unless required by applicable law or agreed to in writing, software
|
| 10 |
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
| 11 |
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 12 |
+
# See the License for the specific language governing permissions and
|
| 13 |
+
# limitations under the License.
|
| 14 |
+
|
| 15 |
+
import pynini
|
| 16 |
+
from pynini.lib import pynutil
|
| 17 |
+
|
| 18 |
+
from zonos3.vendor.nemo_text_processing.text_normalization.en.graph_utils import NEMO_SIGMA, TO_UPPER, GraphFst, get_abs_path
|
| 19 |
+
|
| 20 |
+
delete_space = pynutil.delete(" ")
|
| 21 |
+
quantities = pynini.string_file(get_abs_path("data/number/thousand.tsv"))
|
| 22 |
+
quantities_abbr = pynini.string_file(get_abs_path("data/number/quantity_abbr.tsv"))
|
| 23 |
+
quantities_abbr |= TO_UPPER @ quantities_abbr
|
| 24 |
+
|
| 25 |
+
|
| 26 |
+
def get_quantity(
|
| 27 |
+
decimal: 'pynini.FstLike', cardinal_up_to_hundred: 'pynini.FstLike', include_abbr: bool
|
| 28 |
+
) -> 'pynini.FstLike':
|
| 29 |
+
"""
|
| 30 |
+
Returns FST that transforms either a cardinal or decimal followed by a quantity into a numeral,
|
| 31 |
+
e.g. 1 million -> integer_part: "one" quantity: "million"
|
| 32 |
+
e.g. 1.5 million -> integer_part: "one" fractional_part: "five" quantity: "million"
|
| 33 |
+
|
| 34 |
+
Args:
|
| 35 |
+
decimal: decimal FST
|
| 36 |
+
cardinal_up_to_hundred: cardinal FST
|
| 37 |
+
"""
|
| 38 |
+
quantity_wo_thousand = pynini.project(quantities, "input") - pynini.union("k", "K", "thousand")
|
| 39 |
+
if include_abbr:
|
| 40 |
+
quantity_wo_thousand |= pynini.project(quantities_abbr, "input") - pynini.union("k", "K", "thousand")
|
| 41 |
+
res = (
|
| 42 |
+
pynutil.insert("integer_part: \"")
|
| 43 |
+
+ cardinal_up_to_hundred
|
| 44 |
+
+ pynutil.insert("\"")
|
| 45 |
+
+ pynini.closure(pynutil.delete(" "), 0, 1)
|
| 46 |
+
+ pynutil.insert(" quantity: \"")
|
| 47 |
+
+ (quantity_wo_thousand @ (quantities | quantities_abbr))
|
| 48 |
+
+ pynutil.insert("\"")
|
| 49 |
+
)
|
| 50 |
+
if include_abbr:
|
| 51 |
+
quantity = quantities | quantities_abbr
|
| 52 |
+
else:
|
| 53 |
+
quantity = quantities
|
| 54 |
+
res |= (
|
| 55 |
+
decimal
|
| 56 |
+
+ pynini.closure(pynutil.delete(" "), 0, 1)
|
| 57 |
+
+ pynutil.insert("quantity: \"")
|
| 58 |
+
+ quantity
|
| 59 |
+
+ pynutil.insert("\"")
|
| 60 |
+
)
|
| 61 |
+
return res
|
| 62 |
+
|
| 63 |
+
|
| 64 |
+
class DecimalFst(GraphFst):
|
| 65 |
+
"""
|
| 66 |
+
Finite state transducer for classifying decimal, e.g.
|
| 67 |
+
-12.5006 billion -> decimal { negative: "true" integer_part: "12" fractional_part: "five o o six" quantity: "billion" }
|
| 68 |
+
1 billion -> decimal { integer_part: "one" quantity: "billion" }
|
| 69 |
+
|
| 70 |
+
cardinal: CardinalFst
|
| 71 |
+
"""
|
| 72 |
+
|
| 73 |
+
def __init__(self, cardinal: GraphFst, deterministic: bool):
|
| 74 |
+
super().__init__(name="decimal", kind="classify", deterministic=deterministic)
|
| 75 |
+
|
| 76 |
+
cardinal_graph = cardinal.graph_with_and
|
| 77 |
+
cardinal_graph_hundred_component_at_least_one_none_zero_digit = (
|
| 78 |
+
cardinal.graph_hundred_component_at_least_one_none_zero_digit
|
| 79 |
+
)
|
| 80 |
+
|
| 81 |
+
self.graph = cardinal.single_digits_graph.optimize()
|
| 82 |
+
|
| 83 |
+
if not deterministic:
|
| 84 |
+
self.graph = self.graph | cardinal_graph
|
| 85 |
+
|
| 86 |
+
point = pynutil.delete(".")
|
| 87 |
+
optional_graph_negative = pynini.closure(pynutil.insert("negative: ") + pynini.cross("-", "\"true\" "), 0, 1)
|
| 88 |
+
|
| 89 |
+
self.graph_fractional = pynutil.insert("fractional_part: \"") + self.graph + pynutil.insert("\"")
|
| 90 |
+
self.graph_integer = pynutil.insert("integer_part: \"") + cardinal_graph + pynutil.insert("\"")
|
| 91 |
+
final_graph_wo_sign = (
|
| 92 |
+
pynini.closure(self.graph_integer + pynutil.insert(" "), 0, 1)
|
| 93 |
+
+ point
|
| 94 |
+
+ pynutil.insert(" ")
|
| 95 |
+
+ self.graph_fractional
|
| 96 |
+
)
|
| 97 |
+
|
| 98 |
+
quantity_w_abbr = get_quantity(
|
| 99 |
+
final_graph_wo_sign, cardinal_graph_hundred_component_at_least_one_none_zero_digit, include_abbr=True
|
| 100 |
+
)
|
| 101 |
+
quantity_wo_abbr = get_quantity(
|
| 102 |
+
final_graph_wo_sign, cardinal_graph_hundred_component_at_least_one_none_zero_digit, include_abbr=False
|
| 103 |
+
)
|
| 104 |
+
self.final_graph_wo_negative_w_abbr = final_graph_wo_sign | quantity_w_abbr
|
| 105 |
+
self.final_graph_wo_negative = final_graph_wo_sign | quantity_wo_abbr
|
| 106 |
+
|
| 107 |
+
# reduce options for non_deterministic and allow either "oh" or "zero", but not combination
|
| 108 |
+
if not deterministic:
|
| 109 |
+
no_oh_zero = pynini.difference(
|
| 110 |
+
NEMO_SIGMA,
|
| 111 |
+
(NEMO_SIGMA + "oh" + NEMO_SIGMA + "zero" + NEMO_SIGMA)
|
| 112 |
+
| (NEMO_SIGMA + "zero" + NEMO_SIGMA + "oh" + NEMO_SIGMA),
|
| 113 |
+
).optimize()
|
| 114 |
+
no_zero_oh = pynini.difference(
|
| 115 |
+
NEMO_SIGMA, NEMO_SIGMA + pynini.accep("zero") + NEMO_SIGMA + pynini.accep("oh") + NEMO_SIGMA
|
| 116 |
+
).optimize()
|
| 117 |
+
|
| 118 |
+
self.final_graph_wo_negative |= pynini.compose(
|
| 119 |
+
self.final_graph_wo_negative,
|
| 120 |
+
pynini.cdrewrite(
|
| 121 |
+
pynini.cross("integer_part: \"zero\"", "integer_part: \"oh\""), NEMO_SIGMA, NEMO_SIGMA, NEMO_SIGMA
|
| 122 |
+
),
|
| 123 |
+
)
|
| 124 |
+
self.final_graph_wo_negative = pynini.compose(self.final_graph_wo_negative, no_oh_zero).optimize()
|
| 125 |
+
self.final_graph_wo_negative = pynini.compose(self.final_graph_wo_negative, no_zero_oh).optimize()
|
| 126 |
+
|
| 127 |
+
final_graph = optional_graph_negative + self.final_graph_wo_negative
|
| 128 |
+
|
| 129 |
+
final_graph = self.add_tokens(final_graph)
|
| 130 |
+
self.fst = final_graph.optimize()
|
vendor/zonos3/vendor/nemo_text_processing/text_normalization/en/taggers/electronic.py
ADDED
|
@@ -0,0 +1,179 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Copyright (c) 2024, NVIDIA CORPORATION. All rights reserved.
|
| 2 |
+
#
|
| 3 |
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
| 4 |
+
# you may not use this file except in compliance with the License.
|
| 5 |
+
# You may obtain a copy of the License at
|
| 6 |
+
#
|
| 7 |
+
# http://www.apache.org/licenses/LICENSE-2.0
|
| 8 |
+
#
|
| 9 |
+
# Unless required by applicable law or agreed to in writing, software
|
| 10 |
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
| 11 |
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 12 |
+
# See the License for the specific language governing permissions and
|
| 13 |
+
# limitations under the License.
|
| 14 |
+
|
| 15 |
+
|
| 16 |
+
import pynini
|
| 17 |
+
from pynini.lib import pynutil
|
| 18 |
+
|
| 19 |
+
from zonos3.vendor.nemo_text_processing.text_normalization.en.graph_utils import ( # common string literals
|
| 20 |
+
MIN_NEG_WEIGHT,
|
| 21 |
+
NEMO_ALPHA,
|
| 22 |
+
NEMO_DIGIT,
|
| 23 |
+
NEMO_NOT_SPACE,
|
| 24 |
+
NEMO_SIGMA,
|
| 25 |
+
NEMO_UPPER,
|
| 26 |
+
TO_UPPER,
|
| 27 |
+
GraphFst,
|
| 28 |
+
get_abs_path,
|
| 29 |
+
insert_space,
|
| 30 |
+
)
|
| 31 |
+
|
| 32 |
+
|
| 33 |
+
class ElectronicFst(GraphFst):
|
| 34 |
+
"""
|
| 35 |
+
Finite state transducer for classifying electronic: as URLs, email addresses, etc.
|
| 36 |
+
e.g. cdf1@abc.edu -> tokens { electronic { username: "cdf1" domain: "abc.edu" } }
|
| 37 |
+
|
| 38 |
+
Args:
|
| 39 |
+
cardinal: CardinalFst
|
| 40 |
+
deterministic: if True will provide a single transduction option,
|
| 41 |
+
for False multiple transduction are generated (used for audio-based normalization)
|
| 42 |
+
"""
|
| 43 |
+
|
| 44 |
+
def __init__(self, cardinal: GraphFst, deterministic: bool = True):
|
| 45 |
+
super().__init__(name="electronic", kind="classify", deterministic=deterministic)
|
| 46 |
+
|
| 47 |
+
if deterministic:
|
| 48 |
+
numbers = NEMO_DIGIT
|
| 49 |
+
else:
|
| 50 |
+
numbers = pynutil.insert(" ") + cardinal.long_numbers + pynutil.insert(" ")
|
| 51 |
+
|
| 52 |
+
cc_cues = pynutil.add_weight(
|
| 53 |
+
pynini.string_file(get_abs_path("data/electronic/cc_cues.tsv")),
|
| 54 |
+
MIN_NEG_WEIGHT,
|
| 55 |
+
)
|
| 56 |
+
|
| 57 |
+
cc_cues = pynutil.add_weight(
|
| 58 |
+
pynini.string_file(get_abs_path("data/electronic/cc_cues.tsv")),
|
| 59 |
+
MIN_NEG_WEIGHT,
|
| 60 |
+
)
|
| 61 |
+
|
| 62 |
+
accepted_symbols = pynini.project(pynini.string_file(get_abs_path("data/electronic/symbol.tsv")), "input")
|
| 63 |
+
|
| 64 |
+
accepted_common_domains = pynini.project(
|
| 65 |
+
pynini.string_file(get_abs_path("data/electronic/domain.tsv")), "input"
|
| 66 |
+
)
|
| 67 |
+
|
| 68 |
+
dict_words = pynutil.add_weight(
|
| 69 |
+
pynini.string_file(get_abs_path("data/electronic/words.tsv")),
|
| 70 |
+
MIN_NEG_WEIGHT,
|
| 71 |
+
)
|
| 72 |
+
|
| 73 |
+
dict_words_without_delimiter = dict_words + pynini.closure(
|
| 74 |
+
pynutil.add_weight(pynutil.insert(" ") + dict_words, MIN_NEG_WEIGHT),
|
| 75 |
+
1,
|
| 76 |
+
)
|
| 77 |
+
dict_words_graph = dict_words_without_delimiter | dict_words
|
| 78 |
+
|
| 79 |
+
all_accepted_symbols_start = (
|
| 80 |
+
dict_words_graph | pynini.closure(TO_UPPER) | pynini.closure(NEMO_UPPER) | accepted_symbols
|
| 81 |
+
).optimize()
|
| 82 |
+
|
| 83 |
+
all_accepted_symbols_end = (
|
| 84 |
+
dict_words_graph | numbers | pynini.closure(TO_UPPER) | pynini.closure(NEMO_UPPER) | accepted_symbols
|
| 85 |
+
).optimize()
|
| 86 |
+
|
| 87 |
+
graph_symbols = pynini.string_file(get_abs_path("data/electronic/symbol.tsv")).optimize()
|
| 88 |
+
|
| 89 |
+
username = (NEMO_ALPHA | dict_words_graph) + pynini.closure(
|
| 90 |
+
NEMO_ALPHA | numbers | accepted_symbols | dict_words_graph
|
| 91 |
+
)
|
| 92 |
+
|
| 93 |
+
username = pynutil.insert('username: "') + username + pynutil.insert('"') + pynini.cross("@", " ")
|
| 94 |
+
|
| 95 |
+
domain_graph = all_accepted_symbols_start + pynini.closure(
|
| 96 |
+
all_accepted_symbols_end | pynutil.add_weight(accepted_common_domains, MIN_NEG_WEIGHT)
|
| 97 |
+
)
|
| 98 |
+
|
| 99 |
+
protocol_symbols = pynini.closure((graph_symbols | pynini.cross(":", "colon")) + pynutil.insert(" "))
|
| 100 |
+
|
| 101 |
+
protocol_start = (pynini.cross("https", "HTTPS ") | pynini.cross("http", "HTTP ")) + (
|
| 102 |
+
pynini.accep("://") @ protocol_symbols
|
| 103 |
+
)
|
| 104 |
+
|
| 105 |
+
protocol_file_start = pynini.accep("file") + insert_space + (pynini.accep(":///") @ protocol_symbols)
|
| 106 |
+
|
| 107 |
+
protocol_end = pynutil.add_weight(pynini.cross("www", "WWW ") + pynini.accep(".") @ protocol_symbols, -1000)
|
| 108 |
+
|
| 109 |
+
protocol = protocol_file_start | protocol_start | protocol_end | (protocol_start + protocol_end)
|
| 110 |
+
|
| 111 |
+
domain_graph_with_class_tags = (
|
| 112 |
+
pynutil.insert('domain: "')
|
| 113 |
+
+ pynini.compose(
|
| 114 |
+
NEMO_ALPHA + pynini.closure(NEMO_NOT_SPACE) + (NEMO_ALPHA | NEMO_DIGIT | pynini.accep("/")),
|
| 115 |
+
domain_graph,
|
| 116 |
+
).optimize()
|
| 117 |
+
+ pynutil.insert('"')
|
| 118 |
+
)
|
| 119 |
+
|
| 120 |
+
protocol = pynutil.insert('protocol: "') + pynutil.add_weight(protocol, MIN_NEG_WEIGHT) + pynutil.insert('"')
|
| 121 |
+
|
| 122 |
+
# email
|
| 123 |
+
graph = pynini.compose(
|
| 124 |
+
NEMO_SIGMA + pynini.accep("@") + NEMO_SIGMA + pynini.accep(".") + NEMO_SIGMA,
|
| 125 |
+
username + domain_graph_with_class_tags,
|
| 126 |
+
)
|
| 127 |
+
|
| 128 |
+
full_stop_accep = pynini.accep(".")
|
| 129 |
+
dollar_accep = pynini.accep("$") # Include for the correct transduction of the money graph
|
| 130 |
+
excluded_symbols = full_stop_accep | dollar_accep | pynini.accep(",")
|
| 131 |
+
filtered_symbols = pynini.difference(accepted_symbols, excluded_symbols)
|
| 132 |
+
accepted_characters = NEMO_ALPHA | NEMO_DIGIT | filtered_symbols
|
| 133 |
+
domain_component = full_stop_accep + pynini.closure(accepted_characters, 2)
|
| 134 |
+
graph_domain = pynutil.add_weight(
|
| 135 |
+
pynutil.insert('domain: "')
|
| 136 |
+
+ (pynini.closure(accepted_characters, 1) + pynini.closure(domain_component, 1))
|
| 137 |
+
+ pynutil.insert('"'),
|
| 138 |
+
0.1,
|
| 139 |
+
).optimize()
|
| 140 |
+
|
| 141 |
+
graph |= pynutil.add_weight(graph_domain, MIN_NEG_WEIGHT)
|
| 142 |
+
|
| 143 |
+
# www.abc.com/sdafsdf, or https://www.abc.com/asdfad or www.abc.abc/asdfad
|
| 144 |
+
graph |= protocol + pynutil.insert(" ") + domain_graph_with_class_tags
|
| 145 |
+
|
| 146 |
+
# recursively handles the "/" in strings like:
|
| 147 |
+
# update/upgrade -> update slash upgrade
|
| 148 |
+
# update/upgrade/downgrade -> update slash upgrade slash downgrade
|
| 149 |
+
|
| 150 |
+
slash_string = (
|
| 151 |
+
pynini.accep(" ").ques + pynini.accep("/") + pynini.accep(" ").ques + pynini.closure(NEMO_ALPHA, 1)
|
| 152 |
+
)
|
| 153 |
+
|
| 154 |
+
graph |= (
|
| 155 |
+
pynutil.insert('domain: "')
|
| 156 |
+
+ (pynini.closure(NEMO_ALPHA, 1) - "and")
|
| 157 |
+
+ pynini.closure(slash_string, 1)
|
| 158 |
+
+ pynutil.insert('"')
|
| 159 |
+
).optimize()
|
| 160 |
+
|
| 161 |
+
if deterministic:
|
| 162 |
+
# credit card cues
|
| 163 |
+
numbers = pynini.closure(NEMO_DIGIT, 4, 16)
|
| 164 |
+
cc_phrases = (
|
| 165 |
+
pynutil.insert('protocol: "') + cc_cues + pynutil.insert('" domain: "') + numbers + pynutil.insert('"')
|
| 166 |
+
)
|
| 167 |
+
graph |= cc_phrases
|
| 168 |
+
|
| 169 |
+
if deterministic:
|
| 170 |
+
# credit card cues
|
| 171 |
+
numbers = pynini.closure(NEMO_DIGIT, 4, 16)
|
| 172 |
+
cc_phrases = (
|
| 173 |
+
pynutil.insert('protocol: "') + cc_cues + pynutil.insert('" domain: "') + numbers + pynutil.insert('"')
|
| 174 |
+
)
|
| 175 |
+
graph |= cc_phrases
|
| 176 |
+
|
| 177 |
+
final_graph = self.add_tokens(graph)
|
| 178 |
+
|
| 179 |
+
self.fst = final_graph.optimize()
|
vendor/zonos3/vendor/nemo_text_processing/text_normalization/en/taggers/fraction.py
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Copyright (c) 2021, NVIDIA CORPORATION. All rights reserved.
|
| 2 |
+
#
|
| 3 |
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
| 4 |
+
# you may not use this file except in compliance with the License.
|
| 5 |
+
# You may obtain a copy of the License at
|
| 6 |
+
#
|
| 7 |
+
# http://www.apache.org/licenses/LICENSE-2.0
|
| 8 |
+
#
|
| 9 |
+
# Unless required by applicable law or agreed to in writing, software
|
| 10 |
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
| 11 |
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 12 |
+
# See the License for the specific language governing permissions and
|
| 13 |
+
# limitations under the License.
|
| 14 |
+
|
| 15 |
+
import pynini
|
| 16 |
+
from pynini.lib import pynutil
|
| 17 |
+
|
| 18 |
+
from zonos3.vendor.nemo_text_processing.text_normalization.en.graph_utils import GraphFst, get_abs_path
|
| 19 |
+
|
| 20 |
+
|
| 21 |
+
class FractionFst(GraphFst):
|
| 22 |
+
"""
|
| 23 |
+
Finite state transducer for classifying fraction
|
| 24 |
+
"23 4/5" ->
|
| 25 |
+
tokens { fraction { integer: "twenty three" numerator: "four" denominator: "five" } }
|
| 26 |
+
"23 4/5th" ->
|
| 27 |
+
tokens { fraction { integer: "twenty three" numerator: "four" denominator: "five" } }
|
| 28 |
+
|
| 29 |
+
Args:
|
| 30 |
+
deterministic: if True will provide a single transduction option,
|
| 31 |
+
for False multiple transduction are generated (used for audio-based normalization)
|
| 32 |
+
"""
|
| 33 |
+
|
| 34 |
+
def __init__(self, cardinal, deterministic: bool = True):
|
| 35 |
+
super().__init__(name="fraction", kind="classify", deterministic=deterministic)
|
| 36 |
+
cardinal_graph = cardinal.graph
|
| 37 |
+
|
| 38 |
+
integer = pynutil.insert("integer_part: \"") + cardinal_graph + pynutil.insert("\"")
|
| 39 |
+
numerator = (
|
| 40 |
+
pynutil.insert("numerator: \"") + cardinal_graph + (pynini.cross("/", "\" ") | pynini.cross(" / ", "\" "))
|
| 41 |
+
)
|
| 42 |
+
|
| 43 |
+
endings = ["rd", "th", "st", "nd"]
|
| 44 |
+
endings += [x.upper() for x in endings]
|
| 45 |
+
optional_end = pynini.closure(pynini.cross(pynini.union(*endings), ""), 0, 1)
|
| 46 |
+
|
| 47 |
+
denominator = pynutil.insert("denominator: \"") + cardinal_graph + optional_end + pynutil.insert("\"")
|
| 48 |
+
|
| 49 |
+
graph = pynini.closure(integer + pynini.accep(" "), 0, 1) + (numerator + denominator)
|
| 50 |
+
graph |= pynini.closure(integer + (pynini.accep(" ") | pynutil.insert(" ")), 0, 1) + pynini.compose(
|
| 51 |
+
pynini.string_file(get_abs_path("data/number/fraction.tsv")), (numerator + denominator)
|
| 52 |
+
)
|
| 53 |
+
|
| 54 |
+
self.graph = graph
|
| 55 |
+
final_graph = self.add_tokens(self.graph)
|
| 56 |
+
self.fst = final_graph.optimize()
|
vendor/zonos3/vendor/nemo_text_processing/text_normalization/en/taggers/measure.py
ADDED
|
@@ -0,0 +1,332 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Copyright (c) 2021, NVIDIA CORPORATION. All rights reserved.
|
| 2 |
+
#
|
| 3 |
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
| 4 |
+
# you may not use this file except in compliance with the License.
|
| 5 |
+
# You may obtain a copy of the License at
|
| 6 |
+
#
|
| 7 |
+
# http://www.apache.org/licenses/LICENSE-2.0
|
| 8 |
+
#
|
| 9 |
+
# Unless required by applicable law or agreed to in writing, software
|
| 10 |
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
| 11 |
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 12 |
+
# See the License for the specific language governing permissions and
|
| 13 |
+
# limitations under the License.
|
| 14 |
+
|
| 15 |
+
import pynini
|
| 16 |
+
from pynini.examples import plurals
|
| 17 |
+
from pynini.lib import pynutil
|
| 18 |
+
|
| 19 |
+
from zonos3.vendor.nemo_text_processing.text_normalization.en.graph_utils import (
|
| 20 |
+
NEMO_ALPHA,
|
| 21 |
+
NEMO_DIGIT,
|
| 22 |
+
NEMO_NON_BREAKING_SPACE,
|
| 23 |
+
NEMO_SIGMA,
|
| 24 |
+
NEMO_SPACE,
|
| 25 |
+
NEMO_UPPER,
|
| 26 |
+
SINGULAR_TO_PLURAL,
|
| 27 |
+
TO_LOWER,
|
| 28 |
+
GraphFst,
|
| 29 |
+
convert_space,
|
| 30 |
+
delete_space,
|
| 31 |
+
delete_zero_or_one_space,
|
| 32 |
+
insert_space,
|
| 33 |
+
)
|
| 34 |
+
from zonos3.vendor.nemo_text_processing.text_normalization.en.taggers.ordinal import OrdinalFst as OrdinalTagger
|
| 35 |
+
from zonos3.vendor.nemo_text_processing.text_normalization.en.taggers.whitelist import get_formats
|
| 36 |
+
from zonos3.vendor.nemo_text_processing.text_normalization.en.utils import get_abs_path, load_labels
|
| 37 |
+
from zonos3.vendor.nemo_text_processing.text_normalization.en.verbalizers.ordinal import OrdinalFst as OrdinalVerbalizer
|
| 38 |
+
|
| 39 |
+
|
| 40 |
+
class MeasureFst(GraphFst):
|
| 41 |
+
"""
|
| 42 |
+
Finite state transducer for classifying measure, suppletive aware, e.g.
|
| 43 |
+
-12kg -> measure { negative: "true" cardinal { integer: "twelve" } units: "kilograms" }
|
| 44 |
+
1kg -> measure { cardinal { integer: "one" } units: "kilogram" }
|
| 45 |
+
.5kg -> measure { decimal { fractional_part: "five" } units: "kilograms" }
|
| 46 |
+
|
| 47 |
+
Args:
|
| 48 |
+
cardinal: CardinalFst
|
| 49 |
+
decimal: DecimalFst
|
| 50 |
+
fraction: FractionFst
|
| 51 |
+
deterministic: if True will provide a single transduction option,
|
| 52 |
+
for False multiple transduction are generated (used for audio-based normalization)
|
| 53 |
+
"""
|
| 54 |
+
|
| 55 |
+
def __init__(
|
| 56 |
+
self,
|
| 57 |
+
cardinal: GraphFst,
|
| 58 |
+
decimal: GraphFst,
|
| 59 |
+
fraction: GraphFst,
|
| 60 |
+
deterministic: bool = True,
|
| 61 |
+
):
|
| 62 |
+
super().__init__(name="measure", kind="classify", deterministic=deterministic)
|
| 63 |
+
cardinal_graph = cardinal.graph_with_and | self.get_range(cardinal.graph_with_and)
|
| 64 |
+
|
| 65 |
+
graph_unit = pynini.string_file(get_abs_path("data/measure/unit.tsv"))
|
| 66 |
+
if not deterministic:
|
| 67 |
+
graph_unit |= pynini.string_file(get_abs_path("data/measure/unit_alternatives.tsv"))
|
| 68 |
+
|
| 69 |
+
graph_unit |= pynini.compose(
|
| 70 |
+
pynini.closure(TO_LOWER, 1) + (NEMO_ALPHA | TO_LOWER) + pynini.closure(NEMO_ALPHA | TO_LOWER),
|
| 71 |
+
graph_unit,
|
| 72 |
+
).optimize()
|
| 73 |
+
|
| 74 |
+
graph_unit_plural = convert_space(graph_unit @ SINGULAR_TO_PLURAL)
|
| 75 |
+
graph_unit = convert_space(graph_unit)
|
| 76 |
+
|
| 77 |
+
optional_graph_negative = pynini.closure(pynutil.insert("negative: ") + pynini.cross("-", '"true" '), 0, 1)
|
| 78 |
+
|
| 79 |
+
graph_unit2 = (
|
| 80 |
+
pynini.cross("/", "per") + delete_zero_or_one_space + pynutil.insert(NEMO_NON_BREAKING_SPACE) + graph_unit
|
| 81 |
+
)
|
| 82 |
+
|
| 83 |
+
optional_graph_unit2 = pynini.closure(
|
| 84 |
+
delete_zero_or_one_space + pynutil.insert(NEMO_NON_BREAKING_SPACE) + graph_unit2,
|
| 85 |
+
0,
|
| 86 |
+
1,
|
| 87 |
+
)
|
| 88 |
+
|
| 89 |
+
unit_plural = (
|
| 90 |
+
pynutil.insert('units: "') + (graph_unit_plural + optional_graph_unit2 | graph_unit2) + pynutil.insert('"')
|
| 91 |
+
)
|
| 92 |
+
|
| 93 |
+
unit_singular = (
|
| 94 |
+
pynutil.insert('units: "') + (graph_unit + optional_graph_unit2 | graph_unit2) + pynutil.insert('"')
|
| 95 |
+
)
|
| 96 |
+
|
| 97 |
+
subgraph_decimal = (
|
| 98 |
+
pynutil.insert("decimal { ")
|
| 99 |
+
+ optional_graph_negative
|
| 100 |
+
+ decimal.final_graph_wo_negative
|
| 101 |
+
+ delete_space
|
| 102 |
+
+ pynutil.insert(" } ")
|
| 103 |
+
+ unit_plural
|
| 104 |
+
)
|
| 105 |
+
|
| 106 |
+
# support radio FM/AM
|
| 107 |
+
subgraph_decimal |= (
|
| 108 |
+
pynutil.insert("decimal { ")
|
| 109 |
+
+ decimal.final_graph_wo_negative
|
| 110 |
+
+ delete_space
|
| 111 |
+
+ pynutil.insert(" } ")
|
| 112 |
+
+ pynutil.insert('units: "')
|
| 113 |
+
+ pynini.union("AM", "FM")
|
| 114 |
+
+ pynutil.insert('"')
|
| 115 |
+
)
|
| 116 |
+
|
| 117 |
+
subgraph_cardinal = (
|
| 118 |
+
pynutil.insert("cardinal { ")
|
| 119 |
+
+ optional_graph_negative
|
| 120 |
+
+ pynutil.insert('integer: "')
|
| 121 |
+
+ ((NEMO_SIGMA - "1") @ cardinal_graph)
|
| 122 |
+
+ delete_space
|
| 123 |
+
+ pynutil.insert('"')
|
| 124 |
+
+ pynutil.insert(" } ")
|
| 125 |
+
+ unit_plural
|
| 126 |
+
)
|
| 127 |
+
|
| 128 |
+
subgraph_cardinal |= (
|
| 129 |
+
pynutil.insert("cardinal { ")
|
| 130 |
+
+ optional_graph_negative
|
| 131 |
+
+ pynutil.insert('integer: "')
|
| 132 |
+
+ pynini.cross("1", "one")
|
| 133 |
+
+ delete_space
|
| 134 |
+
+ pynutil.insert('"')
|
| 135 |
+
+ pynutil.insert(" } ")
|
| 136 |
+
+ unit_singular
|
| 137 |
+
)
|
| 138 |
+
|
| 139 |
+
unit_graph = (
|
| 140 |
+
pynutil.insert('cardinal { integer: "-" } units: "')
|
| 141 |
+
+ ((pynini.cross("/", "per") + delete_zero_or_one_space) | (pynini.accep("per") + pynutil.delete(" ")))
|
| 142 |
+
+ pynutil.insert(NEMO_NON_BREAKING_SPACE)
|
| 143 |
+
+ graph_unit
|
| 144 |
+
+ pynutil.insert('" preserve_order: true')
|
| 145 |
+
)
|
| 146 |
+
|
| 147 |
+
decimal_dash_alpha = (
|
| 148 |
+
pynutil.insert("decimal { ")
|
| 149 |
+
+ decimal.final_graph_wo_negative
|
| 150 |
+
+ pynini.cross("-", "")
|
| 151 |
+
+ pynutil.insert(' } units: "')
|
| 152 |
+
+ pynini.closure(NEMO_ALPHA, 1)
|
| 153 |
+
+ pynutil.insert('"')
|
| 154 |
+
)
|
| 155 |
+
|
| 156 |
+
decimal_times = (
|
| 157 |
+
pynutil.insert("decimal { ")
|
| 158 |
+
+ decimal.final_graph_wo_negative
|
| 159 |
+
+ pynutil.insert(' } units: "')
|
| 160 |
+
+ (pynini.cross(pynini.union("x", "X"), "x") | pynini.cross(pynini.union("x", "X"), " times"))
|
| 161 |
+
+ pynutil.insert('"')
|
| 162 |
+
)
|
| 163 |
+
|
| 164 |
+
alpha_dash_decimal = (
|
| 165 |
+
pynutil.insert('units: "')
|
| 166 |
+
+ pynini.closure(NEMO_ALPHA, 1)
|
| 167 |
+
+ pynini.accep("-")
|
| 168 |
+
+ pynutil.insert('"')
|
| 169 |
+
+ pynutil.insert(" decimal { ")
|
| 170 |
+
+ decimal.final_graph_wo_negative
|
| 171 |
+
+ pynutil.insert(" } preserve_order: true")
|
| 172 |
+
)
|
| 173 |
+
|
| 174 |
+
subgraph_fraction = (
|
| 175 |
+
pynutil.insert("fraction { ") + fraction.graph + delete_space + pynutil.insert(" } ") + unit_plural
|
| 176 |
+
)
|
| 177 |
+
|
| 178 |
+
address = self.get_address_graph(cardinal)
|
| 179 |
+
address = (
|
| 180 |
+
pynutil.insert('units: "address" cardinal { integer: "')
|
| 181 |
+
+ address
|
| 182 |
+
+ pynutil.insert('" } preserve_order: true')
|
| 183 |
+
)
|
| 184 |
+
|
| 185 |
+
math_operations = pynini.string_file(get_abs_path("data/measure/math_operation.tsv"))
|
| 186 |
+
delimiter = pynini.accep(" ") | pynutil.insert(" ")
|
| 187 |
+
|
| 188 |
+
math = (
|
| 189 |
+
(cardinal_graph | NEMO_ALPHA)
|
| 190 |
+
+ delimiter
|
| 191 |
+
+ math_operations
|
| 192 |
+
+ (delimiter | NEMO_ALPHA)
|
| 193 |
+
+ cardinal_graph
|
| 194 |
+
+ delimiter
|
| 195 |
+
+ pynini.cross("=", "equals")
|
| 196 |
+
+ delimiter
|
| 197 |
+
+ (cardinal_graph | NEMO_ALPHA)
|
| 198 |
+
)
|
| 199 |
+
|
| 200 |
+
math |= (
|
| 201 |
+
(cardinal_graph | NEMO_ALPHA)
|
| 202 |
+
+ delimiter
|
| 203 |
+
+ pynini.cross("=", "equals")
|
| 204 |
+
+ delimiter
|
| 205 |
+
+ (cardinal_graph | NEMO_ALPHA)
|
| 206 |
+
+ delimiter
|
| 207 |
+
+ math_operations
|
| 208 |
+
+ delimiter
|
| 209 |
+
+ cardinal_graph
|
| 210 |
+
)
|
| 211 |
+
|
| 212 |
+
math = (
|
| 213 |
+
pynutil.insert('units: "math" cardinal { integer: "') + math + pynutil.insert('" } preserve_order: true')
|
| 214 |
+
)
|
| 215 |
+
final_graph = (
|
| 216 |
+
subgraph_decimal
|
| 217 |
+
| subgraph_cardinal
|
| 218 |
+
| unit_graph
|
| 219 |
+
| decimal_dash_alpha
|
| 220 |
+
| decimal_times
|
| 221 |
+
| alpha_dash_decimal
|
| 222 |
+
| subgraph_fraction
|
| 223 |
+
| address
|
| 224 |
+
| math
|
| 225 |
+
)
|
| 226 |
+
|
| 227 |
+
final_graph = self.add_tokens(final_graph)
|
| 228 |
+
self.fst = final_graph.optimize()
|
| 229 |
+
|
| 230 |
+
def get_range(self, cardinal: GraphFst):
|
| 231 |
+
"""
|
| 232 |
+
Returns range forms for measure tagger, e.g. 2-3, 2x3, 2*2
|
| 233 |
+
|
| 234 |
+
Args:
|
| 235 |
+
cardinal: cardinal GraphFst
|
| 236 |
+
"""
|
| 237 |
+
range_graph = cardinal + pynini.cross(pynini.union("-", " - "), " to ") + cardinal
|
| 238 |
+
|
| 239 |
+
for x in [" x ", "x"]:
|
| 240 |
+
range_graph |= cardinal + pynini.cross(x, " by ") + cardinal
|
| 241 |
+
if not self.deterministic:
|
| 242 |
+
range_graph |= cardinal + pynini.cross(x, " times ") + pynini.closure(cardinal, 0, 1)
|
| 243 |
+
|
| 244 |
+
for x in ["*", " * "]:
|
| 245 |
+
range_graph |= cardinal + pynini.cross(x, " times ") + cardinal
|
| 246 |
+
return range_graph.optimize()
|
| 247 |
+
|
| 248 |
+
def get_address_graph(self, cardinal):
|
| 249 |
+
"""
|
| 250 |
+
Finite state transducer for classifying serial.
|
| 251 |
+
The serial is a combination of digits, letters and dashes, e.g.:
|
| 252 |
+
2788 San Tomas Expy, Santa Clara, CA 95051 ->
|
| 253 |
+
units: "address" cardinal
|
| 254 |
+
{ integer: "two seven eight eight San Tomas Expressway Santa Clara California nine five zero five one" }
|
| 255 |
+
preserve_order: true
|
| 256 |
+
"""
|
| 257 |
+
ordinal_verbalizer = OrdinalVerbalizer().graph
|
| 258 |
+
ordinal_tagger = OrdinalTagger(cardinal=cardinal).graph
|
| 259 |
+
ordinal_num = pynini.compose(
|
| 260 |
+
pynutil.insert('integer: "') + ordinal_tagger + pynutil.insert('"'),
|
| 261 |
+
ordinal_verbalizer,
|
| 262 |
+
)
|
| 263 |
+
|
| 264 |
+
address_num = NEMO_DIGIT ** (1, 2) @ cardinal.graph_hundred_component_at_least_one_none_zero_digit
|
| 265 |
+
address_num += insert_space + NEMO_DIGIT**2 @ (
|
| 266 |
+
pynini.closure(pynini.cross("0", "zero "), 0, 1)
|
| 267 |
+
+ cardinal.graph_hundred_component_at_least_one_none_zero_digit
|
| 268 |
+
)
|
| 269 |
+
# to handle the rest of the numbers
|
| 270 |
+
address_num = pynini.compose(NEMO_DIGIT ** (3, 4), address_num)
|
| 271 |
+
address_num = plurals._priority_union(address_num, cardinal.graph, NEMO_SIGMA)
|
| 272 |
+
|
| 273 |
+
direction = (
|
| 274 |
+
pynini.cross("E", "East")
|
| 275 |
+
| pynini.cross("S", "South")
|
| 276 |
+
| pynini.cross("W", "West")
|
| 277 |
+
| pynini.cross("N", "North")
|
| 278 |
+
) + pynini.closure(pynutil.delete("."), 0, 1)
|
| 279 |
+
|
| 280 |
+
direction = pynini.closure(pynini.accep(NEMO_SPACE) + direction, 0, 1)
|
| 281 |
+
address_words = get_formats(get_abs_path("data/address/address_word.tsv"))
|
| 282 |
+
address_words = (
|
| 283 |
+
pynini.accep(NEMO_SPACE)
|
| 284 |
+
+ (pynini.closure(ordinal_num, 0, 1) | NEMO_UPPER + pynini.closure(NEMO_ALPHA, 1))
|
| 285 |
+
+ NEMO_SPACE
|
| 286 |
+
+ pynini.closure(NEMO_UPPER + pynini.closure(NEMO_ALPHA) + NEMO_SPACE)
|
| 287 |
+
+ address_words
|
| 288 |
+
)
|
| 289 |
+
|
| 290 |
+
city = pynini.closure(NEMO_ALPHA | pynini.accep(NEMO_SPACE), 1)
|
| 291 |
+
city = pynini.closure(pynini.accep(",") + pynini.accep(NEMO_SPACE) + city, 0, 1)
|
| 292 |
+
|
| 293 |
+
states = load_labels(get_abs_path("data/address/state.tsv"))
|
| 294 |
+
|
| 295 |
+
additional_options = []
|
| 296 |
+
for x, y in states:
|
| 297 |
+
additional_options.append((x, f"{y[0]}.{y[1:]}"))
|
| 298 |
+
states.extend(additional_options)
|
| 299 |
+
state_graph = pynini.string_map(states)
|
| 300 |
+
state = pynini.invert(state_graph)
|
| 301 |
+
state = pynini.closure(pynini.accep(",") + pynini.accep(NEMO_SPACE) + state, 0, 1)
|
| 302 |
+
|
| 303 |
+
zip_code = pynini.compose(NEMO_DIGIT**5, cardinal.single_digits_graph)
|
| 304 |
+
zip_code = pynini.closure(
|
| 305 |
+
pynini.closure(pynini.accep(","), 0, 1) + pynini.accep(NEMO_SPACE) + zip_code,
|
| 306 |
+
0,
|
| 307 |
+
1,
|
| 308 |
+
)
|
| 309 |
+
|
| 310 |
+
address = address_num + direction + address_words + pynini.closure(city + state + zip_code, 0, 1)
|
| 311 |
+
|
| 312 |
+
# Handles sentences ending in terminal period abbreviations, when followed by another sentence
|
| 313 |
+
# (e.g. Nancy lived on 1428 Elm St. It was a strange place-> Nancy lived on fourteen twenty eight Elm Street. It was a strange place.)
|
| 314 |
+
|
| 315 |
+
hyphen = pynini.accep("-")
|
| 316 |
+
alpha_chars = NEMO_ALPHA | hyphen
|
| 317 |
+
|
| 318 |
+
address_eos = (
|
| 319 |
+
address_num
|
| 320 |
+
+ direction
|
| 321 |
+
+ address_words
|
| 322 |
+
+ pynini.accep(".")
|
| 323 |
+
+ pynini.closure(NEMO_SPACE, 1, 2)
|
| 324 |
+
+ NEMO_UPPER
|
| 325 |
+
+ pynini.closure(alpha_chars)
|
| 326 |
+
)
|
| 327 |
+
|
| 328 |
+
address |= pynutil.add_weight(address_eos, -0.001)
|
| 329 |
+
|
| 330 |
+
address |= address_num + direction + address_words + pynini.closure(pynini.cross(".", ""), 0, 1)
|
| 331 |
+
|
| 332 |
+
return address
|
vendor/zonos3/vendor/nemo_text_processing/text_normalization/en/taggers/money.py
ADDED
|
@@ -0,0 +1,199 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Copyright (c) 2021, NVIDIA CORPORATION. All rights reserved.
|
| 2 |
+
#
|
| 3 |
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
| 4 |
+
# you may not use this file except in compliance with the License.
|
| 5 |
+
# You may obtain a copy of the License at
|
| 6 |
+
#
|
| 7 |
+
# http://www.apache.org/licenses/LICENSE-2.0
|
| 8 |
+
#
|
| 9 |
+
# Unless required by applicable law or agreed to in writing, software
|
| 10 |
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
| 11 |
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 12 |
+
# See the License for the specific language governing permissions and
|
| 13 |
+
# limitations under the License.
|
| 14 |
+
|
| 15 |
+
import pynini
|
| 16 |
+
from pynini.lib import pynutil
|
| 17 |
+
|
| 18 |
+
from zonos3.vendor.nemo_text_processing.text_normalization.en.graph_utils import (
|
| 19 |
+
NEMO_ALPHA,
|
| 20 |
+
NEMO_DIGIT,
|
| 21 |
+
NEMO_SIGMA,
|
| 22 |
+
SINGULAR_TO_PLURAL,
|
| 23 |
+
GraphFst,
|
| 24 |
+
convert_space,
|
| 25 |
+
insert_space,
|
| 26 |
+
)
|
| 27 |
+
from zonos3.vendor.nemo_text_processing.text_normalization.en.utils import get_abs_path, load_labels
|
| 28 |
+
|
| 29 |
+
min_singular = pynini.string_file(get_abs_path("data/money/currency_minor_singular.tsv"))
|
| 30 |
+
min_plural = pynini.string_file(get_abs_path("data/money/currency_minor_plural.tsv"))
|
| 31 |
+
maj_singular = pynini.string_file((get_abs_path("data/money/currency_major.tsv")))
|
| 32 |
+
per_units = pynini.string_file(get_abs_path("data/money/per_unit.tsv"))
|
| 33 |
+
|
| 34 |
+
|
| 35 |
+
class MoneyFst(GraphFst):
|
| 36 |
+
"""
|
| 37 |
+
Finite state transducer for classifying money, suppletive aware, e.g.
|
| 38 |
+
$12.05 -> money { integer_part: "twelve" currency_maj: "dollars" fractional_part: "five" currency_min: "cents" preserve_order: true }
|
| 39 |
+
$12.0500 -> money { integer_part: "twelve" currency_maj: "dollars" fractional_part: "five" currency_min: "cents" preserve_order: true }
|
| 40 |
+
$1 -> money { currency_maj: "dollar" integer_part: "one" }
|
| 41 |
+
$1.00 -> money { currency_maj: "dollar" integer_part: "one" }
|
| 42 |
+
$0.05 -> money { fractional_part: "five" currency_min: "cents" preserve_order: true }
|
| 43 |
+
$1 million -> money { currency_maj: "dollars" integer_part: "one" quantity: "million" }
|
| 44 |
+
$1.2 million -> money { currency_maj: "dollars" integer_part: "one" fractional_part: "two" quantity: "million" }
|
| 45 |
+
$1.2320 -> money { currency_maj: "dollars" integer_part: "one" fractional_part: "two three two" }
|
| 46 |
+
|
| 47 |
+
Args:
|
| 48 |
+
cardinal: CardinalFst
|
| 49 |
+
decimal: DecimalFst
|
| 50 |
+
deterministic: if True will provide a single transduction option,
|
| 51 |
+
for False multiple transduction are generated (used for audio-based normalization)
|
| 52 |
+
"""
|
| 53 |
+
|
| 54 |
+
def __init__(self, cardinal: GraphFst, decimal: GraphFst, deterministic: bool = True):
|
| 55 |
+
super().__init__(name="money", kind="classify", deterministic=deterministic)
|
| 56 |
+
cardinal_graph = cardinal.graph_with_and
|
| 57 |
+
graph_decimal_final = decimal.final_graph_wo_negative_w_abbr
|
| 58 |
+
|
| 59 |
+
maj_singular_labels = load_labels(get_abs_path("data/money/currency_major.tsv"))
|
| 60 |
+
maj_unit_plural = convert_space(maj_singular @ SINGULAR_TO_PLURAL)
|
| 61 |
+
maj_unit_singular = convert_space(maj_singular)
|
| 62 |
+
|
| 63 |
+
graph_maj_singular = pynutil.insert('currency_maj: "') + maj_unit_singular + pynutil.insert('"')
|
| 64 |
+
graph_maj_plural = pynutil.insert('currency_maj: "') + maj_unit_plural + pynutil.insert('"')
|
| 65 |
+
|
| 66 |
+
optional_delete_fractional_zeros = pynini.closure(
|
| 67 |
+
pynutil.delete(".") + pynini.closure(pynutil.delete("0"), 1), 0, 1
|
| 68 |
+
)
|
| 69 |
+
|
| 70 |
+
graph_integer_one = pynutil.insert('integer_part: "') + pynini.cross("1", "one") + pynutil.insert('"')
|
| 71 |
+
# only for decimals where third decimal after comma is non-zero or with quantity
|
| 72 |
+
decimal_delete_last_zeros = (
|
| 73 |
+
pynini.closure(NEMO_DIGIT | pynutil.delete(","))
|
| 74 |
+
+ pynini.accep(".")
|
| 75 |
+
+ pynini.closure(NEMO_DIGIT, 2)
|
| 76 |
+
+ (NEMO_DIGIT - "0")
|
| 77 |
+
+ pynini.closure(pynutil.delete("0"))
|
| 78 |
+
)
|
| 79 |
+
decimal_with_quantity = NEMO_SIGMA + NEMO_ALPHA
|
| 80 |
+
|
| 81 |
+
graph_decimal = (
|
| 82 |
+
graph_maj_plural + insert_space + (decimal_delete_last_zeros | decimal_with_quantity) @ graph_decimal_final
|
| 83 |
+
)
|
| 84 |
+
|
| 85 |
+
graph_integer = pynutil.insert('integer_part: "') + ((NEMO_SIGMA - "1") @ cardinal_graph) + pynutil.insert('"')
|
| 86 |
+
|
| 87 |
+
graph_integer_only = graph_maj_singular + insert_space + graph_integer_one
|
| 88 |
+
graph_integer_only |= graph_maj_plural + insert_space + graph_integer
|
| 89 |
+
|
| 90 |
+
final_graph = (graph_integer_only + optional_delete_fractional_zeros) | graph_decimal
|
| 91 |
+
|
| 92 |
+
# remove trailing zeros of non zero number in the first 2 digits and fill up to 2 digits
|
| 93 |
+
# e.g. 2000 -> 20, 0200->02, 01 -> 01, 10 -> 10
|
| 94 |
+
# not accepted: 002, 00, 0,
|
| 95 |
+
two_digits_fractional_part = (
|
| 96 |
+
pynini.closure(NEMO_DIGIT) + (NEMO_DIGIT - "0") + pynini.closure(pynutil.delete("0"))
|
| 97 |
+
) @ (
|
| 98 |
+
(pynutil.delete("0") + (NEMO_DIGIT - "0"))
|
| 99 |
+
| ((NEMO_DIGIT - "0") + pynutil.insert("0"))
|
| 100 |
+
| ((NEMO_DIGIT - "0") + NEMO_DIGIT)
|
| 101 |
+
)
|
| 102 |
+
|
| 103 |
+
graph_min_singular = pynutil.insert(' currency_min: "') + min_singular + pynutil.insert('"')
|
| 104 |
+
graph_min_plural = pynutil.insert(' currency_min: "') + min_plural + pynutil.insert('"')
|
| 105 |
+
# format ** dollars ** cent
|
| 106 |
+
decimal_graph_with_minor = None
|
| 107 |
+
integer_graph_reordered = None
|
| 108 |
+
decimal_default_reordered = None
|
| 109 |
+
for curr_symbol, _ in maj_singular_labels:
|
| 110 |
+
preserve_order = pynutil.insert(" preserve_order: true")
|
| 111 |
+
integer_plus_maj = graph_integer + insert_space + pynutil.insert(curr_symbol) @ graph_maj_plural
|
| 112 |
+
integer_plus_maj |= graph_integer_one + insert_space + pynutil.insert(curr_symbol) @ graph_maj_singular
|
| 113 |
+
|
| 114 |
+
integer_plus_maj_with_comma = pynini.compose(
|
| 115 |
+
NEMO_DIGIT - "0" + pynini.closure(NEMO_DIGIT | pynutil.delete(",")),
|
| 116 |
+
integer_plus_maj,
|
| 117 |
+
)
|
| 118 |
+
integer_plus_maj = pynini.compose(pynini.closure(NEMO_DIGIT) - "0", integer_plus_maj)
|
| 119 |
+
integer_plus_maj |= integer_plus_maj_with_comma
|
| 120 |
+
|
| 121 |
+
graph_fractional_one = two_digits_fractional_part @ pynini.cross("1", "one")
|
| 122 |
+
graph_fractional_one = pynutil.insert('fractional_part: "') + graph_fractional_one + pynutil.insert('"')
|
| 123 |
+
graph_fractional = (
|
| 124 |
+
two_digits_fractional_part
|
| 125 |
+
@ (pynini.closure(NEMO_DIGIT, 1, 2) - "1")
|
| 126 |
+
@ cardinal.graph_hundred_component_at_least_one_none_zero_digit
|
| 127 |
+
)
|
| 128 |
+
graph_fractional = pynutil.insert('fractional_part: "') + graph_fractional + pynutil.insert('"')
|
| 129 |
+
|
| 130 |
+
fractional_plus_min = graph_fractional + insert_space + pynutil.insert(curr_symbol) @ graph_min_plural
|
| 131 |
+
fractional_plus_min |= (
|
| 132 |
+
graph_fractional_one + insert_space + pynutil.insert(curr_symbol) @ graph_min_singular
|
| 133 |
+
)
|
| 134 |
+
|
| 135 |
+
decimal_graph_with_minor_curr = integer_plus_maj + pynini.cross(".", " ") + fractional_plus_min
|
| 136 |
+
|
| 137 |
+
if not deterministic:
|
| 138 |
+
decimal_graph_with_minor_curr |= pynutil.add_weight(
|
| 139 |
+
integer_plus_maj
|
| 140 |
+
+ pynini.cross(".", " ")
|
| 141 |
+
+ pynutil.insert('fractional_part: "')
|
| 142 |
+
+ two_digits_fractional_part @ cardinal.graph_hundred_component_at_least_one_none_zero_digit
|
| 143 |
+
+ pynutil.insert('"'),
|
| 144 |
+
weight=0.0001,
|
| 145 |
+
)
|
| 146 |
+
default_fraction_graph = (decimal_delete_last_zeros | decimal_with_quantity) @ graph_decimal_final
|
| 147 |
+
decimal_graph_with_minor_curr |= (
|
| 148 |
+
pynini.closure(pynutil.delete("0"), 0, 1) + pynutil.delete(".") + fractional_plus_min
|
| 149 |
+
)
|
| 150 |
+
decimal_graph_with_minor_curr = (
|
| 151 |
+
pynutil.delete(curr_symbol) + decimal_graph_with_minor_curr + preserve_order
|
| 152 |
+
)
|
| 153 |
+
|
| 154 |
+
decimal_graph_with_minor = (
|
| 155 |
+
decimal_graph_with_minor_curr
|
| 156 |
+
if decimal_graph_with_minor is None
|
| 157 |
+
else pynini.union(decimal_graph_with_minor, decimal_graph_with_minor_curr).optimize()
|
| 158 |
+
)
|
| 159 |
+
|
| 160 |
+
if not deterministic:
|
| 161 |
+
integer_graph_reordered_curr = (
|
| 162 |
+
pynutil.delete(curr_symbol) + integer_plus_maj + preserve_order
|
| 163 |
+
).optimize()
|
| 164 |
+
|
| 165 |
+
integer_graph_reordered = (
|
| 166 |
+
integer_graph_reordered_curr
|
| 167 |
+
if integer_graph_reordered is None
|
| 168 |
+
else pynini.union(integer_graph_reordered, integer_graph_reordered_curr).optimize()
|
| 169 |
+
)
|
| 170 |
+
decimal_default_reordered_curr = (
|
| 171 |
+
pynutil.delete(curr_symbol)
|
| 172 |
+
+ default_fraction_graph
|
| 173 |
+
+ insert_space
|
| 174 |
+
+ pynutil.insert(curr_symbol) @ graph_maj_plural
|
| 175 |
+
)
|
| 176 |
+
|
| 177 |
+
decimal_default_reordered = (
|
| 178 |
+
decimal_default_reordered_curr
|
| 179 |
+
if decimal_default_reordered is None
|
| 180 |
+
else pynini.union(decimal_default_reordered, decimal_default_reordered_curr)
|
| 181 |
+
).optimize()
|
| 182 |
+
|
| 183 |
+
# weight for SH
|
| 184 |
+
final_graph |= pynutil.add_weight(decimal_graph_with_minor, -0.0001)
|
| 185 |
+
|
| 186 |
+
# utilizes morphosyntactic features to append "per units"
|
| 187 |
+
graph_per_units = pynutil.insert(' morphosyntactic_features: "') + per_units + pynutil.insert('"')
|
| 188 |
+
|
| 189 |
+
if not deterministic:
|
| 190 |
+
final_graph |= integer_graph_reordered | decimal_default_reordered
|
| 191 |
+
# to handle "$2.00" cases
|
| 192 |
+
final_graph |= pynini.compose(
|
| 193 |
+
NEMO_SIGMA + pynutil.delete(".") + pynini.closure(pynutil.delete("0"), 1),
|
| 194 |
+
integer_graph_reordered,
|
| 195 |
+
)
|
| 196 |
+
|
| 197 |
+
final_graph += graph_per_units.ques
|
| 198 |
+
final_graph = self.add_tokens(final_graph.optimize())
|
| 199 |
+
self.fst = final_graph.optimize()
|
vendor/zonos3/vendor/nemo_text_processing/text_normalization/en/taggers/ordinal.py
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Copyright (c) 2021, NVIDIA CORPORATION. All rights reserved.
|
| 2 |
+
#
|
| 3 |
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
| 4 |
+
# you may not use this file except in compliance with the License.
|
| 5 |
+
# You may obtain a copy of the License at
|
| 6 |
+
#
|
| 7 |
+
# http://www.apache.org/licenses/LICENSE-2.0
|
| 8 |
+
#
|
| 9 |
+
# Unless required by applicable law or agreed to in writing, software
|
| 10 |
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
| 11 |
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 12 |
+
# See the License for the specific language governing permissions and
|
| 13 |
+
# limitations under the License.
|
| 14 |
+
|
| 15 |
+
|
| 16 |
+
import pynini
|
| 17 |
+
from pynini.lib import pynutil
|
| 18 |
+
|
| 19 |
+
from zonos3.vendor.nemo_text_processing.text_normalization.en.graph_utils import NEMO_DIGIT, GraphFst
|
| 20 |
+
|
| 21 |
+
|
| 22 |
+
class OrdinalFst(GraphFst):
|
| 23 |
+
"""
|
| 24 |
+
Finite state transducer for classifying ordinal, e.g.
|
| 25 |
+
13th -> ordinal { integer: "thirteen" }
|
| 26 |
+
|
| 27 |
+
Args:
|
| 28 |
+
cardinal: CardinalFst
|
| 29 |
+
deterministic: if True will provide a single transduction option,
|
| 30 |
+
for False multiple transduction are generated (used for audio-based normalization)
|
| 31 |
+
"""
|
| 32 |
+
|
| 33 |
+
def __init__(self, cardinal: GraphFst, deterministic: bool = True):
|
| 34 |
+
super().__init__(name="ordinal", kind="classify", deterministic=deterministic)
|
| 35 |
+
|
| 36 |
+
cardinal_graph = cardinal.graph
|
| 37 |
+
cardinal_format = pynini.closure(NEMO_DIGIT | pynini.accep(","))
|
| 38 |
+
st_format = (
|
| 39 |
+
pynini.closure(cardinal_format + (NEMO_DIGIT - "1"), 0, 1)
|
| 40 |
+
+ pynini.accep("1")
|
| 41 |
+
+ pynutil.delete(pynini.union("st", "ST", "ˢᵗ"))
|
| 42 |
+
)
|
| 43 |
+
nd_format = (
|
| 44 |
+
pynini.closure(cardinal_format + (NEMO_DIGIT - "1"), 0, 1)
|
| 45 |
+
+ pynini.accep("2")
|
| 46 |
+
+ pynutil.delete(pynini.union("nd", "ND", "ⁿᵈ"))
|
| 47 |
+
)
|
| 48 |
+
rd_format = (
|
| 49 |
+
pynini.closure(cardinal_format + (NEMO_DIGIT - "1"), 0, 1)
|
| 50 |
+
+ pynini.accep("3")
|
| 51 |
+
+ pynutil.delete(pynini.union("rd", "RD", "ʳᵈ"))
|
| 52 |
+
)
|
| 53 |
+
th_format = pynini.closure(
|
| 54 |
+
(NEMO_DIGIT - "1" - "2" - "3")
|
| 55 |
+
| (cardinal_format + "1" + NEMO_DIGIT)
|
| 56 |
+
| (cardinal_format + (NEMO_DIGIT - "1") + (NEMO_DIGIT - "1" - "2" - "3")),
|
| 57 |
+
1,
|
| 58 |
+
) + pynutil.delete(pynini.union("th", "TH", "ᵗʰ"))
|
| 59 |
+
self.graph = (st_format | nd_format | rd_format | th_format) @ cardinal_graph
|
| 60 |
+
final_graph = pynutil.insert("integer: \"") + self.graph + pynutil.insert("\"")
|
| 61 |
+
final_graph = self.add_tokens(final_graph)
|
| 62 |
+
self.fst = final_graph.optimize()
|
vendor/zonos3/vendor/nemo_text_processing/text_normalization/en/taggers/punctuation.py
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Copyright (c) 2021, NVIDIA CORPORATION. All rights reserved.
|
| 2 |
+
#
|
| 3 |
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
| 4 |
+
# you may not use this file except in compliance with the License.
|
| 5 |
+
# You may obtain a copy of the License at
|
| 6 |
+
#
|
| 7 |
+
# http://www.apache.org/licenses/LICENSE-2.0
|
| 8 |
+
#
|
| 9 |
+
# Unless required by applicable law or agreed to in writing, software
|
| 10 |
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
| 11 |
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 12 |
+
# See the License for the specific language governing permissions and
|
| 13 |
+
# limitations under the License.
|
| 14 |
+
|
| 15 |
+
import sys
|
| 16 |
+
from unicodedata import category
|
| 17 |
+
|
| 18 |
+
import pynini
|
| 19 |
+
from pynini.examples import plurals
|
| 20 |
+
from pynini.lib import pynutil
|
| 21 |
+
|
| 22 |
+
from zonos3.vendor.nemo_text_processing.text_normalization.en.graph_utils import NEMO_NOT_SPACE, NEMO_SIGMA, GraphFst
|
| 23 |
+
from zonos3.vendor.nemo_text_processing.text_normalization.en.utils import get_abs_path, load_labels
|
| 24 |
+
|
| 25 |
+
|
| 26 |
+
class PunctuationFst(GraphFst):
|
| 27 |
+
"""
|
| 28 |
+
Finite state transducer for classifying punctuation
|
| 29 |
+
e.g. a, -> tokens { name: "a" } tokens { name: "," }
|
| 30 |
+
|
| 31 |
+
Args:
|
| 32 |
+
deterministic: if True will provide a single transduction option,
|
| 33 |
+
for False multiple transduction are generated (used for audio-based normalization)
|
| 34 |
+
|
| 35 |
+
"""
|
| 36 |
+
|
| 37 |
+
def __init__(self, deterministic: bool = True):
|
| 38 |
+
super().__init__(name="punctuation", kind="classify", deterministic=deterministic)
|
| 39 |
+
s = "!#%&\'()*+,-./:;<=>?@^_`{|}~\""
|
| 40 |
+
|
| 41 |
+
punct_symbols_to_exclude = ["[", "]"]
|
| 42 |
+
punct_unicode = [
|
| 43 |
+
chr(i)
|
| 44 |
+
for i in range(sys.maxunicode)
|
| 45 |
+
if category(chr(i)).startswith("P") and chr(i) not in punct_symbols_to_exclude
|
| 46 |
+
] + [r"\[", r"\]"]
|
| 47 |
+
|
| 48 |
+
whitelist_symbols = load_labels(get_abs_path("data/whitelist/symbol.tsv"))
|
| 49 |
+
whitelist_symbols = [x[0] for x in whitelist_symbols]
|
| 50 |
+
self.punct_marks = [p for p in punct_unicode + list(s) if p not in whitelist_symbols]
|
| 51 |
+
|
| 52 |
+
punct = pynini.union(*self.punct_marks)
|
| 53 |
+
punct = pynini.closure(punct, 1)
|
| 54 |
+
|
| 55 |
+
emphasis = (
|
| 56 |
+
pynini.accep("<")
|
| 57 |
+
+ (
|
| 58 |
+
(pynini.closure(NEMO_NOT_SPACE - pynini.union("<", ">"), 1) + pynini.closure(pynini.accep("/"), 0, 1))
|
| 59 |
+
| (pynini.accep("/") + pynini.closure(NEMO_NOT_SPACE - pynini.union("<", ">"), 1))
|
| 60 |
+
)
|
| 61 |
+
+ pynini.accep(">")
|
| 62 |
+
)
|
| 63 |
+
punct = plurals._priority_union(emphasis, punct, NEMO_SIGMA)
|
| 64 |
+
|
| 65 |
+
self.graph = punct
|
| 66 |
+
self.fst = (pynutil.insert("name: \"") + self.graph + pynutil.insert("\"")).optimize()
|
vendor/zonos3/vendor/nemo_text_processing/text_normalization/en/taggers/range.py
ADDED
|
@@ -0,0 +1,128 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved.
|
| 2 |
+
#
|
| 3 |
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
| 4 |
+
# you may not use this file except in compliance with the License.
|
| 5 |
+
# You may obtain a copy of the License at
|
| 6 |
+
#
|
| 7 |
+
# http://www.apache.org/licenses/LICENSE-2.0
|
| 8 |
+
#
|
| 9 |
+
# Unless required by applicable law or agreed to in writing, software
|
| 10 |
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
| 11 |
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 12 |
+
# See the License for the specific language governing permissions and
|
| 13 |
+
# limitations under the License.
|
| 14 |
+
|
| 15 |
+
|
| 16 |
+
import pynini
|
| 17 |
+
from pynini.lib import pynutil
|
| 18 |
+
|
| 19 |
+
from zonos3.vendor.nemo_text_processing.text_normalization.en.graph_utils import NEMO_DIGIT, GraphFst, convert_space
|
| 20 |
+
|
| 21 |
+
|
| 22 |
+
class RangeFst(GraphFst):
|
| 23 |
+
"""
|
| 24 |
+
This class is a composite class of two other class instances
|
| 25 |
+
|
| 26 |
+
Args:
|
| 27 |
+
time: composed tagger and verbalizer
|
| 28 |
+
date: composed tagger and verbalizer
|
| 29 |
+
cardinal: tagger
|
| 30 |
+
deterministic: if True will provide a single transduction option,
|
| 31 |
+
for False multiple transduction are generated (used for audio-based normalization)
|
| 32 |
+
lm: whether to use for hybrid LM
|
| 33 |
+
"""
|
| 34 |
+
|
| 35 |
+
def __init__(
|
| 36 |
+
self,
|
| 37 |
+
time: GraphFst,
|
| 38 |
+
date: GraphFst,
|
| 39 |
+
cardinal: GraphFst,
|
| 40 |
+
deterministic: bool = True,
|
| 41 |
+
lm: bool = False,
|
| 42 |
+
):
|
| 43 |
+
super().__init__(name="range", kind="classify", deterministic=deterministic)
|
| 44 |
+
|
| 45 |
+
delete_space = pynini.closure(pynutil.delete(" "), 0, 1)
|
| 46 |
+
|
| 47 |
+
approx = pynini.cross("~", "approximately")
|
| 48 |
+
|
| 49 |
+
# TIME
|
| 50 |
+
time_graph = time + delete_space + pynini.cross("-", " to ") + delete_space + time
|
| 51 |
+
self.graph = time_graph | (approx + time)
|
| 52 |
+
|
| 53 |
+
cardinal = cardinal.graph_with_and
|
| 54 |
+
# YEAR
|
| 55 |
+
date_year_four_digit = (NEMO_DIGIT**4 + pynini.closure(pynini.accep("s"), 0, 1)) @ date
|
| 56 |
+
date_year_two_digit = (NEMO_DIGIT**2 + pynini.closure(pynini.accep("s"), 0, 1)) @ date
|
| 57 |
+
year_to_year_graph = (
|
| 58 |
+
date_year_four_digit
|
| 59 |
+
+ delete_space
|
| 60 |
+
+ pynini.cross("-", " to ")
|
| 61 |
+
+ delete_space
|
| 62 |
+
+ (date_year_four_digit | date_year_two_digit | (NEMO_DIGIT**2 @ cardinal))
|
| 63 |
+
)
|
| 64 |
+
mid_year_graph = pynini.accep("mid") + pynini.cross("-", " ") + (date_year_four_digit | date_year_two_digit)
|
| 65 |
+
|
| 66 |
+
self.graph |= year_to_year_graph
|
| 67 |
+
self.graph |= mid_year_graph
|
| 68 |
+
|
| 69 |
+
# ADDITION
|
| 70 |
+
range_graph = cardinal + pynini.closure(pynini.cross("+", " plus ") + cardinal, 1)
|
| 71 |
+
range_graph |= cardinal + pynini.closure(pynini.cross(" + ", " plus ") + cardinal, 1)
|
| 72 |
+
range_graph |= approx + cardinal
|
| 73 |
+
range_graph |= cardinal + (pynini.cross("...", " ... ") | pynini.accep(" ... ")) + cardinal
|
| 74 |
+
|
| 75 |
+
if not deterministic or lm:
|
| 76 |
+
# cardinal ----
|
| 77 |
+
cardinal_to_cardinal_graph = (
|
| 78 |
+
cardinal + delete_space + pynini.cross("-", pynini.union(" to ", " minus ")) + delete_space + cardinal
|
| 79 |
+
)
|
| 80 |
+
|
| 81 |
+
range_graph |= cardinal_to_cardinal_graph | (
|
| 82 |
+
cardinal + delete_space + pynini.cross(":", " to ") + delete_space + cardinal
|
| 83 |
+
)
|
| 84 |
+
|
| 85 |
+
# MULTIPLY
|
| 86 |
+
for x in [" x ", "x"]:
|
| 87 |
+
range_graph |= cardinal + pynini.cross(x, pynini.union(" by ", " times ")) + cardinal
|
| 88 |
+
|
| 89 |
+
# 40x -> "40 times" ("40 x" cases is covered in serial)
|
| 90 |
+
for x in [" x", "x"]:
|
| 91 |
+
range_graph |= cardinal + pynini.cross(x, " times")
|
| 92 |
+
|
| 93 |
+
# 5x to 7x-> five to seven x/times
|
| 94 |
+
range_graph |= (
|
| 95 |
+
cardinal
|
| 96 |
+
+ pynutil.delete(x)
|
| 97 |
+
+ pynini.union(" to ", "-", " - ")
|
| 98 |
+
+ cardinal
|
| 99 |
+
+ pynini.cross(x, pynini.union(" x", " times"))
|
| 100 |
+
)
|
| 101 |
+
|
| 102 |
+
for x in ["*", " * "]:
|
| 103 |
+
range_graph |= cardinal + pynini.closure(pynini.cross(x, " times ") + cardinal, 1)
|
| 104 |
+
|
| 105 |
+
# supports "No. 12" -> "Number 12"
|
| 106 |
+
range_graph |= (
|
| 107 |
+
(pynini.cross(pynini.union("NO", "No"), "Number") | pynini.cross("no", "number"))
|
| 108 |
+
+ pynini.closure(pynini.union(". ", " "), 0, 1)
|
| 109 |
+
+ cardinal
|
| 110 |
+
)
|
| 111 |
+
|
| 112 |
+
for x in ["/", " / "]:
|
| 113 |
+
range_graph |= cardinal + pynini.closure(pynini.cross(x, " divided by ") + cardinal, 1)
|
| 114 |
+
|
| 115 |
+
# 10% to 20% -> ten to twenty percent
|
| 116 |
+
range_graph |= (
|
| 117 |
+
cardinal
|
| 118 |
+
+ pynini.closure(pynini.cross("%", " percent") | pynutil.delete("%"), 0, 1)
|
| 119 |
+
+ pynini.union(" to ", "-", " - ")
|
| 120 |
+
+ cardinal
|
| 121 |
+
+ pynini.cross("%", " percent")
|
| 122 |
+
)
|
| 123 |
+
|
| 124 |
+
self.graph |= range_graph
|
| 125 |
+
|
| 126 |
+
self.graph = self.graph.optimize()
|
| 127 |
+
graph = pynutil.insert("name: \"") + convert_space(self.graph).optimize() + pynutil.insert("\"")
|
| 128 |
+
self.fst = graph.optimize()
|
vendor/zonos3/vendor/nemo_text_processing/text_normalization/en/taggers/roman.py
ADDED
|
@@ -0,0 +1,115 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Copyright (c) 2021, NVIDIA CORPORATION. All rights reserved.
|
| 2 |
+
#
|
| 3 |
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
| 4 |
+
# you may not use this file except in compliance with the License.
|
| 5 |
+
# You may obtain a copy of the License at
|
| 6 |
+
#
|
| 7 |
+
# http://www.apache.org/licenses/LICENSE-2.0
|
| 8 |
+
#
|
| 9 |
+
# Unless required by applicable law or agreed to in writing, software
|
| 10 |
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
| 11 |
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 12 |
+
# See the License for the specific language governing permissions and
|
| 13 |
+
# limitations under the License.
|
| 14 |
+
|
| 15 |
+
|
| 16 |
+
import pynini
|
| 17 |
+
from pynini.lib import pynutil
|
| 18 |
+
|
| 19 |
+
from zonos3.vendor.nemo_text_processing.text_normalization.en.graph_utils import NEMO_ALPHA, NEMO_SIGMA, GraphFst
|
| 20 |
+
from zonos3.vendor.nemo_text_processing.text_normalization.en.utils import get_abs_path, load_labels
|
| 21 |
+
|
| 22 |
+
|
| 23 |
+
class RomanFst(GraphFst):
|
| 24 |
+
"""
|
| 25 |
+
Finite state transducer for classifying roman numbers:
|
| 26 |
+
e.g. "IV" -> tokens { roman { integer: "four" } }
|
| 27 |
+
|
| 28 |
+
Args:
|
| 29 |
+
deterministic: if True will provide a single transduction option,
|
| 30 |
+
for False multiple transduction are generated (used for audio-based normalization)
|
| 31 |
+
"""
|
| 32 |
+
|
| 33 |
+
def __init__(self, deterministic: bool = True, lm: bool = False):
|
| 34 |
+
super().__init__(name="roman", kind="classify", deterministic=deterministic)
|
| 35 |
+
|
| 36 |
+
roman_dict = load_labels(get_abs_path("data/roman/roman_to_spoken.tsv"))
|
| 37 |
+
default_graph = pynini.string_map(roman_dict).optimize()
|
| 38 |
+
default_graph = pynutil.insert("integer: \"") + default_graph + pynutil.insert("\"")
|
| 39 |
+
ordinal_limit = 19
|
| 40 |
+
|
| 41 |
+
if deterministic:
|
| 42 |
+
# exclude "I"
|
| 43 |
+
start_idx = 1
|
| 44 |
+
else:
|
| 45 |
+
start_idx = 0
|
| 46 |
+
|
| 47 |
+
graph_teens = pynini.string_map([x[0] for x in roman_dict[start_idx:ordinal_limit]]).optimize()
|
| 48 |
+
|
| 49 |
+
# roman numerals up to ordinal_limit with a preceding name are converted to ordinal form
|
| 50 |
+
names = get_names()
|
| 51 |
+
graph = (
|
| 52 |
+
pynutil.insert("key_the_ordinal: \"")
|
| 53 |
+
+ names
|
| 54 |
+
+ pynutil.insert("\"")
|
| 55 |
+
+ pynini.accep(" ")
|
| 56 |
+
+ graph_teens @ default_graph
|
| 57 |
+
).optimize()
|
| 58 |
+
|
| 59 |
+
# single symbol roman numerals with preceding key words (multiple formats) are converted to cardinal form
|
| 60 |
+
key_words = []
|
| 61 |
+
for k_word in load_labels(get_abs_path("data/roman/key_word.tsv")):
|
| 62 |
+
key_words.append(k_word)
|
| 63 |
+
key_words.append([k_word[0][0].upper() + k_word[0][1:]])
|
| 64 |
+
key_words.append([k_word[0].upper()])
|
| 65 |
+
|
| 66 |
+
key_words = pynini.string_map(key_words).optimize()
|
| 67 |
+
graph |= (
|
| 68 |
+
pynutil.insert("key_cardinal: \"") + key_words + pynutil.insert("\"") + pynini.accep(" ") + default_graph
|
| 69 |
+
).optimize()
|
| 70 |
+
|
| 71 |
+
if deterministic or lm:
|
| 72 |
+
# two digit roman numerals up to 49
|
| 73 |
+
roman_to_cardinal = pynini.compose(
|
| 74 |
+
pynini.closure(NEMO_ALPHA, 2),
|
| 75 |
+
(
|
| 76 |
+
pynutil.insert("default_cardinal: \"default\" ")
|
| 77 |
+
+ (pynini.string_map([x[0] for x in roman_dict[:50]]).optimize()) @ default_graph
|
| 78 |
+
),
|
| 79 |
+
)
|
| 80 |
+
graph |= roman_to_cardinal
|
| 81 |
+
elif not lm:
|
| 82 |
+
# two or more digit roman numerals
|
| 83 |
+
roman_to_cardinal = pynini.compose(
|
| 84 |
+
pynini.difference(NEMO_SIGMA, "I"),
|
| 85 |
+
(
|
| 86 |
+
pynutil.insert("default_cardinal: \"default\" integer: \"")
|
| 87 |
+
+ pynini.string_map(roman_dict).optimize()
|
| 88 |
+
+ pynutil.insert("\"")
|
| 89 |
+
),
|
| 90 |
+
).optimize()
|
| 91 |
+
graph |= roman_to_cardinal
|
| 92 |
+
|
| 93 |
+
# convert three digit roman or up with suffix to ordinal
|
| 94 |
+
roman_to_ordinal = pynini.compose(
|
| 95 |
+
pynini.closure(NEMO_ALPHA, 3),
|
| 96 |
+
(pynutil.insert("default_ordinal: \"default\" ") + graph_teens @ default_graph + pynutil.delete("th")),
|
| 97 |
+
)
|
| 98 |
+
|
| 99 |
+
graph |= roman_to_ordinal
|
| 100 |
+
graph = self.add_tokens(graph.optimize())
|
| 101 |
+
|
| 102 |
+
self.fst = graph.optimize()
|
| 103 |
+
|
| 104 |
+
|
| 105 |
+
def get_names():
|
| 106 |
+
"""
|
| 107 |
+
Returns the graph that matched common male and female names.
|
| 108 |
+
"""
|
| 109 |
+
male_labels = load_labels(get_abs_path("data/roman/male.tsv"))
|
| 110 |
+
female_labels = load_labels(get_abs_path("data/roman/female.tsv"))
|
| 111 |
+
male_labels.extend([[x[0].upper()] for x in male_labels])
|
| 112 |
+
female_labels.extend([[x[0].upper()] for x in female_labels])
|
| 113 |
+
names = pynini.string_map(male_labels).optimize()
|
| 114 |
+
names |= pynini.string_map(female_labels).optimize()
|
| 115 |
+
return names
|
vendor/zonos3/vendor/nemo_text_processing/text_normalization/en/taggers/serial.py
ADDED
|
@@ -0,0 +1,143 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved.
|
| 2 |
+
#
|
| 3 |
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
| 4 |
+
# you may not use this file except in compliance with the License.
|
| 5 |
+
# You may obtain a copy of the License at
|
| 6 |
+
#
|
| 7 |
+
# http://www.apache.org/licenses/LICENSE-2.0
|
| 8 |
+
#
|
| 9 |
+
# Unless required by applicable law or agreed to in writing, software
|
| 10 |
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
| 11 |
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 12 |
+
# See the License for the specific language governing permissions and
|
| 13 |
+
# limitations under the License.
|
| 14 |
+
|
| 15 |
+
|
| 16 |
+
import pynini
|
| 17 |
+
from pynini.examples import plurals
|
| 18 |
+
from pynini.lib import pynutil
|
| 19 |
+
|
| 20 |
+
from zonos3.vendor.nemo_text_processing.text_normalization.en.graph_utils import (
|
| 21 |
+
NEMO_ALPHA,
|
| 22 |
+
NEMO_DIGIT,
|
| 23 |
+
NEMO_NOT_SPACE,
|
| 24 |
+
NEMO_SIGMA,
|
| 25 |
+
GraphFst,
|
| 26 |
+
convert_space,
|
| 27 |
+
)
|
| 28 |
+
from zonos3.vendor.nemo_text_processing.text_normalization.en.utils import get_abs_path, load_labels
|
| 29 |
+
|
| 30 |
+
|
| 31 |
+
class SerialFst(GraphFst):
|
| 32 |
+
"""
|
| 33 |
+
This class is a composite class of two other class instances
|
| 34 |
+
|
| 35 |
+
Args:
|
| 36 |
+
time: composed tagger and verbalizer
|
| 37 |
+
date: composed tagger and verbalizer
|
| 38 |
+
cardinal: tagger
|
| 39 |
+
deterministic: if True will provide a single transduction option,
|
| 40 |
+
for False multiple transduction are generated (used for audio-based normalization)
|
| 41 |
+
lm: whether to use for hybrid LM
|
| 42 |
+
"""
|
| 43 |
+
|
| 44 |
+
def __init__(self, cardinal: GraphFst, ordinal: GraphFst, deterministic: bool = True, lm: bool = False):
|
| 45 |
+
super().__init__(name="integer", kind="classify", deterministic=deterministic)
|
| 46 |
+
|
| 47 |
+
"""
|
| 48 |
+
Finite state transducer for classifying serial (handles only cases without delimiters,
|
| 49 |
+
values with delimiters are handled by default).
|
| 50 |
+
The serial is a combination of digits, letters and dashes, e.g.:
|
| 51 |
+
c325b -> tokens { cardinal { integer: "c three two five b" } }
|
| 52 |
+
"""
|
| 53 |
+
if deterministic:
|
| 54 |
+
num_graph = pynini.compose(NEMO_DIGIT ** (6, ...), cardinal.single_digits_graph).optimize()
|
| 55 |
+
num_graph |= pynini.compose(NEMO_DIGIT ** (1, 5), cardinal.graph).optimize()
|
| 56 |
+
# to handle numbers starting with zero
|
| 57 |
+
num_graph |= pynini.compose(
|
| 58 |
+
pynini.accep("0") + pynini.closure(NEMO_DIGIT), cardinal.single_digits_graph
|
| 59 |
+
).optimize()
|
| 60 |
+
else:
|
| 61 |
+
num_graph = cardinal.final_graph
|
| 62 |
+
|
| 63 |
+
# TODO: "#" doesn't work from the file
|
| 64 |
+
symbols_graph = pynini.string_file(get_abs_path("data/whitelist/symbol.tsv")).optimize() | pynini.cross(
|
| 65 |
+
"#", "hash"
|
| 66 |
+
)
|
| 67 |
+
num_graph |= symbols_graph
|
| 68 |
+
|
| 69 |
+
if not self.deterministic and not lm:
|
| 70 |
+
num_graph |= cardinal.single_digits_graph
|
| 71 |
+
num_graph |= pynini.compose(num_graph, NEMO_SIGMA + pynutil.delete("hundred ") + NEMO_SIGMA)
|
| 72 |
+
# also allow double digits to be pronounced as integer in serial number
|
| 73 |
+
num_graph |= pynutil.add_weight(
|
| 74 |
+
NEMO_DIGIT**2 @ cardinal.graph_hundred_component_at_least_one_none_zero_digit, weight=0.0001
|
| 75 |
+
)
|
| 76 |
+
|
| 77 |
+
# add space between letter and digit/symbol
|
| 78 |
+
symbols = [x[0] for x in load_labels(get_abs_path("data/whitelist/symbol.tsv"))]
|
| 79 |
+
symbols = pynini.union(*symbols)
|
| 80 |
+
digit_symbol = NEMO_DIGIT | symbols
|
| 81 |
+
|
| 82 |
+
graph_with_space = pynini.compose(
|
| 83 |
+
pynini.cdrewrite(pynutil.insert(" "), NEMO_ALPHA | symbols, digit_symbol, NEMO_SIGMA),
|
| 84 |
+
pynini.cdrewrite(pynutil.insert(" "), digit_symbol, NEMO_ALPHA | symbols, NEMO_SIGMA),
|
| 85 |
+
)
|
| 86 |
+
|
| 87 |
+
# serial graph with delimiter
|
| 88 |
+
delimiter = pynini.accep("-") | pynini.accep("/") | pynini.accep(" ")
|
| 89 |
+
if not deterministic:
|
| 90 |
+
delimiter |= pynini.cross("-", " dash ") | pynini.cross("/", " slash ")
|
| 91 |
+
|
| 92 |
+
alphas = pynini.closure(NEMO_ALPHA, 1)
|
| 93 |
+
letter_num = alphas + delimiter + num_graph
|
| 94 |
+
num_letter = pynini.closure(num_graph + delimiter, 1) + alphas
|
| 95 |
+
next_alpha_or_num = pynini.closure(delimiter + (alphas | num_graph))
|
| 96 |
+
next_alpha_or_num |= pynini.closure(
|
| 97 |
+
delimiter
|
| 98 |
+
+ num_graph
|
| 99 |
+
+ plurals._priority_union(pynini.accep(" "), pynutil.insert(" "), NEMO_SIGMA).optimize()
|
| 100 |
+
+ alphas
|
| 101 |
+
)
|
| 102 |
+
|
| 103 |
+
serial_graph = letter_num + next_alpha_or_num
|
| 104 |
+
serial_graph |= num_letter + next_alpha_or_num
|
| 105 |
+
# numbers only with 2+ delimiters
|
| 106 |
+
serial_graph |= (
|
| 107 |
+
num_graph + delimiter + num_graph + delimiter + num_graph + pynini.closure(delimiter + num_graph)
|
| 108 |
+
)
|
| 109 |
+
# 2+ symbols
|
| 110 |
+
serial_graph |= pynini.compose(NEMO_SIGMA + symbols + NEMO_SIGMA, num_graph + delimiter + num_graph)
|
| 111 |
+
|
| 112 |
+
# exclude ordinal numbers from serial options
|
| 113 |
+
serial_graph = pynini.compose(
|
| 114 |
+
pynini.difference(NEMO_SIGMA, pynini.project(ordinal.graph, "input")), serial_graph
|
| 115 |
+
).optimize()
|
| 116 |
+
|
| 117 |
+
serial_graph = pynutil.add_weight(serial_graph, 0.0001)
|
| 118 |
+
serial_graph |= (
|
| 119 |
+
pynini.closure(NEMO_NOT_SPACE, 1)
|
| 120 |
+
+ (pynini.cross("^2", " squared") | pynini.cross("^3", " cubed")).optimize()
|
| 121 |
+
)
|
| 122 |
+
|
| 123 |
+
# at least one serial graph with alpha numeric value and optional additional serial/num/alpha values
|
| 124 |
+
serial_graph = (
|
| 125 |
+
pynini.closure((serial_graph | num_graph | alphas) + delimiter)
|
| 126 |
+
+ serial_graph
|
| 127 |
+
+ pynini.closure(delimiter + (serial_graph | num_graph | alphas))
|
| 128 |
+
)
|
| 129 |
+
|
| 130 |
+
serial_graph |= pynini.compose(graph_with_space, serial_graph.optimize()).optimize()
|
| 131 |
+
serial_graph = pynini.compose(pynini.closure(NEMO_NOT_SPACE, 2), serial_graph).optimize()
|
| 132 |
+
|
| 133 |
+
# this is not to verbolize "/" as "slash" in cases like "import/export"
|
| 134 |
+
serial_graph = pynini.compose(
|
| 135 |
+
pynini.difference(
|
| 136 |
+
NEMO_SIGMA, pynini.closure(NEMO_ALPHA, 1) + pynini.accep("/") + pynini.closure(NEMO_ALPHA, 1)
|
| 137 |
+
),
|
| 138 |
+
serial_graph,
|
| 139 |
+
)
|
| 140 |
+
|
| 141 |
+
self.graph = serial_graph.optimize()
|
| 142 |
+
graph = pynutil.insert("name: \"") + convert_space(self.graph).optimize() + pynutil.insert("\"")
|
| 143 |
+
self.fst = graph.optimize()
|
vendor/zonos3/vendor/nemo_text_processing/text_normalization/en/taggers/telephone.py
ADDED
|
@@ -0,0 +1,134 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Copyright (c) 2021, NVIDIA CORPORATION. All rights reserved.
|
| 2 |
+
#
|
| 3 |
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
| 4 |
+
# you may not use this file except in compliance with the License.
|
| 5 |
+
# You may obtain a copy of the License at
|
| 6 |
+
#
|
| 7 |
+
# http://www.apache.org/licenses/LICENSE-2.0
|
| 8 |
+
#
|
| 9 |
+
# Unless required by applicable law or agreed to in writing, software
|
| 10 |
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
| 11 |
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 12 |
+
# See the License for the specific language governing permissions and
|
| 13 |
+
# limitations under the License.
|
| 14 |
+
|
| 15 |
+
import pynini
|
| 16 |
+
from pynini.lib import pynutil
|
| 17 |
+
|
| 18 |
+
from zonos3.vendor.nemo_text_processing.text_normalization.en.graph_utils import (
|
| 19 |
+
NEMO_ALPHA,
|
| 20 |
+
NEMO_DIGIT,
|
| 21 |
+
NEMO_SIGMA,
|
| 22 |
+
GraphFst,
|
| 23 |
+
delete_extra_space,
|
| 24 |
+
delete_space,
|
| 25 |
+
insert_space,
|
| 26 |
+
plurals,
|
| 27 |
+
)
|
| 28 |
+
from zonos3.vendor.nemo_text_processing.text_normalization.en.utils import get_abs_path
|
| 29 |
+
|
| 30 |
+
|
| 31 |
+
class TelephoneFst(GraphFst):
|
| 32 |
+
"""
|
| 33 |
+
Finite state transducer for classifying telephone, and IP, and SSN which includes country code, number part and extension
|
| 34 |
+
country code optional: +***
|
| 35 |
+
number part: ***-***-****, or (***) ***-****
|
| 36 |
+
extension optional: 1-9999
|
| 37 |
+
E.g
|
| 38 |
+
+1 123-123-5678-1 -> telephone { country_code: "one" number_part: "one two three, one two three, five six seven eight" extension: "one" }
|
| 39 |
+
1-800-GO-U-HAUL -> telephone { country_code: "one" number_part: "one, eight hundred GO U HAUL" }
|
| 40 |
+
Args:
|
| 41 |
+
deterministic: if True will provide a single transduction option,
|
| 42 |
+
for False multiple transduction are generated (used for audio-based normalization)
|
| 43 |
+
"""
|
| 44 |
+
|
| 45 |
+
def __init__(self, deterministic: bool = True):
|
| 46 |
+
super().__init__(name="telephone", kind="classify", deterministic=deterministic)
|
| 47 |
+
|
| 48 |
+
add_separator = pynutil.insert(", ") # between components
|
| 49 |
+
zero = pynini.cross("0", "zero")
|
| 50 |
+
if not deterministic:
|
| 51 |
+
zero |= pynini.cross("0", pynini.union("o", "oh"))
|
| 52 |
+
digit = pynini.invert(pynini.string_file(get_abs_path("data/number/digit.tsv"))).optimize() | zero
|
| 53 |
+
|
| 54 |
+
telephone_prompts = pynini.string_file(get_abs_path("data/telephone/telephone_prompt.tsv"))
|
| 55 |
+
country_code = (
|
| 56 |
+
pynini.closure(telephone_prompts + delete_extra_space, 0, 1)
|
| 57 |
+
+ pynini.closure(pynini.cross("+", "plus "), 0, 1)
|
| 58 |
+
+ pynini.closure(digit + insert_space, 0, 2)
|
| 59 |
+
+ digit
|
| 60 |
+
+ pynutil.insert(",")
|
| 61 |
+
)
|
| 62 |
+
country_code |= telephone_prompts
|
| 63 |
+
country_code = pynutil.insert("country_code: \"") + country_code + pynutil.insert("\"")
|
| 64 |
+
country_code = country_code + pynini.closure(pynutil.delete("-"), 0, 1) + delete_space + insert_space
|
| 65 |
+
|
| 66 |
+
area_part_default = pynini.closure(digit + insert_space, 2, 2) + digit
|
| 67 |
+
area_part = pynini.cross("800", "eight hundred") | pynini.compose(
|
| 68 |
+
pynini.difference(NEMO_SIGMA, "800"), area_part_default
|
| 69 |
+
)
|
| 70 |
+
|
| 71 |
+
area_part = (
|
| 72 |
+
(area_part + (pynutil.delete("-") | pynutil.delete(".")))
|
| 73 |
+
| (
|
| 74 |
+
pynutil.delete("(")
|
| 75 |
+
+ area_part
|
| 76 |
+
+ ((pynutil.delete(")") + pynini.closure(pynutil.delete(" "), 0, 1)) | pynutil.delete(")-"))
|
| 77 |
+
)
|
| 78 |
+
) + add_separator
|
| 79 |
+
|
| 80 |
+
del_separator = pynini.closure(pynini.union("-", " ", "."), 0, 1)
|
| 81 |
+
number_length = ((NEMO_DIGIT + del_separator) | (NEMO_ALPHA + del_separator)) ** 7
|
| 82 |
+
number_words = pynini.closure(
|
| 83 |
+
(NEMO_DIGIT @ digit) + (insert_space | (pynini.cross("-", ', ')))
|
| 84 |
+
| NEMO_ALPHA
|
| 85 |
+
| (NEMO_ALPHA + pynini.cross("-", ' '))
|
| 86 |
+
)
|
| 87 |
+
number_words |= pynini.closure(
|
| 88 |
+
(NEMO_DIGIT @ digit) + (insert_space | (pynini.cross(".", ', ')))
|
| 89 |
+
| NEMO_ALPHA
|
| 90 |
+
| (NEMO_ALPHA + pynini.cross(".", ' '))
|
| 91 |
+
)
|
| 92 |
+
number_words = pynini.compose(number_length, number_words)
|
| 93 |
+
number_part = area_part + number_words
|
| 94 |
+
number_part = pynutil.insert("number_part: \"") + number_part + pynutil.insert("\"")
|
| 95 |
+
extension = (
|
| 96 |
+
pynutil.insert("extension: \"") + pynini.closure(digit + insert_space, 0, 3) + digit + pynutil.insert("\"")
|
| 97 |
+
)
|
| 98 |
+
extension = pynini.closure(insert_space + extension, 0, 1)
|
| 99 |
+
|
| 100 |
+
graph = plurals._priority_union(country_code + number_part, number_part, NEMO_SIGMA).optimize()
|
| 101 |
+
graph = plurals._priority_union(country_code + number_part + extension, graph, NEMO_SIGMA).optimize()
|
| 102 |
+
graph = plurals._priority_union(number_part + extension, graph, NEMO_SIGMA).optimize()
|
| 103 |
+
|
| 104 |
+
# ip
|
| 105 |
+
ip_prompts = pynini.string_file(get_abs_path("data/telephone/ip_prompt.tsv"))
|
| 106 |
+
digit_to_str_graph = digit + pynini.closure(pynutil.insert(" ") + digit, 0, 2)
|
| 107 |
+
ip_graph = digit_to_str_graph + (pynini.cross(".", " dot ") + digit_to_str_graph) ** 3
|
| 108 |
+
graph |= (
|
| 109 |
+
pynini.closure(
|
| 110 |
+
pynutil.insert("country_code: \"") + ip_prompts + pynutil.insert("\"") + delete_extra_space, 0, 1
|
| 111 |
+
)
|
| 112 |
+
+ pynutil.insert("number_part: \"")
|
| 113 |
+
+ ip_graph.optimize()
|
| 114 |
+
+ pynutil.insert("\"")
|
| 115 |
+
)
|
| 116 |
+
# ssn
|
| 117 |
+
ssn_prompts = pynini.string_file(get_abs_path("data/telephone/ssn_prompt.tsv"))
|
| 118 |
+
three_digit_part = digit + (pynutil.insert(" ") + digit) ** 2
|
| 119 |
+
two_digit_part = digit + pynutil.insert(" ") + digit
|
| 120 |
+
four_digit_part = digit + (pynutil.insert(" ") + digit) ** 3
|
| 121 |
+
ssn_separator = pynini.cross("-", ", ")
|
| 122 |
+
ssn_graph = three_digit_part + ssn_separator + two_digit_part + ssn_separator + four_digit_part
|
| 123 |
+
|
| 124 |
+
graph |= (
|
| 125 |
+
pynini.closure(
|
| 126 |
+
pynutil.insert("country_code: \"") + ssn_prompts + pynutil.insert("\"") + delete_extra_space, 0, 1
|
| 127 |
+
)
|
| 128 |
+
+ pynutil.insert("number_part: \"")
|
| 129 |
+
+ ssn_graph.optimize()
|
| 130 |
+
+ pynutil.insert("\"")
|
| 131 |
+
)
|
| 132 |
+
|
| 133 |
+
final_graph = self.add_tokens(graph)
|
| 134 |
+
self.fst = final_graph.optimize()
|
vendor/zonos3/vendor/nemo_text_processing/text_normalization/en/taggers/time.py
ADDED
|
@@ -0,0 +1,133 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Copyright (c) 2021, NVIDIA CORPORATION. All rights reserved.
|
| 2 |
+
#
|
| 3 |
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
| 4 |
+
# you may not use this file except in compliance with the License.
|
| 5 |
+
# You may obtain a copy of the License at
|
| 6 |
+
#
|
| 7 |
+
# http://www.apache.org/licenses/LICENSE-2.0
|
| 8 |
+
#
|
| 9 |
+
# Unless required by applicable law or agreed to in writing, software
|
| 10 |
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
| 11 |
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 12 |
+
# See the License for the specific language governing permissions and
|
| 13 |
+
# limitations under the License.
|
| 14 |
+
|
| 15 |
+
|
| 16 |
+
import pynini
|
| 17 |
+
from pynini.lib import pynutil
|
| 18 |
+
|
| 19 |
+
from zonos3.vendor.nemo_text_processing.text_normalization.en.graph_utils import (
|
| 20 |
+
NEMO_DIGIT,
|
| 21 |
+
GraphFst,
|
| 22 |
+
convert_space,
|
| 23 |
+
delete_space,
|
| 24 |
+
insert_space,
|
| 25 |
+
)
|
| 26 |
+
from zonos3.vendor.nemo_text_processing.text_normalization.en.utils import (
|
| 27 |
+
augment_labels_with_punct_at_end,
|
| 28 |
+
get_abs_path,
|
| 29 |
+
load_labels,
|
| 30 |
+
)
|
| 31 |
+
|
| 32 |
+
|
| 33 |
+
class TimeFst(GraphFst):
|
| 34 |
+
"""
|
| 35 |
+
Finite state transducer for classifying time, e.g.
|
| 36 |
+
12:30 a.m. est -> time { hours: "twelve" minutes: "thirty" suffix: "a m" zone: "e s t" }
|
| 37 |
+
2.30 a.m. -> time { hours: "two" minutes: "thirty" suffix: "a m" }
|
| 38 |
+
02.30 a.m. -> time { hours: "two" minutes: "thirty" suffix: "a m" }
|
| 39 |
+
2.00 a.m. -> time { hours: "two" suffix: "a m" }
|
| 40 |
+
2 a.m. -> time { hours: "two" suffix: "a m" }
|
| 41 |
+
02:00 -> time { hours: "two" }
|
| 42 |
+
2:00 -> time { hours: "two" }
|
| 43 |
+
10:00:05 a.m. -> time { hours: "ten" minutes: "zero" seconds: "five" suffix: "a m" }
|
| 44 |
+
|
| 45 |
+
Args:
|
| 46 |
+
cardinal: CardinalFst
|
| 47 |
+
deterministic: if True will provide a single transduction option,
|
| 48 |
+
for False multiple transduction are generated (used for audio-based normalization)
|
| 49 |
+
"""
|
| 50 |
+
|
| 51 |
+
def __init__(self, cardinal: GraphFst, deterministic: bool = True):
|
| 52 |
+
super().__init__(name="time", kind="classify", deterministic=deterministic)
|
| 53 |
+
suffix_labels = load_labels(get_abs_path("data/time/suffix.tsv"))
|
| 54 |
+
suffix_labels.extend(augment_labels_with_punct_at_end(suffix_labels))
|
| 55 |
+
suffix_graph = pynini.string_map(suffix_labels)
|
| 56 |
+
|
| 57 |
+
time_zone_graph = pynini.string_file(get_abs_path("data/time/zone.tsv"))
|
| 58 |
+
|
| 59 |
+
# only used for < 1000 thousand -> 0 weight
|
| 60 |
+
cardinal = cardinal.graph
|
| 61 |
+
|
| 62 |
+
labels_hour = [str(x) for x in range(0, 24)]
|
| 63 |
+
labels_minute_single = [str(x) for x in range(1, 10)]
|
| 64 |
+
labels_minute_double = [str(x) for x in range(10, 60)]
|
| 65 |
+
|
| 66 |
+
delete_leading_zero_to_double_digit = (NEMO_DIGIT + NEMO_DIGIT) | (
|
| 67 |
+
pynini.closure(pynutil.delete("0"), 0, 1) + NEMO_DIGIT
|
| 68 |
+
)
|
| 69 |
+
|
| 70 |
+
graph_hour = delete_leading_zero_to_double_digit @ pynini.union(*labels_hour) @ cardinal
|
| 71 |
+
|
| 72 |
+
graph_minute_single = pynini.union(*labels_minute_single) @ cardinal
|
| 73 |
+
graph_minute_double = pynini.union(*labels_minute_double) @ cardinal
|
| 74 |
+
|
| 75 |
+
final_graph_hour = pynutil.insert("hours: \"") + graph_hour + pynutil.insert("\"")
|
| 76 |
+
final_graph_minute = (
|
| 77 |
+
pynutil.insert("minutes: \"")
|
| 78 |
+
+ (pynini.cross("0", "o") + insert_space + graph_minute_single | graph_minute_double)
|
| 79 |
+
+ pynutil.insert("\"")
|
| 80 |
+
)
|
| 81 |
+
final_graph_second = (
|
| 82 |
+
pynutil.insert("seconds: \"")
|
| 83 |
+
+ (pynini.cross("0", "o") + insert_space + graph_minute_single | graph_minute_double)
|
| 84 |
+
+ pynutil.insert("\"")
|
| 85 |
+
)
|
| 86 |
+
final_suffix = pynutil.insert("suffix: \"") + convert_space(suffix_graph) + pynutil.insert("\"")
|
| 87 |
+
final_suffix_optional = pynini.closure(delete_space + insert_space + final_suffix, 0, 1)
|
| 88 |
+
final_time_zone_optional = pynini.closure(
|
| 89 |
+
delete_space
|
| 90 |
+
+ insert_space
|
| 91 |
+
+ pynutil.insert("zone: \"")
|
| 92 |
+
+ convert_space(time_zone_graph)
|
| 93 |
+
+ pynutil.insert("\""),
|
| 94 |
+
0,
|
| 95 |
+
1,
|
| 96 |
+
)
|
| 97 |
+
|
| 98 |
+
# 2:30 pm, 02:30, 2:00
|
| 99 |
+
graph_hm = (
|
| 100 |
+
final_graph_hour
|
| 101 |
+
+ pynutil.delete(":")
|
| 102 |
+
+ (pynutil.delete("00") | insert_space + final_graph_minute)
|
| 103 |
+
+ final_suffix_optional
|
| 104 |
+
+ final_time_zone_optional
|
| 105 |
+
)
|
| 106 |
+
|
| 107 |
+
# 10:30:05 pm,
|
| 108 |
+
graph_hms = (
|
| 109 |
+
final_graph_hour
|
| 110 |
+
+ pynutil.delete(":")
|
| 111 |
+
+ (pynini.cross("00", " minutes: \"zero\"") | insert_space + final_graph_minute)
|
| 112 |
+
+ pynutil.delete(":")
|
| 113 |
+
+ (pynini.cross("00", " seconds: \"zero\"") | insert_space + final_graph_second)
|
| 114 |
+
+ final_suffix_optional
|
| 115 |
+
+ final_time_zone_optional
|
| 116 |
+
)
|
| 117 |
+
|
| 118 |
+
# 2.xx pm/am
|
| 119 |
+
graph_hm2 = (
|
| 120 |
+
final_graph_hour
|
| 121 |
+
+ pynutil.delete(".")
|
| 122 |
+
+ (pynutil.delete("00") | insert_space + final_graph_minute)
|
| 123 |
+
+ delete_space
|
| 124 |
+
+ insert_space
|
| 125 |
+
+ final_suffix
|
| 126 |
+
+ final_time_zone_optional
|
| 127 |
+
)
|
| 128 |
+
# 2 pm est
|
| 129 |
+
graph_h = final_graph_hour + delete_space + insert_space + final_suffix + final_time_zone_optional
|
| 130 |
+
final_graph = (graph_hm | graph_h | graph_hm2 | graph_hms).optimize()
|
| 131 |
+
|
| 132 |
+
final_graph = self.add_tokens(final_graph)
|
| 133 |
+
self.fst = final_graph.optimize()
|
vendor/zonos3/vendor/nemo_text_processing/text_normalization/en/taggers/tokenize_and_classify.py
ADDED
|
@@ -0,0 +1,241 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Copyright (c) 2021, NVIDIA CORPORATION. All rights reserved.
|
| 2 |
+
#
|
| 3 |
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
| 4 |
+
# you may not use this file except in compliance with the License.
|
| 5 |
+
# You may obtain a copy of the License at
|
| 6 |
+
#
|
| 7 |
+
# http://www.apache.org/licenses/LICENSE-2.0
|
| 8 |
+
#
|
| 9 |
+
# Unless required by applicable law or agreed to in writing, software
|
| 10 |
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
| 11 |
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 12 |
+
# See the License for the specific language governing permissions and
|
| 13 |
+
# limitations under the License.
|
| 14 |
+
|
| 15 |
+
import os
|
| 16 |
+
import time
|
| 17 |
+
|
| 18 |
+
import pynini
|
| 19 |
+
from pynini.lib import pynutil
|
| 20 |
+
|
| 21 |
+
from zonos3.vendor.nemo_text_processing.text_normalization.en.graph_utils import (
|
| 22 |
+
NEMO_WHITE_SPACE,
|
| 23 |
+
GraphFst,
|
| 24 |
+
delete_extra_space,
|
| 25 |
+
delete_space,
|
| 26 |
+
generator_main,
|
| 27 |
+
)
|
| 28 |
+
from zonos3.vendor.nemo_text_processing.text_normalization.en.taggers.abbreviation import AbbreviationFst
|
| 29 |
+
from zonos3.vendor.nemo_text_processing.text_normalization.en.taggers.cardinal import CardinalFst
|
| 30 |
+
from zonos3.vendor.nemo_text_processing.text_normalization.en.taggers.date import DateFst
|
| 31 |
+
from zonos3.vendor.nemo_text_processing.text_normalization.en.taggers.decimal import DecimalFst
|
| 32 |
+
from zonos3.vendor.nemo_text_processing.text_normalization.en.taggers.electronic import ElectronicFst
|
| 33 |
+
from zonos3.vendor.nemo_text_processing.text_normalization.en.taggers.fraction import FractionFst
|
| 34 |
+
from zonos3.vendor.nemo_text_processing.text_normalization.en.taggers.measure import MeasureFst
|
| 35 |
+
from zonos3.vendor.nemo_text_processing.text_normalization.en.taggers.money import MoneyFst
|
| 36 |
+
from zonos3.vendor.nemo_text_processing.text_normalization.en.taggers.ordinal import OrdinalFst
|
| 37 |
+
from zonos3.vendor.nemo_text_processing.text_normalization.en.taggers.punctuation import PunctuationFst
|
| 38 |
+
from zonos3.vendor.nemo_text_processing.text_normalization.en.taggers.range import RangeFst as RangeFst
|
| 39 |
+
from zonos3.vendor.nemo_text_processing.text_normalization.en.taggers.roman import RomanFst
|
| 40 |
+
from zonos3.vendor.nemo_text_processing.text_normalization.en.taggers.serial import SerialFst
|
| 41 |
+
from zonos3.vendor.nemo_text_processing.text_normalization.en.taggers.telephone import TelephoneFst
|
| 42 |
+
from zonos3.vendor.nemo_text_processing.text_normalization.en.taggers.time import TimeFst
|
| 43 |
+
from zonos3.vendor.nemo_text_processing.text_normalization.en.taggers.whitelist import WhiteListFst
|
| 44 |
+
from zonos3.vendor.nemo_text_processing.text_normalization.en.taggers.word import WordFst
|
| 45 |
+
from zonos3.vendor.nemo_text_processing.text_normalization.en.verbalizers.date import DateFst as vDateFst
|
| 46 |
+
from zonos3.vendor.nemo_text_processing.text_normalization.en.verbalizers.ordinal import OrdinalFst as vOrdinalFst
|
| 47 |
+
from zonos3.vendor.nemo_text_processing.text_normalization.en.verbalizers.time import TimeFst as vTimeFst
|
| 48 |
+
from zonos3.vendor.nemo_text_processing.utils.logging import logger
|
| 49 |
+
|
| 50 |
+
|
| 51 |
+
class ClassifyFst(GraphFst):
|
| 52 |
+
"""
|
| 53 |
+
Final class that composes all other classification grammars. This class can process an entire sentence including punctuation.
|
| 54 |
+
For deployment, this grammar will be compiled and exported to OpenFst Finite State Archive (FAR) File.
|
| 55 |
+
More details to deployment at NeMo/tools/text_processing_deployment.
|
| 56 |
+
|
| 57 |
+
Args:
|
| 58 |
+
input_case: accepting either "lower_cased" or "cased" input.
|
| 59 |
+
deterministic: if True will provide a single transduction option,
|
| 60 |
+
for False multiple options (used for audio-based normalization)
|
| 61 |
+
cache_dir: path to a dir with .far grammar file. Set to None to avoid using cache.
|
| 62 |
+
overwrite_cache: set to True to overwrite .far files
|
| 63 |
+
whitelist: path to a file with whitelist replacements
|
| 64 |
+
"""
|
| 65 |
+
|
| 66 |
+
def __init__(
|
| 67 |
+
self,
|
| 68 |
+
input_case: str,
|
| 69 |
+
deterministic: bool = True,
|
| 70 |
+
cache_dir: str = None,
|
| 71 |
+
overwrite_cache: bool = False,
|
| 72 |
+
whitelist: str = None,
|
| 73 |
+
):
|
| 74 |
+
super().__init__(name="tokenize_and_classify", kind="classify", deterministic=deterministic)
|
| 75 |
+
|
| 76 |
+
far_file = None
|
| 77 |
+
if cache_dir is not None and cache_dir != "None":
|
| 78 |
+
os.makedirs(cache_dir, exist_ok=True)
|
| 79 |
+
whitelist_file = os.path.basename(whitelist) if whitelist else ""
|
| 80 |
+
far_file = os.path.join(
|
| 81 |
+
cache_dir,
|
| 82 |
+
f"en_tn_{deterministic}_deterministic_{input_case}_{whitelist_file}_tokenize.far",
|
| 83 |
+
)
|
| 84 |
+
if not overwrite_cache and far_file and os.path.exists(far_file):
|
| 85 |
+
self.fst = pynini.Far(far_file, mode="r")["tokenize_and_classify"]
|
| 86 |
+
logger.info(f"ClassifyFst.fst was restored from {far_file}.")
|
| 87 |
+
else:
|
| 88 |
+
logger.info(f"Creating ClassifyFst grammars.")
|
| 89 |
+
|
| 90 |
+
start_time = time.time()
|
| 91 |
+
cardinal = CardinalFst(deterministic=deterministic)
|
| 92 |
+
cardinal_graph = cardinal.fst
|
| 93 |
+
logger.debug(f"cardinal: {time.time() - start_time: .2f}s -- {cardinal_graph.num_states()} nodes")
|
| 94 |
+
|
| 95 |
+
start_time = time.time()
|
| 96 |
+
ordinal = OrdinalFst(cardinal=cardinal, deterministic=deterministic)
|
| 97 |
+
ordinal_graph = ordinal.fst
|
| 98 |
+
logger.debug(f"ordinal: {time.time() - start_time: .2f}s -- {ordinal_graph.num_states()} nodes")
|
| 99 |
+
|
| 100 |
+
start_time = time.time()
|
| 101 |
+
decimal = DecimalFst(cardinal=cardinal, deterministic=deterministic)
|
| 102 |
+
decimal_graph = decimal.fst
|
| 103 |
+
logger.debug(f"decimal: {time.time() - start_time: .2f}s -- {decimal_graph.num_states()} nodes")
|
| 104 |
+
|
| 105 |
+
start_time = time.time()
|
| 106 |
+
fraction = FractionFst(deterministic=deterministic, cardinal=cardinal)
|
| 107 |
+
fraction_graph = fraction.fst
|
| 108 |
+
logger.debug(f"fraction: {time.time() - start_time: .2f}s -- {fraction_graph.num_states()} nodes")
|
| 109 |
+
|
| 110 |
+
start_time = time.time()
|
| 111 |
+
measure = MeasureFst(
|
| 112 |
+
cardinal=cardinal,
|
| 113 |
+
decimal=decimal,
|
| 114 |
+
fraction=fraction,
|
| 115 |
+
deterministic=deterministic,
|
| 116 |
+
)
|
| 117 |
+
measure_graph = measure.fst
|
| 118 |
+
logger.debug(f"measure: {time.time() - start_time: .2f}s -- {measure_graph.num_states()} nodes")
|
| 119 |
+
|
| 120 |
+
start_time = time.time()
|
| 121 |
+
date_graph = DateFst(cardinal=cardinal, deterministic=deterministic).fst
|
| 122 |
+
logger.debug(f"date: {time.time() - start_time: .2f}s -- {date_graph.num_states()} nodes")
|
| 123 |
+
|
| 124 |
+
start_time = time.time()
|
| 125 |
+
time_graph = TimeFst(cardinal=cardinal, deterministic=deterministic).fst
|
| 126 |
+
logger.debug(f"time: {time.time() - start_time: .2f}s -- {time_graph.num_states()} nodes")
|
| 127 |
+
|
| 128 |
+
start_time = time.time()
|
| 129 |
+
telephone_graph = TelephoneFst(deterministic=deterministic).fst
|
| 130 |
+
logger.debug(f"telephone: {time.time() - start_time: .2f}s -- {telephone_graph.num_states()} nodes")
|
| 131 |
+
|
| 132 |
+
start_time = time.time()
|
| 133 |
+
electonic_graph = ElectronicFst(cardinal=cardinal, deterministic=deterministic).fst
|
| 134 |
+
logger.debug(f"electronic: {time.time() - start_time: .2f}s -- {electonic_graph.num_states()} nodes")
|
| 135 |
+
|
| 136 |
+
start_time = time.time()
|
| 137 |
+
money_graph = MoneyFst(cardinal=cardinal, decimal=decimal, deterministic=deterministic).fst
|
| 138 |
+
logger.debug(f"money: {time.time() - start_time: .2f}s -- {money_graph.num_states()} nodes")
|
| 139 |
+
|
| 140 |
+
start_time = time.time()
|
| 141 |
+
whitelist_graph = WhiteListFst(
|
| 142 |
+
input_case=input_case, deterministic=deterministic, input_file=whitelist
|
| 143 |
+
).fst
|
| 144 |
+
logger.debug(f"whitelist: {time.time() - start_time: .2f}s -- {whitelist_graph.num_states()} nodes")
|
| 145 |
+
|
| 146 |
+
start_time = time.time()
|
| 147 |
+
punctuation = PunctuationFst(deterministic=deterministic)
|
| 148 |
+
punct_graph = punctuation.fst
|
| 149 |
+
logger.debug(f"punct: {time.time() - start_time: .2f}s -- {punct_graph.num_states()} nodes")
|
| 150 |
+
|
| 151 |
+
start_time = time.time()
|
| 152 |
+
word_graph = WordFst(punctuation=punctuation, deterministic=deterministic).fst
|
| 153 |
+
logger.debug(f"word: {time.time() - start_time: .2f}s -- {word_graph.num_states()} nodes")
|
| 154 |
+
|
| 155 |
+
start_time = time.time()
|
| 156 |
+
serial_graph = SerialFst(cardinal=cardinal, ordinal=ordinal, deterministic=deterministic).fst
|
| 157 |
+
logger.debug(f"serial: {time.time() - start_time: .2f}s -- {serial_graph.num_states()} nodes")
|
| 158 |
+
|
| 159 |
+
start_time = time.time()
|
| 160 |
+
v_time_graph = vTimeFst(deterministic=deterministic).fst
|
| 161 |
+
v_ordinal_graph = vOrdinalFst(deterministic=deterministic)
|
| 162 |
+
v_date_graph = vDateFst(ordinal=v_ordinal_graph, deterministic=deterministic).fst
|
| 163 |
+
time_final = pynini.compose(time_graph, v_time_graph)
|
| 164 |
+
date_final = pynini.compose(date_graph, v_date_graph)
|
| 165 |
+
range_graph = RangeFst(
|
| 166 |
+
time=time_final,
|
| 167 |
+
date=date_final,
|
| 168 |
+
cardinal=cardinal,
|
| 169 |
+
deterministic=deterministic,
|
| 170 |
+
).fst
|
| 171 |
+
logger.debug(f"range: {time.time() - start_time: .2f}s -- {range_graph.num_states()} nodes")
|
| 172 |
+
|
| 173 |
+
# A quick fix to address money ranges:
|
| 174 |
+
# $150-$200 -> one hundred and fifty dollars to two hundred dollars
|
| 175 |
+
|
| 176 |
+
dash = (pynutil.insert('name: "') + pynini.cross("-", "to") + pynutil.insert('"')).optimize()
|
| 177 |
+
|
| 178 |
+
graph_range_money = pynini.closure(
|
| 179 |
+
money_graph
|
| 180 |
+
+ pynutil.insert(" }")
|
| 181 |
+
+ pynutil.insert(" tokens { ")
|
| 182 |
+
+ dash
|
| 183 |
+
+ pynutil.insert(" } ")
|
| 184 |
+
+ pynutil.insert("tokens { ")
|
| 185 |
+
+ money_graph,
|
| 186 |
+
1,
|
| 187 |
+
)
|
| 188 |
+
|
| 189 |
+
classify = (
|
| 190 |
+
pynutil.add_weight(whitelist_graph, 1.01)
|
| 191 |
+
| pynutil.add_weight(time_graph, 1.1)
|
| 192 |
+
| pynutil.add_weight(date_graph, 1.09)
|
| 193 |
+
| pynutil.add_weight(decimal_graph, 1.1)
|
| 194 |
+
| pynutil.add_weight(measure_graph, 1.1)
|
| 195 |
+
| pynutil.add_weight(cardinal_graph, 1.1)
|
| 196 |
+
| pynutil.add_weight(ordinal_graph, 1.1)
|
| 197 |
+
| pynutil.add_weight(money_graph, 1.1)
|
| 198 |
+
| pynutil.add_weight(telephone_graph, 1.1)
|
| 199 |
+
| pynutil.add_weight(electonic_graph, 1.11)
|
| 200 |
+
| pynutil.add_weight(fraction_graph, 1.1)
|
| 201 |
+
| pynutil.add_weight(range_graph, 1.1)
|
| 202 |
+
| pynutil.add_weight(serial_graph, 1.12) # should be higher than the rest of the classes
|
| 203 |
+
| pynutil.add_weight(graph_range_money, 1.1)
|
| 204 |
+
)
|
| 205 |
+
|
| 206 |
+
# roman_graph = RomanFst(deterministic=deterministic).fst
|
| 207 |
+
# classify |= pynutil.add_weight(roman_graph, 1.1)
|
| 208 |
+
|
| 209 |
+
if not deterministic:
|
| 210 |
+
abbreviation_graph = AbbreviationFst(deterministic=deterministic).fst
|
| 211 |
+
classify |= pynutil.add_weight(abbreviation_graph, 100)
|
| 212 |
+
|
| 213 |
+
punct = pynutil.insert("tokens { ") + pynutil.add_weight(punct_graph, weight=2.1) + pynutil.insert(" }")
|
| 214 |
+
punct = pynini.closure(
|
| 215 |
+
pynini.compose(pynini.closure(NEMO_WHITE_SPACE, 1), delete_extra_space)
|
| 216 |
+
| (pynutil.insert(" ") + punct)
|
| 217 |
+
| punct,
|
| 218 |
+
1,
|
| 219 |
+
)
|
| 220 |
+
|
| 221 |
+
classify |= pynutil.add_weight(word_graph, 100)
|
| 222 |
+
token = pynutil.insert("tokens { ") + classify + pynutil.insert(" }")
|
| 223 |
+
token_plus_punct = (
|
| 224 |
+
pynini.closure(punct + pynutil.insert(" ")) + token + pynini.closure(pynutil.insert(" ") + punct)
|
| 225 |
+
)
|
| 226 |
+
|
| 227 |
+
graph = token_plus_punct + pynini.closure(
|
| 228 |
+
(
|
| 229 |
+
pynini.compose(pynini.closure(NEMO_WHITE_SPACE, 1), delete_extra_space)
|
| 230 |
+
| (pynutil.insert(" ") + punct + pynutil.insert(" "))
|
| 231 |
+
)
|
| 232 |
+
+ token_plus_punct
|
| 233 |
+
)
|
| 234 |
+
|
| 235 |
+
graph = delete_space + graph + delete_space
|
| 236 |
+
graph |= punct
|
| 237 |
+
|
| 238 |
+
self.fst = graph.optimize()
|
| 239 |
+
|
| 240 |
+
if far_file:
|
| 241 |
+
generator_main(far_file, {"tokenize_and_classify": self.fst})
|
vendor/zonos3/vendor/nemo_text_processing/text_normalization/en/taggers/tokenize_and_classify_lm.py
ADDED
|
@@ -0,0 +1,227 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Copyright (c) 2021, NVIDIA CORPORATION. All rights reserved.
|
| 2 |
+
#
|
| 3 |
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
| 4 |
+
# you may not use this file except in compliance with the License.
|
| 5 |
+
# You may obtain a copy of the License at
|
| 6 |
+
#
|
| 7 |
+
# http://www.apache.org/licenses/LICENSE-2.0
|
| 8 |
+
#
|
| 9 |
+
# Unless required by applicable law or agreed to in writing, software
|
| 10 |
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
| 11 |
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 12 |
+
# See the License for the specific language governing permissions and
|
| 13 |
+
# limitations under the License.
|
| 14 |
+
|
| 15 |
+
import os
|
| 16 |
+
|
| 17 |
+
import pynini
|
| 18 |
+
from pynini.examples import plurals
|
| 19 |
+
from pynini.lib import pynutil
|
| 20 |
+
|
| 21 |
+
from zonos3.vendor.nemo_text_processing.text_normalization.en.graph_utils import (
|
| 22 |
+
NEMO_CHAR,
|
| 23 |
+
NEMO_DIGIT,
|
| 24 |
+
NEMO_NOT_SPACE,
|
| 25 |
+
NEMO_SIGMA,
|
| 26 |
+
NEMO_WHITE_SPACE,
|
| 27 |
+
GraphFst,
|
| 28 |
+
delete_extra_space,
|
| 29 |
+
delete_space,
|
| 30 |
+
generator_main,
|
| 31 |
+
)
|
| 32 |
+
from zonos3.vendor.nemo_text_processing.text_normalization.en.taggers.cardinal import CardinalFst
|
| 33 |
+
from zonos3.vendor.nemo_text_processing.text_normalization.en.taggers.date import DateFst
|
| 34 |
+
from zonos3.vendor.nemo_text_processing.text_normalization.en.taggers.decimal import DecimalFst
|
| 35 |
+
from zonos3.vendor.nemo_text_processing.text_normalization.en.taggers.electronic import ElectronicFst
|
| 36 |
+
from zonos3.vendor.nemo_text_processing.text_normalization.en.taggers.fraction import FractionFst
|
| 37 |
+
from zonos3.vendor.nemo_text_processing.text_normalization.en.taggers.measure import MeasureFst
|
| 38 |
+
from zonos3.vendor.nemo_text_processing.text_normalization.en.taggers.money import MoneyFst
|
| 39 |
+
from zonos3.vendor.nemo_text_processing.text_normalization.en.taggers.ordinal import OrdinalFst
|
| 40 |
+
from zonos3.vendor.nemo_text_processing.text_normalization.en.taggers.punctuation import PunctuationFst
|
| 41 |
+
from zonos3.vendor.nemo_text_processing.text_normalization.en.taggers.range import RangeFst as RangeFst
|
| 42 |
+
from zonos3.vendor.nemo_text_processing.text_normalization.en.taggers.roman import RomanFst
|
| 43 |
+
from zonos3.vendor.nemo_text_processing.text_normalization.en.taggers.serial import SerialFst
|
| 44 |
+
from zonos3.vendor.nemo_text_processing.text_normalization.en.taggers.telephone import TelephoneFst
|
| 45 |
+
from zonos3.vendor.nemo_text_processing.text_normalization.en.taggers.time import TimeFst
|
| 46 |
+
from zonos3.vendor.nemo_text_processing.text_normalization.en.taggers.whitelist import WhiteListFst
|
| 47 |
+
from zonos3.vendor.nemo_text_processing.text_normalization.en.taggers.word import WordFst
|
| 48 |
+
from zonos3.vendor.nemo_text_processing.text_normalization.en.verbalizers.cardinal import CardinalFst as vCardinal
|
| 49 |
+
from zonos3.vendor.nemo_text_processing.text_normalization.en.verbalizers.date import DateFst as vDate
|
| 50 |
+
from zonos3.vendor.nemo_text_processing.text_normalization.en.verbalizers.decimal import DecimalFst as vDecimal
|
| 51 |
+
from zonos3.vendor.nemo_text_processing.text_normalization.en.verbalizers.electronic import ElectronicFst as vElectronic
|
| 52 |
+
from zonos3.vendor.nemo_text_processing.text_normalization.en.verbalizers.fraction import FractionFst as vFraction
|
| 53 |
+
from zonos3.vendor.nemo_text_processing.text_normalization.en.verbalizers.measure import MeasureFst as vMeasure
|
| 54 |
+
from zonos3.vendor.nemo_text_processing.text_normalization.en.verbalizers.money import MoneyFst as vMoney
|
| 55 |
+
from zonos3.vendor.nemo_text_processing.text_normalization.en.verbalizers.ordinal import OrdinalFst as vOrdinal
|
| 56 |
+
from zonos3.vendor.nemo_text_processing.text_normalization.en.verbalizers.roman import RomanFst as vRoman
|
| 57 |
+
from zonos3.vendor.nemo_text_processing.text_normalization.en.verbalizers.telephone import TelephoneFst as vTelephone
|
| 58 |
+
from zonos3.vendor.nemo_text_processing.text_normalization.en.verbalizers.time import TimeFst as vTime
|
| 59 |
+
from zonos3.vendor.nemo_text_processing.text_normalization.en.verbalizers.word import WordFst as vWord
|
| 60 |
+
from zonos3.vendor.nemo_text_processing.utils.logging import logger
|
| 61 |
+
|
| 62 |
+
|
| 63 |
+
class ClassifyFst(GraphFst):
|
| 64 |
+
"""
|
| 65 |
+
Final class that composes all other classification grammars. This class can process an entire sentence including punctuation.
|
| 66 |
+
For deployment, this grammar will be compiled and exported to OpenFst Finite State Archive (FAR) File.
|
| 67 |
+
More details to deployment at NeMo/tools/text_processing_deployment.
|
| 68 |
+
|
| 69 |
+
Args:
|
| 70 |
+
input_case: accepting either "lower_cased" or "cased" input.
|
| 71 |
+
deterministic: if True will provide a single transduction option,
|
| 72 |
+
for False multiple options (used for audio-based normalization)
|
| 73 |
+
cache_dir: path to a dir with .far grammar file. Set to None to avoid using cache.
|
| 74 |
+
overwrite_cache: set to True to overwrite .far files
|
| 75 |
+
whitelist: path to a file with whitelist replacements
|
| 76 |
+
"""
|
| 77 |
+
|
| 78 |
+
def __init__(
|
| 79 |
+
self,
|
| 80 |
+
input_case: str,
|
| 81 |
+
deterministic: bool = True,
|
| 82 |
+
cache_dir: str = None,
|
| 83 |
+
overwrite_cache: bool = True,
|
| 84 |
+
whitelist: str = None,
|
| 85 |
+
):
|
| 86 |
+
super().__init__(name="tokenize_and_classify", kind="classify", deterministic=deterministic)
|
| 87 |
+
|
| 88 |
+
far_file = None
|
| 89 |
+
if cache_dir is not None and cache_dir != 'None':
|
| 90 |
+
os.makedirs(cache_dir, exist_ok=True)
|
| 91 |
+
whitelist_file = os.path.basename(whitelist) if whitelist else ""
|
| 92 |
+
far_file = os.path.join(
|
| 93 |
+
cache_dir, f"_{input_case}_en_tn_{deterministic}_deterministic{whitelist_file}_lm.far"
|
| 94 |
+
)
|
| 95 |
+
if not overwrite_cache and far_file and os.path.exists(far_file):
|
| 96 |
+
self.fst = pynini.Far(far_file, mode='r')['tokenize_and_classify']
|
| 97 |
+
no_digits = pynini.closure(pynini.difference(NEMO_CHAR, NEMO_DIGIT))
|
| 98 |
+
self.fst_no_digits = pynini.compose(self.fst, no_digits).optimize()
|
| 99 |
+
logger.info(f'ClassifyFst.fst was restored from {far_file}.')
|
| 100 |
+
else:
|
| 101 |
+
logger.info(f'Creating ClassifyFst grammars. This might take some time...')
|
| 102 |
+
# TAGGERS
|
| 103 |
+
cardinal = CardinalFst(deterministic=True, lm=True)
|
| 104 |
+
cardinal_tagger = cardinal
|
| 105 |
+
cardinal_graph = cardinal.fst
|
| 106 |
+
|
| 107 |
+
ordinal = OrdinalFst(cardinal=cardinal, deterministic=True)
|
| 108 |
+
ordinal_graph = ordinal.fst
|
| 109 |
+
|
| 110 |
+
decimal = DecimalFst(cardinal=cardinal, deterministic=True)
|
| 111 |
+
decimal_graph = decimal.fst
|
| 112 |
+
fraction = FractionFst(deterministic=True, cardinal=cardinal)
|
| 113 |
+
fraction_graph = fraction.fst
|
| 114 |
+
|
| 115 |
+
measure = MeasureFst(cardinal=cardinal, decimal=decimal, fraction=fraction, deterministic=True)
|
| 116 |
+
measure_graph = measure.fst
|
| 117 |
+
date = DateFst(cardinal=cardinal, deterministic=True, lm=True)
|
| 118 |
+
date_graph = date.fst
|
| 119 |
+
punctuation = PunctuationFst(deterministic=True)
|
| 120 |
+
punct_graph = punctuation.graph
|
| 121 |
+
word_graph = WordFst(punctuation=punctuation, deterministic=deterministic).graph
|
| 122 |
+
time_graph = TimeFst(cardinal=cardinal, deterministic=True).fst
|
| 123 |
+
telephone_graph = TelephoneFst(deterministic=True).fst
|
| 124 |
+
electronic_graph = ElectronicFst(cardinal=cardinal, deterministic=True).fst
|
| 125 |
+
money_graph = MoneyFst(cardinal=cardinal, decimal=decimal, deterministic=False).fst
|
| 126 |
+
whitelist = WhiteListFst(input_case=input_case, deterministic=False, input_file=whitelist)
|
| 127 |
+
whitelist_graph = whitelist.graph
|
| 128 |
+
serial_graph = SerialFst(cardinal=cardinal, ordinal=ordinal, deterministic=deterministic, lm=True).fst
|
| 129 |
+
|
| 130 |
+
# VERBALIZERS
|
| 131 |
+
cardinal = vCardinal(deterministic=True)
|
| 132 |
+
v_cardinal_graph = cardinal.fst
|
| 133 |
+
decimal = vDecimal(cardinal=cardinal, deterministic=True)
|
| 134 |
+
v_decimal_graph = decimal.fst
|
| 135 |
+
ordinal = vOrdinal(deterministic=True)
|
| 136 |
+
v_ordinal_graph = ordinal.fst
|
| 137 |
+
fraction = vFraction(deterministic=True, lm=True)
|
| 138 |
+
v_fraction_graph = fraction.fst
|
| 139 |
+
v_telephone_graph = vTelephone(deterministic=True).fst
|
| 140 |
+
v_electronic_graph = vElectronic(deterministic=True).fst
|
| 141 |
+
measure = vMeasure(decimal=decimal, cardinal=cardinal, fraction=fraction, deterministic=False)
|
| 142 |
+
v_measure_graph = measure.fst
|
| 143 |
+
v_time_graph = vTime(deterministic=True).fst
|
| 144 |
+
v_date_graph = vDate(ordinal=ordinal, deterministic=deterministic, lm=True).fst
|
| 145 |
+
v_money_graph = vMoney(decimal=decimal, deterministic=deterministic).fst
|
| 146 |
+
v_roman_graph = vRoman(deterministic=deterministic).fst
|
| 147 |
+
v_word_graph = vWord(deterministic=deterministic).fst
|
| 148 |
+
|
| 149 |
+
cardinal_or_date_final = plurals._priority_union(date_graph, cardinal_graph, NEMO_SIGMA)
|
| 150 |
+
cardinal_or_date_final = pynini.compose(cardinal_or_date_final, (v_cardinal_graph | v_date_graph))
|
| 151 |
+
|
| 152 |
+
time_final = pynini.compose(time_graph, v_time_graph)
|
| 153 |
+
ordinal_final = pynini.compose(ordinal_graph, v_ordinal_graph)
|
| 154 |
+
sem_w = 1
|
| 155 |
+
word_w = 100
|
| 156 |
+
punct_w = 2
|
| 157 |
+
classify_and_verbalize = (
|
| 158 |
+
pynutil.add_weight(time_final, sem_w)
|
| 159 |
+
| pynutil.add_weight(pynini.compose(decimal_graph, v_decimal_graph), sem_w)
|
| 160 |
+
| pynutil.add_weight(pynini.compose(measure_graph, v_measure_graph), sem_w)
|
| 161 |
+
| pynutil.add_weight(ordinal_final, sem_w)
|
| 162 |
+
| pynutil.add_weight(pynini.compose(telephone_graph, v_telephone_graph), sem_w)
|
| 163 |
+
| pynutil.add_weight(pynini.compose(electronic_graph, v_electronic_graph), sem_w)
|
| 164 |
+
| pynutil.add_weight(pynini.compose(fraction_graph, v_fraction_graph), sem_w)
|
| 165 |
+
| pynutil.add_weight(pynini.compose(money_graph, v_money_graph), sem_w)
|
| 166 |
+
| pynutil.add_weight(cardinal_or_date_final, sem_w)
|
| 167 |
+
| pynutil.add_weight(whitelist_graph, sem_w)
|
| 168 |
+
| pynutil.add_weight(
|
| 169 |
+
pynini.compose(serial_graph, v_word_graph), 1.1001
|
| 170 |
+
) # should be higher than the rest of the classes
|
| 171 |
+
).optimize()
|
| 172 |
+
|
| 173 |
+
roman_graph = RomanFst(deterministic=deterministic, lm=True).fst
|
| 174 |
+
# the weight matches the word_graph weight for "I" cases in long sentences with multiple semiotic tokens
|
| 175 |
+
classify_and_verbalize |= pynutil.add_weight(pynini.compose(roman_graph, v_roman_graph), sem_w)
|
| 176 |
+
|
| 177 |
+
date_final = pynini.compose(date_graph, v_date_graph)
|
| 178 |
+
range_graph = RangeFst(
|
| 179 |
+
time=time_final, cardinal=cardinal_tagger, date=date_final, deterministic=deterministic
|
| 180 |
+
).fst
|
| 181 |
+
classify_and_verbalize |= pynutil.add_weight(pynini.compose(range_graph, v_word_graph), sem_w)
|
| 182 |
+
classify_and_verbalize = pynutil.insert("< ") + classify_and_verbalize + pynutil.insert(" >")
|
| 183 |
+
classify_and_verbalize |= pynutil.add_weight(word_graph, word_w)
|
| 184 |
+
|
| 185 |
+
punct_only = pynutil.add_weight(punct_graph, weight=punct_w)
|
| 186 |
+
punct = pynini.closure(
|
| 187 |
+
pynini.compose(pynini.closure(NEMO_WHITE_SPACE, 1), delete_extra_space)
|
| 188 |
+
| (pynutil.insert(" ") + punct_only),
|
| 189 |
+
1,
|
| 190 |
+
)
|
| 191 |
+
|
| 192 |
+
def get_token_sem_graph(classify_and_verbalize):
|
| 193 |
+
token_plus_punct = (
|
| 194 |
+
pynini.closure(punct + pynutil.insert(" "))
|
| 195 |
+
+ classify_and_verbalize
|
| 196 |
+
+ pynini.closure(pynutil.insert(" ") + punct)
|
| 197 |
+
)
|
| 198 |
+
|
| 199 |
+
graph = token_plus_punct + pynini.closure(
|
| 200 |
+
(
|
| 201 |
+
pynini.compose(pynini.closure(NEMO_WHITE_SPACE, 1), delete_extra_space)
|
| 202 |
+
| (pynutil.insert(" ") + punct + pynutil.insert(" "))
|
| 203 |
+
)
|
| 204 |
+
+ token_plus_punct
|
| 205 |
+
)
|
| 206 |
+
|
| 207 |
+
graph |= punct_only + pynini.closure(punct)
|
| 208 |
+
graph = delete_space + graph + delete_space
|
| 209 |
+
|
| 210 |
+
remove_extra_spaces = pynini.closure(NEMO_NOT_SPACE, 1) + pynini.closure(
|
| 211 |
+
delete_extra_space + pynini.closure(NEMO_NOT_SPACE, 1)
|
| 212 |
+
)
|
| 213 |
+
remove_extra_spaces |= (
|
| 214 |
+
pynini.closure(pynutil.delete(" "), 1)
|
| 215 |
+
+ pynini.closure(NEMO_NOT_SPACE, 1)
|
| 216 |
+
+ pynini.closure(delete_extra_space + pynini.closure(NEMO_NOT_SPACE, 1))
|
| 217 |
+
)
|
| 218 |
+
|
| 219 |
+
graph = pynini.compose(graph.optimize(), remove_extra_spaces).optimize()
|
| 220 |
+
return graph
|
| 221 |
+
|
| 222 |
+
self.fst = get_token_sem_graph(classify_and_verbalize)
|
| 223 |
+
no_digits = pynini.closure(pynini.difference(NEMO_CHAR, NEMO_DIGIT))
|
| 224 |
+
self.fst_no_digits = pynini.compose(self.fst, no_digits).optimize()
|
| 225 |
+
|
| 226 |
+
if far_file:
|
| 227 |
+
generator_main(far_file, {"tokenize_and_classify": self.fst})
|
vendor/zonos3/vendor/nemo_text_processing/text_normalization/en/taggers/tokenize_and_classify_with_audio.py
ADDED
|
@@ -0,0 +1,229 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Copyright (c) 2021, NVIDIA CORPORATION. All rights reserved.
|
| 2 |
+
#
|
| 3 |
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
| 4 |
+
# you may not use this file except in compliance with the License.
|
| 5 |
+
# You may obtain a copy of the License at
|
| 6 |
+
#
|
| 7 |
+
# http://www.apache.org/licenses/LICENSE-2.0
|
| 8 |
+
#
|
| 9 |
+
# Unless required by applicable law or agreed to in writing, software
|
| 10 |
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
| 11 |
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 12 |
+
# See the License for the specific language governing permissions and
|
| 13 |
+
# limitations under the License.
|
| 14 |
+
|
| 15 |
+
import os
|
| 16 |
+
|
| 17 |
+
import pynini
|
| 18 |
+
from pynini.lib import pynutil
|
| 19 |
+
|
| 20 |
+
from zonos3.vendor.nemo_text_processing.text_normalization.en.graph_utils import (
|
| 21 |
+
NEMO_CHAR,
|
| 22 |
+
NEMO_DIGIT,
|
| 23 |
+
NEMO_NOT_SPACE,
|
| 24 |
+
NEMO_WHITE_SPACE,
|
| 25 |
+
GraphFst,
|
| 26 |
+
delete_extra_space,
|
| 27 |
+
delete_space,
|
| 28 |
+
generator_main,
|
| 29 |
+
)
|
| 30 |
+
from zonos3.vendor.nemo_text_processing.text_normalization.en.taggers.abbreviation import AbbreviationFst
|
| 31 |
+
from zonos3.vendor.nemo_text_processing.text_normalization.en.taggers.cardinal import CardinalFst
|
| 32 |
+
from zonos3.vendor.nemo_text_processing.text_normalization.en.taggers.date import DateFst
|
| 33 |
+
from zonos3.vendor.nemo_text_processing.text_normalization.en.taggers.decimal import DecimalFst
|
| 34 |
+
from zonos3.vendor.nemo_text_processing.text_normalization.en.taggers.electronic import ElectronicFst
|
| 35 |
+
from zonos3.vendor.nemo_text_processing.text_normalization.en.taggers.fraction import FractionFst
|
| 36 |
+
from zonos3.vendor.nemo_text_processing.text_normalization.en.taggers.measure import MeasureFst
|
| 37 |
+
from zonos3.vendor.nemo_text_processing.text_normalization.en.taggers.money import MoneyFst
|
| 38 |
+
from zonos3.vendor.nemo_text_processing.text_normalization.en.taggers.ordinal import OrdinalFst
|
| 39 |
+
from zonos3.vendor.nemo_text_processing.text_normalization.en.taggers.punctuation import PunctuationFst
|
| 40 |
+
from zonos3.vendor.nemo_text_processing.text_normalization.en.taggers.range import RangeFst as RangeFst
|
| 41 |
+
from zonos3.vendor.nemo_text_processing.text_normalization.en.taggers.roman import RomanFst
|
| 42 |
+
from zonos3.vendor.nemo_text_processing.text_normalization.en.taggers.serial import SerialFst
|
| 43 |
+
from zonos3.vendor.nemo_text_processing.text_normalization.en.taggers.telephone import TelephoneFst
|
| 44 |
+
from zonos3.vendor.nemo_text_processing.text_normalization.en.taggers.time import TimeFst
|
| 45 |
+
from zonos3.vendor.nemo_text_processing.text_normalization.en.taggers.whitelist import WhiteListFst
|
| 46 |
+
from zonos3.vendor.nemo_text_processing.text_normalization.en.taggers.word import WordFst
|
| 47 |
+
from zonos3.vendor.nemo_text_processing.text_normalization.en.verbalizers.abbreviation import AbbreviationFst as vAbbreviation
|
| 48 |
+
from zonos3.vendor.nemo_text_processing.text_normalization.en.verbalizers.cardinal import CardinalFst as vCardinal
|
| 49 |
+
from zonos3.vendor.nemo_text_processing.text_normalization.en.verbalizers.date import DateFst as vDate
|
| 50 |
+
from zonos3.vendor.nemo_text_processing.text_normalization.en.verbalizers.decimal import DecimalFst as vDecimal
|
| 51 |
+
from zonos3.vendor.nemo_text_processing.text_normalization.en.verbalizers.electronic import ElectronicFst as vElectronic
|
| 52 |
+
from zonos3.vendor.nemo_text_processing.text_normalization.en.verbalizers.fraction import FractionFst as vFraction
|
| 53 |
+
from zonos3.vendor.nemo_text_processing.text_normalization.en.verbalizers.measure import MeasureFst as vMeasure
|
| 54 |
+
from zonos3.vendor.nemo_text_processing.text_normalization.en.verbalizers.money import MoneyFst as vMoney
|
| 55 |
+
from zonos3.vendor.nemo_text_processing.text_normalization.en.verbalizers.ordinal import OrdinalFst as vOrdinal
|
| 56 |
+
from zonos3.vendor.nemo_text_processing.text_normalization.en.verbalizers.roman import RomanFst as vRoman
|
| 57 |
+
from zonos3.vendor.nemo_text_processing.text_normalization.en.verbalizers.telephone import TelephoneFst as vTelephone
|
| 58 |
+
from zonos3.vendor.nemo_text_processing.text_normalization.en.verbalizers.time import TimeFst as vTime
|
| 59 |
+
from zonos3.vendor.nemo_text_processing.text_normalization.en.verbalizers.word import WordFst as vWord
|
| 60 |
+
from zonos3.vendor.nemo_text_processing.utils.logging import logger
|
| 61 |
+
|
| 62 |
+
|
| 63 |
+
class ClassifyFst(GraphFst):
|
| 64 |
+
"""
|
| 65 |
+
Final class that composes all other classification grammars. This class can process an entire sentence including punctuation.
|
| 66 |
+
For deployment, this grammar will be compiled and exported to OpenFst Finite State Archive (FAR) File.
|
| 67 |
+
More details to deployment at NeMo/tools/text_processing_deployment.
|
| 68 |
+
|
| 69 |
+
Args:
|
| 70 |
+
input_case: accepting either "lower_cased" or "cased" input.
|
| 71 |
+
deterministic: if True will provide a single transduction option,
|
| 72 |
+
for False multiple options (used for audio-based normalization)
|
| 73 |
+
cache_dir: path to a dir with .far grammar file. Set to None to avoid using cache.
|
| 74 |
+
overwrite_cache: set to True to overwrite .far files
|
| 75 |
+
whitelist: path to a file with whitelist replacements
|
| 76 |
+
"""
|
| 77 |
+
|
| 78 |
+
def __init__(
|
| 79 |
+
self,
|
| 80 |
+
input_case: str,
|
| 81 |
+
deterministic: bool = True,
|
| 82 |
+
cache_dir: str = None,
|
| 83 |
+
overwrite_cache: bool = True,
|
| 84 |
+
whitelist: str = None,
|
| 85 |
+
):
|
| 86 |
+
super().__init__(name="tokenize_and_classify", kind="classify", deterministic=deterministic)
|
| 87 |
+
|
| 88 |
+
far_file = None
|
| 89 |
+
if cache_dir is not None and cache_dir != 'None':
|
| 90 |
+
os.makedirs(cache_dir, exist_ok=True)
|
| 91 |
+
whitelist_file = os.path.basename(whitelist) if whitelist else ""
|
| 92 |
+
far_file = os.path.join(
|
| 93 |
+
cache_dir, f"_{input_case}_en_tn_{deterministic}_deterministic{whitelist_file}.far"
|
| 94 |
+
)
|
| 95 |
+
if not overwrite_cache and far_file and os.path.exists(far_file):
|
| 96 |
+
self.fst = pynini.Far(far_file, mode='r')['tokenize_and_classify']
|
| 97 |
+
logger.info(f'ClassifyFst.fst was restored from {far_file}.')
|
| 98 |
+
else:
|
| 99 |
+
logger.info(f'Creating ClassifyFst grammars. This might take some time...')
|
| 100 |
+
# TAGGERS
|
| 101 |
+
cardinal = CardinalFst(deterministic=deterministic)
|
| 102 |
+
cardinal_graph = cardinal.fst
|
| 103 |
+
|
| 104 |
+
ordinal = OrdinalFst(cardinal=cardinal, deterministic=deterministic)
|
| 105 |
+
deterministic_ordinal = OrdinalFst(cardinal=cardinal, deterministic=True)
|
| 106 |
+
ordinal_graph = ordinal.fst
|
| 107 |
+
|
| 108 |
+
decimal = DecimalFst(cardinal=cardinal, deterministic=deterministic)
|
| 109 |
+
decimal_graph = decimal.fst
|
| 110 |
+
fraction = FractionFst(deterministic=deterministic, cardinal=cardinal)
|
| 111 |
+
fraction_graph = fraction.fst
|
| 112 |
+
|
| 113 |
+
measure = MeasureFst(cardinal=cardinal, decimal=decimal, fraction=fraction, deterministic=deterministic)
|
| 114 |
+
measure_graph = measure.fst
|
| 115 |
+
date_graph = DateFst(cardinal=cardinal, deterministic=deterministic).fst
|
| 116 |
+
punctuation = PunctuationFst(deterministic=True)
|
| 117 |
+
punct_graph = punctuation.graph
|
| 118 |
+
word_graph = WordFst(punctuation=punctuation, deterministic=deterministic).graph
|
| 119 |
+
time_graph = TimeFst(cardinal=cardinal, deterministic=deterministic).fst
|
| 120 |
+
telephone_graph = TelephoneFst(deterministic=deterministic).fst
|
| 121 |
+
electronic_graph = ElectronicFst(cardinal=cardinal, deterministic=deterministic).fst
|
| 122 |
+
money_graph = MoneyFst(cardinal=cardinal, decimal=decimal, deterministic=deterministic).fst
|
| 123 |
+
whitelist = WhiteListFst(input_case=input_case, deterministic=deterministic, input_file=whitelist)
|
| 124 |
+
whitelist_graph = whitelist.graph
|
| 125 |
+
serial_graph = SerialFst(cardinal=cardinal, ordinal=deterministic_ordinal, deterministic=deterministic).fst
|
| 126 |
+
|
| 127 |
+
# VERBALIZERS
|
| 128 |
+
cardinal = vCardinal(deterministic=deterministic)
|
| 129 |
+
v_cardinal_graph = cardinal.fst
|
| 130 |
+
decimal = vDecimal(cardinal=cardinal, deterministic=deterministic)
|
| 131 |
+
v_decimal_graph = decimal.fst
|
| 132 |
+
ordinal = vOrdinal(deterministic=deterministic)
|
| 133 |
+
v_ordinal_graph = ordinal.fst
|
| 134 |
+
fraction = vFraction(deterministic=deterministic)
|
| 135 |
+
v_fraction_graph = fraction.fst
|
| 136 |
+
v_telephone_graph = vTelephone(deterministic=deterministic).fst
|
| 137 |
+
v_electronic_graph = vElectronic(deterministic=deterministic).fst
|
| 138 |
+
measure = vMeasure(decimal=decimal, cardinal=cardinal, fraction=fraction, deterministic=deterministic)
|
| 139 |
+
v_measure_graph = measure.fst
|
| 140 |
+
v_time_graph = vTime(deterministic=deterministic).fst
|
| 141 |
+
v_date_graph = vDate(ordinal=ordinal, deterministic=deterministic).fst
|
| 142 |
+
v_money_graph = vMoney(decimal=decimal, deterministic=deterministic).fst
|
| 143 |
+
v_roman_graph = vRoman(deterministic=deterministic).fst
|
| 144 |
+
v_abbreviation = vAbbreviation(deterministic=deterministic).fst
|
| 145 |
+
|
| 146 |
+
det_v_time_graph = vTime(deterministic=True).fst
|
| 147 |
+
det_v_date_graph = vDate(ordinal=vOrdinal(deterministic=True), deterministic=True).fst
|
| 148 |
+
time_final = pynini.compose(time_graph, det_v_time_graph)
|
| 149 |
+
date_final = pynini.compose(date_graph, det_v_date_graph)
|
| 150 |
+
range_graph = RangeFst(
|
| 151 |
+
time=time_final, date=date_final, cardinal=CardinalFst(deterministic=True), deterministic=deterministic
|
| 152 |
+
).fst
|
| 153 |
+
v_word_graph = vWord(deterministic=deterministic).fst
|
| 154 |
+
|
| 155 |
+
sem_w = 1
|
| 156 |
+
word_w = 100
|
| 157 |
+
punct_w = 2
|
| 158 |
+
classify_and_verbalize = (
|
| 159 |
+
pynutil.add_weight(whitelist_graph, sem_w)
|
| 160 |
+
| pynutil.add_weight(pynini.compose(time_graph, v_time_graph), sem_w)
|
| 161 |
+
| pynutil.add_weight(pynini.compose(decimal_graph, v_decimal_graph), sem_w)
|
| 162 |
+
| pynutil.add_weight(pynini.compose(measure_graph, v_measure_graph), sem_w)
|
| 163 |
+
| pynutil.add_weight(pynini.compose(cardinal_graph, v_cardinal_graph), sem_w)
|
| 164 |
+
| pynutil.add_weight(pynini.compose(ordinal_graph, v_ordinal_graph), sem_w)
|
| 165 |
+
| pynutil.add_weight(pynini.compose(telephone_graph, v_telephone_graph), sem_w)
|
| 166 |
+
| pynutil.add_weight(pynini.compose(electronic_graph, v_electronic_graph), sem_w)
|
| 167 |
+
| pynutil.add_weight(pynini.compose(fraction_graph, v_fraction_graph), sem_w)
|
| 168 |
+
| pynutil.add_weight(pynini.compose(money_graph, v_money_graph), sem_w)
|
| 169 |
+
| pynutil.add_weight(word_graph, word_w)
|
| 170 |
+
| pynutil.add_weight(pynini.compose(date_graph, v_date_graph), sem_w - 0.01)
|
| 171 |
+
| pynutil.add_weight(pynini.compose(range_graph, v_word_graph), sem_w)
|
| 172 |
+
| pynutil.add_weight(
|
| 173 |
+
pynini.compose(serial_graph, v_word_graph), 1.1001
|
| 174 |
+
) # should be higher than the rest of the classes
|
| 175 |
+
).optimize()
|
| 176 |
+
|
| 177 |
+
if not deterministic:
|
| 178 |
+
roman_graph = RomanFst(deterministic=deterministic).fst
|
| 179 |
+
# the weight matches the word_graph weight for "I" cases in long sentences with multiple semiotic tokens
|
| 180 |
+
classify_and_verbalize |= pynutil.add_weight(pynini.compose(roman_graph, v_roman_graph), word_w)
|
| 181 |
+
|
| 182 |
+
abbreviation_graph = AbbreviationFst(whitelist=whitelist, deterministic=deterministic).fst
|
| 183 |
+
classify_and_verbalize |= pynutil.add_weight(
|
| 184 |
+
pynini.compose(abbreviation_graph, v_abbreviation), word_w
|
| 185 |
+
)
|
| 186 |
+
|
| 187 |
+
punct_only = pynutil.add_weight(punct_graph, weight=punct_w)
|
| 188 |
+
punct = pynini.closure(
|
| 189 |
+
pynini.compose(pynini.closure(NEMO_WHITE_SPACE, 1), delete_extra_space)
|
| 190 |
+
| (pynutil.insert(" ") + punct_only),
|
| 191 |
+
1,
|
| 192 |
+
)
|
| 193 |
+
|
| 194 |
+
token_plus_punct = (
|
| 195 |
+
pynini.closure(punct + pynutil.insert(" "))
|
| 196 |
+
+ classify_and_verbalize
|
| 197 |
+
+ pynini.closure(pynutil.insert(" ") + punct)
|
| 198 |
+
)
|
| 199 |
+
|
| 200 |
+
graph = token_plus_punct + pynini.closure(
|
| 201 |
+
(
|
| 202 |
+
pynini.compose(pynini.closure(NEMO_WHITE_SPACE, 1), delete_extra_space)
|
| 203 |
+
| (pynutil.insert(" ") + punct + pynutil.insert(" "))
|
| 204 |
+
)
|
| 205 |
+
+ token_plus_punct
|
| 206 |
+
)
|
| 207 |
+
|
| 208 |
+
graph |= punct_only + pynini.closure(punct)
|
| 209 |
+
graph = delete_space + graph + delete_space
|
| 210 |
+
|
| 211 |
+
remove_extra_spaces = pynini.closure(NEMO_NOT_SPACE, 1) + pynini.closure(
|
| 212 |
+
delete_extra_space + pynini.closure(NEMO_NOT_SPACE, 1)
|
| 213 |
+
)
|
| 214 |
+
remove_extra_spaces |= (
|
| 215 |
+
pynini.closure(pynutil.delete(" "), 1)
|
| 216 |
+
+ pynini.closure(NEMO_NOT_SPACE, 1)
|
| 217 |
+
+ pynini.closure(delete_extra_space + pynini.closure(NEMO_NOT_SPACE, 1))
|
| 218 |
+
)
|
| 219 |
+
|
| 220 |
+
graph = pynini.compose(graph.optimize(), remove_extra_spaces).optimize()
|
| 221 |
+
self.fst = graph
|
| 222 |
+
|
| 223 |
+
if far_file:
|
| 224 |
+
generator_main(far_file, {"tokenize_and_classify": self.fst})
|
| 225 |
+
|
| 226 |
+
# to remove normalization options that still contain digits and some special symbols
|
| 227 |
+
# e.g., "P&E" -> {P and E, P&E}, "P & E" will be removed from the list of normalization options
|
| 228 |
+
no_digits = pynini.closure(pynini.difference(NEMO_CHAR, pynini.union(NEMO_DIGIT, "&")))
|
| 229 |
+
self.fst_no_digits = pynini.compose(self.fst, no_digits).optimize()
|
vendor/zonos3/vendor/nemo_text_processing/text_normalization/en/taggers/whitelist.py
ADDED
|
@@ -0,0 +1,153 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Copyright (c) 2021, NVIDIA CORPORATION. All rights reserved.
|
| 2 |
+
#
|
| 3 |
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
| 4 |
+
# you may not use this file except in compliance with the License.
|
| 5 |
+
# You may obtain a copy of the License at
|
| 6 |
+
#
|
| 7 |
+
# http://www.apache.org/licenses/LICENSE-2.0
|
| 8 |
+
#
|
| 9 |
+
# Unless required by applicable law or agreed to in writing, software
|
| 10 |
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
| 11 |
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 12 |
+
# See the License for the specific language governing permissions and
|
| 13 |
+
# limitations under the License.
|
| 14 |
+
|
| 15 |
+
import pynini
|
| 16 |
+
from pynini.lib import pynutil
|
| 17 |
+
|
| 18 |
+
from zonos3.vendor.nemo_text_processing.text_normalization.en.graph_utils import (
|
| 19 |
+
INPUT_CASED,
|
| 20 |
+
INPUT_LOWER_CASED,
|
| 21 |
+
NEMO_CHAR,
|
| 22 |
+
NEMO_NOT_SPACE,
|
| 23 |
+
NEMO_SIGMA,
|
| 24 |
+
NEMO_UPPER,
|
| 25 |
+
SINGULAR_TO_PLURAL,
|
| 26 |
+
GraphFst,
|
| 27 |
+
convert_space,
|
| 28 |
+
)
|
| 29 |
+
from zonos3.vendor.nemo_text_processing.text_normalization.en.taggers.roman import get_names
|
| 30 |
+
from zonos3.vendor.nemo_text_processing.text_normalization.en.utils import (
|
| 31 |
+
augment_labels_with_punct_at_end,
|
| 32 |
+
get_abs_path,
|
| 33 |
+
load_labels,
|
| 34 |
+
)
|
| 35 |
+
|
| 36 |
+
|
| 37 |
+
class WhiteListFst(GraphFst):
|
| 38 |
+
"""
|
| 39 |
+
Finite state transducer for classifying whitelist, e.g.
|
| 40 |
+
misses -> tokens { name: "mrs" }
|
| 41 |
+
for non-deterministic case: "Dr. Abc" ->
|
| 42 |
+
tokens { name: "drive" } tokens { name: "Abc" }
|
| 43 |
+
tokens { name: "doctor" } tokens { name: "Abc" }
|
| 44 |
+
tokens { name: "Dr." } tokens { name: "Abc" }
|
| 45 |
+
This class has highest priority among all classifier grammars. Whitelisted tokens are defined and loaded from "data/whitelist.tsv".
|
| 46 |
+
|
| 47 |
+
Args:
|
| 48 |
+
input_case: accepting either "lower_cased" or "cased" input.
|
| 49 |
+
deterministic: if True will provide a single transduction option,
|
| 50 |
+
for False multiple options (used for audio-based normalization)
|
| 51 |
+
input_file: path to a file with whitelist replacements
|
| 52 |
+
"""
|
| 53 |
+
|
| 54 |
+
def __init__(self, input_case: str, deterministic: bool = True, input_file: str = None):
|
| 55 |
+
super().__init__(name="whitelist", kind="classify", deterministic=deterministic)
|
| 56 |
+
|
| 57 |
+
def _get_whitelist_graph(input_case, file, keep_punct_add_end: bool = False):
|
| 58 |
+
whitelist = load_labels(file)
|
| 59 |
+
if input_case == INPUT_LOWER_CASED:
|
| 60 |
+
whitelist = [[x.lower(), y] for x, y in whitelist]
|
| 61 |
+
else:
|
| 62 |
+
whitelist = [[x, y] for x, y in whitelist]
|
| 63 |
+
|
| 64 |
+
if keep_punct_add_end:
|
| 65 |
+
whitelist.extend(augment_labels_with_punct_at_end(whitelist))
|
| 66 |
+
|
| 67 |
+
graph = pynini.string_map(whitelist)
|
| 68 |
+
return graph
|
| 69 |
+
|
| 70 |
+
graph = _get_whitelist_graph(input_case, get_abs_path("data/whitelist/tts.tsv"))
|
| 71 |
+
graph |= pynini.compose(
|
| 72 |
+
pynini.difference(NEMO_SIGMA, pynini.accep("/")).optimize(),
|
| 73 |
+
_get_whitelist_graph(input_case, get_abs_path("data/whitelist/symbol.tsv")),
|
| 74 |
+
).optimize()
|
| 75 |
+
|
| 76 |
+
if deterministic:
|
| 77 |
+
names = get_names()
|
| 78 |
+
graph |= (
|
| 79 |
+
pynini.cross(pynini.union("st", "St", "ST"), "Saint")
|
| 80 |
+
+ pynini.closure(pynutil.delete("."))
|
| 81 |
+
+ pynini.accep(" ")
|
| 82 |
+
+ names
|
| 83 |
+
)
|
| 84 |
+
else:
|
| 85 |
+
graph |= _get_whitelist_graph(
|
| 86 |
+
input_case, get_abs_path("data/whitelist/alternatives.tsv"), keep_punct_add_end=True
|
| 87 |
+
)
|
| 88 |
+
|
| 89 |
+
for x in [".", ". "]:
|
| 90 |
+
graph |= (
|
| 91 |
+
NEMO_UPPER
|
| 92 |
+
+ pynini.closure(pynutil.delete(x) + NEMO_UPPER, 2)
|
| 93 |
+
+ pynini.closure(pynutil.delete("."), 0, 1)
|
| 94 |
+
)
|
| 95 |
+
|
| 96 |
+
if not deterministic:
|
| 97 |
+
multiple_forms_whitelist_graph = get_formats(get_abs_path("data/whitelist/alternatives_all_format.tsv"))
|
| 98 |
+
graph |= multiple_forms_whitelist_graph
|
| 99 |
+
|
| 100 |
+
graph_unit = pynini.string_file(get_abs_path("data/measure/unit.tsv")) | pynini.string_file(
|
| 101 |
+
get_abs_path("data/measure/unit_alternatives.tsv")
|
| 102 |
+
)
|
| 103 |
+
graph_unit_plural = graph_unit @ SINGULAR_TO_PLURAL
|
| 104 |
+
units_graph = pynini.compose(NEMO_CHAR ** (3, ...), convert_space(graph_unit | graph_unit_plural))
|
| 105 |
+
graph |= units_graph
|
| 106 |
+
|
| 107 |
+
# convert to states only if comma is present before the abbreviation to avoid converting all caps words,
|
| 108 |
+
# e.g. "IN", "OH", "OK"
|
| 109 |
+
# TODO or only exclude above?
|
| 110 |
+
states = load_labels(get_abs_path("data/address/state.tsv"))
|
| 111 |
+
additional_options = []
|
| 112 |
+
for x, y in states:
|
| 113 |
+
if input_case == INPUT_LOWER_CASED:
|
| 114 |
+
x = x.lower()
|
| 115 |
+
additional_options.append((x, f"{y[0]}.{y[1:]}"))
|
| 116 |
+
if not deterministic:
|
| 117 |
+
additional_options.append((x, f"{y[0]}.{y[1:]}."))
|
| 118 |
+
|
| 119 |
+
states.extend(additional_options)
|
| 120 |
+
state_graph = pynini.string_map(states)
|
| 121 |
+
graph |= pynini.closure(NEMO_NOT_SPACE, 1) + pynini.union(", ", ",") + pynini.invert(state_graph).optimize()
|
| 122 |
+
|
| 123 |
+
if input_file:
|
| 124 |
+
whitelist_provided = _get_whitelist_graph(input_case, input_file)
|
| 125 |
+
if not deterministic:
|
| 126 |
+
graph |= whitelist_provided
|
| 127 |
+
else:
|
| 128 |
+
graph = whitelist_provided
|
| 129 |
+
|
| 130 |
+
self.graph = (convert_space(graph)).optimize()
|
| 131 |
+
|
| 132 |
+
self.fst = (pynutil.insert("name: \"") + self.graph + pynutil.insert("\"")).optimize()
|
| 133 |
+
|
| 134 |
+
|
| 135 |
+
def get_formats(input_f, input_case=INPUT_CASED, is_default=True):
|
| 136 |
+
"""
|
| 137 |
+
Adds various abbreviation format options to the list of acceptable input forms
|
| 138 |
+
"""
|
| 139 |
+
multiple_formats = load_labels(input_f)
|
| 140 |
+
additional_options = []
|
| 141 |
+
for x, y in multiple_formats:
|
| 142 |
+
if input_case == INPUT_LOWER_CASED:
|
| 143 |
+
x = x.lower()
|
| 144 |
+
additional_options.append((f"{x}.", y)) # default "dr" -> doctor, this includes period "dr." -> doctor
|
| 145 |
+
additional_options.append((f"{x[0].upper() + x[1:]}", f"{y[0].upper() + y[1:]}")) # "Dr" -> Doctor
|
| 146 |
+
additional_options.append((f"{x[0].upper() + x[1:]}.", f"{y[0].upper() + y[1:]}")) # "Dr." -> Doctor
|
| 147 |
+
multiple_formats.extend(additional_options)
|
| 148 |
+
|
| 149 |
+
if not is_default:
|
| 150 |
+
multiple_formats = [(x, f"|raw_start|{x}|raw_end||norm_start|{y}|norm_end|") for (x, y) in multiple_formats]
|
| 151 |
+
|
| 152 |
+
multiple_formats = pynini.string_map(multiple_formats)
|
| 153 |
+
return multiple_formats
|
vendor/zonos3/vendor/nemo_text_processing/text_normalization/en/taggers/word.py
ADDED
|
@@ -0,0 +1,91 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Copyright (c) 2021, NVIDIA CORPORATION. All rights reserved.
|
| 2 |
+
#
|
| 3 |
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
| 4 |
+
# you may not use this file except in compliance with the License.
|
| 5 |
+
# You may obtain a copy of the License at
|
| 6 |
+
#
|
| 7 |
+
# http://www.apache.org/licenses/LICENSE-2.0
|
| 8 |
+
#
|
| 9 |
+
# Unless required by applicable law or agreed to in writing, software
|
| 10 |
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
| 11 |
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 12 |
+
# See the License for the specific language governing permissions and
|
| 13 |
+
# limitations under the License.
|
| 14 |
+
|
| 15 |
+
import pynini
|
| 16 |
+
from pynini.examples import plurals
|
| 17 |
+
from pynini.lib import pynutil
|
| 18 |
+
|
| 19 |
+
from zonos3.vendor.nemo_text_processing.text_normalization.en.graph_utils import (
|
| 20 |
+
MIN_NEG_WEIGHT,
|
| 21 |
+
NEMO_ALPHA,
|
| 22 |
+
NEMO_DIGIT,
|
| 23 |
+
NEMO_NOT_SPACE,
|
| 24 |
+
NEMO_SIGMA,
|
| 25 |
+
GraphFst,
|
| 26 |
+
convert_space,
|
| 27 |
+
get_abs_path,
|
| 28 |
+
)
|
| 29 |
+
from zonos3.vendor.nemo_text_processing.text_normalization.en.taggers.punctuation import PunctuationFst
|
| 30 |
+
|
| 31 |
+
|
| 32 |
+
class WordFst(GraphFst):
|
| 33 |
+
"""
|
| 34 |
+
Finite state transducer for classifying word. Considers sentence boundary exceptions.
|
| 35 |
+
e.g. sleep -> tokens { name: "sleep" }
|
| 36 |
+
|
| 37 |
+
Args:
|
| 38 |
+
punctuation: PunctuationFst
|
| 39 |
+
deterministic: if True will provide a single transduction option,
|
| 40 |
+
for False multiple transduction are generated (used for audio-based normalization)
|
| 41 |
+
"""
|
| 42 |
+
|
| 43 |
+
def __init__(self, punctuation: GraphFst, deterministic: bool = True):
|
| 44 |
+
super().__init__(name="word", kind="classify", deterministic=deterministic)
|
| 45 |
+
|
| 46 |
+
punct = PunctuationFst().graph
|
| 47 |
+
default_graph = pynini.closure(pynini.difference(NEMO_NOT_SPACE, punct.project("input")), 1)
|
| 48 |
+
symbols_to_exclude = (pynini.union("$", "€", "₩", "£", "¥", "#", "%") | NEMO_DIGIT).optimize()
|
| 49 |
+
graph = pynini.closure(pynini.difference(NEMO_NOT_SPACE, symbols_to_exclude), 1)
|
| 50 |
+
graph = pynutil.add_weight(graph, MIN_NEG_WEIGHT) | default_graph
|
| 51 |
+
|
| 52 |
+
# leave phones of format [HH AH0 L OW1] untouched
|
| 53 |
+
phoneme_unit = pynini.closure(NEMO_ALPHA, 1) + pynini.closure(NEMO_DIGIT)
|
| 54 |
+
phoneme = (
|
| 55 |
+
pynini.accep(pynini.escape("["))
|
| 56 |
+
+ pynini.closure(phoneme_unit + pynini.accep(" "))
|
| 57 |
+
+ phoneme_unit
|
| 58 |
+
+ pynini.accep(pynini.escape("]"))
|
| 59 |
+
)
|
| 60 |
+
|
| 61 |
+
# leave IPA phones of format [ˈdoʊv] untouched, single words and sentences with punctuation marks allowed
|
| 62 |
+
punct_marks = pynini.union(*punctuation.punct_marks).optimize()
|
| 63 |
+
stress = pynini.union("ˈ", "'", "ˌ")
|
| 64 |
+
ipa_phoneme_unit = pynini.string_file(get_abs_path("data/whitelist/ipa_symbols.tsv"))
|
| 65 |
+
# word in ipa form
|
| 66 |
+
ipa_phonemes = (
|
| 67 |
+
pynini.closure(stress, 0, 1)
|
| 68 |
+
+ pynini.closure(ipa_phoneme_unit, 1)
|
| 69 |
+
+ pynini.closure(stress | ipa_phoneme_unit)
|
| 70 |
+
)
|
| 71 |
+
# allow sentences of words in IPA format separated with spaces or punct marks
|
| 72 |
+
delim = (punct_marks | pynini.accep(" ")) ** (1, ...)
|
| 73 |
+
ipa_phonemes = ipa_phonemes + pynini.closure(delim + ipa_phonemes) + pynini.closure(delim, 0, 1)
|
| 74 |
+
ipa_phonemes = (pynini.accep(pynini.escape("[")) + ipa_phonemes + pynini.accep(pynini.escape("]"))).optimize()
|
| 75 |
+
|
| 76 |
+
if not deterministic:
|
| 77 |
+
phoneme = (
|
| 78 |
+
pynini.accep(pynini.escape("["))
|
| 79 |
+
+ pynini.closure(pynini.accep(" "), 0, 1)
|
| 80 |
+
+ pynini.closure(phoneme_unit + pynini.accep(" "))
|
| 81 |
+
+ phoneme_unit
|
| 82 |
+
+ pynini.closure(pynini.accep(" "), 0, 1)
|
| 83 |
+
+ pynini.accep(pynini.escape("]"))
|
| 84 |
+
).optimize()
|
| 85 |
+
ipa_phonemes = (
|
| 86 |
+
pynini.accep(pynini.escape("[")) + ipa_phonemes + pynini.accep(pynini.escape("]"))
|
| 87 |
+
).optimize()
|
| 88 |
+
|
| 89 |
+
phoneme |= ipa_phonemes
|
| 90 |
+
self.graph = plurals._priority_union(convert_space(phoneme.optimize()), graph, NEMO_SIGMA)
|
| 91 |
+
self.fst = (pynutil.insert("name: \"") + self.graph + pynutil.insert("\"")).optimize()
|
vendor/zonos3/vendor/nemo_text_processing/text_normalization/en/utils.py
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Copyright (c) 2021, NVIDIA CORPORATION. All rights reserved.
|
| 2 |
+
#
|
| 3 |
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
| 4 |
+
# you may not use this file except in compliance with the License.
|
| 5 |
+
# You may obtain a copy of the License at
|
| 6 |
+
#
|
| 7 |
+
# http://www.apache.org/licenses/LICENSE-2.0
|
| 8 |
+
#
|
| 9 |
+
# Unless required by applicable law or agreed to in writing, software
|
| 10 |
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
| 11 |
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 12 |
+
# See the License for the specific language governing permissions and
|
| 13 |
+
# limitations under the License.
|
| 14 |
+
|
| 15 |
+
import csv
|
| 16 |
+
import os
|
| 17 |
+
|
| 18 |
+
|
| 19 |
+
def get_abs_path(rel_path):
|
| 20 |
+
"""
|
| 21 |
+
Get absolute path
|
| 22 |
+
|
| 23 |
+
Args:
|
| 24 |
+
rel_path: relative path to this file
|
| 25 |
+
|
| 26 |
+
Returns absolute path
|
| 27 |
+
"""
|
| 28 |
+
return os.path.dirname(os.path.abspath(__file__)) + '/' + rel_path
|
| 29 |
+
|
| 30 |
+
|
| 31 |
+
def load_labels(abs_path):
|
| 32 |
+
"""
|
| 33 |
+
loads relative path file as dictionary
|
| 34 |
+
|
| 35 |
+
Args:
|
| 36 |
+
abs_path: absolute path
|
| 37 |
+
|
| 38 |
+
Returns dictionary of mappings
|
| 39 |
+
"""
|
| 40 |
+
with open(abs_path, encoding="utf-8") as label_tsv:
|
| 41 |
+
labels = list(csv.reader(label_tsv, delimiter="\t"))
|
| 42 |
+
return labels
|
| 43 |
+
|
| 44 |
+
|
| 45 |
+
def augment_labels_with_punct_at_end(labels):
|
| 46 |
+
"""
|
| 47 |
+
augments labels: if key ends on a punctuation that value does not have, add a new label
|
| 48 |
+
where the value maintains the punctuation
|
| 49 |
+
|
| 50 |
+
Args:
|
| 51 |
+
labels : input labels
|
| 52 |
+
Returns:
|
| 53 |
+
additional labels
|
| 54 |
+
"""
|
| 55 |
+
res = []
|
| 56 |
+
for label in labels:
|
| 57 |
+
if len(label) > 1:
|
| 58 |
+
if label[0][-1] == "." and label[1][-1] != ".":
|
| 59 |
+
res.append([label[0], label[1] + "."] + label[2:])
|
| 60 |
+
return res
|
vendor/zonos3/vendor/nemo_text_processing/text_normalization/en/verbalizers/__init__.py
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Copyright (c) 2021, NVIDIA CORPORATION. All rights reserved.
|
| 2 |
+
#
|
| 3 |
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
| 4 |
+
# you may not use this file except in compliance with the License.
|
| 5 |
+
# You may obtain a copy of the License at
|
| 6 |
+
#
|
| 7 |
+
# http://www.apache.org/licenses/LICENSE-2.0
|
| 8 |
+
#
|
| 9 |
+
# Unless required by applicable law or agreed to in writing, software
|
| 10 |
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
| 11 |
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 12 |
+
# See the License for the specific language governing permissions and
|
| 13 |
+
# limitations under the License.
|
vendor/zonos3/vendor/nemo_text_processing/text_normalization/en/verbalizers/abbreviation.py
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Copyright (c) 2021, NVIDIA CORPORATION. All rights reserved.
|
| 2 |
+
#
|
| 3 |
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
| 4 |
+
# you may not use this file except in compliance with the License.
|
| 5 |
+
# You may obtain a copy of the License at
|
| 6 |
+
#
|
| 7 |
+
# http://www.apache.org/licenses/LICENSE-2.0
|
| 8 |
+
#
|
| 9 |
+
# Unless required by applicable law or agreed to in writing, software
|
| 10 |
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
| 11 |
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 12 |
+
# See the License for the specific language governing permissions and
|
| 13 |
+
# limitations under the License.
|
| 14 |
+
|
| 15 |
+
import pynini
|
| 16 |
+
from pynini.lib import pynutil
|
| 17 |
+
|
| 18 |
+
from zonos3.vendor.nemo_text_processing.text_normalization.en.graph_utils import NEMO_NOT_QUOTE, GraphFst
|
| 19 |
+
|
| 20 |
+
|
| 21 |
+
class AbbreviationFst(GraphFst):
|
| 22 |
+
"""
|
| 23 |
+
Finite state transducer for verbalizing abbreviations
|
| 24 |
+
e.g. tokens { abbreviation { value: "A B C" } } -> "ABC"
|
| 25 |
+
|
| 26 |
+
Args:
|
| 27 |
+
deterministic: if True will provide a single transduction option,
|
| 28 |
+
for False multiple transduction are generated (used for audio-based normalization)
|
| 29 |
+
"""
|
| 30 |
+
|
| 31 |
+
def __init__(self, deterministic: bool = True):
|
| 32 |
+
super().__init__(name="abbreviation", kind="verbalize", deterministic=deterministic)
|
| 33 |
+
|
| 34 |
+
graph = pynutil.delete("value: \"") + pynini.closure(NEMO_NOT_QUOTE, 1) + pynutil.delete("\"")
|
| 35 |
+
delete_tokens = self.delete_tokens(graph)
|
| 36 |
+
self.fst = delete_tokens.optimize()
|
vendor/zonos3/vendor/nemo_text_processing/text_normalization/en/verbalizers/cardinal.py
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Copyright (c) 2021, NVIDIA CORPORATION. All rights reserved.
|
| 2 |
+
#
|
| 3 |
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
| 4 |
+
# you may not use this file except in compliance with the License.
|
| 5 |
+
# You may obtain a copy of the License at
|
| 6 |
+
#
|
| 7 |
+
# http://www.apache.org/licenses/LICENSE-2.0
|
| 8 |
+
#
|
| 9 |
+
# Unless required by applicable law or agreed to in writing, software
|
| 10 |
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
| 11 |
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 12 |
+
# See the License for the specific language governing permissions and
|
| 13 |
+
# limitations under the License.
|
| 14 |
+
|
| 15 |
+
import pynini
|
| 16 |
+
from pynini.lib import pynutil
|
| 17 |
+
|
| 18 |
+
from zonos3.vendor.nemo_text_processing.text_normalization.en.graph_utils import NEMO_NOT_QUOTE, GraphFst, delete_space
|
| 19 |
+
|
| 20 |
+
|
| 21 |
+
class CardinalFst(GraphFst):
|
| 22 |
+
"""
|
| 23 |
+
Finite state transducer for verbalizing cardinal, e.g.
|
| 24 |
+
cardinal { negative: "true" integer: "23" } -> minus twenty three
|
| 25 |
+
|
| 26 |
+
Args:
|
| 27 |
+
deterministic: if True will provide a single transduction option,
|
| 28 |
+
for False multiple options (used for audio-based normalization)
|
| 29 |
+
"""
|
| 30 |
+
|
| 31 |
+
def __init__(self, deterministic: bool = True):
|
| 32 |
+
super().__init__(name="cardinal", kind="verbalize", deterministic=deterministic)
|
| 33 |
+
|
| 34 |
+
self.optional_sign = pynini.cross("negative: \"true\"", "minus ")
|
| 35 |
+
if not deterministic:
|
| 36 |
+
self.optional_sign |= pynini.cross("negative: \"true\"", "negative ")
|
| 37 |
+
self.optional_sign |= pynini.cross("negative: \"true\"", "dash ")
|
| 38 |
+
|
| 39 |
+
self.optional_sign = pynini.closure(self.optional_sign + delete_space, 0, 1)
|
| 40 |
+
|
| 41 |
+
integer = pynini.closure(NEMO_NOT_QUOTE)
|
| 42 |
+
|
| 43 |
+
self.integer = delete_space + pynutil.delete("\"") + integer + pynutil.delete("\"")
|
| 44 |
+
integer = pynutil.delete("integer:") + self.integer
|
| 45 |
+
|
| 46 |
+
self.numbers = self.optional_sign + integer
|
| 47 |
+
delete_tokens = self.delete_tokens(self.numbers)
|
| 48 |
+
self.fst = delete_tokens.optimize()
|
vendor/zonos3/vendor/nemo_text_processing/text_normalization/en/verbalizers/date.py
ADDED
|
@@ -0,0 +1,107 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Copyright (c) 2021, NVIDIA CORPORATION. All rights reserved.
|
| 2 |
+
#
|
| 3 |
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
| 4 |
+
# you may not use this file except in compliance with the License.
|
| 5 |
+
# You may obtain a copy of the License at
|
| 6 |
+
#
|
| 7 |
+
# http://www.apache.org/licenses/LICENSE-2.0
|
| 8 |
+
#
|
| 9 |
+
# Unless required by applicable law or agreed to in writing, software
|
| 10 |
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
| 11 |
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 12 |
+
# See the License for the specific language governing permissions and
|
| 13 |
+
# limitations under the License.
|
| 14 |
+
|
| 15 |
+
import pynini
|
| 16 |
+
from pynini.examples import plurals
|
| 17 |
+
from pynini.lib import pynutil
|
| 18 |
+
|
| 19 |
+
from zonos3.vendor.nemo_text_processing.text_normalization.en.graph_utils import (
|
| 20 |
+
NEMO_NOT_QUOTE,
|
| 21 |
+
NEMO_SIGMA,
|
| 22 |
+
GraphFst,
|
| 23 |
+
delete_extra_space,
|
| 24 |
+
delete_space,
|
| 25 |
+
)
|
| 26 |
+
|
| 27 |
+
|
| 28 |
+
class DateFst(GraphFst):
|
| 29 |
+
"""
|
| 30 |
+
Finite state transducer for verbalizing date, e.g.
|
| 31 |
+
date { month: "february" day: "five" year: "twenty twelve" preserve_order: true } -> february fifth twenty twelve
|
| 32 |
+
date { day: "five" month: "february" year: "twenty twelve" preserve_order: true } -> the fifth of february twenty twelve
|
| 33 |
+
|
| 34 |
+
Args:
|
| 35 |
+
ordinal: OrdinalFst
|
| 36 |
+
deterministic: if True will provide a single transduction option,
|
| 37 |
+
for False multiple transduction are generated (used for audio-based normalization)
|
| 38 |
+
"""
|
| 39 |
+
|
| 40 |
+
def __init__(self, ordinal: GraphFst, deterministic: bool = True, lm: bool = False):
|
| 41 |
+
super().__init__(name="date", kind="verbalize", deterministic=deterministic)
|
| 42 |
+
|
| 43 |
+
phrase = pynini.closure(NEMO_NOT_QUOTE, 1)
|
| 44 |
+
day_cardinal = (
|
| 45 |
+
pynutil.delete("day:")
|
| 46 |
+
+ delete_space
|
| 47 |
+
+ pynutil.delete("\"")
|
| 48 |
+
+ pynini.closure(NEMO_NOT_QUOTE, 1)
|
| 49 |
+
+ pynutil.delete("\"")
|
| 50 |
+
)
|
| 51 |
+
day = day_cardinal @ ordinal.suffix
|
| 52 |
+
period = pynutil.delete("text:") + delete_space + pynutil.delete("\"") + phrase + pynutil.delete("\"")
|
| 53 |
+
month = pynutil.delete("month:") + delete_space + pynutil.delete("\"") + phrase + pynutil.delete("\"")
|
| 54 |
+
|
| 55 |
+
year = (
|
| 56 |
+
pynutil.delete("year:")
|
| 57 |
+
+ delete_space
|
| 58 |
+
+ pynutil.delete("\"")
|
| 59 |
+
+ pynini.closure(NEMO_NOT_QUOTE, 1)
|
| 60 |
+
+ delete_space
|
| 61 |
+
+ pynutil.delete("\"")
|
| 62 |
+
)
|
| 63 |
+
|
| 64 |
+
# financial period
|
| 65 |
+
graph_fy = (
|
| 66 |
+
pynutil.insert("the ") + period + pynutil.insert(" of ") + pynini.closure(delete_extra_space + year, 0, 1)
|
| 67 |
+
)
|
| 68 |
+
|
| 69 |
+
# month (day) year
|
| 70 |
+
graph_mdy = (
|
| 71 |
+
month + pynini.closure(delete_extra_space + day, 0, 1) + pynini.closure(delete_extra_space + year, 0, 1)
|
| 72 |
+
)
|
| 73 |
+
# may 5 -> may five
|
| 74 |
+
if not deterministic and not lm:
|
| 75 |
+
graph_mdy |= (
|
| 76 |
+
month
|
| 77 |
+
+ pynini.closure(delete_extra_space + day_cardinal, 0, 1)
|
| 78 |
+
+ pynini.closure(delete_extra_space + year, 0, 1)
|
| 79 |
+
)
|
| 80 |
+
|
| 81 |
+
# day month year
|
| 82 |
+
graph_dmy = (
|
| 83 |
+
pynutil.insert("the ")
|
| 84 |
+
+ day
|
| 85 |
+
+ delete_extra_space
|
| 86 |
+
+ pynutil.insert("of ")
|
| 87 |
+
+ month
|
| 88 |
+
+ pynini.closure(delete_extra_space + year, 0, 1)
|
| 89 |
+
)
|
| 90 |
+
|
| 91 |
+
optional_preserve_order = pynini.closure(
|
| 92 |
+
pynutil.delete("preserve_order:") + delete_space + pynutil.delete("true") + delete_space
|
| 93 |
+
| pynutil.delete("field_order:")
|
| 94 |
+
+ delete_space
|
| 95 |
+
+ pynutil.delete("\"")
|
| 96 |
+
+ NEMO_NOT_QUOTE
|
| 97 |
+
+ pynutil.delete("\"")
|
| 98 |
+
+ delete_space
|
| 99 |
+
)
|
| 100 |
+
|
| 101 |
+
final_graph = (
|
| 102 |
+
(plurals._priority_union(graph_mdy, pynutil.add_weight(graph_dmy, 0.0001), NEMO_SIGMA) | year | graph_fy)
|
| 103 |
+
+ delete_space
|
| 104 |
+
+ optional_preserve_order
|
| 105 |
+
)
|
| 106 |
+
delete_tokens = self.delete_tokens(final_graph)
|
| 107 |
+
self.fst = delete_tokens.optimize()
|
vendor/zonos3/vendor/nemo_text_processing/text_normalization/en/verbalizers/decimal.py
ADDED
|
@@ -0,0 +1,85 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Copyright (c) 2021, NVIDIA CORPORATION. All rights reserved.
|
| 2 |
+
#
|
| 3 |
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
| 4 |
+
# you may not use this file except in compliance with the License.
|
| 5 |
+
# You may obtain a copy of the License at
|
| 6 |
+
#
|
| 7 |
+
# http://www.apache.org/licenses/LICENSE-2.0
|
| 8 |
+
#
|
| 9 |
+
# Unless required by applicable law or agreed to in writing, software
|
| 10 |
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
| 11 |
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 12 |
+
# See the License for the specific language governing permissions and
|
| 13 |
+
# limitations under the License.
|
| 14 |
+
|
| 15 |
+
import pynini
|
| 16 |
+
from pynini.lib import pynutil
|
| 17 |
+
|
| 18 |
+
from zonos3.vendor.nemo_text_processing.text_normalization.en.graph_utils import (
|
| 19 |
+
NEMO_NOT_QUOTE,
|
| 20 |
+
NEMO_SIGMA,
|
| 21 |
+
GraphFst,
|
| 22 |
+
delete_space,
|
| 23 |
+
insert_space,
|
| 24 |
+
)
|
| 25 |
+
|
| 26 |
+
|
| 27 |
+
class DecimalFst(GraphFst):
|
| 28 |
+
"""
|
| 29 |
+
Finite state transducer for verbalizing decimal, e.g.
|
| 30 |
+
decimal { negative: "true" integer_part: "twelve" fractional_part: "five o o six" quantity: "billion" } -> minus twelve point five o o six billion
|
| 31 |
+
|
| 32 |
+
Args:
|
| 33 |
+
deterministic: if True will provide a single transduction option,
|
| 34 |
+
for False multiple transduction are generated (used for audio-based normalization)
|
| 35 |
+
"""
|
| 36 |
+
|
| 37 |
+
def __init__(self, cardinal, deterministic: bool = True):
|
| 38 |
+
super().__init__(name="decimal", kind="verbalize", deterministic=deterministic)
|
| 39 |
+
self.optional_sign = pynini.cross("negative: \"true\"", "minus ")
|
| 40 |
+
if not deterministic:
|
| 41 |
+
self.optional_sign |= pynini.cross("negative: \"true\"", "negative ")
|
| 42 |
+
self.optional_sign = pynini.closure(self.optional_sign + delete_space, 0, 1)
|
| 43 |
+
self.integer = pynutil.delete("integer_part:") + cardinal.integer
|
| 44 |
+
self.optional_integer = pynini.closure(self.integer + delete_space + insert_space, 0, 1)
|
| 45 |
+
self.fractional_default = (
|
| 46 |
+
pynutil.delete("fractional_part:")
|
| 47 |
+
+ delete_space
|
| 48 |
+
+ pynutil.delete("\"")
|
| 49 |
+
+ pynini.closure(NEMO_NOT_QUOTE, 1)
|
| 50 |
+
+ pynutil.delete("\"")
|
| 51 |
+
)
|
| 52 |
+
|
| 53 |
+
self.fractional = pynutil.insert("point ") + self.fractional_default
|
| 54 |
+
|
| 55 |
+
self.quantity = (
|
| 56 |
+
delete_space
|
| 57 |
+
+ insert_space
|
| 58 |
+
+ pynutil.delete("quantity:")
|
| 59 |
+
+ delete_space
|
| 60 |
+
+ pynutil.delete("\"")
|
| 61 |
+
+ pynini.closure(NEMO_NOT_QUOTE, 1)
|
| 62 |
+
+ pynutil.delete("\"")
|
| 63 |
+
)
|
| 64 |
+
self.optional_quantity = pynini.closure(self.quantity, 0, 1)
|
| 65 |
+
|
| 66 |
+
graph = self.optional_sign + (
|
| 67 |
+
self.integer
|
| 68 |
+
| (self.integer + self.quantity)
|
| 69 |
+
| (self.optional_integer + self.fractional + self.optional_quantity)
|
| 70 |
+
)
|
| 71 |
+
|
| 72 |
+
self.numbers = graph
|
| 73 |
+
delete_tokens = self.delete_tokens(graph)
|
| 74 |
+
if not deterministic:
|
| 75 |
+
delete_tokens |= pynini.compose(
|
| 76 |
+
delete_tokens,
|
| 77 |
+
NEMO_SIGMA
|
| 78 |
+
+ (
|
| 79 |
+
pynini.cross(" point five", " and a half")
|
| 80 |
+
| pynini.cross("zero point five", "half")
|
| 81 |
+
| pynini.cross(" point two five", " and a quarter")
|
| 82 |
+
| pynini.cross("zero point two five", "quarter")
|
| 83 |
+
),
|
| 84 |
+
).optimize()
|
| 85 |
+
self.fst = delete_tokens.optimize()
|
vendor/zonos3/vendor/nemo_text_processing/text_normalization/en/verbalizers/electronic.py
ADDED
|
@@ -0,0 +1,122 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Copyright (c) 2021, NVIDIA CORPORATION. All rights reserved.
|
| 2 |
+
#
|
| 3 |
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
| 4 |
+
# you may not use this file except in compliance with the License.
|
| 5 |
+
# You may obtain a copy of the License at
|
| 6 |
+
#
|
| 7 |
+
# http://www.apache.org/licenses/LICENSE-2.0
|
| 8 |
+
#
|
| 9 |
+
# Unless required by applicable law or agreed to in writing, software
|
| 10 |
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
| 11 |
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 12 |
+
# See the License for the specific language governing permissions and
|
| 13 |
+
# limitations under the License.
|
| 14 |
+
|
| 15 |
+
import pynini
|
| 16 |
+
from pynini.examples import plurals
|
| 17 |
+
from pynini.lib import pynutil
|
| 18 |
+
|
| 19 |
+
from zonos3.vendor.nemo_text_processing.text_normalization.en.graph_utils import (
|
| 20 |
+
MIN_NEG_WEIGHT,
|
| 21 |
+
NEMO_ALPHA,
|
| 22 |
+
NEMO_CHAR,
|
| 23 |
+
NEMO_LOWER,
|
| 24 |
+
NEMO_NOT_QUOTE,
|
| 25 |
+
NEMO_SIGMA,
|
| 26 |
+
NEMO_SPACE,
|
| 27 |
+
TO_LOWER,
|
| 28 |
+
GraphFst,
|
| 29 |
+
delete_extra_space,
|
| 30 |
+
delete_space,
|
| 31 |
+
insert_space,
|
| 32 |
+
)
|
| 33 |
+
from zonos3.vendor.nemo_text_processing.text_normalization.en.utils import get_abs_path
|
| 34 |
+
|
| 35 |
+
|
| 36 |
+
class ElectronicFst(GraphFst):
|
| 37 |
+
"""
|
| 38 |
+
Finite state transducer for verbalizing electronic
|
| 39 |
+
e.g. tokens { electronic { username: "cdf1" domain: "abc.edu" } } -> c d f one at a b c dot e d u
|
| 40 |
+
|
| 41 |
+
Args:
|
| 42 |
+
deterministic: if True will provide a single transduction option,
|
| 43 |
+
for False multiple transduction are generated (used for audio-based normalization)
|
| 44 |
+
"""
|
| 45 |
+
|
| 46 |
+
def __init__(self, deterministic: bool = True):
|
| 47 |
+
super().__init__(name="electronic", kind="verbalize", deterministic=deterministic)
|
| 48 |
+
graph_digit_no_zero = pynini.invert(pynini.string_file(get_abs_path("data/number/digit.tsv"))).optimize()
|
| 49 |
+
graph_zero = pynini.cross("0", "zero")
|
| 50 |
+
long_numbers = pynutil.add_weight(graph_digit_no_zero + pynini.cross("000", " thousand"), MIN_NEG_WEIGHT)
|
| 51 |
+
|
| 52 |
+
if not deterministic:
|
| 53 |
+
graph_zero |= pynini.cross("0", "o") | pynini.cross("0", "oh")
|
| 54 |
+
|
| 55 |
+
graph_digit = graph_digit_no_zero | graph_zero
|
| 56 |
+
graph_symbols = pynini.string_file(get_abs_path("data/electronic/symbol.tsv")).optimize()
|
| 57 |
+
|
| 58 |
+
NEMO_NOT_BRACKET = pynini.difference(NEMO_CHAR, pynini.union("{", "}")).optimize()
|
| 59 |
+
dict_words = pynini.project(pynini.string_file(get_abs_path("data/electronic/words.tsv")), "output")
|
| 60 |
+
default_chars_symbols = pynini.cdrewrite(
|
| 61 |
+
pynutil.insert(" ") + (graph_symbols | graph_digit | long_numbers) + pynutil.insert(" "),
|
| 62 |
+
"",
|
| 63 |
+
"",
|
| 64 |
+
NEMO_SIGMA,
|
| 65 |
+
)
|
| 66 |
+
default_chars_symbols = pynini.compose(
|
| 67 |
+
pynini.closure(NEMO_NOT_BRACKET), default_chars_symbols.optimize()
|
| 68 |
+
).optimize()
|
| 69 |
+
|
| 70 |
+
# this is far cases when user name was split by dictionary words, i.e. "sevicepart@ab.com" -> "service part"
|
| 71 |
+
space_separated_dict_words = pynutil.add_weight(
|
| 72 |
+
NEMO_ALPHA
|
| 73 |
+
+ pynini.closure(NEMO_ALPHA | NEMO_SPACE)
|
| 74 |
+
+ NEMO_SPACE
|
| 75 |
+
+ pynini.closure(NEMO_ALPHA | NEMO_SPACE),
|
| 76 |
+
MIN_NEG_WEIGHT,
|
| 77 |
+
)
|
| 78 |
+
|
| 79 |
+
user_name = (
|
| 80 |
+
pynutil.delete("username:")
|
| 81 |
+
+ delete_space
|
| 82 |
+
+ pynutil.delete("\"")
|
| 83 |
+
+ (default_chars_symbols | space_separated_dict_words).optimize()
|
| 84 |
+
+ pynutil.delete("\"")
|
| 85 |
+
)
|
| 86 |
+
|
| 87 |
+
domain_common = pynini.string_file(get_abs_path("data/electronic/domain.tsv"))
|
| 88 |
+
|
| 89 |
+
# this will be used for a safe fallback
|
| 90 |
+
domain_all = pynini.compose(
|
| 91 |
+
default_chars_symbols,
|
| 92 |
+
pynini.closure(TO_LOWER | NEMO_LOWER | NEMO_SPACE | pynutil.add_weight(dict_words, MIN_NEG_WEIGHT)),
|
| 93 |
+
)
|
| 94 |
+
|
| 95 |
+
domain = (
|
| 96 |
+
domain_all
|
| 97 |
+
+ insert_space
|
| 98 |
+
+ plurals._priority_union(
|
| 99 |
+
domain_common, pynutil.add_weight(pynini.cross(".", "dot"), weight=0.0001), NEMO_SIGMA
|
| 100 |
+
)
|
| 101 |
+
+ pynini.closure(insert_space + default_chars_symbols, 0, 1)
|
| 102 |
+
)
|
| 103 |
+
|
| 104 |
+
domain = (
|
| 105 |
+
pynutil.delete("domain:")
|
| 106 |
+
+ delete_space
|
| 107 |
+
+ pynutil.delete("\"")
|
| 108 |
+
+ (domain | pynutil.add_weight(domain_all, weight=100)).optimize()
|
| 109 |
+
+ delete_space
|
| 110 |
+
+ pynutil.delete("\"")
|
| 111 |
+
).optimize()
|
| 112 |
+
|
| 113 |
+
protocol = pynutil.delete("protocol: \"") + pynini.closure(NEMO_NOT_QUOTE, 1) + pynutil.delete("\"")
|
| 114 |
+
graph = (
|
| 115 |
+
pynini.closure(protocol + delete_space, 0, 1)
|
| 116 |
+
+ pynini.closure(user_name + delete_space + pynutil.insert(" at ") + delete_space, 0, 1)
|
| 117 |
+
+ domain
|
| 118 |
+
+ delete_space
|
| 119 |
+
).optimize() @ pynini.cdrewrite(delete_extra_space, "", "", NEMO_SIGMA)
|
| 120 |
+
|
| 121 |
+
delete_tokens = self.delete_tokens(graph)
|
| 122 |
+
self.fst = delete_tokens.optimize()
|
vendor/zonos3/vendor/nemo_text_processing/text_normalization/en/verbalizers/fraction.py
ADDED
|
@@ -0,0 +1,89 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Copyright (c) 2021, NVIDIA CORPORATION. All rights reserved.
|
| 2 |
+
#
|
| 3 |
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
| 4 |
+
# you may not use this file except in compliance with the License.
|
| 5 |
+
# You may obtain a copy of the License at
|
| 6 |
+
#
|
| 7 |
+
# http://www.apache.org/licenses/LICENSE-2.0
|
| 8 |
+
#
|
| 9 |
+
# Unless required by applicable law or agreed to in writing, software
|
| 10 |
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
| 11 |
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 12 |
+
# See the License for the specific language governing permissions and
|
| 13 |
+
# limitations under the License.
|
| 14 |
+
|
| 15 |
+
import pynini
|
| 16 |
+
from pynini.examples import plurals
|
| 17 |
+
from pynini.lib import pynutil
|
| 18 |
+
|
| 19 |
+
from zonos3.vendor.nemo_text_processing.text_normalization.en.graph_utils import NEMO_NOT_QUOTE, NEMO_SIGMA, GraphFst, insert_space
|
| 20 |
+
from zonos3.vendor.nemo_text_processing.text_normalization.en.verbalizers.ordinal import OrdinalFst
|
| 21 |
+
|
| 22 |
+
|
| 23 |
+
class FractionFst(GraphFst):
|
| 24 |
+
"""
|
| 25 |
+
Finite state transducer for verbalizing fraction
|
| 26 |
+
e.g. tokens { fraction { integer: "twenty three" numerator: "four" denominator: "five" } } ->
|
| 27 |
+
twenty three and four fifth
|
| 28 |
+
|
| 29 |
+
Args:
|
| 30 |
+
deterministic: if True will provide a single transduction option,
|
| 31 |
+
for False multiple transduction are generated (used for audio-based normalization)
|
| 32 |
+
"""
|
| 33 |
+
|
| 34 |
+
def __init__(self, deterministic: bool = True, lm: bool = False):
|
| 35 |
+
super().__init__(name="fraction", kind="verbalize", deterministic=deterministic)
|
| 36 |
+
suffix = OrdinalFst().suffix
|
| 37 |
+
|
| 38 |
+
integer = pynutil.delete("integer_part: \"") + pynini.closure(NEMO_NOT_QUOTE) + pynutil.delete("\" ")
|
| 39 |
+
denominator_one = pynini.cross("denominator: \"one\"", "over one")
|
| 40 |
+
denominator_half = pynini.cross("denominator: \"two\"", "half")
|
| 41 |
+
denominator_quarter = pynini.cross("denominator: \"four\"", "quarter")
|
| 42 |
+
|
| 43 |
+
denominator_rest = (
|
| 44 |
+
pynutil.delete("denominator: \"") + pynini.closure(NEMO_NOT_QUOTE) @ suffix + pynutil.delete("\"")
|
| 45 |
+
)
|
| 46 |
+
|
| 47 |
+
denominators = plurals._priority_union(
|
| 48 |
+
denominator_one,
|
| 49 |
+
plurals._priority_union(
|
| 50 |
+
denominator_half,
|
| 51 |
+
plurals._priority_union(denominator_quarter, denominator_rest, NEMO_SIGMA),
|
| 52 |
+
NEMO_SIGMA,
|
| 53 |
+
),
|
| 54 |
+
NEMO_SIGMA,
|
| 55 |
+
).optimize()
|
| 56 |
+
if not deterministic:
|
| 57 |
+
denominators |= pynutil.delete("denominator: \"") + (pynini.accep("four") @ suffix) + pynutil.delete("\"")
|
| 58 |
+
|
| 59 |
+
numerator_one = pynutil.delete("numerator: \"") + pynini.accep("one") + pynutil.delete("\" ")
|
| 60 |
+
numerator_one = numerator_one + insert_space + denominators
|
| 61 |
+
numerator_rest = (
|
| 62 |
+
pynutil.delete("numerator: \"")
|
| 63 |
+
+ (pynini.closure(NEMO_NOT_QUOTE) - pynini.accep("one"))
|
| 64 |
+
+ pynutil.delete("\" ")
|
| 65 |
+
)
|
| 66 |
+
numerator_rest = numerator_rest + insert_space + denominators
|
| 67 |
+
numerator_rest @= pynini.cdrewrite(
|
| 68 |
+
plurals._priority_union(pynini.cross("half", "halves"), pynutil.insert("s"), NEMO_SIGMA),
|
| 69 |
+
"",
|
| 70 |
+
"[EOS]",
|
| 71 |
+
NEMO_SIGMA,
|
| 72 |
+
)
|
| 73 |
+
|
| 74 |
+
graph = numerator_one | numerator_rest
|
| 75 |
+
|
| 76 |
+
conjunction = pynutil.insert("and ")
|
| 77 |
+
if not deterministic and not lm:
|
| 78 |
+
conjunction = pynini.closure(conjunction, 0, 1)
|
| 79 |
+
|
| 80 |
+
integer = pynini.closure(integer + insert_space + conjunction, 0, 1)
|
| 81 |
+
|
| 82 |
+
graph = integer + graph
|
| 83 |
+
graph @= pynini.cdrewrite(
|
| 84 |
+
pynini.cross("and one half", "and a half") | pynini.cross("over ones", "over one"), "", "[EOS]", NEMO_SIGMA
|
| 85 |
+
)
|
| 86 |
+
|
| 87 |
+
self.graph = graph
|
| 88 |
+
delete_tokens = self.delete_tokens(self.graph)
|
| 89 |
+
self.fst = delete_tokens.optimize()
|
vendor/zonos3/vendor/nemo_text_processing/text_normalization/en/verbalizers/measure.py
ADDED
|
@@ -0,0 +1,122 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Copyright (c) 2021, NVIDIA CORPORATION. All rights reserved.
|
| 2 |
+
#
|
| 3 |
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
| 4 |
+
# you may not use this file except in compliance with the License.
|
| 5 |
+
# You may obtain a copy of the License at
|
| 6 |
+
#
|
| 7 |
+
# http://www.apache.org/licenses/LICENSE-2.0
|
| 8 |
+
#
|
| 9 |
+
# Unless required by applicable law or agreed to in writing, software
|
| 10 |
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
| 11 |
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 12 |
+
# See the License for the specific language governing permissions and
|
| 13 |
+
# limitations under the License.
|
| 14 |
+
|
| 15 |
+
import pynini
|
| 16 |
+
from pynini.lib import pynutil
|
| 17 |
+
|
| 18 |
+
from zonos3.vendor.nemo_text_processing.text_normalization.en.graph_utils import (
|
| 19 |
+
NEMO_NOT_QUOTE,
|
| 20 |
+
NEMO_SIGMA,
|
| 21 |
+
GraphFst,
|
| 22 |
+
delete_space,
|
| 23 |
+
insert_space,
|
| 24 |
+
)
|
| 25 |
+
|
| 26 |
+
|
| 27 |
+
class MeasureFst(GraphFst):
|
| 28 |
+
"""
|
| 29 |
+
Finite state transducer for verbalizing measure, e.g.
|
| 30 |
+
measure { negative: "true" cardinal { integer: "twelve" } units: "kilograms" } -> minus twelve kilograms
|
| 31 |
+
measure { decimal { integer_part: "twelve" fractional_part: "five" } units: "kilograms" } -> twelve point five kilograms
|
| 32 |
+
tokens { measure { units: "covid" decimal { integer_part: "nineteen" fractional_part: "five" } } } -> covid nineteen point five
|
| 33 |
+
|
| 34 |
+
Args:
|
| 35 |
+
decimal: DecimalFst
|
| 36 |
+
cardinal: CardinalFst
|
| 37 |
+
fraction: FractionFst
|
| 38 |
+
deterministic: if True will provide a single transduction option,
|
| 39 |
+
for False multiple transduction are generated (used for audio-based normalization)
|
| 40 |
+
"""
|
| 41 |
+
|
| 42 |
+
def __init__(self, decimal: GraphFst, cardinal: GraphFst, fraction: GraphFst, deterministic: bool = True):
|
| 43 |
+
super().__init__(name="measure", kind="verbalize", deterministic=deterministic)
|
| 44 |
+
optional_sign = cardinal.optional_sign
|
| 45 |
+
unit = (
|
| 46 |
+
pynutil.delete("units: \"")
|
| 47 |
+
+ pynini.difference(pynini.closure(NEMO_NOT_QUOTE, 1), pynini.union("address", "math"))
|
| 48 |
+
+ pynutil.delete("\"")
|
| 49 |
+
+ delete_space
|
| 50 |
+
)
|
| 51 |
+
|
| 52 |
+
if not deterministic:
|
| 53 |
+
unit |= pynini.compose(unit, pynini.cross(pynini.union("inch", "inches"), "\""))
|
| 54 |
+
|
| 55 |
+
graph_decimal = (
|
| 56 |
+
pynutil.delete("decimal {")
|
| 57 |
+
+ delete_space
|
| 58 |
+
+ optional_sign
|
| 59 |
+
+ delete_space
|
| 60 |
+
+ decimal.numbers
|
| 61 |
+
+ delete_space
|
| 62 |
+
+ pynutil.delete("}")
|
| 63 |
+
)
|
| 64 |
+
|
| 65 |
+
if not deterministic:
|
| 66 |
+
graph_decimal |= pynini.compose(
|
| 67 |
+
graph_decimal,
|
| 68 |
+
NEMO_SIGMA
|
| 69 |
+
+ (
|
| 70 |
+
pynini.cross(" point five", " and a half")
|
| 71 |
+
| pynini.cross("zero point five", "half")
|
| 72 |
+
| pynini.cross(" point two five", " and a quarter")
|
| 73 |
+
| pynini.cross("zero point two five", "quarter")
|
| 74 |
+
),
|
| 75 |
+
).optimize()
|
| 76 |
+
|
| 77 |
+
graph_cardinal = (
|
| 78 |
+
pynutil.delete("cardinal {")
|
| 79 |
+
+ delete_space
|
| 80 |
+
+ optional_sign
|
| 81 |
+
+ delete_space
|
| 82 |
+
+ cardinal.numbers
|
| 83 |
+
+ delete_space
|
| 84 |
+
+ pynutil.delete("}")
|
| 85 |
+
)
|
| 86 |
+
|
| 87 |
+
graph_fraction = (
|
| 88 |
+
pynutil.delete("fraction {") + delete_space + fraction.graph + delete_space + pynutil.delete("}")
|
| 89 |
+
)
|
| 90 |
+
|
| 91 |
+
graph = (graph_cardinal | graph_decimal | graph_fraction) + delete_space + insert_space + unit
|
| 92 |
+
|
| 93 |
+
# SH adds "preserve_order: true" by default
|
| 94 |
+
preserve_order = pynutil.delete("preserve_order:") + delete_space + pynutil.delete("true") + delete_space
|
| 95 |
+
graph |= unit + insert_space + (graph_cardinal | graph_decimal) + delete_space + pynini.closure(preserve_order)
|
| 96 |
+
# for only unit
|
| 97 |
+
graph |= (
|
| 98 |
+
pynutil.delete("cardinal { integer: \"-\"")
|
| 99 |
+
+ delete_space
|
| 100 |
+
+ pynutil.delete("}")
|
| 101 |
+
+ delete_space
|
| 102 |
+
+ unit
|
| 103 |
+
+ pynini.closure(preserve_order)
|
| 104 |
+
)
|
| 105 |
+
address = (
|
| 106 |
+
pynutil.delete("units: \"address\" ")
|
| 107 |
+
+ delete_space
|
| 108 |
+
+ graph_cardinal
|
| 109 |
+
+ delete_space
|
| 110 |
+
+ pynini.closure(preserve_order)
|
| 111 |
+
)
|
| 112 |
+
math = (
|
| 113 |
+
pynutil.delete("units: \"math\" ")
|
| 114 |
+
+ delete_space
|
| 115 |
+
+ graph_cardinal
|
| 116 |
+
+ delete_space
|
| 117 |
+
+ pynini.closure(preserve_order)
|
| 118 |
+
)
|
| 119 |
+
graph |= address | math
|
| 120 |
+
|
| 121 |
+
delete_tokens = self.delete_tokens(graph)
|
| 122 |
+
self.fst = delete_tokens.optimize()
|
vendor/zonos3/vendor/nemo_text_processing/text_normalization/en/verbalizers/money.py
ADDED
|
@@ -0,0 +1,85 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Copyright (c) 2021, NVIDIA CORPORATION. All rights reserved.
|
| 2 |
+
#
|
| 3 |
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
| 4 |
+
# you may not use this file except in compliance with the License.
|
| 5 |
+
# You may obtain a copy of the License at
|
| 6 |
+
#
|
| 7 |
+
# http://www.apache.org/licenses/LICENSE-2.0
|
| 8 |
+
#
|
| 9 |
+
# Unless required by applicable law or agreed to in writing, software
|
| 10 |
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
| 11 |
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 12 |
+
# See the License for the specific language governing permissions and
|
| 13 |
+
# limitations under the License.
|
| 14 |
+
|
| 15 |
+
import pynini
|
| 16 |
+
from pynini.lib import pynutil
|
| 17 |
+
|
| 18 |
+
from zonos3.vendor.nemo_text_processing.text_normalization.en.graph_utils import (
|
| 19 |
+
NEMO_NOT_QUOTE,
|
| 20 |
+
GraphFst,
|
| 21 |
+
delete_extra_space,
|
| 22 |
+
delete_preserve_order,
|
| 23 |
+
)
|
| 24 |
+
|
| 25 |
+
from zonos3.vendor.nemo_text_processing.text_normalization.en.utils import get_abs_path
|
| 26 |
+
|
| 27 |
+
per_units = pynini.string_file(get_abs_path("data/money/per_unit.tsv"))
|
| 28 |
+
|
| 29 |
+
|
| 30 |
+
class MoneyFst(GraphFst):
|
| 31 |
+
"""
|
| 32 |
+
Finite state transducer for verbalizing money, e.g.
|
| 33 |
+
money { integer_part: "twelve" fractional_part: "o five" currency: "dollars" } -> twelve o five dollars
|
| 34 |
+
|
| 35 |
+
Args:
|
| 36 |
+
decimal: DecimalFst
|
| 37 |
+
deterministic: if True will provide a single transduction option,
|
| 38 |
+
for False multiple transduction are generated (used for audio-based normalization)
|
| 39 |
+
"""
|
| 40 |
+
|
| 41 |
+
def __init__(self, decimal: GraphFst, deterministic: bool = True):
|
| 42 |
+
super().__init__(name="money", kind="verbalize", deterministic=deterministic)
|
| 43 |
+
keep_space = pynini.accep(" ")
|
| 44 |
+
maj = pynutil.delete('currency_maj: "') + pynini.closure(NEMO_NOT_QUOTE, 1) + pynutil.delete('"')
|
| 45 |
+
min = pynutil.delete('currency_min: "') + pynini.closure(NEMO_NOT_QUOTE, 1) + pynutil.delete('"')
|
| 46 |
+
|
| 47 |
+
fractional_part = (
|
| 48 |
+
pynutil.delete('fractional_part: "') + pynini.closure(NEMO_NOT_QUOTE, 1) + pynutil.delete('"')
|
| 49 |
+
)
|
| 50 |
+
|
| 51 |
+
integer_part = decimal.integer
|
| 52 |
+
|
| 53 |
+
# *** currency_maj
|
| 54 |
+
graph_integer = integer_part + keep_space + maj
|
| 55 |
+
|
| 56 |
+
# *** currency_maj + (***) | ((and) *** current_min)
|
| 57 |
+
fractional = fractional_part + delete_extra_space + min
|
| 58 |
+
|
| 59 |
+
if not deterministic:
|
| 60 |
+
fractional |= pynutil.insert("and ") + fractional
|
| 61 |
+
|
| 62 |
+
graph_integer_with_minor = integer_part + keep_space + maj + keep_space + fractional + delete_preserve_order
|
| 63 |
+
|
| 64 |
+
# *** point *** currency_maj
|
| 65 |
+
graph_decimal = decimal.numbers + keep_space + maj
|
| 66 |
+
|
| 67 |
+
# *** current_min
|
| 68 |
+
graph_minor = fractional_part + delete_extra_space + min + delete_preserve_order
|
| 69 |
+
|
| 70 |
+
graph = graph_integer | graph_integer_with_minor | graph_decimal | graph_minor
|
| 71 |
+
|
| 72 |
+
if not deterministic:
|
| 73 |
+
graph |= graph_integer + delete_preserve_order
|
| 74 |
+
|
| 75 |
+
per_units_normalized = pynini.project(per_units, "output")
|
| 76 |
+
remove_per_units_normalized = (
|
| 77 |
+
pynutil.delete(' morphosyntactic_features: "')
|
| 78 |
+
+ pynutil.insert(" ")
|
| 79 |
+
+ per_units_normalized
|
| 80 |
+
+ pynutil.delete('" ')
|
| 81 |
+
)
|
| 82 |
+
graph += remove_per_units_normalized.ques
|
| 83 |
+
|
| 84 |
+
delete_tokens = self.delete_tokens(graph)
|
| 85 |
+
self.fst = delete_tokens.optimize()
|
vendor/zonos3/vendor/nemo_text_processing/text_normalization/en/verbalizers/ordinal.py
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Copyright (c) 2021, NVIDIA CORPORATION. All rights reserved.
|
| 2 |
+
#
|
| 3 |
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
| 4 |
+
# you may not use this file except in compliance with the License.
|
| 5 |
+
# You may obtain a copy of the License at
|
| 6 |
+
#
|
| 7 |
+
# http://www.apache.org/licenses/LICENSE-2.0
|
| 8 |
+
#
|
| 9 |
+
# Unless required by applicable law or agreed to in writing, software
|
| 10 |
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
| 11 |
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 12 |
+
# See the License for the specific language governing permissions and
|
| 13 |
+
# limitations under the License.
|
| 14 |
+
|
| 15 |
+
|
| 16 |
+
import pynini
|
| 17 |
+
from pynini.lib import pynutil
|
| 18 |
+
|
| 19 |
+
from zonos3.vendor.nemo_text_processing.text_normalization.en.graph_utils import NEMO_NOT_QUOTE, NEMO_SIGMA, GraphFst, delete_space
|
| 20 |
+
from zonos3.vendor.nemo_text_processing.text_normalization.en.utils import get_abs_path
|
| 21 |
+
|
| 22 |
+
|
| 23 |
+
class OrdinalFst(GraphFst):
|
| 24 |
+
"""
|
| 25 |
+
Finite state transducer for verbalizing ordinal, e.g.
|
| 26 |
+
ordinal { integer: "thirteen" } } -> thirteenth
|
| 27 |
+
|
| 28 |
+
Args:
|
| 29 |
+
deterministic: if True will provide a single transduction option,
|
| 30 |
+
for False multiple transduction are generated (used for audio-based normalization)
|
| 31 |
+
"""
|
| 32 |
+
|
| 33 |
+
def __init__(self, deterministic: bool = True):
|
| 34 |
+
super().__init__(name="ordinal", kind="verbalize", deterministic=deterministic)
|
| 35 |
+
|
| 36 |
+
graph_digit = pynini.string_file(get_abs_path("data/ordinal/digit.tsv")).invert()
|
| 37 |
+
graph_teens = pynini.string_file(get_abs_path("data/ordinal/teen.tsv")).invert()
|
| 38 |
+
|
| 39 |
+
graph = (
|
| 40 |
+
pynutil.delete("integer:")
|
| 41 |
+
+ delete_space
|
| 42 |
+
+ pynutil.delete("\"")
|
| 43 |
+
+ pynini.closure(NEMO_NOT_QUOTE, 1)
|
| 44 |
+
+ pynutil.delete("\"")
|
| 45 |
+
)
|
| 46 |
+
convert_rest = pynutil.insert("th")
|
| 47 |
+
|
| 48 |
+
suffix = pynini.cdrewrite(
|
| 49 |
+
graph_digit | graph_teens | pynini.cross("ty", "tieth") | convert_rest,
|
| 50 |
+
"",
|
| 51 |
+
"[EOS]",
|
| 52 |
+
NEMO_SIGMA,
|
| 53 |
+
).optimize()
|
| 54 |
+
self.graph = pynini.compose(graph, suffix)
|
| 55 |
+
self.suffix = suffix
|
| 56 |
+
delete_tokens = self.delete_tokens(self.gra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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Copyright (c) 2022, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
| 2 |
+
#
|
| 3 |
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
| 4 |
+
# you may not use this file except in compliance with the License.
|
| 5 |
+
# You may obtain a copy of the License at
|
| 6 |
+
#
|
| 7 |
+
# http://www.apache.org/licenses/LICENSE-2.0
|
| 8 |
+
#
|
| 9 |
+
# Unless required by applicable law or agreed to in writing, software
|
| 10 |
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
| 11 |
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 12 |
+
# See the License for the specific language governing permissions and
|
| 13 |
+
# limitations under the License.
|
| 14 |
+
|
| 15 |
+
import os
|
| 16 |
+
|
| 17 |
+
import pynini
|
| 18 |
+
from pynini.lib import pynutil
|
| 19 |
+
|
| 20 |
+
from zonos3.vendor.nemo_text_processing.text_normalization.en.graph_utils import (
|
| 21 |
+
MIN_NEG_WEIGHT,
|
| 22 |
+
NEMO_ALPHA,
|
| 23 |
+
NEMO_CHAR,
|
| 24 |
+
NEMO_SIGMA,
|
| 25 |
+
NEMO_SPACE,
|
| 26 |
+
generator_main,
|
| 27 |
+
)
|
| 28 |
+
from zonos3.vendor.nemo_text_processing.text_normalization.en.taggers.punctuation import PunctuationFst
|
| 29 |
+
from zonos3.vendor.nemo_text_processing.utils.logging import logger
|
| 30 |
+
|
| 31 |
+
|
| 32 |
+
class PostProcessingFst:
|
| 33 |
+
"""
|
| 34 |
+
Finite state transducer that post-processing an entire sentence after verbalization is complete, e.g.
|
| 35 |
+
removes extra spaces around punctuation marks " ( one hundred and twenty three ) " -> "(one hundred and twenty three)"
|
| 36 |
+
|
| 37 |
+
Args:
|
| 38 |
+
cache_dir: path to a dir with .far grammar file. Set to None to avoid using cache.
|
| 39 |
+
overwrite_cache: set to True to overwrite .far files
|
| 40 |
+
"""
|
| 41 |
+
|
| 42 |
+
def __init__(self, cache_dir: str = None, overwrite_cache: bool = False):
|
| 43 |
+
|
| 44 |
+
far_file = None
|
| 45 |
+
if cache_dir is not None and cache_dir != "None":
|
| 46 |
+
os.makedirs(cache_dir, exist_ok=True)
|
| 47 |
+
far_file = os.path.join(cache_dir, "en_tn_post_processing.far")
|
| 48 |
+
if not overwrite_cache and far_file and os.path.exists(far_file):
|
| 49 |
+
self.fst = pynini.Far(far_file, mode="r")["post_process_graph"]
|
| 50 |
+
logger.info(f'Post processing graph was restored from {far_file}.')
|
| 51 |
+
else:
|
| 52 |
+
self.set_punct_dict()
|
| 53 |
+
self.fst = self.get_punct_postprocess_graph()
|
| 54 |
+
|
| 55 |
+
if far_file:
|
| 56 |
+
generator_main(far_file, {"post_process_graph": self.fst})
|
| 57 |
+
|
| 58 |
+
def set_punct_dict(self):
|
| 59 |
+
self.punct_marks = {
|
| 60 |
+
"'": [
|
| 61 |
+
"'",
|
| 62 |
+
'´',
|
| 63 |
+
'ʹ',
|
| 64 |
+
'ʻ',
|
| 65 |
+
'ʼ',
|
| 66 |
+
'ʽ',
|
| 67 |
+
'ʾ',
|
| 68 |
+
'ˈ',
|
| 69 |
+
'ˊ',
|
| 70 |
+
'ˋ',
|
| 71 |
+
'˴',
|
| 72 |
+
'ʹ',
|
| 73 |
+
'΄',
|
| 74 |
+
'՚',
|
| 75 |
+
'՝',
|
| 76 |
+
'י',
|
| 77 |
+
'׳',
|
| 78 |
+
'ߴ',
|
| 79 |
+
'ߵ',
|
| 80 |
+
'ᑊ',
|
| 81 |
+
'ᛌ',
|
| 82 |
+
'᾽',
|
| 83 |
+
'᾿',
|
| 84 |
+
'`',
|
| 85 |
+
'´',
|
| 86 |
+
'῾',
|
| 87 |
+
'‘',
|
| 88 |
+
'’',
|
| 89 |
+
'‛',
|
| 90 |
+
'′',
|
| 91 |
+
'‵',
|
| 92 |
+
'ꞌ',
|
| 93 |
+
''',
|
| 94 |
+
'`',
|
| 95 |
+
'𖽑',
|
| 96 |
+
'𖽒',
|
| 97 |
+
],
|
| 98 |
+
}
|
| 99 |
+
|
| 100 |
+
def get_punct_postprocess_graph(self):
|
| 101 |
+
"""
|
| 102 |
+
Returns graph to post process punctuation marks.
|
| 103 |
+
|
| 104 |
+
{``} quotes are converted to {"}. Note, if there are spaces around single quote {'}, they will be kept.
|
| 105 |
+
By default, a space is added after a punctuation mark, and spaces are removed before punctuation marks.
|
| 106 |
+
"""
|
| 107 |
+
punct_marks_all = PunctuationFst().punct_marks
|
| 108 |
+
|
| 109 |
+
# no_space_before_punct assume no space before them
|
| 110 |
+
quotes = ["'", "\"", "``", "«"]
|
| 111 |
+
dashes = ["-", "—"]
|
| 112 |
+
brackets = ["<", "{", "(", r"\["]
|
| 113 |
+
open_close_single_quotes = [
|
| 114 |
+
("`", "`"),
|
| 115 |
+
]
|
| 116 |
+
|
| 117 |
+
open_close_double_quotes = [('"', '"'), ("``", "``"), ("“", "”")]
|
| 118 |
+
open_close_symbols = open_close_single_quotes + open_close_double_quotes
|
| 119 |
+
allow_space_before_punct = ["&"] + quotes + dashes + brackets + [k[0] for k in open_close_symbols]
|
| 120 |
+
|
| 121 |
+
no_space_before_punct = [m for m in punct_marks_all if m not in allow_space_before_punct]
|
| 122 |
+
no_space_before_punct = pynini.union(*no_space_before_punct)
|
| 123 |
+
no_space_after_punct = pynini.union(*brackets)
|
| 124 |
+
delete_space = pynutil.delete(" ")
|
| 125 |
+
delete_space_optional = pynini.closure(delete_space, 0, 1)
|
| 126 |
+
|
| 127 |
+
# non_punct allows space
|
| 128 |
+
# delete space before no_space_before_punct marks, if present
|
| 129 |
+
non_punct = pynini.difference(NEMO_CHAR, no_space_before_punct).optimize()
|
| 130 |
+
graph = (
|
| 131 |
+
pynini.closure(non_punct)
|
| 132 |
+
+ pynini.closure(
|
| 133 |
+
no_space_before_punct | pynutil.add_weight(delete_space + no_space_before_punct, MIN_NEG_WEIGHT)
|
| 134 |
+
)
|
| 135 |
+
+ pynini.closure(non_punct)
|
| 136 |
+
)
|
| 137 |
+
graph = pynini.closure(graph).optimize()
|
| 138 |
+
graph = pynini.compose(
|
| 139 |
+
graph, pynini.cdrewrite(pynini.cross("``", '"'), "", "", NEMO_SIGMA).optimize()
|
| 140 |
+
).optimize()
|
| 141 |
+
|
| 142 |
+
# remove space after no_space_after_punct (even if there are no matching closing brackets)
|
| 143 |
+
no_space_after_punct = pynini.cdrewrite(delete_space, no_space_after_punct, NEMO_SIGMA, NEMO_SIGMA).optimize()
|
| 144 |
+
graph = pynini.compose(graph, no_space_after_punct).optimize()
|
| 145 |
+
|
| 146 |
+
# remove space around text in quotes
|
| 147 |
+
single_quote = pynutil.add_weight(pynini.accep("`"), MIN_NEG_WEIGHT)
|
| 148 |
+
double_quotes = pynutil.add_weight(pynini.accep('"'), MIN_NEG_WEIGHT)
|
| 149 |
+
quotes_graph = (
|
| 150 |
+
single_quote + delete_space_optional + NEMO_ALPHA + NEMO_SIGMA + delete_space_optional + single_quote
|
| 151 |
+
).optimize()
|
| 152 |
+
|
| 153 |
+
# this is to make sure multiple quotes are tagged from right to left without skipping any quotes in the left
|
| 154 |
+
not_alpha = pynini.difference(NEMO_CHAR, NEMO_ALPHA).optimize() | pynutil.add_weight(
|
| 155 |
+
NEMO_SPACE, MIN_NEG_WEIGHT
|
| 156 |
+
)
|
| 157 |
+
end = pynini.closure(pynutil.add_weight(not_alpha, MIN_NEG_WEIGHT))
|
| 158 |
+
quotes_graph |= (
|
| 159 |
+
double_quotes
|
| 160 |
+
+ delete_space_optional
|
| 161 |
+
+ NEMO_ALPHA
|
| 162 |
+
+ NEMO_SIGMA
|
| 163 |
+
+ delete_space_optional
|
| 164 |
+
+ double_quotes
|
| 165 |
+
+ end
|
| 166 |
+
)
|
| 167 |
+
|
| 168 |
+
quotes_graph = pynutil.add_weight(quotes_graph, MIN_NEG_WEIGHT)
|
| 169 |
+
quotes_graph = NEMO_SIGMA + pynini.closure(NEMO_SIGMA + quotes_graph + NEMO_SIGMA)
|
| 170 |
+
|
| 171 |
+
graph = pynini.compose(graph, quotes_graph).optimize()
|
| 172 |
+
|
| 173 |
+
# remove space between a word and a single quote followed by s
|
| 174 |
+
remove_space_around_single_quote = pynini.cdrewrite(
|
| 175 |
+
delete_space_optional + pynini.union(*self.punct_marks["'"]) + delete_space,
|
| 176 |
+
NEMO_ALPHA,
|
| 177 |
+
pynini.union("s ", "s[EOS]"),
|
| 178 |
+
NEMO_SIGMA,
|
| 179 |
+
)
|
| 180 |
+
|
| 181 |
+
graph = pynini.compose(graph, remove_space_around_single_quote).optimize()
|
| 182 |
+
return graph
|
vendor/zonos3/vendor/nemo_text_processing/text_normalization/en/verbalizers/roman.py
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Copyright (c) 2021, NVIDIA CORPORATION. All rights reserved.
|
| 2 |
+
#
|
| 3 |
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
| 4 |
+
# you may not use this file except in compliance with the License.
|
| 5 |
+
# You may obtain a copy of the License at
|
| 6 |
+
#
|
| 7 |
+
# http://www.apache.org/licenses/LICENSE-2.0
|
| 8 |
+
#
|
| 9 |
+
# Unless required by applicable law or agreed to in writing, software
|
| 10 |
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
| 11 |
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 12 |
+
# See the License for the specific language governing permissions and
|
| 13 |
+
# limitations under the License.
|
| 14 |
+
|
| 15 |
+
import pynini
|
| 16 |
+
from pynini.lib import pynutil
|
| 17 |
+
|
| 18 |
+
from zonos3.vendor.nemo_text_processing.text_normalization.en.graph_utils import NEMO_NOT_QUOTE, GraphFst
|
| 19 |
+
from zonos3.vendor.nemo_text_processing.text_normalization.en.verbalizers.ordinal import OrdinalFst
|
| 20 |
+
|
| 21 |
+
|
| 22 |
+
class RomanFst(GraphFst):
|
| 23 |
+
"""
|
| 24 |
+
Finite state transducer for verbalizing roman numerals
|
| 25 |
+
e.g. tokens { roman { integer: "one" } } -> one
|
| 26 |
+
|
| 27 |
+
Args:
|
| 28 |
+
deterministic: if True will provide a single transduction option,
|
| 29 |
+
for False multiple transduction are generated (used for audio-based normalization)
|
| 30 |
+
"""
|
| 31 |
+
|
| 32 |
+
def __init__(self, deterministic: bool = True):
|
| 33 |
+
super().__init__(name="roman", kind="verbalize", deterministic=deterministic)
|
| 34 |
+
suffix = OrdinalFst().suffix
|
| 35 |
+
|
| 36 |
+
cardinal = pynini.closure(NEMO_NOT_QUOTE)
|
| 37 |
+
ordinal = pynini.compose(cardinal, suffix)
|
| 38 |
+
|
| 39 |
+
graph = (
|
| 40 |
+
pynutil.delete("key_cardinal: \"")
|
| 41 |
+
+ pynini.closure(NEMO_NOT_QUOTE, 1)
|
| 42 |
+
+ pynutil.delete("\"")
|
| 43 |
+
+ pynini.accep(" ")
|
| 44 |
+
+ pynutil.delete("integer: \"")
|
| 45 |
+
+ cardinal
|
| 46 |
+
+ pynutil.delete("\"")
|
| 47 |
+
).optimize()
|
| 48 |
+
|
| 49 |
+
graph |= (
|
| 50 |
+
pynutil.delete("default_cardinal: \"default\" integer: \"") + cardinal + pynutil.delete("\"")
|
| 51 |
+
).optimize()
|
| 52 |
+
|
| 53 |
+
graph |= (
|
| 54 |
+
pynutil.delete("default_ordinal: \"default\" integer: \"") + ordinal + pynutil.delete("\"")
|
| 55 |
+
).optimize()
|
| 56 |
+
|
| 57 |
+
graph |= (
|
| 58 |
+
pynutil.delete("key_the_ordinal: \"")
|
| 59 |
+
+ pynini.closure(NEMO_NOT_QUOTE, 1)
|
| 60 |
+
+ pynutil.delete("\"")
|
| 61 |
+
+ pynini.accep(" ")
|
| 62 |
+
+ pynutil.delete("integer: \"")
|
| 63 |
+
+ pynini.closure(pynutil.insert("the "), 0, 1)
|
| 64 |
+
+ ordinal
|
| 65 |
+
+ pynutil.delete("\"")
|
| 66 |
+
).optimize()
|
| 67 |
+
|
| 68 |
+
delete_tokens = self.delete_tokens(graph)
|
| 69 |
+
self.fst = delete_tokens.optimize()
|
vendor/zonos3/vendor/nemo_text_processing/text_normalization/en/verbalizers/telephone.py
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Copyright (c) 2021, NVIDIA CORPORATION. All rights reserved.
|
| 2 |
+
#
|
| 3 |
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
| 4 |
+
# you may not use this file except in compliance with the License.
|
| 5 |
+
# You may obtain a copy of the License at
|
| 6 |
+
#
|
| 7 |
+
# http://www.apache.org/licenses/LICENSE-2.0
|
| 8 |
+
#
|
| 9 |
+
# Unless required by applicable law or agreed to in writing, software
|
| 10 |
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
| 11 |
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 12 |
+
# See the License for the specific language governing permissions and
|
| 13 |
+
# limitations under the License.
|
| 14 |
+
|
| 15 |
+
import pynini
|
| 16 |
+
from pynini.lib import pynutil
|
| 17 |
+
|
| 18 |
+
from zonos3.vendor.nemo_text_processing.text_normalization.en.graph_utils import NEMO_NOT_QUOTE, GraphFst, delete_space, insert_space
|
| 19 |
+
|
| 20 |
+
|
| 21 |
+
class TelephoneFst(GraphFst):
|
| 22 |
+
"""
|
| 23 |
+
Finite state transducer for verbalizing telephone numbers, e.g.
|
| 24 |
+
telephone { country_code: "one" number_part: "one two three, one two three, five six seven eight" extension: "one" }
|
| 25 |
+
-> one, one two three, one two three, five six seven eight, one
|
| 26 |
+
|
| 27 |
+
Args:
|
| 28 |
+
deterministic: if True will provide a single transduction option,
|
| 29 |
+
for False multiple transduction are generated (used for audio-based normalization)
|
| 30 |
+
"""
|
| 31 |
+
|
| 32 |
+
def __init__(self, deterministic: bool = True):
|
| 33 |
+
super().__init__(name="telephone", kind="verbalize", deterministic=deterministic)
|
| 34 |
+
|
| 35 |
+
optional_country_code = pynini.closure(
|
| 36 |
+
pynutil.delete("country_code: \"")
|
| 37 |
+
+ pynini.closure(NEMO_NOT_QUOTE, 1)
|
| 38 |
+
+ pynutil.delete("\"")
|
| 39 |
+
+ delete_space
|
| 40 |
+
+ insert_space,
|
| 41 |
+
0,
|
| 42 |
+
1,
|
| 43 |
+
)
|
| 44 |
+
|
| 45 |
+
number_part = (
|
| 46 |
+
pynutil.delete("number_part: \"")
|
| 47 |
+
+ pynini.closure(NEMO_NOT_QUOTE, 1)
|
| 48 |
+
+ pynini.closure(pynutil.add_weight(pynutil.delete(" "), -0.0001), 0, 1)
|
| 49 |
+
+ pynutil.delete("\"")
|
| 50 |
+
)
|
| 51 |
+
|
| 52 |
+
optional_extension = pynini.closure(
|
| 53 |
+
delete_space
|
| 54 |
+
+ insert_space
|
| 55 |
+
+ pynutil.delete("extension: \"")
|
| 56 |
+
+ pynini.closure(NEMO_NOT_QUOTE, 1)
|
| 57 |
+
+ pynutil.delete("\""),
|
| 58 |
+
0,
|
| 59 |
+
1,
|
| 60 |
+
)
|
| 61 |
+
|
| 62 |
+
graph = optional_country_code + number_part + optional_extension
|
| 63 |
+
delete_tokens = self.delete_tokens(graph)
|
| 64 |
+
self.fst = delete_tokens.optimize()
|
vendor/zonos3/vendor/nemo_text_processing/text_normalization/en/verbalizers/time.py
ADDED
|
@@ -0,0 +1,103 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Copyright (c) 2021, NVIDIA CORPORATION. All rights reserved.
|
| 2 |
+
#
|
| 3 |
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
| 4 |
+
# you may not use this file except in compliance with the License.
|
| 5 |
+
# You may obtain a copy of the License at
|
| 6 |
+
#
|
| 7 |
+
# http://www.apache.org/licenses/LICENSE-2.0
|
| 8 |
+
#
|
| 9 |
+
# Unless required by applicable law or agreed to in writing, software
|
| 10 |
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
| 11 |
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 12 |
+
# See the License for the specific language governing permissions and
|
| 13 |
+
# limitations under the License.
|
| 14 |
+
|
| 15 |
+
import pynini
|
| 16 |
+
from pynini.lib import pynutil
|
| 17 |
+
|
| 18 |
+
from zonos3.vendor.nemo_text_processing.text_normalization.en.graph_utils import (
|
| 19 |
+
NEMO_NOT_QUOTE,
|
| 20 |
+
NEMO_SIGMA,
|
| 21 |
+
GraphFst,
|
| 22 |
+
delete_space,
|
| 23 |
+
insert_space,
|
| 24 |
+
)
|
| 25 |
+
|
| 26 |
+
|
| 27 |
+
class TimeFst(GraphFst):
|
| 28 |
+
"""
|
| 29 |
+
Finite state transducer for verbalizing time, e.g.
|
| 30 |
+
time { hours: "twelve" minutes: "thirty" suffix: "a m" zone: "e s t" } -> twelve thirty a m e s t
|
| 31 |
+
time { hours: "twelve" } -> twelve o'clock
|
| 32 |
+
|
| 33 |
+
Args:
|
| 34 |
+
deterministic: if True will provide a single transduction option,
|
| 35 |
+
for False multiple transduction are generated (used for audio-based normalization)
|
| 36 |
+
"""
|
| 37 |
+
|
| 38 |
+
def __init__(self, deterministic: bool = True):
|
| 39 |
+
super().__init__(name="time", kind="verbalize", deterministic=deterministic)
|
| 40 |
+
hour = (
|
| 41 |
+
pynutil.delete("hours:")
|
| 42 |
+
+ delete_space
|
| 43 |
+
+ pynutil.delete("\"")
|
| 44 |
+
+ pynini.closure(NEMO_NOT_QUOTE, 1)
|
| 45 |
+
+ pynutil.delete("\"")
|
| 46 |
+
)
|
| 47 |
+
minute = (
|
| 48 |
+
pynutil.delete("minutes:")
|
| 49 |
+
+ delete_space
|
| 50 |
+
+ pynutil.delete("\"")
|
| 51 |
+
+ pynini.closure(NEMO_NOT_QUOTE, 1)
|
| 52 |
+
+ pynutil.delete("\"")
|
| 53 |
+
)
|
| 54 |
+
suffix = (
|
| 55 |
+
pynutil.delete("suffix:")
|
| 56 |
+
+ delete_space
|
| 57 |
+
+ pynutil.delete("\"")
|
| 58 |
+
+ pynini.closure(NEMO_NOT_QUOTE, 1)
|
| 59 |
+
+ pynutil.delete("\"")
|
| 60 |
+
)
|
| 61 |
+
optional_suffix = pynini.closure(delete_space + insert_space + suffix, 0, 1)
|
| 62 |
+
zone = (
|
| 63 |
+
pynutil.delete("zone:")
|
| 64 |
+
+ delete_space
|
| 65 |
+
+ pynutil.delete("\"")
|
| 66 |
+
+ pynini.closure(NEMO_NOT_QUOTE, 1)
|
| 67 |
+
+ pynutil.delete("\"")
|
| 68 |
+
)
|
| 69 |
+
optional_zone = pynini.closure(delete_space + insert_space + zone, 0, 1)
|
| 70 |
+
second = (
|
| 71 |
+
pynutil.delete("seconds:")
|
| 72 |
+
+ delete_space
|
| 73 |
+
+ pynutil.delete("\"")
|
| 74 |
+
+ pynini.closure(NEMO_NOT_QUOTE, 1)
|
| 75 |
+
+ pynutil.delete("\"")
|
| 76 |
+
)
|
| 77 |
+
graph_hms = (
|
| 78 |
+
hour
|
| 79 |
+
+ pynutil.insert(" hours ")
|
| 80 |
+
+ delete_space
|
| 81 |
+
+ minute
|
| 82 |
+
+ pynutil.insert(" minutes and ")
|
| 83 |
+
+ delete_space
|
| 84 |
+
+ second
|
| 85 |
+
+ pynutil.insert(" seconds")
|
| 86 |
+
+ optional_suffix
|
| 87 |
+
+ optional_zone
|
| 88 |
+
)
|
| 89 |
+
graph_hms @= pynini.cdrewrite(pynini.cross("one hours", "one hour"), "[BOS]", "", NEMO_SIGMA)
|
| 90 |
+
graph_hms @= pynini.cdrewrite(
|
| 91 |
+
pynutil.delete("o ")
|
| 92 |
+
| pynutil.add_weight(pynini.cross("o one minutes", "one minute"), -0.01)
|
| 93 |
+
| pynutil.add_weight(pynini.cross("o one seconds", "one second"), -0.01),
|
| 94 |
+
" ",
|
| 95 |
+
"",
|
| 96 |
+
NEMO_SIGMA,
|
| 97 |
+
)
|
| 98 |
+
graph = hour + delete_space + insert_space + minute + optional_suffix + optional_zone
|
| 99 |
+
graph |= hour + insert_space + pynutil.insert("o'clock") + optional_zone
|
| 100 |
+
graph |= hour + delete_space + insert_space + suffix + optional_zone
|
| 101 |
+
graph |= graph_hms
|
| 102 |
+
delete_tokens = self.delete_tokens(graph)
|
| 103 |
+
self.fst = delete_tokens.optimize()
|
vendor/zonos3/vendor/nemo_text_processing/text_normalization/en/verbalizers/verbalize.py
ADDED
|
@@ -0,0 +1,82 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Copyright (c) 2021, NVIDIA CORPORATION. All rights reserved.
|
| 2 |
+
#
|
| 3 |
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
| 4 |
+
# you may not use this file except in compliance with the License.
|
| 5 |
+
# You may obtain a copy of the License at
|
| 6 |
+
#
|
| 7 |
+
# http://www.apache.org/licenses/LICENSE-2.0
|
| 8 |
+
#
|
| 9 |
+
# Unless required by applicable law or agreed to in writing, software
|
| 10 |
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
| 11 |
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 12 |
+
# See the License for the specific language governing permissions and
|
| 13 |
+
# limitations under the License.
|
| 14 |
+
|
| 15 |
+
from zonos3.vendor.nemo_text_processing.text_normalization.en.graph_utils import GraphFst
|
| 16 |
+
from zonos3.vendor.nemo_text_processing.text_normalization.en.verbalizers.abbreviation import AbbreviationFst
|
| 17 |
+
from zonos3.vendor.nemo_text_processing.text_normalization.en.verbalizers.cardinal import CardinalFst
|
| 18 |
+
from zonos3.vendor.nemo_text_processing.text_normalization.en.verbalizers.date import DateFst
|
| 19 |
+
from zonos3.vendor.nemo_text_processing.text_normalization.en.verbalizers.decimal import DecimalFst
|
| 20 |
+
from zonos3.vendor.nemo_text_processing.text_normalization.en.verbalizers.electronic import ElectronicFst
|
| 21 |
+
from zonos3.vendor.nemo_text_processing.text_normalization.en.verbalizers.fraction import FractionFst
|
| 22 |
+
from zonos3.vendor.nemo_text_processing.text_normalization.en.verbalizers.measure import MeasureFst
|
| 23 |
+
from zonos3.vendor.nemo_text_processing.text_normalization.en.verbalizers.money import MoneyFst
|
| 24 |
+
from zonos3.vendor.nemo_text_processing.text_normalization.en.verbalizers.ordinal import OrdinalFst
|
| 25 |
+
from zonos3.vendor.nemo_text_processing.text_normalization.en.verbalizers.roman import RomanFst
|
| 26 |
+
from zonos3.vendor.nemo_text_processing.text_normalization.en.verbalizers.telephone import TelephoneFst
|
| 27 |
+
from zonos3.vendor.nemo_text_processing.text_normalization.en.verbalizers.time import TimeFst
|
| 28 |
+
from zonos3.vendor.nemo_text_processing.text_normalization.en.verbalizers.whitelist import WhiteListFst
|
| 29 |
+
|
| 30 |
+
|
| 31 |
+
class VerbalizeFst(GraphFst):
|
| 32 |
+
"""
|
| 33 |
+
Composes other verbalizer grammars.
|
| 34 |
+
For deployment, this grammar will be compiled and exported to OpenFst Finite State Archive (FAR) File.
|
| 35 |
+
More details to deployment at NeMo/tools/text_processing_deployment.
|
| 36 |
+
|
| 37 |
+
Args:
|
| 38 |
+
deterministic: if True will provide a single transduction option,
|
| 39 |
+
for False multiple options (used for audio-based normalization)
|
| 40 |
+
"""
|
| 41 |
+
|
| 42 |
+
def __init__(self, deterministic: bool = True):
|
| 43 |
+
super().__init__(name="verbalize", kind="verbalize", deterministic=deterministic)
|
| 44 |
+
cardinal = CardinalFst(deterministic=deterministic)
|
| 45 |
+
cardinal_graph = cardinal.fst
|
| 46 |
+
decimal = DecimalFst(cardinal=cardinal, deterministic=deterministic)
|
| 47 |
+
decimal_graph = decimal.fst
|
| 48 |
+
ordinal = OrdinalFst(deterministic=deterministic)
|
| 49 |
+
ordinal_graph = ordinal.fst
|
| 50 |
+
fraction = FractionFst(deterministic=deterministic)
|
| 51 |
+
fraction_graph = fraction.fst
|
| 52 |
+
telephone_graph = TelephoneFst(deterministic=deterministic).fst
|
| 53 |
+
electronic_graph = ElectronicFst(deterministic=deterministic).fst
|
| 54 |
+
measure = MeasureFst(decimal=decimal, cardinal=cardinal, fraction=fraction, deterministic=deterministic)
|
| 55 |
+
measure_graph = measure.fst
|
| 56 |
+
time_graph = TimeFst(deterministic=deterministic).fst
|
| 57 |
+
date_graph = DateFst(ordinal=ordinal, deterministic=deterministic).fst
|
| 58 |
+
money_graph = MoneyFst(decimal=decimal, deterministic=deterministic).fst
|
| 59 |
+
whitelist_graph = WhiteListFst(deterministic=deterministic).fst
|
| 60 |
+
|
| 61 |
+
graph = (
|
| 62 |
+
time_graph
|
| 63 |
+
| date_graph
|
| 64 |
+
| money_graph
|
| 65 |
+
| measure_graph
|
| 66 |
+
| ordinal_graph
|
| 67 |
+
| decimal_graph
|
| 68 |
+
| cardinal_graph
|
| 69 |
+
| telephone_graph
|
| 70 |
+
| electronic_graph
|
| 71 |
+
| fraction_graph
|
| 72 |
+
| whitelist_graph
|
| 73 |
+
)
|
| 74 |
+
|
| 75 |
+
roman_graph = RomanFst(deterministic=deterministic).fst
|
| 76 |
+
graph |= roman_graph
|
| 77 |
+
|
| 78 |
+
if not deterministic:
|
| 79 |
+
abbreviation_graph = AbbreviationFst(deterministic=deterministic).fst
|
| 80 |
+
graph |= abbreviation_graph
|
| 81 |
+
|
| 82 |
+
self.fst = graph
|
vendor/zonos3/vendor/nemo_text_processing/text_normalization/en/verbalizers/verbalize_final.py
ADDED
|
@@ -0,0 +1,75 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Copyright (c) 2021, NVIDIA CORPORATION. All rights reserved.
|
| 2 |
+
#
|
| 3 |
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
| 4 |
+
# you may not use this file except in compliance with the License.
|
| 5 |
+
# You may obtain a copy of the License at
|
| 6 |
+
#
|
| 7 |
+
# http://www.apache.org/licenses/LICENSE-2.0
|
| 8 |
+
#
|
| 9 |
+
# Unless required by applicable law or agreed to in writing, software
|
| 10 |
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
| 11 |
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 12 |
+
# See the License for the specific language governing permissions and
|
| 13 |
+
# limitations under the License.
|
| 14 |
+
|
| 15 |
+
import os
|
| 16 |
+
|
| 17 |
+
import pynini
|
| 18 |
+
from pynini.lib import pynutil
|
| 19 |
+
|
| 20 |
+
from zonos3.vendor.nemo_text_processing.text_normalization.en.graph_utils import (
|
| 21 |
+
GraphFst,
|
| 22 |
+
delete_extra_space,
|
| 23 |
+
delete_space,
|
| 24 |
+
generator_main,
|
| 25 |
+
)
|
| 26 |
+
from zonos3.vendor.nemo_text_processing.text_normalization.en.verbalizers.verbalize import VerbalizeFst
|
| 27 |
+
from zonos3.vendor.nemo_text_processing.text_normalization.en.verbalizers.word import WordFst
|
| 28 |
+
from zonos3.vendor.nemo_text_processing.utils.logging import logger
|
| 29 |
+
|
| 30 |
+
|
| 31 |
+
class VerbalizeFinalFst(GraphFst):
|
| 32 |
+
"""
|
| 33 |
+
Finite state transducer that verbalizes an entire sentence, e.g.
|
| 34 |
+
tokens { name: "its" } tokens { time { hours: "twelve" minutes: "thirty" } } tokens { name: "now" } tokens { name: "." } -> its twelve thirty now .
|
| 35 |
+
|
| 36 |
+
Args:
|
| 37 |
+
deterministic: if True will provide a single transduction option,
|
| 38 |
+
for False multiple options (used for audio-based normalization)
|
| 39 |
+
cache_dir: path to a dir with .far grammar file. Set to None to avoid using cache.
|
| 40 |
+
overwrite_cache: set to True to overwrite .far files
|
| 41 |
+
"""
|
| 42 |
+
|
| 43 |
+
def __init__(self, deterministic: bool = True, cache_dir: str = None, overwrite_cache: bool = False):
|
| 44 |
+
super().__init__(name="verbalize_final", kind="verbalize", deterministic=deterministic)
|
| 45 |
+
|
| 46 |
+
far_file = None
|
| 47 |
+
if cache_dir is not None and cache_dir != "None":
|
| 48 |
+
os.makedirs(cache_dir, exist_ok=True)
|
| 49 |
+
far_file = os.path.join(cache_dir, f"en_tn_{deterministic}_deterministic_verbalizer.far")
|
| 50 |
+
if not overwrite_cache and far_file and os.path.exists(far_file):
|
| 51 |
+
self.fst = pynini.Far(far_file, mode="r")["verbalize"]
|
| 52 |
+
logger.info(f'VerbalizeFinalFst graph was restored from {far_file}.')
|
| 53 |
+
else:
|
| 54 |
+
verbalize = VerbalizeFst(deterministic=deterministic).fst
|
| 55 |
+
word = WordFst(deterministic=deterministic).fst
|
| 56 |
+
types = verbalize | word
|
| 57 |
+
|
| 58 |
+
if deterministic:
|
| 59 |
+
graph = (
|
| 60 |
+
pynutil.delete("tokens")
|
| 61 |
+
+ delete_space
|
| 62 |
+
+ pynutil.delete("{")
|
| 63 |
+
+ delete_space
|
| 64 |
+
+ types
|
| 65 |
+
+ delete_space
|
| 66 |
+
+ pynutil.delete("}")
|
| 67 |
+
)
|
| 68 |
+
else:
|
| 69 |
+
graph = delete_space + types + delete_space
|
| 70 |
+
|
| 71 |
+
graph = delete_space + pynini.closure(graph + delete_extra_space) + graph + delete_space
|
| 72 |
+
|
| 73 |
+
self.fst = graph.optimize()
|
| 74 |
+
if far_file:
|
| 75 |
+
generator_main(far_file, {"verbalize": self.fst})
|
vendor/zonos3/vendor/nemo_text_processing/text_normalization/en/verbalizers/whitelist.py
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Copyright (c) 2021, NVIDIA CORPORATION. All rights reserved.
|
| 2 |
+
#
|
| 3 |
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
| 4 |
+
# you may not use this file except in compliance with the License.
|
| 5 |
+
# You may obtain a copy of the License at
|
| 6 |
+
#
|
| 7 |
+
# http://www.apache.org/licenses/LICENSE-2.0
|
| 8 |
+
#
|
| 9 |
+
# Unless required by applicable law or agreed to in writing, software
|
| 10 |
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
| 11 |
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 12 |
+
# See the License for the specific language governing permissions and
|
| 13 |
+
# limitations under the License.
|
| 14 |
+
import pynini
|
| 15 |
+
from pynini.lib import pynutil
|
| 16 |
+
|
| 17 |
+
from zonos3.vendor.nemo_text_processing.text_normalization.en.graph_utils import NEMO_CHAR, NEMO_SIGMA, GraphFst, delete_space
|
| 18 |
+
|
| 19 |
+
|
| 20 |
+
class WhiteListFst(GraphFst):
|
| 21 |
+
"""
|
| 22 |
+
Finite state transducer for verbalizing whitelist
|
| 23 |
+
e.g. tokens { name: "misses" } } -> misses
|
| 24 |
+
|
| 25 |
+
Args:
|
| 26 |
+
deterministic: if True will provide a single transduction option,
|
| 27 |
+
for False multiple transduction are generated (used for audio-based normalization)
|
| 28 |
+
"""
|
| 29 |
+
|
| 30 |
+
def __init__(self, deterministic: bool = True):
|
| 31 |
+
super().__init__(name="whitelist", kind="verbalize", deterministic=deterministic)
|
| 32 |
+
graph = (
|
| 33 |
+
pynutil.delete("name:")
|
| 34 |
+
+ delete_space
|
| 35 |
+
+ pynutil.delete("\"")
|
| 36 |
+
+ pynini.closure(NEMO_CHAR - " ", 1)
|
| 37 |
+
+ pynutil.delete("\"")
|
| 38 |
+
)
|
| 39 |
+
graph = graph @ pynini.cdrewrite(pynini.cross(u"\u00a0", " "), "", "", NEMO_SIGMA)
|
| 40 |
+
self.fst = graph.optimize()
|
vendor/zonos3/vendor/nemo_text_processing/text_normalization/en/verbalizers/word.py
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Copyright (c) 2021, NVIDIA CORPORATION. All rights reserved.
|
| 2 |
+
#
|
| 3 |
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
| 4 |
+
# you may not use this file except in compliance with the License.
|
| 5 |
+
# You may obtain a copy of the License at
|
| 6 |
+
#
|
| 7 |
+
# http://www.apache.org/licenses/LICENSE-2.0
|
| 8 |
+
#
|
| 9 |
+
# Unless required by applicable law or agreed to in writing, software
|
| 10 |
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
| 11 |
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 12 |
+
# See the License for the specific language governing permissions and
|
| 13 |
+
# limitations under the License.
|
| 14 |
+
import pynini
|
| 15 |
+
from pynini.lib import pynutil
|
| 16 |
+
|
| 17 |
+
from zonos3.vendor.nemo_text_processing.text_normalization.en.graph_utils import NEMO_CHAR, NEMO_SIGMA, GraphFst, delete_space
|
| 18 |
+
|
| 19 |
+
|
| 20 |
+
class WordFst(GraphFst):
|
| 21 |
+
"""
|
| 22 |
+
Finite state transducer for verbalizing word
|
| 23 |
+
e.g. tokens { name: "sleep" } -> sleep
|
| 24 |
+
|
| 25 |
+
Args:
|
| 26 |
+
deterministic: if True will provide a single transduction option,
|
| 27 |
+
for False multiple transduction are generated (used for audio-based normalization)
|
| 28 |
+
"""
|
| 29 |
+
|
| 30 |
+
def __init__(self, deterministic: bool = True):
|
| 31 |
+
super().__init__(name="word", kind="verbalize", deterministic=deterministic)
|
| 32 |
+
chars = pynini.closure(NEMO_CHAR - " ", 1)
|
| 33 |
+
char = pynutil.delete("name:") + delete_space + pynutil.delete("\"") + chars + pynutil.delete("\"")
|
| 34 |
+
graph = char @ pynini.cdrewrite(pynini.cross(u"\u00a0", " "), "", "", NEMO_SIGMA)
|
| 35 |
+
|
| 36 |
+
self.fst = graph.optimize()
|
vendor/zonos3/vendor/nemo_text_processing/text_normalization/es/README.md
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Localization Note
|
| 2 |
+
|
| 3 |
+
Depending on locale, Spanish number strings will vary in formatting. In the EU and South American countries, it is common to use a period (".") or space to delineate groupings of three
|
| 4 |
+
digits. e.g.
|
| 5 |
+
`1.000.000` -> "un millón"
|
| 6 |
+
`1 000 000` -> "un millón"
|
| 7 |
+
|
| 8 |
+
and commas (",") to seperate cardinal and decimal strings. e.g.
|
| 9 |
+
|
| 10 |
+
`1,00` -> "uno coma cero cero"
|
| 11 |
+
|
| 12 |
+
While Central and Northern America will use commas (",") to delineate groupings of three digits, e.g.
|
| 13 |
+
`1,000,000` -> "un millón"
|
| 14 |
+
|
| 15 |
+
and periods (".") to seperate cardinal and decimal strings. e.g.
|
| 16 |
+
|
| 17 |
+
`1.00` -> "uno coma cero cero"
|
| 18 |
+
|
| 19 |
+
As inclusion of both forms will create inherrent ambiguity for verbalization, this module defaults to the former formatting (periods for cardinal delineation and commas for decimals).
|
| 20 |
+
|
| 21 |
+
To toggle the alternate formatting, you may edit the `LOCALIZATION` variable in `nemo_text_processing.text_normalization.es.__init__` with the value of `'am'`. This will perform necessary
|
| 22 |
+
adjustments to all affected classes.
|
vendor/zonos3/vendor/nemo_text_processing/text_normalization/es/__init__.py
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Copyright (c) 2022, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
| 2 |
+
#
|
| 3 |
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
| 4 |
+
# you may not use this file except in compliance with the License.
|
| 5 |
+
# You may obtain a copy of the License at
|
| 6 |
+
#
|
| 7 |
+
# http://www.apache.org/licenses/LICENSE-2.0
|
| 8 |
+
#
|
| 9 |
+
# Unless required by applicable law or agreed to in writing, software
|
| 10 |
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
| 11 |
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 12 |
+
# See the License for the specific language governing permissions and
|
| 13 |
+
# limitations under the License.
|
| 14 |
+
|
| 15 |
+
LOCALIZATION = "eu" # Set to am for alternate formatting
|
vendor/zonos3/vendor/nemo_text_processing/text_normalization/es/data/__init__.py
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Copyright (c) 2022, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
| 2 |
+
#
|
| 3 |
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
| 4 |
+
# you may not use this file except in compliance with the License.
|
| 5 |
+
# You may obtain a copy of the License at
|
| 6 |
+
#
|
| 7 |
+
# http://www.apache.org/licenses/LICENSE-2.0
|
| 8 |
+
#
|
| 9 |
+
# Unless required by applicable law or agreed to in writing, software
|
| 10 |
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
| 11 |
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 12 |
+
# See the License for the specific language governing permissions and
|
| 13 |
+
# limitations under the License.
|
vendor/zonos3/vendor/nemo_text_processing/text_normalization/es/data/dates/__init__.py
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Copyright (c) 2022, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
| 2 |
+
#
|
| 3 |
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
| 4 |
+
# you may not use this file except in compliance with the License.
|
| 5 |
+
# You may obtain a copy of the License at
|
| 6 |
+
#
|
| 7 |
+
# http://www.apache.org/licenses/LICENSE-2.0
|
| 8 |
+
#
|
| 9 |
+
# Unless required by applicable law or agreed to in writing, software
|
| 10 |
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
| 11 |
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 12 |
+
# See the License for the specific language governing permissions and
|
| 13 |
+
# limitations under the License.
|
vendor/zonos3/vendor/nemo_text_processing/text_normalization/es/data/dates/days_abbr.tsv
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
LU lunes
|
| 2 |
+
lun. lunes
|
| 3 |
+
LUN lunes
|
| 4 |
+
ma. martes
|
| 5 |
+
MA martes
|
| 6 |
+
mar. martes
|
| 7 |
+
mi. miércoles
|
| 8 |
+
mié. miércoles
|
| 9 |
+
miér. miércoles
|
| 10 |
+
MIÉ miércoles
|
| 11 |
+
mié miércoles
|
| 12 |
+
miér miércoles
|
| 13 |
+
ju. jueves
|
| 14 |
+
JU jueves
|
| 15 |
+
jue jueves
|
| 16 |
+
JUE jueves
|
| 17 |
+
vie. viernes
|
| 18 |
+
vier. viernes
|
| 19 |
+
vie viernes
|
| 20 |
+
vier. viernes
|
| 21 |
+
sá. sábado
|
| 22 |
+
sáb sábado
|
| 23 |
+
sáb. sábado
|
| 24 |
+
SÁB sábado
|
| 25 |
+
do. domingo
|
| 26 |
+
dom. domingo
|
| 27 |
+
DOM domingo
|
vendor/zonos3/vendor/nemo_text_processing/text_normalization/es/data/dates/months.tsv
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
1 enero
|
| 2 |
+
2 febrero
|
| 3 |
+
3 marzo
|
| 4 |
+
4 abril
|
| 5 |
+
5 mayo
|
| 6 |
+
6 junio
|
| 7 |
+
7 julio
|
| 8 |
+
8 agosto
|
| 9 |
+
9 septiembre
|
| 10 |
+
10 octubre
|
| 11 |
+
11 noviembre
|
| 12 |
+
12 diciembre
|
vendor/zonos3/vendor/nemo_text_processing/text_normalization/es/data/dates/months_abbr.tsv
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
ene. enero
|
| 2 |
+
en. enero
|
| 3 |
+
ENE enero
|
| 4 |
+
febr. febrero
|
| 5 |
+
FEB febrero
|
| 6 |
+
feb. febrero
|
| 7 |
+
mzo. marzo
|
| 8 |
+
mzo marzo
|
| 9 |
+
MAR marzo
|
| 10 |
+
mar. marzo
|
| 11 |
+
abr. abril
|
| 12 |
+
ABR abril
|
| 13 |
+
abr abril
|
| 14 |
+
my. mayo
|
| 15 |
+
MAY mayo
|
| 16 |
+
may. mayo
|
| 17 |
+
may mayo
|
| 18 |
+
jun. junio
|
| 19 |
+
JUN junio
|
| 20 |
+
jun junio
|
| 21 |
+
jul. julio
|
| 22 |
+
JUL julio
|
| 23 |
+
jul julio
|
| 24 |
+
AGO agosto
|
| 25 |
+
ag. agosto
|
| 26 |
+
agt. agosto
|
| 27 |
+
ago. agosto
|
| 28 |
+
set. septiembre
|
| 29 |
+
sept. septiembre
|
| 30 |
+
setbre. septiembre
|
| 31 |
+
sept septiembre
|
| 32 |
+
setbre septiembre
|
| 33 |
+
SEP septiembre
|
| 34 |
+
oct. octubre
|
| 35 |
+
OCT octubre
|
| 36 |
+
oct octubre
|
| 37 |
+
nov. noviembre
|
| 38 |
+
novbre. noviembre
|
| 39 |
+
NOV noviembre
|
| 40 |
+
nov noviembre
|
| 41 |
+
novbre noviembre
|
| 42 |
+
dic. diciembre
|
| 43 |
+
dicbre. diciembre
|
| 44 |
+
DIC diciembre
|
vendor/zonos3/vendor/nemo_text_processing/text_normalization/es/data/dates/year_suffix.tsv
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
ane antes de nuestra era
|
| 2 |
+
a.n.e. antes de nuestra era
|
| 3 |
+
a. n. e. antes de nuestra era
|
| 4 |
+
aec antes de la era común
|
| 5 |
+
a.e.c antes de la era común
|
| 6 |
+
a. e. c. antes de la era común
|
| 7 |
+
ac antes de cristo
|
| 8 |
+
a.c. antes de cristo
|
| 9 |
+
a. c. antes de cristo
|
| 10 |
+
adc antes de cristo
|
| 11 |
+
a.d.c. antes de cristo
|
| 12 |
+
a. d. c. antes de cristo
|
| 13 |
+
a. de c. antes de cristo
|
| 14 |
+
ajc antes de jesucristo
|
| 15 |
+
a.j.c. antes de jesucristo
|
| 16 |
+
a. j. c. antes de jesucristo
|
| 17 |
+
adjc antes de jesucristo
|
| 18 |
+
a.d.j.c. antes de jesucristo
|
| 19 |
+
a. d. j. c. antes de jesucristo
|
| 20 |
+
a. de j.c. antes de jesucristo
|
| 21 |
+
a. de j. c. antes de jesucristo
|
| 22 |
+
ap antes del presente
|
| 23 |
+
a.p. antes del presente
|
| 24 |
+
a. p. antes del presente
|
| 25 |
+
bp antes del presente
|
| 26 |
+
b.p. antes del presente
|
| 27 |
+
b. p. antes del presente
|
| 28 |
+
ne nuestra era
|
| 29 |
+
n.e. nuestra era
|
| 30 |
+
n. e. nuestra era
|
| 31 |
+
ec era común
|
| 32 |
+
e.c. era común
|
| 33 |
+
e. c. era común
|
| 34 |
+
dc después de cristo
|
| 35 |
+
d.c. después de cristo
|
| 36 |
+
d. c. después de cristo
|
| 37 |
+
ddc después de cristo
|
| 38 |
+
d.d.c después de cristo
|
| 39 |
+
d. d. c. después de cristo
|
| 40 |
+
d. de c. después de cristo
|
| 41 |
+
ddjc después de jesucristo
|
| 42 |
+
d.d.j.c después de jesucristo
|
| 43 |
+
d. d. j. c. después de jesucristo
|
| 44 |
+
d. de j.c. después de jesucristo
|
| 45 |
+
d. de j. c. después de jesucristo
|
| 46 |
+
bc b c
|
| 47 |
+
b.c. b c
|
| 48 |
+
b. c. b c
|
| 49 |
+
ad a d
|
| 50 |
+
a.d. a d
|
| 51 |
+
a. d. a d
|