-
- All Implemented Interfaces:
public interface NlpClientWraps calls to the NLP stack. TockNlpClient is the provided implementation.
-
-
Method Summary
Modifier and Type Method Description abstract NlpResultparse(NlpQuery query)Analyses a sentence and returns the result. abstract EntityEvaluationResultevaluateEntities(EntityEvaluationQuery query)Evaluates entities. abstract ValuesMergeResultmergeValues(ValuesMergeQuery query)Merges values and returns the result if found. abstract UnitmarkAsUnknown(MarkAsUnknownQuery query)Informs the nlp model that a sentence has not been understood. abstract List<IntentDefinition>getIntentsByNamespaceAndName(String namespace, String name)Returns the list of intents of a model. abstract ApplicationDefinitiongetApplicationByNamespaceAndName(String namespace, String name)Returns an application for the specified namespace and name. abstract ApplicationDefinitioncreateApplication(String namespace, String name, Locale locale)Creates an application if it does not exists. abstract BooleanimportNlpDump(InputStream stream)Imports a NLP dump (configuration and sentences of the NLP model). abstract BooleanimportNlpPlainDump(ApplicationDump dump)Imports a NLP dump (configuration and sentences of the NLP model). abstract BooleanimportNlpSentencesDump(InputStream stream)Imports a NLP sentences dump (only validated sentences) - format is simpler than ApplicationDump. abstract BooleanimportNlpPlainSentencesDump(SentencesDump dump)Imports a NLP sentences dump (only validated sentences) - format is simpler than ApplicationDump. abstract Booleanhealthcheck()Checks the server is up. -
-
Method Detail
-
evaluateEntities
abstract EntityEvaluationResult evaluateEntities(EntityEvaluationQuery query)
Evaluates entities.
-
mergeValues
abstract ValuesMergeResult mergeValues(ValuesMergeQuery query)
Merges values and returns the result if found.
-
markAsUnknown
abstract Unit markAsUnknown(MarkAsUnknownQuery query)
Informs the nlp model that a sentence has not been understood.
-
getIntentsByNamespaceAndName
abstract List<IntentDefinition> getIntentsByNamespaceAndName(String namespace, String name)
Returns the list of intents of a model.
-
getApplicationByNamespaceAndName
abstract ApplicationDefinition getApplicationByNamespaceAndName(String namespace, String name)
Returns an application for the specified namespace and name.
-
createApplication
abstract ApplicationDefinition createApplication(String namespace, String name, Locale locale)
Creates an application if it does not exists.
-
importNlpDump
abstract Boolean importNlpDump(InputStream stream)
Imports a NLP dump (configuration and sentences of the NLP model).
-
importNlpPlainDump
abstract Boolean importNlpPlainDump(ApplicationDump dump)
Imports a NLP dump (configuration and sentences of the NLP model).
- Parameters:
dump- the dump to import
-
importNlpSentencesDump
abstract Boolean importNlpSentencesDump(InputStream stream)
Imports a NLP sentences dump (only validated sentences) - format is simpler than ApplicationDump.
-
importNlpPlainSentencesDump
abstract Boolean importNlpPlainSentencesDump(SentencesDump dump)
Imports a NLP sentences dump (only validated sentences) - format is simpler than ApplicationDump.
- Parameters:
dump- the dump to import
-
healthcheck
abstract Boolean healthcheck()
Checks the server is up.
-
-
-
-