A JavaScript package for detecting emotions in text using machine learning.
npm install emotion-detection-api
const EmotionDetectionAPI = require('emotion-detection-api');
// Create a new instance of the Emotion Detection API
const emotionDetector = new EmotionDetectionAPI();
// Analyze text to detect emotions
const text = 'I am feeling very happy and excited!';
const emotions = emotionDetector.detectEmotions(text);
console.log('Detected Emotions:', emotions);
Analyzes text to detect emotions and returns an array of detected emotions.
-
text
: The text to analyze.
This project is licensed under the MIT License - see the LICENSE file for details.