1. 先运行 get_datasets.sh
就会在utils文件夹下的datasets中产生stanfordSentimentTreebank数据
数据介绍:
stanford sentiment treebank 数据集_ltochange的博客-CSDN博客
2.
#https://blog.csdn.net/qq_44695832/article/details/103256176
#https://blog.csdn.net/lrs1353281004/article/details/89449978
def naiveSoftmaxLossAndGradient(centerWordVec,outsideWordIdx,outsideVectors,dataset):
""" Naive Softmax loss & gradient function for word2vec models
Implement the naive softmax loss and gradients between a center word's
embedding and