Fix percent unk display in debug data
* Fix percent unk display
This was showing (ratio %), so 10% would show as 0.10%. Fix by
multiplying ration by 100.
Might want to add a warning if this is over a threshold.
* Only show whole-integer percents
@@ -173,8 +173,8 @@ def debug_data(
)
n_missing_vectors = sum(gold_train_data["words_missing_vectors"].values())
msg.warn(
- "{} words in training data without vectors ({:0.2f}%)".format(
- n_missing_vectors, n_missing_vectors / gold_train_data["n_words"]
+ "{} words in training data without vectors ({:.0f}%)".format(
+ n_missing_vectors, 100 * (n_missing_vectors / gold_train_data["n_words"])
),
)
msg.text(
