public NlpController
Sends NLP requests.
void parseSentence(@NotNull
SendSentence sentence,
@NotNull
UserTimeline userTimeline,
@NotNull
Dialog dialog,
@NotNull
ConnectorController connector,
@NotNull
BotDefinition botDefinition)
Parses a sentence and set intent and entities in context.
void markAsUnknown(@NotNull
SendSentence sentence,
@NotNull
UserTimeline userTimeline,
@NotNull
BotDefinition botDefinition)
Marks the sentence as not understood in the nlp model.
@Nullable
java.util.List<ai.tock.nlp.api.client.model.dump.IntentDefinition> getIntentsByNamespaceAndName(@NotNull
java.lang.String namespace,
@NotNull
java.lang.String name)
Exports list of IntentDefinition
boolean importNlpDump(@NotNull
java.io.InputStream stream)
Imports a NLP dump (configuration and sentences of NLP model).
boolean importNlpPlainDump(@NotNull
ai.tock.nlp.api.client.model.dump.ApplicationDump dump)
Imports a NLP dump (configuration and sentences of NLP model).
dump - the dump to importboolean importNlpPlainSentencesDump(@NotNull
ai.tock.nlp.api.client.model.dump.SentencesDump dump)
Imports a NLP sentences dump (only validated sentences) - format is simpler than ApplicationDump.
dump - the dump to importboolean importNlpSentencesDump(@NotNull
java.io.InputStream stream)
Imports a NLP sentences dump (only validated sentences) - format is simpler than ApplicationDump.
void waitAvailability(long timeToWaitInMs)
Tries to check nlp server, waiting 200 response or timeToWaitInMs before returning.
timeToWaitInMs