Word Linker
This module offers the ability to establish relationships between BaseWord instances and BaseAuthor instances. This is done via the WordLinker class which provides methods to check and add parent-child relationships between words and associate authors with words.
- class loglan_core.addons.word_linker.WordLinker[source]
Bases:
objectThis class provides methods to manage parent-child relationships between words and to associate authors with words.
- static add_author(word, author)[source]
Associates an ‘author’ with a ‘word’, indicating that the author has contributed to the word.
- Parameters:
word (BaseWord) – The word to be associated with the author.
author (BaseAuthor) – The author to be associated with the word.
- Returns:
The abbreviation of the author’s name.
- Return type:
str
- static add_authors(word, authors)[source]
Associates multiple ‘authors’ with a ‘word’, indicating that these authors have contributed to the word.
- Parameters:
word (BaseWord) – The word to be associated with the authors.
authors (list[BaseAuthor]) – The authors to be associated with the word.
- classmethod add_child(parent, child)[source]
Associates a ‘child’ word with a ‘parent’ word, indicating that the child is derived from the parent.