Exemplo n.º 1
0
        static void Main(string[] args)
        {
            stattya s1 = new stattya(@"E:\Універ\Прога\KNN\It1.txt");
            stattya s2 = new stattya(@"E:\Універ\Прога\KNN\It2.txt");
            stattya s3 = new stattya(@"E:\Універ\Прога\KNN\It3.txt");
            vector v1 = new vector("IT");
            v1.add(s1);
            v1.add(s2);
            v1.add(s3);

            stattya ss1 = new stattya(@"E:\Універ\Прога\KNN\Sport1.txt");
            stattya ss2 = new stattya(@"E:\Універ\Прога\KNN\Sport2.txt");
            stattya ss3 = new stattya(@"E:\Універ\Прога\KNN\Sport3.txt");

            vector v2 = new vector("sport");
            v2.add(ss1);
            v2.add(ss2);
            v2.add(ss3);

            analizator a = new analizator(new vector[] { v1, v2 });
            stattya t1 = new stattya(@"E:\Універ\Прога\KNN\It4.txt");
            stattya t2 = new stattya(@"E:\Універ\Прога\KNN\Sport4.txt");

            Console.WriteLine(a.audit(t1));
            Console.WriteLine(a.audit(t2));
            Console.ReadKey();
        }
Exemplo n.º 2
0
        static void Main(string[] args)
        {
            post p1 = new post(@"posts\1t1.txt");
            post p2 = new post(@"posts\2t1.txt");
            post p3 = new post(@"posts\3t1.txt");
            vector v1 = new vector("наука");
            v1.add(p1);
            v1.add(p2);
            v1.add(p3);

            post p21 = new post(@"posts\1t2.txt");
            post p22 = new post(@"posts\2t2.txt");
            post p23 = new post(@"posts\3t2.txt");

            vector v2 = new vector("sport");
            v2.add(p21);
            v2.add(p22);
            v2.add(p23);

            analizator a = new analizator(new vector[] { v1, v2 });
            post t1 = new post(@"posts\t1.txt");
            post t2 = new post(@"posts\t2.txt");

            Console.WriteLine(a.audit(t1));
            Console.WriteLine(a.audit(t2));
        }