All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.sap.cloud.sdk.services.recastai.NlpResponseWrapper Maven / Gradle / Ivy

Go to download

Integration of SAP Conversational AI, aka Recast AI (Beta release, still subject to change - up to discontinuation of module).

There is a newer version: 2.28.0
Show newest version
/*
 * Copyright (c) 2019 SAP SE or an SAP affiliate company. All rights reserved.
 */

package com.sap.cloud.sdk.services.recastai;

import javax.annotation.Nonnull;
import javax.annotation.Nullable;

import com.google.common.annotations.Beta;

/**
 * Wraps around text data to be sent to recast for a nlp analysis. This object is used in combination with
 * RecastAnalyser.
 * 

* Be aware that this class is in Beta (as indicated by the annotation) and therefore subject to breaking changes. *

*/ @Beta public class NlpResponseWrapper { private String text; private String language; /** * A Constructor to create a new nlp response wrapper given a text and the language of said text. * * @param text * the text to analyse * @param language * the language of the language */ public NlpResponseWrapper( @Nonnull final String text, @Nullable final String language ) { this.text = text; this.language = language; } /** * This getter returns the text which gets analysed * * @return the current text as a string */ @Nullable public String getText() { return text; } /** * This getter returns the language of the given text which gets analysed * * @return the current language as a string */ @Nullable public String getLanguage() { return language; } /** * This setter changes the current text to the new given one. * * @param text * the new text */ public void setText( final String text ) { this.text = text; } /** * This setter changes the current laguage to the new given one. * * @param language * the new language */ public void setLanguage( final String language ) { this.language = language; } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy