Giter Club home page Giter Club logo

namegen's Introduction

Name Generator

This is a name generator for fictional characters. It's first and foremost a library that can be added to other projects. It also has a namegen command line utility for generating names.

Building

Use the ./build.sh bash script to build the binary for your system.

Adding a new name generator

There are 4 steps to adding a new name generator to this project.

Note: There is a good guide to name formats here: https://www.fbiic.gov/public/2008/nov/Naming_practice_guide_UK_2006.pdf

Step one: add name lists as global variables

First, create a new .go file for your name lists. Within it, create three new global variables - one for male first names, one for female first names, and one for family names. They should be named appropriately (see existing files for reference).

Step two: add a new name generator to the map

In namegen.go, add your name generator to the map of name generators in the NameGeneratorFromType function. It should reference the global variables you created in step one.

Step three: add the name type to the CLI program's code

In cmd/namegen/main.go, add the name type to the nameLists array.

Step four: build and test your addition

Run ./build.sh and test out your new name generator.

namegen's People

Contributors

0xsubi avatar 6mc avatar arshergon avatar benovermyer avatar bhalerao-2002 avatar cxong avatar davidkroell avatar dbyington avatar desicochrane avatar dgarciasarai avatar direwolf707 avatar garugaru avatar gvoze32 avatar hacki-mc-hack avatar hadihammurabi avatar haritsfahreza avatar hopeah avatar kittinan avatar luisfertr avatar maahipal27 avatar mukulrawat1986 avatar n0nz avatar nevillemthw avatar parsec avatar pragyasingh13 avatar r055a avatar raturiar7 avatar timaraxian avatar tplive avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

namegen's Issues

Add Arabic names

Add Arabic names to the project.

Note: this will require special handling to the structure of Arabic names. Compare to how the Icelandic name generator is coded.

Add German names

Add German names.

This will require:

  • Creating a file germannames.go with two arrays, germanFirstNames and germanLastNames
  • Adding a block to the if statement in namegen.go's GetNamesByType function for German

Add "fantasy" names

Add "fantasy" names to the generator. These should be appropriate to a high fantasy setting. They don't have to adhere to the rules of any particular setting (e.g., Tolkien's Middle Earth).

Add option to output in native characters

Add a flag that sets the generator to output native characters for languages which don't normally use English characters.

This will require adding new character sets for at least the following languages:

Add Somali names

Add Somali names to the generator.

See https://en.wikipedia.org/wiki/Somali_name.

Note that Somali names use the format (given name) (father's name) (grandfather's name). This information comes from the naming practices guide linked in the readme of this repo; I have not verified it elsewhere.

Are we need unit testing?

We know the good code is code that well tested.
Because at least there is a guarantee against the code that has been tested.

Are we need a testing?
We can start from unit testing, maybe.

Add Spanish names

Add Spanish names.

This will require:

  • Creating a file spanishnames.go with two arrays, spanishFirstNames and spanishLastNames
  • Adding a block to the if statement in namegen.go's GetNamesByType function for Spanish

Add Icelandic names

Add Icelandic names.

This will require:

  • Creating a file names.go with two arrays, icelandicFirstNames and icelandicLastNames
  • Adding a block to the if statement in namegen.go's GetNamesByType function for Icelandic

Add Dutch names

Add Dutch names.

This will require:

  • Creating a file dutchnames.go with two arrays, dutchFirstNames and dutchLastNames
  • Adding a block to the if statement in namegen.go's GetNamesByType function for Dutch

Separate out male and female names

Each name list should be split out into male and female slices for given names.

The namegen command should allow for generating only male or only female names.

Support Icelandic last names

Icelandic last names should have two parts - the first name of the person's father, and then either "-sson" or "-sdottir" depending on the gender of the person.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.