CreateKeyTerms() публичный Метод

public CreateKeyTerms ( ) : KeyTerm[]
Результат KeyTerm[]
Пример #1
0
        public void Should_create_feature_term_for_dutch_language()
        {
            // Given
            const string functionaliteit = "Functionaliteit";
            var nl = new LanguageTokenizer {Tokens = functionaliteit};

            // When
            var keyTerms = nl.CreateKeyTerms();

            // Then
            Assert.That(keyTerms, Has.Length(1));
            Assert.That(keyTerms[0].Text, Is.EqualTo(functionaliteit));
        }
Пример #2
0
        public void Should_create_given_terms_for_dutch_language()
        {
            // Given
            const string given = "*|Gegeven|Stel";
            var nl = new LanguageTokenizer { Tokens = given };

            // When
            var keyTerms = nl.CreateKeyTerms();

            // Then
            Assert.That(keyTerms, Has.Length(3));
            Assert.That(keyTerms[0].Text, Is.EqualTo("*"));
            Assert.That(keyTerms[1].Text, Is.EqualTo("Gegeven"));
            Assert.That(keyTerms[2].Text, Is.EqualTo("Stel"));
        }
Пример #3
0
        public void Should_remove_duplicates_from_terms_for_dutch_language()
        {
            // Given
            const string steps = "*|Gegeven|Stel|*|Als|*|Dan|*|En|*|Maar";
            var nl = new LanguageTokenizer { Tokens = steps };

            // When
            var keyTerms = nl.CreateKeyTerms();

            // Then
            Assert.That(keyTerms, Has.Length(7));
            Assert.That(keyTerms[0].Text, Is.EqualTo("*"));
            Assert.That(keyTerms[1].Text, Is.EqualTo("Gegeven"));
            Assert.That(keyTerms[2].Text, Is.EqualTo("Stel"));
            Assert.That(keyTerms[3].Text, Is.EqualTo("Als"));
            Assert.That(keyTerms[4].Text, Is.EqualTo("Dan"));
            Assert.That(keyTerms[5].Text, Is.EqualTo("En"));
            Assert.That(keyTerms[6].Text, Is.EqualTo("Maar"));
        }