title: Get the index of subwords produced by BertTokenizer (in transformers library)
body: <p><code>BertTokenizer</code> can tokenize a sentence to a list of tokens, where some long words e.g. &quot;embeddings&quot; is splitted to several subwords i.e. 'em', '##bed', '##ding', and '##s'.</p>
  <p><strong>Is there a way to locate the subwords?</strong> For example,</p>
  <pre><code>t = BertTokenizer.from_pretrained('bert-base-uncased')
  
  tokens = t('word embeddings', add_special_tokens=False)
  location = locate_subwords(tokens)
  </code></pre>
  <p>I want the <code>location</code> be like <code>[0, 1, 1, 1, 1]</code> corresponding to <code>['word', 'em', '##bed', '##ding', '##s']</code>, where 0 means normal word, 1 means subword.</p>