public final class

TextClassifier.EntityConfig

extends java.lang.Object

 java.lang.Object

↳androidx.textclassifier.TextClassifier.EntityConfig

Overview

Configuration object for specifying what entities to identify. Configs are initially based on a predefined preset, and can be modified from there.

Summary

Methods
public static TextClassifier.EntityConfigcreateFromBundle(Bundle bundle)

Extracts an EntityConfig from a bundle that was added using TextClassifier.EntityConfig.toBundle().

public static TextClassifier.EntityConfigfromPlatform(android.view.textclassifier.TextClassifier.EntityConfig entityConfig)

public java.util.Collection<java.lang.String>getHints()

Retrieves the list of hints.

public java.util.Collection<java.lang.String>resolveTypes(java.util.Collection<java.lang.String> typesFromTextClassifier)

Returns a final list of entity types that the text classifier should look for.

public booleanshouldIncludeTypesFromTextClassifier()

Return whether the client allows the text classifier to include its own list of default entity types.

public BundletoBundle()

Adds this EntityConfig to a Bundle that can be read back with the same parameters to TextClassifier.EntityConfig.createFromBundle(Bundle).

public android.view.textclassifier.TextClassifier.EntityConfigtoPlatform()

from java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Methods

public java.util.Collection<java.lang.String> resolveTypes(java.util.Collection<java.lang.String> typesFromTextClassifier)

Returns a final list of entity types that the text classifier should look for.

NOTE: This method is intended for use by text classifier.

Parameters:

typesFromTextClassifier: entity types the text classifier thinks should be included before factoring in the included/excluded entity types given by the client.

public java.util.Collection<java.lang.String> getHints()

Retrieves the list of hints.

Returns:

An unmodifiable collection of the hints.

public boolean shouldIncludeTypesFromTextClassifier()

Return whether the client allows the text classifier to include its own list of default entity types. If this functions returns true, text classifier can consider to specify its own list in TextClassifier.EntityConfig.resolveTypes(Collection).

NOTE: This method is intended for use by text classifier.

See also: TextClassifier.EntityConfig.resolveTypes(Collection)

public Bundle toBundle()

Adds this EntityConfig to a Bundle that can be read back with the same parameters to TextClassifier.EntityConfig.createFromBundle(Bundle).

public static TextClassifier.EntityConfig createFromBundle(Bundle bundle)

Extracts an EntityConfig from a bundle that was added using TextClassifier.EntityConfig.toBundle().

public android.view.textclassifier.TextClassifier.EntityConfig toPlatform()

public static TextClassifier.EntityConfig fromPlatform(android.view.textclassifier.TextClassifier.EntityConfig entityConfig)