A feature-rich GUI plaintext editor written in Java Swing.
- Create, open, and save plain text documents
- Multi-tab support
- Undo/redo functionality
- Find and replace capabilities
- Auto-save functionality
Ensure you have Java Development Kit (JDK) installed
Create output directory and compile
mkdir -p out && javac -cp "library/*:src" src/**/*.java -d out
Run the application
java -cp "out:library/*" Main
Create, Open, and Save Documents
Creating a smart spell-checking system that suggests corrections in real-time as you type. Here’s how it works: Dictionary Management:
-
The system starts by loading a list of words from a dictionary file. If the file isn’t available, it uses a basic set of common words.
-
As you type new words, the system "learns" them and adds them to the dictionary, making it smarter over time. Suggestions:
-
If you misspell a word, the system suggests up to 7 possible corrections based on how close the word is to others in the dictionary.
You can load any dictionary file, for me I used this one 10000 English word
Here's the guide to activiate it
-
Download google-10000-english.txt
-
Move it to your project directory and put it into /library/
Find and Replace
- Implements KMP string pattern search algorithm (O(n + m) complexity)
- Supports both single and bulk replacements
Performance Comparison:
Operation | Brute force | KMP |
---|---|---|
search |
O(n * m) | O(n+m) |
A specialized data structure for efficient string manipulation with O(log n) operations.
Note
The Rope data structure implementation is based on Treap data structure for balanced operations.
- Based on Treap (Balanced Binary Search Tree)
- Uses randomization and Binary Heap properties
Performance Comparison:
Operation | Vector/String | Rope |
---|---|---|
Build | O(n) | O(n log n) |
Insert | O(n m) | O(m log n) |
Erase | O(n) | O(log n) |
Concat | O(m) | O(log n) |
- Fork the repository
- Create a new branch (
git checkout -b feature/AmazingFeature
) - Make your changes
- Run tests if available
- Commit your changes (
git commit -m 'Add some AmazingFeature'
) - Push to the branch (
git push origin feature/AmazingFeature
) - Create a Pull Request