Back to Tensorflow

tflite_support.task.processor.QaAnswer

tensorflow/lite/g3doc/api_docs/python/tflite_support/task/processor/QaAnswer.md

2.21.02.5 KB
Original Source

page_type: reference description: Represents the Answer to BertQuestionAnswerer.

<link rel="stylesheet" href="/site-assets/css/style.css"> <!-- DO NOT EDIT! Automatically generated file. --> <div itemscope itemtype="http://developers.google.com/ReferenceObject"> <meta itemprop="name" content="tflite_support.task.processor.QaAnswer" /> <meta itemprop="path" content="Stable" /> <meta itemprop="property" content="__eq__"/> <meta itemprop="property" content="__init__"/> </div>

tflite_support.task.processor.QaAnswer

<!-- Insert buttons and diff --> <table class="tfo-notebook-buttons tfo-api nocontent" align="left"> <td> <a target="_blank" href="https://github.com/tensorflow/tflite-support/blob/v0.4.4/tensorflow_lite_support/python/task/processor/proto/qa_answers.proto">
View source on GitHub
</a> </td> </table>

Represents the Answer to BertQuestionAnswerer.

<pre class="devsite-click-to-copy prettyprint lang-py tfo-signature-link"> <code>tflite_support.task.processor.QaAnswer( pos: <a href="../../../tflite_support/task/processor/Pos"><code>tflite_support.task.processor.Pos</code></a>, text: str ) </code></pre> <!-- Placeholder for "Used in" --> <!-- Tabular view --> <table class="responsive fixed orange"> <colgroup><col width="214px"><col></colgroup> <tr><th colspan="2"><h2 class="add-link">Attributes</h2></th></tr> <tr> <td> `pos`<a id="pos"></a> </td> <td> The relative position of the answer in the context. </td> </tr><tr> <td> <a href="https://www.tensorflow.org/text/api_docs/python/text"><code>text</code></a><a id="text"></a> </td> <td> The answer text. </td> </tr> </table>

Methods

<h3 id="__eq__"><code>__eq__</code></h3>

<a target="_blank" class="external" href="https://github.com/tensorflow/tflite-support/blob/v0.4.4/tensorflow_lite_support/python/task/processor/proto/qa_answers.proto">View source</a>

<pre class="devsite-click-to-copy prettyprint lang-py tfo-signature-link"> <code>__eq__( other: Any ) -> bool </code></pre>

Checks if this object is equal to the given object.

<!-- Tabular view --> <table class="responsive fixed orange"> <colgroup><col width="214px"><col></colgroup> <tr><th colspan="2">Args</th></tr> <tr> <td> `other` </td> <td> The object to be compared with. </td> </tr> </table> <!-- Tabular view --> <table class="responsive fixed orange"> <colgroup><col width="214px"><col></colgroup> <tr><th colspan="2">Returns</th></tr> <tr class="alt"> <td colspan="2"> True if the objects are equal. </td> </tr> </table>