Barreessaa (meaning "writer" in Oromo) is a smart, context-aware writing assistant designed to solve a unique challenge in the Oromo language: the correct usage of vowel and consonant duplications. This application helps users write accurately and confidently by providing real-time feedback and contextual examples from a large sentence corpus.
Whether you're a native speaker looking to perfect your formal writing or a learner trying to master the nuances of the language, Barreessaa is your personal guide.
- Contextual Writing Assistance: Get real-time analysis of your sentences. Words are color-coded to indicate if their usage is correct, a potential variant, or unknown.
- Dual Writing Modes:
- Freestyle Editor: A full-featured text area that provides line-by-line analysis as you write.
- Guided Writer: A focused, sentence-by-sentence editor for deep analysis and correction.
- Personal Corpus: Add your own correct sentences to a personal dictionary, which the assistant will use to provide even more tailored suggestions in the future.
- Interactive Quiz Game: Test and improve your skills with a fun quiz game that challenges you to fix vowel duplications in randomly selected sentences.
- Analytics Dashboard: Track your progress with detailed analytics, including writing streaks, sentence completion rates, and project performance.
- Project Management: Organize your work into distinct projects, track their completion status, and manage your writing workflow.
- Framework: Next.js (App Router)
- Language: TypeScript
- Database: MongoDB with Prisma ORM
- Styling: Tailwind CSS with shadcn/ui components
- Authentication: JWTs with http-only cookies
- Analytics & Charts: Recharts
To get a local copy up and running, follow these simple steps.
- Node.js (v18 or later)
- npm or yarn
- A MongoDB database instance (local or cloud-hosted on MongoDB Atlas)
- Clone the repo
git clone https://github.com/your-username/barreessaa.git cd barreessaa - Install NPM packages
npm install
- Set up environment variables
Create a
.env.localfile in the root directory and add your database connection string and a JWT secret:DATABASE_URL="your_mongodb_connection_string" JWT_SECRET="your_super_secret_jwt_key"
- Push the schema to your database
npx prisma db push
- Pre-process the Corpus
The application relies on pre-indexed JSON files for fast lookups. Add your large
.txtfile of Oromo sentences to the root directory assentence_corpus.txtand run the pre-processing script:This will generate the necessary data files in thenode pre-process-corpus.mjs
/public/datadirectory. - Run the development server
Open
npm run dev
http://localhost:3000to view it in your browser.
The core of Barreessaa's intelligence comes from its indexing system.
- BaseWord Generation: Every word from the corpus is normalized into a "base" form by removing all duplicate consecutive letters (e.g., "gabba" -> "gaba", "hoorraa" -> "hora").
- Indexing: The application creates a massive index that maps each
baseWordto a list of all sentence IDs where its variants appear. This index is split into alphabetical chunks for performance. - Real-time Analysis: When you write a sentence, each word is converted to its
baseWordform. The app then looks up thisbaseWordin the index to find relevant example sentences from both the global corpus and your personal corpus, providing you with instant, context-rich feedback.
Contributions are what make the open-source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
Please see the TODO.md file for a full list of desired features and improvements we'd love help with!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature) - Commit your Changes (
git commit -m 'Add some AmazingFeature') - Push to the Branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This document outlines the planned features and improvements for the Barreessaa Writing Assistant. We welcome contributions from the community! If you're interested in working on any of these items, please open an issue to discuss your approach.
These are features that enhance the current functionality and user experience.
- Improve Typo Suggestions: Implement the Wagner-Fischer algorithm to suggest corrections for misspelled words (unknown status) based on the closest
baseWordmatch. - Analytics Dashboard V2: Add more insightful charts to the analytics page, such as words written over time, most common errors, and accuracy trends.
- Corpus Manager Pagination: Add pagination to the personal corpus manager to handle users with a large number of custom sentences.
- UI/UX Polish: Refine component transitions, loading states, and overall visual consistency across the application.
- Sentence Export Options: In the project editor, allow exporting the text of a single sentence.
These are larger, new features that will add significant value to the application.
- Collaborative Projects: Allow a user to invite others to view or edit a project, enabling teamwork for translations or transcription tasks.
- Document Import/Export: Add functionality to import text from
.txtor.docxfiles into a project and export completed projects as.docxor.pdf. - Quiz Difficulty Levels: Introduce difficulty settings for the quiz game (e.g., Easy, Medium, Hard) that could vary the complexity or obscurity of the sentences.
- Text-to-Speech (TTS): Integrate a TTS service to allow users to hear the correct pronunciation of words in the example sentences, helping them distinguish between subtle vowel sounds.
- Themed Writing Modes: Add a "dark mode" and other potential themes for user customization.
This is the long-term vision for where Barreessaa could go.
- Browser Extension: Develop a Chrome/Firefox extension that brings the Barreessaa writing assistant to any text field on the web (Gmail, social media, etc.).
- Mobile Application: Create a cross-platform mobile app using React Native to provide the same great experience on iOS and Android.
- AI-Powered Suggestions: Integrate a fine-tuned language model (LLM) that can provide more advanced stylistic and grammatical suggestions, moving beyond simple word-variant matching.
- Community Corpus: Create a system where users can submit new, high-quality sentences to be reviewed and potentially added to the global corpus for everyone's benefit.
- Fork the repository.
- Create a new branch for your feature or bugfix (
git checkout -b feature/my-new-featureorbugfix/issue-name). - Make your changes.
- Commit your changes with a clear and descriptive commit message.
- Push to your branch (
git push origin feature/my-new-new-feature). - Open a Pull Request against the main branch of the original repository.
Thank you for your interest in improving Barreessaa!