Did you know ... Search Documentation:
Pack wordnet -- prolog/wn.pl
PublicShow source

This module discloses the Wordnet Prolog files is a more SWI-Prolog friendly manner. It exploits SWI-Prolog demand-loading and SWI-Prolog Quick Load Files to load `just-in-time' and as quickly as possible.

The system creates Quick Load Files for each wordnet file needed if the .qlf file doesn't exist and the wordnet directory is writeable. For shared installations it is adviced to run load_wordnet/0 as user with sufficient privileges to create the Quick Load Files.

This library defines a portray/1 rule to explain synset ids.

Some more remarks:

  • SynSet identifiers are large numbers. Such numbers require significant more space on the stacks but not in clauses and therefore it is not considered worthwhile to strip the type info represented in the most significant digit.
  • On wordnet 2.0, the syntactic category deduced from the synset id is consistent with the 4th argument of s/6, though both adjective and adjective_satellite are represented as 3XXXXXXXX
author
- Originally by Jan Wielemaker. Partly documented by Samer Abdallah. Current comments copied from prologdb.5WN.html file from the sources.
See also
- Wordnet is a lexical database for the English language. See http://www.cogsci.princeton.edu/~wn/
 wn_ant(?Antonym1, ?Wnum1, ?Antonym2, ?WNum2) is nondet
The ant operator specifies antonymous word s. This is a lexical relation that holds for all syntactic categories. For each antonymous pair, both relations are listed (ie. each synset_id,w_num pair is both a source and target word.)
 wn_at(?Noun, ?Adjective) is nondet
The at operator defines the attribute relation between noun and adjective synset pairs in which the adjective is a value of the noun. For each pair, both relations are listed (ie. each synset_id is both a source and target).
 wn_cls(?SynSet, ?W1, ?Class, ?W2, ?ClassType) is nondet
The cls operator specifies that the first synset has been classified as a member of the class represented by the second synset. Either of the w_num's can be 0, reflecting that the pointer is semantic in the original WordNet database.
 wn_cs(?SynSet, ?Causes) is nondet
First kind of event is caused by second.

The cs operator specifies that the second synset is a cause of the first synset. This relation only holds for verbs.

 wn_der(?SynSet1, ?W1, ?SynSet2, ?W2) is nondet
The der operator specifies that there exists a reflexive lexical morphosemantic relation between the first and second synset terms representing derivational morphology.
 wn_ent(?SynSet, ?Entailment) is nondet
The ent operator specifies that the second synset is an entailment of first synset. This relation only holds for verbs.
 wn_fr(?Synset, ?Wnum, ?Fnum) is nondet
fr operator specifies a generic sentence frame for one or all words in a synset. The operator is defined only for verbs.
 wn_g(?SynSet, ?Gloss) is nondet
The g operator specifies the gloss for a synset.
 wn_hyp(?Hyponym, ?HyperNym) is nondet
The hyp operator specifies that the second synset is a hypernym of the first synset. This relation holds for nouns and verbs. The reflexive operator, hyponym, implies that the first synset is a hyponym of the second synset.
 wn_ins(?A, ?B) is nondet
The ins operator specifies that the first synset is an instance of the second synset. This relation holds for nouns. The reflexive operator, has_instance, implies that the second synset is an instance of the first synset.
 wn_mm(?SynSet, ?MemberMeronym) is nondet
The mm operator specifies that the second synset is a member meronym of the first synset. This relation only holds for nouns. The reflexive operator, member holonym, can be implied.
 wn_mp(?SynSet, ?PartMeronym) is nondet
The mp opeQrator specifies that the second synset is a part meronym of the first synset. This relation only holds for nouns. The reflexive operator, part holonym, can be implied.
 wn_ms(?SynSet, ?SubstanceMeronym) is nondet
The ms operator specifies that the second synset is a substance meronym of the first synset. This relation only holds for nouns. The reflexive operator, substance holonym, can be implied.
 wn_per(?Synset1, ?WNum1, ?Synset2, ?WNum2) is nondet
The per operator specifies two different relations based on the parts of speech involved. If the first word is in an adjective synset, that word pertains to either the noun or adjective second word. If the first word is in an adverb synset, that word is derived from the adjective second word.
 wn_ppl(?Synset1, ?WNum1, ?Synset2, ?WNum2) is nondet
ppl operator specifies that the adjective first word is a participle of the verb second word. The reflexive operator can be implied.
 wn_s(?SynSet, ?WNum, ?Word, ?SynSetType, ?Sense, ?Tag) is nondet
A s operator is present for every word sense in WordNet. In wn_s.pl, w_num specifies the word number for word in the synset.
 wn_sa(?Synset1, ?WNum1, ?Synset2, ?WNum2) is nondet
The sa operator specifies that additional information about the first word can be obtained by seeing the second word. This operator is only defined for verbs and adjectives. There is no reflexive relation (ie. it cannot be inferred that the additional information about the second word can be obtained from the first word).
 wn_sim(?SynSet, ?Similar) is nondet
The sim operator specifies that the second synset is similar in meaning to the first synset. This means that the second synset is a satellite the first synset, which is the cluster head. This relation only holds for adjective synsets contained in adjective clusters.
 wn_sk(?A, ?B, ?C) is nondet
A sk operator is present for every word sense in WordNet. This gives the WordNet sense key for each word sense.
 wn_syntax(?A, ?B, ?C) is nondet
The syntax operator specifies the syntactic marker for a given word sense if one is specified.
 wn_vgp(?Verb, ?W1, ?Similar, ?W2) is nondet
vgp operator specifies verb synsets that are similar in meaning and should be grouped together when displayed in response to a grouped synset search.
 wn_cat(+SynSet, -SyntacticCategory, -Offset) is det
Break the synset id into its syntactic category and offset as defined in the manpage prologdb.5
 ss_type(+Code, -Type) is det
ss_type(-Code, -Type) is nondet
Mapping between readable syntactic category and code.
 load_wordnet is det
Load all of wordnet. This must be used to create all .QLF files or before creating a stand-alone saved state