class_docstr: A Pytorch module to obtain feature embeddings for pairwise features
  
  Usage:
      encoder = PairwiseEncoder(config)
      pairwise_features = encoder(pair_indices, doc)
docstr: Returns a tensor where i-th element is the speaker id of i-th word.
code: def _speaker_map(doc: Doc) -> List[int]:
      """
      Returns a tensor where i-th element is the speaker id of i-th word.
      """
      # speaker string -> speaker id
      str2int = {s: i for i, s in enumerate(set(doc["speaker"]))}
  
      # word id -> speaker id
      return [str2int[s] for s in doc["speaker"]]
  
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 4 for calling the PairwiseEncoder obj's underlying member method code with example usage: obj._speaker_map(doc) and returns: unknown