TextLanguage


public final class TextLanguage
extends Object implements Parcelable

java.lang.Object
   ↳ android.view.textclassifier.TextLanguage


Represents the result of language detection of a piece of text.

This contains a list of locales, each paired with a confidence score, sorted in decreasing order of those scores. E.g., for a given input text, the model may return [<"en", 0.85>, <"fr", 0.15>]. This sample result means the model reports that it is 85% likely that the entire text is in English and 15% likely that the entire text is in French, etc. It does not mean that 85% of the input is in English and 15% is in French.

Summary

Nested classes

class TextLanguage.Builder

Builder used to build TextLanguage objects. 

class TextLanguage.Request

A request object for detecting the language of a piece of text. 

Inherited constants

Fields

public static final Creator<TextLanguage> CREATOR

Public methods

int describeContents()

Describe the kinds of special objects contained in this Parcelable instance's marshaled representation.

float