Language learning assistant

import random import speech_recognition as sr vocabulary = { 'apple': 'a fruit', 'dog': 'an animal that barks', 'cat': 'a small domesticated carnivorous mammal', 'book': 'a written or printed work consisting of pages glued or sewn together along one side', 'sun': 'the star around which the earth orbits', 'moon': 'the natural satellite of the earth', 'tree': 'a woody perennial plant', 'ocean': 'a large body of salt water', 'computer': 'an electronic device for storing and processing data', 'music': 'vocal or instrumental sounds combined to produce beauty of form', 'happy': 'feeling or showing pleasure or contentment', 'sad': 'feeling or showing sorrow', 'water': 'a colorless, transparent, odorless liquid', 'sky': 'the region of the atmosphere above the earth', 'mountain': 'a large natural elevation of the earth\'s surface', 'friend': 'a person whom one knows and with whom one has a bond of mutual affection', 'love': 'an intense feeling of deep affection', 'time': 'the indefinite continued progress of existence', 'work': 'activity involving mental or physical effort done to achieve a purpose', 'study': 'the devotion of time and attention to acquiring knowledge', 'write': 'mark (letters, words, or other symbols) on a surface', 'learn': 'gain or acquire knowledge of or skill in (something) by study, experience, or being taught', 'laugh': 'make the spontaneous sounds and movements of the face and body that are the instinctive expressions of lively amusement', 'run': 'move at a speed faster than a walk', 'eat': 'put (food) into the mouth and chew and swallow it', 'drink': 'take (a liquid) into the mouth and swallow', 'jump': 'push oneself off a surface and into the air by using the muscles in one\'s legs and feet', 'sleep': 'be in a state of rest in which the eyes are closed', 'happy': 'feeling or showing pleasure or contentment', 'angry': 'having a strong feeling of or showing annoyance, displeasure, or hostility', 'beautiful': 'pleasing the senses or mind aesthetically', 'big': 'of considerable size or extent', 'small': 'of a size that is less than normal or usual', 'fast': 'moving or capable of moving at high speed', 'slow': 'moving or operating at a low speed', 'hot': 'having a high degree of heat or a high temperature', 'cold': 'of or at a low or relatively low temperature', 'old': 'having lived for a long time', 'new': 'produced, introduced, or discovered recently or now for the first time', 'happy': 'feeling or showing pleasure or contentment', 'sad': 'feeling or showing sorrow', 'flower': 'the seed-bearing part of a plant, consisting of reproductive organs', 'house': 'a building for human habitation', 'car': 'a road vehicle, typically with four wheels, powered by an internal combustion engine', 'bicycle': 'a vehicle with two wheels, powered by pedals', 'school': 'an institution for educating children', 'pen': 'a tool for writing or drawing with ink', 'pencil': 'a writing implement with a graphite or colored core', 'phone': 'a device used to communicate through sound or speech', 'television': 'a system for transmitting visual images and sound', 'watch': 'a small timepiece worn on the wrist', 'shoe': 'a covering for the foot', 'shirt': 'a garment worn on the upper part of the body', 'pants': 'an outer garment covering the body from the waist to the ankles', 'hat': 'a covering for the head', 'garden': 'a plot of ground where plants are cultivated', 'river': 'a large natural stream of water', 'lake': 'a large body of water surrounded by land', 'beach': 'a sandy or pebbly shore by the ocean', 'rain': 'water falling in drops from the atmosphere', 'snow': 'atmospheric water vapor frozen into ice crystals', 'cloud': 'a visible mass of condensed water vapor', 'bird': 'a warm-blooded vertebrate with feathers and beak', 'fish': 'a limbless cold-blooded vertebrate with gills', 'insect': 'a small arthropod with six legs and typically wings', 'computer': 'an electronic device for storing and processing data', 'table': 'a piece of furniture with a flat top and legs', 'chair': 'a separate seat for one person', 'lamp': 'a device for giving light', 'door': 'a hinged, sliding, or revolving barrier for closing an opening', 'window': 'an opening in a wall to let in light and air', 'wall': 'a continuous vertical brick or stone structure', 'bookcase': 'a piece of furniture with shelves for books', 'clock': 'a timepiece that shows the time', 'guitar': 'a musical instrument with strings', 'piano': 'a large musical instrument with a keyboard', 'singer': 'a person who sings', 'artist': 'a person who creates visual or performing arts', 'chef': 'a professional cook', 'doctor': 'a person trained in medicine', 'firefighter': 'a person who extinguishes fires', 'pilot': 'a person who operates an aircraft', 'teacher': 'a person who educates others', 'actor': 'a person who performs in plays or movies', 'dentist': 'a person who treats teeth and oral health', 'engineer': 'a person who designs and builds machines or structures', 'waiter': 'a person who serves food in a restaurant', 'police': 'a civil force responsible for maintaining law and order', 'nurse': 'a person trained to care for the sick or infirm', 'writer': 'a person who writes books, stories, or articles', 'scientist': 'a person who conducts scientific research', 'musician': 'a person who plays a musical instrument', 'photographer': 'a person who takes photographs', 'baker': 'a person who bakes bread and cakes', 'painter': 'a person who creates paintings', 'dancer': 'a person who performs dance', 'engineer': 'a person who designs and builds machines or structures', 'architect': 'a person who designs buildings and structures', 'astronaut': 'a person trained for space travel', 'athlete': 'a person proficient in sports and other physical exercises', 'biologist': 'a person who studies living organisms', 'economist': 'a person who studies economic systems', 'geologist': 'a person who studies the earth and its history', 'historian': 'a person who studies and writes about the past', 'journalist': 'a person who reports news and events', 'lawyer': 'a person who practices law and represents clients', 'mathematician': 'a person who studies mathematics', 'physicist': 'a person who studies the fundamental nature of the universe', 'psychologist': 'a person who studies the mind and behavior', 'sociologist': 'a person who studies society and social behavior', } grammar_exercise = [ { 'question': 'He ___ to the store every day.', 'answer': 'goes' }, { 'question': 'They ___ in the park yesterday.', 'answer': 'played' }, { 'question': 'She ___ a song beautifully.', 'answer': 'sings' }, { 'question': 'I ___ my homework yesterday.', 'answer': 'did' }, { 'question': 'We ___ lunch at noon.', 'answer': 'have' }, { 'question': 'It ___ raining outside.', 'answer': 'is' }, { 'question': 'They ___ going to the party.', 'answer': 'are' }, { 'question': 'He ___ reading a book.', 'answer': 'is' }, { 'question': 'She ___ her friend tomorrow.', 'answer': 'will see' }, { 'question': 'We ___ to the beach last summer.', 'answer': 'went' }, { 'question': 'The birds ___ in the sky.', 'answer': 'fly' }, { 'question': 'The sun ___ in the east.', 'answer': 'rises' }, { 'question': 'I ___ English for two years.', 'answer': 'have been studying' }, { 'question': 'He ___ his bike last week.', 'answer': 'fixed' }, { 'question': 'She ___ breakfast at 8 AM.', 'answer': 'eats' }, { 'question': 'They ___ a movie tonight.', 'answer': 'will watch' }, { 'question': 'The baby ___ asleep.', 'answer': 'is' }, { 'question': 'We ___ the test yesterday.', 'answer': 'passed' }, { 'question': 'I ___ to the radio every morning.', 'answer': 'listen' }, { 'question': 'He ___ a letter to his friend.', 'answer': 'wrote' }, { 'question': 'She ___ a picture of the sunset.', 'answer': 'took' }, { 'question': 'They ___ the cookies yesterday.', 'answer': 'ate' }, { 'question': 'I ___ in this city for five years.', 'answer': 'have lived' }, { 'question': 'He ___ late for school yesterday.', 'answer': 'was' }, { 'question': 'She ___ at the party tonight.', 'answer': 'will dance' }, { 'question': 'We ___ a new car next week.', 'answer': 'are buying' }, { 'question': 'The sun ___ in the west.', 'answer': 'sets' }, { 'question': 'I ___ my keys yesterday.', 'answer': 'lost' }, { 'question': 'He ___ his grandmother every Sunday.', 'answer': 'visits' }, { 'question': 'She ___ her hair last month.', 'answer': 'cut' }, { 'question': 'They ___ a good time at the party.', 'answer': 'had' }, { 'question': 'I ___ the book last night.', 'answer': 'read' }, { 'question': 'We ___ a lot of pictures on our vacation.', 'answer': 'took' }, { 'question': 'He ___ a cup of coffee every morning.', 'answer': 'drinks' }, { 'question': 'She ___ for her friend at the airport.', 'answer': 'is waiting' }, { 'question': 'They ___ a pizza for dinner tonight.', 'answer': 'will order' }, { 'question': 'I ___ with my friends last weekend.', 'answer': 'played' }, { 'question': 'We ___ the movie last night.', 'answer': 'watched' }, { 'question': 'He ___ in the garden every day.', 'answer': 'works' }, { 'question': 'She ___ her sister this evening.', 'answer': 'will meet' }, { 'question': 'They ___ to the mountains last summer.', 'answer': 'went' }, { 'question': 'I ___ Spanish at school.', 'answer': 'study' }, { 'question': 'He ___ his bike to work.', 'answer': 'rides' }, { 'question': 'She ___ breakfast at 7 AM.', 'answer': 'eats' }, { 'question': 'They ___ a movie last night.', 'answer': 'watched' }, { 'question': 'The baby ___ up from a nap.', 'answer': 'woke' }, { 'question': 'We ___ the test two days ago.', 'answer': 'took' }, { 'question': 'I ___ to music every day.', 'answer': 'listen' }, { 'question': 'He ___ a letter to his friend last week.', 'answer': 'wrote' }, { 'question': 'She ___ a picture of the sunrise.', 'answer': 'took' }, { 'question': 'They ___ the cookies yesterday.', 'answer': 'ate' }, { 'question': 'I ___ in this city since 2010.', 'answer': 'have lived' }, { 'question': 'He ___ late for school yesterday.', 'answer': 'was' }, { 'question': 'She ___ at the party tomorrow.', 'answer': 'will dance' }, { 'question': 'We ___ a new car next month.', 'answer': 'are buying' }, { 'question': 'The sun ___ in the east.', 'answer': 'rises' }, { 'question': 'I ___ my keys yesterday morning.', 'answer': 'lost' }, { 'question': 'He ___ his grandmother every week.', 'answer': 'visits' }, { 'question': 'She ___ her hair last week.', 'answer': 'cut' }, { 'question': 'They ___ a good time at the party.', 'answer': 'had' }, { 'question': 'I ___ the book yesterday evening.', 'answer': 'read' }, { 'question': 'We ___ a lot of pictures on our vacation.', 'answer': 'took' }, { 'question': 'He ___ a cup of coffee every morning.', 'answer': 'drinks' }, { 'question': 'She ___ for her friend at the airport.', 'answer': 'is waiting' }, { 'question': 'They ___ a pizza for dinner tonight.', 'answer': 'will order' }, { 'question': 'I ___ with my friends last Saturday.', 'answer': 'played' }, { 'question': 'We ___ the movie last night.', 'answer': 'watched' }, { 'question': 'He ___ in the garden every day.', 'answer': 'works' }, { 'question': 'She ___ her sister this evening.', 'answer': 'will meet' }, { 'question': 'They ___ to the mountains last summer.', 'answer': 'went' }, { 'question': 'I ___ Spanish at school.', 'answer': 'study' }, { 'question': 'He ___ his bike to work every day.', 'answer': 'rides' }, { 'question': 'She ___ breakfast at 7 AM.', 'answer': 'eats' }, { 'question': 'They ___ a movie last night.', 'answer': 'watched' }, { 'question': 'The baby ___ up from a nap.', 'answer': 'woke' }, { 'question': 'We ___ the test two days ago.', 'answer': 'took' }, { 'question': 'I ___ to music every day.', 'answer': 'listen' }, { 'question': 'He ___ a letter to his friend last week.', 'answer': 'wrote' }, { 'question': 'She ___ a picture of the sunrise.', 'answer': 'took' }, { 'question': 'They ___ the cookies yesterday.', 'answer': 'ate' }, { 'question': 'I ___ in this city since 2010.', 'answer': 'have lived' }, { 'question': 'He ___ late for school yesterday.', 'answer': 'was' }, { 'question': 'She ___ at the party tomorrow.', 'answer': 'will dance' }, { 'question': 'We ___ a new car next month.', 'answer': 'are buying' }, { 'question': 'The sun ___ in the east.', 'answer': 'rises' }, { 'question': 'I ___ my keys yesterday morning.', 'answer': 'lost' }, { 'question': 'He ___ his grandmother every week.', 'answer': 'visits' }, { 'question': 'She ___ her hair last week.', 'answer': 'cut' }, { 'question': 'They ___ a good time at the party.', 'answer': 'had' }, { 'question': 'I ___ the book yesterday evening.', 'answer': 'read' }, { 'question': 'We ___ a lot of pictures on our vacation.', 'answer': 'took' }, { 'question': 'He ___ a cup of coffee every morning.', 'answer': 'drinks' }, { 'question': 'She ___ for her friend at the airport.', 'answer': 'is waiting' }, { 'question': 'They ___ a pizza for dinner tonight.', 'answer': 'will order' }, { 'question': 'I ___ with my friends last Saturday.', 'answer': 'played' }, { 'question': 'We ___ the movie last night.', 'answer': 'watched' }, ] conversations = [ { 'question': 'What is your favorite color?', 'answer': 'My favorite color is blue.' }, { 'question': 'Do you enjoy learning new things?', 'answer': 'Yes, I love learning new things and expanding my knowledge.' }, { 'question': 'What languages can you speak?', 'answer': 'I can speak English and Spanish fluently.' }, { 'question': 'Tell me a fun fact!', 'answer': 'Sure! Did you know that honey never spoils? Archaeologists have found pots of honey in ancient Egyptian tombs that are over 3,000 years old and still perfectly edible!' }, { 'question': 'What do you like to do in your free time?', 'answer': 'In my free time, I enjoy reading books and going for long walks.' }, { 'question': 'What\'s your favorite book or movie?', 'answer': 'I really love the book "To Kill a Mockingbird" by Harper Lee.' }, { 'question': 'How do you stay motivated?', 'answer': 'I stay motivated by setting goals and staying focused on achieving them.' }, { 'question': 'What are your goals for the future?', 'answer': 'My goals include traveling to different countries and learning new languages.' }, { 'question': 'What\'s the most interesting language fact you know?', 'answer': 'One fascinating fact is that the Inuit language has over 50 different words for "snow"!' }, { 'question': 'Tell me about an inspiring language learner!', 'answer': 'Sure! There is a polyglot named Ziad Fazah who holds the Guinness World Record for speaking the most languages. He can speak 59 languages fluently!' }, { 'question': 'How do you deal with language learning challenges?', 'answer': 'I overcome language learning challenges by practicing regularly and seeking help from language exchange partners.' }, { 'question': 'What advice would you give to new language learners?', 'answer': 'My advice is to be patient with yourself, practice consistently, and immerse yourself in the language as much as possible.' }, { 'question': 'What\'s the best way to learn vocabulary?', 'answer': 'Learning vocabulary through context and using flashcards or mnemonic techniques can be very effective.' }, { 'question': 'Can you recommend any language learning resources?', 'answer': 'Certainly! There are many great language learning apps and websites like Duolingo, Memrise, and FluentU.' }, { 'question': 'What are the benefits of being multilingual?', 'answer': 'Being multilingual opens up opportunities for better communication, cultural understanding, and career prospects.' }, { 'question': 'How can I improve my pronunciation?', 'answer': 'Practicing with native speakers, listening to authentic materials, and using pronunciation apps can be helpful.' }, { 'question': 'What\'s the most challenging language to learn?', 'answer': 'The difficulty of learning a language varies for each individual, but some consider languages with complex grammar and writing systems, like Mandarin Chinese or Arabic, to be challenging.' }, { 'question': 'How do you celebrate language learning milestones?', 'answer': 'I celebrate language learning milestones by treating myself to a nice meal or doing something I enjoy.' }, { 'question': 'What are some common language learning myths?', 'answer': 'One common myth is that you need to be naturally talented to learn a language. In reality, dedication and practice are more important.' }, { 'question': 'What languages are you currently learning?', 'answer': 'Currently, I am focusing on improving my French and learning German.' }, { 'question': 'What language learning techniques do you use?', 'answer': 'I use various techniques, including spaced repetition, interactive quizzes, and language immersion.' }, ] def vocabulary_quiz(): print("AI Language Learning Assistant: Vocabulary Quiz") score = 0 quiz_items = list(vocabulary.keys()) random.shuffle(quiz_items) for word in quiz_items: user_answer = input(f"What does '{word}' mean? ") if user_answer.strip().lower() == vocabulary[word].lower(): print("Correct!") score += 1 else: print(f"Wrong. The correct answer is: {vocabulary[word]}") print(f"Quiz completed! Your score: {score}/{len(vocabulary)}") def grammar_exercise_quiz(): print("AI Language Learning Assistant: Grammar Exercise") score = 0 for item in grammar_exercise: user_answer = input(item['question'] + " ") if user_answer.strip().lower() == item['answer'].lower(): print("Correct!") score += 1 else: print(f"Wrong. The correct answer is: {item['answer']}") print( f"Grammar exercise completed! Your score: {score}/{len(grammar_exercise)}") def interactive_conversation_practice(): print("AI Language Learning Assistant: Interactive Conversation Practice") print("Type 'exit' to end the conversation.") while True: conversation = random.choice(conversations) user_input = input("ChatBot: " + conversation['question'] + " ") if user_input.lower() == 'exit': break print("ChatBot:", conversation['answer']) def detect_pronunciation_errors(): print("AI Language Learning Assistant: Pronunciation Errors Detection") recognizer = sr.Recognizer() with sr.Microphone() as source: print("Speak a sentence for pronunciation evaluation:") recognizer.adjust_for_ambient_noise(source) audio = recognizer.listen(source) try: user_sentence = recognizer.recognize_google(audio) # Compare user_sentence with a pre-defined correct sentence to detect errors. # For simplicity, let's assume a fixed correct sentence. correct_sentence = "I love learning languages." if user_sentence.strip().lower() == correct_sentence.lower(): print("Your pronunciation is great!") else: print("There might be some pronunciation errors. Keep practicing!") except sr.UnknownValueError: print("Sorry, I couldn't understand what you said.") except sr.RequestError: print("Sorry, there was an error processing the audio. Please try again.") vocabulary_quiz() grammar_exercise_quiz() interactive_conversation_practice() detect_pronunciation_errors()

Created: 7/8/2025

Keywords: text snippets, slack for ai prompts, slack for ai, AI consulting, AI Cheat Tool, AI Cheat Tool for developers, AI Cheat Tool for AI, AI Cheat Tool for ChatGPT, chatgpt prompt generator, AI Cheat Tool for email, AI Cheat Tool for text, AI Cheat Tool for keyboard shortcuts, AI Cheat Tool for text expansion, AI Cheat Tool for text snippets, AI Cheat Tool for text replacement, AI Cheating Tool, AI Cheating Tool for developers, AI Cheating Tool for AI, AI Cheating Tool for ChatGPT, AI Cheating Tool for email, AI Cheating Tool for text, AI Cheating Tool for keyboard shortcuts, prompt cheating, AI prompt engineering, AI context engineering, context engineering, ai prompt manager, AI prompt manager, AI prompt management, ai consulting, prompt engineering consulting, generative ai consulting, ai implementation services, llm integration consultants, ai strategy for enterprises, enterprise ai transformation, ai prompt optimization, large language model consulting, ai training for teams, ai workflow automation, build ai knowledge base, llm prompt management, ai prompt infrastructure, ai adoption consulting, enterprise ai onboarding, custom ai workflow design, ai integration for dev teams, ai productivity tools, team prompt collaboration, github gists, github snippets, github code snippets, github code snippets automation, github, text expansion, text automation, snippet manager, code snippets, team collaboration tools, shared snippets, snippet sharing, keyboard shortcuts, productivity tools, workflow automation, AI-powered productivity, snippet tool for teams, team knowledge base, AI text completion, text expander for teams, snippet collaboration, multi-platform productivity, custom keyboard shortcuts, snippet sharing platform, collaborative snippet management, knowledge base automation, team productivity software, business productivity tools, snippet management software, quick text input, macOS productivity apps, Windows productivity tools, Linux productivity tools, cloud-based snippets, cross-platform snippets, team workspace tools, workflow enhancement tools, automation tools for teams, text automation software, team knowledge sharing, task automation, integrated team tools, real-time collaboration, AI for team productivity, business text automation, time-saving tools, clipboard manager, multi-device clipboard, keyboard shortcut manager, team communication tools, project management integration, productivity boost AI, text snippet sharing, text replacement software, text management tools, efficient team collaboration, AI workspace tools, modern productivity apps, custom text automation, digital workspace tools, collaborative workspaces, cloud productivity tools, streamline team workflows, smart text management, snippets AI app, snippet management for teams, shared knowledge platforms, team-focused text automation, team productivity platform, AI text expansion tools, snippet taking app, note taking app, note taking software, note taking tools, note taking app for teams, note taking app for developers, note taking app for AI, note taking app for ChatGPT, snippet software, snippet tools, snippet app for teams, snippet app for developers, snippet app for AI, snippet app for ChatGPT, AI agent builder, AI agent snippets, AI agent prompts, prompt management, prompt engineering, ChatGPT snippets, ChatGPT prompts, AI prompt optimization, AI-powered prompts, prompt libraries for AI, prompt sharing for ChatGPT, GPT productivity tools, AI assistant snippets, ChatGPT integrations, custom AI prompts, AI agent workflows, machine learning snippets, automated AI prompts, AI workflow automation, collaborative AI prompts, personalized AI agents, text snippets for ChatGPT, AI prompt creation tools, AI code snippet manager, GPT-4 text automation, AI-powered writing assistants, AI tools for developers, AI agent integrations, developer prompt snippets, AI text generation workflows, AI-enhanced productivity, GPT prompt sharing tools, team collaboration for AI, openAI integrations, text automation for AI teams, AI-powered collaboration tools, GPT-4 team tools, AI-driven text expanders, AI-driven productivity solutions, AI agent for email writing, AI agent for text expansion, AI agent for text automation, AI agent for text snippets, AI agent for text replacement, AI agent for keyboard shortcuts, AI Agent Developer, Prompt engineering, Machine Learning Engineer, AI Engineer, Customer Support, Code snippets for developers, Recruiting, AI agent for automation, AI agent for AI automation, AI agent for ChatGPT automation, AI agent for email automation, electron app for snippets, desktop snippet manager, code snippet organization, AI prompt repository, intelligent text expansion, vibe coding, Claude cli ai prompts, prompt optimizer, buy prompts, sell prompts, snippets store, sell scripts, buy scripts, buy python scripts, scraping scripts, AI prompt marketplace, ChatGPT prompt marketplace, best AI prompts, best ChatGPT prompts, AI prompt database, AI prompt packs, AI prompt bundles, GPT prompt marketplace, prompt engineering masterclass, prompt engineering certification, prompt engineering course, ChatGPT prompt store, AI prompt store, prompt monetization, sell AI prompts, buy AI prompts, prompt marketplace platform, AI prompt plugins, Claude prompt marketplace, AI prompt subscription, Custom GPT, real-time prompt collaboration, developer workflow optimization, team prompt library, knowledge management for developers, code snippet search, searchable code library, reusable code blocks, prompt engineering tools, prompt template management, collaborative coding, cross-team knowledge sharing, code snippet versioning, AI prompt templates, technical documentation tools, developer productivity suite, team snippet repository, AI prompt history, snippet synchronization, cloud snippet backup, markdown snippet support, syntax highlighting for snippets, code categorization, programming language snippets, language-specific code templates, contextual code suggestions, snippets with AI integration, command palette for snippets, code snippet folder organization, team snippet discovery, private and public snippets, enterprise code management, team codebase documentation, prompt engineering best practices, Vibe Coding, Vibe Coding for developers, Vibe Coding for AI, Vibe Coding for ChatGPT, Vibe Coding for email, Vibe Coding for text, Vibe Coding for keyboard shortcuts, Vibe Coding for text expansion, Vibe Coding for text snippets, Vibe Coding for text replacement, free prompt generator, ai prompt generator, prompt generator, promptlayer, promptimize ai, langchain prompt management, lanhsmith prompt management, latitude, langchain, langgraph, langchain documentation, raycast, text expander, raycast snippets, raycast mac, cursor, cursro ai, cursor snippets, cursor rules, cursor ai rules, learn prompting, how to prompt, prompting guide, prompting tutorials, best prompting practices, ai prompt best practices, prompting techniques, prompting, flask, ios, go, graphql, rest, git, android, spa, api, react, performance, oauth, javascript, python, node, typescript, java, logging, pandas, express, php, electron

AI Prompts, ChatGPT, Code Snippets, Prompt Engineering

Language learning assistant

Python - Language learning assistant - AI Prompts & Code Snippets | Snippets AI