Stay organized with collections
Save and categorize content based on your preferences.
TextLink
class TextLink : Parcelable
A link, identifying a substring of text and possible entity types for it.
Summary
Inherited constants |
From class Parcelable
Int |
CONTENTS_FILE_DESCRIPTOR
Descriptor bit used with describeContents() : indicates that the Parcelable object's flattened representation includes a file descriptor.
|
Int |
PARCELABLE_WRITE_RETURN_VALUE
Flag for use with writeToParcel : the object being written is a return value, that is the result of a function such as "Parcelable someFunction() ", "void someFunction(out Parcelable) ", or "void someFunction(inout Parcelable) ". Some implementations may want to release resources at this point.
|
|
Public methods |
Int |
|
Float |
Returns the confidence score for a particular entity type.
|
Int |
Returns the end index of this link in the original text.
|
String |
Returns the entity type at a given index.
|
Int |
Returns the number of entity types that have confidence scores.
|
Bundle |
Returns a bundle containing custom data related to this TextLink.
|
Int |
Returns the start index of this link in the original text.
|
String |
|
Unit |
|
Public methods
describeContents
fun describeContents(): Int
getConfidenceScore
fun getConfidenceScore(entityType: String!): Float
Returns the confidence score for a particular entity type.
Return |
Float |
Value is between 0.0 and 1.0 inclusive |
getEnd
fun getEnd(): Int
Returns the end index of this link in the original text.
getEntity
fun getEntity(index: Int): String
Returns the entity type at a given index. Entity types are sorted by confidence.
getEntityCount
fun getEntityCount(): Int
Returns the number of entity types that have confidence scores.
Return |
Int |
the entity count |
fun getExtras(): Bundle
Returns a bundle containing custom data related to this TextLink.
Return |
Bundle |
This value cannot be null . |
getStart
fun getStart(): Int
Returns the start index of this link in the original text.
Return |
Int |
the start index |
toString
fun toString(): String
Return |
String |
a string representation of the object. |
Properties
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2024-05-15 UTC.