def encodeFiles(array):
    IDfile = readIDfile()
    dictionary = readDictionaryFile()
    for thisfile in array:
        try:
            input = pickle.load(open(thisfile))
        except __HOLE__:
            logging.warn("unable to unpicked " + thisfile + "... dangerously just " + \
                "skipping, some texts may be lost")
            continue
        except:
            logging.warn("Some problem: fix if " + thisfile + " should be unpicklable")
            continue
        for level in input.levels:
            input.encode(level,IDfile,dictionary)
dataset/ETHPy150Open Bookworm-project/BookwormDB/bookwormDB/encoder.py/encodeFiles