"Good Morning Mr NARGES , My name is Alex and I am calling you from Consumer Services. The reason of my call today, as I can see in our records that you are making your monthly credit card payments on time, but you STILL carry a balance of over 7 thousand dollars, right?",
"My name is Alex and I am calling you from Cons umer Services. The reason of my call today, as I can see in our records that you are making your monthly credit card payments on time, but you STILL carry a balance of over 7 thousand dollars, right?",
)
=="My name is Alex and I am calling you from Consumer Services. The reason of my call today, as I can see in our records that you are making your monthly credit card payments on time, but you STILL carry a balance of over 7 thousand dollars, right?"
),"leading_whole_sentence"
# Whole sentences
assert(
fixer(
"Good Morning Mr NARGES , My name is Alex and I am calling you from Consumer Services. The reason of my call today, as I can see in our records that you are making your monthly credit card payments on time, but you STILL carry a balance of over 7 thousand dollars, right?",
"Good Morning Mr NAR GES , My name is Alex and I am calling you from Cons umer Services. The reason of my call today, as I can see in our records that you are making your monthly credit card payments on time, but you STILL carry a balance of over 7 thousand dollars, right?",
)
=="Good Morning Mr NARGES , My name is Alex and I am calling you from Consumer Services. The reason of my call today, as I can see in our records that you are making your monthly credit card payments on time, but you STILL carry a balance of over 7 thousand dollars, right?"
),"whole_sentences"
# With a period in the end
assert(
fixer(
"Good Morning Mr NARGES , My name is Alex and I am calling you from Consumer Services. The reason of my call today, as I can see in our records that you are making your monthly credit card payments on time, but you STILL carry a balance of over 7 thousand dollars, right?",
"Good Morning Mr NAR GES , My name is Alex and I am calling you from Cons umer Services.",
)
=="Good Morning Mr NARGES , My name is Alex and I am calling you from Consumer Services."
),"period_end"
# without a period in the end
assert(
fixer(
"Good Morning Mr NARGES , My name is Alex and I am calling you from Consumer Services. The reason of my call today, as I can see in our records that you are making your monthly credit card payments on time, but you STILL carry a balance of over 7 thousand dollars, right?",
"Good Morning Mr NAR GES , My name is Alex and I am calling you from Cons umer Services",
)
=="Good Morning Mr NARGES , My name is Alex and I am calling you from Consumer Services"
),"without_period_end"
# Extra space in the end
assert(
fixer(
"Good Morning Mr NARGES , My name is Alex and I am calling you from Consumer Services. The reason of my call today, as I can see in our records that you are making your monthly credit card payments on time, but you STILL carry a balance of over 7 thousand dollars, right?",
"Good Morning Mr NAR GES , My name is Alex and I am calling you from Cons umer Services ",
)
=="Good Morning Mr NARGES , My name is Alex and I am calling you from Consumer Services"
),"extra_space"
# Multiple spaces in corruption
assert(
fixer(
"Good Morning Mr NARGES , My name is Alex and I am calling you from Consumer Services. The reason of my call today, as I can see in our records that you are making your monthly credit card payments on time, but you STILL carry a balance of over 7 thousand dollars, right?",
"Good Morning Mr NAR GES , My name is Alex and I am calling you from Cons umer Servi ces ",
)
=="Good Morning Mr NARGES , My name is Alex and I am calling you from Consumer Services"
),"multiple_space"
# Multiple spaces in corruption ending in a whitespace
assert(
fixer(
"Good Morning Mr NARGES , My name is Alex and I am calling you from Consumer Services. The reason of my call today, as I can see in our records that you are making your monthly credit card payments on time, but you STILL carry a balance of over 7 thousand dollars, right?",
"Good Morning Mr NAR GES , My name is Alex and I am calling you from Cons umer Servi ces. ",
)
=="Good Morning Mr NARGES , My name is Alex and I am calling you from Consumer Services. "
),"multiple_space_end_ws"
##### Leading extra Chars #####
# Whole sentences
assert(
fixer(
"Good Morning Mr NARGES , My name is Alex and I am calling you from Consumer Services. The reason of my call today, as I can see in our records that you are making your monthly credit card payments on time, but you STILL carry a balance of over 7 thousand dollars, right?",
"My name is Alex and I am calling you from Cons umer Services. The reason of my call today, as I can see in our records that you are making your monthly credit card payments on time, but you STILL carry a balance of over 7 thousand dollars, right?",
)
=="My name is Alex and I am calling you from Consumer Services. The reason of my call today, as I can see in our records that you are making your monthly credit card payments on time, but you STILL carry a balance of over 7 thousand dollars, right?"
),"leading_whole_sentence"
# With a period in the end
assert(
fixer(
"Good Morning Mr NARGES , My name is Alex and I am calling you from Consumer Services. The reason of my call today, as I can see in our records that you are making your monthly credit card payments on time, but you STILL carry a balance of over 7 thousand dollars, right?",
"My name is Alex and I am calling you from Cons umer Services.",
)
=="My name is Alex and I am calling you from Consumer Services."
),"leading_period_end"
# without a period in the end
assert(
fixer(
"Good Morning Mr NARGES , My name is Alex and I am calling you from Consumer Services. The reason of my call today, as I can see in our records that you are making your monthly credit card payments on time, but you STILL carry a balance of over 7 thousand dollars, right?",
"My name is Alex and I am calling you from Cons umer Services",
)
=="My name is Alex and I am calling you from Consumer Services"
),"leading_without_period_end"
# Extra space in the end
assert(
fixer(
"Good Morning Mr NARGES , My name is Alex and I am calling you from Consumer Services. The reason of my call today, as I can see in our records that you are making your monthly credit card payments on time, but you STILL carry a balance of over 7 thousand dollars, right?",
"My name is Alex and I am calling you from Cons umer Services ",
)
=="My name is Alex and I am calling you from Consumer Services"
),"leading_extra_space"
# Multiple spaces in corruption
assert(
fixer(
"Good Morning Mr NARGES , My name is Alex and I am calling you from Consumer Services. The reason of my call today, as I can see in our records that you are making your monthly credit card payments on time, but you STILL carry a balance of over 7 thousand dollars, right?",
"My name is Alex and I am calling you from Cons umer Servi ces ",
)
=="My name is Alex and I am calling you from Consumer Services"
),"leading_multiple_space"
# Multiple spaces in corruption ending in a whitespace
assert(
fixer(
"Good Morning Mr NARGES , My name is Alex and I am calling you from Consumer Services. The reason of my call today, as I can see in our records that you are making your monthly credit card payments on time, but you STILL carry a balance of over 7 thousand dollars, right?",
"My name is Alex and I am calling you from Cons umer Servi ces. ",
)
=="My name is Alex and I am calling you from Consumer Services. "
),"leading_multiple_space_end_ws"
# Whitespace
assertfixer("","")==""
# Missing reference
assert(
fixer("","My name is Alex and I am calling you from Cons umer Servi ces.")
=="My name is Alex and I am calling you from Cons umer Servi ces."
),"missing_reference"
# Smaller reference
assert(
fixer(
"My name is Alex",
"My name is Alex and I am calling you from Cons umer Servi ces.",
)
=="My name is Alex and I am calling you from Cons umer Servi ces."
),"smaller_reference"
# Unrelated reference
assert(
fixer(
"Hello Hello",
"My name is Alex and I am calling you from Cons umer Servi ces.",
)
=="My name is Alex and I am calling you from Cons umer Servi ces."
),"unrelated_reference"
deftest_create_aggregation_correction_callback():
"""Test the new aggregation correction callback creator."""