How to extract "contiguous tokens" from `NerPipeline` results?
Using `NerPipeline`, I want to be able to input a string (sequence of tokens), and extract *entity groups*, where an entity group is a contiguous series of tokens, having the same *entity type*.

**Example:**

For the ner code below:

```
from transformers import pipeline, AutoModelForTokenClassification, AutoTokenizer

# Allocate a pipeline for sentiment-analysis
model = AutoModelForTokenClassification.from_pretrained("dbmdz/bert-large-cased-finetuned-conll03-english")
tokenizer = AutoTokenizer.from_pretrained("bert-base-cased")
nlp = pipeline('ner', model=model, tokenizer=tokenizer)
nlp('Enzo works at the Australian National University (AUN)')
```

This returns:

```
[{'entity': 'I-PER', 'score': 0.9983270168304443, 'word': 'En'},
 {'entity': 'I-PER', 'score': 0.9952995777130127, 'word': '##zo'},
 {'entity': 'I-ORG', 'score': 0.9984350204467773, 'word': 'Australian'},
 {'entity': 'I-ORG', 'score': 0.9967807531356812, 'word': 'National'},
 {'entity': 'I-ORG', 'score': 0.9959043264389038, 'word': 'University'},
 {'entity': 'I-ORG', 'score': 0.9900023937225342, 'word': 'AU'},
 {'entity': 'I-ORG', 'score': 0.9763911366462708, 'word': '##N'}]
```

When I want it to return something like:

```
[{'entity_group': 'I-PER', 'score': 0.9983270168304443, 'word': 'Enzo'},
 {'entity_group': 'I-ORG', 'score': 0.9984350204467773, 'word': 'Australian National University'},
 {'entity_group': 'I-ORG', 'score': 0.9900023937225342, 'word': 'AUN'}]
```

I should be able to write a function that performs the above transformation if the indices of the word pieces are also indicated in the dictionary output of `NerPipeline`. Is this currently possible? Please advise me on if there's already an easy way to do this. 

If not, I can fork the repo and introduce an `index` key to the dictionary output. I can send a PR for this if the use case is general enough.
What do you think @mfuntowicz?<|||||>[Related issue ](https://github.com/huggingface/transformers/issues/2488)<|||||>Actually, I realized that instead of `index`, even better would be the word piece `offsets`, similar to that returned by `tokenizer.encode` from the huggingface [tokenizers package](https://github.com/huggingface/tokenizers).

Will get to implementing this within the week if this isn't supported yet!<|||||>This recently merged [PR](https://github.com/huggingface/transformers/pull/3957) should solve this issue 🙂 