Created
November 20, 2020 02:11
-
-
Save 44100hertz/45ac06462681a0a0d2c4c703c7ff9ae1 to your computer and use it in GitHub Desktop.
Ideology Generator
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local function create_ideology (_vocab) | |
-- Output ideology (array of strings) | |
local id = {} | |
-- Take random entries from vocab | |
-- Consumes entries to reduce redundancy | |
local vocab = {} | |
local function getv () | |
if #vocab == 0 then | |
for i,v in ipairs(_vocab) do vocab[i] = v end | |
end | |
return table.remove(vocab, math.floor(1 + math.random() * #vocab)) | |
end | |
-- Small chance of begenning | |
local beginning | |
repeat ending = getv().beginning until math.random() > 0.9 | |
id[#id+1] = beginning | |
-- Push a random number of adjectives | |
repeat id[#id+1] = getv().adj until math.random() > 0.9 | |
-- Mandatory single noun | |
local noun | |
while not noun do noun = getv().noun end | |
id[#id+1] = noun | |
-- Small chance of ending | |
local ending | |
repeat ending = getv().ending until math.random() > 0.9 | |
id[#id+1] = ending | |
-- Capitalize | |
id[1] = string.upper(string.sub(id[1],1,1)) .. string.sub(id[1],2,-1) | |
return table.concat(id, ' ') | |
end | |
local vocab = { | |
-- Ideas with Marxist roots | |
{adj = 'proletarian'}, | |
{adj = 'revolutionary'}, | |
{adj = 'socialist', noun = 'socialism'}, | |
{adj = 'communist', noun = 'communism'}, | |
{adj = 'international', noun = 'internationalism'}, | |
{adj = 'intercommunal', noun = 'intercommunalism'}, | |
{adj = 'anti-colonial', noun = 'anti-colonialism'}, | |
{adj = 'Marxist', noun = 'Marxism'}, | |
{adj = 'Leninist', noun = 'Leninism'}, | |
{adj = 'Stalinist', noun = 'Stalinism'}, | |
{adj = 'Maoist', noun = 'Maoism'}, | |
{ending = 'Mao Zedong Thought'}, | |
{adj = 'Hoxhaist', noun = 'Hoxhaism'}, | |
{adj = 'Dengist', noun = 'Dengism'}, | |
{adj = 'Trotskyist', noun = 'Trotskyism'}, | |
{adj = 'Juche', noun = 'Juche'}, | |
{adj = 'Gonzaloist', noun = 'Gonzaloism'}, | |
{beginning = 'the new synthesis of', noun = 'Avakianism'}, | |
-- General Left | |
{adj = 'left', noun = 'leftism'}, | |
{adj = 'syndicalist', noun = 'syndicalism'}, | |
{adj = 'social'}, | |
{adj = 'progressive', noun = 'progressivism'}, | |
{adj = 'queer'}, | |
{adj = 'black'}, | |
{adj = 'white'}, | |
{adj = 'feminist', noun = 'feminism'}, | |
-- Anarchist | |
{adj = 'libertarian', noun = 'libertarianism'}, | |
{adj = 'anarcho', noun = 'anarchism'}, | |
{adj = 'egoist', noun = 'egoism'}, | |
{adj = 'illegalist', noun = 'illegalism'}, | |
{adj = 'ethno'}, | |
-- Right | |
{adj = 'right'}, | |
{adj = 'market'}, | |
{adj = 'centrist', noun = 'centrism'}, | |
{adj = 'liberal', noun = 'capitalism'}, | |
{adj = 'conservative', noun = 'conservatism'}, | |
{adj = 'national', noun = 'nationalism'}, | |
{adj = 'fascist', noun = 'fascism'}, | |
{adj = 'monarchist', noun = 'monarchism'}, | |
{adj = 'feudal', noun = 'feudalism'}, | |
{adj = 'slave', noun = 'slavery'}, | |
-- Religions | |
{adj = 'Atheist'}, | |
{adj = 'Secular'}, | |
{adj = 'Jewish'}, | |
{adj = 'Muslim'}, | |
{adj = 'Protestant'}, | |
{adj = 'Catholic'}, | |
-- Philosophies | |
{adj = 'humanist', noun = 'humanism'}, | |
{adj = 'nihilist', noun = 'nihilism'}, | |
{adj = 'adsurdist', noun = 'absurdism'}, | |
{adj = 'optimistic', noun = 'optimism'}, | |
{adj = 'skeptical', noun = 'cynicism'}, | |
{adj = 'realist', noun = 'realism'}, | |
{adj = 'pessimistic', noun = 'defeatism'}, | |
{adj = 'orthodox', noun = 'fundamentalism'}, | |
{adj = 'Hegelian', neon = 'Hegelian'}, | |
-- Misc | |
{adj = 'Kautskyist', noun = 'Kautskyism'}, | |
{adj = 'parlimentary'}, | |
{adj = 'legal'}, | |
{adj = 'democratic', noun = 'democracy'}, | |
{adj = 'reformist', noun = 'reformism'}, | |
{adj = 'neo'}, | |
{adj = 'ultra'}, | |
{adj = 'anti'}, | |
{adj = 'post'}, | |
{adj = 'esoteric'}, | |
{adj = 'accelerationist', noun = 'accelerationism'}, | |
{adj = 'psychadelic'}, | |
{adj = 'acid'}, | |
{adj = 'cyber'}, | |
{adj = 'futurist'}, | |
{beginning = 'bill of rights'}, | |
{ending = 'with Chinese characteristics'}, | |
{ending = 'with American characteristics'}, | |
} | |
math.randomseed(os.time()) | |
for i = 1,30 do | |
print(create_ideology(vocab)) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment