Esempio n. 1
0
        public void TestDependencyCorpus4()
        {
            var corpus = new UniversalDependencyTreeBankCorpus("tr_imst-ud-train.conllu");

            Assert.AreEqual(3664, corpus.SentenceCount());
            Assert.AreEqual(37784, WordCount(corpus));
        }
Esempio n. 2
0
        public void TestDependencyCorpus5()
        {
            var corpus = new UniversalDependencyTreeBankCorpus("tr_pud-ud-test.conllu");

            Assert.AreEqual(1000, corpus.SentenceCount());
            Assert.AreEqual(16882, WordCount(corpus));
        }
Esempio n. 3
0
        public void TestDependencyCorpus3()
        {
            var corpus = new UniversalDependencyTreeBankCorpus("tr_imst-ud-test.conllu");

            Assert.AreEqual(983, corpus.SentenceCount());
            Assert.AreEqual(10029, WordCount(corpus));
        }
Esempio n. 4
0
        private int WordCount(UniversalDependencyTreeBankCorpus corpus)
        {
            var wordCount = 0;

            for (var i = 0; i < corpus.SentenceCount(); i++)
            {
                wordCount += corpus.GetSentence(i).WordCount();
            }
            return(wordCount);
        }