Created
December 29, 2019 01:35
-
-
Save nikkisharma536/c392e1cc9056a463f3cbba78160e6423 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