GeetaAIVisionary commited on
Commit
31069c2
Β·
verified Β·
1 Parent(s): 4634c07

Upload 3 files

Browse files
Files changed (3) hide show
  1. README.md +2 -31
  2. spelling_words.csv +501 -0
  3. word_finder.py +54 -0
README.md CHANGED
@@ -1,31 +1,2 @@
1
- ---
2
- license: mit
3
- ---
4
- # 🐝 Spelling Bee AI Word Finder (Powered by Python + OpenAI)
5
-
6
- This project helps Spelling Bee students efficiently search and navigate large word lists using an AI-powered keyword matching and scoring system.
7
-
8
- As a mother of two Spelling Bee kids and a Senior Cloud & Streaming Architect transitioning into AI/ML, I built this project to demonstrate real-world applications of language models and search intelligence.
9
-
10
- ## πŸ” Use Case
11
-
12
- - Helps kids search for related words based on partial input
13
- - Uses GPT-style prompts and fuzzy match logic for intelligent filtering
14
- - Ideal for vocabulary prep, educational enrichment, and smart search
15
-
16
- ## πŸ’‘ How It Works
17
-
18
- - Takes input from the user (word part or keyword)
19
- - Uses Python logic + optional OpenAI prompt engineering
20
- - Scores and ranks matched words from predefined lists
21
- - Can be enhanced with GPT-4 APIs for intelligent reasoning
22
-
23
- ## πŸ› οΈ Technologies Used
24
-
25
- - Python (Core logic)
26
- - OpenAI API (for enhanced matching)
27
- - CLI Interface
28
- - Hugging Face Hub (Model hosting)
29
-
30
- ## πŸ“ File Structure
31
-
 
1
+ # ai-spelling-bee-word-finder
2
+ Simple AI-powered Word Search Engine for Spelling Bee Kids using Python and NLP fuzzy matching
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
spelling_words.csv ADDED
@@ -0,0 +1,501 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Word
2
+ agon
3
+ agonic
4
+ agonize
5
+ agony
6
+ agora
7
+ agora
8
+ agoraphobia
9
+ agranulocytosis
10
+ agrarian
11
+ agravic
12
+ agree
13
+ agreeable
14
+ agribusiness
15
+ agriculture
16
+ agriology
17
+ agriotype
18
+ agrogorod
19
+ agronome
20
+ agronomist
21
+ agronomy
22
+ aguaji
23
+ aguish
24
+ ahead
25
+ ahem
26
+ ahimsa
27
+ ahorse
28
+ aiguille
29
+ aiguillette
30
+ aikido
31
+ ailanthus
32
+ aileron
33
+ ailment
34
+ aioli
35
+ airborne
36
+ airbrush
37
+ airbus
38
+ aircraft
39
+ airedale
40
+ airfoil
41
+ airframe
42
+ airport
43
+ airsickness
44
+ airstream
45
+ airtight
46
+ aisle
47
+ aisling
48
+ aitch
49
+ aition
50
+ akaryote
51
+ akimbo
52
+ akin
53
+ akinesia
54
+ akropodion
55
+ aktograph
56
+ alabaster
57
+ alacrity
58
+ alar
59
+ alarmable
60
+ alarmist
61
+ alary
62
+ alas
63
+ alba
64
+ albacore
65
+ albarium
66
+ albatross
67
+ albedo
68
+ albedometer
69
+ albeit
70
+ albino
71
+ album
72
+ alburnum
73
+ alcarraza
74
+ alcazar
75
+ alchemy
76
+ alcogel
77
+ alcohol
78
+ alcoholature
79
+ alcoholism
80
+ alcove
81
+ aldehyde
82
+ alder
83
+ alderman
84
+ aldosterone
85
+ aleatoric
86
+ aleatory
87
+ alee
88
+ alegar
89
+ alembic
90
+ alepidote
91
+ aleuronat
92
+ alewife
93
+ alexandrite
94
+ alexia
95
+ alfalfa
96
+ alfresco
97
+ algae
98
+ algebra
99
+ algebraically
100
+ algerian
101
+ algesia
102
+ algetic
103
+ algid
104
+ algometer
105
+ algorithm
106
+ alias
107
+ alibi
108
+ alien
109
+ alienage
110
+ alienation
111
+ aliferous
112
+ align
113
+ alike
114
+ alimentary
115
+ alimony
116
+ aliphatic
117
+ aliquant
118
+ aliquot
119
+ alison
120
+ aliteracy
121
+ aliunde
122
+ aliveness
123
+ alkalescence
124
+ alkali
125
+ alkalify
126
+ alkaline
127
+ alkane
128
+ alkyd
129
+ allargando
130
+ allay
131
+ allayment
132
+ allegation
133
+ allege
134
+ allege
135
+ allegeable
136
+ allegedly
137
+ allegiance
138
+ allegiant
139
+ allegorist
140
+ allegorize
141
+ allegory
142
+ allegretto
143
+ allegro
144
+ allemande
145
+ allergenic
146
+ allergy
147
+ alleviant
148
+ alleviate
149
+ alleyway
150
+ alliaceous
151
+ alliance
152
+ allied
153
+ alligator
154
+ allision
155
+ alliteration
156
+ allocate
157
+ allocution
158
+ allonym
159
+ allopelagic
160
+ allot
161
+ allotment
162
+ allotropic
163
+ allotropy
164
+ allotted
165
+ allowable
166
+ alloy
167
+ allspice
168
+ alluded
169
+ allure
170
+ allusion
171
+ allusively
172
+ alluvial
173
+ alluviation
174
+ alluvium
175
+ ally
176
+ almanac
177
+ almandite
178
+ almighty
179
+ almond
180
+ almoner
181
+ alms
182
+ almuerzo
183
+ alnico
184
+ aloe
185
+ aloft
186
+ alogia
187
+ alogism
188
+ aloha
189
+ aloisiite
190
+ alongside
191
+ aloof
192
+ alopecia
193
+ alopecoid
194
+ alpaca
195
+ alpenglow
196
+ alpestrine
197
+ alphabetical
198
+ alphabetize
199
+ alphagram
200
+ alphanumerical
201
+ alpine
202
+ altarpiece
203
+ altazimuth
204
+ altercation
205
+ alternate
206
+ alternative
207
+ alternativity
208
+ althorn
209
+ although
210
+ altigraph
211
+ altimeter
212
+ altimetry
213
+ altiplanation
214
+ altiplano
215
+ altitude
216
+ alto
217
+ altocumulus
218
+ altogether
219
+ altostratus
220
+ altricial
221
+ altruism
222
+ altruistic
223
+ alum
224
+ aluminiferous
225
+ aluminotype
226
+ aluminous
227
+ aluminum
228
+ alumnus
229
+ alveolar
230
+ alveolate
231
+ always
232
+ alyssum
233
+ amadelphous
234
+ amah
235
+ amalgam
236
+ amalgamation
237
+ amandine
238
+ amantadine
239
+ amanuensis
240
+ amaranth
241
+ amaranthine
242
+ amaretto
243
+ amaryllis
244
+ amass
245
+ amateur
246
+ amateurish
247
+ amathophobia
248
+ amazon
249
+ amazonite
250
+ ambassador
251
+ amber
252
+ amberjack
253
+ ambidexterity
254
+ ambidextrous
255
+ ambience
256
+ ambient
257
+ ambiguity
258
+ ambiguous
259
+ ambitious
260
+ ambivalently
261
+ amble
262
+ amblyopia
263
+ ambrette
264
+ ambrosia
265
+ ambry
266
+ ambulance
267
+ ambulation
268
+ ambulatory
269
+ ambuscade
270
+ ambush
271
+ ameliorant
272
+ ameliorate
273
+ amen
274
+ amenable
275
+ amend
276
+ amendment
277
+ amenities
278
+ amenity
279
+ amerce
280
+ amercement
281
+ american
282
+ americium
283
+ amertoy
284
+ amethyst
285
+ amiable
286
+ amicable
287
+ amice
288
+ amidol
289
+ amigo
290
+ amine
291
+ amiss
292
+ amity
293
+ ammeter
294
+ ammonia
295
+ ammoniac
296
+ ammoniacal
297
+ ammunition
298
+ amnesia
299
+ amnesty
300
+ amok
301
+ amole
302
+ amontillado
303
+ amorous
304
+ amorphous
305
+ amortization
306
+ amount
307
+ amperage
308
+ ampere
309
+ ampersand
310
+ amphetamine
311
+ amphibian
312
+ amphibious
313
+ amphichrome
314
+ amphicrania
315
+ amphidromic
316
+ amphioxus
317
+ amphitheater
318
+ amphora
319
+ amphorae
320
+ amphoric
321
+ amphoteric
322
+ ampicillin
323
+ ample
324
+ ampliate
325
+ ampliative
326
+ amplifier
327
+ amplify
328
+ amplitude
329
+ amply
330
+ ampullae
331
+ amputee
332
+ amulet
333
+ amuse
334
+ amyelonic
335
+ amygdala
336
+ amygdaline
337
+ amylaceous
338
+ amyotonia
339
+ amyotrophic
340
+ anabasis
341
+ anabibazon
342
+ anablepid
343
+ anabolic
344
+ anachronism
345
+ anachronous
346
+ anaclastic
347
+ anacoluthon
348
+ anaconda
349
+ anacreontic
350
+ anadiplosis
351
+ anadromous
352
+ anaglyph
353
+ anagnorisis
354
+ anagogic
355
+ anagram
356
+ analects
357
+ analemma
358
+ analgesic
359
+ anallobar
360
+ analogous
361
+ analogy
362
+ analysand
363
+ analysis
364
+ analytically
365
+ analyze
366
+ anamnesis
367
+ ananias
368
+ ananym
369
+ anaphora
370
+ anaphoric
371
+ anaphylactic
372
+ anaphylaxis
373
+ anaptyxis
374
+ anaqua
375
+ anarchic
376
+ anarchism
377
+ anarchy
378
+ anastomosis
379
+ anastrophe
380
+ anathema
381
+ anathematize
382
+ anatocism
383
+ anatomy
384
+ anaudia
385
+ anautogenous
386
+ ancestor
387
+ ancestral
388
+ ancestry
389
+ anchor
390
+ anchorage
391
+ anchoritic
392
+ anchovy
393
+ anchusa
394
+ ancient
395
+ ancillary
396
+ ancipital
397
+ andiron
398
+ andradite
399
+ andragogy
400
+ androcracy
401
+ androgynism
402
+ androgynous
403
+ android
404
+ anecdotal
405
+ anecdote
406
+ anechoic
407
+ anemochore
408
+ anemology
409
+ anemometer
410
+ anemometry
411
+ anemone
412
+ anemosis
413
+ anemotropism
414
+ anent
415
+ anenterous
416
+ aneroid
417
+ anesthesia
418
+ anesthetic
419
+ anesthetize
420
+ aneurysm
421
+ anfractuous
422
+ angary
423
+ angel
424
+ angelfish
425
+ anger
426
+ angiitis
427
+ angina
428
+ anglaise
429
+ anglicize
430
+ angling
431
+ anglophilia
432
+ angora
433
+ angstroms
434
+ anguish
435
+ angular
436
+ angularity
437
+ angwantibo
438
+ anhedonia
439
+ anhinga
440
+ anhydride
441
+ anhydrous
442
+ aniconic
443
+ anility
444
+ animadversion
445
+ animal
446
+ animalcule
447
+ animate
448
+ animation
449
+ animism
450
+ animosity
451
+ animus
452
+ anionic
453
+ anise
454
+ anisette
455
+ ankh
456
+ ankle
457
+ anklet
458
+ ankylosaur
459
+ anlace
460
+ annals
461
+ annates
462
+ anneal
463
+ annealed
464
+ annelid
465
+ annex
466
+ annexation
467
+ annihilate
468
+ annihilation
469
+ anniversary
470
+ annotate
471
+ announce
472
+ announcer
473
+ annoyance
474
+ annual
475
+ annuity
476
+ annul
477
+ annularity
478
+ annulling
479
+ annulment
480
+ anodyne
481
+ anoia
482
+ anoint
483
+ anomalous
484
+ anomaly
485
+ anon
486
+ anonymous
487
+ anorak
488
+ anorexia
489
+ anorexic
490
+ anorthopia
491
+ anosmatic
492
+ anosmic
493
+ ansa
494
+ anschluss
495
+ anserous
496
+ answerer
497
+ antacid
498
+ antaean
499
+ antagonist
500
+ antarctic
501
+ ante
word_finder.py ADDED
@@ -0,0 +1,54 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import os
2
+ import pandas as pd
3
+ from fuzzywuzzy import process
4
+ from openai import OpenAI
5
+ from dotenv import load_dotenv
6
+
7
+ # Load environment variables (OpenAI key)
8
+ load_dotenv()
9
+ openai_api_key = os.getenv("OPENAI_API_KEY")
10
+
11
+ # Initialize OpenAI client
12
+ client = OpenAI(api_key=openai_api_key)
13
+
14
+ # Load word list
15
+ word_df = pd.read_csv('spelling_words.csv', header=None)
16
+ word_list = word_df[0].tolist()
17
+
18
+ # Fuzzy search function
19
+ def search_word(user_input, word_list, top_n=5):
20
+ matches = process.extract(user_input, word_list, limit=top_n)
21
+ return matches
22
+
23
+ # Function for AI-powered responses (definitions, origins, etc.)
24
+ def get_ai_response(query):
25
+ response = client.chat.completions.create(
26
+ model="gpt-4-turbo",
27
+ messages=[
28
+ {"role": "system", "content": "You are an expert spelling bee coach. Provide clear definitions, word origins, usage examples, and helpful memory tips for kids."},
29
+ {"role": "user", "content": query}
30
+ ],
31
+ temperature=0.3,
32
+ max_tokens=200
33
+ )
34
+ return response.choices[0].message.content.strip()
35
+
36
+ # Main interaction loop
37
+ if __name__ == "__main__":
38
+ print("πŸŽ‰ Welcome to Spelling Bee Word Finder with AI! πŸŽ‰")
39
+ while True:
40
+ query = input("\nEnter a word or ask a question ('define ubiquitous', 'origin onomatopoeia') or type 'exit' to quit: ").strip()
41
+ if query.lower() == "exit":
42
+ print("Goodbye! Keep practicing 😊")
43
+ break
44
+
45
+ # Check if the query is asking for a definition or origin
46
+ if query.lower().startswith(("define", "meaning", "origin", "use", "sentence", "explain")):
47
+ print("\n🧠 AI Response:")
48
+ print(get_ai_response(query))
49
+ else:
50
+ # Default fuzzy search for spelling matches
51
+ results = search_word(query, word_list)
52
+ print("\nπŸ“Œ Top Matches (Fuzzy Search):")
53
+ for match, score in results:
54
+ print(f"{match} (Confidence: {score}%)")