Python implementation of semantic projection from Grand et al. (2022)
Download pre-trained GloVe vectors here: https://nlp.stanford.edu/projects/glove/
Notebook includes functions to calculate:
- Feature vector from two opposing word sets (such as {small, little, tiny} and {large, big, huge})
- Word projections onto feature vector
- Scalar "projection score" of words on feature vector
- Ranking of words on feature vector
There's also an example using the "animals" category from the paper of running a regression of the semantic projection scores on a set of human ratings (ratings generated by me):