Package ai.tock.nlp.front.shared.config
Class ClassifiedSentence
-
- All Implemented Interfaces:
public final class ClassifiedSentenceA sentence with its classification for a given Locale and an ApplicationDefinition.
-
-
Field Summary
Fields Modifier and Type Field Description private final Stringtextprivate final Localelanguageprivate final Id<ApplicationDefinition>applicationIdprivate final InstantcreationDateprivate final InstantupdateDateprivate final ClassifiedSentenceStatusstatusprivate final Classificationclassificationprivate final DoublelastIntentProbabilityprivate final DoublelastEntityProbabilityprivate final InstantlastUsageprivate final LongusageCountprivate final LongunknownCountprivate final BooleanforReviewprivate final StringreviewCommentprivate final Stringqualifierprivate final Map<String, Double>otherIntentsProbabilitiesprivate final Stringconfiguration
-
Constructor Summary
Constructors Constructor Description ClassifiedSentence(ParseResult result, Locale language, Id<ApplicationDefinition> applicationId, Id<IntentDefinition> intentId, Double lastIntentProbability, Double lastEntityProbability)ClassifiedSentence(ParseResult result, Locale language, Id<ApplicationDefinition> applicationId, Id<IntentDefinition> intentId, Double lastIntentProbability, Double lastEntityProbability, String configuration)ClassifiedSentence(String text, Locale language, Id<ApplicationDefinition> applicationId, Instant creationDate, Instant updateDate, ClassifiedSentenceStatus status, Classification classification, Double lastIntentProbability, Double lastEntityProbability, Instant lastUsage, Long usageCount, Long unknownCount, Boolean forReview, String reviewComment, String qualifier, Map<String, Double> otherIntentsProbabilities, String configuration)
-
Method Summary
Modifier and Type Method Description final StringgetText()The text of the sentence. final LocalegetLanguage()The locale. final Id<ApplicationDefinition>getApplicationId()The application id. final InstantgetCreationDate()Date of creation of this sentence. final InstantgetUpdateDate()Last update date. final ClassifiedSentenceStatusgetStatus()The current status of the sentence. final ClassificationgetClassification()The current classification of the sentence. final DoublegetLastIntentProbability()If not yet validated, the intent probability of the last evaluation. final DoublegetLastEntityProbability()If not yet validated, the average entity probability of the last evaluation. final InstantgetLastUsage()The last usage date (for a real user) if any. final LonggetUsageCount()The total number of uses of this sentence. final LonggetUnknownCount()The total number of unknown count generated by this sentence. final BooleangetForReview()Tag the sentence for another person to review final StringgetReviewComment()Comment to help the other person to review final StringgetQualifier()Last person that has qualified the sentence final Map<String, Double>getOtherIntentsProbabilities()Other intents with significant probabilities. final StringgetConfiguration()final SampleExpressiontoSampleExpression(Function1<Id<IntentDefinition>, Intent> intentProvider, Function1<String, EntityType> entityTypeProvider)Build an expression from this sentence. -
-
Constructor Detail
-
ClassifiedSentence
ClassifiedSentence(ParseResult result, Locale language, Id<ApplicationDefinition> applicationId, Id<IntentDefinition> intentId, Double lastIntentProbability, Double lastEntityProbability)
-
ClassifiedSentence
ClassifiedSentence(ParseResult result, Locale language, Id<ApplicationDefinition> applicationId, Id<IntentDefinition> intentId, Double lastIntentProbability, Double lastEntityProbability, String configuration)
-
ClassifiedSentence
ClassifiedSentence(String text, Locale language, Id<ApplicationDefinition> applicationId, Instant creationDate, Instant updateDate, ClassifiedSentenceStatus status, Classification classification, Double lastIntentProbability, Double lastEntityProbability, Instant lastUsage, Long usageCount, Long unknownCount, Boolean forReview, String reviewComment, String qualifier, Map<String, Double> otherIntentsProbabilities, String configuration)
-
-
Method Detail
-
getLanguage
final Locale getLanguage()
The locale.
-
getApplicationId
final Id<ApplicationDefinition> getApplicationId()
The application id.
-
getCreationDate
final Instant getCreationDate()
Date of creation of this sentence.
-
getUpdateDate
final Instant getUpdateDate()
Last update date.
-
getStatus
final ClassifiedSentenceStatus getStatus()
The current status of the sentence.
-
getClassification
final Classification getClassification()
The current classification of the sentence.
-
getLastIntentProbability
final Double getLastIntentProbability()
If not yet validated, the intent probability of the last evaluation.
-
getLastEntityProbability
final Double getLastEntityProbability()
If not yet validated, the average entity probability of the last evaluation.
-
getLastUsage
final Instant getLastUsage()
The last usage date (for a real user) if any.
-
getUsageCount
final Long getUsageCount()
The total number of uses of this sentence.
-
getUnknownCount
final Long getUnknownCount()
The total number of unknown count generated by this sentence.
-
getForReview
final Boolean getForReview()
Tag the sentence for another person to review
-
getReviewComment
final String getReviewComment()
Comment to help the other person to review
-
getQualifier
final String getQualifier()
Last person that has qualified the sentence
-
getOtherIntentsProbabilities
final Map<String, Double> getOtherIntentsProbabilities()
Other intents with significant probabilities.
-
getConfiguration
final String getConfiguration()
-
toSampleExpression
final SampleExpression toSampleExpression(Function1<Id<IntentDefinition>, Intent> intentProvider, Function1<String, EntityType> entityTypeProvider)
Build an expression from this sentence.
- Parameters:
intentProvider- intent id -> intent providerentityTypeProvider- entity type name -> entity type provider
-
-
-
-