public ModelCore
The main entry point to manage NLP models.
| Modifier and Type | Method and Description |
|---|---|
void |
deleteOrphans(java.util.Map<ai.tock.nlp.core.Application,? extends java.util.Set<ai.tock.nlp.core.Intent>> applicationsAndIntents,
java.util.List<ai.tock.nlp.core.EntityType> entityTypes)
Remove models that does not match specified applications or intents.
|
NlpApplicationConfiguration |
getCurrentModelConfiguration(java.lang.String applicationName,
NlpEngineType nlpEngineType)
Returns the current model configuration.
|
TestModelReport |
testModel(TestContext context,
java.util.List<ai.tock.nlp.core.sample.SampleExpression> expressions)
Test a model and returns a report.
|
void |
updateEntityModelForEntityType(BuildContext context,
EntityType entityType,
java.util.List<ai.tock.nlp.core.sample.SampleExpression> expressions)
Update entity type model.
|
void |
updateEntityModelForIntent(BuildContext context,
Intent intent,
java.util.List<ai.tock.nlp.core.sample.SampleExpression> expressions)
Update entity model.
|
void |
updateIntentModel(BuildContext context,
java.util.List<ai.tock.nlp.core.sample.SampleExpression> expressions)
Update intent model.
|
void |
updateModelConfiguration(java.lang.String applicationName,
NlpEngineType engineType,
NlpApplicationConfiguration configuration)
Updates the model configuration for the given application name.
|
void |
warmupModels(BuildContext context)
Load all models in memory.
|
void warmupModels(@NotNull
BuildContext context)
Load all models in memory.
void updateIntentModel(@NotNull
BuildContext context,
@NotNull
java.util.List<ai.tock.nlp.core.sample.SampleExpression> expressions)
Update intent model.
void updateEntityModelForIntent(@NotNull
BuildContext context,
@NotNull
Intent intent,
@NotNull
java.util.List<ai.tock.nlp.core.sample.SampleExpression> expressions)
Update entity model.
void updateEntityModelForEntityType(@NotNull
BuildContext context,
@NotNull
EntityType entityType,
@NotNull
java.util.List<ai.tock.nlp.core.sample.SampleExpression> expressions)
Update entity type model.
void deleteOrphans(@NotNull
java.util.Map<ai.tock.nlp.core.Application,? extends java.util.Set<ai.tock.nlp.core.Intent>> applicationsAndIntents,
@NotNull
java.util.List<ai.tock.nlp.core.EntityType> entityTypes)
Remove models that does not match specified applications or intents.
@NotNull TestModelReport testModel(@NotNull TestContext context, @NotNull java.util.List<ai.tock.nlp.core.sample.SampleExpression> expressions)
Test a model and returns a report.
@NotNull NlpApplicationConfiguration getCurrentModelConfiguration(@NotNull java.lang.String applicationName, @NotNull NlpEngineType nlpEngineType)
Returns the current model configuration.
void updateModelConfiguration(@NotNull
java.lang.String applicationName,
@NotNull
NlpEngineType engineType,
@NotNull
NlpApplicationConfiguration configuration)
Updates the model configuration for the given application name.