예제 #1
0
        static void Main1(string[] args)
        {
            Hzyword2Vector hzyword2Vector = new Hzyword2Vector();

            hzyword2Vector.InitUnigramTable();
            hzyword2Vector.InitNet();


            hzyword2Vector.TrainModelThread(15, @"d:\temp\word2vectortrain.txt");
        }
예제 #2
0
        static void Main(string[] args)
        {
            string         trainfilename  = @"D:\temp\zh_wiki_segment.txt";
            string         outputfilename = @"D:\temp\zh_wiki_embedding.txt";
            Hzyword2Vector hzyword2Vector = new Hzyword2Vector();

            hzyword2Vector.LearnVocabFromTrainFile(trainfilename);
            hzyword2Vector.InitUnigramTable();
            hzyword2Vector.InitNet();
            hzyword2Vector.TrainModelThread(15, trainfilename);
            hzyword2Vector.saveEmbedding(outputfilename);
        }