Skip to content

TokenizeText func doesn't return all sentences #7

@koushki

Description

@koushki

I expect text.parsedSentences should contain all sentences. let me explain the problem with code :)

place it in parse/tokenizer_test.go file

func TestTokenizeText(t *testing.T) {
	rule := NewRule()

	text := TokenizeText("Hi!!!", rule)
	assert.Equal(t, "Hi!", text.parsedSentences[0].original)
	assert.Equal(t, "!", text.parsedSentences[1].original)
	assert.Equal(t, "!", text.parsedSentences[2].original)
}

I expect this test should be passed, but apparently, it is not!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions