code: def get_onsets(token_tuples):
      
      onset = 1
      for (token_id, token) in token_tuples:
          yield (token_id, onset, len(token))
          onset += (len(token) + 1)
docs: Parameters
      ----------
      token_tuples : list of (str, unicode)
          a list/generator of (token ID, token string) tuples
  
      Returns
      -------
      onset_tuples : generator of (str, int, int)
          A list/generator of (token ID, onset, token length) tuples.
          Note that PAULA starts counting string onsets with 1!