public void Process() { var vectors = new VectorsExtractor(3); vectors.Process(document); Assert.AreEqual(3, vectors.WordVectors.Count); for (var i = 0; i < 3; i++) { var vectorsData = vectors.WordVectors.ToArray()[i]; for (var j = 0; j < vectorsData.Vectors.Count; j++) { var total = 10; if (j == 0 || j == 9) { total = 6; } else if (j == 1 || j == 8) { total = 8; } Assert.AreEqual(total, vectorsData.Vectors[j].Words.Count); } } }
public void Constructor() { var vectors = new VectorsExtractor(10); Assert.AreEqual(10, vectors.WindowSize); Assert.AreEqual(0, vectors.WordVectors.Count); }
public void Save() { var vectors = new VectorsExtractor(3); vectors.Process(document); vectors.Save(info.FullName); var files = info.GetFiles("*.arff"); Assert.AreEqual(3, files.Length); }