Save the date! Android Dev Summit is coming to Sunnyvale, CA on Oct 23-24, 2019.

Builder

class Builder
kotlin.Any
   ↳ androidx.textclassifier.TextClassifier.EntityConfig.Builder

Builder class to construct the EntityConfig object.

Summary

Public constructors

Builder class to construct the EntityConfig object.

Public methods
TextClassifier.EntityConfig.Builder!
setExcludedEntityTypes(@Nullable excludedEntityTypes: 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!
setIncludeDefaultEntityTypes(includeDefaultEntityTypes: Boolean)

Specifies to include the default entity types suggested by the text classifier.

TextClassifier.EntityConfig.Builder!
setIncludedEntityTypes(@Nullable includedEntityTypes: MutableCollection<String!>?)

Sets a collection of entity types that are explicitly included.

TextClassifier.EntityConfig

Combines all of the options that have been set and returns a new EntityConfig object.

Public constructors

<init>

Builder()

Builder class to construct the EntityConfig object.

Public methods

setExcludedEntityTypes

fun setExcludedEntityTypes(@Nullable excludedEntityTypes: 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.

setIncludeDefaultEntityTypes

fun setIncludeDefaultEntityTypes(includeDefaultEntityTypes: Boolean): TextClassifier.EntityConfig.Builder!

Specifies to include the default entity types suggested by the text classifier. By default, it is included.

setIncludedEntityTypes

fun setIncludedEntityTypes(@Nullable includedEntityTypes: MutableCollection<String!>?): TextClassifier.EntityConfig.Builder!

Sets a collection of entity types that are explicitly included.

build

@NonNull fun build(): TextClassifier.EntityConfig

Combines all of the options that have been set and returns a new EntityConfig object.