logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

wn - command line interface to WordNet lexical database

Bugs

       Please report bugs to wordnet@princeton.edu.

WordNet 3.0                                         Dec 2006                                             WN(1WN)

Description

wn()  provides  a  command  line  interface to the WordNet database, allowing synsets and relations to be
       displayed as formatted text.  For each word, different searches are provided, based on syntactic category
       and pointer types.  Although only base forms of words are usually stored in WordNet, users may search for
       inflected forms.  A morphological process is applied to the search string to  generate  a  form  that  is
       present in WordNet.

       The  command  line interface is often useful when writing scripts to extract information from the WordNet
       database.  Post-processing of the output with  various  scripting  tools  can  reformat  the  results  as
       desired.

Environment Variables (Unix)

WNHOME              Base directory for WordNet.  Default is /usr/local/WordNet-3.0.

       WNSEARCHDIR         Directory in which the WordNet database has been installed.  Default is WNHOME/dict.

Exit Status

wn() normally exits with the number of senses displayed.  If searchword is not found in WordNet, it exits
       with 0.

       If the WordNet database cannot be opened, an error messages is displayed and wn() exits with -1.

Files

index.pos           database index files

       data.pos            database data files

       *.vrb               files of sentences illustrating the use of verbs

       pos.exc             morphology exception lists

Name

       wn - command line interface to WordNet lexical database

Options

-h             Print help text before search results.

       -g             Display textual glosses associated with synsets.

       -a             Display lexicographer file information.

       -o             Display synset offset of each synset.

       -s             Display each word's sense numbers in synsets.

       -l             Display the WordNet copyright notice, version number, and license.

       -n#            Perform search on sense number # only.

       -over          Display overview of all senses of searchstr in all syntactic categories.

   SearchOptions
       Note  that  the last letter of search_option generally denotes the part of speech that the search applies
       to: n for nouns, v for verbs, a for adjectives, and r for adverbs.  Multiple searches  may  be  done  for
       searchstr with a single command by specifying all the appropriate search options.

       -syns(n | v | a | r)
                      Display  synonyms  and  immediate  hypernyms of synsets containing searchstr.  Synsets are
                      ordered by estimated frequency of use.  For adjectives, if searchstr is in a head  synset,
                      the cluster's satellite synsets are displayed in place of hypernyms.  If searchstr is in a
                      satellite synset, its head synset is also displayed.

       -simsv         Display  verb  synonyms  and immediate hypernyms of synsets containing searchstr.  Synsets
                      are grouped by similarity of meaning.

       -ants(n | v | a | r)
                      Display synsets containing antonyms of searchstr.  For adjectives, if searchstr  is  in  a
                      head  synset,  searchstr  has a direct antonym.  The head synset for the direct antonym is
                      displayed along with the direct  antonym's  satellite  synsets.   If  searchstr  is  in  a
                      satellite  synset,  searchstr  has  an  indirect  antonym  via  the  head synset, which is
                      displayed.

       -faml(n | v | a | r)
                      Display familiarity and polysemy information for searchstr.

       -hype(n | v)   Recursively display hypernym (superordinate) tree for searchstr (searchstrISAKINDOF_____ relation).

       -hypo(n | v)   Display  immediate  hyponyms  (subordinates)  for  searchstr (_____ISAKINDOFsearchstr
                      relation).

       -tree(n | v)   Display hyponym (subordinate) tree for searchstr.  This is a recursive search  that  finds
                      the hyponyms of each hyponym.

       -coor(n | v)   Display the coordinates (sisters) of searchstr.  This search prints the immediate hypernym
                      for each synset that contains searchstr and the hypernym's immediate hyponyms.

       -deri(n | v)   Display derivational morphology links between noun and verb forms.

       -domn(n | v | a | r)
                      Display domain that searchstr has been classified in.

       -domt(n | v | a | r)
                      Display all terms classified as members of the searchstr's domain.

       -subsn         Display substance meronyms of searchstr (HASSUBSTANCE relation).

       -partn         Display part meronyms of searchstr (HASPART relation).

       -membn         Display member meronyms of searchstr (HASMEMBER relation).

       -meron         Display all meronyms of searchstr (HASPART,HASMEMBER,HASSUBSTANCE relations).

       -hmern         Display  meronyms  for  searchstr  tree.   This  is a recursive search that prints all the
                      meronyms of searchstr and all of its hypernyms.

       -sprtn         Display partof holonyms of searchstr (PARTOF relation).

       -smemn         Display memberof holonyms of searchstr (MEMBEROF relation).

       -ssubn         Display substanceof holonyms of searchstr (SUBSTANCEOF relation).

       -holon         Display all holonyms of searchstr (PARTOF,MEMBEROF,SUBSTANCEOF relations).

       -hholn         Display holonyms for searchstr tree.  This is a  recursive  search  that  prints  all  the
                      holonyms of searchstr and all of each holonym's holonyms.

       -entav         Display entailment relations of searchstr.

       -framv         Display applicable verb sentence frames for searchstr.

       -causv         Display causeto relations of searchstr.

        -pert(a | r)  Display pertainyms of searchstr.

        -attr(n | a)  Display adjective values for noun attribute, or noun attributes of adjective values.

       -grep(n | v | a | r)
                      List compound words containing searchstr as a substring.

Registry (Windows)

HKEY_LOCAL_MACHINE\SOFTWARE\WordNet\3.0\WNHome
                           Base directory for WordNet.  Default is C:\ProgramFiles\WordNet\3.0.

See Also

wnintro(1WN), wnb(1WN), wnintro(3WN), lexnames(5WN), senseidx(5WN) wndb(5WN), wninput(5WN),  morphy(7WN),
       wngloss(7WN), wngroups(7WN).

Synopsis

wn [ searchstr ] [ -h] [ -g ] [ -a ] [ -l ] [ -o ] [ -s ] [ -n# ] [ search_option... ]

See Also