Android Dev Summit, October 23-24: two days of technical content, directly from the Android team. Sign-up for livestream updates.

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

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

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.

Public constructors

<init>

Builder()

Builder class to construct the EntityConfig object.

Public methods

build

@NonNull fun build(): TextClassifier.EntityConfig

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

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.