FillMaskPipeline return word-piece 
# 🚀 . Feature request
Not sure exactly if this is a bug/feature request/ or just me not understanding correctly :).
I am trying to use the [FillMaskPipeline](https://github.com/huggingface/transformers/blob/master/src/transformers/pipelines.py#L739) but as far as I understand the pipeline returns a single word-piece for a \<mask\>. But the mask could be of a word or even a text-spans (for the case of BART).

Sample code:
```python
from transformers import pipeline
nlp =pipeline("fill-mask",model='bart-large')
nlp(f'Their expression was divine; and as they glanced at me timidly but with parted'
    f' lips in great <mask>, I forgot all thoughts of their conversion in feelings '
    f'that were far more earthly.')
#missing word is bewilderment, this is from librispeech

..
{'sequence': '<s> Their expression was divine; and as they glanced at me timidly but with parted lips in great bewild, I forgot all thoughts of their conversion in feelings that were far more earthly.</s>',
  'score': 7.772801473038271e-05,
  'token': 33304},

print(tokenizer.decode(33304))
' bewild'
```
As can be seen above, one of the outputs is "bewild" which is the first word-piece in  bewilderment:
```python
[tokenizer.decode(i)+' ' for i in tokenizer.batch_encode_plus(['bewilderment'])['input_ids'][0]]
['<s> ', ' bewild ', 'er ', 'ment ', '</s> ']
```

## Your contribution

I assume we could go to the next output as see if it is a word-piece and if it is add it to the first token. not sure exactly if this is correct, specially when it seems that the size of the output is exactly as the number of input word-pieces.

Thanks

I do not think generally there's a way of knowing that a given token is usually a sub-token vs. a complete "word"

Maybe a heuristic could be to do some kind of greedy decoding, iteratively adding a second `<mask>` after the first filled one and checking if the output score is above a certain threshold/above the previous one.<|||||>@julien-c @orena1 So knowing for one sub-token whether it is complete or not is on at the "token" level. What about a span text?

The closest I have found it https://github.com/huggingface/transformers/issues/3972<|||||>Hi @Diego999, I actually did not find a way to test/train span text on BART, although the paper mention that they train the model using span-text.<|||||>This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
