Builder
class Builder
kotlin.Any | |
↳ | androidx.textclassifier.TextClassifier.EntityConfig.Builder |
Builder class to construct the EntityConfig
object.
Summary
Public constructors | |
---|---|
<init>() Builder class to construct the |
Public methods | |
---|---|
TextClassifier.EntityConfig |
build() Combines all of the options that have been set and returns a new |
TextClassifier.EntityConfig.Builder! |
includeTypesFromTextClassifier(includeTypesFromTextClassifier: Boolean) Specifies to include the default entity types suggested by the text classifier. |
TextClassifier.EntityConfig.Builder! |
setExcludedTypes(@Nullable excludedTypes: MutableCollection<String!>?) Sets a collection of entity types that are explicitly excluded. |
TextClassifier.EntityConfig.Builder! |
setHints(@Nullable hints: MutableCollection<String!>?) Sets a collection of hints for the text classifier to determine what types of entities to find. |
TextClassifier.EntityConfig.Builder! |
setIncludedTypes(@Nullable includedTypes: MutableCollection<String!>?) Sets a collection of entity types that are explicitly included. |
Public constructors
Public methods
build
@NonNull fun build(): TextClassifier.EntityConfig
Combines all of the options that have been set and returns a new EntityConfig
object.
includeTypesFromTextClassifier
fun includeTypesFromTextClassifier(includeTypesFromTextClassifier: Boolean): TextClassifier.EntityConfig.Builder!
Specifies to include the default entity types suggested by the text classifier. By default, it is included.
setExcludedTypes
fun setExcludedTypes(@Nullable excludedTypes: MutableCollection<String!>?): TextClassifier.EntityConfig.Builder!
Sets a collection of entity types that are explicitly excluded.
setHints
fun setHints(@Nullable hints: MutableCollection<String!>?): TextClassifier.EntityConfig.Builder!
Sets a collection of hints for the text classifier to determine what types of entities to find.
setIncludedTypes
fun setIncludedTypes(@Nullable includedTypes: MutableCollection<String!>?): TextClassifier.EntityConfig.Builder!
Sets a collection of entity types that are explicitly included.