-
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>otherIntentsProbabilities
-
Constructor Summary
Constructors Constructor Description ClassifiedSentence(ParseResult result, Locale language, Id<ApplicationDefinition> applicationId, Id<IntentDefinition> intentId, Double lastIntentProbability, Double lastEntityProbability)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)
-
Method Summary
Modifier and Type Method Description final BooleanhasSameContent(ClassifiedSentence sentence)Check if the sentence has the same content (status, creation & update dates excluded) final SampleExpressiontoSampleExpression(Function1<Id<IntentDefinition>, Intent> intentProvider, Function1<String, EntityType> entityTypeProvider)Build an expression from this sentence. final Stringcomponent1()final Localecomponent2()final Id<ApplicationDefinition>component3()final Instantcomponent4()final Instantcomponent5()final ClassifiedSentenceStatuscomponent6()final Classificationcomponent7()final Doublecomponent8()final Doublecomponent9()final Instantcomponent10()final Longcomponent11()final Longcomponent12()final Booleancomponent13()final Stringcomponent14()final Stringcomponent15()final Map<String, Double>component16()final ClassifiedSentencecopy(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)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. -
-
Constructor Detail
-
ClassifiedSentence
ClassifiedSentence(ParseResult result, Locale language, Id<ApplicationDefinition> applicationId, Id<IntentDefinition> intentId, Double lastIntentProbability, Double lastEntityProbability)
-
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)
-
-
Method Detail
-
hasSameContent
final Boolean hasSameContent(ClassifiedSentence sentence)
Check if the sentence has the same content (status, creation & update dates excluded)
-
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
-
component1
final String component1()
-
component2
final Locale component2()
-
component3
final Id<ApplicationDefinition> component3()
-
component4
final Instant component4()
-
component5
final Instant component5()
-
component6
final ClassifiedSentenceStatus component6()
-
component7
final Classification component7()
-
component8
final Double component8()
-
component9
final Double component9()
-
component10
final Instant component10()
-
component11
final Long component11()
-
component12
final Long component12()
-
component13
final Boolean component13()
-
component14
final String component14()
-
component15
final String component15()
-
component16
final Map<String, Double> component16()
-
copy
final ClassifiedSentence copy(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)
-
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.
-
-
-
-