简体   繁体   English

如何使用斯坦福大学的CoreNlp进行单词嵌入?

[英]How do I get word embedding using CoreNlp from Stanford?

I am using CoreNlp to get the information extraction from a large text. 我正在使用CoreNlp从大文本中提取信息。 However, its using the "triple" approach where a single sentence produce many output which is good, but there are some sentences that doesn't make sense. 但是,它使用“三重”方法,其中单个句子会产生很多输出,这很好,但是有些句子没有意义。 I tried to eliminate this by running another unsupervised NLP and try to utilize function in CoreNlp, yet I stuck at getting word vector form CoreNlp. 我试图通过运行另一个无监督的NLP来消除这种情况,并尝试利用CoreNlp中的功能,但我仍然坚持从CoreNlp获取单词向量。 Can anyone point where do I need to start searching for codes that do the word embedding in CoreNlp? 谁能指出我需要从哪里开始搜索在CoreNlp中嵌入单词的代码? Also I am newbie in java and IT. 我也是Java和IT的新手。

There are some open libraries like glove, word2vec, text2vec, but I noticed glove already been used in CoreNlp (correct me if wrong). 有一些开放的库,例如Gloves,word2vec,text2vec,但我注意到CoreNlp中已经使用了手套(如果出错,请更正)。

since training your own model from scratch might turn out to be a time-consuming task, you could just download pretrained vectors from: https://nlp.stanford.edu/projects/glove/ 由于从头开始训练自己的模型可能是一项耗时的任务,因此您可以从以下网址下载经过预先​​训练的向量: https ://nlp.stanford.edu/projects/glove/

however, there is an example with dl4j here that might do to trick: https://github.com/deeplearning4j/dl4j-examples/blob/master/dl4j-examples/src/main/java/org/deeplearning4j/examples/nlp/glove/GloVeExample.java 但是,这里有一个dl4j的示例可能会欺骗: https//github.com/deeplearning4j/dl4j-examples/blob/master/dl4j-examples/src/main/java/org/deeplearning4j/examples/nlp /glove/GloVeExample.java

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM