Ejemplo n.º 1
0
    def loadFiles(self):
        testResultPath = self.ui.testResultPath.text()
        correctSetPath = self.ui.correctSetPath.text()
        wrongSetPath = self.ui.wrongSetPath.text()

        #Start only if all 3 are specified
        if testResultPath and correctSetPath and wrongSetPath:
            #load results set
            entries = loadData(testResultPath)
            self.packedSentences = splitSentences(entries)

            #load correct set
            correctEntries = loadData(correctSetPath)
            self.packedCorrectSentences = splitSentences(correctEntries)

            #load wrong set
            wrongEntries = loadData(wrongSetPath)
            self.packedWrongSentences = splitSentences(wrongEntries)

            self.overrideFromPackedSentences(self.packedSentences, self.packedCorrectSentences)
            self.updateSentences()
            self.smartUpdateSentence()

            return
Ejemplo n.º 2
0
 def __init__(self, fileName):
     self.entries = loadData(fileName)