original_docstring: 
        Given scores from an expanded dictionary
        corresponding to a batch, sums together copies,
        with a dictionary word when it is ambigious.
        
docstring: Given scores from an expanded dictionary
  corresponding to a batch, sums together copies,
  with a dictionary word when it is ambigious.
docstring_tokens: Given scores from an expanded dictionary corresponding to a batch sums together copies with a dictionary word when it is ambigious .
code: def collapseCopyScores(self, scores, batch):
        """
        Given scores from an expanded dictionary
        corresponding to a batch, sums together copies,
        with a dictionary word when it is ambigious.
        """
        tgt_vocab = self.vocabs['code']
        offset = len(tgt_vocab)
        for b in range(batch['seq2seq'].size(0)):
          src_vocab = batch['seq2seq_vocab'][b]
          for i in range(1, len(src_vocab)):
            sw = src_vocab.itos[i]
            ti = tgt_vocab.stoi[sw] if sw in tgt_vocab.stoi else self.tgt_unk_idx
            if ti != self.tgt_unk_idx:
              scores[b, :, ti] += scores[b, :, offset + i]
              scores[b, :, offset + i].fill_(1e-20)
        return scores
code_tokens: def collapseCopyScores ( self , scores , batch ) : tgt_vocab = self . vocabs [ 'code' ] offset = len ( tgt_vocab ) for b in range ( batch [ 'seq2seq' ] . size ( 0 ) ) : src_vocab = batch [ 'seq2seq_vocab' ] [ b ] for i in range ( 1 , len ( src_vocab ) ) : sw = src_vocab . itos [ i ] ti = tgt_vocab . stoi [ sw ] if sw in tgt_vocab . stoi else self . tgt_unk_idx if ti != self . tgt_unk_idx : scores [ b , : , ti ] += scores [ b , : , offset + i ] scores [ b , : , offset + i ] . fill_ ( 1e-20 ) return scores
short_docstring: Given scores from an expanded dictionary
  corresponding to a batch, sums together copies,
  with a dictionary word when it is ambigious.
short_docstring_tokens: Given scores from an expanded dictionary corresponding to a batch sums together copies with a dictionary word when it is ambigious .
comment: """
        Given scores from an expanded dictionary
        corresponding to a batch, sums together copies,
        with a dictionary word when it is ambigious.
        """