Exemplo n.º 1
0
    def occStats(self, path, format, list, plotting):
        wordlists = PlaintextCorpusReader(path, format)
        fileids = wordlists.fileids()
        k = len(fileids)

        # computing frequencies
        self.fileStats(path, fileids)

        # save stats
        statsname = "Base GQs (patterns)"
        savpath = plotting + '/' + statsname.replace(' ', '-')

        # generating report
        SaveStats(self.classstats, self.stats, "", savpath, plotting)  # all
Exemplo n.º 2
0
 def occStats(self,path,format,list,plotting):
     wordlists = PlaintextCorpusReader(path,format)
     fileids = wordlists.fileids()
     k = len(fileids)
     
     # computing rel frequencies
     self.fileStats(path,fileids)
     
     # plotting vars
     figname = "GQs by class"
     figpath = plotting +'/'+ figname.replace(' ', '-') + '-stats.pdf'
     savpath = plotting +'/'+ figname.replace(' ', '-')
     
     # plotting
     MyPlot(self.stats,self.classstats,figname, "three",plotting,list) # per class (no regression)
     
     # generating report
     SaveStats(self.classstats,self.stats,figpath,savpath,plotting) # per class
Exemplo n.º 3
0
    def __init__(self, aika, pelaaja):
        ds = (aika % 1) * 100
        minute = aika / 60
        sekunti = str(aika)
        s1 = sekunti.split(".")[0]

        self = QtWidgets.QMessageBox()
        self.setWindowTitle(" ")
        self.setGeometry(650, 550, 0, 0)
        self.setText("Voitit pelin!")
        self.setInformativeText(
            "Aikasi oli: \n{:2.0f} min {:s} s {:2.0f} ms".format(
                minute, s1, ds))
        self.exec()

        SaveStats(aika, pelaaja)  #tallennetaan tulos

        #Palataan main menuun käynnistämällä ohjelma uusiksi
        os.execl(sys.executable, sys.executable, *sys.argv)
Exemplo n.º 4
0
    def occStats(self, path, formatt, llist, plotting):
        wordlists = PlaintextCorpusReader(path, formatt)
        fileids = wordlists.fileids()
        #k = len(fileids)

        # computing rel frequencies
        self.fileStats(path, fileids)

        # plotting vars
        figname = "Base GQs"
        figpath = plotting + '/' + figname.replace(' ', '-') + '-stats.pdf'
        savpath = plotting + '/' + figname.replace(' ', '-')

        # plotting
        MyPlot(self.stats, self.classstats, figname, "one", plotting,
               llist)  # all

        # generating report
        SaveStats(self.classstats, self.stats, figpath, savpath,
                  plotting)  # all