mnemonic_generator/
lib.rs

1use rand::Rng;
2use thiserror::Error;
3
4/// A generator for creating memorable word combinations from predefined or custom word lists.
5///
6/// # Examples
7///
8/// ```
9/// use mnemonic_generator::MnemonicGenerator;
10///
11/// // Use the default generator
12/// let generator = MnemonicGenerator::new();
13/// let mnemonic = generator.generate().expect("Failed to generate mnemonic");
14/// println!("Generated mnemonic: {}", mnemonic);
15///
16/// // Create a generator with custom words
17/// let custom_generator = MnemonicGenerator::with_words(
18///     vec!["amazing".to_string(), "friendly".to_string(), "epic".to_string()],
19///     vec!["einstein".to_string(), "galileo".to_string()]
20/// );
21/// let custom_mnemonic = custom_generator.generate_with_separator("-")
22///     .expect("Failed to generate custom mnemonic");
23/// println!("Custom mnemonic: {}", custom_mnemonic);
24/// ```
25pub struct MnemonicGenerator {
26    left_words: Vec<String>,
27    right_words: Vec<String>,
28}
29
30/// Errors that can occur during mnemonic generation
31#[derive(Error, Debug)]
32pub enum MnemonicError {
33    #[error("No words available for generation")]
34    EmptyWordList,
35}
36
37/// Creates a new `MnemonicGenerator` with a default set of words.
38///
39/// # Examples
40///
41/// ```
42/// use mnemonic_generator::MnemonicGenerator;
43///
44/// let generator = MnemonicGenerator::new();
45/// let mnemonic = generator.generate().expect("Failed to generate mnemonic");
46/// ```
47impl MnemonicGenerator {
48    /// Create a new MnemonicGenerator with default words
49    pub fn new() -> Self {
50        Self {
51            // https://github.com/moby/moby/blob/39f7b2b6d0156811d9683c6cb0743118ae516a11/pkg/namesgenerator/names-generator.go#L21-L128
52            left_words: vec![
53                "admiring".to_string(),
54                "adoring".to_string(),
55                "affectionate".to_string(),
56                "agitated".to_string(),
57                "amazing".to_string(),
58                "angry".to_string(),
59                "awesome".to_string(),
60                "beautiful".to_string(),
61                "blissful".to_string(),
62                "bold".to_string(),
63                "boring".to_string(),
64                "brave".to_string(),
65                "busy".to_string(),
66                "charming".to_string(),
67                "clever".to_string(),
68                "cool".to_string(),
69                "compassionate".to_string(),
70                "competent".to_string(),
71                "condescending".to_string(),
72                "confident".to_string(),
73                "cranky".to_string(),
74                "crazy".to_string(),
75                "dazzling".to_string(),
76                "determined".to_string(),
77                "distracted".to_string(),
78                "dreamy".to_string(),
79                "eager".to_string(),
80                "ecstatic".to_string(),
81                "elastic".to_string(),
82                "elated".to_string(),
83                "elegant".to_string(),
84                "eloquent".to_string(),
85                "epic".to_string(),
86                "exciting".to_string(),
87                "fervent".to_string(),
88                "festive".to_string(),
89                "flamboyant".to_string(),
90                "focused".to_string(),
91                "friendly".to_string(),
92                "frosty".to_string(),
93                "funny".to_string(),
94                "gallant".to_string(),
95                "gifted".to_string(),
96                "goofy".to_string(),
97                "gracious".to_string(),
98                "great".to_string(),
99                "happy".to_string(),
100                "hardcore".to_string(),
101                "heuristic".to_string(),
102                "hopeful".to_string(),
103                "hungry".to_string(),
104                "infallible".to_string(),
105                "inspiring".to_string(),
106                "intelligent".to_string(),
107                "interesting".to_string(),
108                "jolly".to_string(),
109                "jovial".to_string(),
110                "keen".to_string(),
111                "kind".to_string(),
112                "laughing".to_string(),
113                "loving".to_string(),
114                "lucid".to_string(),
115                "magical".to_string(),
116                "mystifying".to_string(),
117                "modest".to_string(),
118                "musing".to_string(),
119                "naughty".to_string(),
120                "nervous".to_string(),
121                "nice".to_string(),
122                "nifty".to_string(),
123                "nostalgic".to_string(),
124                "objective".to_string(),
125                "optimistic".to_string(),
126                "peaceful".to_string(),
127                "pedantic".to_string(),
128                "pensive".to_string(),
129                "practical".to_string(),
130                "priceless".to_string(),
131                "quirky".to_string(),
132                "quizzical".to_string(),
133                "recursing".to_string(),
134                "relaxed".to_string(),
135                "reverent".to_string(),
136                "romantic".to_string(),
137                "sad".to_string(),
138                "serene".to_string(),
139                "sharp".to_string(),
140                "silly".to_string(),
141                "sleepy".to_string(),
142                "stoic".to_string(),
143                "strange".to_string(),
144                "stupefied".to_string(),
145                "suspicious".to_string(),
146                "sweet".to_string(),
147                "tender".to_string(),
148                "thirsty".to_string(),
149                "trusting".to_string(),
150                "unruffled".to_string(),
151                "upbeat".to_string(),
152                "vibrant".to_string(),
153                "vigilant".to_string(),
154                "vigorous".to_string(),
155                "wizardly".to_string(),
156                "wonderful".to_string(),
157                "xenodochial".to_string(),
158                "youthful".to_string(),
159                "zealous".to_string(),
160                "zen".to_string(),
161            ],
162            // https://github.com/moby/moby/blob/39f7b2b6d0156811d9683c6cb0743118ae516a11/pkg/namesgenerator/names-generator.go#L135-L845
163            right_words: vec![
164                // Maria Gaetana Agnesi - Italian mathematician, philosopher, theologian and humanitarian. She was the first woman to write a mathematics handbook and the first woman appointed as a Mathematics Professor at a University. https://en.wikipedia.org/wiki/Maria_Gaetana_Agnesi
165                "agnesi".to_string(),
166                // Muhammad ibn Jābir al-Ḥarrānī al-Battānī was a founding father of astronomy. https://en.wikipedia.org/wiki/Mu%E1%B8%A5ammad_ibn_J%C4%81bir_al-%E1%B8%A4arr%C4%81n%C4%AB_al-Batt%C4%81n%C4%AB
167                "albattani".to_string(),
168                // Frances E. Allen, became the first female IBM Fellow in 1989. In 2006, she became the first female recipient of the ACM's Turing Award. https://en.wikipedia.org/wiki/Frances_E._Allen
169                "allen".to_string(),
170                // June Almeida - Scottish virologist who took the first pictures of the rubella virus - https://en.wikipedia.org/wiki/June_Almeida
171                "almeida".to_string(),
172                // Kathleen Antonelli, American computer programmer and one of the six original programmers of the ENIAC - https://en.wikipedia.org/wiki/Kathleen_Antonelli
173                "antonelli".to_string(),
174                // Archimedes was a physicist, engineer and mathematician who invented too many things to list them here. https://en.wikipedia.org/wiki/Archimedes
175                "archimedes".to_string(),
176                // Maria Ardinghelli - Italian translator, mathematician and physicist - https://en.wikipedia.org/wiki/Maria_Ardinghelli
177                "ardinghelli".to_string(),
178                // Aryabhata - Ancient Indian mathematician-astronomer during 476-550 CE https://en.wikipedia.org/wiki/Aryabhata
179                "aryabhata".to_string(),
180                // Wanda Austin - Wanda Austin is the President and CEO of The Aerospace Corporation, a leading architect for the US security space programs. https://en.wikipedia.org/wiki/Wanda_Austin
181                "austin".to_string(),
182                // Charles Babbage invented the concept of a programmable computer. https://en.wikipedia.org/wiki/Charles_Babbage.
183                "babbage".to_string(),
184                // Stefan Banach - Polish mathematician, was one of the founders of modern functional analysis. https://en.wikipedia.org/wiki/Stefan_Banach
185                "banach".to_string(),
186                // Buckaroo Banzai and his mentor Dr. Hikita perfected the "oscillation overthruster", a device that allows one to pass through solid matter. - https://en.wikipedia.org/wiki/The_Adventures_of_Buckaroo_Banzai_Across_the_8th_Dimension
187                "banzai".to_string(),
188                // John Bardeen co-invented the transistor - https://en.wikipedia.org/wiki/John_Bardeen
189                "bardeen".to_string(),
190                // Jean Bartik, born Betty Jean Jennings, was one of the original programmers for the ENIAC computer. https://en.wikipedia.org/wiki/Jean_Bartik
191                "bartik".to_string(),
192                // Laura Bassi, the world's first female professor https://en.wikipedia.org/wiki/Laura_Bassi
193                "bassi".to_string(),
194                // Hugh Beaver, British engineer, founder of the Guinness Book of World Records https://en.wikipedia.org/wiki/Hugh_Beaver
195                "beaver".to_string(),
196                // Alexander Graham Bell - an eminent Scottish-born scientist, inventor, engineer and innovator who is credited with inventing the first practical telephone - https://en.wikipedia.org/wiki/Alexander_Graham_Bell
197                "bell".to_string(),
198                // Karl Friedrich Benz - a German automobile engineer. Inventor of the first practical motorcar. https://en.wikipedia.org/wiki/Karl_Benz
199                "benz".to_string(),
200                // Homi J Bhabha - was an Indian nuclear physicist, founding director, and professor of physics at the Tata Institute of Fundamental Research. Colloquially known as "father of Indian nuclear programme"- https://en.wikipedia.org/wiki/Homi_J._Bhabha
201                "bhabha".to_string(),
202                // Bhaskara II - Ancient Indian mathematician-astronomer whose work on calculus predates Newton and Leibniz by over half a millennium - https://en.wikipedia.org/wiki/Bh%C4%81skara_II#Calculus
203                "bhaskara".to_string(),
204                // Sue Black - British computer scientist and campaigner. She has been instrumental in saving Bletchley Park, the site of World War II codebreaking - https://en.wikipedia.org/wiki/Sue_Black_(computer_scientist)
205                "black".to_string(),
206                // Elizabeth Helen Blackburn - Australian-American Nobel laureate; best known for co-discovering telomerase. https://en.wikipedia.org/wiki/Elizabeth_Blackburn
207                "blackburn".to_string(),
208                // Elizabeth Blackwell - American doctor and first American woman to receive a medical degree - https://en.wikipedia.org/wiki/Elizabeth_Blackwell
209                "blackwell".to_string(),
210                // Niels Bohr is the father of quantum theory. https://en.wikipedia.org/wiki/Niels_Bohr.
211                "bohr".to_string(),
212                // Kathleen Booth, she's credited with writing the first assembly language. https://en.wikipedia.org/wiki/Kathleen_Booth
213                "booth".to_string(),
214                // Anita Borg - Anita Borg was the founding director of the Institute for Women and Technology (IWT). https://en.wikipedia.org/wiki/Anita_Borg
215                "borg".to_string(),
216                // Satyendra Nath Bose - He provided the foundation for Bose–Einstein statistics and the theory of the Bose–Einstein condensate. - https://en.wikipedia.org/wiki/Satyendra_Nath_Bose
217                "bose".to_string(),
218                // Katherine Louise Bouman is an imaging scientist and Assistant Professor of Computer Science at the California Institute of Technology. She researches computational methods for imaging, and developed an algorithm that made possible the picture first visualization of a black hole using the Event Horizon Telescope. - https://en.wikipedia.org/wiki/Katie_Bouman
219                "bouman".to_string(),
220                // Evelyn Boyd Granville - She was one of the first African-American woman to receive a Ph.D. in mathematics; she earned it in 1949 from Yale University. https://en.wikipedia.org/wiki/Evelyn_Boyd_Granville
221                "boyd".to_string(),
222                // Brahmagupta - Ancient Indian mathematician during 598-670 CE who gave rules to compute with zero - https://en.wikipedia.org/wiki/Brahmagupta#Zero
223                "brahmagupta".to_string(),
224                // Walter Houser Brattain co-invented the transistor - https://en.wikipedia.org/wiki/Walter_Houser_Brattain
225                "brattain".to_string(),
226                // Emmett Brown invented time travel. https://en.wikipedia.org/wiki/Emmett_Brown (thanks Brian Goff)
227                "brown".to_string(),
228                // Linda Brown Buck - American biologist and Nobel laureate best known for her genetic and molecular analyses of the mechanisms of smell. https://en.wikipedia.org/wiki/Linda_B._Buck
229                "buck".to_string(),
230                // Dame Susan Jocelyn Bell Burnell - Northern Irish astrophysicist who discovered radio pulsars and was the first to analyse them. https://en.wikipedia.org/wiki/Jocelyn_Bell_Burnell
231                "burnell".to_string(),
232                // Annie Jump Cannon - pioneering female astronomer who classified hundreds of thousands of stars and created the system we use to understand stars today. https://en.wikipedia.org/wiki/Annie_Jump_Cannon
233                "cannon".to_string(),
234                // Rachel Carson - American marine biologist and conservationist, her book Silent Spring and other writings are credited with advancing the global environmental movement. https://en.wikipedia.org/wiki/Rachel_Carson
235                "carson".to_string(),
236                // Dame Mary Lucy Cartwright - British mathematician who was one of the first to study what is now known as chaos theory. Also known for Cartwright's theorem which finds applications in signal processing. https://en.wikipedia.org/wiki/Mary_Cartwright
237                "cartwright".to_string(),
238                // George Washington Carver - American agricultural scientist and inventor. He was the most prominent black scientist of the early 20th century. https://en.wikipedia.org/wiki/George_Washington_Carver
239                "carver".to_string(),
240                // Vinton Gray Cerf - American Internet pioneer, recognised as one of "the fathers of the Internet". With Robert Elliot Kahn, he designed TCP and IP, the primary data communication protocols of the Internet and other computer networks. https://en.wikipedia.org/wiki/Vint_Cerf
241                "cerf".to_string(),
242                // Subrahmanyan Chandrasekhar - Astrophysicist known for his mathematical theory on different stages and evolution in structures of the stars. He has won nobel prize for physics - https://en.wikipedia.org/wiki/Subrahmanyan_Chandrasekhar
243                "chandrasekhar".to_string(),
244                // Sergey Alexeyevich Chaplygin (Russian: Серге́й Алексе́евич Чаплы́гин; April 5, 1869 – October 8, 1942) was a Russian and Soviet physicist, mathematician, and mechanical engineer. He is known for mathematical formulas such as Chaplygin's equation and for a hypothetical substance in cosmology called Chaplygin gas, named after him. https://en.wikipedia.org/wiki/Sergey_Chaplygin
245                "chaplygin".to_string(),
246                // Émilie du Châtelet - French natural philosopher, mathematician, physicist, and author during the early 1730s, known for her translation of and commentary on Isaac Newton's book Principia containing basic laws of physics. https://en.wikipedia.org/wiki/%C3%89milie_du_Ch%C3%A2telet
247                "chatelet".to_string(),
248                // Asima Chatterjee was an Indian organic chemist noted for her research on vinca alkaloids, development of drugs for treatment of epilepsy and malaria - https://en.wikipedia.org/wiki/Asima_Chatterjee
249                "chatterjee".to_string(),
250                // David Lee Chaum - American computer scientist and cryptographer. Known for his seminal contributions in the field of anonymous communication. https://en.wikipedia.org/wiki/David_Chaum
251                "chaum".to_string(),
252                // Pafnuty Chebyshev - Russian mathematician. He is known fo his works on probability, statistics, mechanics, analytical geometry and number theory https://en.wikipedia.org/wiki/Pafnuty_Chebyshev
253                "chebyshev".to_string(),
254                // Joan Clarke - Bletchley Park code breaker during the Second World War who pioneered techniques that remained top secret for decades. Also an accomplished numismatist https://en.wikipedia.org/wiki/Joan_Clarke
255                "clarke".to_string(),
256                // Bram Cohen - American computer programmer and author of the BitTorrent peer-to-peer protocol. https://en.wikipedia.org/wiki/Bram_Cohen
257                "cohen".to_string(),
258                // Jane Colden - American botanist widely considered the first female American botanist - https://en.wikipedia.org/wiki/Jane_Colden
259                "colden".to_string(),
260                // Gerty Theresa Cori - American biochemist who became the third woman—and first American woman—to win a Nobel Prize in science, and the first woman to be awarded the Nobel Prize in Physiology or Medicine. Cori was born in Prague. https://en.wikipedia.org/wiki/Gerty_Cori
261                "cori".to_string(),
262                // Seymour Roger Cray was an American electrical engineer and supercomputer architect who designed a series of computers that were the fastest in the world for decades. https://en.wikipedia.org/wiki/Seymour_Cray
263                "cray".to_string(),
264                // This entry reflects a husband and wife team who worked together:
265                // Joan Curran was a Welsh scientist who developed radar and invented chaff, a radar countermeasure. https://en.wikipedia.org/wiki/Joan_Curran
266                // Samuel Curran was an Irish physicist who worked alongside his wife during WWII and invented the proximity fuse. https://en.wikipedia.org/wiki/Samuel_Curran
267                "curran".to_string(),
268                // Marie Curie discovered radioactivity. https://en.wikipedia.org/wiki/Marie_Curie.
269                "curie".to_string(),
270                // Charles Darwin established the principles of natural evolution. https://en.wikipedia.org/wiki/Charles_Darwin.
271                "darwin".to_string(),
272                // Leonardo Da Vinci invented too many things to list here. https://en.wikipedia.org/wiki/Leonardo_da_Vinci.
273                "davinci".to_string(),
274                // A. K. (Alexander Keewatin) Dewdney, Canadian mathematician, computer scientist, author and filmmaker. Contributor to Scientific American's "Computer Recreations" from 1984 to 1991. Author of Core War (program), The Planiverse, The Armchair Universe, The Magic Machine, The New Turing Omnibus, and more. https://en.wikipedia.org/wiki/Alexander_Dewdney
275                "dewdney".to_string(),
276                // Satish Dhawan - Indian mathematician and aerospace engineer, known for leading the successful and indigenous development of the Indian space programme. https://en.wikipedia.org/wiki/Satish_Dhawan
277                "dhawan".to_string(),
278                // Bailey Whitfield Diffie - American cryptographer and one of the pioneers of public-key cryptography. https://en.wikipedia.org/wiki/Whitfield_Diffie
279                "diffie".to_string(),
280                // Edsger Wybe Dijkstra was a Dutch computer scientist and mathematical scientist. https://en.wikipedia.org/wiki/Edsger_W._Dijkstra.
281                "dijkstra".to_string(),
282                // Paul Adrien Maurice Dirac - English theoretical physicist who made fundamental contributions to the early development of both quantum mechanics and quantum electrodynamics. https://en.wikipedia.org/wiki/Paul_Dirac
283                "dirac".to_string(),
284                // Agnes Meyer Driscoll - American cryptanalyst during World Wars I and II who successfully cryptanalysed a number of Japanese ciphers. She was also the co-developer of one of the cipher machines of the US Navy, the CM. https://en.wikipedia.org/wiki/Agnes_Meyer_Driscoll
285                "driscoll".to_string(),
286                // Donna Dubinsky - played an integral role in the development of personal digital assistants (PDAs) serving as CEO of Palm, Inc. and co-founding Handspring. https://en.wikipedia.org/wiki/Donna_Dubinsky
287                "dubinsky".to_string(),
288                // Annie Easley - She was a leading member of the team which developed software for the Centaur rocket stage and one of the first African-Americans in her field. https://en.wikipedia.org/wiki/Annie_Easley
289                "easley".to_string(),
290                // Thomas Alva Edison, prolific inventor https://en.wikipedia.org/wiki/Thomas_Edison
291                "edison".to_string(),
292                // Albert Einstein invented the general theory of relativity. https://en.wikipedia.org/wiki/Albert_Einstein
293                "einstein".to_string(),
294                // Alexandra Asanovna Elbakyan (Russian: Алекса́ндра Аса́новна Элбакя́н) is a Kazakhstani graduate student, computer programmer, internet pirate in hiding, and the creator of the site Sci-Hub. Nature has listed her in 2016 in the top ten people that mattered in science, and Ars Technica has compared her to Aaron Swartz. - https://en.wikipedia.org/wiki/Alexandra_Elbakyan
295                "elbakyan".to_string(),
296                // Taher A. ElGamal - Egyptian cryptographer best known for the ElGamal discrete log cryptosystem and the ElGamal digital signature scheme. https://en.wikipedia.org/wiki/Taher_Elgamal
297                "elgamal".to_string(),
298                // Gertrude Elion - American biochemist, pharmacologist and the 1988 recipient of the Nobel Prize in Medicine - https://en.wikipedia.org/wiki/Gertrude_Elion
299                "elion".to_string(),
300                // James Henry Ellis - British engineer and cryptographer employed by the GCHQ. Best known for conceiving for the first time, the idea of public-key cryptography. https://en.wikipedia.org/wiki/James_H._Ellis
301                "ellis".to_string(),
302                // Douglas Engelbart gave the mother of all demos: https://en.wikipedia.org/wiki/Douglas_Engelbart
303                "engelbart".to_string(),
304                // Euclid invented geometry. https://en.wikipedia.org/wiki/Euclid
305                "euclid".to_string(),
306                // Leonhard Euler invented large parts of modern mathematics. https://de.wikipedia.org/wiki/Leonhard_Euler
307                "euler".to_string(),
308                // Michael Faraday - British scientist who contributed to the study of electromagnetism and electrochemistry. https://en.wikipedia.org/wiki/Michael_Faraday
309                "faraday".to_string(),
310                // Horst Feistel - German-born American cryptographer who was one of the earliest non-government researchers to study the design and theory of block ciphers. Co-developer of DES and Lucifer. Feistel networks, a symmetric structure used in the construction of block ciphers are named after him. https://en.wikipedia.org/wiki/Horst_Feistel
311                "feistel".to_string(),
312                // Pierre de Fermat pioneered several aspects of modern mathematics. https://en.wikipedia.org/wiki/Pierre_de_Fermat
313                "fermat".to_string(),
314                // Enrico Fermi invented the first nuclear reactor. https://en.wikipedia.org/wiki/Enrico_Fermi.
315                "fermi".to_string(),
316                // Richard Feynman was a key contributor to quantum mechanics and particle physics. https://en.wikipedia.org/wiki/Richard_Feynman
317                "feynman".to_string(),
318                // Benjamin Franklin is famous for his experiments in electricity and the invention of the lightning rod.
319                "franklin".to_string(),
320                // Yuri Alekseyevich Gagarin - Soviet pilot and cosmonaut, best known as the first human to journey into outer space. https://en.wikipedia.org/wiki/Yuri_Gagarin
321                "gagarin".to_string(),
322                // Galileo was a founding father of modern astronomy, and faced politics and obscurantism to establish scientific truth.  https://en.wikipedia.org/wiki/Galileo_Galilei
323                "galileo".to_string(),
324                // Évariste Galois - French mathematician whose work laid the foundations of Galois theory and group theory, two major branches of abstract algebra, and the subfield of Galois connections, all while still in his late teens. https://en.wikipedia.org/wiki/%C3%89variste_Galois
325                "galois".to_string(),
326                // Kadambini Ganguly - Indian physician, known for being the first South Asian female physician, trained in western medicine, to graduate in South Asia. https://en.wikipedia.org/wiki/Kadambini_Ganguly
327                "ganguly".to_string(),
328                // William Henry "Bill" Gates III is an American business magnate, philanthropist, investor, computer programmer, and inventor. https://en.wikipedia.org/wiki/Bill_Gates
329                "gates".to_string(),
330                // Johann Carl Friedrich Gauss - German mathematician who made significant contributions to many fields, including number theory, algebra, statistics, analysis, differential geometry, geodesy, geophysics, mechanics, electrostatics, magnetic fields, astronomy, matrix theory, and optics. https://en.wikipedia.org/wiki/Carl_Friedrich_Gauss
331                "gauss".to_string(),
332                // Marie-Sophie Germain - French mathematician, physicist and philosopher. Known for her work on elasticity theory, number theory and philosophy. https://en.wikipedia.org/wiki/Sophie_Germain
333                "germain".to_string(),
334                // Adele Goldberg, was one of the designers and developers of the Smalltalk language. https://en.wikipedia.org/wiki/Adele_Goldberg_(computer_scientist)
335                "goldberg".to_string(),
336                // Adele Goldstine, born Adele Katz, wrote the complete technical description for the first electronic digital computer, ENIAC. https://en.wikipedia.org/wiki/Adele_Goldstine
337                "goldstine".to_string(),
338                // Shafi Goldwasser is a computer scientist known for creating theoretical foundations of modern cryptography. Winner of 2012 ACM Turing Award. https://en.wikipedia.org/wiki/Shafi_Goldwasser
339                "goldwasser".to_string(),
340                // James Golick, all around gangster.
341                "golick".to_string(),
342                // Jane Goodall - British primatologist, ethologist, and anthropologist who is considered to be the world's foremost expert on chimpanzees - https://en.wikipedia.org/wiki/Jane_Goodall
343                "goodall".to_string(),
344                // Stephen Jay Gould was was an American paleontologist, evolutionary biologist, and historian of science. He is most famous for the theory of punctuated equilibrium - https://en.wikipedia.org/wiki/Stephen_Jay_Gould
345                "gould".to_string(),
346                // Carolyn Widney Greider - American molecular biologist and joint winner of the 2009 Nobel Prize for Physiology or Medicine for the discovery of telomerase. https://en.wikipedia.org/wiki/Carol_W._Greider
347                "greider".to_string(),
348                // Alexander Grothendieck - German-born French mathematician who became a leading figure in the creation of modern algebraic geometry. https://en.wikipedia.org/wiki/Alexander_Grothendieck
349                "grothendieck".to_string(),
350                // Lois Haibt - American computer scientist, part of the team at IBM that developed FORTRAN - https://en.wikipedia.org/wiki/Lois_Haibt
351                "haibt".to_string(),
352                // Margaret Hamilton - Director of the Software Engineering Division of the MIT Instrumentation Laboratory, which developed on-board flight software for the Apollo space program. https://en.wikipedia.org/wiki/Margaret_Hamilton_(scientist)
353                "hamilton".to_string(),
354                // Caroline Harriet Haslett - English electrical engineer, electricity industry administrator and champion of women's rights. Co-author of British Standard 1363 that specifies AC power plugs and sockets used across the United Kingdom (which is widely considered as one of the safest designs). https://en.wikipedia.org/wiki/Caroline_Haslett
355                "haslett".to_string(),
356                // Stephen Hawking pioneered the field of cosmology by combining general relativity and quantum mechanics. https://en.wikipedia.org/wiki/Stephen_Hawking
357                "hawking".to_string(),
358                // Martin Edward Hellman - American cryptologist, best known for his invention of public-key cryptography in co-operation with Whitfield Diffie and Ralph Merkle. https://en.wikipedia.org/wiki/Martin_Hellman
359                "hellman".to_string(),
360                // Werner Heisenberg was a founding father of quantum mechanics. https://en.wikipedia.org/wiki/Werner_Heisenberg
361                "heisenberg".to_string(),
362                // Grete Hermann was a German philosopher noted for her philosophical work on the foundations of quantum mechanics. https://en.wikipedia.org/wiki/Grete_Hermann
363                "hermann".to_string(),
364                // Caroline Lucretia Herschel - German astronomer and discoverer of several comets. https://en.wikipedia.org/wiki/Caroline_Herschel
365                "herschel".to_string(),
366                // Heinrich Rudolf Hertz - German physicist who first conclusively proved the existence of the electromagnetic waves. https://en.wikipedia.org/wiki/Heinrich_Hertz
367                "hertz".to_string(),
368                // Jaroslav Heyrovský was the inventor of the polarographic method, father of the electroanalytical method, and recipient of the Nobel Prize in 1959. His main field of work was polarography. https://en.wikipedia.org/wiki/Jaroslav_Heyrovsk%C3%BD
369                "heyrovsky".to_string(),
370                // Dorothy Hodgkin was a British biochemist, credited with the development of protein crystallography. She was awarded the Nobel Prize in Chemistry in 1964. https://en.wikipedia.org/wiki/Dorothy_Hodgkin
371                "hodgkin".to_string(),
372                // Douglas R. Hofstadter is an American professor of cognitive science and author of the Pulitzer Prize and American Book Award-winning work Goedel, Escher, Bach: An Eternal Golden Braid in 1979. A mind-bending work which coined Hofstadter's Law: "It always takes longer than you expect, even when you take into account Hofstadter's Law." https://en.wikipedia.org/wiki/Douglas_Hofstadter
373                "hofstadter".to_string(),
374                // Erna Schneider Hoover revolutionized modern communication by inventing a computerized telephone switching method. https://en.wikipedia.org/wiki/Erna_Schneider_Hoover
375                "hoover".to_string(),
376                // Grace Hopper developed the first compiler for a computer programming language and  is credited with popularizing the term "debugging" for fixing computer glitches. https://en.wikipedia.org/wiki/Grace_Hopper
377                "hopper".to_string(),
378                // Frances Hugle, she was an American scientist, engineer, and inventor who contributed to the understanding of semiconductors, integrated circuitry, and the unique electrical principles of microscopic materials. https://en.wikipedia.org/wiki/Frances_Hugle
379                "hugle".to_string(),
380                // Hypatia - Greek Alexandrine Neoplatonist philosopher in Egypt who was one of the earliest mothers of mathematics - https://en.wikipedia.org/wiki/Hypatia
381                "hypatia".to_string(),
382                // Teruko Ishizaka - Japanese scientist and immunologist who co-discovered the antibody class Immunoglobulin E. https://en.wikipedia.org/wiki/Teruko_Ishizaka
383                "ishizaka".to_string(),
384                // Mary Jackson, American mathematician and aerospace engineer who earned the highest title within NASA's engineering department - https://en.wikipedia.org/wiki/Mary_Jackson_(engineer)
385                "jackson".to_string(),
386                // Yeong-Sil Jang was a Korean scientist and astronomer during the Joseon Dynasty; he invented the first metal printing press and water gauge. https://en.wikipedia.org/wiki/Jang_Yeong-sil
387                "jang".to_string(),
388                // Mae Carol Jemison -  is an American engineer, physician, and former NASA astronaut. She became the first black woman to travel in space when she served as a mission specialist aboard the Space Shuttle Endeavour - https://en.wikipedia.org/wiki/Mae_Jemison
389                "jemison".to_string(),
390                // Betty Jennings - one of the original programmers of the ENIAC. https://en.wikipedia.org/wiki/ENIAC - https://en.wikipedia.org/wiki/Jean_Bartik
391                "jennings".to_string(),
392                // Mary Lou Jepsen, was the founder and chief technology officer of One Laptop Per Child (OLPC), and the founder of Pixel Qi. https://en.wikipedia.org/wiki/Mary_Lou_Jepsen
393                "jepsen".to_string(),
394                // Katherine Coleman Goble Johnson - American physicist and mathematician contributed to the NASA. https://en.wikipedia.org/wiki/Katherine_Johnson
395                "johnson".to_string(),
396                // Irène Joliot-Curie - French scientist who was awarded the Nobel Prize for Chemistry in 1935. Daughter of Marie and Pierre Curie. https://en.wikipedia.org/wiki/Ir%C3%A8ne_Joliot-Curie
397                "joliot".to_string(),
398                // Karen Spärck Jones came up with the concept of inverse document frequency, which is used in most search engines today. https://en.wikipedia.org/wiki/Karen_Sp%C3%A4rck_Jones
399                "jones".to_string(),
400                // A. P. J. Abdul Kalam - is an Indian scientist aka Missile Man of India for his work on the development of ballistic missile and launch vehicle technology - https://en.wikipedia.org/wiki/A._P._J._Abdul_Kalam
401                "kalam".to_string(),
402                // Sergey Petrovich Kapitsa (Russian: Серге́й Петро́вич Капи́ца; 14 February 1928 – 14 August 2012) was a Russian physicist and demographer. He was best known as host of the popular and long-running Russian scientific TV show, Evident, but Incredible. His father was the Nobel laureate Soviet-era physicist Pyotr Kapitsa, and his brother was the geographer and Antarctic explorer Andrey Kapitsa. - https://en.wikipedia.org/wiki/Sergey_Kapitsa
403                "kapitsa".to_string(),
404                // Susan Kare, created the icons and many of the interface elements for the original Apple Macintosh in the 1980s, and was an original employee of NeXT, working as the Creative Director. https://en.wikipedia.org/wiki/Susan_Kare
405                "kare".to_string(),
406                // Mstislav Keldysh - a Soviet scientist in the field of mathematics and mechanics, academician of the USSR Academy of Sciences (1946), President of the USSR Academy of Sciences (1961–1975), three times Hero of Socialist Labor (1956, 1961, 1971), fellow of the Royal Society of Edinburgh (1968). https://en.wikipedia.org/wiki/Mstislav_Keldysh
407                "keldysh".to_string(),
408                // Mary Kenneth Keller, Sister Mary Kenneth Keller became the first American woman to earn a PhD in Computer Science in 1965. https://en.wikipedia.org/wiki/Mary_Kenneth_Keller
409                "keller".to_string(),
410                // Johannes Kepler, German astronomer known for his three laws of planetary motion - https://en.wikipedia.org/wiki/Johannes_Kepler
411                "kepler".to_string(),
412                // Omar Khayyam - Persian mathematician, astronomer and poet. Known for his work on the classification and solution of cubic equations, for his contribution to the understanding of Euclid's fifth postulate and for computing the length of a year very accurately. https://en.wikipedia.org/wiki/Omar_Khayyam
413                "khayyam".to_string(),
414                // Har Gobind Khorana - Indian-American biochemist who shared the 1968 Nobel Prize for Physiology - https://en.wikipedia.org/wiki/Har_Gobind_Khorana
415                "khorana".to_string(),
416                // Jack Kilby invented silicon integrated circuits and gave Silicon Valley its name. - https://en.wikipedia.org/wiki/Jack_Kilby
417                "kilby".to_string(),
418                // Maria Kirch - German astronomer and first woman to discover a comet - https://en.wikipedia.org/wiki/Maria_Margarethe_Kirch
419                "kirch".to_string(),
420                // Donald Knuth - American computer scientist, author of "The Art of Computer Programming" and creator of the TeX typesetting system. https://en.wikipedia.org/wiki/Donald_Knuth
421                "knuth".to_string(),
422                // Sophie Kowalevski - Russian mathematician responsible for important original contributions to analysis, differential equations and mechanics - https://en.wikipedia.org/wiki/Sofia_Kovalevskaya
423                "kowalevski".to_string(),
424                // Marie-Jeanne de Lalande - French astronomer, mathematician and cataloguer of stars - https://en.wikipedia.org/wiki/Marie-Jeanne_de_Lalande
425                "lalande".to_string(),
426                // Hedy Lamarr - Actress and inventor. The principles of her work are now incorporated into modern Wi-Fi, CDMA and Bluetooth technology. https://en.wikipedia.org/wiki/Hedy_Lamarr
427                "lamarr".to_string(),
428                // Leslie B. Lamport - American computer scientist. Lamport is best known for his seminal work in distributed systems and was the winner of the 2013 Turing Award. https://en.wikipedia.org/wiki/Leslie_Lamport
429                "lamport".to_string(),
430                // Mary Leakey - British paleoanthropologist who discovered the first fossilized Proconsul skull - https://en.wikipedia.org/wiki/Mary_Leakey
431                "leakey".to_string(),
432                // Henrietta Swan Leavitt - she was an American astronomer who discovered the relation between the luminosity and the period of Cepheid variable stars. https://en.wikipedia.org/wiki/Henrietta_Swan_Leavitt
433                "leavitt".to_string(),
434                // Esther Miriam Zimmer Lederberg - American microbiologist and a pioneer of bacterial genetics. https://en.wikipedia.org/wiki/Esther_Lederberg
435                "lederberg".to_string(),
436                // Inge Lehmann - Danish seismologist and geophysicist. Known for discovering in 1936 that the Earth has a solid inner core inside a molten outer core. https://en.wikipedia.org/wiki/Inge_Lehmann
437                "lehmann".to_string(),
438                // Daniel Lewin - Mathematician, Akamai co-founder, soldier, 9/11 victim-- Developed optimization techniques for routing traffic on the internet. Died attempting to stop the 9-11 hijackers. https://en.wikipedia.org/wiki/Daniel_Lewin
439                "lewin".to_string(),
440                // Ruth Lichterman - one of the original programmers of the ENIAC. https://en.wikipedia.org/wiki/ENIAC - https://en.wikipedia.org/wiki/Ruth_Teitelbaum
441                "lichterman".to_string(),
442                // Barbara Liskov - co-developed the Liskov substitution principle. Liskov was also the winner of the Turing Prize in 2008. - https://en.wikipedia.org/wiki/Barbara_Liskov
443                "liskov".to_string(),
444                // Ada Lovelace invented the first algorithm. https://en.wikipedia.org/wiki/Ada_Lovelace (thanks James Turnbull)
445                "lovelace".to_string(),
446                // Auguste and Louis Lumière - the first filmmakers in history - https://en.wikipedia.org/wiki/Auguste_and_Louis_Lumi%C3%A8re
447                "lumiere".to_string(),
448                // Mahavira - Ancient Indian mathematician during 9th century AD who discovered basic algebraic identities - https://en.wikipedia.org/wiki/Mah%C4%81v%C4%ABra_(mathematician)
449                "mahavira".to_string(),
450                // Lynn Margulis (b. Lynn Petra Alexander) - an American evolutionary theorist and biologist, science author, educator, and popularizer, and was the primary modern proponent for the significance of symbiosis in evolution. - https://en.wikipedia.org/wiki/Lynn_Margulis
451                "margulis".to_string(),
452                // Yukihiro Matsumoto - Japanese computer scientist and software programmer best known as the chief designer of the Ruby programming language. https://en.wikipedia.org/wiki/Yukihiro_Matsumoto
453                "matsumoto".to_string(),
454                // James Clerk Maxwell - Scottish physicist, best known for his formulation of electromagnetic theory. https://en.wikipedia.org/wiki/James_Clerk_Maxwell
455                "maxwell".to_string(),
456                // Maria Mayer - American theoretical physicist and Nobel laureate in Physics for proposing the nuclear shell model of the atomic nucleus - https://en.wikipedia.org/wiki/Maria_Mayer
457                "mayer".to_string(),
458                // John McCarthy invented LISP: https://en.wikipedia.org/wiki/John_McCarthy_(computer_scientist)
459                "mccarthy".to_string(),
460                // Barbara McClintock - a distinguished American cytogeneticist, 1983 Nobel Laureate in Physiology or Medicine for discovering transposons. https://en.wikipedia.org/wiki/Barbara_McClintock
461                "mcclintock".to_string(),
462                // Anne Laura Dorinthea McLaren - British developmental biologist whose work helped lead to human in-vitro fertilisation. https://en.wikipedia.org/wiki/Anne_McLaren
463                "mclaren".to_string(),
464                // Malcolm McLean invented the modern shipping container: https://en.wikipedia.org/wiki/Malcom_McLean
465                "mclean".to_string(),
466                // Kay McNulty - one of the original programmers of the ENIAC. https://en.wikipedia.org/wiki/ENIAC - https://en.wikipedia.org/wiki/Kathleen_Antonelli
467                "mcnulty".to_string(),
468                // Gregor Johann Mendel - Czech scientist and founder of genetics. https://en.wikipedia.org/wiki/Gregor_Mendel
469                "mendel".to_string(),
470                // Dmitri Mendeleev - a chemist and inventor. He formulated the Periodic Law, created a farsighted version of the periodic table of elements, and used it to correct the properties of some already discovered elements and also to predict the properties of eight elements yet to be discovered. https://en.wikipedia.org/wiki/Dmitri_Mendeleev
471                "mendeleev".to_string(),
472                // Lise Meitner - Austrian/Swedish physicist who was involved in the discovery of nuclear fission. The element meitnerium is named after her - https://en.wikipedia.org/wiki/Lise_Meitner
473                "meitner".to_string(),
474                // Carla Meninsky, was the game designer and programmer for Atari 2600 games Dodge 'Em and Warlords. https://en.wikipedia.org/wiki/Carla_Meninsky
475                "meninsky".to_string(),
476                // Ralph C. Merkle - American computer scientist, known for devising Merkle's puzzles - one of the very first schemes for public-key cryptography. Also, inventor of Merkle trees and co-inventor of the Merkle-Damgård construction for building collision-resistant cryptographic hash functions and the Merkle-Hellman knapsack cryptosystem. https://en.wikipedia.org/wiki/Ralph_Merkle
477                "merkle".to_string(),
478                // Johanna Mestorf - German prehistoric archaeologist and first female museum director in Germany - https://en.wikipedia.org/wiki/Johanna_Mestorf
479                "mestorf".to_string(),
480                // Maryam Mirzakhani - an Iranian mathematician and the first woman to win the Fields Medal. https://en.wikipedia.org/wiki/Maryam_Mirzakhani
481                "mirzakhani".to_string(),
482                // Rita Levi-Montalcini - Won Nobel Prize in Physiology or Medicine jointly with colleague Stanley Cohen for the discovery of nerve growth factor (https://en.wikipedia.org/wiki/Rita_Levi-Montalcini)
483                "montalcini".to_string(),
484                // Gordon Earle Moore - American engineer, Silicon Valley founding father, author of Moore's law. https://en.wikipedia.org/wiki/Gordon_Moore
485                "moore".to_string(),
486                // Samuel Morse - contributed to the invention of a single-wire telegraph system based on European telegraphs and was a co-developer of the Morse code - https://en.wikipedia.org/wiki/Samuel_Morse
487                "morse".to_string(),
488                // Ian Murdock - founder of the Debian project - https://en.wikipedia.org/wiki/Ian_Murdock
489                "murdock".to_string(),
490                // May-Britt Moser - Nobel prize winner neuroscientist who contributed to the discovery of grid cells in the brain. https://en.wikipedia.org/wiki/May-Britt_Moser
491                "moser".to_string(),
492                // John Napier of Merchiston - Scottish landowner known as an astronomer, mathematician and physicist. Best known for his discovery of logarithms. https://en.wikipedia.org/wiki/John_Napier
493                "napier".to_string(),
494                // John Forbes Nash, Jr. - American mathematician who made fundamental contributions to game theory, differential geometry, and the study of partial differential equations. https://en.wikipedia.org/wiki/John_Forbes_Nash_Jr.
495                "nash".to_string(),
496                // John von Neumann - todays computer architectures are based on the von Neumann architecture. https://en.wikipedia.org/wiki/Von_Neumann_architecture
497                "neumann".to_string(),
498                // Isaac Newton invented classic mechanics and modern optics. https://en.wikipedia.org/wiki/Isaac_Newton
499                "newton".to_string(),
500                // Florence Nightingale, more prominently known as a nurse, was also the first female member of the Royal Statistical Society and a pioneer in statistical graphics https://en.wikipedia.org/wiki/Florence_Nightingale#Statistics_and_sanitary_reform
501                "nightingale".to_string(),
502                // Alfred Nobel - a Swedish chemist, engineer, innovator, and armaments manufacturer (inventor of dynamite) - https://en.wikipedia.org/wiki/Alfred_Nobel
503                "nobel".to_string(),
504                // Emmy Noether, German mathematician. Noether's Theorem is named after her. https://en.wikipedia.org/wiki/Emmy_Noether
505                "noether".to_string(),
506                // Poppy Northcutt. Poppy Northcutt was the first woman to work as part of NASA’s Mission Control. http://www.businessinsider.com/poppy-northcutt-helped-apollo-astronauts-2014-12?op=1
507                "northcutt".to_string(),
508                // Robert Noyce invented silicon integrated circuits and gave Silicon Valley its name. - https://en.wikipedia.org/wiki/Robert_Noyce
509                "noyce".to_string(),
510                // Panini - Ancient Indian linguist and grammarian from 4th century CE who worked on the world's first formal system - https://en.wikipedia.org/wiki/P%C4%81%E1%B9%87ini#Comparison_with_modern_formal_systems
511                "panini".to_string(),
512                // Ambroise Pare invented modern surgery. https://en.wikipedia.org/wiki/Ambroise_Par%C3%A9
513                "pare".to_string(),
514                // Blaise Pascal, French mathematician, physicist, and inventor - https://en.wikipedia.org/wiki/Blaise_Pascal
515                "pascal".to_string(),
516                // Louis Pasteur discovered vaccination, fermentation and pasteurization. https://en.wikipedia.org/wiki/Louis_Pasteur.
517                "pasteur".to_string(),
518                // Cecilia Payne-Gaposchkin was an astronomer and astrophysicist who, in 1925, proposed in her Ph.D. thesis an explanation for the composition of stars in terms of the relative abundances of hydrogen and helium. https://en.wikipedia.org/wiki/Cecilia_Payne-Gaposchkin
519                "payne".to_string(),
520                // Radia Perlman is a software designer and network engineer and most famous for her invention of the spanning-tree protocol (STP). https://en.wikipedia.org/wiki/Radia_Perlman
521                "perlman".to_string(),
522                // Rob Pike was a key contributor to Unix, Plan 9, the X graphic system, utf-8, and the Go programming language. https://en.wikipedia.org/wiki/Rob_Pike
523                "pike".to_string(),
524                // Henri Poincaré made fundamental contributions in several fields of mathematics. https://en.wikipedia.org/wiki/Henri_Poincar%C3%A9
525                "poincare".to_string(),
526                // Laura Poitras is a director and producer whose work, made possible by open source crypto tools, advances the causes of truth and freedom of information by reporting disclosures by whistleblowers such as Edward Snowden. https://en.wikipedia.org/wiki/Laura_Poitras
527                "poitras".to_string(),
528                // Tat’yana Avenirovna Proskuriakova (Russian: Татья́на Авени́ровна Проскуряко́ва) (January 23 [O.S. January 10] 1909 – August 30, 1985) was a Russian-American Mayanist scholar and archaeologist who contributed significantly to the deciphering of Maya hieroglyphs, the writing system of the pre-Columbian Maya civilization of Mesoamerica. https://en.wikipedia.org/wiki/Tatiana_Proskouriakoff
529                "proskuriakova".to_string(),
530                // Claudius Ptolemy - a Greco-Egyptian writer of Alexandria, known as a mathematician, astronomer, geographer, astrologer, and poet of a single epigram in the Greek Anthology - https://en.wikipedia.org/wiki/Ptolemy
531                "ptolemy".to_string(),
532                // C. V. Raman - Indian physicist who won the Nobel Prize in 1930 for proposing the Raman effect. - https://en.wikipedia.org/wiki/C._V._Raman
533                "raman".to_string(),
534                // Srinivasa Ramanujan - Indian mathematician and autodidact who made extraordinary contributions to mathematical analysis, number theory, infinite series, and continued fractions. - https://en.wikipedia.org/wiki/Srinivasa_Ramanujan
535                "ramanujan".to_string(),
536                // Sally Kristen Ride was an American physicist and astronaut. She was the first American woman in space, and the youngest American astronaut. https://en.wikipedia.org/wiki/Sally_Ride
537                "ride".to_string(),
538                // Dennis Ritchie - co-creator of UNIX and the C programming language. - https://en.wikipedia.org/wiki/Dennis_Ritchie
539                "ritchie".to_string(),
540                // Ida Rhodes - American pioneer in computer programming, designed the first computer used for Social Security. https://en.wikipedia.org/wiki/Ida_Rhodes
541                "rhodes".to_string(),
542                // Julia Hall Bowman Robinson - American mathematician renowned for her contributions to the fields of computability theory and computational complexity theory. https://en.wikipedia.org/wiki/Julia_Robinson
543                "robinson".to_string(),
544                // Wilhelm Conrad Röntgen - German physicist who was awarded the first Nobel Prize in Physics in 1901 for the discovery of X-rays (Röntgen rays). https://en.wikipedia.org/wiki/Wilhelm_R%C3%B6ntgen
545                "roentgen".to_string(),
546                // Rosalind Franklin - British biophysicist and X-ray crystallographer whose research was critical to the understanding of DNA - https://en.wikipedia.org/wiki/Rosalind_Franklin
547                "rosalind".to_string(),
548                // Vera Rubin - American astronomer who pioneered work on galaxy rotation rates. https://en.wikipedia.org/wiki/Vera_Rubin
549                "rubin".to_string(),
550                // Meghnad Saha - Indian astrophysicist best known for his development of the Saha equation, used to describe chemical and physical conditions in stars - https://en.wikipedia.org/wiki/Meghnad_Saha
551                "saha".to_string(),
552                // Jean E. Sammet developed FORMAC, the first widely used computer language for symbolic manipulation of mathematical formulas. https://en.wikipedia.org/wiki/Jean_E._Sammet
553                "sammet".to_string(),
554                // Mildred Sanderson - American mathematician best known for Sanderson's theorem concerning modular invariants. https://en.wikipedia.org/wiki/Mildred_Sanderson
555                "sanderson".to_string(),
556                // Satoshi Nakamoto is the name used by the unknown person or group of people who developed bitcoin, authored the bitcoin white paper, and created and deployed bitcoin's original reference implementation. https://en.wikipedia.org/wiki/Satoshi_Nakamoto
557                "satoshi".to_string(),
558                // Adi Shamir - Israeli cryptographer whose numerous inventions and contributions to cryptography include the Ferge Fiat Shamir identification scheme, the Rivest Shamir Adleman (RSA) public-key cryptosystem, the Shamir's secret sharing scheme, the breaking of the Merkle-Hellman cryptosystem, the TWINKLE and TWIRL factoring devices and the discovery of differential cryptanalysis (with Eli Biham). https://en.wikipedia.org/wiki/Adi_Shamir
559                "shamir".to_string(),
560                // Claude Shannon - The father of information theory and founder of digital circuit design theory. (https://en.wikipedia.org/wiki/Claude_Shannon)
561                "shannon".to_string(),
562                // Carol Shaw - Originally an Atari employee, Carol Shaw is said to be the first female video game designer. https://en.wikipedia.org/wiki/Carol_Shaw_(video_game_designer)
563                "shaw".to_string(),
564                // Dame Stephanie "Steve" Shirley - Founded a software company in 1962 employing women working from home. https://en.wikipedia.org/wiki/Steve_Shirley
565                "shirley".to_string(),
566                // William Shockley co-invented the transistor - https://en.wikipedia.org/wiki/William_Shockley
567                "shockley".to_string(),
568                // Lina Solomonovna Stern (or Shtern; Russian: Лина Соломоновна Штерн; 26 August 1878 – 7 March 1968) was a Soviet biochemist, physiologist and humanist whose medical discoveries saved thousands of lives at the fronts of World War II. She is best known for her pioneering work on blood–brain barrier, which she described as hemato-encephalic barrier in 1921. https://en.wikipedia.org/wiki/Lina_Stern
569                "shtern".to_string(),
570                // Françoise Barré-Sinoussi - French virologist and Nobel Prize Laureate in Physiology or Medicine; her work was fundamental in identifying HIV as the cause of AIDS. https://en.wikipedia.org/wiki/Fran%C3%A7oise_Barr%C3%A9-Sinoussi
571                "sinoussi".to_string(),
572                // Betty Snyder - one of the original programmers of the ENIAC. https://en.wikipedia.org/wiki/ENIAC - https://en.wikipedia.org/wiki/Betty_Holberton
573                "snyder".to_string(),
574                // Cynthia Solomon - Pioneer in the fields of artificial intelligence, computer science and educational computing. Known for creation of Logo, an educational programming language.  https://en.wikipedia.org/wiki/Cynthia_Solomon
575                "solomon".to_string(),
576                // Frances Spence - one of the original programmers of the ENIAC. https://en.wikipedia.org/wiki/ENIAC - https://en.wikipedia.org/wiki/Frances_Spence
577                "spence".to_string(),
578                // Michael Stonebraker is a database research pioneer and architect of Ingres, Postgres, VoltDB and SciDB. Winner of 2014 ACM Turing Award. https://en.wikipedia.org/wiki/Michael_Stonebraker
579                "stonebraker".to_string(),
580                // Ivan Edward Sutherland - American computer scientist and Internet pioneer, widely regarded as the father of computer graphics. https://en.wikipedia.org/wiki/Ivan_Sutherland
581                "sutherland".to_string(),
582                // Janese Swanson (with others) developed the first of the Carmen Sandiego games. She went on to found Girl Tech. https://en.wikipedia.org/wiki/Janese_Swanson
583                "swanson".to_string(),
584                // Aaron Swartz was influential in creating RSS, Markdown, Creative Commons, Reddit, and much of the internet as we know it today. He was devoted to freedom of information on the web. https://en.wikiquote.org/wiki/Aaron_Swartz
585                "swartz".to_string(),
586                // Bertha Swirles was a theoretical physicist who made a number of contributions to early quantum theory. https://en.wikipedia.org/wiki/Bertha_Swirles
587                "swirles".to_string(),
588                // Helen Brooke Taussig - American cardiologist and founder of the field of paediatric cardiology. https://en.wikipedia.org/wiki/Helen_B._Taussig
589                "taussig".to_string(),
590                // Valentina Tereshkova is a Russian engineer, cosmonaut and politician. She was the first woman to fly to space in 1963. In 2013, at the age of 76, she offered to go on a one-way mission to Mars. https://en.wikipedia.org/wiki/Valentina_Tereshkova
591                "tereshkova".to_string(),
592                // Nikola Tesla invented the AC electric system and every gadget ever used by a James Bond villain. https://en.wikipedia.org/wiki/Nikola_Tesla
593                "tesla".to_string(),
594                // Marie Tharp - American geologist and oceanic cartographer who co-created the first scientific map of the Atlantic Ocean floor. Her work led to the acceptance of the theories of plate tectonics and continental drift. https://en.wikipedia.org/wiki/Marie_Tharp
595                "tharp".to_string(),
596                // Ken Thompson - co-creator of UNIX and the C programming language - https://en.wikipedia.org/wiki/Ken_Thompson
597                "thompson".to_string(),
598                // Linus Torvalds invented Linux and Git. https://en.wikipedia.org/wiki/Linus_Torvalds
599                "torvalds".to_string(),
600                // Youyou Tu - Chinese pharmaceutical chemist and educator known for discovering artemisinin and dihydroartemisinin, used to treat malaria, which has saved millions of lives. Joint winner of the 2015 Nobel Prize in Physiology or Medicine. https://en.wikipedia.org/wiki/Tu_Youyou
601                "tu".to_string(),
602                // Alan Turing was a founding father of computer science. https://en.wikipedia.org/wiki/Alan_Turing.
603                "turing".to_string(),
604                // Varahamihira - Ancient Indian mathematician who discovered trigonometric formulae during 505-587 CE - https://en.wikipedia.org/wiki/Var%C4%81hamihira#Contributions
605                "varahamihira".to_string(),
606                // Dorothy Vaughan was a NASA mathematician and computer programmer on the SCOUT launch vehicle program that put America's first satellites into space - https://en.wikipedia.org/wiki/Dorothy_Vaughan
607                "vaughan".to_string(),
608                // Cédric Villani - French mathematician, won Fields Medal, Fermat Prize and Poincaré Price for his work in differential geometry and statistical mechanics. https://en.wikipedia.org/wiki/C%C3%A9dric_Villani
609                "villani".to_string(),
610                // Sir Mokshagundam Visvesvaraya - is a notable Indian engineer.  He is a recipient of the Indian Republic's highest honour, the Bharat Ratna, in 1955. On his birthday, 15 September is celebrated as Engineer's Day in India in his memory - https://en.wikipedia.org/wiki/Visvesvaraya
611                "visvesvaraya".to_string(),
612                // Christiane Nüsslein-Volhard - German biologist, won Nobel Prize in Physiology or Medicine in 1995 for research on the genetic control of embryonic development. https://en.wikipedia.org/wiki/Christiane_N%C3%BCsslein-Volhard
613                "volhard".to_string(),
614                // Marlyn Wescoff - one of the original programmers of the ENIAC. https://en.wikipedia.org/wiki/ENIAC - https://en.wikipedia.org/wiki/Marlyn_Meltzer
615                "wescoff".to_string(),
616                // Sylvia B. Wilbur - British computer scientist who helped develop the ARPANET, was one of the first to exchange email in the UK and a leading researcher in computer-supported collaborative work. https://en.wikipedia.org/wiki/Sylvia_Wilbur
617                "wilbur".to_string(),
618                // Andrew Wiles - Notable British mathematician who proved the enigmatic Fermat's Last Theorem - https://en.wikipedia.org/wiki/Andrew_Wiles
619                "wiles".to_string(),
620                // Roberta Williams, did pioneering work in graphical adventure games for personal computers, particularly the King's Quest series. https://en.wikipedia.org/wiki/Roberta_Williams
621                "williams".to_string(),
622                // Malcolm John Williamson - British mathematician and cryptographer employed by the GCHQ. Developed in 1974 what is now known as Diffie-Hellman key exchange (Diffie and Hellman first published the scheme in 1976). https://en.wikipedia.org/wiki/Malcolm_J._Williamson
623                "williamson".to_string(),
624                // Sophie Wilson designed the first Acorn Micro-Computer and the instruction set for ARM processors. https://en.wikipedia.org/wiki/Sophie_Wilson
625                "wilson".to_string(),
626                // Jeannette Wing - co-developed the Liskov substitution principle. - https://en.wikipedia.org/wiki/Jeannette_Wing
627                "wing".to_string(),
628                // Steve Wozniak invented the Apple I and Apple II. https://en.wikipedia.org/wiki/Steve_Wozniak
629                "wozniak".to_string(),
630                // The Wright brothers, Orville and Wilbur - credited with inventing and building the world's first successful airplane and making the first controlled, powered and sustained heavier-than-air human flight - https://en.wikipedia.org/wiki/Wright_brothers
631                "wright".to_string(),
632                // Chien-Shiung Wu - Chinese-American experimental physicist who made significant contributions to nuclear physics. https://en.wikipedia.org/wiki/Chien-Shiung_Wu
633                "wu".to_string(),
634                // Rosalyn Sussman Yalow - Rosalyn Sussman Yalow was an American medical physicist, and a co-winner of the 1977 Nobel Prize in Physiology or Medicine for development of the radioimmunoassay technique. https://en.wikipedia.org/wiki/Rosalyn_Sussman_Yalow
635                "yalow".to_string(),
636                // Ada Yonath - an Israeli crystallographer, the first woman from the Middle East to win a Nobel prize in the sciences. https://en.wikipedia.org/wiki/Ada_Yonath
637                "yonath".to_string(),
638                // Nikolay Yegorovich Zhukovsky (Russian: Никола́й Его́рович Жуко́вский, January 17 1847 – March 17, 1921) was a Russian scientist, mathematician and engineer, and a founding father of modern aero- and hydrodynamics. Whereas contemporary scientists scoffed at the idea of human flight, Zhukovsky was the first to undertake the study of airflow. He is often called the Father of Russian Aviation. https://en.wikipedia.org/wiki/Nikolay_Yegorovich_Zhukovsky
639                "zhukovsky".to_string(),
640            ],
641        }
642    }
643
644    /// Creates a `MnemonicGenerator` with custom word lists.
645    ///
646    /// # Arguments
647    ///
648    /// * `left_words` - A vector of words to be used as the first part of the mnemonic
649    /// * `right_words` - A vector of words to be used as the second part of the mnemonic
650    ///
651    /// # Examples
652    ///
653    /// ```
654    /// use mnemonic_generator::MnemonicGenerator;
655    ///
656    /// let generator = MnemonicGenerator::with_words(
657    ///     vec!["amazing".to_string(), "legend".to_string()],
658    ///     vec!["jordan".to_string(), "larry".to_string()]
659    /// );
660    /// let mnemonic = generator.generate().expect("Failed to generate mnemonic");
661    /// ```
662    pub fn with_words(left_words: Vec<String>, right_words: Vec<String>) -> Self {
663        Self {
664            left_words,
665            right_words,
666        }
667    }
668
669    /// Generates a mnemonic using the default underscore separator.
670    ///
671    /// # Errors
672    ///
673    /// Returns `MnemonicError::EmptyWordList` if no words are available for generation
674    ///
675    /// # Examples
676    ///
677    /// ```
678    /// use mnemonic_generator::MnemonicGenerator;
679    ///
680    /// let generator = MnemonicGenerator::new();
681    /// match generator.generate() {
682    ///     Ok(mnemonic) => println!("Generated mnemonic: {}", mnemonic),
683    ///     Err(e) => eprintln!("Error generating mnemonic: {}", e)
684    /// }
685    /// ```
686    pub fn generate(&self) -> Result<String, MnemonicError> {
687        self.generate_with_separator("_")
688    }
689
690    /// Generates a mnemonic using a custom separator.
691    ///
692    /// # Arguments
693    ///
694    /// * `separator` - A string slice to be used between the two words
695    ///
696    /// # Errors
697    ///
698    /// Returns `MnemonicError::EmptyWordList` if no words are available for generation
699    ///
700    /// # Examples
701    ///
702    /// ```
703    /// use mnemonic_generator::MnemonicGenerator;
704    ///
705    /// let generator = MnemonicGenerator::new();
706    /// match generator.generate_with_separator("-") {
707    ///     Ok(mnemonic) => println!("Generated mnemonic: {}", mnemonic),
708    ///     Err(e) => eprintln!("Error generating mnemonic: {}", e)
709    /// }
710    /// ```
711    pub fn generate_with_separator(&self, separator: &str) -> Result<String, MnemonicError> {
712        if self.left_words.is_empty() || self.right_words.is_empty() {
713            return Err(MnemonicError::EmptyWordList);
714        }
715
716        let mut rng = rand::thread_rng();
717        let left_idx = rng.gen_range(0..self.left_words.len());
718        let right_idx = rng.gen_range(0..self.right_words.len());
719
720        Ok(format!(
721            "{}{}{}",
722            &self.left_words[left_idx], separator, &self.right_words[right_idx]
723        ))
724    }
725}
726
727impl Default for MnemonicGenerator {
728    fn default() -> Self {
729        Self::new()
730    }
731}
732
733#[cfg(test)]
734mod tests {
735    use super::*;
736
737    #[test]
738    fn generate_default_mnemonic() {
739        let generator = MnemonicGenerator::new();
740        let mnemonic = generator.generate().expect("Should generate mnemonic");
741        let parts: Vec<&str> = mnemonic.split('_').collect();
742        assert_eq!(parts.len(), 2);
743    }
744
745    #[test]
746    fn generate_custom_separator_mnemonic() {
747        let generator = MnemonicGenerator::new();
748        let mnemonic = generator
749            .generate_with_separator("-")
750            .expect("Should generate mnemonic with custom separator");
751        let parts: Vec<&str> = mnemonic.split('-').collect();
752        assert_eq!(parts.len(), 2);
753    }
754
755    #[test]
756    fn generate_with_custom_words() {
757        let custom_left = vec!["amazing".to_string(), "legend".to_string()];
758        let custom_right = vec!["jordan".to_string(), "bird".to_string()];
759        let generator = MnemonicGenerator::with_words(custom_left.clone(), custom_right.clone());
760
761        let mnemonic = generator.generate().expect("Should generate mnemonic");
762        let parts: Vec<&str> = mnemonic.split('_').collect();
763
764        assert!(custom_left.contains(&parts[0].to_string()));
765        assert!(custom_right.contains(&parts[1].to_string()));
766    }
767
768    #[test]
769    fn error_on_empty_word_list() {
770        let generator = MnemonicGenerator::with_words(vec![], vec![]);
771        let result = generator.generate();
772        assert!(result.is_err());
773        assert!(matches!(result, Err(MnemonicError::EmptyWordList)));
774    }
775}