Skip to content

An AI tool that provides NLP metrics to understand text dialogue

Notifications You must be signed in to change notification settings

thomknoe/sentiment.js

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sentiment.js

An AI-powered text analysis tool that performs sentiment analysis, keyword extraction, and term relevance scoring against a fixed design vocabulary. Analyze dialogue, reviews, feedback, or any textual content to extract insights about emotions, key topics, and relevance to design terms.

Features

  • Sentiment Analysis: Detects 27 different emotions using RoBERTa-based emotion classification
  • Keyword Extraction: Automatically extracts important keywords and phrases using KeyBERT
  • Term Relevance: Analyze relevance of a fixed design vocabulary in the text

Quick Start

Prerequisites

  • Python 3.8 or higher
  • pip (Python package manager)

Installation

  1. Clone this repository:

    git clone https://github.com/thomknoe/sentiment.js.git
    cd sentiment.js
  2. Create and activate a virtual environment (recommended):

    python3 -m venv venv
    source venv/bin/activate  # On Windows: venv\Scripts\activate
  3. Install Python dependencies:

    pip install -r requirements.txt

    Or install manually:

    pip install flask flask-cors transformers torch torchvision keybert sentence-transformers scikit-learn
  4. Run the Flask backend server:

    python backend.py

    The backend will start on http://127.0.0.1:5001

  5. Open the frontend:

    • Option A: Use VS Code's "Go Live" extension or any local server
    • Option B: Open index.html directly in a browser (voice recording won't work without HTTPS)
    • Option C: Use Python's built-in server:
      python -m http.server 8000
      Then open http://localhost:8000 in your browser
  6. Start analyzing text!

About

An AI tool that provides NLP metrics to understand text dialogue

Topics

Resources

Stars

Watchers

Forks

Languages

  • JavaScript 46.2%
  • CSS 35.6%
  • Python 10.2%
  • HTML 8.0%