94 lines
3.6 KiB
PHP
94 lines
3.6 KiB
PHP
<?php
|
|
|
|
function expand_next_token_words($baseWords, $modifiers, $targetCount)
|
|
{
|
|
$out = array();
|
|
|
|
foreach ($baseWords as $word) {
|
|
$out[$word] = true;
|
|
}
|
|
|
|
foreach ($modifiers as $modifier) {
|
|
foreach ($baseWords as $word) {
|
|
$out[$modifier . '-' . $word] = true;
|
|
|
|
if (count($out) >= $targetCount) {
|
|
return array_slice(array_keys($out), 0, $targetCount);
|
|
}
|
|
}
|
|
}
|
|
|
|
return array_slice(array_keys($out), 0, $targetCount);
|
|
}
|
|
|
|
$englishAdjectives = array(
|
|
'agile', 'amber', 'brave', 'bright', 'bouncy', 'calm',
|
|
'clever', 'cosmic', 'crisp', 'curious', 'dapper', 'daring',
|
|
'dreamy', 'eager', 'electric', 'fancy', 'fizzy', 'gentle',
|
|
'glowing', 'golden', 'happy', 'humble', 'jolly', 'jazzy',
|
|
'kind', 'lively', 'lucky', 'mighty', 'mellow', 'nimble',
|
|
'noble', 'peppy', 'plucky', 'polite', 'proud', 'quick',
|
|
'quiet', 'radiant', 'rapid', 'shiny', 'silky', 'snappy',
|
|
'sparkly', 'steady', 'sunny', 'tidy', 'tiny', 'valiant',
|
|
'velvet', 'vivid', 'warm', 'witty', 'zesty', 'brisk',
|
|
'cheery', 'deft', 'fresh', 'neat', 'smart', 'swift'
|
|
);
|
|
|
|
$englishNouns = array(
|
|
'anchor', 'banana', 'beacon', 'button', 'cactus', 'comet',
|
|
'cookie', 'cupcake', 'disco', 'donut', 'engine', 'feather',
|
|
'firefly', 'gizmo', 'harbor', 'honey', 'island', 'jigsaw',
|
|
'kazoo', 'kernel', 'lantern', 'marble', 'meadow', 'muffin',
|
|
'noodle', 'orbit', 'pancake', 'pebble', 'pickle', 'pocket',
|
|
'puzzle', 'rainbow', 'rocket', 'sailboat', 'signal', 'spark',
|
|
'sprocket', 'sunbeam', 'teacup', 'ticket', 'toffee', 'tulip',
|
|
'velcro', 'waffle', 'widget', 'yo-yo', 'zipper', 'biscuit',
|
|
'castle', 'doodle', 'ember', 'fiddle', 'garden', 'hub',
|
|
'jacket', 'kettle', 'ladder', 'magnet', 'planet', 'ribbon'
|
|
);
|
|
|
|
$dutchAdjectives = array(
|
|
'aardig', 'actief', 'blij', 'blits', 'blozend', 'dapper',
|
|
'deftig', 'echt', 'eenvoudig', 'fijn', 'fris', 'geestig',
|
|
'geinig', 'gelukkig', 'gemoedelijk', 'geslepen', 'glad', 'goud',
|
|
'grappig', 'groots', 'helder', 'hip', 'keurig', 'klein',
|
|
'knap', 'koddig', 'koel', 'krachtig', 'kwiek', 'lief',
|
|
'luchtig', 'moedig', 'netjes', 'nieuw', 'pienter', 'pittig',
|
|
'prettig', 'rap', 'rustig', 'scherp', 'slim', 'snel',
|
|
'speels', 'sprankel', 'sterk', 'stil', 'stoer', 'stralend',
|
|
'tevreden', 'trots', 'vlot', 'vrolijk', 'warm', 'wijs',
|
|
'zacht', 'zeker', 'zinnig', 'zuiver', 'zonnig', 'zot'
|
|
);
|
|
|
|
$dutchNouns = array(
|
|
'appel', 'anker', 'beker', 'bel', 'berg', 'bliksem',
|
|
'bloem', 'boei', 'boog', 'boot', 'doos', 'druppel',
|
|
'duin', 'fiets', 'fluit', 'fontein', 'gieter', 'glimmer',
|
|
'grendel', 'haven', 'hoed', 'kaars', 'kaart', 'kasteel',
|
|
'ketel', 'knikker', 'koek', 'kompas', 'kraan', 'kroon',
|
|
'lamp', 'lint', 'magneet', 'molen', 'muis', 'munt',
|
|
'noot', 'pannenkoek', 'parel', 'peer', 'pijp', 'planeet',
|
|
'plank', 'potlood', 'raket', 'regenboog', 'ring', 'schoen',
|
|
'sleutel', 'slinger', 'snor', 'ster', 'taart', 'theekop',
|
|
'tulp', 'veer', 'vlam', 'wafel', 'zaklamp', 'zeil'
|
|
);
|
|
|
|
$englishModifiers = array(
|
|
'ultra', 'mega', 'mini', 'super', 'hyper', 'prime', 'fresh', 'solid'
|
|
);
|
|
|
|
$dutchModifiers = array(
|
|
'super', 'mega', 'mini', 'opper', 'top', 'fris', 'puur', 'mooi'
|
|
);
|
|
|
|
return array(
|
|
'en' => array(
|
|
'adjective' => expand_next_token_words($englishAdjectives, $englishModifiers, 500),
|
|
'noun' => expand_next_token_words($englishNouns, $englishModifiers, 500),
|
|
),
|
|
'nl' => array(
|
|
'adjective' => expand_next_token_words($dutchAdjectives, $dutchModifiers, 500),
|
|
'noun' => expand_next_token_words($dutchNouns, $dutchModifiers, 500),
|
|
),
|
|
);
|