Class for generating Lexeme description strings.
More...
|
| __construct (LabelDescriptionLookup $lookup, EntityIdParser $idParser, Language $displayLanguage) |
|
| getLabelOrDefault (?EntityId $id=null, $default="") |
| Get label or return empty string.
|
|
| createDescription (EntityId $id, $language, $category) |
| Create short lexeme description, e.g.: "German noun" or "English verb" Currently not uses the ID, may change later.
|
|
| createFormDescription (EntityId $lexemeId, array $features, $lemma, $language, $category) |
| Create Form descriptions, along the lines of: singular genitive for Leiter (L1): German noun.
|
|
|
static | parseOrNull ( $text, EntityIdParser $idParser) |
| Parse entity ID or return null.
|
|
Class for generating Lexeme description strings.
- Copyright
- GPL-2.0-or-later
◆ __construct()
Wikibase\Lexeme\DataAccess\LexemeDescription::__construct |
( |
LabelDescriptionLookup | $lookup, |
|
|
EntityIdParser | $idParser, |
|
|
Language | $displayLanguage ) |
◆ createDescription()
Wikibase\Lexeme\DataAccess\LexemeDescription::createDescription |
( |
EntityId | $id, |
|
|
| $language, |
|
|
| $category ) |
Create short lexeme description, e.g.: "German noun" or "English verb" Currently not uses the ID, may change later.
- Parameters
-
EntityId | $id | Lexeme ID |
string | $language | Language ID, as string |
string | $category | Lexical category ID, as string |
- Returns
- string
◆ createFormDescription()
Wikibase\Lexeme\DataAccess\LexemeDescription::createFormDescription |
( |
EntityId | $lexemeId, |
|
|
array | $features, |
|
|
| $lemma, |
|
|
| $language, |
|
|
| $category ) |
Create Form descriptions, along the lines of: singular genitive for Leiter (L1): German noun.
- Parameters
-
EntityId | $lexemeId | Main lexeme |
EntityId[] | $features | Form feature IDs list |
string | $lemma | Lexeme's lemma |
string | $language | Language ID, as string |
string | $category | Lexical category ID, as string |
- Returns
- string
◆ getLabelOrDefault()
Wikibase\Lexeme\DataAccess\LexemeDescription::getLabelOrDefault |
( |
?EntityId | $id = null, |
|
|
| $default = "" ) |
Get label or return empty string.
- Parameters
-
EntityId | null | $id | |
string | $default | Default value if unable to retrieve label |
- Returns
- string Label or "" if does not exist.
◆ parseOrNull()
static Wikibase\Lexeme\DataAccess\LexemeDescription::parseOrNull |
( |
| $text, |
|
|
EntityIdParser | $idParser ) |
|
static |
Parse entity ID or return null.
- Parameters
-
string | $text | |
EntityIdParser | $idParser | |
- Returns
- null|EntityId
◆ $displayLanguage
Wikibase\Lexeme\DataAccess\LexemeDescription::$displayLanguage |
|
private |
◆ $idParser
Wikibase\Lexeme\DataAccess\LexemeDescription::$idParser |
|
private |
◆ $lookup
Wikibase\Lexeme\DataAccess\LexemeDescription::$lookup |
|
private |
The documentation for this class was generated from the following file: