public NlpClient
Wraps calls to the NLP stack. class TockNlpClient is the provided implementation.
class TockNlpClient@Nullable NlpResult parse(@NotNull NlpQuery query)
Analyses a sentence and returns the result.
@Nullable EntityEvaluationResult evaluateEntities(@NotNull EntityEvaluationQuery query)
Evaluates entities.
@Nullable ValuesMergeResult mergeValues(@NotNull ValuesMergeQuery query)
Merges values and returns the result if found.
void markAsUnknown(@NotNull
MarkAsUnknownQuery query)
Informs the nlp model that a sentence has not been understood.
@Nullable
java.util.List<ai.tock.nlp.api.client.model.dump.IntentDefinition> getIntentsByNamespaceAndName(@NotNull
java.lang.String namespace,
@NotNull
java.lang.String name)
Returns the list of intents of a model.
@Nullable ApplicationDefinition getApplicationByNamespaceAndName(@NotNull java.lang.String namespace, @NotNull java.lang.String name)
Returns an application for the specified namespace and name.
@Nullable ApplicationDefinition createApplication(@NotNull java.lang.String namespace, @NotNull java.lang.String name, @NotNull java.util.Locale locale)
Creates an application if it does not exists.
boolean importNlpDump(@NotNull
java.io.InputStream stream)
Imports a NLP dump (configuration and sentences of the NLP model).
boolean importNlpPlainDump(@NotNull
ApplicationDump dump)
Imports a NLP dump (configuration and sentences of the NLP model).
dump - the dump to importboolean importNlpSentencesDump(@NotNull
java.io.InputStream stream)
Imports a NLP sentences dump (only validated sentences) - format is simpler than class ApplicationDump.
class ApplicationDumpboolean importNlpPlainSentencesDump(@NotNull
SentencesDump dump)
Imports a NLP sentences dump (only validated sentences) - format is simpler than class ApplicationDump.
dump - the dump to importclass ApplicationDumpboolean healthcheck()
Checks the server is up.