Beispiel #1
0
 def test_sentence2_blacksabath(self):
     text = Path('blacksabath').read_text(encoding='UTF-8')
     fs = myparser.extract_first_sentence(text)
     exp = "Black Sabbath were an English rock band, formed in Birmingham in 1968, by guitarist and main " \
           "songwriter Tony Iommi, bassist and main lyricist Geezer Butler, drummer Bill Ward and singer " \
           "Ozzy Osbourne."
     self.assertEqual(exp, fs)
Beispiel #2
0
 def test_sentence2_opendocument(self):
     text = Path('opendocument').read_text(encoding='UTF-8')
     fs = myparser.extract_first_sentence(text)
     exp = "The Open Document Format for Office Applications , also known as OpenDocument, is a " \
           "ZIP-compressed XML-based " \
           "file format for spreadsheets, charts, presentations and word processing documents."
     self.assertEqual(exp, fs)
Beispiel #3
0
 def test_sentence2_autism(self):
     text = Path('autism').read_text(encoding='UTF-8')
     fs = myparser.extract_first_sentence(text)
     self.assertEqual(
         'Autism,"         Autism is a developmental disorder characterized by troubles with social '
         'interaction and communication and by restricted and repetitive behavior.',
         fs)
Beispiel #4
0
 def test_sentence2_blacksabath(self):
     text = Path('blacksabath').read_text(encoding='UTF-8')
     fs = myparser.extract_first_sentence(text)
     exp = "Black Sabbath were an English rock band, formed in Birmingham in 1968, by guitarist and main " \
           "songwriter Tony Iommi, bassist and main lyricist Geezer Butler, drummer Bill Ward and singer " \
           "Ozzy Osbourne."
     self.assertEqual(exp, fs)
Beispiel #5
0
 def test_sentence2_opendocument(self):
     text = Path('opendocument').read_text(encoding='UTF-8')
     fs = myparser.extract_first_sentence(text)
     exp = "The Open Document Format for Office Applications , also known as OpenDocument, is a " \
           "ZIP-compressed XML-based " \
           "file format for spreadsheets, charts, presentations and word processing documents."
     self.assertEqual(exp, fs)
Beispiel #6
0
 def test_sentence2_ankara(self):
     text = Path('Ankara').read_text(encoding='UTF-8')
     fs = myparser.extract_first_sentence(text)
     exp = "Ankara , historically known as Ancyra and Angora, is the capital of the Republic of Turkey."
     self.assertEqual(exp, fs)
Beispiel #7
0
 def test_sentence2_ankara(self):
     text = Path('Ankara').read_text(encoding='UTF-8')
     fs = myparser.extract_first_sentence(text)
     exp = "Ankara , historically known as Ancyra and Angora, is the capital of the Republic of Turkey."
     self.assertEqual(exp, fs)
Beispiel #8
0
 def test_sentence2_autism(self):
     text = Path('autism').read_text(encoding='UTF-8')
     fs = myparser.extract_first_sentence(text)
     self.assertEqual('Autism,"         Autism is a developmental disorder characterized by troubles with social '
                      'interaction and communication and by restricted and repetitive behavior.', fs)