This project is a web application that analyzes the emotional tone of the entered text using IBM Watson Natural Language Understanding.
- Clone the repository
git clone https://github.com/GrecuAlexandru/texttone.git
- Create an IBM Cloud account
- Go to IBM Natural Language Understanding and create an account.
- Unfortunately, you will need to enter a credit card, but IBM offers a free plan and will not charge you.
- Create a Natural Language Understanding Service
- Go to the IBM Natural Language Understanding](https://www.ibm.com/products/natural-language-understanding) page in the IBM Cloud catalog.
- Sign up for a free IBM Cloud account or log in.
- Click Create.
- Copy the Credentials
- Go to the Manage page of your service instance.
- Click Show Credentials.
- Copy the API Key and URL.
- Set Up Environment Variables
- Create a file called .env.local inside the root of the project.
- Add the following lines to the file, replacing the placeholders with your actual API key and URL:
IBM_API_KEY="your-api-key"
IBM_SERVICE_URL="your-service-url"
- Install Dependencies and Run the Project
- Install the dependencies by running:
npm install
- Run the project by running:
npm run dev
- Open your browser and go to http://localhost:3000 to see the project in action.
You can use the following example text to test the emotional tone analysis:
I had a wonderful day today! The weather was perfect, and I spent the afternoon with my friends at the park. We had a picnic, played games, and enjoyed each other's company. It was a truly delightful experience that made me feel happy and content.
Here is a screenshot of the project in action:
- Next.js - The React framework used
- IBM Watson Natural Language Understanding - The API used for emotional tone analysis
- Shadcn - The CSS framework used