def testLoadTextFile(self):
		rep = TextRepresentation(TestTextRepresentation.textFile,
			                     TEMPDIRUNITTEST, LOGDIR)

		rep.convertToText()
		rep.loadTextFile()

		self.assertEqual(6, len(rep.sentencesList))
    def testConvertToText(self):
        rep = TextRepresentation(TestTextRepresentation.pdfFile,
                                 TEMPDIRUNITTEST, LOGDIR)

        rep.convertToText()
        MyFile.checkFileExists(TestTextRepresentation.tmpPdfFile)

        rep = TextRepresentation(TestTextRepresentation.textFile,
                                 TEMPDIRUNITTEST, LOGDIR)

        rep.convertToText()
        MyFile.checkFileExists(TestTextRepresentation.tmpTextFile)
    def testLoadTextFile(self):
        rep = TextRepresentation(TestTextRepresentation.textFile,
                                 TEMPDIRUNITTEST, LOGDIR)

        rep.convertToText()
        rep.loadTextFile()

        self.assertEqual(6, len(rep.sentencesList))
	def testConvertToText(self):
		rep = TextRepresentation(TestTextRepresentation.pdfFile,
			                     TEMPDIRUNITTEST, LOGDIR)

		rep.convertToText()
		MyFile.checkFileExists(TestTextRepresentation.tmpPdfFile)

		rep = TextRepresentation(TestTextRepresentation.textFile,
			                     TEMPDIRUNITTEST, LOGDIR)

		rep.convertToText()
		MyFile.checkFileExists(TestTextRepresentation.tmpTextFile)		
Esempio n. 5
0
 def convertToText(sourcePath, destinationPath, logDir):
     """Extract the textual information from a
        pdf.
     """
     tr = TextRepresentation(sourcePath,destinationPath,logDir)
     return tr.convertToText()
Esempio n. 6
0
 def convertToText(sourcePath, destinationPath, logDir):
     """Extract the textual information from a
        pdf.
     """
     tr = TextRepresentation(sourcePath, destinationPath, logDir)
     return tr.convertToText()