Interface EmotionAnalysisAPI

  • All Known Implementing Classes:
    BERT, ParallelDots

    public interface EmotionAnalysisAPI
    Interface for emotion analysis in factory pattern.
    Author:
    Ariadna de Arriba
    • Method Summary

      Modifier and Type Method Description
      java.lang.String emotion​(java.lang.String text)
      Make a request to ML tool for sentiment analysis.
    • Method Detail

      • emotion

        java.lang.String emotion​(java.lang.String text)
                          throws java.lang.NullPointerException,
                                 java.io.IOException
        Make a request to ML tool for sentiment analysis.
        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.