class_docstr: Text Pair Classification Model for tasks such as Recognizing Textual Entailment, build upon TextClassifier.
  
  The model takes document embeddings and puts resulting text representation(s) into a linear layer to get the
  actual class label. We provide two ways to embed the DataPairs: Either by embedding both DataPoints
  and concatenating the resulting vectors ("embed_separately=True") or by concatenating the DataPoints and embedding
  the resulting vector ("embed_separately=False").
class_docstr_tok: ["Text","Pair","Classification","Model","for","tasks","such","as","Recognizing","Textual","Entailment",",","build","upon","TextClassifier",".","The","model","takes","document","embeddings","and","puts","resulting","text","representation","(","s",")","into","a","linear","layer","to","get","the","actual","class","label",".","We","provide","two","ways","to","embed","the","DataPairs",":","Either","by","embedding","both","DataPoints","and","concatenating","the","resulting","vectors","(","``","embed_separately=True","''",")","or","by","concatenating","the","DataPoints","and","embedding","the","resulting","vector","(","``","embed_separately=False","''",")","."]
code: def get_used_tokens(
      self,
      corpus: Corpus,
      context_length: int = 0,
      respect_document_boundaries: bool = True,
  ) -> typing.Iterable[List[str]]:
      for sentence_pair in _iter_dataset(corpus.get_all_sentences()):
          yield [t.text for t in sentence_pair.first]
          yield [
              t.text
              for t in sentence_pair.first.left_context(
                  context_length, respect_document_boundaries
              )
          ]
          yield [
              t.text
              for t in sentence_pair.first.right_context(
                  context_length, respect_document_boundaries
              )
          ]
          yield [t.text for t in sentence_pair.second]
          yield [
              t.text
              for t in sentence_pair.second.left_context(
                  context_length, respect_document_boundaries
              )
          ]
          yield [
              t.text
              for t in sentence_pair.second.right_context(
                  context_length, respect_document_boundaries
              )
          ]
  
file_path: flair/flair/models/pairwise_classification_model.py
imports: import typing
  from typing import List
  import torch
  import flair.embeddings
  import flair.nn
  from flair.data import Corpus, Sentence, TextPair, _iter_dataset
label_desc: Use image node_id 7 for calling the TextPairClassifier obj's underlying member method code with example usage: obj.get_used_tokens(corpus, context_length, respect_document_boundaries) without return types