├── .gitignore ├── package.json ├── index.d.ts ├── LICENSE ├── CHANGELOG.md ├── README.md ├── tests └── test.js └── index.js /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | package-lock.json 3 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "random-words", 3 | "version": "2.0.1", 4 | "description": "Generate one or more common English words", 5 | "main": "index.js", 6 | "types": "index.d.ts", 7 | "type": "module", 8 | "scripts": { 9 | "test": "mocha tests/test.js" 10 | }, 11 | "repository": { 12 | "type": "git", 13 | "url": "git@github.com:apostrophecms/random-words.git" 14 | }, 15 | "keywords": [ 16 | "random", 17 | "words", 18 | "words", 19 | "word", 20 | "generator", 21 | "sample", 22 | "text" 23 | ], 24 | "author": "Apostrophe Technologies", 25 | "license": "MIT", 26 | "dependencies": { 27 | "seedrandom": "^3.0.5" 28 | }, 29 | "devDependencies": { 30 | "mocha": "^10.2.0" 31 | } 32 | } -------------------------------------------------------------------------------- /index.d.ts: -------------------------------------------------------------------------------- 1 | declare type GenerateOptions = { 2 | min?: number; 3 | max?: number; 4 | exactly?: number; 5 | minLength?: number; 6 | maxLength?: number; 7 | wordsPerString?: number; 8 | separator?: string; 9 | formatter?: (word: string, index: number) => string; 10 | seed?: string; 11 | }; 12 | 13 | declare type JoinedWordsOptions = GenerateOptions & { join: string }; 14 | 15 | declare function generate(count?: number): string | string[]; 16 | declare function generate(options: GenerateOptions): string | string[]; 17 | declare function generate(options: JoinedWordsOptions): string; 18 | 19 | declare const wordsList: string[]; 20 | 21 | declare type CountOptions = { 22 | minLength?: number; 23 | maxLength?: number; 24 | }; 25 | 26 | declare function count(options?: CountOptions): number; 27 | 28 | export { generate, count, wordsList }; 29 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2022 Apostrophe Technologies, Inc. 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 4 | 5 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 6 | 7 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 8 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | ## 2.0.1 (2024-01-25) 4 | 5 | - Fixed return type of `generate` so that it is consistent with the possibility of returning either `string` or `string[]` 6 | 7 | ## 2.0.0 - 2023-06-08 8 | 9 | This is a significant update that transforms this module into an ECMAScript module and changes the name of the exported function. For that reason, we have updated the major version number. 10 | 11 | - Converted default export to named export (`generate`) to generate random words. 12 | - Adds `count` named export to count number of words. 13 | - Thanks to [prateek-budhiraja](https://github.com/prateek-budhiraja) for these updates. 14 | - Addition of `minLength` option. 15 | - Code update to ES6 Syntax. 16 | - Thanks to [Nellfs](https://github.com/nellfs) for these updates. 17 | 18 | ## 1.3.0 - 2023-02-17 19 | 20 | - Adds new `seed` option. Thanks to [Nathan Klingensmith](https://github.com/IamParadoxdotexe). 21 | 22 | ## 1.2.1 - 2023-01-06 23 | 24 | - Fixes misspelling of `separator` in typings. Thanks to Andrei Gec for the correction. 25 | 26 | ## 1.2.0 - 2022-06-16 27 | 28 | - Adds typescript typings. Thanks to Tim Kennedy for this contribution. 29 | 30 | ## 1.1.2 - 2022-01-20 31 | 32 | - Updates mocha to v9. 33 | 34 | ## 1.1.1 35 | 36 | - Use `var` in a small amount of newer code that used `let`, to match ES5 legacy support status of the rest of the module. We should probably decide on a strategy for moving this module to ES6, but there is no urgency. 37 | 38 | ## 1.1.0 39 | 40 | - Addition of `wordsPerString`, `separator` and `format` options. Thanks to Matteo Veraldi. 41 | 42 | ## 1.0.0 43 | 44 | - Addition of `maxLength` option, thanks to Scoombe. 45 | 46 | - Since this module has achieved considerable use, has good test coverage and has had no bug reports, we've declared version 1.0.0 stable. We will follow the semver standard from here on out. 47 | 48 | ## 0.0.1 49 | 50 | Initial release. 51 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # random-words 2 | 3 | ## Generate one or more common English words 4 | 5 | `random-words` generates random words for use as sample text. We use it to generate random blog posts when testing [Apostrophe](http://apostrophecms.org). 6 | 7 | Cryptographic-quality randomness is NOT the goal, as speed matters for generating sample text and security does not. As such, `Math.random()` is used in most cases. 8 | 9 | The `seed` option can be used with the `generate` function for situations that require deterministic output. When given the same `seed` with the same input, `generate()` will yield deterministic results, in regards to both actual word selection and the number of words returned (when using `min` and `max`). The underlying implementation of this option utilizes the [seedrandom](https://www.npmjs.com/package/seedrandom) package as a replacement for `Math.random()`. 10 | 11 | The `count` function can be used to calculate the total number of words in the word list that meet the specified minimum and maximum length criteria. 12 | 13 | Installation: 14 | 15 | npm install random-words 16 | 17 | Examples: 18 | 19 | ```js 20 | import { generate, count } from "random-words"; 21 | 22 | console.log(generate()); 23 | //output: 'army' 24 | 25 | console.log(generate(5)); 26 | //output: ['army', 'beautiful', 'became', 'if', 'actually'] 27 | 28 | console.log(generate({ minLength: 2 })); 29 | //output: 'hello' 30 | 31 | console.log(generate({ maxLength: 6 })); 32 | //output: 'blue' 33 | 34 | console.log(generate({ minLength: 5, maxLength: 5 })); 35 | //output : 'world' 36 | 37 | console.log(generate({ minLength: 11, maxLength: 10000 })); //maxLength limited to the longest possible word 38 | //output: 'environment' 39 | 40 | console.log(generate({ minLength: 10000, maxLength: 5 })); //minLength limited to the maxLength 41 | //output: 'short' 42 | 43 | console.log(generate({ min: 3, max: 10 })); 44 | //output: ['became', 'arrow', 'article', 'therefore'] 45 | 46 | console.log(generate({ exactly: 2 })); 47 | //output: ['beside', 'between'] 48 | 49 | console.log(generate({ min: 2, max: 3, seed: "my-seed" })); 50 | //output: ['plenty', 'pure'] 51 | 52 | // this call will yield exactly the same results as the last since the same `seed` was used and the other inputs are identical 53 | console.log(generate({ min: 2, max: 3, seed: "my-seed" })); 54 | //output: ['plenty', 'pure'] 55 | 56 | console.log(generate({ exactly: 5, join: " " })); 57 | //output: 'army beautiful became if exactly' 58 | 59 | console.log(generate({ exactly: 5, join: "" })); 60 | //output: 'armybeautifulbecameifexactly' 61 | 62 | console.log(generate({ exactly: 2, minLength: 4 })); 63 | //output: ['atom', 'window'] 64 | 65 | console.log(generate({ exactly: 5, maxLength: 4 })); 66 | //output: ['army', 'come', 'eye', 'five', 'fur'] 67 | 68 | console.log(generate({ exactly: 2, minLength: 3, maxLength: 3 })); 69 | //output: ['you, 'are'] 70 | 71 | console.log(generate({ exactly: 3, minLength: 5, maxLength: 100000 })); 72 | //output: ['understanding', 'should', 'yourself'] 73 | 74 | console.log(generate({ exactly: 5, wordsPerString: 2 })); 75 | //output: [ 'salt practical', 'also brief', 'country muscle', 'neighborhood beyond', 'grew pig' ] 76 | 77 | console.log(generate({ exactly: 5, wordsPerString: 2, separator: "-" })); 78 | //output: [ 'equator-variety', 'salt-usually', 'importance-becoming', 'stream-several', 'goes-fight' ] 79 | 80 | console.log( 81 | generate({ 82 | exactly: 5, 83 | wordsPerString: 2, 84 | formatter: (word) => word.toUpperCase(), 85 | }) 86 | ); 87 | //output: [ 'HAVING LOAD', 'LOST PINE', 'GAME SLOPE', 'SECRET GIANT', 'INDEED LOCATION' ] 88 | 89 | console.log( 90 | generate({ 91 | exactly: 5, 92 | wordsPerString: 2, 93 | formatter: (word, index) => { 94 | return index === 0 95 | ? word.slice(0, 1).toUpperCase().concat(word.slice(1)) 96 | : word; 97 | }, 98 | }) 99 | ); 100 | //output: [ 'Until smoke', 'Year strength', 'Pay knew', 'Fallen must', 'Chief arrow' ] 101 | 102 | console.log(count()); 103 | //output: 1952 104 | 105 | console.log(count({ minLength: 5 })); 106 | //output: 1318 107 | 108 | console.log(count({ maxLength: 7 })); 109 | //output: 1649 110 | 111 | console.log(count({ minLength: 5, maxLength: 7 })); 112 | //output: 1015 113 | 114 | ``` -------------------------------------------------------------------------------- /tests/test.js: -------------------------------------------------------------------------------- 1 | import assert from "assert"; 2 | import { generate, count } from "../index.js"; 3 | import { wordList } from "../index.js"; 4 | 5 | const longestWordSize = wordList.reduce((longestWord, currentWord) => 6 | currentWord.length > longestWord.length ? currentWord : longestWord 7 | ).length; 8 | 9 | describe("random-words : generate", function () { 10 | it("should return one word when called with no arguments", function () { 11 | const word = generate(); 12 | assert.ok(typeof word === "string", "word is a string"); 13 | assert.ok(word.length, "word is not empty"); 14 | assert.ok(word.indexOf(" ") === -1, "word does not contain spaces"); 15 | }); 16 | it("should return 5 words when called with the number 5", function () { 17 | const words = generate(5); 18 | assert.ok(words.length === 5, "contains 5 elements"); 19 | }); 20 | it("should return between 5 and 10 words when called with min: 5 and max: 10", function () { 21 | const words = generate({ min: 5, max: 10 }); 22 | assert.ok(words.length >= 5 && words.length <= 10); 23 | }); 24 | it("returns result of variable length when called with min: 5 and max: 10", function () { 25 | const lengths = {}; 26 | for (let i = 0; i < 100; i++) { 27 | const words = generate({ min: 5, max: 10 }); 28 | lengths[words.length] = true; 29 | } 30 | assert.ok(Object.keys(lengths).length > 1, "result varies in length"); 31 | }); 32 | it("should return 5 space separated words when join is used with exactly: 5", function () { 33 | let phrase = generate({ exactly: 5, join: " " }); 34 | assert.ok(typeof phrase === "string", "result is a string"); 35 | assert.ok(phrase.match(/\S/), "result contains text, not just spaces"); 36 | phrase = phrase.replace(/[\S]/g, ""); 37 | assert.ok( 38 | phrase.length === 4, 39 | "result contains 4 spaces joining the 5 words" 40 | ); 41 | }); 42 | it("should return 5 concatenated words when join is used with an empty string and exactly: 5", function () { 43 | const phrase = generate({ exactly: 5, join: "" }); 44 | assert.ok(typeof phrase === "string", "result is a string"); 45 | assert.ok(phrase.match(/\w/), "result contains text, no spaces"); 46 | }); 47 | it("should return 5 words when called with exactly: 5 and join: false", function () { 48 | const words = generate({ exactly: 5, join: false }); 49 | assert.ok(words.length === 5, "contains 5 elements"); 50 | }); 51 | it("should return 5 words when called with exactly: 5 and join: null", function () { 52 | const words = generate({ exactly: 5, join: null }); 53 | assert.ok(words.length === 5, "contains 5 elements"); 54 | }); 55 | it("should return one word with a minimum of 8 letters", function () { 56 | const minWordSize = 8; 57 | const word = generate({ minLength: minWordSize }); 58 | 59 | assert.ok(word.length >= minWordSize, "result is less than 8 letters"); 60 | }); 61 | it("should return one word with a maximum of 5 letters", function () { 62 | const maxWordSize = 5; 63 | const word = generate({ maxLength: maxWordSize }); 64 | 65 | assert.ok(word.length <= maxWordSize, "result exceeded 5 letters"); 66 | }); 67 | it("should return one word with the length between 3 and 5 ", function () { 68 | const minLengthSize = 3; 69 | const maxLengthSize = 5; 70 | const word = generate({ 71 | minLength: minLengthSize, 72 | maxLength: maxLengthSize, 73 | }); 74 | 75 | assert.ok( 76 | word.length >= minLengthSize && word.length <= maxLengthSize, 77 | "result is not between the limit of 3 and 5" 78 | ); 79 | }); 80 | it("should only return words with a minimum of 8 letters", function () { 81 | const minWordSize = 8; 82 | const words = generate({ exactly: 10000, minLength: minWordSize }); 83 | words.forEach((word) => { 84 | assert.ok(word.length >= minWordSize, "result is less than 8 letters"); 85 | }); 86 | }); 87 | it("should only return words with a maximum of 5 letters", function () { 88 | const maxWordSize = 5; 89 | const words = generate({ exactly: 10000, maxLength: maxWordSize }); 90 | words.forEach((word) => { 91 | assert.ok(word.length <= maxWordSize, "result exceeded 5 letters"); 92 | }); 93 | }); 94 | it("should only return words with the length between 3 and 5", function () { 95 | const minLengthSize = 3; 96 | const maxLengthSize = 5; 97 | const words = generate({ 98 | exactly: 10000, 99 | minLength: minLengthSize, 100 | maxLength: maxLengthSize, 101 | }); 102 | words.forEach((word) => { 103 | assert.ok( 104 | word.length >= minLengthSize && word.length <= maxLengthSize, 105 | "result is not between the limit of 3 and 5" 106 | ); 107 | }); 108 | }); 109 | it("should only return words with length = 5", function () { 110 | const wordSize = 5; 111 | const words = generate({ 112 | exactly: 10000, 113 | minLength: wordSize, 114 | maxLength: wordSize, 115 | }); 116 | words.forEach((word) => { 117 | assert.ok(word.length === wordSize, "word length is different from 5"); 118 | }); 119 | }); 120 | it("maxLength larger than the longest word should not result in an endless loop", function () { 121 | const wordSize = 100000; 122 | const words = generate({ 123 | exactly: 1000, 124 | maxLength: wordSize, 125 | }); 126 | words.forEach((word) => { 127 | assert.ok(word.length <= longestWordSize); 128 | }); 129 | }); 130 | it("minLength larger than the longest word should not result in an endless loop", function () { 131 | const wordSize = 100000; 132 | const words = generate({ 133 | exactly: 1000, 134 | minLength: wordSize, 135 | }); 136 | words.forEach((word) => { 137 | assert.ok(word.length <= longestWordSize); 138 | }); 139 | }); 140 | it("must return a word even without passing a number to minLength and maxLength", function () { 141 | const word1 = generate({ minLength: undefined, maxLength: false }); 142 | const word2 = generate({ minLength: "string", maxLength: null }); 143 | assert.ok( 144 | typeof word1 === "string" && typeof word2 === "string", 145 | "result is not a string" 146 | ); 147 | }); 148 | it("should return 5 space separated words for each string if wordsPerString is set to 5 and exactly > 1", function () { 149 | const words = generate({ exactly: 10, wordsPerString: 5 }); 150 | words.forEach((string) => { 151 | const stringSplitted = string.split(" "); 152 | assert.ok( 153 | stringSplitted.length === 5, 154 | "the i-th string contains 5 words" 155 | ); 156 | }); 157 | }); 158 | it("should reuturn 5 words separated by a separator for each string if wordsPerString > 1, separator is defined as a string and exactly > 1", function () { 159 | const separator = "-"; 160 | const words = generate({ exactly: 10, wordsPerString: 5, separator }); 161 | words.forEach((string) => { 162 | const stringSplitted = string.split(separator); 163 | assert.ok(typeof separator === "string", "separator is a string"); 164 | assert.ok( 165 | stringSplitted.length === 5, 166 | "the i-th string contains 5 words" 167 | ); 168 | }); 169 | }); 170 | it("should return styled strings if formatter is defined as a function that returns a string", function () { 171 | const formatter = (word) => word.toUpperCase(); 172 | assert.ok(typeof formatter === "function", "formatter is a function"); 173 | assert.ok( 174 | typeof formatter("test") === "string", 175 | "formatter returns a string" 176 | ); 177 | const words = generate({ exactly: 10, formatter }); 178 | words.forEach((word) => { 179 | assert.ok(word === word.toUpperCase(), "word is formatted"); 180 | }); 181 | }); 182 | it("should return the same words if the same seed is used", function () { 183 | const seed = "seed1"; 184 | const exactly = 20; 185 | const join = " "; 186 | 187 | const words = generate({ seed, exactly, join }); 188 | const words2 = generate({ seed, exactly, join }); 189 | 190 | assert.ok(words == words2, "words are the same"); 191 | }); 192 | it("should return the same number of words if the same seed is used", function () { 193 | const seed = "seed1"; 194 | const min = 1; 195 | const max = 10; 196 | 197 | const words = generate({ seed, min, max }); 198 | const words2 = generate({ seed, min, max }); 199 | 200 | assert.ok(words.length == words2.length, "number of words is the same"); 201 | }); 202 | it("should return different words if no seeds are provided", function () { 203 | const exactly = 20; 204 | const join = " "; 205 | 206 | const words = generate({ exactly, join }); 207 | const words2 = generate({ exactly, join }); 208 | 209 | // with 1952 possible words, at least one word in 20 should be different 210 | assert.ok(words != words2, "words are different"); 211 | }); 212 | it("should return different words if different seeds are used", function () { 213 | const exactly = 20; 214 | 215 | const words = generate({ seed: "seed1", exactly }); 216 | const words2 = generate({ seed: "seed2", exactly }); 217 | 218 | // with these seeds, all words should be different 219 | for (let i = 0; i < exactly; i++) { 220 | assert.ok(words[i] != words2[i], "words are different"); 221 | } 222 | }); 223 | it("should return different number of words if different seeds are used", function () { 224 | const min = 1; 225 | const max = 10; 226 | 227 | const words = generate({ seed: "seed1", min, max }); 228 | const words2 = generate({ seed: "seed2", min, max }); 229 | 230 | // with these seeds, the number of words should 5 and 3 231 | assert.ok(words.length != words2.length, "number of words is different"); 232 | }); 233 | }); 234 | 235 | describe("random-words : count", function () { 236 | it("should return the correct count when no options are provided", function () { 237 | const totalWords = count(); 238 | 239 | assert.ok(typeof totalWords === "number" && totalWords != 0 , "total number of words is a number and is not 0"); 240 | }); 241 | it("should return the correct count when minLength and maxLength options are provided", function () { 242 | const options = { minLength: 5, maxLength: 8 }; 243 | const totalWords = count(options); 244 | 245 | assert.ok(typeof totalWords === "number" && totalWords != 0 , "total number of words is a number and is not 0"); 246 | }); 247 | it("should return the correct count when only minLength option is provided", function () { 248 | const options = { minLength: 8 }; 249 | const totalWords = count(options); 250 | 251 | assert.ok(typeof totalWords === "number" && totalWords != 0 , "total number of words is a number and is not 0"); 252 | }); 253 | it("should return 0 when no words satisfy the length criteria", function () { 254 | const options = { minLength: 30, maxLength: 35 }; 255 | const totalWords = count(options); 256 | 257 | assert.ok(totalWords === 0 , "total number of words should be 0 when no words satisfy the length criteria"); 258 | }); 259 | it("should return 0 when minLength is greater than maxLength", function () { 260 | const options = { minLength: 10, maxLength: 5 }; 261 | const totalWords = count(options); 262 | 263 | assert.ok(totalWords === 0 , "total number of words should be 0 when minLength is greater than maxLength"); 264 | }); 265 | it("should return the default count when incorrect arguments are provided", function () { 266 | const options = "Illegal arguments"; 267 | const totalWords = count(options); 268 | 269 | assert.ok(typeof totalWords === "number" && totalWords != 0 , "total number of words is a number and is not 0"); 270 | }); 271 | it("should treat non-number minLength as default and return the correct count", function () { 272 | const options = { minLength: "5" }; 273 | const totalWords = count(options); 274 | 275 | assert.ok(typeof totalWords === "number" && totalWords != 0 , "total number of words is a number and is not 0"); 276 | }); 277 | it("should ignore other options and return the count based on minLength and maxLength only", function () { 278 | const options = { minLength: 4, maxLength: 7, separator: "-", formatter: (word) => word.toUpperCase(), seed: "random" }; 279 | const totalWords = count(options); 280 | 281 | assert.ok(typeof totalWords === "number" && totalWords != 0 , "total number of words is a number and is not 0"); 282 | }); 283 | it("should return 0 when negative minLength and maxLength are passed", function () { 284 | const options = { minLength: -20, maxLength: -10 }; 285 | const totalWords = count(options); 286 | 287 | assert.ok(totalWords === 0 , "total number of words should be 0 when no words satisfy the length criteria"); 288 | }); 289 | it("should return the correct count when minLength is -1 and maxLength is 10", function () { 290 | const options = { minLength: -1, maxLength: 10 }; 291 | const totalWords = count(options); 292 | 293 | assert.ok(typeof totalWords === "number" && totalWords != 0 , "total number of words is a number and is not 0"); 294 | }); 295 | }) -------------------------------------------------------------------------------- /index.js: -------------------------------------------------------------------------------- 1 | import seedrandom from "seedrandom"; 2 | 3 | // Export the word list as it is often useful 4 | export const wordList = [ 5 | "ability", 6 | "able", 7 | "aboard", 8 | "about", 9 | "above", 10 | "accept", 11 | "accident", 12 | "according", 13 | "account", 14 | "accurate", 15 | "acres", 16 | "across", 17 | "act", 18 | "action", 19 | "active", 20 | "activity", 21 | "actual", 22 | "actually", 23 | "add", 24 | "addition", 25 | "additional", 26 | "adjective", 27 | "adult", 28 | "adventure", 29 | "advice", 30 | "affect", 31 | "afraid", 32 | "after", 33 | "afternoon", 34 | "again", 35 | "against", 36 | "age", 37 | "ago", 38 | "agree", 39 | "ahead", 40 | "aid", 41 | "air", 42 | "airplane", 43 | "alike", 44 | "alive", 45 | "all", 46 | "allow", 47 | "almost", 48 | "alone", 49 | "along", 50 | "aloud", 51 | "alphabet", 52 | "already", 53 | "also", 54 | "although", 55 | "am", 56 | "among", 57 | "amount", 58 | "ancient", 59 | "angle", 60 | "angry", 61 | "animal", 62 | "announced", 63 | "another", 64 | "answer", 65 | "ants", 66 | "any", 67 | "anybody", 68 | "anyone", 69 | "anything", 70 | "anyway", 71 | "anywhere", 72 | "apart", 73 | "apartment", 74 | "appearance", 75 | "apple", 76 | "applied", 77 | "appropriate", 78 | "are", 79 | "area", 80 | "arm", 81 | "army", 82 | "around", 83 | "arrange", 84 | "arrangement", 85 | "arrive", 86 | "arrow", 87 | "art", 88 | "article", 89 | "as", 90 | "aside", 91 | "ask", 92 | "asleep", 93 | "at", 94 | "ate", 95 | "atmosphere", 96 | "atom", 97 | "atomic", 98 | "attached", 99 | "attack", 100 | "attempt", 101 | "attention", 102 | "audience", 103 | "author", 104 | "automobile", 105 | "available", 106 | "average", 107 | "avoid", 108 | "aware", 109 | "away", 110 | "baby", 111 | "back", 112 | "bad", 113 | "badly", 114 | "bag", 115 | "balance", 116 | "ball", 117 | "balloon", 118 | "band", 119 | "bank", 120 | "bar", 121 | "bare", 122 | "bark", 123 | "barn", 124 | "base", 125 | "baseball", 126 | "basic", 127 | "basis", 128 | "basket", 129 | "bat", 130 | "battle", 131 | "be", 132 | "bean", 133 | "bear", 134 | "beat", 135 | "beautiful", 136 | "beauty", 137 | "became", 138 | "because", 139 | "become", 140 | "becoming", 141 | "bee", 142 | "been", 143 | "before", 144 | "began", 145 | "beginning", 146 | "begun", 147 | "behavior", 148 | "behind", 149 | "being", 150 | "believed", 151 | "bell", 152 | "belong", 153 | "below", 154 | "belt", 155 | "bend", 156 | "beneath", 157 | "bent", 158 | "beside", 159 | "best", 160 | "bet", 161 | "better", 162 | "between", 163 | "beyond", 164 | "bicycle", 165 | "bigger", 166 | "biggest", 167 | "bill", 168 | "birds", 169 | "birth", 170 | "birthday", 171 | "bit", 172 | "bite", 173 | "black", 174 | "blank", 175 | "blanket", 176 | "blew", 177 | "blind", 178 | "block", 179 | "blood", 180 | "blow", 181 | "blue", 182 | "board", 183 | "boat", 184 | "body", 185 | "bone", 186 | "book", 187 | "border", 188 | "born", 189 | "both", 190 | "bottle", 191 | "bottom", 192 | "bound", 193 | "bow", 194 | "bowl", 195 | "box", 196 | "boy", 197 | "brain", 198 | "branch", 199 | "brass", 200 | "brave", 201 | "bread", 202 | "break", 203 | "breakfast", 204 | "breath", 205 | "breathe", 206 | "breathing", 207 | "breeze", 208 | "brick", 209 | "bridge", 210 | "brief", 211 | "bright", 212 | "bring", 213 | "broad", 214 | "broke", 215 | "broken", 216 | "brother", 217 | "brought", 218 | "brown", 219 | "brush", 220 | "buffalo", 221 | "build", 222 | "building", 223 | "built", 224 | "buried", 225 | "burn", 226 | "burst", 227 | "bus", 228 | "bush", 229 | "business", 230 | "busy", 231 | "but", 232 | "butter", 233 | "buy", 234 | "by", 235 | "cabin", 236 | "cage", 237 | "cake", 238 | "call", 239 | "calm", 240 | "came", 241 | "camera", 242 | "camp", 243 | "can", 244 | "canal", 245 | "cannot", 246 | "cap", 247 | "capital", 248 | "captain", 249 | "captured", 250 | "car", 251 | "carbon", 252 | "card", 253 | "care", 254 | "careful", 255 | "carefully", 256 | "carried", 257 | "carry", 258 | "case", 259 | "cast", 260 | "castle", 261 | "cat", 262 | "catch", 263 | "cattle", 264 | "caught", 265 | "cause", 266 | "cave", 267 | "cell", 268 | "cent", 269 | "center", 270 | "central", 271 | "century", 272 | "certain", 273 | "certainly", 274 | "chain", 275 | "chair", 276 | "chamber", 277 | "chance", 278 | "change", 279 | "changing", 280 | "chapter", 281 | "character", 282 | "characteristic", 283 | "charge", 284 | "chart", 285 | "check", 286 | "cheese", 287 | "chemical", 288 | "chest", 289 | "chicken", 290 | "chief", 291 | "child", 292 | "children", 293 | "choice", 294 | "choose", 295 | "chose", 296 | "chosen", 297 | "church", 298 | "circle", 299 | "circus", 300 | "citizen", 301 | "city", 302 | "class", 303 | "classroom", 304 | "claws", 305 | "clay", 306 | "clean", 307 | "clear", 308 | "clearly", 309 | "climate", 310 | "climb", 311 | "clock", 312 | "close", 313 | "closely", 314 | "closer", 315 | "cloth", 316 | "clothes", 317 | "clothing", 318 | "cloud", 319 | "club", 320 | "coach", 321 | "coal", 322 | "coast", 323 | "coat", 324 | "coffee", 325 | "cold", 326 | "collect", 327 | "college", 328 | "colony", 329 | "color", 330 | "column", 331 | "combination", 332 | "combine", 333 | "come", 334 | "comfortable", 335 | "coming", 336 | "command", 337 | "common", 338 | "community", 339 | "company", 340 | "compare", 341 | "compass", 342 | "complete", 343 | "completely", 344 | "complex", 345 | "composed", 346 | "composition", 347 | "compound", 348 | "concerned", 349 | "condition", 350 | "congress", 351 | "connected", 352 | "consider", 353 | "consist", 354 | "consonant", 355 | "constantly", 356 | "construction", 357 | "contain", 358 | "continent", 359 | "continued", 360 | "contrast", 361 | "control", 362 | "conversation", 363 | "cook", 364 | "cookies", 365 | "cool", 366 | "copper", 367 | "copy", 368 | "corn", 369 | "corner", 370 | "correct", 371 | "correctly", 372 | "cost", 373 | "cotton", 374 | "could", 375 | "count", 376 | "country", 377 | "couple", 378 | "courage", 379 | "course", 380 | "court", 381 | "cover", 382 | "cow", 383 | "cowboy", 384 | "crack", 385 | "cream", 386 | "create", 387 | "creature", 388 | "crew", 389 | "crop", 390 | "cross", 391 | "crowd", 392 | "cry", 393 | "cup", 394 | "curious", 395 | "current", 396 | "curve", 397 | "customs", 398 | "cut", 399 | "cutting", 400 | "daily", 401 | "damage", 402 | "dance", 403 | "danger", 404 | "dangerous", 405 | "dark", 406 | "darkness", 407 | "date", 408 | "daughter", 409 | "dawn", 410 | "day", 411 | "dead", 412 | "deal", 413 | "dear", 414 | "death", 415 | "decide", 416 | "declared", 417 | "deep", 418 | "deeply", 419 | "deer", 420 | "definition", 421 | "degree", 422 | "depend", 423 | "depth", 424 | "describe", 425 | "desert", 426 | "design", 427 | "desk", 428 | "detail", 429 | "determine", 430 | "develop", 431 | "development", 432 | "diagram", 433 | "diameter", 434 | "did", 435 | "die", 436 | "differ", 437 | "difference", 438 | "different", 439 | "difficult", 440 | "difficulty", 441 | "dig", 442 | "dinner", 443 | "direct", 444 | "direction", 445 | "directly", 446 | "dirt", 447 | "dirty", 448 | "disappear", 449 | "discover", 450 | "discovery", 451 | "discuss", 452 | "discussion", 453 | "disease", 454 | "dish", 455 | "distance", 456 | "distant", 457 | "divide", 458 | "division", 459 | "do", 460 | "doctor", 461 | "does", 462 | "dog", 463 | "doing", 464 | "doll", 465 | "dollar", 466 | "done", 467 | "donkey", 468 | "door", 469 | "dot", 470 | "double", 471 | "doubt", 472 | "down", 473 | "dozen", 474 | "draw", 475 | "drawn", 476 | "dream", 477 | "dress", 478 | "drew", 479 | "dried", 480 | "drink", 481 | "drive", 482 | "driven", 483 | "driver", 484 | "driving", 485 | "drop", 486 | "dropped", 487 | "drove", 488 | "dry", 489 | "duck", 490 | "due", 491 | "dug", 492 | "dull", 493 | "during", 494 | "dust", 495 | "duty", 496 | "each", 497 | "eager", 498 | "ear", 499 | "earlier", 500 | "early", 501 | "earn", 502 | "earth", 503 | "easier", 504 | "easily", 505 | "east", 506 | "easy", 507 | "eat", 508 | "eaten", 509 | "edge", 510 | "education", 511 | "effect", 512 | "effort", 513 | "egg", 514 | "eight", 515 | "either", 516 | "electric", 517 | "electricity", 518 | "element", 519 | "elephant", 520 | "eleven", 521 | "else", 522 | "empty", 523 | "end", 524 | "enemy", 525 | "energy", 526 | "engine", 527 | "engineer", 528 | "enjoy", 529 | "enough", 530 | "enter", 531 | "entire", 532 | "entirely", 533 | "environment", 534 | "equal", 535 | "equally", 536 | "equator", 537 | "equipment", 538 | "escape", 539 | "especially", 540 | "essential", 541 | "establish", 542 | "even", 543 | "evening", 544 | "event", 545 | "eventually", 546 | "ever", 547 | "every", 548 | "everybody", 549 | "everyone", 550 | "everything", 551 | "everywhere", 552 | "evidence", 553 | "exact", 554 | "exactly", 555 | "examine", 556 | "example", 557 | "excellent", 558 | "except", 559 | "exchange", 560 | "excited", 561 | "excitement", 562 | "exciting", 563 | "exclaimed", 564 | "exercise", 565 | "exist", 566 | "expect", 567 | "experience", 568 | "experiment", 569 | "explain", 570 | "explanation", 571 | "explore", 572 | "express", 573 | "expression", 574 | "extra", 575 | "eye", 576 | "face", 577 | "facing", 578 | "fact", 579 | "factor", 580 | "factory", 581 | "failed", 582 | "fair", 583 | "fairly", 584 | "fall", 585 | "fallen", 586 | "familiar", 587 | "family", 588 | "famous", 589 | "far", 590 | "farm", 591 | "farmer", 592 | "farther", 593 | "fast", 594 | "fastened", 595 | "faster", 596 | "fat", 597 | "father", 598 | "favorite", 599 | "fear", 600 | "feathers", 601 | "feature", 602 | "fed", 603 | "feed", 604 | "feel", 605 | "feet", 606 | "fell", 607 | "fellow", 608 | "felt", 609 | "fence", 610 | "few", 611 | "fewer", 612 | "field", 613 | "fierce", 614 | "fifteen", 615 | "fifth", 616 | "fifty", 617 | "fight", 618 | "fighting", 619 | "figure", 620 | "fill", 621 | "film", 622 | "final", 623 | "finally", 624 | "find", 625 | "fine", 626 | "finest", 627 | "finger", 628 | "finish", 629 | "fire", 630 | "fireplace", 631 | "firm", 632 | "first", 633 | "fish", 634 | "five", 635 | "fix", 636 | "flag", 637 | "flame", 638 | "flat", 639 | "flew", 640 | "flies", 641 | "flight", 642 | "floating", 643 | "floor", 644 | "flow", 645 | "flower", 646 | "fly", 647 | "fog", 648 | "folks", 649 | "follow", 650 | "food", 651 | "foot", 652 | "football", 653 | "for", 654 | "force", 655 | "foreign", 656 | "forest", 657 | "forget", 658 | "forgot", 659 | "forgotten", 660 | "form", 661 | "former", 662 | "fort", 663 | "forth", 664 | "forty", 665 | "forward", 666 | "fought", 667 | "found", 668 | "four", 669 | "fourth", 670 | "fox", 671 | "frame", 672 | "free", 673 | "freedom", 674 | "frequently", 675 | "fresh", 676 | "friend", 677 | "friendly", 678 | "frighten", 679 | "frog", 680 | "from", 681 | "front", 682 | "frozen", 683 | "fruit", 684 | "fuel", 685 | "full", 686 | "fully", 687 | "fun", 688 | "function", 689 | "funny", 690 | "fur", 691 | "furniture", 692 | "further", 693 | "future", 694 | "gain", 695 | "game", 696 | "garage", 697 | "garden", 698 | "gas", 699 | "gasoline", 700 | "gate", 701 | "gather", 702 | "gave", 703 | "general", 704 | "generally", 705 | "gentle", 706 | "gently", 707 | "get", 708 | "getting", 709 | "giant", 710 | "gift", 711 | "girl", 712 | "give", 713 | "given", 714 | "giving", 715 | "glad", 716 | "glass", 717 | "globe", 718 | "go", 719 | "goes", 720 | "gold", 721 | "golden", 722 | "gone", 723 | "good", 724 | "goose", 725 | "got", 726 | "government", 727 | "grabbed", 728 | "grade", 729 | "gradually", 730 | "grain", 731 | "grandfather", 732 | "grandmother", 733 | "graph", 734 | "grass", 735 | "gravity", 736 | "gray", 737 | "great", 738 | "greater", 739 | "greatest", 740 | "greatly", 741 | "green", 742 | "grew", 743 | "ground", 744 | "group", 745 | "grow", 746 | "grown", 747 | "growth", 748 | "guard", 749 | "guess", 750 | "guide", 751 | "gulf", 752 | "gun", 753 | "habit", 754 | "had", 755 | "hair", 756 | "half", 757 | "halfway", 758 | "hall", 759 | "hand", 760 | "handle", 761 | "handsome", 762 | "hang", 763 | "happen", 764 | "happened", 765 | "happily", 766 | "happy", 767 | "harbor", 768 | "hard", 769 | "harder", 770 | "hardly", 771 | "has", 772 | "hat", 773 | "have", 774 | "having", 775 | "hay", 776 | "he", 777 | "headed", 778 | "heading", 779 | "health", 780 | "heard", 781 | "hearing", 782 | "heart", 783 | "heat", 784 | "heavy", 785 | "height", 786 | "held", 787 | "hello", 788 | "help", 789 | "helpful", 790 | "her", 791 | "herd", 792 | "here", 793 | "herself", 794 | "hidden", 795 | "hide", 796 | "high", 797 | "higher", 798 | "highest", 799 | "highway", 800 | "hill", 801 | "him", 802 | "himself", 803 | "his", 804 | "history", 805 | "hit", 806 | "hold", 807 | "hole", 808 | "hollow", 809 | "home", 810 | "honor", 811 | "hope", 812 | "horn", 813 | "horse", 814 | "hospital", 815 | "hot", 816 | "hour", 817 | "house", 818 | "how", 819 | "however", 820 | "huge", 821 | "human", 822 | "hundred", 823 | "hung", 824 | "hungry", 825 | "hunt", 826 | "hunter", 827 | "hurried", 828 | "hurry", 829 | "hurt", 830 | "husband", 831 | "ice", 832 | "idea", 833 | "identity", 834 | "if", 835 | "ill", 836 | "image", 837 | "imagine", 838 | "immediately", 839 | "importance", 840 | "important", 841 | "impossible", 842 | "improve", 843 | "in", 844 | "inch", 845 | "include", 846 | "including", 847 | "income", 848 | "increase", 849 | "indeed", 850 | "independent", 851 | "indicate", 852 | "individual", 853 | "industrial", 854 | "industry", 855 | "influence", 856 | "information", 857 | "inside", 858 | "instance", 859 | "instant", 860 | "instead", 861 | "instrument", 862 | "interest", 863 | "interior", 864 | "into", 865 | "introduced", 866 | "invented", 867 | "involved", 868 | "iron", 869 | "is", 870 | "island", 871 | "it", 872 | "its", 873 | "itself", 874 | "jack", 875 | "jar", 876 | "jet", 877 | "job", 878 | "join", 879 | "joined", 880 | "journey", 881 | "joy", 882 | "judge", 883 | "jump", 884 | "jungle", 885 | "just", 886 | "keep", 887 | "kept", 888 | "key", 889 | "kids", 890 | "kill", 891 | "kind", 892 | "kitchen", 893 | "knew", 894 | "knife", 895 | "know", 896 | "knowledge", 897 | "known", 898 | "label", 899 | "labor", 900 | "lack", 901 | "lady", 902 | "laid", 903 | "lake", 904 | "lamp", 905 | "land", 906 | "language", 907 | "large", 908 | "larger", 909 | "largest", 910 | "last", 911 | "late", 912 | "later", 913 | "laugh", 914 | "law", 915 | "lay", 916 | "layers", 917 | "lead", 918 | "leader", 919 | "leaf", 920 | "learn", 921 | "least", 922 | "leather", 923 | "leave", 924 | "leaving", 925 | "led", 926 | "left", 927 | "leg", 928 | "length", 929 | "lesson", 930 | "let", 931 | "letter", 932 | "level", 933 | "library", 934 | "lie", 935 | "life", 936 | "lift", 937 | "light", 938 | "like", 939 | "likely", 940 | "limited", 941 | "line", 942 | "lion", 943 | "lips", 944 | "liquid", 945 | "list", 946 | "listen", 947 | "little", 948 | "live", 949 | "living", 950 | "load", 951 | "local", 952 | "locate", 953 | "location", 954 | "log", 955 | "lonely", 956 | "long", 957 | "longer", 958 | "look", 959 | "loose", 960 | "lose", 961 | "loss", 962 | "lost", 963 | "lot", 964 | "loud", 965 | "love", 966 | "lovely", 967 | "low", 968 | "lower", 969 | "luck", 970 | "lucky", 971 | "lunch", 972 | "lungs", 973 | "lying", 974 | "machine", 975 | "machinery", 976 | "mad", 977 | "made", 978 | "magic", 979 | "magnet", 980 | "mail", 981 | "main", 982 | "mainly", 983 | "major", 984 | "make", 985 | "making", 986 | "man", 987 | "managed", 988 | "manner", 989 | "manufacturing", 990 | "many", 991 | "map", 992 | "mark", 993 | "market", 994 | "married", 995 | "mass", 996 | "massage", 997 | "master", 998 | "material", 999 | "mathematics", 1000 | "matter", 1001 | "may", 1002 | "maybe", 1003 | "me", 1004 | "meal", 1005 | "mean", 1006 | "means", 1007 | "meant", 1008 | "measure", 1009 | "meat", 1010 | "medicine", 1011 | "meet", 1012 | "melted", 1013 | "member", 1014 | "memory", 1015 | "men", 1016 | "mental", 1017 | "merely", 1018 | "met", 1019 | "metal", 1020 | "method", 1021 | "mice", 1022 | "middle", 1023 | "might", 1024 | "mighty", 1025 | "mile", 1026 | "military", 1027 | "milk", 1028 | "mill", 1029 | "mind", 1030 | "mine", 1031 | "minerals", 1032 | "minute", 1033 | "mirror", 1034 | "missing", 1035 | "mission", 1036 | "mistake", 1037 | "mix", 1038 | "mixture", 1039 | "model", 1040 | "modern", 1041 | "molecular", 1042 | "moment", 1043 | "money", 1044 | "monkey", 1045 | "month", 1046 | "mood", 1047 | "moon", 1048 | "more", 1049 | "morning", 1050 | "most", 1051 | "mostly", 1052 | "mother", 1053 | "motion", 1054 | "motor", 1055 | "mountain", 1056 | "mouse", 1057 | "mouth", 1058 | "move", 1059 | "movement", 1060 | "movie", 1061 | "moving", 1062 | "mud", 1063 | "muscle", 1064 | "music", 1065 | "musical", 1066 | "must", 1067 | "my", 1068 | "myself", 1069 | "mysterious", 1070 | "nails", 1071 | "name", 1072 | "nation", 1073 | "national", 1074 | "native", 1075 | "natural", 1076 | "naturally", 1077 | "nature", 1078 | "near", 1079 | "nearby", 1080 | "nearer", 1081 | "nearest", 1082 | "nearly", 1083 | "necessary", 1084 | "neck", 1085 | "needed", 1086 | "needle", 1087 | "needs", 1088 | "negative", 1089 | "neighbor", 1090 | "neighborhood", 1091 | "nervous", 1092 | "nest", 1093 | "never", 1094 | "new", 1095 | "news", 1096 | "newspaper", 1097 | "next", 1098 | "nice", 1099 | "night", 1100 | "nine", 1101 | "no", 1102 | "nobody", 1103 | "nodded", 1104 | "noise", 1105 | "none", 1106 | "noon", 1107 | "nor", 1108 | "north", 1109 | "nose", 1110 | "not", 1111 | "note", 1112 | "noted", 1113 | "nothing", 1114 | "notice", 1115 | "noun", 1116 | "now", 1117 | "number", 1118 | "numeral", 1119 | "nuts", 1120 | "object", 1121 | "observe", 1122 | "obtain", 1123 | "occasionally", 1124 | "occur", 1125 | "ocean", 1126 | "of", 1127 | "off", 1128 | "offer", 1129 | "office", 1130 | "officer", 1131 | "official", 1132 | "oil", 1133 | "old", 1134 | "older", 1135 | "oldest", 1136 | "on", 1137 | "once", 1138 | "one", 1139 | "only", 1140 | "onto", 1141 | "open", 1142 | "operation", 1143 | "opinion", 1144 | "opportunity", 1145 | "opposite", 1146 | "or", 1147 | "orange", 1148 | "orbit", 1149 | "order", 1150 | "ordinary", 1151 | "organization", 1152 | "organized", 1153 | "origin", 1154 | "original", 1155 | "other", 1156 | "ought", 1157 | "our", 1158 | "ourselves", 1159 | "out", 1160 | "outer", 1161 | "outline", 1162 | "outside", 1163 | "over", 1164 | "own", 1165 | "owner", 1166 | "oxygen", 1167 | "pack", 1168 | "package", 1169 | "page", 1170 | "paid", 1171 | "pain", 1172 | "paint", 1173 | "pair", 1174 | "palace", 1175 | "pale", 1176 | "pan", 1177 | "paper", 1178 | "paragraph", 1179 | "parallel", 1180 | "parent", 1181 | "park", 1182 | "part", 1183 | "particles", 1184 | "particular", 1185 | "particularly", 1186 | "partly", 1187 | "parts", 1188 | "party", 1189 | "pass", 1190 | "passage", 1191 | "past", 1192 | "path", 1193 | "pattern", 1194 | "pay", 1195 | "peace", 1196 | "pen", 1197 | "pencil", 1198 | "people", 1199 | "per", 1200 | "percent", 1201 | "perfect", 1202 | "perfectly", 1203 | "perhaps", 1204 | "period", 1205 | "person", 1206 | "personal", 1207 | "pet", 1208 | "phrase", 1209 | "physical", 1210 | "piano", 1211 | "pick", 1212 | "picture", 1213 | "pictured", 1214 | "pie", 1215 | "piece", 1216 | "pig", 1217 | "pile", 1218 | "pilot", 1219 | "pine", 1220 | "pink", 1221 | "pipe", 1222 | "pitch", 1223 | "place", 1224 | "plain", 1225 | "plan", 1226 | "plane", 1227 | "planet", 1228 | "planned", 1229 | "planning", 1230 | "plant", 1231 | "plastic", 1232 | "plate", 1233 | "plates", 1234 | "play", 1235 | "pleasant", 1236 | "please", 1237 | "pleasure", 1238 | "plenty", 1239 | "plural", 1240 | "plus", 1241 | "pocket", 1242 | "poem", 1243 | "poet", 1244 | "poetry", 1245 | "point", 1246 | "pole", 1247 | "police", 1248 | "policeman", 1249 | "political", 1250 | "pond", 1251 | "pony", 1252 | "pool", 1253 | "poor", 1254 | "popular", 1255 | "population", 1256 | "porch", 1257 | "port", 1258 | "position", 1259 | "positive", 1260 | "possible", 1261 | "possibly", 1262 | "post", 1263 | "pot", 1264 | "potatoes", 1265 | "pound", 1266 | "pour", 1267 | "powder", 1268 | "power", 1269 | "powerful", 1270 | "practical", 1271 | "practice", 1272 | "prepare", 1273 | "present", 1274 | "president", 1275 | "press", 1276 | "pressure", 1277 | "pretty", 1278 | "prevent", 1279 | "previous", 1280 | "price", 1281 | "pride", 1282 | "primitive", 1283 | "principal", 1284 | "principle", 1285 | "printed", 1286 | "private", 1287 | "prize", 1288 | "probably", 1289 | "problem", 1290 | "process", 1291 | "produce", 1292 | "product", 1293 | "production", 1294 | "program", 1295 | "progress", 1296 | "promised", 1297 | "proper", 1298 | "properly", 1299 | "property", 1300 | "protection", 1301 | "proud", 1302 | "prove", 1303 | "provide", 1304 | "public", 1305 | "pull", 1306 | "pupil", 1307 | "pure", 1308 | "purple", 1309 | "purpose", 1310 | "push", 1311 | "put", 1312 | "putting", 1313 | "quarter", 1314 | "queen", 1315 | "question", 1316 | "quick", 1317 | "quickly", 1318 | "quiet", 1319 | "quietly", 1320 | "quite", 1321 | "rabbit", 1322 | "race", 1323 | "radio", 1324 | "railroad", 1325 | "rain", 1326 | "raise", 1327 | "ran", 1328 | "ranch", 1329 | "range", 1330 | "rapidly", 1331 | "rate", 1332 | "rather", 1333 | "raw", 1334 | "rays", 1335 | "reach", 1336 | "read", 1337 | "reader", 1338 | "ready", 1339 | "real", 1340 | "realize", 1341 | "rear", 1342 | "reason", 1343 | "recall", 1344 | "receive", 1345 | "recent", 1346 | "recently", 1347 | "recognize", 1348 | "record", 1349 | "red", 1350 | "refer", 1351 | "refused", 1352 | "region", 1353 | "regular", 1354 | "related", 1355 | "relationship", 1356 | "religious", 1357 | "remain", 1358 | "remarkable", 1359 | "remember", 1360 | "remove", 1361 | "repeat", 1362 | "replace", 1363 | "replied", 1364 | "report", 1365 | "represent", 1366 | "require", 1367 | "research", 1368 | "respect", 1369 | "rest", 1370 | "result", 1371 | "return", 1372 | "review", 1373 | "rhyme", 1374 | "rhythm", 1375 | "rice", 1376 | "rich", 1377 | "ride", 1378 | "riding", 1379 | "right", 1380 | "ring", 1381 | "rise", 1382 | "rising", 1383 | "river", 1384 | "road", 1385 | "roar", 1386 | "rock", 1387 | "rocket", 1388 | "rocky", 1389 | "rod", 1390 | "roll", 1391 | "roof", 1392 | "room", 1393 | "root", 1394 | "rope", 1395 | "rose", 1396 | "rough", 1397 | "round", 1398 | "route", 1399 | "row", 1400 | "rubbed", 1401 | "rubber", 1402 | "rule", 1403 | "ruler", 1404 | "run", 1405 | "running", 1406 | "rush", 1407 | "sad", 1408 | "saddle", 1409 | "safe", 1410 | "safety", 1411 | "said", 1412 | "sail", 1413 | "sale", 1414 | "salmon", 1415 | "salt", 1416 | "same", 1417 | "sand", 1418 | "sang", 1419 | "sat", 1420 | "satellites", 1421 | "satisfied", 1422 | "save", 1423 | "saved", 1424 | "saw", 1425 | "say", 1426 | "scale", 1427 | "scared", 1428 | "scene", 1429 | "school", 1430 | "science", 1431 | "scientific", 1432 | "scientist", 1433 | "score", 1434 | "screen", 1435 | "sea", 1436 | "search", 1437 | "season", 1438 | "seat", 1439 | "second", 1440 | "secret", 1441 | "section", 1442 | "see", 1443 | "seed", 1444 | "seeing", 1445 | "seems", 1446 | "seen", 1447 | "seldom", 1448 | "select", 1449 | "selection", 1450 | "sell", 1451 | "send", 1452 | "sense", 1453 | "sent", 1454 | "sentence", 1455 | "separate", 1456 | "series", 1457 | "serious", 1458 | "serve", 1459 | "service", 1460 | "sets", 1461 | "setting", 1462 | "settle", 1463 | "settlers", 1464 | "seven", 1465 | "several", 1466 | "shade", 1467 | "shadow", 1468 | "shake", 1469 | "shaking", 1470 | "shall", 1471 | "shallow", 1472 | "shape", 1473 | "share", 1474 | "sharp", 1475 | "she", 1476 | "sheep", 1477 | "sheet", 1478 | "shelf", 1479 | "shells", 1480 | "shelter", 1481 | "shine", 1482 | "shinning", 1483 | "ship", 1484 | "shirt", 1485 | "shoe", 1486 | "shoot", 1487 | "shop", 1488 | "shore", 1489 | "short", 1490 | "shorter", 1491 | "shot", 1492 | "should", 1493 | "shoulder", 1494 | "shout", 1495 | "show", 1496 | "shown", 1497 | "shut", 1498 | "sick", 1499 | "sides", 1500 | "sight", 1501 | "sign", 1502 | "signal", 1503 | "silence", 1504 | "silent", 1505 | "silk", 1506 | "silly", 1507 | "silver", 1508 | "similar", 1509 | "simple", 1510 | "simplest", 1511 | "simply", 1512 | "since", 1513 | "sing", 1514 | "single", 1515 | "sink", 1516 | "sister", 1517 | "sit", 1518 | "sitting", 1519 | "situation", 1520 | "six", 1521 | "size", 1522 | "skill", 1523 | "skin", 1524 | "sky", 1525 | "slabs", 1526 | "slave", 1527 | "sleep", 1528 | "slept", 1529 | "slide", 1530 | "slight", 1531 | "slightly", 1532 | "slip", 1533 | "slipped", 1534 | "slope", 1535 | "slow", 1536 | "slowly", 1537 | "small", 1538 | "smaller", 1539 | "smallest", 1540 | "smell", 1541 | "smile", 1542 | "smoke", 1543 | "smooth", 1544 | "snake", 1545 | "snow", 1546 | "so", 1547 | "soap", 1548 | "social", 1549 | "society", 1550 | "soft", 1551 | "softly", 1552 | "soil", 1553 | "solar", 1554 | "sold", 1555 | "soldier", 1556 | "solid", 1557 | "solution", 1558 | "solve", 1559 | "some", 1560 | "somebody", 1561 | "somehow", 1562 | "someone", 1563 | "something", 1564 | "sometime", 1565 | "somewhere", 1566 | "son", 1567 | "song", 1568 | "soon", 1569 | "sort", 1570 | "sound", 1571 | "source", 1572 | "south", 1573 | "southern", 1574 | "space", 1575 | "speak", 1576 | "special", 1577 | "species", 1578 | "specific", 1579 | "speech", 1580 | "speed", 1581 | "spell", 1582 | "spend", 1583 | "spent", 1584 | "spider", 1585 | "spin", 1586 | "spirit", 1587 | "spite", 1588 | "split", 1589 | "spoken", 1590 | "sport", 1591 | "spread", 1592 | "spring", 1593 | "square", 1594 | "stage", 1595 | "stairs", 1596 | "stand", 1597 | "standard", 1598 | "star", 1599 | "stared", 1600 | "start", 1601 | "state", 1602 | "statement", 1603 | "station", 1604 | "stay", 1605 | "steady", 1606 | "steam", 1607 | "steel", 1608 | "steep", 1609 | "stems", 1610 | "step", 1611 | "stepped", 1612 | "stick", 1613 | "stiff", 1614 | "still", 1615 | "stock", 1616 | "stomach", 1617 | "stone", 1618 | "stood", 1619 | "stop", 1620 | "stopped", 1621 | "store", 1622 | "storm", 1623 | "story", 1624 | "stove", 1625 | "straight", 1626 | "strange", 1627 | "stranger", 1628 | "straw", 1629 | "stream", 1630 | "street", 1631 | "strength", 1632 | "stretch", 1633 | "strike", 1634 | "string", 1635 | "strip", 1636 | "strong", 1637 | "stronger", 1638 | "struck", 1639 | "structure", 1640 | "struggle", 1641 | "stuck", 1642 | "student", 1643 | "studied", 1644 | "studying", 1645 | "subject", 1646 | "substance", 1647 | "success", 1648 | "successful", 1649 | "such", 1650 | "sudden", 1651 | "suddenly", 1652 | "sugar", 1653 | "suggest", 1654 | "suit", 1655 | "sum", 1656 | "summer", 1657 | "sun", 1658 | "sunlight", 1659 | "supper", 1660 | "supply", 1661 | "support", 1662 | "suppose", 1663 | "sure", 1664 | "surface", 1665 | "surprise", 1666 | "surrounded", 1667 | "swam", 1668 | "sweet", 1669 | "swept", 1670 | "swim", 1671 | "swimming", 1672 | "swing", 1673 | "swung", 1674 | "syllable", 1675 | "symbol", 1676 | "system", 1677 | "table", 1678 | "tail", 1679 | "take", 1680 | "taken", 1681 | "tales", 1682 | "talk", 1683 | "tall", 1684 | "tank", 1685 | "tape", 1686 | "task", 1687 | "taste", 1688 | "taught", 1689 | "tax", 1690 | "tea", 1691 | "teach", 1692 | "teacher", 1693 | "team", 1694 | "tears", 1695 | "teeth", 1696 | "telephone", 1697 | "television", 1698 | "tell", 1699 | "temperature", 1700 | "ten", 1701 | "tent", 1702 | "term", 1703 | "terrible", 1704 | "test", 1705 | "than", 1706 | "thank", 1707 | "that", 1708 | "thee", 1709 | "them", 1710 | "themselves", 1711 | "then", 1712 | "theory", 1713 | "there", 1714 | "therefore", 1715 | "these", 1716 | "they", 1717 | "thick", 1718 | "thin", 1719 | "thing", 1720 | "think", 1721 | "third", 1722 | "thirty", 1723 | "this", 1724 | "those", 1725 | "thou", 1726 | "though", 1727 | "thought", 1728 | "thousand", 1729 | "thread", 1730 | "three", 1731 | "threw", 1732 | "throat", 1733 | "through", 1734 | "throughout", 1735 | "throw", 1736 | "thrown", 1737 | "thumb", 1738 | "thus", 1739 | "thy", 1740 | "tide", 1741 | "tie", 1742 | "tight", 1743 | "tightly", 1744 | "till", 1745 | "time", 1746 | "tin", 1747 | "tiny", 1748 | "tip", 1749 | "tired", 1750 | "title", 1751 | "to", 1752 | "tobacco", 1753 | "today", 1754 | "together", 1755 | "told", 1756 | "tomorrow", 1757 | "tone", 1758 | "tongue", 1759 | "tonight", 1760 | "too", 1761 | "took", 1762 | "tool", 1763 | "top", 1764 | "topic", 1765 | "torn", 1766 | "total", 1767 | "touch", 1768 | "toward", 1769 | "tower", 1770 | "town", 1771 | "toy", 1772 | "trace", 1773 | "track", 1774 | "trade", 1775 | "traffic", 1776 | "trail", 1777 | "train", 1778 | "transportation", 1779 | "trap", 1780 | "travel", 1781 | "treated", 1782 | "tree", 1783 | "triangle", 1784 | "tribe", 1785 | "trick", 1786 | "tried", 1787 | "trip", 1788 | "troops", 1789 | "tropical", 1790 | "trouble", 1791 | "truck", 1792 | "trunk", 1793 | "truth", 1794 | "try", 1795 | "tube", 1796 | "tune", 1797 | "turn", 1798 | "twelve", 1799 | "twenty", 1800 | "twice", 1801 | "two", 1802 | "type", 1803 | "typical", 1804 | "uncle", 1805 | "under", 1806 | "underline", 1807 | "understanding", 1808 | "unhappy", 1809 | "union", 1810 | "unit", 1811 | "universe", 1812 | "unknown", 1813 | "unless", 1814 | "until", 1815 | "unusual", 1816 | "up", 1817 | "upon", 1818 | "upper", 1819 | "upward", 1820 | "us", 1821 | "use", 1822 | "useful", 1823 | "using", 1824 | "usual", 1825 | "usually", 1826 | "valley", 1827 | "valuable", 1828 | "value", 1829 | "vapor", 1830 | "variety", 1831 | "various", 1832 | "vast", 1833 | "vegetable", 1834 | "verb", 1835 | "vertical", 1836 | "very", 1837 | "vessels", 1838 | "victory", 1839 | "view", 1840 | "village", 1841 | "visit", 1842 | "visitor", 1843 | "voice", 1844 | "volume", 1845 | "vote", 1846 | "vowel", 1847 | "voyage", 1848 | "wagon", 1849 | "wait", 1850 | "walk", 1851 | "wall", 1852 | "want", 1853 | "war", 1854 | "warm", 1855 | "warn", 1856 | "was", 1857 | "wash", 1858 | "waste", 1859 | "watch", 1860 | "water", 1861 | "wave", 1862 | "way", 1863 | "we", 1864 | "weak", 1865 | "wealth", 1866 | "wear", 1867 | "weather", 1868 | "week", 1869 | "weigh", 1870 | "weight", 1871 | "welcome", 1872 | "well", 1873 | "went", 1874 | "were", 1875 | "west", 1876 | "western", 1877 | "wet", 1878 | "whale", 1879 | "what", 1880 | "whatever", 1881 | "wheat", 1882 | "wheel", 1883 | "when", 1884 | "whenever", 1885 | "where", 1886 | "wherever", 1887 | "whether", 1888 | "which", 1889 | "while", 1890 | "whispered", 1891 | "whistle", 1892 | "white", 1893 | "who", 1894 | "whole", 1895 | "whom", 1896 | "whose", 1897 | "why", 1898 | "wide", 1899 | "widely", 1900 | "wife", 1901 | "wild", 1902 | "will", 1903 | "willing", 1904 | "win", 1905 | "wind", 1906 | "window", 1907 | "wing", 1908 | "winter", 1909 | "wire", 1910 | "wise", 1911 | "wish", 1912 | "with", 1913 | "within", 1914 | "without", 1915 | "wolf", 1916 | "women", 1917 | "won", 1918 | "wonder", 1919 | "wonderful", 1920 | "wood", 1921 | "wooden", 1922 | "wool", 1923 | "word", 1924 | "wore", 1925 | "work", 1926 | "worker", 1927 | "world", 1928 | "worried", 1929 | "worry", 1930 | "worse", 1931 | "worth", 1932 | "would", 1933 | "wrapped", 1934 | "write", 1935 | "writer", 1936 | "writing", 1937 | "written", 1938 | "wrong", 1939 | "wrote", 1940 | "yard", 1941 | "year", 1942 | "yellow", 1943 | "yes", 1944 | "yesterday", 1945 | "yet", 1946 | "you", 1947 | "young", 1948 | "younger", 1949 | "your", 1950 | "yourself", 1951 | "youth", 1952 | "zero", 1953 | "zebra", 1954 | "zipper", 1955 | "zoo", 1956 | "zulu", 1957 | ]; 1958 | 1959 | const shortestWordSize = wordList.reduce((shortestWord, currentWord) => 1960 | currentWord.length < shortestWord.length ? currentWord : shortestWord 1961 | ).length; 1962 | 1963 | const longestWordSize = wordList.reduce((longestWord, currentWord) => 1964 | currentWord.length > longestWord.length ? currentWord : longestWord 1965 | ).length; 1966 | 1967 | export function generate(options) { 1968 | // initalize random number generator for words if options.seed is provided 1969 | const random = options?.seed ? new seedrandom(options.seed) : null; 1970 | 1971 | const { minLength, maxLength, ...rest } = options || {}; 1972 | 1973 | function word() { 1974 | let min = 1975 | typeof minLength !== "number" 1976 | ? shortestWordSize 1977 | : limitWordSize(minLength); 1978 | 1979 | const max = 1980 | typeof maxLength !== "number" 1981 | ? longestWordSize 1982 | : limitWordSize(maxLength); 1983 | 1984 | if (min > max) min = max; 1985 | 1986 | let rightSize = false; 1987 | let wordUsed; 1988 | while (!rightSize) { 1989 | wordUsed = generateRandomWord(); 1990 | rightSize = wordUsed.length <= max && wordUsed.length >= min; 1991 | } 1992 | return wordUsed; 1993 | } 1994 | 1995 | function generateRandomWord() { 1996 | return wordList[randInt(wordList.length)]; 1997 | } 1998 | 1999 | // limits the size of words to the minimum and maximum possible 2000 | function limitWordSize(wordSize) { 2001 | if (wordSize < shortestWordSize) wordSize = shortestWordSize; 2002 | if (wordSize > longestWordSize) wordSize = longestWordSize; 2003 | return wordSize; 2004 | } 2005 | 2006 | // random int as seeded by options.seed if applicable, or Math.random() otherwise 2007 | function randInt(lessThan) { 2008 | const r = random ? random() : Math.random(); 2009 | return Math.floor(r * lessThan); 2010 | } 2011 | 2012 | // No arguments = generate one word 2013 | if (options === undefined) { 2014 | return word(); 2015 | } 2016 | 2017 | // Just a number = return that many words 2018 | if (typeof options === "number") { 2019 | options = { exactly: options }; 2020 | } else if (Object.keys(rest).length === 0) { 2021 | return word(); 2022 | } 2023 | 2024 | // options supported: exactly, min, max, join 2025 | if (options.exactly) { 2026 | options.min = options.exactly; 2027 | options.max = options.exactly; 2028 | } 2029 | 2030 | // not a number = one word par string 2031 | if (typeof options.wordsPerString !== "number") { 2032 | options.wordsPerString = 1; 2033 | } 2034 | 2035 | //not a function = returns the raw word 2036 | if (typeof options.formatter !== "function") { 2037 | options.formatter = (word) => word; 2038 | } 2039 | 2040 | //not a string = separator is a space 2041 | if (typeof options.separator !== "string") { 2042 | options.separator = " "; 2043 | } 2044 | 2045 | const total = options.min + randInt(options.max + 1 - options.min); 2046 | let results = []; 2047 | let token = ""; 2048 | let relativeIndex = 0; 2049 | 2050 | for (let i = 0; i < total * options.wordsPerString; i++) { 2051 | if (relativeIndex === options.wordsPerString - 1) { 2052 | token += options.formatter(word(), relativeIndex); 2053 | } else { 2054 | token += options.formatter(word(), relativeIndex) + options.separator; 2055 | } 2056 | relativeIndex++; 2057 | if ((i + 1) % options.wordsPerString === 0) { 2058 | results.push(token); 2059 | token = ""; 2060 | relativeIndex = 0; 2061 | } 2062 | } 2063 | if (typeof options.join === "string") { 2064 | results = results.join(options.join); 2065 | } 2066 | 2067 | return results; 2068 | } 2069 | 2070 | export function count(options) { 2071 | let { minLength, maxLength } = options || {}; 2072 | 2073 | if (typeof minLength !== "number") { 2074 | minLength = shortestWordSize; 2075 | } 2076 | 2077 | if (typeof maxLength !== "number") { 2078 | maxLength = longestWordSize; 2079 | } 2080 | 2081 | return wordList.filter( 2082 | (word) => word.length >= minLength && word.length <= maxLength 2083 | ).length; 2084 | } 2085 | --------------------------------------------------------------------------------