Interface DetectionApi

    • Method Detail

      • detect

        @Nonnull
        java.util.Optional<Language> detect​(@Nullable
                                            java.lang.String text)
        Detects the language of the specified text. Text format is TextFormat.PLAIN_TEXT.
        Parameters:
        text - the text to detect the language for
        Returns:
        detected language
      • detect

        @Nonnull
        java.util.Optional<Language> detect​(@Nullable
                                            java.lang.String text,
                                            @Nullable
                                            TextFormat format)
        Detects the language of the specified text.
        Parameters:
        text - the text to detect the language for
        format - text format: html or plain text
        Returns:
        detected language