I am working on a video lecture series that will step through it and "spell it out". Without it even this code can be a bit opaque for someone who is new to the field and e.g. uncomfortable with n-dimensional array manipulations or the surrounding language modeling concepts.