TextClassifier.EntityConfig.Builder

public final class TextClassifier.EntityConfig.Builder


Builder class to construct the EntityConfig object.

Summary

Public constructors

Public methods

@NonNull TextClassifier.EntityConfig

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

TextClassifier.EntityConfig.Builder
includeTypesFromTextClassifier(boolean includeTypesFromTextClassifier)

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

TextClassifier.EntityConfig.Builder

Sets a collection of entity types that are explicitly excluded.

TextClassifier.EntityConfig.Builder

Sets a collection of hints for the text classifier to determine what types of entities to find.

TextClassifier.EntityConfig.Builder

Sets a collection of entity types that are explicitly included.

Public constructors

Builder

public Builder()

Public methods

build

public @NonNull TextClassifier.EntityConfig build()

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

includeTypesFromTextClassifier

public TextClassifier.EntityConfig.Builder includeTypesFromTextClassifier(boolean includeTypesFromTextClassifier)

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

setExcludedTypes

public TextClassifier.EntityConfig.Builder setExcludedTypes(@Nullable Collection<String> excludedTypes)

Sets a collection of entity types that are explicitly excluded.

setHints

public TextClassifier.EntityConfig.Builder setHints(@Nullable Collection<String> hints)

Sets a collection of hints for the text classifier to determine what types of entities to find.

setIncludedTypes

public TextClassifier.EntityConfig.Builder setIncludedTypes(@Nullable Collection<String> includedTypes)

Sets a collection of entity types that are explicitly included.