Package ai.tock.nlp.front.shared.parser
Class ParsedEntityValue
-
- All Implemented Interfaces:
-
ai.tock.nlp.core.IntOpenRange,kotlin.Comparable
public final class ParsedEntityValue implements IntOpenRangeThis class is copied from ai.tock.nlp.core.EntityValue, but value is typed at Value. This is basically a hack to avoid including Value notion in the core.
There is also an additional boolean mergeSupport to indicate if value merge between two values or more of the same Entity is supported.
A probability property is also added. It comes from EntityRecognition
-
-
Field Summary
Fields Modifier and Type Field Description private final Integerstartprivate final Integerendprivate final Entityentityprivate final Valuevalueprivate final Booleanevaluatedprivate final List<ParsedEntityValue>subEntitiesprivate final Doubleprobabilityprivate final BooleanmergeSupport
-
Constructor Summary
Constructors Constructor Description ParsedEntityValue(Integer start, Integer end, Entity entity, Object value, Boolean evaluated, List<ParsedEntityValue> subEntities, Double probability, Boolean mergeSupport)ParsedEntityValue(EntityValue entityValue, Double probability, Boolean mergeSupport)ParsedEntityValue(Integer start, Integer end, Entity entity, Value value, Boolean evaluated, List<ParsedEntityValue> subEntities, Double probability, Boolean mergeSupport)
-
Method Summary
Modifier and Type Method Description IntegergetStart()Start (inclusive) text index of the entity. IntegergetEnd()End (exclusive) text index of the entity. final EntitygetEntity()Entity definition. final ValuegetValue()Current value if evaluated. final BooleangetEvaluated()Is this entity has been evaluated ? final List<ParsedEntityValue>getSubEntities()Sub entities if any. final DoublegetProbability()Recognition probability. final BooleangetMergeSupport()Does this entity value support merge with other values ? final ParsedEntityValueobfuscate(String obfuscatedQuery)Obfuscates the entity. -
-
Constructor Detail
-
ParsedEntityValue
ParsedEntityValue(Integer start, Integer end, Entity entity, Object value, Boolean evaluated, List<ParsedEntityValue> subEntities, Double probability, Boolean mergeSupport)
-
ParsedEntityValue
ParsedEntityValue(EntityValue entityValue, Double probability, Boolean mergeSupport)
-
-
Method Detail
-
getEntity
final Entity getEntity()
Entity definition.
-
getValue
final Value getValue()
Current value if evaluated.
-
getEvaluated
final Boolean getEvaluated()
Is this entity has been evaluated ?
-
getSubEntities
final List<ParsedEntityValue> getSubEntities()
Sub entities if any.
-
getProbability
final Double getProbability()
Recognition probability.
-
getMergeSupport
final Boolean getMergeSupport()
Does this entity value support merge with other values ?
-
obfuscate
final ParsedEntityValue obfuscate(String obfuscatedQuery)
Obfuscates the entity.
-
-
-
-