1WN(1)                       WordNet™ User Commands                       WN(1)
2
3
4

NAME

6       wn - command line interface to WordNet lexical database
7

SYNOPSIS

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

DESCRIPTION

13       wn() provides a command line interface to the WordNet database,  allow‐
14       ing  synsets and relations to be displayed as formatted text.  For each
15       word, different searches are provided, based on syntactic category  and
16       pointer types.  Although only base forms of words are usually stored in
17       WordNet, users may search for inflected forms.  A morphological process
18       is  applied  to the search string to generate a form that is present in
19       WordNet.
20
21       The command line interface is often  useful  when  writing  scripts  to
22       extract  information from the WordNet database.  Post-processing of the
23       output with  various  scripting  tools  can  reformat  the  results  as
24       desired.
25

OPTIONS

27       -h             Print help text before search results.
28
29       -g             Display textual glosses associated with synsets.
30
31       -a             Display lexicographer file information.
32
33       -o             Display synset offset of each synset.
34
35       -s             Display each word's sense numbers in synsets.
36
37       -l             Display  the  WordNet  copyright notice, version number,
38                      and license.
39
40       -n#            Perform search on sense number # only.
41
42       -over          Display overview of all senses of searchstr in all  syn‐
43                      tactic categories.
44
45   Search Options
46       Note  that  the last letter of search_option generally denotes the part
47       of speech that the search applies to: n for nouns, v for verbs,  a  for
48       adjectives,  and  r  for  adverbs.   Multiple  searches may be done for
49       searchstr with a single  command  by  specifying  all  the  appropriate
50       search options.
51
52
53       -syns(n | v | a | r)
54                      Display synonyms and immediate hypernyms of synsets con‐
55                      taining searchstr.  Synsets  are  ordered  by  estimated
56                      frequency  of use.  For adjectives, if searchstr is in a
57                      head synset, the cluster's satellite  synsets  are  dis‐
58                      played  in  place  of  hypernyms.   If searchstr is in a
59                      satellite synset, its head synset is also displayed.
60
61       -simsv         Display verb synonyms and immediate hypernyms of synsets
62                      containing searchstr.  Synsets are grouped by similarity
63                      of meaning.
64
65       -ants(n | v | a | r)
66                      Display synsets containing antonyms of  searchstr.   For
67                      adjectives,  if searchstr is in a head synset, searchstr
68                      has a direct antonym.  The head synset  for  the  direct
69                      antonym  is  displayed  along  with the direct antonym's
70                      satellite synsets.   If  searchstr  is  in  a  satellite
71                      synset,  searchstr  has an indirect antonym via the head
72                      synset, which is displayed.
73
74       -faml(n | v | a | r)
75                      Display familiarity and polysemy information for search‐
76                      str.
77
78       -hype(n | v)   Recursively  display  hypernym  (superordinate) tree for
79                      searchstr (searchstr IS A KIND OF _____ relation).
80
81       -hypo(n | v)   Display immediate hyponyms (subordinates) for  searchstr
82                      (_____ IS A KIND OF searchstr relation).
83
84       -tree(n | v)   Display  hyponym (subordinate) tree for searchstr.  This
85                      is a recursive search that finds the  hyponyms  of  each
86                      hyponym.
87
88       -coor(n | v)   Display  the  coordinates  (sisters) of searchstr.  This
89                      search prints the immediate  hypernym  for  each  synset
90                      that  contains  searchstr  and  the hypernym's immediate
91                      hyponyms.
92
93       -deri(n | v)   Display derivational morphology links between  noun  and
94                      verb forms.
95
96       -domn(n | v | a | r)
97                      Display domain that searchstr has been classified in.
98
99       -domt(n | v | a | r)
100                      Display  all  terms classified as members of the search‐
101                      str's domain.
102
103       -subsn         Display substance meronyms of searchstr  (HAS  SUBSTANCE
104                      relation).
105
106       -partn         Display part meronyms of searchstr (HAS PART relation).
107
108       -membn         Display  member  meronyms of searchstr (HAS MEMBER rela‐
109                      tion).
110
111       -meron         Display all meronyms of searchstr (HAS PART, HAS MEMBER,
112                      HAS SUBSTANCE relations).
113
114       -hmern         Display  meronyms  for searchstr tree.  This is a recur‐
115                      sive search that prints all the  meronyms  of  searchstr
116                      and all of its hypernyms.
117
118       -sprtn         Display  part  of  holonyms  of searchstr (PART OF rela‐
119                      tion).
120
121       -smemn         Display member of holonyms of searchstr (MEMBER OF rela‐
122                      tion).
123
124       -ssubn         Display substance of holonyms of searchstr (SUBSTANCE OF
125                      relation).
126
127       -holon         Display all holonyms of searchstr (PART OF,  MEMBER  OF,
128                      SUBSTANCE OF relations).
129
130       -hholn         Display  holonyms  for searchstr tree.  This is a recur‐
131                      sive search that prints all the  holonyms  of  searchstr
132                      and all of each holonym's holonyms.
133
134       -entav         Display entailment relations of searchstr.
135
136       -framv         Display applicable verb sentence frames for searchstr.
137
138       -causv         Display cause to relations of searchstr.
139
140        -pert(a | r)  Display pertainyms of searchstr.
141
142        -attr(n | a)  Display  adjective  values  for  noun attribute, or noun
143                      attributes of adjective values.
144
145       -grep(n | v | a | r)
146                      List compound words containing searchstr as a substring.
147

SEARCH RESULTS

149       The results of a search are written to the standard output.   For  each
150       search,  the output consists a one line description of the search, fol‐
151       lowed by the search results.
152
153       All searches other than -over  list  all  senses  matching  the  search
154       results  in the following general format.  Items enclosed in italicized
155       square brackets ([ ... ]) may not be present.
156
157              One line listing  the  number  of  senses  matching  the  search
158              request.
159
160              Each sense matching the search requested displayed as follows:
161
162                   Sense n
163                   [{synset_offset}] [<lex_filename>]  word1[#sense_number][,  word2...]
164
165              Where n is the sense number of the search word, synset_offset is
166              the byte offset of the synset in the data.pos file corresponding
167              to the syntactic category, lex_filename is the name of the lexi‐
168              cographer file that the synset comes from, word1  is  the  first
169              word in the synset (note that this is not necessarily the search
170              word) and sense_number is the WordNet sense number  assigned  to
171              the preceding word.  synset_offset, lex_filename, and sense_num‐
172              ber are generated when the -o, -a, and -s options, respectively,
173              are specified.
174
175              The synsets matching the search requested are printed below each
176              sense's synset output described above.  Each line of  output  is
177              preceded  by  a marker (usually =>), then a synset, formatted as
178              described above.  If a search traverses more one  level  of  the
179              tree, then successive lines are indented by spaces corresponding
180              to its level in the hierarchy.  When the -g option is specified,
181              synset  glosses  are displayed in parentheses at the end of each
182              synset.  Each synset is printed on one line.
183
184              Senses are generally ordered from most to least frequently used,
185              with  the  most  common  sense  numbered 1.  Frequency of use is
186              determined by the number of times a sense is tagged in the vari‐
187              ous  semantic  concordance  texts.  Senses that are not semanti‐
188              cally tagged follow the ordered senses.  Note that this ordering
189              is only an estimate based on usage in a small corpus.
190
191              Verb senses can be grouped by similarity of meaning, rather than
192              ordered by frequency of  use.   The  -simsv  search  prints  all
193              senses that are close in meaning together, with a line of dashes
194              indicating the end of a group.  See wngroups(7) for a discussion
195              of how senses are grouped.
196
197              The  -over  search displays an overview of all the senses of the
198              search word in all syntactic categories.  The  results  of  this
199              search  are  similar  to the -syns search, however no additional
200              (ex. hypernym) synsets are displayed,  and  synset  glosses  are
201              always  printed.   The senses are grouped by syntactic category,
202              and each synset is annotated as described above with synset_off‐
203              set,  lex_filename,  and sense_number as dictated by the -o, -a,
204              and -s options.  The overview search also indicates how many  of
205              the  senses  in  each  syntactic category are represented in the
206              tagged texts.  This is a way for the user to determine whether a
207              sense's  sense  number is based on semantic tagging data, or was
208              arbitrarily assigned.   For each sense that has appeared in such
209              texts,  the  number of semantic tags to that sense are indicated
210              in parentheses after the sense number.
211
212              If a search cannot be performed on some senses of searchstr, the
213              search results are headed by a string of the form:
214                   X of Y senses of searchstr
215
216              The output of the -deri search shows word forms that are morpho‐
217              logically related to searchstr. Each word form pointed  to  from
218              searchstr is displayed, preceded by RELATED TO-> and the syntac‐
219              tic category of the link, followed, on the  next  line,  by  its
220              synset.  Printed after the word form is #n where n indicates the
221              WordNet sense number of the term pointed to.
222
223              The -domn and -domt searches show the domain that a  synset  has
224              been  classified  in and, conversely, all of the terms that have
225              been assigned to a specific domain.  A domain is either a TOPIC,
226              REGION  or USAGE, as reflected in the specific pointer character
227              stored in the database, and displayed in the  output.   A  -domn
228              search on a term shows the domain, if any, that each synset con‐
229              taining searchstr has been classified in.   The  output  display
230              shows  the domain type (TOPIC, REGION or USAGE), followed by the
231              syntactic category of the domain synset and  the  terms  in  the
232              synset.  Each term is followed by #n where n indicates the Word‐
233              Net sense number of the term.  The converse search, -domt, shows
234              all of the synsets that have been placed into the domain search‐
235              str, with analogous markers.
236
237              When -framv is  specified,  sample  illustrative  sentences  and
238              generic  sentence frames are displayed.  If a sample sentence is
239              found, the base form of search is substituted into the sentence,
240              and  it  is  printed  below  the  synset,  preceded with the EX:
241              marker.  When no sample sentences are found,  the  generic  sen‐
242              tence frames are displayed.  Sentence frames that are acceptable
243              for all words in a synset are preceded by the marker *>.   If  a
244              frame  is acceptable for the search word only, it is preceded by
245              the marker =>.
246
247              Search results for adjectives are slightly different from  those
248              for  other  parts  of speech.  When an adjective is printed, its
249              direct antonym, if it has one, is also printed  in  parentheses.
250              When  searchstr  is  in  a head synset, all of the head synset's
251              satellites are also displayed.  The position of an adjective  in
252              relation  to the noun may be restricted to the prenominal, post‐
253              nominal or predicative position.  Where present, these  restric‐
254              tions are noted in parentheses.
255
256              When  an  adjective  is a participle of a verb, the output indi‐
257              cates the verb and displays its synset.
258
259              When an adverb is derived from an adjective, the specific adjec‐
260              tival sense on which it is based is indicated.
261
262              The  morphological  transformations performed by the search code
263              may result in more than one word to search for.   WordNet  auto‐
264              matically  performs  the  requested search on all of the strings
265              and returns the results grouped by word.  For example, the  verb
266              saw  is both the present tense of saw and the past tense of see.
267              When passed searchstr saw, WordNet performs the  desired  search
268              first  on  saw and next on see, returning the list of saw senses
269              and search results, followed by those for see.
270

EXIT STATUS

272       wn() normally exits with the number of senses displayed.  If searchword
273       is not found in WordNet, it exits with 0.
274
275       If  the  WordNet  database  cannot be opened, an error messages is dis‐
276       played and wn() exits with -1.
277

ENVIRONMENT VARIABLES (UNIX)

279       WNHOME              Base   directory   for   WordNet.     Default    is
280                           /usr/local/WordNet-3.0.
281
282       WNSEARCHDIR         Directory  in  which  the WordNet database has been
283                           installed.  Default is WNHOME/dict.
284

REGISTRY (WINDOWS)

286       HKEY_LOCAL_MACHINE\SOFTWARE\WordNet\3.0\WNHome
287                           Base directory for  WordNet.   Default  is  C:\Pro‐
288                           gram Files\WordNet\3.0.
289

FILES

291       index.pos           database index files
292
293       data.pos            database data files
294
295       *.vrb               files of sentences illustrating the use of verbs
296
297       pos.exc             morphology exception lists
298

SEE ALSO

300       wnintro(1), wnb(1), wnintro(3), lexnames(5), senseidx(5) wndb(5), wnin‐
301       put(5), morphy(7), wngloss(7), wngroups(7).
302

BUGS

304       Please report bugs to wordnet@princeton.edu.
305
306
307
308WordNet 3.0                        Dec 2006                              WN(1)
Impressum