Class ParallelDots
- java.lang.Object
-
- com.api.sentimentanalysis.externalapi.emotion.ParallelDots
-
- All Implemented Interfaces:
EmotionAnalysisAPI
public class ParallelDots extends java.lang.Object implements EmotionAnalysisAPI
This class contains a method to execute the sentiment analysis with ParallelDots API.- Author:
- Ariadna de Arriba
-
-
Constructor Summary
Constructors Constructor Description ParallelDots(java.lang.String apiKey)Constructor.
-
Method Summary
Modifier and Type Method Description java.lang.Stringemotion(java.lang.String text)Make a request to ParallelDots for sentiment analysis.
-
-
-
Method Detail
-
emotion
public java.lang.String emotion(java.lang.String text) throws java.lang.NullPointerException, java.io.IOExceptionMake a request to ParallelDots for sentiment analysis.- Specified by:
emotionin interfaceEmotionAnalysisAPI- Parameters:
text- Text to analyze.- Returns:
- Returns a string that contains a json with each of six emotions weighted.
- Throws:
java.lang.NullPointerException-caused by an error during a call to the API and returns nothing.java.io.IOException-caused by an error in the API call.
-
-