コード例 #1
0
	def testLoadTextFile(self):
		rep = TextRepresentation(TestTextRepresentation.textFile,
			                     TEMPDIRUNITTEST, LOGDIR)

		rep.convertToText()
		rep.loadTextFile()

		self.assertEqual(6, len(rep.sentencesList))
コード例 #2
0
    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)
コード例 #3
0
    def testLoadTextFile(self):
        rep = TextRepresentation(TestTextRepresentation.textFile,
                                 TEMPDIRUNITTEST, LOGDIR)

        rep.convertToText()
        rep.loadTextFile()

        self.assertEqual(6, len(rep.sentencesList))
コード例 #4
0
	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)		
コード例 #5
0
ファイル: TextDocument.py プロジェクト: idiap/asrt
 def convertToText(sourcePath, destinationPath, logDir):
     """Extract the textual information from a
        pdf.
     """
     tr = TextRepresentation(sourcePath,destinationPath,logDir)
     return tr.convertToText()
コード例 #6
0
ファイル: TextDocument.py プロジェクト: ondrejklejch/asrt
 def convertToText(sourcePath, destinationPath, logDir):
     """Extract the textual information from a
        pdf.
     """
     tr = TextRepresentation(sourcePath, destinationPath, logDir)
     return tr.convertToText()