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(); }
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); }
public Classifier() { Left = AverageEmbedding.Load("classifier.left.db"); Right = AverageEmbedding.Load("classifier.right.db"); Crawler = new Crawler(); }