Functional Programming Project 2024 Dan Suissa, Karel Moryoussef, Adan Fhima, Maximillien Bruck
- Project Overview
- Features
- Installation and Setup
- Usage
- Architecture
- Challenges and Considerations
- Future Enhancements
The Language Learning Adventure is an interactive language learning application that allows users to explore and master different target languages, such as Spanish, French, and German. The application presents a structured curriculum with progressive levels, lessons, and quizzes to help users develop their language skills.
The project was developed as part of a university course, with the goal of creating an engaging and effective language learning experience. The application is built using Haskell, a functional programming language, and leverages various data structures and algorithms to manage the learning content and user progress.
- Structured Curriculum: The application organizes language content into levels, lessons, and individual language nodes (words, grammar rules, and quizzes).
- Interactive Lessons: Users can navigate through the lessons, view language content, and complete associated quizzes.
- Progress Tracking: The application keeps track of the user's progress, allowing them to view their completed lessons and lessons remaining.
- Customizable Language Selection: Users can choose from Spanish, French, or German as their target language.
- Intuitive Command-line Interface: The application provides a user-friendly command-line interface for interacting with the language learning content.
To run the Language Learning Adventure application, follow these steps:
- Install a Haskell compiler, such as GHC or Stack, on your system.
- Clone the project repository from GitHub:
git clone https://github.com/dansuissa/LanguageLearningAdventure.git - Navigate to the project directory:
cd LanguageLearningAdventure - Compile the project:
ghc -package base LanguageTreeAdventure.hs - Run the application:
./LanguageTreeAdventure
When the application starts, you will be prompted to select a target language (Spanish, French, or German). After selecting a language, you can choose a level to begin your language learning journey.
The application provides the following commands for navigation:
nextorn: Proceed to the next content item (word, grammar rule, or quiz)backorb: Go back to the previous content itemlearnorl: View the current content itemquizorqz: Take a quiz (if available)exitquizoreq: Exit the current quizprogressorp: View your progressquitorq: Exit the applicationhelp: Display the available commands
As you progress through the lessons, the application will keep track of your completed content. When you reach the end of a lesson, the application will automatically move you to the next lesson (if available) or inform you that you have completed the current level.
Certain content items in the lessons will be designated as quizzes. When you encounter a quiz, you can type quiz or qz to start the quiz. The quiz will present you with a series of questions, and you can type the answer to each question. If you answer correctly, your score will be incremented. You can type exitquiz or eq at any time to exit the quiz early.
The application provides a progress or p command that allows you to view your completed lessons. This will help you keep track of your learning progress and identify areas where you may need to focus more.
The application uses several custom data structures to represent the language content and the user's progress:
TargetLanguage: Defines the available target languages (Spanish, French, German).LanguageData: Encapsulates the language content, including levels, lessons, and language nodes.Level: Represents a level of the language curriculum, containing a list of lessons.Lesson: Holds a collection of language nodes (words, grammar rules, and quizzes).LangNode: Represents a single language learning item, such as a word, grammar rule, or quiz.QuizQuestion: Defines a quiz question with a question and an answer.LangCxt: Maintains the user's navigation context within the language content.LevelCxt: Tracks the user's progress within a specific level.LessonCxt: Keeps track of the user's progress within a lesson.
The main game loop is responsible for managing the user's interactions with the application. It handles user input, updates the game state, and displays the appropriate content to the user.
The game loop is implemented in the gameLoop function, which takes the user's progress and the current navigation context as input. It continuously prompts the user for commands, processes the input, and updates the game state accordingly.
The application provides several functions to handle user navigation within the language content:
go_next: Moves the user to the next language node within the current lesson, or to the next lesson if the current lesson has been completed.go_back: Allows the user to go back to the previous language node within the current lesson.go_to_next_lesson: Transitions the user to the next lesson within the current level.
These navigation functions update the user's navigation context, ensuring a seamless and consistent experience as the user progresses through the language curriculum.
During the development of the Language Learning Adventure, the following challenges and design considerations were addressed:
-
Representation of Language Content: Deciding on the appropriate data structures to represent the language content, including levels, lessons, and individual language nodes, was a key challenge. The chosen data structures needed to be flexible enough to accommodate different languages and their content.
-
Navigation and Progress Tracking: Implementing efficient algorithms for user navigation and progress tracking was essential to provide a smooth and engaging learning experience. The application needed to handle transitions between lessons and levels, as well as keep track of the user's completed content.
-
Command-line Interface: Designing a user-friendly command-line interface that allows for intuitive interaction with the language content was a priority. The interface needed to be responsive, provide clear feedback, and handle various user commands.
-
Extensibility and Maintainability: The application was designed with future enhancements and maintainability in mind. The modular structure and use of custom data structures facilitate the addition of new languages, levels, and features without significantly altering the core codebase.
To further improve the Language Learning Adventure, the following enhancements could be considered:
- Multimedia Integration: Incorporate audio recordings, images, and interactive exercises to enhance the language learning experience.
- Spaced Repetition: Implement a spaced repetition algorithm to optimize the presentation of language content based on the user's retention and performance.
- Personalized Learning Paths: Adapt the language curriculum based on the user's proficiency and learning preferences, providing a more personalized experience.
- Mobile/Web-based Interface: Develop a mobile application or a web-based version of the Language Learning Adventure to improve accessibility and user convenience.
- Multiplayer and Collaborative Features: Add the ability for users to connect and learn with others, fostering a sense of community and shared learning.