class_docstr: A Pytorch module to obtain feature embeddings for pairwise features
  
  Usage:
      encoder = PairwiseEncoder(config)
      pairwise_features = encoder(pair_indices, doc)
code: def __init__(self, config: Config):
      super().__init__()
      emb_size = config.embedding_size
  
      self.genre2int = {
          g: gi
          for gi, g in enumerate(
              ["bc", "bn", "mz", "nw", "pt", "tc", "wb"]
          )
      }
      self.genre_emb = torch.nn.Embedding(len(self.genre2int), emb_size)
  
      # each position corresponds to a bucket:
      #   [(0, 2), (2, 3), (3, 4), (4, 5), (5, 8),
      #    (8, 16), (16, 32), (32, 64), (64, float("inf"))]
      self.distance_emb = torch.nn.Embedding(9, emb_size)
  
      # two possibilities: same vs different speaker
      self.speaker_emb = torch.nn.Embedding(2, emb_size)
  
      self.dropout = torch.nn.Dropout(config.dropout_rate)
      self.shape = emb_size * 3
  
file_path: stanza/stanza/models/coref/pairwise_encoder.py
imports: from typing import List
  import torch
  from stanza.models.coref.config import Config
  from stanza.models.coref.const import Doc
label_desc: Use image node_id 1 to create a new PairwiseEncoder object from inherited base classes: torch.nn with example: obj = PairwiseEncoder(config)