From 9a53dc225d0f2acb3117c58635e3926acd517b90 Mon Sep 17 00:00:00 2001 From: David de Hilster Date: Wed, 31 Jul 2024 09:17:18 -0400 Subject: [PATCH] VISUAL-TEXT-104 Added postal designators and url stuff Signed-off-by: David de Hilster --- .../en-postal-secondary-designators.dict | 41 + .../en-postal-secondary-designators.kbb | 42 + misc/url-countries.dict | 264 ++++ misc/url-domains.dict | 1135 +++++++++++++++++ spec/KBFuncs.nlp | 40 +- 5 files changed, 1518 insertions(+), 4 deletions(-) create mode 100644 languages/English/en-postal-secondary-designators.dict create mode 100644 languages/English/en-postal-secondary-designators.kbb create mode 100644 misc/url-countries.dict create mode 100644 misc/url-domains.dict diff --git a/languages/English/en-postal-secondary-designators.dict b/languages/English/en-postal-secondary-designators.dict new file mode 100644 index 0000000..e8748c2 --- /dev/null +++ b/languages/English/en-postal-secondary-designators.dict @@ -0,0 +1,41 @@ +# Secondary Postal Designators +apartment secdesignator=1 abbrev="apt" +apt secdesignator=1 full="apartment" +basement secdesignator=1 abbrev="bsmt" +bldg secdesignator=1 full="building" +bsmt secdesignator=1 full="basement" +building secdesignator=1 abbrev="bldg" +department secdesignator=1 abbrev="dept" +dept secdesignator=1 full="department" +fl secdesignator=1 full="floor" +floor secdesignator=1 abbrev="fl" +frnt secdesignator=1 full="front" +front secdesignator=1 abbrev="frnt" +hanger secdesignator=1 abbrev="hngr" +hngr secdesignator=1 full="hanger" +key secdesignator=1 +lbby secdesignator=1 full="lobby" +lobby secdesignator=1 abbrev="lbby" +lot secdesignator=1 +lower secdesignator=1 abbrev="lowr" +lowr secdesignator=1 full="lower" +ofc secdesignator=1 full="office" +office secdesignator=1 abbrev="ofc" +penthouse secdesignator=1 abbrev="ph" +ph secdesignator=1 full="penthouse" +pier secdesignator=1 +rear secdesignator=1 +rm secdesignator=1 full="room" +room secdesignator=1 abbrev="rm" +side secdesignator=1 +slip secdesignator=1 +space secdesignator=1 abbrev="spc" +spc secdesignator=1 full="space" +ste secdesignator=1 full="suite" +stop secdesignator=1 +suite secdesignator=1 abbrev="ste" +trailer secdesignator=1 abbrev="trlr" +trlr secdesignator=1 full="trailer" +unit secdesignator=1 +upper secdesignator=1 abbrev="uppr" +uppr secdesignator=1 full="upper" diff --git a/languages/English/en-postal-secondary-designators.kbb b/languages/English/en-postal-secondary-designators.kbb new file mode 100644 index 0000000..0f322e9 --- /dev/null +++ b/languages/English/en-postal-secondary-designators.kbb @@ -0,0 +1,42 @@ +designators + apartment: abbrev=apt + apt: full=apartment + basement: abbrev=bsmt + bldg: full=building + bsmt: full=basement + building: abbrev=bldg + department: abbrev=dept + dept: full=department + fl: full=floor + floor: abbrev=fl + frnt: full=front + front: abbrev=frnt + hanger: abbrev=hngr + hngr: full=hanger + key: full=key, abbrev=key + lbby: full=lobby + lobby: abbrev=lbby + lot: full=lot, abbrev=lot + lower: abbrev=lowr + lowr: full=lower + ofc: full=office + office: abbrev=ofc + penthouse: abbrev=ph + ph: full=penthouse + pier: full=pier, abbrev=pier + rear: full=rear, abbrev=rear + rm: full=room + room: abbrev=rm + side: full=side, abbrev=side + slip: full=slip, abbrev=slip + space: abbrev=spc + spc: full=space + ste: full=suite + stop: full=stop, abbrev=stop + suite: abbrev=ste + trailer: abbrev=trlr + trlr: full=trailer + unit: full=unit, abbrev=unit + upper: abbrev=uppr + uppr: full=upper + diff --git a/misc/url-countries.dict b/misc/url-countries.dict new file mode 100644 index 0000000..2f6333a --- /dev/null +++ b/misc/url-countries.dict @@ -0,0 +1,264 @@ +# URL urlcountry Codes +ac urlcountry="Ascension Island" +ad urlcountry="Andorra" +ae urlcountry="United Arab Emirates" +aero urlcountry="Aeronautical reserved for the aerospace industry" +af urlcountry="Afghanistan" +ag urlcountry="Antigua and Barbuda" +ai urlcountry="Anguilla" +al urlcountry="Albania" +am urlcountry="Armenia" +an urlcountry="Netherlands Antilles No longer in use" +ao urlcountry="Angola" +aq urlcountry="Antarctica" +ar urlcountry="Argentina" +asia urlcountry="Asia open to entities in the Asia Pacific region" +at urlcountry="Austria" +au urlcountry="Australia" +aw urlcountry="Aruba" +ax urlcountry="Åland Islands" +az urlcountry="Azerbaijan" +ba urlcountry="Bosnia and Herzegovina" +bb urlcountry="Barbados" +be urlcountry="Belgium" +bf urlcountry="Burkina Faso" +bg urlcountry="Bulgaria" +bh urlcountry="Bahrain" +bi urlcountry="Burundi" +biz urlcountry="Business open for general business use" +bj urlcountry="Benin" +bl urlcountry="Saint Barthélemy" +bm urlcountry="Bermuda" +bn urlcountry="Brunei" +bo urlcountry="Bolivia" +bq urlcountry="Bonaire, Sint Eustatius, and Saba" +br urlcountry="Brazil" +bs urlcountry="Bahamas" +bt urlcountry="Bhutan" +bv urlcountry="Bouvet Island" +bw urlcountry="Botswana" +by urlcountry="Belarus" +bz urlcountry="Belize" +ca urlcountry="Canada" +cat urlcountry="Catalan speaking territories" +cc urlcountry="Cocos Keeling Islands" +cd urlcountry="Democratic Republic of the Congo" +cf urlcountry="Central African Republic" +cg urlcountry="Republic of the Congo" +ch urlcountry="Switzerland" +ci urlcountry="Côte d'Ivoire Ivory Coast" +ck urlcountry="Cook Islands" +cl urlcountry="Chile" +cm urlcountry="Cameroon" +cn urlcountry="China" +co urlcountry="Colombia" +cr urlcountry="Costa Rica" +cu urlcountry="Cuba" +cv urlcountry="Cape Verde" +cw urlcountry="Curaçao" +cx urlcountry="Christmas Island" +cy urlcountry="Cyprus" +cz urlcountry="Czech Republic" +dj urlcountry="Djibouti" +dk urlcountry="Denmark" +dm urlcountry="Dominica" +do urlcountry="Dominican Republic" +dz urlcountry="Algeria" +ec urlcountry="Ecuador" +ee urlcountry="Estonia" +eg urlcountry="Egypt" +eh urlcountry="Western Sahara" +er urlcountry="Eritrea" +es urlcountry="Spain" +et urlcountry="Ethiopia" +eu urlcountry="European Union" +fi urlcountry="Finland" +fj urlcountry="Fiji" +fk urlcountry="Falkland Islands Malvinas" +fm urlcountry="Federated States of Micronesia" +fo urlcountry="Faroe Islands" +fr urlcountry="France" +ga urlcountry="Gabon" +gb urlcountry="United Kingdom" +gd urlcountry="Grenada" +ge urlcountry="Georgia" +gf urlcountry="French Guiana" +gg urlcountry="Guernsey" +gh urlcountry="Ghana" +gi urlcountry="Gibraltar" +gl urlcountry="Greenland" +gm urlcountry="Gambia" +gn urlcountry="Guinea" +gov urlcountry="US Government restricted" +gp urlcountry="Guadeloupe" +gq urlcountry="Equatorial Guinea" +gr urlcountry="Greece" +gs urlcountry="South Georgia and the South Sandwich Islands" +gt urlcountry="Guatemala" +gu urlcountry="Guam" +gw urlcountry="Guinea-Bissau" +gy urlcountry="Guyana" +hk urlcountry="Hong Kong" +hm urlcountry="Heard Island and McDonald Islands" +hn urlcountry="Honduras" +hr urlcountry="Croatia" +ht urlcountry="Haiti" +hu urlcountry="Hungary" +id urlcountry="Indonesia" +ie urlcountry="Ireland" +il urlcountry="Israel" +im urlcountry="Isle of Man" +in urlcountry="India" +int urlcountry="International organizations restricted" +io urlcountry="British Indian Ocean Territory" +iq urlcountry="Iraq" +ir urlcountry="Iran" +is urlcountry="Iceland" +it urlcountry="Italy" +je urlcountry="Jersey" +jm urlcountry="Jamaica" +jo urlcountry="Jordan" +jobs urlcountry="Job related sites restricted" +jp urlcountry="Japan" +ke urlcountry="Kenya" +kg urlcountry="Kyrgyzstan" +kh urlcountry="Cambodia" +ki urlcountry="Kiribati" +km urlcountry="Comoros" +kn urlcountry="Saint Kitts and Nevis" +kp urlcountry="North Korea" +kr urlcountry="South Korea" +kw urlcountry="Kuwait" +ky urlcountry="Cayman Islands" +kz urlcountry="Kazakhstan" +la urlcountry="Laos" +lb urlcountry="Lebanon" +lc urlcountry="Saint Lucia" +li urlcountry="Liechtenstein" +lk urlcountry="Sri Lanka" +lr urlcountry="Liberia" +ls urlcountry="Lesotho" +lt urlcountry="Lithuania" +lu urlcountry="Luxembourg" +lv urlcountry="Latvia" +ly urlcountry="Libya" +ma urlcountry="Morocco" +mc urlcountry="Monaco" +md urlcountry="Moldova" +me urlcountry="Montenegro" +mf urlcountry="Saint Martin" +mg urlcountry="Madagascar" +mh urlcountry="Marshall Islands" +mk urlcountry="North Macedonia" +ml urlcountry="Mali" +mm urlcountry="Myanmar Burma" +mn urlcountry="Mongolia" +mo urlcountry="Macao" +mp urlcountry="Northern Mariana Islands" +mq urlcountry="Martinique" +mr urlcountry="Mauritania" +ms urlcountry="Montserrat" +mt urlcountry="Malta" +museum urlcountry="Museums restricted" +mv urlcountry="Maldives" +mw urlcountry="Malawi" +mx urlcountry="Mexico" +my urlcountry="Malaysia" +mz urlcountry="Mozambique" +na urlcountry="Namibia" +name urlcountry="Individuals open for registration" +nc urlcountry="New Caledonia" +ne urlcountry="Niger" +nf urlcountry="Norfolk Island" +ng urlcountry="Nigeria" +ni urlcountry="Nicaragua" +nl urlcountry="Netherlands" +no/S urlcountry="Norway" +np urlcountry="Nepal" +nr urlcountry="Nauru" +nu urlcountry="Niue" +nz urlcountry="New Zealand" +om urlcountry="Oman" +pa urlcountry="Panama" +pe urlcountry="Peru" +pf urlcountry="French Polynesia" +pg urlcountry="Papua New Guinea" +ph urlcountry="Philippines" +pk urlcountry="Pakistan" +pl urlcountry="Poland" +pm urlcountry="Saint Pierre and Miquelon" +pn urlcountry="Pitcairn Islands" +post urlcountry="Postal organizations restricted" +pr urlcountry="Puerto Rico" +pro urlcountry="Certified professionals restricted" +ps urlcountry="State of Palestine" +pt urlcountry="Portugal" +pw urlcountry="Palau" +py urlcountry="Paraguay" +qa urlcountry="Qatar" +re urlcountry="Réunion" +ro urlcountry="Romania" +rs urlcountry="Serbia" +ru urlcountry="Russia" +rw urlcountry="Rwanda" +sa urlcountry="Saudi Arabia" +sb urlcountry="Solomon Islands" +sc urlcountry="Seychelles" +sd urlcountry="Sudan" +se urlcountry="Sweden" +sg urlcountry="Singapore" +sh urlcountry="Saint Helena" +si urlcountry="Slovenia" +sj urlcountry="Svalbard and Jan Mayen" +sk urlcountry="Slovakia" +sl urlcountry="Sierra Leone" +sm urlcountry="San Marino" +sn urlcountry="Senegal" +so urlcountry="Somalia" +sr urlcountry="Suriname" +ss urlcountry="South Sudan" +st urlcountry="São Tomé and Príncipe" +su urlcountry="Soviet Union no longer in use" +sv urlcountry="El Salvador" +sx urlcountry="Sint Maarten" +sy urlcountry="Syria" +sz urlcountry="Eswatini" +tc urlcountry="Turks and Caicos Islands" +td urlcountry="Chad" +tf urlcountry="French Southern and Antarctic Lands" +tg urlcountry="Togo" +th urlcountry="Thailand" +tj urlcountry="Tajikistan" +tk urlcountry="Tokelau" +tl urlcountry="Timor-Leste" +tm urlcountry="Turkmenistan" +tn urlcountry="Tunisia" +to urlcountry="Tonga" +tp urlcountry="East Timor No longer in use" +tr urlcountry="Turkey" +travel urlcountry="Travel industry restricted" +tt urlcountry="Trinidad and Tobago" +tv urlcountry="Tuvalu" +tw urlcountry="Taiwan" +tz urlcountry="Tanzania" +ua urlcountry="Ukraine" +ug urlcountry="Uganda" +uk urlcountry="United Kingdom" +um urlcountry="United States Minor Outlying Islands" +us urlcountry="United States" +uy urlcountry="Uruguay" +uz urlcountry="Uzbekistan" +va urlcountry="Vatican City" +vc urlcountry="Saint Vincent and the Grenadines" +ve urlcountry="Venezuela" +vg urlcountry="British Virgin Islands" +vi urlcountry="US Virgin Islands" +vn urlcountry="Vietnam" +vu urlcountry="Vanuatu" +wf urlcountry="Wallis and Futuna" +xxx urlcountry="Adult entertainment restricted" +ye urlcountry="Yemen" +yt urlcountry="Mayotte" +za urlcountry="South Africa" +zm urlcountry="Zambia" +zw urlcountry="Zimbabwe" \ No newline at end of file diff --git a/misc/url-domains.dict b/misc/url-domains.dict new file mode 100644 index 0000000..ff1718c --- /dev/null +++ b/misc/url-domains.dict @@ -0,0 +1,1135 @@ +# URL Domains +aaa domain=1 +aarp domain=1 +abarth domain=1 +abb domain=1 +abbott domain=1 +abbvie domain=1 +abc domain=1 +able domain=1 +abogado domain=1 +abudhabi domain=1 +academy domain=1 +accenture domain=1 +accountant domain=1 +accountants domain=1 +aco domain=1 +active domain=1 +actor domain=1 +adac domain=1 +ads domain=1 +adult domain=1 +aeg domain=1 +aero domain=1 +aetna domain=1 +afamilycompany domain=1 +afl domain=1 +africa domain=1 +agakhan domain=1 +agency domain=1 +aig domain=1 +aigo domain=1 +airbus domain=1 +airforce domain=1 +airtel domain=1 +akdn domain=1 +alfaromeo domain=1 +alibaba domain=1 +alipay domain=1 +allstate domain=1 +ally domain=1 +alsace domain=1 +alstom domain=1 +am domain=1 +amazon domain=1 +americanexpress domain=1 +americanfamily domain=1 +amex domain=1 +amfam domain=1 +amica domain=1 +amsterdam domain=1 +analytics domain=1 +android domain=1 +anquan domain=1 +anz domain=1 +aol domain=1 +apartments domain=1 +app domain=1 +apple domain=1 +aquarelle domain=1 +arab domain=1 +aramco domain=1 +archi domain=1 +army domain=1 +arpa domain=1 +art domain=1 +arteà domain=1 +asda domain=1 +asia domain=1 +associates domain=1 +athleta domain=1 +attorney domain=1 +auction domain=1 +audi domain=1 +audible domain=1 +audio domain=1 +auspost domain=1 +author domain=1 +auto domain=1 +autos domain=1 +avianca domain=1 +aws domain=1 +ax domain=1 +axa domain=1 +azure domain=1 +baby domain=1 +baidu domain=1 +banamex domain=1 +bananarepublic domain=1 +band domain=1 +bank domain=1 +bar domain=1 +barcelona domain=1 +barclaycard domain=1 +barclays domain=1 +barefoot domain=1 +bargains domain=1 +baseball domain=1 +bauhaus domain=1 +bayern domain=1 +bbc domain=1 +bbt&T domain=1 +bbva domain=1 +bcg domain=1 +bcn domain=1 +beats domain=1 +beauty domain=1 +beer domain=1 +bentley domain=1 +berlin domain=1 +best domain=1 +bestbuy domain=1 +bet domain=1 +bharti domain=1 +bible domain=1 +bid domain=1 +bike domain=1 +bing domain=1 +bingo domain=1 +bio domain=1 +black domain=1 +blackfriday domain=1 +blanco domain=1 +blockbuster domain=1 +blog domain=1 +bloomberg domain=1 +blue domain=1 +bnl domain=1 +bnpparibas domain=1 +boats domain=1 +boehringer domain=1 +bofa domain=1 +bond domain=1 +boo domain=1 +book domain=1 +booking domain=1 +boots domain=1 +bosch domain=1 +bostik domain=1 +boston domain=1 +bot domain=1 +boutique domain=1 +box domain=1 +bradesco domain=1 +bridgestone domain=1 +broadway domain=1 +broker domain=1 +brother domain=1 +brussels domain=1 +budapest domain=1 +bugatti domain=1 +build domain=1 +builders domain=1 +business domain=1 +buy domain=1 +buzz domain=1 +bzh domain=1 +cab domain=1 +cafe domain=1 +cal domain=1 +call domain=1 +calvinklein domain=1 +cam domain=1 +camera domain=1 +camp domain=1 +cancerresearch domain=1 +canon domain=1 +capetown domain=1 +capital domain=1 +capitalone domain=1 +car domain=1 +caravan domain=1 +cards domain=1 +care domain=1 +career domain=1 +careers domain=1 +cars domain=1 +cartier domain=1 +casa domain=1 +case domain=1 +caseih domain=1 +cash domain=1 +casino domain=1 +cat domain=1 +catering domain=1 +catholic domain=1 +cba domain=1 +cbn domain=1 +cbre domain=1 +cbs domain=1 +ceb domain=1 +center domain=1 +ceo domain=1 +cern domain=1 +cfa domain=1 +cfd domain=1 +chanel domain=1 +channel domain=1 +charity domain=1 +chase domain=1 +chat domain=1 +cheap domain=1 +chintai domain=1 +chloe domain=1 +christmas domain=1 +chrome domain=1 +chrysler domain=1 +church domain=1 +circle domain=1 +cisco domain=1 +citadel domain=1 +citi domain=1 +citic domain=1 +city domain=1 +cityeats domain=1 +claims domain=1 +cleaning domain=1 +click domain=1 +clinic domain=1 +cliniqueée domain=1 +clothing domain=1 +cloud domain=1 +club domain=1 +clubmedéditerranée domain=1 +coach domain=1 +codes domain=1 +coffee domain=1 +college domain=1 +cologne domain=1 +com domain=1 +comcast domain=1 +commbank domain=1 +community domain=1 +company domain=1 +compare domain=1 +computer domain=1 +comsec domain=1 +condos domain=1 +construction domain=1 +consulting domain=1 +contact domain=1 +contractors domain=1 +cooking domain=1 +cookingchannel domain=1 +cool domain=1 +coop domain=1 +country domain=1 +coupon domain=1 +coupons domain=1 +courses domain=1 +cpa domain=1 +credit domain=1 +creditcard domain=1 +creditunion domain=1 +cricket domain=1 +crown domain=1 +cruises domain=1 +csc domain=1 +cuisinella domain=1 +cymru domain=1 +cyou domain=1 +dabur domain=1 +dad domain=1 +dance domain=1 +data domain=1 +date domain=1 +dating domain=1 +datsun domain=1 +day domain=1 +dclk domain=1 +dds domain=1 +deal domain=1 +dealer domain=1 +deals domain=1 +degree domain=1 +delivery domain=1 +dell domain=1 +deloitte domain=1 +delta domain=1 +democrat domain=1 +dental domain=1 +dentist domain=1 +desi domain=1 +design domain=1 +dev domain=1 +dhl domain=1 +diamonds domain=1 +diet domain=1 +digital domain=1 +direct domain=1 +directory domain=1 +discount domain=1 +discover domain=1 +dish domain=1 +diy domain=1 +dnp domain=1 +docs domain=1 +doctor domain=1 +dodge domain=1 +dog domain=1 +doha domain=1 +domains domain=1 +doosan domain=1 +dot domain=1 +download domain=1 +drive domain=1 +dtv domain=1 +dubai domain=1 +duck domain=1 +dunlop domain=1 +duns domain=1 +dupont domain=1 +durban domain=1 +dvagögensberatung domain=1 +dvr domain=1 +earth domain=1 +eat domain=1 +eco domain=1 +edekaännischer domain=1 +edu domain=1 +education domain=1 +email domain=1 +emerck domain=1 +energy domain=1 +engineer domain=1 +engineering domain=1 +enterprises domain=1 +epost domain=1 +epson domain=1 +equipment domain=1 +ericsson domain=1 +erni domain=1 +esq domain=1 +estate domain=1 +esurance domain=1 +etisalat domain=1 +eurovision domain=1 +eus domain=1 +events domain=1 +everbank domain=1 +exchange domain=1 +expert domain=1 +exposed domain=1 +express domain=1 +extraspace domain=1 +fage domain=1 +fail domain=1 +fairwinds domain=1 +faith domain=1 +family domain=1 +fan domain=1 +fans domain=1 +farm domain=1 +farmers domain=1 +fashion domain=1 +fast domain=1 +fedex domain=1 +feedback domain=1 +ferrari domain=1 +ferrero domain=1 +fiat domain=1 +fidelity domain=1 +fido domain=1 +film domain=1 +finalúcleo domain=1 +finance domain=1 +financial domain=1 +fire domain=1 +firestone domain=1 +firmdale domain=1 +fish domain=1 +fishing domain=1 +fit domain=1 +fitness domain=1 +flickr domain=1 +flights domain=1 +flir domain=1 +florist domain=1 +flowers domain=1 +flsmidth domain=1 +fly domain=1 +foo domain=1 +food domain=1 +foodnetwork domain=1 +football domain=1 +ford domain=1 +forex domain=1 +forsale domain=1 +forum domain=1 +foundation domain=1 +fox domain=1 +free domain=1 +fresenius domain=1 +frl domain=1 +frogans domain=1 +frontdoor domain=1 +frontier domain=1 +ftr domain=1 +fujitsu domain=1 +fujixerox domain=1 +fun domain=1 +fund domain=1 +furniture domain=1 +futbol domain=1 +fyi domain=1 +galón domain=1 +gallery domain=1 +gallo domain=1 +gallup domain=1 +game domain=1 +games domain=1 +gap domain=1 +garden domain=1 +gay domain=1 +gbiz domain=1 +gdn domain=1 +gea domain=1 +gent domain=1 +genting domain=1 +george domain=1 +ggee domain=1 +gift domain=1 +gifts domain=1 +gives domain=1 +giving domain=1 +glade domain=1 +glass domain=1 +gle domain=1 +global domain=1 +globoção domain=1 +gmail domain=1 +gmbh domain=1 +gmo domain=1 +gmx&1 domain=1 +godaddy domain=1 +gold domain=1 +goldpoint domain=1 +golf domain=1 +goo domain=1 +goodhands domain=1 +goodyear& domain=1 +goog domain=1 +google domain=1 +gop domain=1 +got domain=1 +gov domain=1 +grainger domain=1 +graphics domain=1 +gratis domain=1 +green domain=1 +gripe domain=1 +grocery domain=1 +guardian domain=1 +gucci domain=1 +guge domain=1 +guide domain=1 +guitars domain=1 +guru domain=1 +hair domain=1 +hangout domain=1 +haus domain=1 +hbo domain=1 +hdfc domain=1 +hdfcbank domain=1 +health domain=1 +healthcare domain=1 +help domain=1 +helsinki domain=1 +here domain=1 +hermes domain=1 +hgtv domain=1 +hiphop domain=1 +hisamitsu domain=1 +hitachi domain=1 +hiv domain=1 +hkt domain=1 +hockey domain=1 +holdings domain=1 +holiday domain=1 +homedepot domain=1 +homegoods domain=1 +homes domain=1 +homesense domain=1 +honda domain=1 +honeywell domain=1 +horse domain=1 +hospital domain=1 +host domain=1 +hosting domain=1 +hot domain=1 +hoteles domain=1 +hotels domain=1 +hotmail domain=1 +house domain=1 +how domain=1 +hsbc domain=1 +htc domain=1 +hughes domain=1 +hyatt domain=1 +hyundai domain=1 +ibm domain=1 +icbc domain=1 +ice domain=1 +icu domain=1 +ieee domain=1 +ifm domain=1 +iinet domain=1 +ikano domain=1 +imamat domain=1 +imdb domain=1 +immo domain=1 +immobilien domain=1 +inc domain=1 +industries domain=1 +infiniti domain=1 +info domain=1 +ing domain=1 +ink domain=1 +institute domain=1 +insurance domain=1 +insure domain=1 +int domain=1 +intel domain=1 +international domain=1 +intuit domain=1 +investments domain=1 +ipiranga domain=1 +irish domain=1 +iselect domain=1 +ismaili domain=1 +ist domain=1 +istanbul domain=1 +itau domain=1 +itv domain=1 +iveco domain=1 +iwc domain=1 +jaguar domain=1 +java domain=1 +jcb domain=1 +jcp domain=1 +jeep domain=1 +jetzt domain=1 +jewelry domain=1 +jio domain=1 +jlc domain=1 +jll domain=1 +jmp domain=1 +jobs domain=1 +joburg domain=1 +jot domain=1 +joy domain=1 +jpmorgan domain=1 +jprs domain=1 +juegos domain=1 +juniper domain=1 +kaufen domain=1 +kddi domain=1 +kerryhotels domain=1 +kerrylogistics domain=1 +kerryproperties domain=1 +kfh domain=1 +kia domain=1 +kids domain=1 +kim domain=1 +kinder domain=1 +kindle domain=1 +kitchen domain=1 +kiwi domain=1 +koeln domain=1 +komatsu domain=1 +kosher domain=1 +kpmg domain=1 +kpn domain=1 +krd domain=1 +kred domain=1 +kuokgroup domain=1 +ladbrokes domain=1 +lamborghini domain=1 +lamerée domain=1 +lancaster domain=1 +lancia domain=1 +lancome domain=1 +land domain=1 +landrover domain=1 +lanxess domain=1 +lasalle domain=1 +lat domain=1 +latino domain=1 +latrobe domain=1 +law domain=1 +lawyer domain=1 +lds domain=1 +lease domain=1 +leclerc domain=1 +lefrak domain=1 +legal domain=1 +lexus domain=1 +lgbt domain=1 +liaison domain=1 +life domain=1 +lifeinsurance domain=1 +lifestyle domain=1 +lighting domain=1 +like domain=1 +lilly domain=1 +limited domain=1 +limo domain=1 +lincoln domain=1 +linde domain=1 +link domain=1 +lipsy domain=1 +live domain=1 +living domain=1 +lixil domain=1 +llc domain=1 +llp domain=1 +loan domain=1 +loans domain=1 +locker domain=1 +locus domain=1 +loft domain=1 +lol domain=1 +london domain=1 +lotte domain=1 +lotto domain=1 +love domain=1 +lpl domain=1 +ltd domain=1 +ltda domain=1 +lupin domain=1 +luxe domain=1 +luxury domain=1 +macys domain=1 +madrid domain=1 +maif domain=1 +maison domain=1 +makeup domain=1 +man domain=1 +management domain=1 +mango domain=1 +map domain=1 +market domain=1 +marketing domain=1 +markets domain=1 +marriott domain=1 +marshalls domain=1 +maserati domain=1 +mattel domain=1 +mba domain=1 +mcd domain=1 +mcdonalds domain=1 +mckinsey domain=1 +med domain=1 +media domain=1 +meet domain=1 +melbourne domain=1 +meme domain=1 +memorial domain=1 +men domain=1 +menu domain=1 +meo domain=1 +merckmsd domain=1 +metlife domain=1 +miami domain=1 +microsoft domain=1 +mil domain=1 +mini domain=1 +mint domain=1 +mit domain=1 +mitsubishi domain=1 +mls domain=1 +mma domain=1 +mobi domain=1 +mobile domain=1 +mobily domain=1 +moda domain=1 +moe domain=1 +moi domain=1 +mom domain=1 +monash domain=1 +money domain=1 +monster domain=1 +montblanc domain=1 +mopar domain=1 +mormon domain=1 +mortgage domain=1 +moscow domain=1 +moto domain=1 +motorcycles domain=1 +mov domain=1 +movie domain=1 +movistar domain=1 +msd domain=1 +mtn domain=1 +mtpc domain=1 +mtr domain=1 +museum domain=1 +music domain=1 +mutual domain=1 +mutuelle domain=1 +nab domain=1 +nadex domain=1 +nagoya domain=1 +nationwide domain=1 +navy domain=1 +nba domain=1 +nec domain=1 +net domain=1 +netbank domain=1 +netflix domain=1 +network domain=1 +neustar domain=1 +new domain=1 +newholland domain=1 +news domain=1 +next domain=1 +nextdirect domain=1 +nexus domain=1 +nfl domain=1 +ngo domain=1 +nhk domain=1 +nico domain=1 +nike domain=1 +nikon domain=1 +ninja domain=1 +nissan domain=1 +nissay domain=1 +nokia domain=1 +northwesternmutual domain=1 +norton domain=1 +now domain=1 +nowruz domain=1 +nowtv domain=1 +nra domain=1 +ntt domain=1 +observer domain=1 +off domain=1 +office domain=1 +okinawa domain=1 +olayan domain=1 +olayangroup domain=1 +oldnavy domain=1 +ollo domain=1 +omega domain=1 +ong domain=1 +onl domain=1 +online domain=1 +onyourside domain=1 +ooo domain=1 +open domain=1 +oracle domain=1 +orange domain=1 +org domain=1 +organic domain=1 +orientexpress domain=1 +originsée domain=1 +osaka domain=1 +otsuka domain=1 +ott domain=1 +ovh domain=1 +page domain=1 +pamperedchef domain=1 +panasonic domain=1 +panerai domain=1 +paris domain=1 +pars domain=1 +partners domain=1 +parts domain=1 +party domain=1 +passagens domain=1 +pay domain=1 +pccw domain=1 +pet domain=1 +pfizer domain=1 +pharmacy domain=1 +phd domain=1 +philips domain=1 +phone domain=1 +photo domain=1 +photography domain=1 +photos domain=1 +physio domain=1 +piaget domain=1 +pics domain=1 +pictet domain=1 +pictures domain=1 +pid domain=1 +pin domain=1 +ping domain=1 +pink domain=1 +pioneer domain=1 +pizza domain=1 +place domain=1 +play domain=1 +playstation domain=1 +plumbing domain=1 +plus domain=1 +pnc domain=1 +poker domain=1 +politie domain=1 +porn domain=1 +post domain=1 +pramerica domain=1 +praxi domain=1 +press domain=1 +prime domain=1 +pro domain=1 +prod domain=1 +productions domain=1 +prof domain=1 +progressive domain=1 +promo domain=1 +properties domain=1 +property domain=1 +protection domain=1 +pru domain=1 +prudential domain=1 +pub domain=1 +pwc domain=1 +qpon domain=1 +quebecébec domain=1 +quest domain=1 +qvc domain=1 +racing domain=1 +radio domain=1 +raid domain=1 +read domain=1 +realestate domain=1 +realtor domain=1 +realty domain=1 +recipes domain=1 +red domain=1 +redstone domain=1 +redumbrella domain=1 +rehab domain=1 +reise domain=1 +reisen domain=1 +reit domain=1 +reliance domain=1 +ren domain=1 +rent domain=1 +rentals domain=1 +repair domain=1 +report domain=1 +republican domain=1 +rest domain=1 +restaurant domain=1 +review domain=1 +reviews domain=1 +rexroth domain=1 +rich domain=1 +richardli domain=1 +ricoh domain=1 +rightathome domain=1 +ril domain=1 +rioática domain=1 +rip domain=1 +rmit domain=1 +rocher domain=1 +rocks domain=1 +rodeo domain=1 +rogers domain=1 +room domain=1 +rsvp domain=1 +rugby domain=1 +ruhr domain=1 +run domain=1 +rwe domain=1 +ryukyu domain=1 +saarland domain=1 +safe domain=1 +safety domain=1 +sakura domain=1 +sale domain=1 +salon domain=1 +samsclub domain=1 +samsung domain=1 +sandvik domain=1 +sandvikcoromant domain=1 +sanofi domain=1 +sap domain=1 +sapo domain=1 +sarl domain=1 +sas domain=1 +save domain=1 +saxo domain=1 +sbi domain=1 +sbs domain=1 +sca domain=1 +scb domain=1 +schmidt domain=1 +scholarships domain=1 +school domain=1 +schule domain=1 +science domain=1 +scjohnson domain=1 +scor domain=1 +scot domain=1 +search domain=1 +seat domain=1 +secure domain=1 +security domain=1 +seek domain=1 +select domain=1 +senería domain=1 +services domain=1 +ses domain=1 +seven domain=1 +sex domain=1 +sexy domain=1 +sfr domain=1 +shangrila domain=1 +sharp domain=1 +shaw domain=1 +shell domain=1 +shia domain=1 +shiksha domain=1 +shoes domain=1 +shop domain=1 +shopping domain=1 +shouji domain=1 +show domain=1 +showtime domain=1 +shriram domain=1 +silk domain=1 +sina domain=1 +singles domain=1 +site domain=1 +ski domain=1 +skin domain=1 +sky domain=1 +skype domain=1 +sling domain=1 +smart domain=1 +smile domain=1 +sncf domain=1 +soccer domain=1 +social domain=1 +softbank domain=1 +software domain=1 +sohu domain=1 +solar domain=1 +solutions domain=1 +song domain=1 +sony domain=1 +soy domain=1 +spa domain=1 +space domain=1 +spiegel domain=1 +sport domain=1 +spot domain=1 +spreadbetting domain=1 +srl domain=1 +srt domain=1 +stada domain=1 +staples domain=1 +star domain=1 +starhub domain=1 +statebank domain=1 +statefarm domain=1 +statoil domain=1 +stc domain=1 +stcgroup domain=1 +stockholm domain=1 +storage domain=1 +store domain=1 +stream domain=1 +studio domain=1 +study domain=1 +style domain=1 +sucks domain=1 +supplies domain=1 +supply domain=1 +support domain=1 +surf domain=1 +surgery domain=1 +suzuki domain=1 +swatch domain=1 +swiftcover domain=1 +swiss domain=1 +sydney domain=1 +symantec domain=1 +systems domain=1 +tab domain=1 +taipei domain=1 +talk domain=1 +taobao domain=1 +target domain=1 +tatamotors domain=1 +tatar domain=1 +tattoo domain=1 +tax domain=1 +taxi domain=1 +tci domain=1 +tdk domain=1 +team domain=1 +tech domain=1 +technology domain=1 +tel domain=1 +telecity domain=1 +telefonica domain=1 +temasek domain=1 +tennis domain=1 +teva domain=1 +thd domain=1 +theater domain=1 +theatre domain=1 +tiaa domain=1 +tickets domain=1 +tienda domain=1 +tiffany domain=1 +tips domain=1 +tires domain=1 +tirol domain=1 +tjmaxx domain=1 +tmall domain=1 +today domain=1 +tokyo domain=1 +tools domain=1 +top domain=1 +toray domain=1 +toshiba domain=1 +total domain=1 +tours domain=1 +town domain=1 +toyota domain=1 +trade domain=1 +trading domain=1 +training domain=1 +travel domain=1 +travelchannel domain=1 +travelers domain=1 +travelersinsurance domain=1 +trust domain=1 +trv domain=1 +tube domain=1 +tui domain=1 +tunes domain=1 +tushu domain=1 +ubank domain=1 +ubs domain=1 +uconnect domain=1 +unicom domain=1 +university domain=1 +uno domain=1 +uol domain=1 +ups domain=1 +vacations domain=1 +vana domain=1 +vanguard domain=1 +vegas domain=1 +ventures domain=1 +verisign domain=1 +versicherung domain=1 +vet domain=1 +viajes domain=1 +video domain=1 +vig domain=1 +viking domain=1 +villas domain=1 +vin domain=1 +vip domain=1 +virgin domain=1 +visa domain=1 +vision domain=1 +vista domain=1 +vistaprint domain=1 +viva domain=1 +vivo domain=1 +vlaanderen domain=1 +vodka domain=1 +volkswagen domain=1 +volvo domain=1 +vote domain=1 +voting domain=1 +voto domain=1 +voyage domain=1 +vuelos domain=1 +wales domain=1 +walmart domain=1 +walter domain=1 +wang domain=1 +wanggou domain=1 +warman domain=1 +watch domain=1 +watches domain=1 +weather domain=1 +weatherchannel domain=1 +webcam domain=1 +weber domain=1 +website domain=1 +wed domain=1 +wedding domain=1 +weibo domain=1 +weir domain=1 +wien domain=1 +wiki domain=1 +williamhill domain=1 +win domain=1 +windows domain=1 +wine domain=1 +winners domain=1 +wme domain=1 +wolterskluwer domain=1 +woodside domain=1 +work domain=1 +works domain=1 +world domain=1 +wow domain=1 +wtc domain=1 +wtf domain=1 +xbox domain=1 +xerox domain=1 +xfinity domain=1 +xihuan domain=1 +xin domain=1 +xperia domain=1 +xxx domain=1 +xyz domain=1 +yachts domain=1 +yahoo domain=1 +yamaxun domain=1 +yandex domain=1 +yodobashi domain=1 +yoga domain=1 +yokohama domain=1 +you domain=1 +youtube domain=1 +yun domain=1 +zappos domain=1 +zaraño domain=1 +zero domain=1 +zip domain=1 +zippo domain=1 +zone domain=1 +zuerichürich \ No newline at end of file diff --git a/spec/KBFuncs.nlp b/spec/KBFuncs.nlp index c4762f5..bf050c5 100644 --- a/spec/KBFuncs.nlp +++ b/spec/KBFuncs.nlp @@ -381,18 +381,34 @@ PadStr(L("num str"),L("pad str"),L("pad len")) { # JSON FUNCTIONS ############################################### -JsonKB(L("file"),L("con")) { - JsonKBRecurse(L("file"),L("con"),0); +JsonKB(L("file"),L("con"),L("id flag")) { + L("level") = 0; + if (L("id flag")) { + L("file") << "{\n"; + L("file") << SpacesStr(1) << "\"" << conceptname(L("con")) << "\":\t[\n"; + L("level") = 1; + } + JsonKBRecurse(L("file"),L("con"),L("level"),L("id flag")); + if (L("id flag")) { + L("file") << "\t]\n}"; + } } -JsonKBRecurse(L("file"),L("parent"),L("level")) { +JsonKBRecurse(L("file"),L("parent"),L("level"),L("id flag")) { if (L("level") == 0) { L("file") << "{\n"; } L("con") = down(L("parent")); L("first") = 1; while (L("con")) { - L("file") << SpacesStr(L("level")+1) << JsonStr(conceptname(L("con"))) << ": {\n"; + L("name") = conceptname(L("con")); + if (L("id flag")) { + L("name") = SeparateConNumber(L("name")); + L("file") << SpacesStr(L("level")+1) << "{\n"; + L("file") << SpacesStr(L("level")+2) << "\"id\": \"" << G("connum") << "\",\n"; + } else { + L("file") << SpacesStr(L("level")+1) << JsonStr(L("name")) << ": {\n"; + } JsonAttributes(L("file"),L("con"),L("level")+1); if (down(L("con"))) { L("lev") = 1; @@ -467,6 +483,22 @@ JsonStr(L("str")) { return "\"" + L("str") + "\""; } +SeparateConNumber(L("str")) { + L("i") = strlength(L("str")) - 1; + L("stop") = 0; + while (!L("stop") && L("i") > 0) { + L("c") = strpiece(L("str"),L("i"),L("i")); + if (strisdigit(L("c"))) { + L("num") = L("c") + L("num"); + } else { + L("stop"); + } + L("i")--; + } + G("connum") = L("num"); + return strpiece(L("str"),0,strlength(L("str"))-strlength(L("num"))-1); +} + ############################################### # Ambiguity Functions ###############################################