I want to use hugging face's fill-mask pipeline to guess a masked token and then extract just the guessed token as a word. This code should do that:
!pip install -q transformers
model = pipeline('fill-mask')
outcome = model("Kubernetes is a container orchestration <mask>")[0]
#Prints: "Kubernetes is a container orchestration platform"
print(outcome['sequence'])
token = outcome['token']
#Prints: 1761
print(token)
#Prints: Ġplatform
print(model.tokenizer.convert_ids_to_tokens(token))
But I am finding that it gives me back "Ġplatform" instead of "platform" - does anyone know why this is or what can be going on here?