class_docstr: Represents spans as a combination of the embeddings of their endpoints. Additionally,
  the width of the spans can be embedded and concatenated on to the final combination.
  
  The following types of representation are supported, assuming that
  `x = span_start_embeddings` and `y = span_end_embeddings`.
  
  `x`, `y`, `x*y`, `x+y`, `x-y`, `x/y`, where each of those binary operations
  is performed elementwise.  You can list as many combinations as you want, comma separated.
  For example, you might give `x,y,x*y` as the `combination` parameter to this class.
  The computed similarity function would then be `[x; y; x*y]`, which can then be optionally
  concatenated with an embedded representation of the width of the span.
  
  Registered as a `SpanExtractor` with name "endpoint".
  
  # Parameters
  
  input_dim : `int`, required.
      The final dimension of the `sequence_tensor`.
  combination : `str`, optional (default = `"x,y"`).
      The method used to combine the `start_embedding` and `end_embedding`
      representations. See above for a full description.
  num_width_embeddings : `int`, optional (default = `None`).
      Specifies the number of buckets to use when representing
      span width features.
  span_width_embedding_dim : `int`, optional (default = `None`).
      The embedding size for the span_width features.
  bucket_widths : `bool`, optional (default = `False`).
      Whether to bucket the span widths into log-space buckets. If `False`,
      the raw span widths are used.
  use_exclusive_start_indices : `bool`, optional (default = `False`).
      If `True`, the start indices extracted are converted to exclusive indices. Sentinels
      are used to represent exclusive span indices for the elements in the first
      position in the sequence (as the exclusive indices for these elements are outside
      of the the sequence boundary) so that start indices can be exclusive.
      NOTE: This option can be helpful to avoid the pathological case in which you
      want span differences for length 1 spans - if you use inclusive indices, you
      will end up with an `x - x` operation for length 1 spans, which is not good.
code: def __init__(
      self,
      input_dim: int,
      combination: str = "x,y",
      num_width_embeddings: int = None,
      span_width_embedding_dim: int = None,
      bucket_widths: bool = False,
      use_exclusive_start_indices: bool = False,
  ) -> None:
      super().__init__(
          input_dim=input_dim,
          num_width_embeddings=num_width_embeddings,
          span_width_embedding_dim=span_width_embedding_dim,
          bucket_widths=bucket_widths,
      )
      self._combination = combination
  
      self._use_exclusive_start_indices = use_exclusive_start_indices
      if use_exclusive_start_indices:
          self._start_sentinel = Parameter(
              torch.randn([1, 1, int(input_dim)])
          )
  
file_path: allennlp/allennlp/modules/span_extractors/endpoint_span_extractor.py
imports: import torch
  from torch.nn.parameter import Parameter
  from allennlp.modules.span_extractors.span_extractor import SpanExtractor
  from allennlp.modules.span_extractors.span_extractor_with_span_width_embedding import SpanExtractorWithSpanWidthEmbedding
  from allennlp.nn import util
label_desc: Use image node_id 1 to create a new EndpointSpanExtractor object from inherited base classes: SpanExtractorWithSpanWidthEmbedding with example: obj = EndpointSpanExtractor(input_dim, combination, num_width_embeddings, span_width_embedding_dim, bucket_widths, use_exclusive_start_indices)