Wikibase
MediaWiki Wikibase extension
|
Populates the database with generated entities. More...
Public Member Functions | |
__construct () | |
execute () | |
Private Member Functions | |
saveEntity (EntityDocument $entity, IContextSource $context, MediaWikiEditEntityFactory $editEntityFactory) | |
createEntityGenerator ( $entityType, $nrOfEntities, array $languages) | |
getDuplicationDegree () | |
addLabelsToEntity (EntityDocument $entity, array $languages, Generator $textGenerator) | |
addDescriptionsToEntity (EntityDocument $entity, array $languages, Generator $textGenerator) | |
addAliasesToEntity (EntityDocument $entity, array $languages, Generator $textGenerator) | |
getNrOfEntities () | |
createTextGenerator ( $duplicationDegree=0) | |
getDefaultLanguages () | |
Private Attributes | |
const | SCRIPT_USER_NAME = 'script_populate_random_entities' |
const | SUMMARY_TEXT = 'Created using PopulateWithRandomEntitiesAndTerms maintenance script' |
const | OPTION_DEFAULT_AT_LEAST = 1 |
const | OPTION_DEFAULT_AT_MOST = 50 |
const | OPTION_DEFAULT_DUPLICATION_DEGREE = 0.5 |
Populates the database with generated entities.
Those entities will be populated with randomly generated terms (labels, descriptions, aliases), in a set of different languages (can be modified through options).
Wikibase\Repo\Maintenance\PopulateWithRandomEntitiesAndTerms::__construct | ( | ) |
|
private |
|
private |
|
private |
|
private |
string | $entityType | 'item' or 'property' |
int | $nrOfEntities | |
array | $languages |
|
private |
int | $duplicationDegree | [0, 1] aimed percentage of duplication over all generated text. <= 0 means no duplication and all generated text is unique >= 1 will generate one unique text once and always return it |
Wikibase\Repo\Maintenance\PopulateWithRandomEntitiesAndTerms::execute | ( | ) |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |