文件名称:
单词转换成向量形式工具Word2Vec.Net.zip
开发工具:
文件大小: 3mb
下载次数: 0
上传时间: 2019-07-19
详细说明: Word2Vec.Net 是单词转换成向量形式工具Word2Vec .NET版本。使用示例代码: var builder = Word2VecBuilder.Create(); if ((i = ArgPos("-train", args)) > -1) builder.WithTrainFile(args[i 1]); if ((i = ArgPos("-output", args)) > -1) builder.WithOutputF ile(args[i 1]); //to all other parameters will be set default values var word2Vec = builder.Build(); word2Vec.TrainModel(); var distance = new Distance(args[i 1]); BestWord[] bestwords = distance.Search("some_word");或者//more explicit option string trainfile="C:/data.txt"; string outputFileName = "C:/output.bin"; var word2Vec = Word2VecBuilder.Create() .WithTrainFile(trainfile)// Use text data to train the model; .WithOutputFile(outputFileName)//Use to save the resulting word vectors / word clusters .WithSize(200)//Set size of word vectors; default is 100 .WithSaveVocubFile()//The vocabulary will be saved to .WithDebug(2)//Set the debug mode (default = 2 = more info during training) .WithBinary(1)//Save the resulting vectors in binary moded; default is 0 (off) .WithCBow(1)//Use the continuous bag of words model; default is 1 (use 0 for skip-gram model) .WithAlpha(0.05)//Set the starting learning rate; default is 0.025 for skip-gram and 0.05 for CBOW .WithWindow(7)//Set max skip length between words; default is 5 .WithSample((float) 1e-3)//Set threshold for occurrence of words. Those that appear with higher frequency in the training data twill be randomly down-sampled; default is 1e-3, useful range is (0, 1e-5) .WithHs(0)//Use Hierarchical Softmax; default is 0 (not used) .WithNegative(5)//Number of negative examples; default is 5, common values are 3 - 10 (0 = not used) .WithThreads(5)//Use threads (default 12) .WithIter(5)//Run more training iterations (default 5) .WithMinCount(5)//This will discard words that appear less than times; default is 5 .WithClasses(0)//Output word classes rather than word vectors; default number of classes is 0 (vectors are written) .Build(); word2Vec.TrainModel(); var distance = new Distance(outputFile); BestWord[] bestwords = distance.Search("some_word"); 标签:Word2Vec
(系统自动生成,下载前可以参看下载内容)
下载文件列表
相关说明
- 本站资源为会员上传分享交流与学习,如有侵犯您的权益,请联系我们删除.
- 本站是交换下载平台,提供交流渠道,下载内容来自于网络,除下载问题外,其它问题请自行百度。
- 本站已设置防盗链,请勿用迅雷、QQ旋风等多线程下载软件下载资源,下载后用WinRAR最新版进行解压.
- 如果您发现内容无法下载,请稍后再次尝试;或者到消费记录里找到下载记录反馈给我们.
- 下载后发现下载的内容跟说明不相乎,请到消费记录里找到下载记录反馈给我们,经确认后退回积分.
- 如下载前有疑问,可以通过点击"提供者"的名字,查看对方的联系方式,联系对方咨询.
相关搜索: