-
-
Save funktor/7798388f6dfdba23e0bede6389311f83 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from collections import Counter | |
info = tagger.info() | |
def print_transitions(trans_features): | |
for (label_from, label_to), weight in trans_features: | |
print("%-6s -> %-7s %0.6f" % (label_from, label_to, weight)) | |
print("Top likely transitions:") | |
print_transitions(Counter(info.transitions).most_common(15)) | |
print("\nTop unlikely transitions:") | |
print_transitions(Counter(info.transitions).most_common()[-15:]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment