code: def add_offsets(self, offset_ns=None):
          
          if offset_ns is None:
              offset_ns = self.ns
  
          onset = 0
          offset = 0
  
          for token_id, token_str in self.get_tokens():
              offset = onset + len(token_str)
              self.node[token_id]['{0}:{1}'.format(offset_ns, 'onset')] = onset
              self.node[token_id]['{0}:{1}'.format(offset_ns, 'offset')] = offset
              onset = offset + 1
docs: adds the onset and offset to each token in the document graph, i.e.
          the character position where each token starts and ends.