BERT as a language model
Hi there,
First of all, thanks for open-sourcing BERT as a concise independent codebase that's easy to go through and play around with. :)
I have a question regarding just applying BERT as a language model scoring function. For example, say I have a text file containing one sentence per line. Is there a simple way to just score those sentences with their likelihood under the BERT language model?
Thanks, Anthony
Related : #35
You can mask each word one at a time, but this doesn't give you a meaningful sentence probability.
Thanks! I see. I guess that makes sense in the context of the masked LM.
would this work? https://github.com/xu-song/bert-as-language-model