Exemplo n.º 1
0
def seg1st(datelist,loclist,segpath):
    for tocom in datelist:
        today = tocom
        for location in loclist:
            filenamein=rawpath+r'DATA/step3_findLo/'+str(today)+r'/'+location+r'forC'
            print filenamein
            filenameout=rawpath+r'DATA/step7_wordsegfilter/'+str(today)+r'/'+location
            if not os.path.isdir(rawpath+r'DATA/step7_wordsegfilter/'+str(today)+r'/'):
                os.makedirs(rawpath+r'DATA/step7_wordsegfilter/'+str(today)+r'/')
            print filenameout
            try:
                step2_segword.newseg(filenamein,filenameout,segpath)
            except IOError,e:
                print "Something is wrong: %s" % e
Exemplo n.º 2
0
def seg2st(datelist,segpath):
    for tocom in datelist:
        today = tocom

        filenamein=rawpath+r'DATA/step8_mwordsegfilter/'+str(today)
        print filenamein
        filenameout=rawpath+r'DATA/step8_mR/'+str(today)
        if not os.path.isdir(rawpath+r'DATA/step8_mR'):
            os.makedirs(rawpath+r'/DATA/step8_mR')
        print filenameout
        try:
            step2_segword.newseg(filenamein,filenameout,segpath)
        except IOError,e:
            print "Something is wrong: %s" % e