(tokens)
| 68 | |
| 69 | # Opposite of encode: restores text string from token ids. |
| 70 | def decode(tokens): |
| 71 | return " ".join([id2token[t] for t in tokens if t != 0]) |
| 72 | |
| 73 | # Do predictions: |
| 74 | def predict(text): |
nothing calls this directly
no outgoing calls
no test coverage detected