[[["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-05-08 UTC."],[],[],null,["# tflite_support.task.text.BertCluAnnotator\n\n\u003cbr /\u003e\n\n|-----------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [View source on GitHub](https://github.com/tensorflow/tflite-support/blob/v0.4.4/tensorflow_lite_support/python/task/text/bert_clu_annotator.py#L43-L109) |\n\nClass that performs Bert CLU Annotation on text. \n\n tflite_support.task.text.BertCluAnnotator(\n options: ../../../tflite_support/task/text/BertCluAnnotatorOptions,\n cpp_annotator: _CppBertCluAnnotator\n ) -\u003e None\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Attributes ---------- ||\n|-----------|---------------|\n| `options` | \u003cbr /\u003e \u003cbr /\u003e |\n\n\u003cbr /\u003e\n\nMethods\n-------\n\n### `annotate`\n\n[View source](https://github.com/tensorflow/tflite-support/blob/v0.4.4/tensorflow_lite_support/python/task/text/bert_clu_annotator.py#L91-L105) \n\n annotate(\n request: ../../../tflite_support/task/processor/CluRequest\n ) -\u003e ../../../tflite_support/task/processor/CluResponse\n\nPerforms actual Bert CLU Annotation on the provided CLU request.\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Args ||\n|-----------|-------------------|\n| `request` | The input to CLU. |\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Returns ||\n|---|---|\n| The output of CLU. ||\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Raises ||\n|----------------|----------------------------------------------|\n| `ValueError` | If any of the input arguments is invalid. |\n| `RuntimeError` | If failed to calculate the embedding vector. |\n\n\u003cbr /\u003e\n\n### `create_from_file`\n\n[View source](https://github.com/tensorflow/tflite-support/blob/v0.4.4/tensorflow_lite_support/python/task/text/bert_clu_annotator.py#L53-L69) \n\n @classmethod\n create_from_file(\n file_path: str\n ) -\u003e 'BertCluAnnotator'\n\nCreates the `BertCluAnnotator` object from a TensorFlow Lite model.\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Args ||\n|-------------|--------------------|\n| `file_path` | Path to the model. |\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Returns ||\n|---|---|\n| `BertCLUAnnotator` object that's created from the model file. ||\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Raises ||\n|----------------|--------------------------------------------------------------------------------------------|\n| `ValueError` | If failed to create `BertCluAnnotator` object from the provided file such as invalid file. |\n| `RuntimeError` | If other types of error occurred. |\n\n\u003cbr /\u003e\n\n### `create_from_options`\n\n[View source](https://github.com/tensorflow/tflite-support/blob/v0.4.4/tensorflow_lite_support/python/task/text/bert_clu_annotator.py#L71-L89) \n\n @classmethod\n create_from_options(\n options: ../../../tflite_support/task/text/BertCluAnnotatorOptions\n ) -\u003e 'BertCluAnnotator'\n\nCreates the `BertCluAnnotator` object from Bert CLU Annotation options.\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Args ||\n|-----------|-------------------------------------------|\n| `options` | Options for the Bert CLU annotation task. |\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Returns ||\n|---|---|\n| `BertCluAnnotator` object that's created from `options`. ||\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Raises ||\n|----------------|---------------------------------------------------------------------------------------------------------|\n| `ValueError` | If failed to create `BertCluAnnotator` object from `BertCluAnnotatorOptions` such as missing the model. |\n| `RuntimeError` | If other types of error occurred. |\n\n\u003cbr /\u003e"]]