Created
December 28, 2019 23:23
-
-
Save nikkisharma536/af9eb55971d98d2ee80fdd8554bfe42a 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 math import nan | |
words = list(set(data["word"].values)) | |
n_words = len(words) | |
tags = [] | |
for tag in set(data["tag"].values): | |
if tag is nan or isinstance(tag, float): | |
tags.append('unk') | |
else: | |
tags.append(tag) | |
n_tags = len(tags) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment