Stay organized with collections
Save and categorize content based on your preferences.
TextClassificationSessionFactory
public
interface
TextClassificationSessionFactory
android.view.textclassifier.TextClassificationSessionFactory
|
An interface for creating a session-aware TextClassifier.
Summary
Public methods
createTextClassificationSession
public abstract TextClassifier createTextClassificationSession (TextClassificationContext classificationContext)
Creates and returns a session-aware TextClassifier.
Parameters |
classificationContext |
TextClassificationContext : the classification context
This value cannot be null . |
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 2025-02-10 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 2025-02-10 UTC."],[],[],null,["# TextClassificationSessionFactory\n\nAdded in [API level 28](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\nTextClassificationSessionFactory\n================================\n\n*** ** * ** ***\n\n[Kotlin](/reference/kotlin/android/view/textclassifier/TextClassificationSessionFactory \"View this page in Kotlin\") \\|Java\n\n\n`\npublic\n\n\ninterface\nTextClassificationSessionFactory\n`\n\n\n`\n\n\n`\n\n|--------------------------------------------------------------|\n| android.view.textclassifier.TextClassificationSessionFactory |\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\nAn interface for creating a session-aware TextClassifier. \n**See also:**\n\n- [TextClassificationManager.createTextClassificationSession(TextClassificationContext)](/reference/android/view/textclassifier/TextClassificationManager#createTextClassificationSession(android.view.textclassifier.TextClassificationContext))\n\nSummary\n-------\n\n| ### Public methods ||\n|-------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ` abstract `[TextClassifier](/reference/android/view/textclassifier/TextClassifier) | ` `[createTextClassificationSession](/reference/android/view/textclassifier/TextClassificationSessionFactory#createTextClassificationSession(android.view.textclassifier.TextClassificationContext))`(`[TextClassificationContext](/reference/android/view/textclassifier/TextClassificationContext)` classificationContext) ` Creates and returns a session-aware TextClassifier. |\n\nPublic methods\n--------------\n\n### createTextClassificationSession\n\nAdded in [API level 28](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic abstract TextClassifier createTextClassificationSession (TextClassificationContext classificationContext)\n```\n\nCreates and returns a session-aware TextClassifier.\n\n\u003cbr /\u003e\n\n| Parameters ||\n|-------------------------|---------------------------------------------------------------------------------------------|\n| `classificationContext` | `TextClassificationContext`: the classification context This value cannot be `null`. \u003cbr /\u003e |\n\n| Returns ||\n|-------------------------------------------------------------------------|-------------------------------------|\n| [TextClassifier](/reference/android/view/textclassifier/TextClassifier) | This value cannot be `null`. \u003cbr /\u003e |"]]