Skip to content

Instantly share code, notes, and snippets.

@hemaher0
Last active January 12, 2024 13:43
Show Gist options
  • Save hemaher0/aca0c9d430bb6e034b3fca6f57a8e833 to your computer and use it in GitHub Desktop.
Save hemaher0/aca0c9d430bb6e034b3fca6f57a8e833 to your computer and use it in GitHub Desktop.
# 문장을 단어를 분리하고 각 단어를 벡터로 변환
sentence = "The cat sat on the mat."
words = sentence.lower().split()
print(words)
word_vectors = torch.tensor([model[w] for w in words if w in model])
print(word_vectors)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment