docker build -f Dockerfile -t wordnet .
We run the Docker image with a attached /src
volume for editable sources.
docker run --rm -it -d -v `pwd`/src:/app --name wordnet-test wordnet
docker exec -it wordnet-test bash
Run example.py
to get wordnet domains for some words.
root@edb4b3476b30:/app# python example.py
Domains for bank-n (first sense only)
{'banking'}
Domains for bank-n (all senses)
{'geography', 'banking', 'geology', 'factotum', 'money', 'finance', 'transport', 'town_planning', 'aviation'}
Domains for bank (all part-of-speechs)
{'geography', 'economy', 'banking', 'geology', 'factotum', 'money', 'finance', 'transport', 'town_planning', 'aviation'}
List of synsets for domain "banking"
domain "banking" covers 125 synsets: [Synset('bank_closing.n.01'), Synset('bank_withdrawal.n.01'), Synset('bank_run.n.01'), Synset('endowment.n.03'), Synset('banking.n.02'), Synset('home_banking.n.01'), Synset('banking.n.01'), Synset('amortization.n.01'), Synset('loan_approval.n.01'), Synset('bank.n.04'), Synset('cash_machine.n.01'), Synset('magnetic_stripe.n.01'), Synset('safe-deposit.n.01'), Synset('vault.n.02'), Synset('endorsement.n.04'), Synset('blank_endorsement.n.01'), Synset('bank_identification_number.n.01'), Synset('bank_charter.n.01'), Synset('stub.n.04'), Synset('clearing_house.n.01'), Synset('credit_union.n.01'), Synset('central_bank.n.01'), Synset('european_central_bank.n.01'), Synset('federal_reserve_system.n.01'), Synset('federal_reserve_bank.n.01'), Synset('bank_of_england.n.01'), Synset('bundesbank.n.01'), Synset('bank_of_japan.n.01'), Synset('agent_bank.n.02'), Synset('commercial_bank.n.01'), Synset('national_bank.n.01'), Synset('state_bank.n.01'), Synset('lead_bank.n.01'), Synset('member_bank.n.01'), Synset('merchant_bank.n.01'), Synset('acquirer.n.02'), Synset('depository_financial_institution.n.01'), Synset('thrift_institution.n.01'), Synset('savings_and_loan.n.01'), Synset('building_society.n.01'), Synset('savings_bank.n.01'), Synset('home_loan_bank.n.01'), Synset('federal_home_loan_bank_system.n.01'), Synset('mutual_savings_bank.n.01'), Synset('federal_savings_bank.n.01'), Synset('accommodation_endorser.n.01'), Synset('bank_commissioner.n.01'), Synset('bank_examiner.n.01'), Synset('bank_guard.n.01'), Synset('bankrupt.n.01'), Synset('cheapskate.n.01'), Synset('economizer.n.01'), Synset('endorser.n.02'), Synset('hoarder.n.01'), Synset('magpie.n.02'), Synset('miser.n.01'), Synset('niggard.n.01'), Synset('penny_pincher.n.01'), Synset('pinchgut.n.01'), Synset('saver.n.02'), Synset('stinter.n.01'), Synset('interest.n.04'), Synset('compound_interest.n.01'), Synset('simple_interest.n.01'), Synset('bank_account.n.01'), Synset('giro_account.n.01'), Synset('savings_account_trust.n.01'), Synset('checking_account.n.01'), Synset('savings_account.n.01'), Synset('time_deposit_account.n.01'), Synset('dormant_account.n.01'), Synset('passbook_savings_account.n.01'), Synset('consumer_credit.n.01'), Synset('home_loan.n.01'), Synset('installment_credit.n.01'), Synset('open-end_credit.n.01'), Synset('credit_account.n.01'), Synset('revolving_charge_account.n.01'), Synset('credit_card.n.01'), Synset('bank_card.n.01'), Synset('calling_card.n.01'), Synset('cash_card.n.01'), Synset('debit_card.n.01'), Synset('smart_card.n.01'), Synset('credit.n.02'), Synset('cheap_money.n.01'), Synset('export_credit.n.01'), Synset('import_credit.n.01'), Synset('credit_line.n.01'), Synset('commercial_credit.n.01'), Synset('letter_of_credit.n.01'), Synset('commercial_letter_of_credit.n.01'), Synset('traveler's_letter_of_credit.n.01'), Synset('traveler's_check.n.01'), Synset('bank_draft.n.01'), Synset('overdraft_credit.n.01'), Synset('deposit.n.04'), Synset('demand_deposit.n.01'), Synset('acceptance.n.05'), Synset('check.n.01'), Synset('bad_check.n.01'), Synset('kite.n.02'), Synset('kite.n.01'), Synset('counter_check.n.01'), Synset('giro.n.01'), Synset('paycheck.n.01'), Synset('certified_check.n.01'), Synset('personal_check.n.01'), Synset('cashier's_check.n.01'), Synset('blank_check.n.02'), Synset('medicare_check.n.01'), Synset('bankbook.n.01'), Synset('checkbook.n.01'), Synset('bank-depositor_relation.n.01'), Synset('bank_failure.n.01'), Synset('float.n.01'), Synset('write_out.v.02'), Synset('check.v.20'), Synset('bounce.v.04'), Synset('clear.v.07'), Synset('bankable.s.02'), Synset('nontransferable.s.01'), Synset('crossed.a.02'), Synset('uncrossed.a.01'), Synset('cashable.s.01')]
Set of domains in WordNetDomains
{'baseball', 'earth', 'color', 'computer_science', 'literature', 'electricity', 'atomic_physic', 'sport', 'health', 'environment', 'humanities', 'history', 'bowling', 'administration', 'law', 'folklore', 'basketball', 'veterinary', 'roman_catholic', 'book_keeping', 'jewellery', 'commerce', 'banking', 'philology', 'tourism', 'railway', 'astrology', 'hunting', 'telecommunication', 'town_planning', 'rowing', 'entomology', 'theatre', 'sociology', 'applied_science', 'industry', 'military', 'photography', 'philately', 'grammar', 'number', 'furniture', 'occultism', 'betting', 'swimming', 'surgery', 'diving', 'home', 'astronautics', 'cinema', 'body_care', 'geography', 'economy', 'table_tennis', 'gas', 'fashion', 'agriculture', 'pure_science', 'hockey', 'chemistry', 'music', 'mythology', 'boxing', 'rugby', 'psychoanalysis', 'psychiatry', 'soccer', 'metrology', 'optics', 'diplomacy', 'geometry', 'cycling', 'electrotechnology', 'quality', 'ethnology', 'tennis', 'heraldry', 'aviation', 'biochemistry', 'wrestling', 'animal_husbandry', 'biology', 'university', 'archery', 'badminton', 'astronomy', 'topography', 'volleyball', 'graphic_arts', 'animals', 'mechanics', 'psychological_features', 'sexuality', 'drawing', 'publishing', 'exchange', 'art', 'racing', 'athletics', 'geology', 'transport', 'religion', 'paleontology', 'physiology', 'architecture', 'enterprise', 'vehicles', 'archaeology', 'sub', 'factotum', 'painting', 'gastronomy', 'skating', 'philosophy', 'cricket', 'artisanship', 'engineering', 'sculpture', 'social_science', 'card', 'electronics', 'acoustics', 'nautical', 'dentistry', 'plastic_arts', 'statistics', 'insurance', 'food', 'person', 'skiing', 'golf', 'meteorology', 'hydraulics', 'buildings', 'pharmacy', 'radiology', 'numismatics', 'football', 'theology', 'plants', 'pedagogy', 'finance', 'radio+tv', 'fishing', 'anthropology', 'free_time', 'chess', 'oceanography', 'genetics', 'anatomy', 'telegraphy', 'mountaineering', 'fencing', 'money', 'physics', 'tax', 'mathematics', 'linguistics', 'telephony', 'school', 'time_period', 'medicine', 'post', 'psychology', 'politics', 'dance', 'paranormal', 'play'}
Run domains.py
to list all available WordNet domains
acoustics ['02584104-n', '02584268-n', '02584812-n']
administration ['00045146-n', '00556291-n', '00556427-n']
agriculture ['00429923-n', '00866914-n', '00996641-n']
anatomy ['00037703-n', '00133136-n', '00353921-n']
animal_husbandry ['00792299-n', '00860674-n', '00861073-n']
animals ['00012748-n', '00962111-n', '01153586-n']
anthropology ['00210724-n', '00211160-n', '00211365-n']
applied_science ['03985477-n', '04266345-n', '04352832-n']
archaeology ['00040040-n', '01328460-n', '01891224-n']
archery ['00423600-n', '09181370-n', '09608089-n']
architecture ['00577011-n', '00871831-n', '02578017-n']
art ['00258392-n', '00573836-n', '00672395-n']
artisanship ['00869978-n', '00870256-n', '00870389-n']
astrology ['03407158-n', '04436236-n', '05444230-n']
astronautics ['00280016-n', '02827728-n', '02966235-n']
astronomy ['00045801-n', '02655846-n', '02656041-n']
athletics ['00410707-n', '00410925-n', '00414898-n']
atomic_physic ['02657581-n', '02685588-n', '02736848-n']
aviation ['00047580-n', '00047871-n', '00159777-n']
badminton ['00455850-n', '00456227-n', '00458699-n']
banking ['00217621-n', '00378689-n', '00378820-n']
baseball ['00039042-n', '00066212-n', '00069711-n']
basketball ['00102398-n', '00102756-n', '00102863-n']
betting ['00479450-n', '00481124-n', '00481608-n']
biochemistry ['01012498-n', '12675764-n', '12677174-n']
biology ['00004824-n', '00006026-n', '00012748-n']
body_care ['00244246-n', '00244459-n', '00262797-n']
book_keeping ['00549232-n', '00584252-n', '00584511-n']
bowling ['00036902-n', '00097112-n', '00097670-n']
boxing ['00054502-n', '00126580-n', '00127279-n']
buildings ['00573920-n', '00575246-n', '00575509-n']
card ['00084852-n', '00324743-n', '00324942-n']
chemistry ['00605192-n', '00610000-n', '00610172-n']
chess ['00157319-n', '00157516-n', '00157666-n']
cinema ['00152613-n', '00853554-n', '00853750-n']
color ['01322606-n', '01322779-n', '01322902-n']
commerce ['00073027-n', '00073232-n', '00073381-n']
computer_science ['00155567-n', '00435184-n', '00435307-n']
cricket ['00097670-n', '00120661-n', '00433204-n']
cycling ['00427612-n', '00427805-n', '00427877-n']
dance ['00280142-n', '00498636-n', '00499578-n']
dentistry ['00596708-n', '00619293-n', '00619387-n']
diplomacy ['06358423-n', '06358573-n', '06358754-n']
diving ['00419697-n', '00420222-n', '00420397-n']
drawing ['00847065-n', '00847296-n', '00872747-n']
earth ['02649768-n', '03655668-n', '04845461-n']
economy ['00045146-n', '00072450-n', '00072647-n']
electricity ['00348887-n', '00574727-n', '00895845-n']
electronics ['02575297-n', '02583910-n', '02584104-n']
electrotechnology ['02583910-n', '02620849-n', '02621249-n']
engineering ['00095171-n', '00095493-n', '00755186-n']
enterprise ['00075024-n', '00165810-n', '00166080-n']
entomology ['01688019-n', '01688584-n', '01689634-n']
environment ['00892164-n', '00892338-n', '05710760-n']
ethnology ['03846594-n', '04375070-n', '04577855-n']
exchange ['00074103-n', '00074248-n', '00074372-n']
factotum ['00001740-n', '00002056-n', '00002342-n']
fashion ['00397320-n', '00700139-n', '00745797-n']
fencing ['00036630-n', '01106565-n', '03172936-n']
finance ['05335943-n', '05781932-n', '07800521-n']
fishing ['00430121-n', '00430307-n', '00430423-n']
folklore ['00515450-n', '00515601-n', '02602282-n']
food ['00018827-n', '00704049-n', '01008759-n']
football ['00069711-n', '00128104-n', '00128759-n']
free_time ['00031097-n', '00279634-n', '00286756-n']
furniture ['02595443-n', '02597722-n', '02598676-n']
gas ['00809995-s', '02511229-a', '02519760-a']
gastronomy ['00231734-n', '00234176-n', '00234295-n']
genetics ['00965164-n', '01246722-n', '04437822-n']
geography ['00296722-n', '00495113-n', '00869513-n']
geology ['01211845-n', '03880499-n', '05750601-n']
geometry ['02737482-n', '04823359-n', '04823484-n']
golf ['00119394-n', '00440870-n', '00442154-n']
grammar ['05802355-n', '05803692-n', '05803834-n']
graphic_arts ['00881145-n', '00882398-n', '00882599-n']
health ['00411676-n', '00411845-n', '00412014-n']
heraldry ['02620558-n', '02730197-n', '02900890-n']
history ['00197005-n', '00197384-n', '00404659-n']
hockey ['00226800-n', '00439578-n', '00443865-n']
home ['00243439-n', '00243961-n', '00244056-n']
humanities ['05757212-n', '05758244-n', '05758363-n']
hunting ['00296565-n', '00428522-n', '00428963-n']
hydraulics ['02598155-n', '02602772-n', '02697999-n']
industry ['00095171-n', '00095493-n', '00359417-n']
insurance ['01000872-n', '01001063-n', '01025188-n']
jewellery ['02593004-n', '02619815-n', '02620335-n']
law ['00063593-n', '00063864-n', '00064105-n']
linguistics ['00028764-n', '00372924-n', '00373171-n']
literature ['00379666-n', '00576865-n', '00846266-n']
mathematics ['00817137-n', '00817469-n', '00817676-n']
mechanics ['00091357-n', '00961512-n', '02578707-n']
medicine ['00037703-n', '00134061-n', '00139624-n']
meteorology ['04389229-n', '04389995-n', '04390430-n']
metrology ['00029305-n', '00183796-n', '00184027-n']
military ['00050037-n', '00050125-n', '00050443-n']
money ['00347998-n', '00348158-n', '00755967-n']
mountaineering ['00311205-n', '00311376-n', '02725052-n']
music ['00092967-n', '00093905-n', '00094124-n']
mythology ['00846266-n', '01237769-n', '01746526-n']
nautical ['00047236-n', '00294065-n', '00335043-n']
number ['05516764-n', '05516915-n', '05517053-n']
numismatics ['00957079-n', '03373458-n', '03696056-n']
occultism ['05441555-n', '05441767-n', '05441881-n']
oceanography ['04261685-n', '05754133-n', '05754309-n']
optics ['00597407-n', '02575903-n', '02583547-n']
painting ['00674641-n', '00675073-n', '00675181-n']
paleontology ['09720701-n', '00493843-v', '00494022-v']
paranormal ['05450358-n', '06811038-n', '06811245-n']
pedagogy ['00565801-n', '00577669-n', '00686392-n']
person ['00006026-n', '02375293-n', '02383992-n']
pharmacy ['01182814-n', '02576511-n', '02576680-n']
philately ['00957467-n', '00957621-n', '07477430-n']
philology ['00380217-n', '00614564-n', '01180100-n']
philosophy ['00846409-n', '04535641-n', '04566807-n']
photography ['00586054-n', '00849301-n', '00850557-n']
physics ['00017572-n', '01255904-n', '01256045-n']
physiology ['00109419-n', '00109562-n', '00109873-n']
plants ['00014510-n', '00267110-n', '01273249-n']
plastic_arts ['02890455-n', '03134250-n', '03169523-n']
play ['00102398-n', '00120661-n', '00123296-n']
politics ['00081522-n', '00081735-n', '00154398-n']
post ['02587950-n', '02598582-n', '03572001-n']
psychiatry ['04460879-n', '05345412-n', '05553485-n']
psychoanalysis ['00241242-n', '04439759-n', '04440096-n']
psychological_features ['00021668-n', '04436965-n', '04437822-n']
psychology ['00020333-n', '00397407-n', '00871931-n']
publishing ['01038910-n', '01039351-n', '01039489-n']
pure_science ['02726928-n', '04060314-n', '04075875-n']
quality ['04446414-n', '04473460-n', '04602624-n']
racing ['00282200-n', '00282432-n', '00282573-n']
radio+tv ['00961038-n', '02613398-n', '02661211-n']
radiology ['00847422-n', '00847655-n', '00847815-n']
railway ['02678549-n', '02782588-n', '02828232-n']
religion ['00049496-n', '00087339-n', '00087564-n']
roman_catholic ['00978964-n', '00979217-n', '00979786-n']
rowing ['00326845-n', '00422031-n', '00422209-n']
rugby ['00128651-n', '00446541-n', '00446852-n']
school ['00060419-n', '00060639-n', '00571659-n']
sculpture ['02608146-n', '02614464-n', '02705377-n']
sexuality ['00056792-n', '00056972-n', '00139828-n']
skating ['00424899-n', '00425073-n', '00425181-n']
skiing ['00284969-n', '00417537-n', '00417712-n']
soccer ['00123434-n', '00128104-n', '00128466-n']
social_science ['06230398-n', '06230722-n', '06230938-n']
sociology ['00028549-n', '00050879-n', '00051103-n']
sport ['00036350-n', '00041454-n', '00057655-n']
statistics ['05533307-n', '05670554-n', '05670786-n']
sub ['02637410-n']
surgery ['00886582-n', '00886866-n', '00886995-n']
swimming ['00418886-n', '00419111-n', '00419563-n']
table_tennis ['00065894-n', '00066048-n', '00473948-n']
tax ['00698331-n', '00957723-n', '01018094-n']
telecommunication ['00028764-n', '00501421-n', '00501691-n']
telegraphy ['03384013-n', '05892545-n', '05892669-n']
telephony ['02829853-n', '02885913-n', '02887980-n']
tennis ['00065894-n', '00066048-n', '00457626-n']
theatre ['00069871-n', '00152613-n', '00520929-n']
theology ['00225646-n', '00579970-n', '00834968-n']
time_period ['00023548-n', '00866778-n', '00866914-n']
topography ['08064731-n', '08064861-n', '08064999-n']
tourism ['00047580-n', '00047871-n', '00091856-n']
town_planning ['00254119-n', '00564442-n', '00564691-n']
transport ['00043484-n', '00046282-n', '00046475-n']
university ['01071523-n', '02804575-n', '02837634-n']
vehicles ['00427877-n', '02593287-n', '02646948-n']
veterinary ['13633296-n']
volleyball ['00455553-n', '04363565-n', '04363665-n']
wrestling ['00424160-n', '00424481-n', '00424559-n']