PROLOG and WordNet (1)

Source: Internet
Author: User
Tags knowledge base
The original translation in this article is accessing WordNet from Prolog written by Sarah witzig. Use prolog to operate WordNet WordNet is a semantic network system, and the developer is Princeton University. This article describes the WordNet database of the prolog version and interface predicates in detail. WordNet is a more convenient dictionary. You can obtain all the information you want without having to search in alphabetical order. WordNet can also be used as a variety of applications Program . It has a Prolog database. This document describes how to optimize the database. 1. The basic concept of WordNet is a collection of synonyms, synset for short. Words in the same synset have the same identifier. Because a word may have multiple meanings, it also belongs to other synsets, and multiple entries and identifiers are formed in the prolog database. The above basic information, PROLOG is defined by a clause and saved in the wn_s.pl file. A clause that contains a word, its identifier, and additional information. There are also 15 files named wn_xxx.pl. Xxx indicates the different relationships between WordNet words. For example, wn_s.pl indicates wordnet_synset. The relationship expressed by XXX also has semantic and vocabulary meanings. The relationship between words, which is described by the relationship between vocabulary units. A collection is a word relationship. The semantic relationship indicates the association between the meanings of words. For example, an upper-level relationship is a semantic relationship, which indicates that it is in a high-level status or belongs to a higher level. 2. Various Prolog files (1) wn_s.plwn_s.pl are the main files that store the synet information of the WordNet corpus. Each word is represented by the predicate s with six parameters: S (synset_id, w_num, 'word', ss_type, sense_number, tag_count ). the 1st parameter synset_id is a 9-digit number indicating the synset of the word. As mentioned above, words belonging to the same synset are synonyms. It is encoded according to the synset syntax category, from the 9-digit 1st bits: 1: noun; 2: verb; 3: adjective; 4: adverbs. The other 8 digits in 9 bits indicate the specific synset. The 2nd w_num parameter is the position of the word in synset, and the value is a continuous sequence starting from 1. For example, the synset Knowledge Base numbered 100041682 looks like this: S (1000100002,1, 'close _ call', N ). S (100010000, 'close _ shave ', N ). S (1000100002,3, 'squeak', N ). S (1000100002, 4, 'bucket', N, 2, 0 ). S (100010000, 'narrow _ escape ', N ). the 3rd parameters are the words in the middle of the brackets, such as 'close _ call '. The 4th ss_type parameter indicates the type of synset. The type is limited to nouns, verbs, adjectives, and adverbs. Does not include pronouns, hyphens, prepositions, and exclamation points. Nouns, verbs, and adverbs are represented by N, V, and R. adjectives are divided into two types: words and adjective satellites. If a word belongs to head synset, it is also an adjective. (2) wn_g.pl is an annotation file that provides the definition, explanation, and example sentences for each synset. Its predicate is: G (synset_id, '(GLOSS)'). 1st parameters are synset identifiers, and 2nd parameters are annotations surrounded by parentheses and single quotes. For example, synset with the identifier 100031541 has two words: Walking and sledding. The corresponding Clause g () defines the two words. G (100031541, '(advancing toward a goal; ''persuading him was easy going ''; ''the proposal faces tough sledding '')'). (3) wn_hyp.plhyp is short for hypernym, meaning "hypernym ". A top-level word refers to a word with a broader meaning. Only verbs and nouns have upper-level words. For example, "dogs" use the top terms "mammals" and "animals ". The relationship between the upper and lower bits is a semantic relationship between two synsets. In the wn_hyp.pl file, the predicate Hyp (synset_id_1, synset_id_2) indicates the upper-lower bitwise relationship. In the two parameters, synset_id_2 represents a synonym set, which is the upper part of synset_id_1. For example, the synset identifier of the word dog is 101752990. In the wn_hyp.pl file, we can see Hyp (101752990,101 752283). All the words in set 101752283 are the top words of dog, such as canine ). Remember, the top word of a word is also the top word of the word. You can find the upper-level relationship chain accordingly. In the working with WordNet section, the predicates find_hyp/3 and find_hyp_chains/2 are introduced.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.