Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save saimadhu-polamuri/56947a95244b568e68d6fcbb75c78668 to your computer and use it in GitHub Desktop.
Save saimadhu-polamuri/56947a95244b568e68d6fcbb75c78668 to your computer and use it in GitHub Desktop.
# Create the train and test data for the spacy model
train_lables = [{'cats': {'ham': label == 'ham',
'spam': label == 'spam'}} for label in y_train]
test_lables = [{'cats': {'ham': label == 'ham',
'spam': label == 'spam'}} for label in y_test]
# Spacy model data
train_data = list(zip(x_train, train_lables))
test_data = list(zip(x_test, test_lables))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment