* Update prag_sbd challenge set

This commit is contained in:
Matthew Honnibal 2015-06-07 21:13:55 +02:00
parent 993128032f
commit 7a9e9ab9b2
1 changed files with 88 additions and 60 deletions

View File

@ -130,90 +130,118 @@ def test_gr23():
sents = get_sent_strings("The site is: https://www.example.50.com/new-site/awesome_content.html. Please check it out.") sents = get_sent_strings("The site is: https://www.example.50.com/new-site/awesome_content.html. Please check it out.")
assert sents == ["The site is: https://www.example.50.com/new-site/awesome_content.html.", "Please check it out."] assert sents == ["The site is: https://www.example.50.com/new-site/awesome_content.html.", "Please check it out."]
""" def test_gr24():
"She turned to him, 'This is great.' she said." sents = get_sent_strings("She turned to him, 'This is great.' she said.")
["She turned to him, 'This is great.' she said."] assert sents == ["She turned to him, 'This is great.' she said."]
'She turned to him, "This is great." she said.' def test_gr25():
['She turned to him, "This is great." she said.'] sents = get_sent_strings('She turned to him, "This is great." she said.')
assert sents == ['She turned to him, "This is great." she said.']
'She turned to him, "This is great." She held the book out to show him.' def test_gr26():
['She turned to him, "This is great."', "She held the book out to show him."] sents = get_sent_strings('She turned to him, "This is great." She held the book out to show him.')
assert sents == ['She turned to him, "This is great."', "She held the book out to show him."]
"Hello!! Long time no see." def test_gr27():
["Hello!!", "Long time no see."] sents = get_sent_strings("Hello!! Long time no see.")
assert sents == ["Hello!!", "Long time no see."]
"Hello?? Who is there?" def test_gr28():
["Hello??", "Who is there?"] sents = get_sent_strings("Hello?? Who is there?")
assert sents == ["Hello??", "Who is there?"]
"Hello!? Is that you?" def test_gr29():
["Hello!?", "Is that you?"] sents = get_sent_strings("Hello!? Is that you?")
assert sents == ["Hello!?", "Is that you?"]
"Hello?! Is that you?" def test_gr30():
["Hello?!", "Is that you?"] sents = get_sent_strings("Hello?! Is that you?")
assert sents == ["Hello?!", "Is that you?"]
"1.) The first item 2.) The second item" def test_gr31():
["1.) The first item", "2.) The second item"] sents = get_sent_strings("1.) The first item 2.) The second item")
assert sents == ["1.) The first item", "2.) The second item"]
"1.) The first item. 2.) The second item." def test_gr32():
["1.) The first item.", "2.) The second item."] sents = get_sent_strings("1.) The first item. 2.) The second item.")
assert sents == ["1.) The first item.", "2.) The second item."]
"1) The first item 2) The second item" def test_gr33():
["1) The first item", "2) The second item"] sents = get_sent_strings("1) The first item 2) The second item")
assert sents == ["1) The first item", "2) The second item"]
"1) The first item. 2) The second item." def test_gr34():
["1) The first item.", "2) The second item."] sents = get_sent_strings("1) The first item. 2) The second item.")
assert sents == ["1) The first item.", "2) The second item."]
"1. The first item 2. The second item" def test_gr35():
["1. The first item", "2. The second item"] sents = get_sent_strings("1. The first item 2. The second item")
assert sents == ["1. The first item", "2. The second item"]
"1. The first item. 2. The second item." def test_gr36():
["1. The first item.", "2. The second item."] sents = get_sent_strings("1. The first item. 2. The second item.")
assert sents == ["1. The first item.", "2. The second item."]
"• 9. The first item • 10. The second item" def test_gr37():
["• 9. The first item", "• 10. The second item"] sents = get_sent_strings("• 9. The first item • 10. The second item")
assert sents == ["• 9. The first item", "• 10. The second item"]
"9. The first item 10. The second item" def test_gr38():
["9. The first item", "10. The second item"] sents = get_sent_strings("9. The first item 10. The second item")
assert sents == ["9. The first item", "10. The second item"]
"a. The first item b. The second item c. The third list item" def test_gr39():
["a. The first item", "b. The second item", "c. The third list item"] sents = get_sent_strings("a. The first item b. The second item c. The third list item")
assert sents == ["a. The first item", "b. The second item", "c. The third list item"]
"This is a sentence\ncut off in the middle because pdf." def test_gr40():
["This is a sentence cut off in the middle because pdf."] sents = get_sent_strings("This is a sentence\ncut off in the middle because pdf.")
assert sents == ["This is a sentence cut off in the middle because pdf."]
"It was a cold \nnight in the city." def test_gr41():
["It was a cold night in the city."] sents = get_sent_strings("It was a cold \nnight in the city.")
assert sents == ["It was a cold night in the city."]
"features\ncontact manager\nevents, activities\n" def test_gr42():
["features", "contact manager", "events, activities"] sents = get_sent_strings("features\ncontact manager\nevents, activities\n")
assert sents == ["features", "contact manager", "events, activities"]
"You can find it at N°. 1026.253.553. That is where the treasure is." def test_gr43():
["You can find it at N°. 1026.253.553.", "That is where the treasure is."] sents = get_sent_strings("You can find it at N°. 1026.253.553. That is where the treasure is.")
assert sents == ["You can find it at N°. 1026.253.553.", "That is where the treasure is."]
"She works at Yahoo! in the accounting department." def test_gr44():
["She works at Yahoo! in the accounting department."] sents = get_sent_strings("She works at Yahoo! in the accounting department.")
assert sents == ["She works at Yahoo! in the accounting department."]
"We make a good team, you and I. Did you see Albert I. Jones yesterday?" def test_gr45():
["We make a good team, you and I.", "Did you see Albert I. Jones yesterday?"] sents = get_sent_strings("We make a good team, you and I. Did you see Albert I. Jones yesterday?")
assert sents == ["We make a good team, you and I.", "Did you see Albert I. Jones yesterday?"]
"Thoreau argues that by simplifying ones life, “the laws of the universe will appear less complex. . . .”" def test_gr46():
end sents = get_sent_strings("Thoreau argues that by simplifying ones life, “the laws of the universe will appear less complex. . . .”")
"Ellipsis with square brackets #047" assert sents == end
['"Bohr [...] used the analogy of parallel stairways [...]" (Smith 55).'
"If words are left off at the end of a sentence, and that is all that is omitted, indicate the omission with ellipsis marks (preceded and followed by a space) and then indicate the end of the sentence with a period . . . . Next sentence." def test_gr47():
["If words are left off at the end of a sentence, and that is all that is omitted, indicate the omission with ellipsis marks (preceded and followed by a space) and then indicate the end of the sentence with a period . . . .", "Next sentence."] sents = get_string("""Bohr [...] used the analogy of parallel stairways [...]" (Smith 55).""")
assert sents == ['"Bohr [...] used the analogy of parallel stairways [...]" (Smith 55).']
"I never meant that.... She left the store." def test_gr48():
["I never meant that....", "She left the store."] sents = get_sent_strings("If words are left off at the end of a sentence, and that is all that is omitted, indicate the omission with ellipsis marks (preceded and followed by a space) and then indicate the end of the sentence with a period . . . . Next sentence.")
assert sents == ["If words are left off at the end of a sentence, and that is all that is omitted, indicate the omission with ellipsis marks (preceded and followed by a space) and then indicate the end of the sentence with a period . . . .", "Next sentence."]
"I wasnt really ... well, what I mean...see . . . what I'm saying, the thing is . . . I didnt mean it." def test_gr49():
["I wasnt really ... well, what I mean...see . . . what I'm saying, the thing is . . . I didnt mean it."] sents = get_sent_strings("I never meant that.... She left the store.")
assert sents == ["I never meant that....", "She left the store."]
"One further habit which was somewhat weakened . . . was that of combining words into self-interpreting compounds. . . . The practice was not abandoned. . . ." def test_gr50():
["One further habit which was somewhat weakened . . . was that of combining words into self-interpreting compounds.", ". . . The practice was not abandoned. . . ."] sents = get_sent_strings("I wasnt really ... well, what I mean...see . . . what I'm saying, the thing is . . . I didnt mean it.")
assert sents == ["I wasnt really ... well, what I mean...see . . . what I'm saying, the thing is . . . I didnt mean it."]
"Hello world.Today is Tuesday.Mr. Smith went to the store and bought 1,000.That is a lot.", def test_gr51():
["Hello world.", "Today is Tuesday.", "Mr. Smith went to the store and bought 1,000.", "That is a lot."] sents = get_sent_strings("One further habit which was somewhat weakened . . . was that of combining words into self-interpreting compounds. . . . The practice was not abandoned. . . .")
""" assert sents == ["One further habit which was somewhat weakened . . . was that of combining words into self-interpreting compounds.", ". . . The practice was not abandoned. . . ."]
def test_gr52():
sents = get_sent_strings("Hello world.Today is Tuesday.Mr. Smith went to the store and bought 1,000.That is a lot.",)
assert sents == ["Hello world.", "Today is Tuesday.", "Mr. Smith went to the store and bought 1,000.", "That is a lot."]