A full-stack natural language processing application that provides comprehensive word analysis using Vue.js frontend and Python Flask backend with NLTK.
- Part of Speech Identification - Accurate grammatical categorization
- Synonyms & Antonyms - Extensive word relationship mapping
- Definitions - Clear, contextual word meanings
- Example Sentences - Real-world usage demonstrations
- Material Design - Clean, modern Vuetify-based UI
- Responsive Layout - Perfect on desktop, tablet, and mobile
- Dark/Light Themes - Seamless theme switching
- Smooth Animations - Polished user experience
- Real-time Feedback - Instant loading states and error handling
- RESTful API - Clean, documented endpoints
- Error Handling - Comprehensive error management
- Input Validation - Robust client and server-side validation
- CORS Support - Cross-origin resource sharing enabled
- Health Monitoring - API status tracking
- Python 3.13 with pip
- Node.js 16+ with npm
- Git (for cloning)
git clone <repository-url>
cd nlp-app
cd backend
pip install -r requirements.txt
python app.py
Backend will start at http://localhost:5000
cd ../frontend
npm install
npm run serve
Frontend will start at http://localhost:8080
Navigate to http://localhost:8080
and start analyzing words!
nlp-app/
βββ backend/ # Python Flask API
β βββ app.py # Main Flask application
β βββ requirements.txt # Python dependencies
β βββ README.md # Backend documentation
β
βββ frontend/ # Vue.js Application
β βββ src/
β β βββ components/ # Vue components
β β β βββ WordInput.vue
β β β βββ AnalysisResult.vue
β β βββ services/ # API services
β β β βββ nlpService.js
β β βββ plugins/ # Vue plugins
β β β βββ vuetify.js
β β βββ App.vue # Root component
β β βββ main.js # App entry point
β βββ public/ # Static assets
β βββ package.json # Node dependencies
β βββ README.md # Frontend documentation
β
βββ README.md # This file
Analyze a word and return comprehensive linguistic information.
Request:
{
"word": "beautiful"
}
Response:
{
"word": "beautiful",
"partOfSpeech": "Adjective",
"definition": "delighting the senses or exciting intellectual or emotional admiration",
"synonyms": ["lovely", "attractive", "gorgeous", "stunning"],
"antonyms": ["ugly", "hideous", "unattractive"],
"exampleSentence": "The weather is very beautiful today.",
"success": true
}
Check API health status.
Response:
{
"status": "healthy",
"message": "NLP API is running"
}
-
Basic Word Analysis:
- Enter "happy" β Get part of speech, synonyms like "joyful", "cheerful"
- Enter "run" β See verb forms, related words, example usage
-
Complex Words:
- Enter "serendipitous" β Discover meaning, sophisticated synonyms
- Enter "ephemeral" β Learn definition, find related concepts
-
Different Parts of Speech:
- Nouns: "freedom", "innovation", "symphony"
- Verbs: "create", "analyze", "discover"
- Adjectives: "magnificent", "intricate", "luminous"
- Adverbs: "gracefully", "thoroughly", "efficiently"
- Framework: Flask with CORS support
- NLP Library: NLTK for comprehensive text processing
- Data Sources: WordNet for definitions, synonyms, antonyms
- API Design: RESTful with JSON responses
- Framework: Vue.js 3 with Composition API
- UI Library: Vuetify 3 (Material Design)
- HTTP Client: Axios for API communication
- Styling: Material Design Icons, custom CSS
Backend:
flask
- Web frameworknltk
- Natural language processingflask-cors
- Cross-origin resource sharing
Frontend:
vue
- JavaScript frameworkvuetify
- Material Design componentsaxios
- HTTP client@mdi/font
- Material Design Icons
- Simplicity First: Clean, uncluttered interface
- Immediate Feedback: Real-time loading and error states
- Visual Hierarchy: Clear information organization
- Accessibility: Proper contrast, keyboard navigation
- Separation of Concerns: Independent frontend and backend
- Scalable Architecture: Modular component design
- Error Resilience: Graceful error handling and recovery
- Performance: Optimized API calls and rendering
# Using Gunicorn (recommended)
pip install gunicorn
gunicorn -w 4 -b 0.0.0.0:5000 app:app
# Or using Flask development server (not for production)
python app.py
# Build for production
npm run build
# Serve static files with your preferred web server
# (nginx, Apache, or any static hosting service)
This application is designed to be deployed on AWS using serverless architecture:
cd backend
# Create NLTK data layer
./create_nltk_layer.sh # Linux/Mac
# or
create_nltk_layer.bat # Windows
# Deploy with SAM CLI
sam build
sam deploy --guided
See backend/DEPLOYMENT.md
for detailed instructions.
- Update
frontend/.env.production
with your Lambda API URL - Deploy via AWS Amplify Console by connecting your Git repository
- Amplify will automatically use the
amplify.yml
configuration
See frontend/AMPLIFY_DEPLOYMENT.md
for detailed instructions.
- Backend:
FRONTEND_URL
for CORS configuration - Frontend:
VUE_APP_API_URL
for API endpoint
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- NLTK Team - Comprehensive natural language processing toolkit
- Vue.js Community - Excellent frontend framework
- Vuetify Team - Beautiful Material Design components
- WordNet - Lexical database for English language
Built with β€οΈ using Vue.js, Python, and Natural Language Processing