Spaces:
Build error
Build error
File size: 1,093 Bytes
99b1da3 4f3c9ea 4372d93 99b1da3 4372d93 99b1da3 4372d93 99b1da3 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
from Summarizer import Summarizer
def test_split_sentences_by_token_length():
summary_sentences = [
'Python is a programming language.',
'Memory allocation.',
'Free.'
]
split_sentences = Summarizer.split_sentences_by_token_length(summary_sentences, split_token_length=3)
assert split_sentences == [
'Python is a programming language.',
'Memory allocation. Free.'
]
split_sentences = Summarizer.split_sentences_by_token_length(summary_sentences, split_token_length=5)
assert split_sentences == [
'Python is a programming language.',
'Memory allocation. Free.'
]
split_sentences = Summarizer.split_sentences_by_token_length(summary_sentences, split_token_length=7)
assert split_sentences == [
'Python is a programming language. Memory allocation.',
'Free.'
]
split_sentences = Summarizer.split_sentences_by_token_length(summary_sentences, split_token_length=10)
assert split_sentences == [
'Python is a programming language. Memory allocation. Free.'
]
|