Package pylilac :: Module Word :: Class Headword
[frames | no frames]

Class Headword


A single unit of language, with no functional decoration.

Usually, headword are the entry words in dictionary and encyclopediae.
Method Summary
  __init__(self, language, entry_word, id, p_o_s, attributes, meaning)
Create a headword in a specific language for the entry word specified.
  __eq__(self, other)
Compare the whole keys of two given headwords.
  __repr__(self)
Give a verbose representation for a headword.
  __str__(self)
Give a concise representation for a headword.

Method Details

__init__(self, language, entry_word, id, p_o_s, attributes=None, meaning=None)
(Constructor)

Create a headword in a specific language for the entry word specified.

Example:
       Headword("eng", u"heart", 1, "noun", None, "kawcesi") #heart, the heart organ in English, with no classification.
       Headword("eng", u"heart", 2, "noun", None, "kawcijumi") #heart, the heart shape in English.
       Headword("eng/p/GA", u"hɑɹt", 1, "noun", None ,"kawcesi") #/h\u0251\u0279t/, /hɑɹt/, the heart organ phonic representation in General American English
       Headword("tko", u"moku", 1, "verb", {"transitive": "n"}, "fucala") #moku, "to eat" in Toki Pona
Parameters:
language -

A language code according to ISO standard.

For the language codes, refer to 639-3 specifications.
           (type=str)
entry_word -

A Unicode representation of the entry word, either graphical or phonical.

The representation of a word can be its written form or its spoken form, refer to Unicode conventions for the proper encoding.

For phonical representations, the alphabet of the IPA (Internationa Phonetic Association) is the standard, though some kind of extension could be advisable; the representation should be a phonetic transcription.
           (type=unicode)
id -

A unique id to distinguish different headwords having identical representation in a given language.

Major meanings in dictionaries are usually associated to different id's.
           (type=number)
p_o_s -

A string which indicates the part of speech to which the headword belongs to in the specific language.

The part of speech is the general classification of the word: usually it distinguish nouns from verbs &c..
           (type=str)
attributes -

The attributes of the headword; default is the empty dictionary.

Attributes can specify better the features of a particular part of speech.
           (type=dict (srt, str))
meaning -

The meaning and the translation technique, referring to the interlingua.

For the interlingua to use, Latejami or its successors are recommended.
           (type=str)

__eq__(self, other)
(Equality operator)

Compare the whole keys of two given headwords. Two headwords are identical if they have the same language, entry word and id.

__repr__(self)
(Representation operator)

Give a verbose representation for a headword.

__str__(self)
(Informal representation operator)

Give a concise representation for a headword.
Returns:
the entry word.

Generated by Epydoc 2.1 on Sat Aug 26 09:33:46 2006 http://epydoc.sf.net