LanguageIdentificationOptions.Builder
Stay organized with collections
Save and categorize content based on your preferences.
Public Constructor Summary
Inherited Method Summary
From class java.lang.Object
Object
|
clone()
|
boolean |
|
void |
finalize()
|
final Class<?>
|
getClass()
|
int |
hashCode()
|
final void |
notify()
|
final void |
notifyAll()
|
String
|
toString()
|
final void |
wait(long arg0, int arg1)
|
final void |
wait(long arg0)
|
final void |
wait()
|
Public Methods
Returns
- this object, for chaining method calls
Sets the custom Executor
to use. If no Executor
is set, an internal background thread pool will be used.
Most clients should not need to call this method.
Returns
- this object, for chaining method calls
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-10-31 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-10-31 UTC."],[[["\u003cp\u003e\u003ccode\u003eLanguageIdentificationOptions.Builder\u003c/code\u003e helps create \u003ccode\u003eLanguageIdentificationOptions\u003c/code\u003e instances for configuring language identification.\u003c/p\u003e\n"],["\u003cp\u003eIt allows setting a minimum confidence threshold for language identification results using \u003ccode\u003esetConfidenceThreshold\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eDevelopers can customize task execution with \u003ccode\u003esetExecutor\u003c/code\u003e by providing their own \u003ccode\u003eExecutor\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003ebuild()\u003c/code\u003e creates a \u003ccode\u003eLanguageIdentificationOptions\u003c/code\u003e instance based on the builder's configuration.\u003c/p\u003e\n"]]],[],null,["# LanguageIdentificationOptions.Builder\n\npublic static class **LanguageIdentificationOptions.Builder** extends [Object](//developer.android.com/reference/java/lang/Object.html) \nBuilder to create a [LanguageIdentificationOptions](/android/reference/com/google/mlkit/nl/languageid/LanguageIdentificationOptions)\ninstance. \n\n### Public Constructor Summary\n\n|---|----------------------------------------------------------------------------------------------------------------|\n| | [Builder](/android/reference/com/google/mlkit/nl/languageid/LanguageIdentificationOptions.Builder#Builder())() |\n\n### Public Method Summary\n\n|----------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [LanguageIdentificationOptions](/android/reference/com/google/mlkit/nl/languageid/LanguageIdentificationOptions) | [build](/android/reference/com/google/mlkit/nl/languageid/LanguageIdentificationOptions.Builder#build())() Creates a new [LanguageIdentificationOptions](/android/reference/com/google/mlkit/nl/languageid/LanguageIdentificationOptions) instance. |\n| [LanguageIdentificationOptions.Builder](/android/reference/com/google/mlkit/nl/languageid/LanguageIdentificationOptions.Builder) | [setConfidenceThreshold](/android/reference/com/google/mlkit/nl/languageid/LanguageIdentificationOptions.Builder#setConfidenceThreshold(float))(float confidenceThreshold) Sets the minimum confidence for the [LanguageIdentifier.identifyLanguage(String)](/android/reference/com/google/mlkit/nl/languageid/LanguageIdentifier#identifyLanguage(java.lang.String)) or [LanguageIdentifier.identifyPossibleLanguages(String)](/android/reference/com/google/mlkit/nl/languageid/LanguageIdentifier#identifyPossibleLanguages(java.lang.String)) call. |\n| [LanguageIdentificationOptions.Builder](/android/reference/com/google/mlkit/nl/languageid/LanguageIdentificationOptions.Builder) | [setExecutor](/android/reference/com/google/mlkit/nl/languageid/LanguageIdentificationOptions.Builder#setExecutor(java.util.concurrent.Executor))([Executor](//developer.android.com/reference/java/util/concurrent/Executor.html) executor) Sets the custom [Executor](//developer.android.com/reference/java/util/concurrent/Executor.html) to use. |\n\n### Inherited Method Summary\n\nFrom class java.lang.Object \n\n|----------------------------------------------------------------------------|--------------------------------------------------------------------------------|\n| [Object](//developer.android.com/reference/java/lang/Object.html) | clone() |\n| boolean | equals([Object](//developer.android.com/reference/java/lang/Object.html) arg0) |\n| void | finalize() |\n| final [Class](//developer.android.com/reference/java/lang/Class.html)\\\u003c?\\\u003e | getClass() |\n| int | hashCode() |\n| final void | notify() |\n| final void | notifyAll() |\n| [String](//developer.android.com/reference/java/lang/String.html) | toString() |\n| final void | wait(long arg0, int arg1) |\n| final void | wait(long arg0) |\n| final void | wait() |\n\nPublic Constructors\n-------------------\n\n#### public **Builder** ()\n\nPublic Methods\n--------------\n\n#### public [LanguageIdentificationOptions](/android/reference/com/google/mlkit/nl/languageid/LanguageIdentificationOptions)\n**build** ()\n\nCreates a new [LanguageIdentificationOptions](/android/reference/com/google/mlkit/nl/languageid/LanguageIdentificationOptions)\ninstance. \n\n#### public [LanguageIdentificationOptions.Builder](/android/reference/com/google/mlkit/nl/languageid/LanguageIdentificationOptions.Builder) **setConfidenceThreshold** (float confidenceThreshold)\n\nSets the minimum confidence for the [LanguageIdentifier.identifyLanguage(String)](/android/reference/com/google/mlkit/nl/languageid/LanguageIdentifier#identifyLanguage(java.lang.String)) or [LanguageIdentifier.identifyPossibleLanguages(String)](/android/reference/com/google/mlkit/nl/languageid/LanguageIdentifier#identifyPossibleLanguages(java.lang.String)) call.\n\nIf no value is set, a default value is used, depending on the method call. \n\n##### Parameters\n\n| confidenceThreshold | the minimum confidence for the [LanguageIdentifier.identifyLanguage(String)](/android/reference/com/google/mlkit/nl/languageid/LanguageIdentifier#identifyLanguage(java.lang.String)) or [LanguageIdentifier.identifyPossibleLanguages(String)](/android/reference/com/google/mlkit/nl/languageid/LanguageIdentifier#identifyPossibleLanguages(java.lang.String)) call |\n|---------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n\n##### Returns\n\n- this object, for chaining method calls \n\n#### public [LanguageIdentificationOptions.Builder](/android/reference/com/google/mlkit/nl/languageid/LanguageIdentificationOptions.Builder) **setExecutor** ([Executor](//developer.android.com/reference/java/util/concurrent/Executor.html) executor)\n\nSets the custom [Executor](//developer.android.com/reference/java/util/concurrent/Executor.html)\nto use. If no [Executor](//developer.android.com/reference/java/util/concurrent/Executor.html)\nis set, an internal background thread pool will be used.\n\nMost clients should not need to call this method. \n\n##### Parameters\n\n| executor | the [Executor](//developer.android.com/reference/java/util/concurrent/Executor.html) to use |\n|----------|---------------------------------------------------------------------------------------------|\n\n##### Returns\n\n- this object, for chaining method calls"]]