diff --git a/app.go b/app.go index 53aa3e13..172c8179 100644 --- a/app.go +++ b/app.go @@ -65,7 +65,7 @@ func addAppLookup() { AddFuncLookup("appname", Info{ Display: "App Name", Category: "app", - Description: "Name for an application", + Description: "Software program designed for a specific purpose or task on a computer or mobile device", Example: "Parkrespond", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -76,7 +76,7 @@ func addAppLookup() { AddFuncLookup("appversion", Info{ Display: "App Version", Category: "app", - Description: "Version number for an app, following Semantic versioning format", + Description: "Particular release of an application in Semantic Versioning format", Example: "1.12.14", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -87,7 +87,7 @@ func addAppLookup() { AddFuncLookup("appauthor", Info{ Display: "App Author", Category: "app", - Description: "Name for an app developer or authoring entity", + Description: "Person or group creating and developing an application", Example: "Qado Energy, Inc.", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { diff --git a/auth.go b/auth.go index 4aeefe3c..ae86e3d1 100644 --- a/auth.go +++ b/auth.go @@ -106,7 +106,7 @@ func addAuthLookup() { AddFuncLookup("username", Info{ Display: "Username", Category: "auth", - Description: "Generates a random username", + Description: "Unique identifier assigned to a user for accessing an account or system", Example: "Daniel1364", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -117,7 +117,7 @@ func addAuthLookup() { AddFuncLookup("password", Info{ Display: "Password", Category: "auth", - Description: "Generates a random password", + Description: "Secret word or phrase used to authenticate access to a system or account", Example: "EEP+wwpk 4lU-eHNXlJZ4n K9%v&TZ9e", Output: "string", Params: []Param{ diff --git a/beer.go b/beer.go index 5a4e0af1..292ae680 100644 --- a/beer.go +++ b/beer.go @@ -121,7 +121,7 @@ func addBeerLookup() { AddFuncLookup("beername", Info{ Display: "Beer Name", Category: "beer", - Description: "Name for a beer, inspired by real beer names", + Description: "Specific brand or variety of beer", Example: "Duvel", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -132,7 +132,7 @@ func addBeerLookup() { AddFuncLookup("beerstyle", Info{ Display: "Beer Style", Category: "beer", - Description: "Style of beer, covering beer types from around the world", + Description: "Distinct characteristics and flavors of beer", Example: "European Amber Lager", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -143,7 +143,7 @@ func addBeerLookup() { AddFuncLookup("beerhop", Info{ Display: "Beer Hop", Category: "beer", - Description: "Beer hop variety, covering different hop types used in brewing", + Description: "The flower used in brewing to add flavor, aroma, and bitterness to beer", Example: "Glacier", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -154,7 +154,7 @@ func addBeerLookup() { AddFuncLookup("beeryeast", Info{ Display: "Beer Yeast", Category: "beer", - Description: "Beer yeast, covering various yeast strains used in beer fermentation", + Description: "Microorganism used in brewing to ferment sugars, producing alcohol and carbonation in beer", Example: "1388 - Belgian Strong Ale", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -165,7 +165,7 @@ func addBeerLookup() { AddFuncLookup("beermalt", Info{ Display: "Beer Malt", Category: "beer", - Description: "Beer malt, covering various malt types used in the brewing process", + Description: "Processed barley or other grains, provides sugars for fermentation and flavor to beer", Example: "Munich", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -176,7 +176,7 @@ func addBeerLookup() { AddFuncLookup("beeralcohol", Info{ Display: "Beer Alcohol", Category: "beer", - Description: "Alcohol percentage", + Description: "Measures the alcohol content in beer", Example: "2.7%", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -187,7 +187,7 @@ func addBeerLookup() { AddFuncLookup("beeribu", Info{ Display: "Beer IBU", Category: "beer", - Description: "International Bitterness Unit (IBU) value, indicating the bitterness level in beer", + Description: "Scale measuring bitterness of beer from hops", Example: "29 IBU", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -198,7 +198,7 @@ func addBeerLookup() { AddFuncLookup("beerblg", Info{ Display: "Beer BLG", Category: "beer", - Description: "Generates a random beer Balling (°Blg) value, representing the beer's original gravity or sugar content", + Description: "Scale indicating the concentration of extract in worts", Example: "6.4°Blg", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { diff --git a/book.go b/book.go index 8aef6cce..e2059dcf 100644 --- a/book.go +++ b/book.go @@ -42,7 +42,7 @@ func addBookLookup() { AddFuncLookup("book", Info{ Display: "Book", Category: "book", - Description: "Generates a comprehensive book dataset, including title, author, and genre", + Description: "Written or printed work consisting of pages bound together, covering various subjects or stories", Example: `{ "title": "Anna Karenina", "author": "Toni Morrison", @@ -58,7 +58,7 @@ func addBookLookup() { AddFuncLookup("booktitle", Info{ Display: "Title", Category: "book", - Description: "Generates a book title from a diverse range of genres and periods", + Description: "The specific name given to a book", Example: "Hamlet", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -69,7 +69,7 @@ func addBookLookup() { AddFuncLookup("bookauthor", Info{ Display: "Author", Category: "book", - Description: "Generates the name of a book author from various times and places", + Description: "The individual who wrote or created the content of a book", Example: "Mark Twain", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -80,7 +80,7 @@ func addBookLookup() { AddFuncLookup("bookgenre", Info{ Display: "Genre", Category: "book", - Description: "Generates a genre from a wide range of book categories", + Description: "Category or type of book defined by its content, style, or form", Example: "Adventure", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { diff --git a/car.go b/car.go index ca65e47b..983e2576 100644 --- a/car.go +++ b/car.go @@ -75,7 +75,7 @@ func addCarLookup() { AddFuncLookup("car", Info{ Display: "Car", Category: "car", - Description: "Complete set of car data including essential information like type, fuel type, transmission, brand, model, and production year of a vehicle", + Description: "Wheeled motor vehicle used for transportation", Example: `{ "type": "Passenger car mini", "fuel": "Gasoline", @@ -94,7 +94,7 @@ func addCarLookup() { AddFuncLookup("cartype", Info{ Display: "Car Type", Category: "car", - Description: "Category of vehicle, like sedan, SUV, truck, or sports car, based on design", + Description: "Classification of cars based on size, use, or body style", Example: "Passenger car mini", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -105,7 +105,7 @@ func addCarLookup() { AddFuncLookup("carfueltype", Info{ Display: "Car Fuel Type", Category: "car", - Description: "Type of energy source for vehicles, such as gasoline, diesel, electric, or hybrid", + Description: "Type of energy source a car uses", Example: "CNG", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -116,7 +116,7 @@ func addCarLookup() { AddFuncLookup("cartransmissiontype", Info{ Display: "Car Transmission Type", Category: "car", - Description: "Mechanism controlling vehicle's power, like manual, automatic, etc.", + Description: "Mechanism a car uses to transmit power from the engine to the wheels", Example: "Manual", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -127,7 +127,7 @@ func addCarLookup() { AddFuncLookup("carmaker", Info{ Display: "Car Maker", Category: "car", - Description: "Company name specializing in designing, manufacturing, and selling cars", + Description: "Company or brand that manufactures and designs cars", Example: "Nissan", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -138,7 +138,7 @@ func addCarLookup() { AddFuncLookup("carmodel", Info{ Display: "Car Model", Category: "car", - Description: "Specific design or version of a vehicle produced by a car manufacturer", + Description: "Specific design or version of a car produced by a manufacturer", Example: "Aveo", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { diff --git a/cmd/gofakeit/gofakeit_test.go b/cmd/gofakeit/gofakeit_test.go index 5ce35691..4609a79b 100644 --- a/cmd/gofakeit/gofakeit_test.go +++ b/cmd/gofakeit/gofakeit_test.go @@ -2,7 +2,7 @@ package main import ( "errors" - "io/ioutil" + "io" "os" "strings" "testing" @@ -22,7 +22,7 @@ func TestMain(t *testing.T) { main() w.Close() - out, _ := ioutil.ReadAll(r) + out, _ := io.ReadAll(r) os.Stdout = rescueStdout // Get output string @@ -56,7 +56,7 @@ func TestFunctionLoop(t *testing.T) { main() w.Close() - out, _ := ioutil.ReadAll(r) + out, _ := io.ReadAll(r) os.Stdout = rescueStdout // Get output string @@ -211,7 +211,7 @@ func TestListCategoryFunction(t *testing.T) { outStr = strings.ToLower(outStr) // Make sure outStr contains random noun - if !strings.Contains(outStr, "random noun") { + if !strings.Contains(outStr, "noun") { t.Errorf("list category function output does not contain random noun") } } diff --git a/data/word.go b/data/word.go index 38ba2547..87b48dc8 100644 --- a/data/word.go +++ b/data/word.go @@ -27,6 +27,7 @@ var Word = map[string][]string{ "noun_collective_thing": {"wad", "pair", "album", "string", "anthology", "reel", "outfit", "fleet", "comb", "archipelago", "quiver", "bale", "packet", "hedge", "basket", "orchard", "batch", "library", "battery", "set", "harvest", "block", "forest", "book", "group", "bouquet", "collection", "bowl", "stack", "bunch", "hand", "bundle", "catalog", "shower", "ream", "chest", "heap", "range", "cluster", "pack", "hail", "cloud", "galaxy", "sheaf", "clump"}, "noun_countable": {"camp", "hospital", "shirt", "sock", "plant", "cup", "fork", "spoon", "plate", "straw", "town", "box", "bird", "father", "answer", "egg", "purse", "mirror", "mistake", "toilet", "toothbrush", "shower", "towel", "pool", "corner", "card", "lawn", "city", "egg", "yard", "burger", "kilometer", "mile", "father", "film", "actor", "issue", "machine", "liter", "room", "station", "journey", "castle", "hour", "finger", "boy", "book", "year", "second", "son", "month", "group", "hall", "cat", "week", "picture", "day", "village", "effect", "baby", "weekend", "class", "meal", "river", "grade", "bush", "desk", "stream", "method", "brother", "sister", "factory", "aunt", "bush", "program", "uncle", "ball", "cousin", "wall", "grandmother", "cup", "grandfather", "week", "school", "shirt", "child", "king", "road", "judge", "bridge", "car", "line", "book", "eye", "teacher", "foot", "party", "face", "day", "chest", "handle", "week", "hotel", "eye", "animal", "doctor", "adult", "village", "key", "bird", "bank", "program", "idea", "gun", "card", "brother", "dress", "room", "door", "mouth", "club", "game", "ring", "project", "sister", "road", "coat", "account", "group", "cigarette", "farm", "river", "college", "computer", "walk", "corner", "cat", "head", "street", "election", "country", "chair", "crowd", "cup", "plant", "farm", "handle", "model", "book", "message", "battle", "pen", "pencil", "elephant", "carrot", "onion", "garden", "country", "engine", "bill", "apple", "noun", "club", "crowd", "window", "field", "friend", "verb", "class", "flower", "seed", "lake", "plant", "animal", "ocean", "whale", "fish", "stream", "cloud", "couch", "steak", "problem", "light", "door", "room", "painting", "shop", "apartment", "candle", "adult", "building", "plan", "page", "ball", "game", "animal", "apartment", "box", "thought", "walk", "lady", "bottle", "article", "game", "kettle", "car", "house", "hoses", "orange", "phone", "app", "window", "door", "dollar", "foot", "cent", "library", "cat", "bed", "pound", "gate", "tomatoes", "gun", "holiday", "woman", "job", "shock", "salary", "tax", "coat", "scooter", "dog", "problem", "field", "answer", "ear", "camp", "case", "road", "woman", "product", "bridge", "man", "dream", "idea", "scheme", "invention", "cigarette", "mother", "friend", "chapter", "computer", "dream", "father", "child", "motor", "deskpath", "factory", "park", "newspaper", "hat", "dream", "table", "kitchen", "student", "captain", "doctor", "bus", "neck", "class", "list", "member", "chest", "valley", "product", "horse", "captain", "star", "hour", "page", "bus", "girl", "month", "child", "house", "boy", "bill", "kitchen", "chapter", "boat", "hand", "dress", "table", "wall", "chair", "train", "minute", "magazine", "bus", "party", "bird", "lake", "job", "nation", "bike", "election", "hand", "box", "beach", "address", "project", "task", "park", "face", "college", "bell", "plane", "store", "hall", "accident", "daughter", "ship", "candy", "smile", "city", "island", "case", "spot", "film", "husband", "artist", "tour", "bag", "boat", "driver", "office", "chair", "path", "dog", "bag", "finger", "apartment", "garden", "heart", "year", "engine", "girl", "day", "castle", "plane", "ring", "brother", "edge", "picture", "meeting", "tent", "dog", "hat", "head", "bottle", "hill"}, "noun_uncountable": {"accommodation", "advertising", "air", "aid", "advice", "anger", "art", "assistance", "bread", "business", "butter", "calm", "cash", "chaos", "cheese", "childhood", "clothing", "coffee", "content", "corruption", "courage", "currency", "damage", "danger", "darkness", "data", "determination", "economics", "education", "electricity", "employment", "energy", "entertainment", "enthusiasm", "equipment", "evidence", "failure", "fame", "fire", "flour", "food", "freedom", "friendship", "fuel", "furniture", "fun", "genetics", "gold", "grammar", "guilt", "hair", "happiness", "harm", "health", "heat", "help", "homework", "honesty", "hospitality", "housework", "humour", "imagination", "importance", "information", "innocence", "intelligence", "jealousy", "juice", "justice", "kindness", "knowledge", "labour", "lack", "laughter", "leisure", "literature", "litter", "logic", "love", "luck", "magic", "management", "metal", "milk", "money", "motherhood", "motivation", "music", "nature", "news", "nutrition", "obesity", "oil", "old age", "oxygen", "paper", "patience", "permission", "pollution", "poverty", "power", "pride", "production", "progress", "pronunciation", "publicity", "punctuation", "quality", "quantity", "racism", "rain", "relaxation", "research", "respect", "rice", "room (space)", "rubbish", "safety", "salt", "sand", "seafood", "shopping", "silence", "smoke", "snow", "software", "soup", "speed", "spelling", "stress", "sugar", "sunshine", "tea", "tennis", "time", "tolerance", "trade", "traffic", "transportation", "travel", "trust", "understanding", "unemployment", "usage", "violence", "vision", "warmth", "water", "wealth", "weather", "weight", "welfare", "wheat", "width", "wildlife", "wisdom", "wood", "work", "yoga", "youth"}, + "noun_determiner": {"the", "a", "an", "this", "that", "these", "those", "my", "your", "his", "her", "its", "our", "their", "some", "any", "each", "every", "certain"}, //"noun_proper": {}, // This refers to an actual person(John Doe), place(Chipotle, Tennessee) // Verbs @@ -76,4 +77,7 @@ var Word = map[string][]string{ "connective_listing": {"firstly", "secondly", "first of all", "finally", "lastly", "for one thing", "for another", "in the first place", "to begin with", "next", "in summation", "to conclude"}, "connective_casual": {"accordingly", "all the same", "an effect of", "an outcome of", "an upshot of", "as a consequence of", "as a result of", "because", "caused by", "consequently", "despite this", "even though", "hence", "however", "in that case", "moreover", "nevertheless", "otherwise", "so", "so as", "stemmed from", "still", "then", "therefore", "though", "under the circumstances", "yet"}, "connective_examplify": {"accordingly", "as a result", "as exemplified by", "consequently", "for example", "for instance", "for one thing", "including", "provided that", "since", "so", "such as", "then", "therefore", "these include", "through", "unless", "without"}, + + // Misc + "interjection": {"wow", "hey", "oops", "ouch", "yay", "aha", "eek", "huh", "hmm", "whoa", "yikes", "phew", "gee", "alas", "bravo"}, } diff --git a/generate_test.go b/generate_test.go index 2f127bc2..af3a95eb 100644 --- a/generate_test.go +++ b/generate_test.go @@ -51,12 +51,12 @@ func ExampleGenerate() { fmt.Println(Generate("{shufflestrings:[key:value,int:string,1:2,a:b]}")) // Output: Markus Moen ssn is 526643139 and lives at 599 Daleton - // Niche backwards caused. - // [1 3 2] - // -4 - // 3 - // 46 - // [a:b int:string key:value 1:2] + // Congolese choir computer. + // [3 1 2] + // 2 + // 4 + // 17 + // [int:string 1:2 a:b key:value] } func ExampleFaker_Generate() { @@ -71,12 +71,12 @@ func ExampleFaker_Generate() { fmt.Println(f.Generate("{shufflestrings:[key:value,int:string,1:2,a:b]}")) // Output: Markus Moen ssn is 526643139 and lives at 599 Daleton - // Niche backwards caused. - // [1 3 2] - // -4 - // 3 - // 46 - // [a:b int:string key:value 1:2] + // Congolese choir computer. + // [3 1 2] + // 2 + // 4 + // 17 + // [int:string 1:2 a:b key:value] } func BenchmarkGenerate(b *testing.B) { @@ -480,14 +480,14 @@ func ExampleMap() { Seed(11) fmt.Println(Map()) - // Output: map[contrast:Associate gauva:map[jump:scale] generally:8504801 him:[them whomever ours hence here his] its:8335564 table:map[did:[these delay these]] therefore:map[nearly:784141.8] thing:map[everything:[where caused why week hourly]]] + // Output: map[here:Manager herself:map[trip:[far computer was unless whom riches]] how:8504801 ouch:Keith Ullrich outstanding:1860846 that:web services] } func ExampleFaker_Map() { f := New(11) fmt.Println(f.Map()) - // Output: map[contrast:Associate gauva:map[jump:scale] generally:8504801 him:[them whomever ours hence here his] its:8335564 table:map[did:[these delay these]] therefore:map[nearly:784141.8] thing:map[everything:[where caused why week hourly]]] + // Output: map[here:Manager herself:map[trip:[far computer was unless whom riches]] how:8504801 ouch:Keith Ullrich outstanding:1860846 that:web services] } func TestMap(t *testing.T) { diff --git a/lookup.go b/lookup.go index f8020089..9bb9e9d8 100644 --- a/lookup.go +++ b/lookup.go @@ -105,6 +105,8 @@ func initLookup() { addWordPronounLookup() addWordSentenceLookup() addWordVerbLookup() + addWordCommentLookup() + addWordMiscLookup() } // internalFuncLookups is the internal map array with mapping to all available data diff --git a/number.go b/number.go index 43f7fd99..7200a598 100644 --- a/number.go +++ b/number.go @@ -253,7 +253,7 @@ func addNumberLookup() { AddFuncLookup("number", Info{ Display: "Number", Category: "number", - Description: "Random number between given range", + Description: "Mathematical concept used for counting, measuring, and expressing quantities or values", Example: "14866", Output: "int", Params: []Param{ @@ -278,7 +278,7 @@ func addNumberLookup() { AddFuncLookup("uint8", Info{ Display: "Uint8", Category: "number", - Description: "Random uint8 value", + Description: "Unsigned 8-bit integer, capable of representing values from 0 to 255", Example: "152", Output: "uint8", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -289,7 +289,7 @@ func addNumberLookup() { AddFuncLookup("uint16", Info{ Display: "Uint16", Category: "number", - Description: "Random uint16 value", + Description: "Unsigned 16-bit integer, capable of representing values from 0 to 65,535", Example: "34968", Output: "uint16", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -300,7 +300,7 @@ func addNumberLookup() { AddFuncLookup("uint32", Info{ Display: "Uint32", Category: "number", - Description: "Random uint32 value", + Description: "Unsigned 32-bit integer, capable of representing values from 0 to 4,294,967,295", Example: "1075055705", Output: "uint32", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -311,7 +311,7 @@ func addNumberLookup() { AddFuncLookup("uint64", Info{ Display: "Uint64", Category: "number", - Description: "Random uint64 value", + Description: "Unsigned 64-bit integer, capable of representing values from 0 to 18,446,744,073,709,551,615", Example: "843730692693298265", Output: "uint64", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -322,7 +322,7 @@ func addNumberLookup() { AddFuncLookup("uintrange", Info{ Display: "UintRange", Category: "number", - Description: "Random uint value between given range", + Description: "Non-negative integer value between given range", Example: "1075055705", Output: "uint", Params: []Param{ @@ -347,7 +347,7 @@ func addNumberLookup() { AddFuncLookup("int8", Info{ Display: "Int8", Category: "number", - Description: "Random int8 value", + Description: "Signed 8-bit integer, capable of representing values from -128 to 127", Example: "24", Output: "int8", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -358,7 +358,7 @@ func addNumberLookup() { AddFuncLookup("int16", Info{ Display: "Int16", Category: "number", - Description: "Random int16 value", + Description: "Signed 16-bit integer, capable of representing values from 32,768 to 32,767", Example: "2200", Output: "int16", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -369,7 +369,7 @@ func addNumberLookup() { AddFuncLookup("int32", Info{ Display: "Int32", Category: "number", - Description: "Random int32 value", + Description: "Signed 32-bit integer, capable of representing values from -2,147,483,648 to 2,147,483,647", Example: "-1072427943", Output: "int32", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -380,7 +380,7 @@ func addNumberLookup() { AddFuncLookup("int64", Info{ Display: "Int64", Category: "number", - Description: "Random int64 value", + Description: "Signed 64-bit integer, capable of representing values from -9,223,372,036,854,775,808 to -9,223,372,036,854,775,807", Example: "-8379641344161477543", Output: "int64", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -391,7 +391,7 @@ func addNumberLookup() { AddFuncLookup("intrange", Info{ Display: "IntRange", Category: "number", - Description: "Random int value between min and max", + Description: "Integer value between given range", Example: "-8379477543", Output: "int", Params: []Param{ @@ -416,7 +416,7 @@ func addNumberLookup() { AddFuncLookup("float32", Info{ Display: "Float32", Category: "number", - Description: "Random float32 value", + Description: "Data type representing floating-point numbers with 32 bits of precision in computing", Example: "3.1128167e+37", Output: "float32", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -427,7 +427,7 @@ func addNumberLookup() { AddFuncLookup("float32range", Info{ Display: "Float32 Range", Category: "number", - Description: "Random float32 between given range", + Description: "Float32 value between given range", Example: "914774.6", Output: "float32", Params: []Param{ @@ -452,7 +452,7 @@ func addNumberLookup() { AddFuncLookup("float64", Info{ Display: "Float64", Category: "number", - Description: "Random float64 value", + Description: "Data type representing floating-point numbers with 64 bits of precision in computing", Example: "1.644484108270445e+307", Output: "float64", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -463,7 +463,7 @@ func addNumberLookup() { AddFuncLookup("float64range", Info{ Display: "Float64 Range", Category: "number", - Description: "Random float64 between given range", + Description: "Float64 value between given range", Example: "914774.5585333086", Output: "float64", Params: []Param{ @@ -488,7 +488,7 @@ func addNumberLookup() { AddFuncLookup("shuffleints", Info{ Display: "Shuffle Ints", Category: "number", - Description: "Shuffle an array of ints", + Description: "Shuffles an array of ints", Example: "1,2,3,4 => 3,1,4,2", Output: "[]int", Params: []Param{ @@ -547,7 +547,7 @@ func addNumberLookup() { AddFuncLookup("hexuint8", Info{ Display: "HexUint8", Category: "number", - Description: "Random uint8 hex value", + Description: "Hexadecimal representation of an 8-bit unsigned integer", Example: "0x87", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -558,7 +558,7 @@ func addNumberLookup() { AddFuncLookup("hexuint16", Info{ Display: "HexUint16", Category: "number", - Description: "Random uint16 hex value", + Description: "Hexadecimal representation of an 16-bit unsigned integer", Example: "0x8754", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -569,7 +569,7 @@ func addNumberLookup() { AddFuncLookup("hexuint32", Info{ Display: "HexUint32", Category: "number", - Description: "Random uint32 hex value", + Description: "Hexadecimal representation of an 32-bit unsigned integer", Example: "0x87546957", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -580,7 +580,7 @@ func addNumberLookup() { AddFuncLookup("hexuint64", Info{ Display: "HexUint64", Category: "number", - Description: "Random uint64 hex value", + Description: "Hexadecimal representation of an 64-bit unsigned integer", Example: "0x875469578e51b5e5", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -591,7 +591,7 @@ func addNumberLookup() { AddFuncLookup("hexuint128", Info{ Display: "HexUint128", Category: "number", - Description: "Random uint128 hex value", + Description: "Hexadecimal representation of an 128-bit unsigned integer", Example: "0x875469578e51b5e56c95b64681d147a1", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -602,7 +602,7 @@ func addNumberLookup() { AddFuncLookup("hexuint256", Info{ Display: "HexUint256", Category: "number", - Description: "Random uint256 hex value", + Description: "Hexadecimal representation of an 256-bit unsigned integer", Example: "0x875469578e51b5e56c95b64681d147a12cde48a4f417231b0c486abbc263e48d", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { diff --git a/payment.go b/payment.go index 897d6d09..dc4b0057 100644 --- a/payment.go +++ b/payment.go @@ -243,7 +243,7 @@ func addPaymentLookup() { AddFuncLookup("currency", Info{ Display: "Currency", Category: "payment", - Description: "Random currency data set", + Description: "Medium of exchange, often in the form of paper money or coins, used for trade and transactions", Example: `{ "short": "IQD", "long": "Iraq Dinar" @@ -258,7 +258,7 @@ func addPaymentLookup() { AddFuncLookup("currencyshort", Info{ Display: "Currency Short", Category: "payment", - Description: "Random currency abbreviated", + Description: "Short 3-letter word used to represent a specific currency", Example: "USD", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -269,7 +269,7 @@ func addPaymentLookup() { AddFuncLookup("currencylong", Info{ Display: "Currency Long", Category: "payment", - Description: "Random currency", + Description: "Complete name of a specific currency used for official identification in financial transactions", Example: "United States Dollar", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -280,7 +280,7 @@ func addPaymentLookup() { AddFuncLookup("price", Info{ Display: "Price", Category: "payment", - Description: "Random monitary price", + Description: "The amount of money or value assigned to a product, service, or asset in a transaction", Example: "92.26", Output: "float64", Params: []Param{ @@ -305,7 +305,7 @@ func addPaymentLookup() { AddFuncLookup("creditcard", Info{ Display: "Credit Card", Category: "payment", - Description: "Random credit card data set", + Description: "Plastic card allowing users to make purchases on credit, with payment due at a later date", Example: `{ "type": "UnionPay", "number": "4364599489953698", @@ -322,7 +322,7 @@ func addPaymentLookup() { AddFuncLookup("creditcardtype", Info{ Display: "Credit Card Type", Category: "payment", - Description: "Random credit card type", + Description: "Classification of credit cards based on the issuing company", Example: "Visa", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -333,7 +333,7 @@ func addPaymentLookup() { AddFuncLookup("creditcardnumber", Info{ Display: "Credit Card Number", Category: "payment", - Description: "Random credit card number", + Description: "Unique numerical identifier on a credit card used for making electronic payments and transactions", Example: "4136459948995369", Output: "string", Params: []Param{ @@ -377,7 +377,7 @@ func addPaymentLookup() { AddFuncLookup("creditcardexp", Info{ Display: "Credit Card Exp", Category: "payment", - Description: "Random credit card expiraction date", + Description: "Date when a credit card becomes invalid and cannot be used for transactions", Example: "01/21", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -388,7 +388,7 @@ func addPaymentLookup() { AddFuncLookup("creditcardcvv", Info{ Display: "Credit Card CVV", Category: "payment", - Description: "Random credit card number", + Description: "Three or four-digit security code on a credit card used for online and remote transactions", Example: "513", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -399,7 +399,7 @@ func addPaymentLookup() { AddFuncLookup("achrouting", Info{ Display: "ACH Routing Number", Category: "payment", - Description: "Random 9 digit ach routing number", + Description: "Unique nine-digit code used in the U.S. for identifying the bank and processing electronic transactions", Example: "513715684", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -410,7 +410,7 @@ func addPaymentLookup() { AddFuncLookup("achaccount", Info{ Display: "ACH Account Number", Category: "payment", - Description: "Random 12 digit ach account number", + Description: "A bank account number used for Automated Clearing House transactions and electronic transfers", Example: "491527954328", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -421,7 +421,7 @@ func addPaymentLookup() { AddFuncLookup("bitcoinaddress", Info{ Display: "Bitcoin Address", Category: "payment", - Description: "Random 26-35 characters representing a bitcoin address", + Description: "Cryptographic identifier used to receive, store, and send Bitcoin cryptocurrency in a peer-to-peer network", Example: "1lWLbxojXq6BqWX7X60VkcDIvYA", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -432,7 +432,7 @@ func addPaymentLookup() { AddFuncLookup("bitcoinprivatekey", Info{ Display: "Bitcoin Private Key", Category: "payment", - Description: "Random 51 characters representing a bitcoin private key", + Description: "Secret, secure code that allows the owner to access and control their Bitcoin holdings", Example: "5vrbXTADWJ6sQBSYd6lLkG97jljNc0X9VPBvbVqsIH9lWOLcoqg", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { diff --git a/person.go b/person.go index f03e13a4..c1fe99f3 100644 --- a/person.go +++ b/person.go @@ -209,7 +209,7 @@ func addPersonLookup() { AddFuncLookup("person", Info{ Display: "Person", Category: "person", - Description: "Random set of person info", + Description: "Personal data, like name and contact details, used for identification and communication", Example: `{ "first_name": "Markus", "last_name": "Moen", @@ -254,7 +254,7 @@ func addPersonLookup() { AddFuncLookup("name", Info{ Display: "Name", Category: "person", - Description: "Random name", + Description: "The given and family name of an individual", Example: "Markus Moen", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -265,7 +265,7 @@ func addPersonLookup() { AddFuncLookup("nameprefix", Info{ Display: "Name Prefix", Category: "person", - Description: "Random name prefix", + Description: "A title or honorific added before a person's name", Example: "Mr.", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -276,7 +276,7 @@ func addPersonLookup() { AddFuncLookup("namesuffix", Info{ Display: "Name Suffix", Category: "person", - Description: "Random name suffix", + Description: "A title or designation added after a person's name", Example: "Jr.", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -287,7 +287,7 @@ func addPersonLookup() { AddFuncLookup("firstname", Info{ Display: "First Name", Category: "person", - Description: "Random first name", + Description: "The name given to a person at birth", Example: "Markus", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -298,7 +298,7 @@ func addPersonLookup() { AddFuncLookup("middlename", Info{ Display: "Middle Name", Category: "person", - Description: "Random middle name", + Description: "Name between a person's first name and last name", Example: "Belinda", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -309,7 +309,7 @@ func addPersonLookup() { AddFuncLookup("lastname", Info{ Display: "Last Name", Category: "person", - Description: "Random last name", + Description: "The family name or surname of an individual", Example: "Daniel", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -320,7 +320,7 @@ func addPersonLookup() { AddFuncLookup("gender", Info{ Display: "Gender", Category: "person", - Description: "Random gender", + Description: "Classification based on social and cultural norms that identifies an individual", Example: "male", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -331,7 +331,7 @@ func addPersonLookup() { AddFuncLookup("ssn", Info{ Display: "SSN", Category: "person", - Description: "Random social security number", + Description: "Unique nine-digit identifier used for government and financial purposes in the United States", Example: "296446360", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -342,7 +342,7 @@ func addPersonLookup() { AddFuncLookup("hobby", Info{ Display: "Hobby", Category: "person", - Description: "Random hobby activity", + Description: "An activity pursued for leisure and pleasure", Example: "Swimming", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -353,7 +353,7 @@ func addPersonLookup() { AddFuncLookup("email", Info{ Display: "Email", Category: "person", - Description: "Random email", + Description: "Electronic mail used for sending digital messages and communication over the internet", Example: "markusmoen@pagac.net", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -364,7 +364,7 @@ func addPersonLookup() { AddFuncLookup("phone", Info{ Display: "Phone", Category: "person", - Description: "Random phone number", + Description: "Numerical sequence used to contact individuals via telephone or mobile devices", Example: "6136459948", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -375,7 +375,7 @@ func addPersonLookup() { AddFuncLookup("phoneformatted", Info{ Display: "Phone Formatted", Category: "person", - Description: "Random formatted phone number", + Description: "Formatted phone number of a person", Example: "136-459-9489", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { diff --git a/product.go b/product.go index 635cbc33..7483ecbe 100644 --- a/product.go +++ b/product.go @@ -162,7 +162,7 @@ func addProductLookup() { AddFuncLookup("product", Info{ Display: "Product", Category: "product", - Description: "Random product info", + Description: "An item created for sale or use", Example: `{ "name": "olive copper monitor", "description": "Backwards caused quarterly without week it hungry thing someone him regularly. Whomever this revolt hence from his timing as quantity us these yours.", @@ -188,7 +188,7 @@ func addProductLookup() { AddFuncLookup("productname", Info{ Display: "Product Name", Category: "product", - Description: "Random product name", + Description: "Distinctive title or label assigned to a product for identification and marketing", Example: "olive copper monitor", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -199,7 +199,7 @@ func addProductLookup() { AddFuncLookup("productdescription", Info{ Display: "Product Description", Category: "product", - Description: "Random product description", + Description: "Explanation detailing the features and characteristics of a product", Example: "Backwards caused quarterly without week it hungry thing someone him regularly. Whomever this revolt hence from his timing as quantity us these yours.", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -210,7 +210,7 @@ func addProductLookup() { AddFuncLookup("productcategory", Info{ Display: "Product Category", Category: "product", - Description: "Random product category", + Description: "Classification grouping similar products based on shared characteristics or functions", Example: "clothing", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -221,7 +221,7 @@ func addProductLookup() { AddFuncLookup("productfeature", Info{ Display: "Product Feature", Category: "product", - Description: "Random product feature", + Description: "Specific characteristic of a product that distinguishes it from others products", Example: "ultra-lightweight", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -232,7 +232,7 @@ func addProductLookup() { AddFuncLookup("productmaterial", Info{ Display: "Product Material", Category: "product", - Description: "Random product material", + Description: "The substance from which a product is made, influencing its appearance, durability, and properties", Example: "brass", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -243,7 +243,7 @@ func addProductLookup() { AddFuncLookup("productupc", Info{ Display: "Product UPC", Category: "product", - Description: "Random product UPC", + Description: "Standardized barcode used for product identification and tracking in retail and commerce", Example: "012780949980", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { diff --git a/product_test.go b/product_test.go index 452ec48b..0688d93a 100644 --- a/product_test.go +++ b/product_test.go @@ -18,13 +18,13 @@ func ExampleProduct() { fmt.Println(product.UPC) // Output: Olive Copper Monitor - // Backwards caused quarterly without week it hungry thing someone him regularly. Whomever this revolt hence from his timing as quantity us these yours. + // Choir computer still far unless army party riches theirs instead here. Whichever that those instance growth has ouch enough Swiss us since down he. Aha us you to upon how this this furniture way no play towel. // [clothing tools and hardware] - // 7.61 + // 41.61 // [ultra-lightweight] - // navy - // brass - // 012780949980 + // olive + // stainless + // 074937734366 } func ExampleFaker_Product() { @@ -40,13 +40,13 @@ func ExampleFaker_Product() { fmt.Println(product.UPC) // Output: Olive Copper Monitor - // Backwards caused quarterly without week it hungry thing someone him regularly. Whomever this revolt hence from his timing as quantity us these yours. + // Choir computer still far unless army party riches theirs instead here. Whichever that those instance growth has ouch enough Swiss us since down he. Aha us you to upon how this this furniture way no play towel. // [clothing tools and hardware] - // 7.61 + // 41.61 // [ultra-lightweight] - // navy - // brass - // 012780949980 + // olive + // stainless + // 074937734366 } func TestProduct(t *testing.T) { @@ -134,14 +134,14 @@ func ExampleProductDescription() { Seed(11) fmt.Println(ProductDescription()) - // Output: Generally half where everything niche backwards caused quarterly without week it hungry thing someone him. Today whomever this revolt hence from his timing as quantity us these yours. + // Output: How these keep trip Congolese choir computer still far unless army party riches theirs instead. Mine whichever that those instance. Has ouch enough Swiss us since down. } func ExampleFaker_ProductDescription() { f := New(11) fmt.Println(f.ProductDescription()) - // Output: Generally half where everything niche backwards caused quarterly without week it hungry thing someone him. Today whomever this revolt hence from his timing as quantity us these yours. + // Output: How these keep trip Congolese choir computer still far unless army party riches theirs instead. Mine whichever that those instance. Has ouch enough Swiss us since down. } func BenchmarkProductDescription(b *testing.B) { diff --git a/school.go b/school.go index fb62c7f8..f90daef5 100644 --- a/school.go +++ b/school.go @@ -18,7 +18,7 @@ func addSchoolLookup() { AddFuncLookup("school", Info{ Display: "School", Category: "school", - Description: "School names, education places. Such as uni, High School etc.", + Description: "An institution for formal education and learning", Example: `Harborview State Academy`, Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { diff --git a/sql.go b/sql.go index 2a3a2ffb..b9918b23 100644 --- a/sql.go +++ b/sql.go @@ -105,7 +105,7 @@ func addDatabaseSQLLookup() { AddFuncLookup("sql", Info{ Display: "SQL", Category: "database", - Description: "Generates a SQL multi insert statement", + Description: "Command in SQL used to add new data records into a database table", Example: `INSERT INTO people (id, first_name, price, age, created_at) VALUES diff --git a/string.go b/string.go index 53c44e29..778772bc 100644 --- a/string.go +++ b/string.go @@ -123,7 +123,7 @@ func addStringLookup() { AddFuncLookup("letter", Info{ Display: "Letter", Category: "string", - Description: "Generate a single random lower case ASCII letter", + Description: "Character or symbol from the American Standard Code for Information Interchange (ASCII) character set", Example: "g", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -134,7 +134,7 @@ func addStringLookup() { AddFuncLookup("lettern", Info{ Display: "LetterN", Category: "string", - Description: "Generate a random ASCII string with length N", + Description: "ASCII string with length N", Example: "gbRMaRxHki", Output: "string", Params: []Param{ @@ -153,7 +153,7 @@ func addStringLookup() { AddFuncLookup("vowel", Info{ Display: "Vowel", Category: "string", - Description: "Generate a single random lower case vowel", + Description: "Speech sound produced with an open vocal tract", Example: "a", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -164,7 +164,7 @@ func addStringLookup() { AddFuncLookup("digit", Info{ Display: "Digit", Category: "string", - Description: "Generate a single ASCII digit", + Description: "Numerical symbol used to represent numbers", Example: "0", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -175,7 +175,7 @@ func addStringLookup() { AddFuncLookup("digitn", Info{ Display: "DigitN", Category: "string", - Description: "Generate a random string of length N consists of ASCII digits", + Description: "string of length N consisting of ASCII digits", Example: "0136459948", Output: "string", Params: []Param{ @@ -254,7 +254,7 @@ func addStringLookup() { AddFuncLookup("randomstring", Info{ Display: "Random String", Category: "string", - Description: "Randomly grab one string from array", + Description: "Return a random string from a string array", Example: "hello,world,whats,up => world", Output: "[]string", Params: []Param{ diff --git a/template.go b/template.go index 8ba97251..329d6f78 100644 --- a/template.go +++ b/template.go @@ -373,7 +373,7 @@ Markus Moen`, AddFuncLookup("markdown", Info{ Display: "Random markdown document", Category: "template", - Description: "Generates random markdown document", + Description: "Lightweight markup language used for formatting plain text", Example: `# PurpleSheep5 *Author: Amie Feil* @@ -410,7 +410,7 @@ MIT`, AddFuncLookup("email_text", Info{ Display: "Random text email Document", Category: "template", - Description: "Generates random email document.", + Description: "Written content of an email message, including the sender's message to the recipient", Example: `Subject: Greetings from Marcel! Dear Pagac, diff --git a/template_test.go b/template_test.go index fb61f49e..928e4586 100644 --- a/template_test.go +++ b/template_test.go @@ -231,7 +231,7 @@ func ExampleEmailText() { fmt.Println(string(value)) // Output: - // Subject: Greetings from Marcel! + // Subject: Greetings from Marcel! // // Dear Pagac, // @@ -239,22 +239,22 @@ func ExampleEmailText() { // // I hope you're doing great. May your week be filled with joy. // - // Virtually woman where team late quarterly without week it hungry. Thing someone him regularly today whomever this revolt hence from. His timing as quantity us these yours live these frantic. Not may another how this ours his them those whose. Them batch its Iraqi most that few abroad cheese this. + // This me far smile where was by army party riches. Theirs instead here mine whichever that those instance growth has. Ouch enough Swiss us since down he she aha us. You to upon how this this furniture way no play. Towel that us to accordingly theirs purse enough so though. // - // Whereas next how there gorgeous genetics time choir fiction therefore. Yourselves am those infrequently heap software quarterly rather punctuation yellow. Where several his orchard to frequently hence victorious boxers each. Does auspicious yourselves first soup tomorrow this that must conclude. Anyway some yearly who cough laugh himself both yet rarely. + // Election often until eek weekly yet oops until conclude his. Stay elsewhere such that galaxy clean that last each stack. Reluctantly theirs wisp aid firstly highly butter accordingly should already. Calm shake according fade neither kuban upon this he fortnightly. Occasionally bunch on who elsewhere lastly hourly right there honesty. // - // Me dolphin intensely block would leap plane us first then. Down them eager would hundred super throughout animal yet themselves. Been group flock shake part purchase up usually it her. None it hers boat what their there Turkmen moreover one. Lebanese to brace these shower in it everybody should whatever. + // We is how result out Shakespearean have whom yearly another. Packet are behind late lot finally time themselves goodness quizzical. Our therefore could fact cackle yourselves zebra for whose enormously. All bowl out wandering secondly yellow another your hourly spit. Since tomorrow hers words little think will our by Polynesian. // - // I'm curious to know what you think about it. If you have a moment, please feel free to check out the project on Bitbucket + // I'm curious to know what you think about it. If you have a moment, please feel free to check out the project on GitLab // - // I'm eager to hear what you think. Looking forward to your feedback! + // Your insights would be invaluable. Your thoughts matter to me. // - // Thank you for your consideration! Thanks in advance for your time. + // I appreciate your attention to this matter. Your feedback is greatly appreciated. // - // Kind regards - // Milford Johnston - // jamelhaag@king.org - // (507)096-3058 + // Best wishes + // Daryl Leannon + // oceaneokuneva@roberts.org + // 1-816-608-2233 } func ExampleFaker_EmailText() { @@ -268,7 +268,7 @@ func ExampleFaker_EmailText() { fmt.Println(string(value)) // Output: - // Subject: Greetings from Marcel! + // Subject: Greetings from Marcel! // // Dear Pagac, // @@ -276,22 +276,22 @@ func ExampleFaker_EmailText() { // // I hope you're doing great. May your week be filled with joy. // - // Virtually woman where team late quarterly without week it hungry. Thing someone him regularly today whomever this revolt hence from. His timing as quantity us these yours live these frantic. Not may another how this ours his them those whose. Them batch its Iraqi most that few abroad cheese this. + // This me far smile where was by army party riches. Theirs instead here mine whichever that those instance growth has. Ouch enough Swiss us since down he she aha us. You to upon how this this furniture way no play. Towel that us to accordingly theirs purse enough so though. // - // Whereas next how there gorgeous genetics time choir fiction therefore. Yourselves am those infrequently heap software quarterly rather punctuation yellow. Where several his orchard to frequently hence victorious boxers each. Does auspicious yourselves first soup tomorrow this that must conclude. Anyway some yearly who cough laugh himself both yet rarely. + // Election often until eek weekly yet oops until conclude his. Stay elsewhere such that galaxy clean that last each stack. Reluctantly theirs wisp aid firstly highly butter accordingly should already. Calm shake according fade neither kuban upon this he fortnightly. Occasionally bunch on who elsewhere lastly hourly right there honesty. // - // Me dolphin intensely block would leap plane us first then. Down them eager would hundred super throughout animal yet themselves. Been group flock shake part purchase up usually it her. None it hers boat what their there Turkmen moreover one. Lebanese to brace these shower in it everybody should whatever. + // We is how result out Shakespearean have whom yearly another. Packet are behind late lot finally time themselves goodness quizzical. Our therefore could fact cackle yourselves zebra for whose enormously. All bowl out wandering secondly yellow another your hourly spit. Since tomorrow hers words little think will our by Polynesian. // - // I'm curious to know what you think about it. If you have a moment, please feel free to check out the project on Bitbucket + // I'm curious to know what you think about it. If you have a moment, please feel free to check out the project on GitLab // - // I'm eager to hear what you think. Looking forward to your feedback! + // Your insights would be invaluable. Your thoughts matter to me. // - // Thank you for your consideration! Thanks in advance for your time. + // I appreciate your attention to this matter. Your feedback is greatly appreciated. // - // Kind regards - // Milford Johnston - // jamelhaag@king.org - // (507)096-3058 + // Best wishes + // Daryl Leannon + // oceaneokuneva@roberts.org + // 1-816-608-2233 } // TemplateMarkdown examples and tests @@ -306,13 +306,13 @@ func ExampleMarkdown() { fmt.Println(string(value)) // Output: - // # PurpleSheep5 + // # PurpleSheep5 // // *Author: Amie Feil* // - // Quarterly without week it hungry thing someone. Him regularly today whomever this revolt hence. From his timing as quantity us these. Yours live these frantic not may another. How this ours his them those whose. + // Was by army party riches theirs instead. Here mine whichever that those instance growth. Has ouch enough Swiss us since down. He she aha us you to upon. How this this furniture way no play. // - // Them batch its Iraqi most that few. Abroad cheese this whereas next how there. Gorgeous genetics time choir fiction therefore yourselves. Am those infrequently heap software quarterly rather. Punctuation yellow where several his orchard to. + // Towel that us to accordingly theirs purse. Enough so though election often until eek. Weekly yet oops until conclude his stay. Elsewhere such that galaxy clean that last. Each stack reluctantly theirs wisp aid firstly. // // ## Table of Contents // - [Installation](#installation) @@ -345,13 +345,13 @@ func ExampleFaker_Markdown() { fmt.Println(string(value)) // Output: - // # PurpleSheep5 + // # PurpleSheep5 // // *Author: Amie Feil* // - // Quarterly without week it hungry thing someone. Him regularly today whomever this revolt hence. From his timing as quantity us these. Yours live these frantic not may another. How this ours his them those whose. + // Was by army party riches theirs instead. Here mine whichever that those instance growth. Has ouch enough Swiss us since down. He she aha us you to upon. How this this furniture way no play. // - // Them batch its Iraqi most that few. Abroad cheese this whereas next how there. Gorgeous genetics time choir fiction therefore yourselves. Am those infrequently heap software quarterly rather. Punctuation yellow where several his orchard to. + // Towel that us to accordingly theirs purse. Enough so though election often until eek. Weekly yet oops until conclude his stay. Elsewhere such that galaxy clean that last. Each stack reluctantly theirs wisp aid firstly. // // ## Table of Contents // - [Installation](#installation) diff --git a/time.go b/time.go index 10f7e9e8..ecd0c1ca 100644 --- a/time.go +++ b/time.go @@ -213,7 +213,7 @@ func addDateTimeLookup() { AddFuncLookup("date", Info{ Display: "Date", Category: "time", - Description: "Random date", + Description: "Representation of a specific day, month, and year, often used for chronological reference", Example: "2006-01-02T15:04:05Z07:00", Output: "string", Params: []Param{ @@ -324,7 +324,7 @@ func addDateTimeLookup() { AddFuncLookup("pasttime", Info{ Display: "PastTime", Category: "time", - Description: "Random past date", + Description: "Date that has occurred before the current moment in time", Example: "2007-01-24 13:00:35.820738079 +0000 UTC", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -335,7 +335,7 @@ func addDateTimeLookup() { AddFuncLookup("futuretime", Info{ Display: "FutureTime", Category: "time", - Description: "Random past date", + Description: "Date that has occurred after the current moment in time", Example: "2107-01-24 13:00:35.820738079 +0000 UTC", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -346,7 +346,7 @@ func addDateTimeLookup() { AddFuncLookup("nanosecond", Info{ Display: "Nanosecond", Category: "time", - Description: "Random nanosecond", + Description: "Unit of time equal to One billionth (10^-9) of a second", Example: "196446360", Output: "int", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -357,7 +357,7 @@ func addDateTimeLookup() { AddFuncLookup("second", Info{ Display: "Second", Category: "time", - Description: "Random second", + Description: "Unit of time equal to 1/60th of a minute", Example: "43", Output: "int", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -368,7 +368,7 @@ func addDateTimeLookup() { AddFuncLookup("minute", Info{ Display: "Minute", Category: "time", - Description: "Random minute", + Description: "Unit of time equal to 60 seconds", Example: "34", Output: "int", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -379,7 +379,7 @@ func addDateTimeLookup() { AddFuncLookup("hour", Info{ Display: "Hour", Category: "time", - Description: "Random hour", + Description: "Unit of time equal to 60 minutes", Example: "8", Output: "int", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -390,7 +390,7 @@ func addDateTimeLookup() { AddFuncLookup("day", Info{ Display: "Day", Category: "time", - Description: "Random day", + Description: "24-hour period equivalent to one rotation of Earth on its axis", Example: "12", Output: "int", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -401,7 +401,7 @@ func addDateTimeLookup() { AddFuncLookup("weekday", Info{ Display: "Weekday", Category: "time", - Description: "Random week day", + Description: "Day of the week excluding the weekend", Example: "Friday", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -412,7 +412,7 @@ func addDateTimeLookup() { AddFuncLookup("month", Info{ Display: "Month", Category: "time", - Description: "Random month", + Description: "Division of the year, typically 30 or 31 days long", Example: "1", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -423,7 +423,7 @@ func addDateTimeLookup() { AddFuncLookup("monthstring", Info{ Display: "Month String", Category: "time", - Description: "Random month in string output", + Description: "String Representation of a month name", Example: "September", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -434,7 +434,7 @@ func addDateTimeLookup() { AddFuncLookup("year", Info{ Display: "Year", Category: "time", - Description: "Random year", + Description: "Period of 365 days, the time Earth takes to orbit the Sun", Example: "1900", Output: "int", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -445,7 +445,7 @@ func addDateTimeLookup() { AddFuncLookup("timezone", Info{ Display: "Timezone", Category: "time", - Description: "Random timezone", + Description: "Region where the same standard time is used, based on longitudinal divisions of the Earth", Example: "Kaliningrad Standard Time", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -456,7 +456,7 @@ func addDateTimeLookup() { AddFuncLookup("timezoneabv", Info{ Display: "Timezone Abbreviation", Category: "time", - Description: "Random abbreviated timezone", + Description: "Abbreviated 3-letter word of a timezone", Example: "KST", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -467,7 +467,7 @@ func addDateTimeLookup() { AddFuncLookup("timezonefull", Info{ Display: "Timezone Full", Category: "time", - Description: "Random full timezone", + Description: "Full name of a timezone", Example: "(UTC+03:00) Kaliningrad, Minsk", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -478,7 +478,7 @@ func addDateTimeLookup() { AddFuncLookup("timezoneoffset", Info{ Display: "Timezone Offset", Category: "time", - Description: "Random timezone offset", + Description: "The difference in hours from Coordinated Universal Time (UTC) for a specific region", Example: "3", Output: "float32", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -489,7 +489,7 @@ func addDateTimeLookup() { AddFuncLookup("timezoneregion", Info{ Display: "Timezone Region", Category: "time", - Description: "Random region timezone", + Description: "Geographic area sharing the same standard time", Example: "America/Alaska", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { diff --git a/word_adjective.go b/word_adjective.go index 01f2c503..c9fcbd8e 100644 --- a/word_adjective.go +++ b/word_adjective.go @@ -95,7 +95,7 @@ func addWordAdjectiveLookup() { AddFuncLookup("adjective", Info{ Display: "Adjective", Category: "word", - Description: "Random adjective", + Description: "Word describing or modifying a noun", Example: "genuine", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -106,7 +106,7 @@ func addWordAdjectiveLookup() { AddFuncLookup("adjectivedescriptive", Info{ Display: "Descriptive Adjective", Category: "word", - Description: "Random descriptive adjective", + Description: "Adjective that provides detailed characteristics about a noun", Example: "brave", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -117,7 +117,7 @@ func addWordAdjectiveLookup() { AddFuncLookup("adjectivequantitative", Info{ Display: "Quantitative Adjective", Category: "word", - Description: "Random quantitative adjective", + Description: "Adjective that indicates the quantity or amount of something", Example: "a little", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -128,7 +128,7 @@ func addWordAdjectiveLookup() { AddFuncLookup("adjectiveproper", Info{ Display: "Proper Adjective", Category: "word", - Description: "Random proper adjective", + Description: "Adjective derived from a proper noun, often used to describe nationality or origin", Example: "Afghan", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -139,7 +139,7 @@ func addWordAdjectiveLookup() { AddFuncLookup("adjectivedemonstrative", Info{ Display: "Demonstrative Adjective", Category: "word", - Description: "Random demonstrative adjective", + Description: "Adjective used to point out specific things", Example: "this", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -150,7 +150,7 @@ func addWordAdjectiveLookup() { AddFuncLookup("adjectivepossessive", Info{ Display: "Possessive Adjective", Category: "word", - Description: "Random possessive adjective", + Description: "Adjective indicating ownership or possession", Example: "my", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -161,7 +161,7 @@ func addWordAdjectiveLookup() { AddFuncLookup("adjectiveinterrogative", Info{ Display: "Interrogative Adjective", Category: "word", - Description: "Random interrogative adjective", + Description: "Adjective used to ask questions", Example: "what", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -172,7 +172,7 @@ func addWordAdjectiveLookup() { AddFuncLookup("adjectiveindefinite", Info{ Display: "Indefinite Adjective", Category: "word", - Description: "Random indefinite adjective", + Description: "Adjective describing a non-specific noun", Example: "few", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { diff --git a/word_adverb.go b/word_adverb.go index e5456db9..b148bf8d 100644 --- a/word_adverb.go +++ b/word_adverb.go @@ -89,7 +89,7 @@ func addWordAdverbLookup() { AddFuncLookup("adverb", Info{ Display: "Adverb", Category: "word", - Description: "Random adverb", + Description: "Word that modifies verbs, adjectives, or other adverbs", Example: "smoothly", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -100,7 +100,7 @@ func addWordAdverbLookup() { AddFuncLookup("adverbmanner", Info{ Display: "Adverb Manner", Category: "word", - Description: "Random manner adverb", + Description: "Adverb that describes how an action is performed", Example: "stupidly", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -111,7 +111,7 @@ func addWordAdverbLookup() { AddFuncLookup("adverbdegree", Info{ Display: "Adverb Degree", Category: "word", - Description: "Random degree adverb", + Description: "Adverb that indicates the degree or intensity of an action or adjective", Example: "intensely", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -122,7 +122,7 @@ func addWordAdverbLookup() { AddFuncLookup("adverbplace", Info{ Display: "Adverb Place", Category: "word", - Description: "Random place adverb", + Description: "Adverb that indicates the location or direction of an action", Example: "east", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -133,7 +133,7 @@ func addWordAdverbLookup() { AddFuncLookup("adverbtimedefinite", Info{ Display: "Adverb Time Definite", Category: "word", - Description: "Random time definite adverb", + Description: "Adverb that specifies the exact time an action occurs", Example: "now", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -144,7 +144,7 @@ func addWordAdverbLookup() { AddFuncLookup("adverbtimeindefinite", Info{ Display: "Adverb Time Indefinite", Category: "word", - Description: "Random time indefinite adverb", + Description: "Adverb that gives a general or unspecified time frame", Example: "already", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -155,7 +155,7 @@ func addWordAdverbLookup() { AddFuncLookup("adverbfrequencydefinite", Info{ Display: "Adverb Frequency Definite", Category: "word", - Description: "Random frequency definite adverb", + Description: "Adverb that specifies how often an action occurs with a clear frequency", Example: "hourly", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -166,7 +166,7 @@ func addWordAdverbLookup() { AddFuncLookup("adverbfrequencyindefinite", Info{ Display: "Adverb Frequency Indefinite", Category: "word", - Description: "Random frequency indefinite adverb", + Description: "Adverb that specifies how often an action occurs without specifying a particular frequency", Example: "occasionally", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { diff --git a/word_comment.go b/word_comment.go new file mode 100644 index 00000000..3f5d3e41 --- /dev/null +++ b/word_comment.go @@ -0,0 +1,73 @@ +package gofakeit + +import ( + "math/rand" + "strings" +) + +// Comment will generate a random statement or remark expressing an opinion, observation, or reaction +func Comment() string { return comment(globalFaker.Rand) } + +// Comment will generate a random statement or remark expressing an opinion, observation, or reaction +func (f *Faker) Comment() string { return comment(f.Rand) } + +func comment(r *rand.Rand) string { + structures := [][]string{ + {"interjection", "adjective", "noun", "verb", "adverb"}, + {"noun", "verb", "preposition", "determiner", "adjective", "noun"}, + {"noun", "verb", "adverb"}, + {"adjective", "noun", "verb"}, + {"noun", "verb", "preposition", "noun"}, + } + + // Randomly select a structure + structure := structures[number(r, 0, len(structures)-1)] + + // Build the sentence + var commentParts []string + for _, wordType := range structure { + switch wordType { + case "noun": + commentParts = append(commentParts, noun(r)) + case "verb": + commentParts = append(commentParts, verb(r)) + case "adjective": + commentParts = append(commentParts, adjective(r)) + case "adverb": + commentParts = append(commentParts, adverb(r)) + case "interjection": + commentParts = append(commentParts, interjection(r)) + case "preposition": + commentParts = append(commentParts, preposition(r)) + case "determiner": + commentParts = append(commentParts, nounDeterminer(r)) + default: + // Should never hit + panic("Invalid word type") + } + } + + // Combine the words into a sentence + sentence := strings.Join(commentParts, " ") + + // Capitalize the first letter + sentence = title(sentence) + + // Add a period to the end of the sentence + sentence = sentence + "." + + return sentence +} + +func addWordCommentLookup() { + AddFuncLookup("comment", Info{ + Display: "Comment", + Category: "word", + Description: "Statement or remark expressing an opinion, observation, or reaction", + Example: "wow", + Output: "string", + Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { + return interjection(r), nil + }, + }) +} diff --git a/word_comment_test.go b/word_comment_test.go new file mode 100644 index 00000000..bb7780a4 --- /dev/null +++ b/word_comment_test.go @@ -0,0 +1,33 @@ +package gofakeit + +import ( + "fmt" + "testing" +) + +func ExampleComment() { + Seed(11) + fmt.Println(Comment()) + + // Output: Phew Substantial Thing Had Regularly. +} + +func ExampleFaker_Comment() { + f := New(11) + fmt.Println(f.Comment()) + + // Output: Phew Substantial Thing Had Regularly. +} + +func TestComment(t *testing.T) { + f := New(11) + for i := 0; i < 1000; i++ { + f.Comment() + } +} + +func BenchmarkComment(b *testing.B) { + for i := 0; i < b.N; i++ { + Comment() + } +} diff --git a/word_connective.go b/word_connective.go index ecfc2836..5be26166 100644 --- a/word_connective.go +++ b/word_connective.go @@ -85,7 +85,7 @@ func addWordConnectiveLookup() { AddFuncLookup("connective", Info{ Display: "Connective", Category: "word", - Description: "Random connective word", + Description: "Word used to connect words or sentences", Example: "such as", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -96,7 +96,7 @@ func addWordConnectiveLookup() { AddFuncLookup("connectivetime", Info{ Display: "Connective Time", Category: "word", - Description: "Random connective time word", + Description: "Connective word used to indicate a temporal relationship between events or actions", Example: "finally", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -107,7 +107,7 @@ func addWordConnectiveLookup() { AddFuncLookup("connectivecomparative", Info{ Display: "Connective Comparitive", Category: "word", - Description: "Random connective comparative word", + Description: "Connective word used to indicate a comparison between two or more things", Example: "in addition", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -118,7 +118,7 @@ func addWordConnectiveLookup() { AddFuncLookup("connectivecomplaint", Info{ Display: "Connective Complaint", Category: "word", - Description: "Random connective complaint word", + Description: "Connective word used to express dissatisfaction or complaints about a situation", Example: "besides", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -129,7 +129,7 @@ func addWordConnectiveLookup() { AddFuncLookup("connectivelisting", Info{ Display: "Connective Listing", Category: "word", - Description: "Random connective listing word", + Description: "Connective word used to list or enumerate items or examples", Example: "firstly", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -140,7 +140,7 @@ func addWordConnectiveLookup() { AddFuncLookup("connectivecasual", Info{ Display: "Connective Casual", Category: "word", - Description: "Random connective casual word", + Description: "Connective word used to indicate a cause-and-effect relationship between events or actions", Example: "an outcome of", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -151,7 +151,7 @@ func addWordConnectiveLookup() { AddFuncLookup("connectiveexamplify", Info{ Display: "Connective Examplify", Category: "word", - Description: "Random connective examplify word", + Description: "Connective word used to provide examples or illustrations of a concept or idea", Example: "then", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { diff --git a/word_general.go b/word_general.go index db51e4b9..d2a84f92 100644 --- a/word_general.go +++ b/word_general.go @@ -28,7 +28,7 @@ func addWordGeneralLookup() { AddFuncLookup("word", Info{ Display: "Word", Category: "word", - Description: "Random word", + Description: "Basic unit of language representing a concept or thing, consisting of letters and having meaning", Example: "man", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { diff --git a/word_general_test.go b/word_general_test.go index 59b8d180..455468e8 100644 --- a/word_general_test.go +++ b/word_general_test.go @@ -9,14 +9,14 @@ func ExampleWord() { Seed(11) fmt.Println(Word()) - // Output: there + // Output: none } func ExampleFaker_Word() { f := New(11) fmt.Println(f.Word()) - // Output: there + // Output: none } func BenchmarkWord(b *testing.B) { diff --git a/word_grammar.go b/word_grammar.go index 48c9aee0..77722d76 100644 --- a/word_grammar.go +++ b/word_grammar.go @@ -25,7 +25,7 @@ func addWordGrammerLookup() { AddFuncLookup("sentencesimple", Info{ Display: "Simple Sentence", Category: "word", - Description: "Random simple sentence", + Description: "Group of words that expresses a complete thought", Example: "A tribe fly the lemony kitchen.", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { diff --git a/word_misc.go b/word_misc.go new file mode 100644 index 00000000..59d47e59 --- /dev/null +++ b/word_misc.go @@ -0,0 +1,24 @@ +package gofakeit + +import "math/rand" + +// Interjection will generate a random word expressing emotion +func Interjection() string { return interjection(globalFaker.Rand) } + +// Interjection will generate a random word expressing emotion +func (f *Faker) Interjection() string { return interjection(f.Rand) } + +func interjection(r *rand.Rand) string { return getRandValue(r, []string{"word", "interjection"}) } + +func addWordMiscLookup() { + AddFuncLookup("interjection", Info{ + Display: "Interjection", + Category: "word", + Description: "Word expressing emotion", + Example: "wow", + Output: "string", + Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { + return interjection(r), nil + }, + }) +} diff --git a/word_misc_test.go b/word_misc_test.go new file mode 100644 index 00000000..48302f25 --- /dev/null +++ b/word_misc_test.go @@ -0,0 +1,26 @@ +package gofakeit + +import ( + "fmt" + "testing" +) + +func ExampleInterjection() { + Seed(11) + fmt.Println(Interjection()) + + // Output: wow +} + +func ExampleFaker_Interjection() { + f := New(11) + fmt.Println(f.Interjection()) + + // Output: wow +} + +func BenchmarkInterjection(b *testing.B) { + for i := 0; i < b.N; i++ { + Interjection() + } +} diff --git a/word_noun.go b/word_noun.go index 368ec6cf..fbf9e806 100644 --- a/word_noun.go +++ b/word_noun.go @@ -111,11 +111,19 @@ func nounProper(r *rand.Rand) string { return getRandValue(r, []string{"person", "first"}) } +// NounDeterminer will generate a random noun determiner +func NounDeterminer() string { return nounDeterminer(globalFaker.Rand) } + +// NounDeterminer will generate a random noun determiner +func (f *Faker) NounDeterminer() string { return nounDeterminer(f.Rand) } + +func nounDeterminer(r *rand.Rand) string { return getRandValue(r, []string{"word", "noun_determiner"}) } + func addWordNounLookup() { AddFuncLookup("noun", Info{ Display: "Noun", Category: "word", - Description: "Random noun", + Description: "Person, place, thing, or idea, named or referred to in a sentence", Example: "aunt", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -126,7 +134,7 @@ func addWordNounLookup() { AddFuncLookup("nouncommon", Info{ Display: "Noun Common", Category: "word", - Description: "Random common noun", + Description: "General name for people, places, or things, not specific or unique", Example: "part", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -137,7 +145,7 @@ func addWordNounLookup() { AddFuncLookup("nounconcrete", Info{ Display: "Noun Concrete", Category: "word", - Description: "Random concrete noun", + Description: "Names for physical entities experienced through senses like sight, touch, smell, or taste", Example: "snowman", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -148,7 +156,7 @@ func addWordNounLookup() { AddFuncLookup("nounabstract", Info{ Display: "Noun Abstract", Category: "word", - Description: "Random abstract noun", + Description: "Ideas, qualities, or states that cannot be perceived with the five senses", Example: "confusion", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -159,7 +167,7 @@ func addWordNounLookup() { AddFuncLookup("nouncollectivepeople", Info{ Display: "Noun Collective People", Category: "word", - Description: "Random collective noun person", + Description: "Group of people or things regarded as a unit", Example: "body", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -170,7 +178,7 @@ func addWordNounLookup() { AddFuncLookup("nouncollectiveanimal", Info{ Display: "Noun Collective Animal", Category: "word", - Description: "Random collective noun animal", + Description: "Group of animals, like a 'pack' of wolves or a 'flock' of birds", Example: "party", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -181,7 +189,7 @@ func addWordNounLookup() { AddFuncLookup("nouncollectivething", Info{ Display: "Noun Collective Thing", Category: "word", - Description: "Random collective noun thing", + Description: "Group of objects or items, such as a 'bundle' of sticks or a 'cluster' of grapes", Example: "hand", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -192,7 +200,7 @@ func addWordNounLookup() { AddFuncLookup("nouncountable", Info{ Display: "Noun Countable", Category: "word", - Description: "Random countable noun", + Description: "Items that can be counted individually", Example: "neck", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -203,7 +211,7 @@ func addWordNounLookup() { AddFuncLookup("noununcountable", Info{ Display: "Noun Uncountable", Category: "word", - Description: "Random uncountable noun", + Description: "Items that can't be counted individually", Example: "seafood", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -214,11 +222,22 @@ func addWordNounLookup() { AddFuncLookup("nounproper", Info{ Display: "Noun Proper", Category: "word", - Description: "Random proper noun", + Description: "Specific name for a particular person, place, or organization", Example: "John", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { return nounProper(r), nil }, }) + + AddFuncLookup("noundeterminer", Info{ + Display: "Noun Determiner", + Category: "word", + Description: "Word that introduces a noun and identifies it as a noun", + Example: "your", + Output: "string", + Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { + return nounDeterminer(r), nil + }, + }) } diff --git a/word_noun_test.go b/word_noun_test.go index fe83be3e..29d4e69b 100644 --- a/word_noun_test.go +++ b/word_noun_test.go @@ -213,3 +213,32 @@ func BenchmarkNounProper(b *testing.B) { NounProper() } } + +func ExampleNounDeterminer() { + Seed(11) + fmt.Println(NounDeterminer()) + + // Output: an +} + +func ExampleFaker_NounDeterminer() { + f := New(11) + fmt.Println(f.NounDeterminer()) + + // Output: an +} + +func TestNounDeterminer(t *testing.T) { + f := New(11) + for i := 0; i < 100; i++ { + if f.NounDeterminer() == "" { + t.Errorf("Expected a non-empty string, got nothing") + } + } +} + +func BenchmarkNounDeterminer(b *testing.B) { + for i := 0; i < b.N; i++ { + NounDeterminer() + } +} diff --git a/word_phrase.go b/word_phrase.go index f3f6a3bc..1432f173 100644 --- a/word_phrase.go +++ b/word_phrase.go @@ -109,7 +109,7 @@ func addWordPhraseLookup() { AddFuncLookup("phrase", Info{ Display: "Phrase", Category: "word", - Description: "Random phrase", + Description: "A small group of words standing together", Example: "time will tell", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -120,7 +120,7 @@ func addWordPhraseLookup() { AddFuncLookup("phrasenoun", Info{ Display: "Noun Phrase", Category: "word", - Description: "Random noun phrase", + Description: "Phrase with a noun as its head, functions within sentence like a noun", Example: "a tribe", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -131,7 +131,7 @@ func addWordPhraseLookup() { AddFuncLookup("phraseverb", Info{ Display: "Verb Phrase", Category: "word", - Description: "Random verb phrase", + Description: "Phrase that Consists of a verb and its modifiers, expressing an action or state", Example: "a tribe", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -142,7 +142,7 @@ func addWordPhraseLookup() { AddFuncLookup("phraseadverb", Info{ Display: "Adverb Phrase", Category: "word", - Description: "Random adverb phrase", + Description: "Phrase that modifies a verb, adjective, or another adverb, providing additional information.", Example: "fully gladly", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -153,7 +153,7 @@ func addWordPhraseLookup() { AddFuncLookup("phrasepreposition", Info{ Display: "Preposition Phrase", Category: "word", - Description: "Random preposition phrase", + Description: "Phrase starting with a preposition, showing relation between elements in a sentence.", Example: "out the black thing", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { diff --git a/word_preposition.go b/word_preposition.go index efc4aabe..bf1d2f74 100644 --- a/word_preposition.go +++ b/word_preposition.go @@ -51,7 +51,7 @@ func addWordPrepositionLookup() { AddFuncLookup("preposition", Info{ Display: "Preposition", Category: "word", - Description: "Random preposition", + Description: "Words used to express the relationship of a noun or pronoun to other words in a sentence", Example: "other than", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -62,7 +62,7 @@ func addWordPrepositionLookup() { AddFuncLookup("prepositionsimple", Info{ Display: "Preposition Simple", Category: "word", - Description: "Random simple preposition", + Description: "Single-word preposition showing relationships between 2 parts of a sentence", Example: "out", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -73,7 +73,7 @@ func addWordPrepositionLookup() { AddFuncLookup("prepositiondouble", Info{ Display: "Preposition Double", Category: "word", - Description: "Random double preposition", + Description: "Two-word combination preposition, indicating a complex relation", Example: "before", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -84,7 +84,7 @@ func addWordPrepositionLookup() { AddFuncLookup("prepositioncompound", Info{ Display: "Preposition Compound", Category: "word", - Description: "Random compound preposition", + Description: "Preposition that can be formed by combining two or more prepositions", Example: "according to", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { diff --git a/word_pronoun.go b/word_pronoun.go index a62d830f..00c53310 100644 --- a/word_pronoun.go +++ b/word_pronoun.go @@ -106,7 +106,7 @@ func addWordPronounLookup() { AddFuncLookup("pronoun", Info{ Display: "Pronoun", Category: "word", - Description: "Generates a random pronoun", + Description: "Word used in place of a noun to avoid repetition", Example: "me", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -117,7 +117,7 @@ func addWordPronounLookup() { AddFuncLookup("pronounpersonal", Info{ Display: "Pronoun Personal", Category: "word", - Description: "Generates a random personal pronoun", + Description: "Pronoun referring to a specific persons or things", Example: "it", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -128,7 +128,7 @@ func addWordPronounLookup() { AddFuncLookup("pronounobject", Info{ Display: "Pronoun Object", Category: "word", - Description: "Generates a random object pronoun", + Description: "Pronoun used as the object of a verb or preposition", Example: "it", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -139,7 +139,7 @@ func addWordPronounLookup() { AddFuncLookup("pronounpossessive", Info{ Display: "Pronoun Possessive", Category: "word", - Description: "Generates a random possessive pronoun", + Description: "Pronoun indicating ownership or belonging", Example: "mine", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -150,7 +150,7 @@ func addWordPronounLookup() { AddFuncLookup("pronounreflective", Info{ Display: "Pronoun Reflective", Category: "word", - Description: "Generates a random reflective pronoun", + Description: "Pronoun referring back to the subject of the sentence", Example: "myself", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -161,7 +161,7 @@ func addWordPronounLookup() { AddFuncLookup("pronounindefinite", Info{ Display: "Pronoun Indefinite", Category: "word", - Description: "Generates a random indefinite pronoun", + Description: "Pronoun that does not refer to a specific person or thing", Example: "few", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -172,7 +172,7 @@ func addWordPronounLookup() { AddFuncLookup("pronoundemonstrative", Info{ Display: "Pronoun Demonstrative", Category: "word", - Description: "Generates a random demonstrative pronoun", + Description: "Pronoun that points out specific people or things", Example: "this", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -183,7 +183,7 @@ func addWordPronounLookup() { AddFuncLookup("pronouninterrogative", Info{ Display: "Pronoun Interrogative", Category: "word", - Description: "Generates a random interrogative pronoun", + Description: "Pronoun used to ask questions", Example: "what", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -194,7 +194,7 @@ func addWordPronounLookup() { AddFuncLookup("pronounrelative", Info{ Display: "Pronoun Relative", Category: "word", - Description: "Generates a random relative pronoun", + Description: "Pronoun that introduces a clause, referring back to a noun or pronoun", Example: "as", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { diff --git a/word_sentence.go b/word_sentence.go index d92a75f0..de8d41e9 100644 --- a/word_sentence.go +++ b/word_sentence.go @@ -124,7 +124,7 @@ func addWordSentenceLookup() { AddFuncLookup("sentence", Info{ Display: "Sentence", Category: "word", - Description: "Random sentence", + Description: "Set of words expressing a statement, question, exclamation, or command", Example: "Interpret context record river mind.", Output: "string", Params: []Param{ @@ -146,7 +146,7 @@ func addWordSentenceLookup() { AddFuncLookup("paragraph", Info{ Display: "Paragraph", Category: "word", - Description: "Random paragraph", + Description: "Distinct section of writing covering a single theme, composed of multiple sentences", Example: "Interpret context record river mind press self should compare property outcome divide. Combine approach sustain consult discover explanation direct address church husband seek army. Begin own act welfare replace press suspect stay link place manchester specialist. Arrive price satisfy sign force application hair train provide basis right pay. Close mark teacher strengthen information attempt head touch aim iron tv take.", Output: "string", Params: []Param{ @@ -192,7 +192,7 @@ func addWordSentenceLookup() { AddFuncLookup("question", Info{ Display: "Question", Category: "word", - Description: "Random question", + Description: "Statement formulated to inquire or seek clarification", Example: "Roof chia echo?", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -201,9 +201,9 @@ func addWordSentenceLookup() { }) AddFuncLookup("quote", Info{ - Display: "Qoute", + Display: "Quote", Category: "word", - Description: "Random quote", + Description: "Direct repetition of someone else's words", Example: `"Roof chia echo." - Lura Lockman`, Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { diff --git a/word_sentence_test.go b/word_sentence_test.go index 1187b6aa..b4824f8b 100644 --- a/word_sentence_test.go +++ b/word_sentence_test.go @@ -10,14 +10,14 @@ func ExampleSentence() { Seed(11) fmt.Println(Sentence(5)) - // Output: There had result everything niche. + // Output: None how these keep trip. } func ExampleFaker_Sentence() { f := New(11) fmt.Println(f.Sentence(5)) - // Output: There had result everything niche. + // Output: None how these keep trip. } func TestSentence(t *testing.T) { @@ -45,18 +45,18 @@ func ExampleParagraph() { Seed(11) fmt.Println(Paragraph(3, 5, 12, "\n")) - // Output: There had result everything niche backwards caused quarterly without week it hungry. Thing someone him regularly today whomever this revolt hence from his timing. As quantity us these yours live these frantic not may another how. This ours his them those whose them batch its Iraqi most that. Few abroad cheese this whereas next how there gorgeous genetics time choir. - // Fiction therefore yourselves am those infrequently heap software quarterly rather punctuation yellow. Where several his orchard to frequently hence victorious boxers each does auspicious. Yourselves first soup tomorrow this that must conclude anyway some yearly who. Cough laugh himself both yet rarely me dolphin intensely block would leap. Plane us first then down them eager would hundred super throughout animal. - // Yet themselves been group flock shake part purchase up usually it her. None it hers boat what their there Turkmen moreover one Lebanese to. Brace these shower in it everybody should whatever those uninterested several nobody. Yours thankful innocent power to any from its few luxury none boy. Religion themselves it there might must near theirs mine thing tonight outside. + // Output: None how these keep trip Congolese choir computer still far unless army. Party riches theirs instead here mine whichever that those instance growth has. Ouch enough Swiss us since down he she aha us you to. Upon how this this furniture way no play towel that us to. Accordingly theirs purse enough so though election often until eek weekly yet. + // Oops until conclude his stay elsewhere such that galaxy clean that last. Each stack reluctantly theirs wisp aid firstly highly butter accordingly should already. Calm shake according fade neither kuban upon this he fortnightly occasionally bunch. On who elsewhere lastly hourly right there honesty we is how result. Out Shakespearean have whom yearly another packet are behind late lot finally. + // Time themselves goodness quizzical our therefore could fact cackle yourselves zebra for. Whose enormously all bowl out wandering secondly yellow another your hourly spit. Since tomorrow hers words little think will our by Polynesian write much. Of herself uptight these composer these any firstly stack you much terribly. Over pose place sprint it child is joyously that I whom mango. } func ExampleFaker_Paragraph() { f := New(11) fmt.Println(f.Paragraph(3, 5, 12, "\n")) - // Output: There had result everything niche backwards caused quarterly without week it hungry. Thing someone him regularly today whomever this revolt hence from his timing. As quantity us these yours live these frantic not may another how. This ours his them those whose them batch its Iraqi most that. Few abroad cheese this whereas next how there gorgeous genetics time choir. - // Fiction therefore yourselves am those infrequently heap software quarterly rather punctuation yellow. Where several his orchard to frequently hence victorious boxers each does auspicious. Yourselves first soup tomorrow this that must conclude anyway some yearly who. Cough laugh himself both yet rarely me dolphin intensely block would leap. Plane us first then down them eager would hundred super throughout animal. - // Yet themselves been group flock shake part purchase up usually it her. None it hers boat what their there Turkmen moreover one Lebanese to. Brace these shower in it everybody should whatever those uninterested several nobody. Yours thankful innocent power to any from its few luxury none boy. Religion themselves it there might must near theirs mine thing tonight outside. + // Output: None how these keep trip Congolese choir computer still far unless army. Party riches theirs instead here mine whichever that those instance growth has. Ouch enough Swiss us since down he she aha us you to. Upon how this this furniture way no play towel that us to. Accordingly theirs purse enough so though election often until eek weekly yet. + // Oops until conclude his stay elsewhere such that galaxy clean that last. Each stack reluctantly theirs wisp aid firstly highly butter accordingly should already. Calm shake according fade neither kuban upon this he fortnightly occasionally bunch. On who elsewhere lastly hourly right there honesty we is how result. Out Shakespearean have whom yearly another packet are behind late lot finally. + // Time themselves goodness quizzical our therefore could fact cackle yourselves zebra for. Whose enormously all bowl out wandering secondly yellow another your hourly spit. Since tomorrow hers words little think will our by Polynesian write much. Of herself uptight these composer these any firstly stack you much terribly. Over pose place sprint it child is joyously that I whom mango. } func TestParagraph(t *testing.T) { diff --git a/word_verb.go b/word_verb.go index a18363bb..6a5db234 100644 --- a/word_verb.go +++ b/word_verb.go @@ -63,7 +63,7 @@ func addWordVerbLookup() { AddFuncLookup("verb", Info{ Display: "Verb", Category: "word", - Description: "Random verb", + Description: "Word expressing an action, event or state", Example: "release", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -74,7 +74,7 @@ func addWordVerbLookup() { AddFuncLookup("verbaction", Info{ Display: "Action Verb", Category: "word", - Description: "Random action verb", + Description: "Verb Indicating a physical or mental action", Example: "close", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -85,7 +85,7 @@ func addWordVerbLookup() { AddFuncLookup("verbtransitive", Info{ Display: "Transitive Verb", Category: "word", - Description: "Random transitive verb", + Description: "Verb that requires a direct object to complete its meaning", Example: "follow", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -96,7 +96,7 @@ func addWordVerbLookup() { AddFuncLookup("verbintransitive", Info{ Display: "Intransitive Verb", Category: "word", - Description: "Random intransitive verb", + Description: "Verb that does not require a direct object to complete its meaning", Example: "laugh", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -107,7 +107,7 @@ func addWordVerbLookup() { AddFuncLookup("verblinking", Info{ Display: "Linking Verb", Category: "word", - Description: "Random linking verb", + Description: "Verb that Connects the subject of a sentence to a subject complement", Example: "was", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) { @@ -118,7 +118,7 @@ func addWordVerbLookup() { AddFuncLookup("verbhelping", Info{ Display: "Helping Verb", Category: "word", - Description: "Random helping verb", + Description: "Auxiliary verb that helps the main verb complete the sentence", Example: "be", Output: "string", Generate: func(r *rand.Rand, m *MapParams, info *Info) (any, error) {