<script context="module">
	export function preload() {
		return this.fetch(`index.json`).then(r => r.json()).then(collection => {
			return { collection };
		});
	}
</script>

<script>
	import Page from "../components/Page.svelte";
	export let collection;
</script>

<svelte:head>
	<title>Namegen 5</title>
</svelte:head>

<Page narrow selected="INDEX" collection={collection}>
	<h1>Name Generator</h1>
	<p>
		This name generator uses context-free grammars and markov chains to create names faithful to the source material, and does it 
		very fast. The code is <a href="https://github.com/gissleh/namegen"> open source</a> and available as a Rust crate. The
		website runs this rust code as a webassembly module.
		The <a href="https://git.aiterp.net/namegen5/website">website, wasm and its tools</a> are also open source, but there be dragons.
	</p>
	<p>
		The samples used to build the generator has been sourced from both canon and fan-created works. I will not share the sample
		material because of that.
		Feel free to download the processed generator data, however, which you can find by tacking <code>.json</code> to any 
		generator's path. 
		The <code>name.data</code> field serializes into a <code>Name</code> struct from the rust library linked above.
	</p>
	<p>
		There is no analytics or cookies, and all generating happes in your browser.
	</p>
	<p>
		<b>To get started,</b> select a generator from the menu.
	</p>
</Page>

<style>
	code {
		color: #9ac;
	}
</style>
