コード例 #1
0
            public Saveable(AverageEmbedding c)
            {
                CorpusSize        = c.CorpusSize;
                CorpusAppearances = new Dictionary <string, int>(c.CorpusAppearances);

                W1 = c.W1.ToColumnArrays();
                B1 = c.B1.ToArray();

                W2 = c.W2.ToColumnArrays();
                B2 = c.B2.ToArray();
            }
コード例 #2
0
            public AverageEmbedding ToClassifier()
            {
                var c = new AverageEmbedding();

                c.CorpusSize        = CorpusSize;
                c.CorpusAppearances = CorpusAppearances;

                c.W1 = Matrices.DenseOfColumnArrays(W1);
                c.B1 = Vectors.DenseOfArray(B1);

                c.W2 = Matrices.DenseOfColumnArrays(W2);
                c.B2 = Vectors.DenseOfArray(B2);

                return(c);
            }
コード例 #3
0
 public Classifier()
 {
     Left    = AverageEmbedding.Load("classifier.left.db");
     Right   = AverageEmbedding.Load("classifier.right.db");
     Crawler = new Crawler();
 }