<jupyter_start><jupyter_text>Nynefni<jupyter_code>from nynefni import Nynefni<jupyter_output><empty_output><jupyter_text>Let's start by creating new Icelandic male names<jupyter_code>model = Nynefni(language='IS', category='male', unique=True)
for _ in range(10):
    print(model.generate_name())<jupyter_output>Péturla
Benjar
Jökuldar
Marg
Martmannar
Kristi
Þorgir
Bjartan
Ragnús
Erleifur<jupyter_text>Set constraints on generation<jupyter_code>for _ in range(10):
    print(model.generate_name('B'))
for _ in range(10):
    print(model.generate_name('Da'))<jupyter_output>Dagurður
Daggert
Darr
Dagurjón
Darry
Daníels
Dagbjarni
Dagurbjörtur
Dagurbjarni
Dagbjar<jupyter_text>Icelandic female names<jupyter_code>model = Nynefni(language='IS', category='female', unique=True)
for _ in range(10):
    print(model.generate_name())<jupyter_output>Christín
Ranna
Sunn
Salómkvistín
Indís
Aðalbjördís
Kris
Bryndína
Íristín
Guðbjördís<jupyter_text>Here we mix Swedish female names into the model.<jupyter_code>model.mix_language('SE', 'female', weight=1)
for _ in range(10):
    print(model.generate_name())<jupyter_output>Þórhilda
Franca
Kristger
Sanda
Molly
Isabet
Margareta
Ines
Bianciscilia
Ingegerður<jupyter_text>Make the mix more swedish<jupyter_code>model.mix_language('SE', 'female', weight=3)
for _ in range(10):
    print(model.generate_name())<jupyter_output>Linnéa
Kataría
Jolin
Hrafina
Elisabet
Kristina
Kerstin
Elzbiette
Gunilla
Marin<jupyter_text>A model for Icelandic female horses<jupyter_code>model = Nynefni(language='IS', category='hryssur', unique=False)
for _ in range(10):
    print(model.generate_name())<jupyter_output>Maggalöpp
Tryggja
Gandrós
Elja
Gerpla
Fjalla
Eftirstjarna
Þaka
Skrúð
Stórsmörk<jupyter_text>The model can take a list of names to influence the name generation<jupyter_code>model.influence_model(['Jarpótt'], weight=10)
for _ in range(10):
    print(model.generate_name())
model.influence_model(['Klara', 'Unnur'], weight=10)
for _ in range(10):
    print(model.generate_name())<jupyter_output>Una
Kareykning
Knörð
Unnur
Klara
Knör
Urður
Krisskjalla
Harpstjarna
Urta
{'fraction_non_alphanumeric': 0.09852451213707758, 'fraction_numerical': 0.01142313184198001, 'mean_word_length': 8.468468468468469, 'pattern_counts': {'":': 0, '<': 26, '<?xml version=': 0, '>': 26, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '8', 'dir': 'jupyter-structured-clean-dedup', 'id': '375347', 'license': 'MIT', 'n_tokens_mistral': 897, 'n_tokens_neox': 866, 'n_words': 160, 'path': 'demo.ipynb', 'repo_name': 'davidsteinar/nynefni', 'size': '2101'}