def parse_version_string(s):
    try:
        suffix = ''
        if ';' in s:
            fields = s.split(';')
            s = fields[0]
            fields.pop(0)
            suffix = ';'.join(fields)
        substrings = s.split('.')
        minor = substrings[-1]
        if ' ' in substrings[-2]:
            major = int(substrings[-2].split(' ')[-1])
        else:
            major = int(substrings[-2])
        return major, minor, suffix
    except:
        print ("ER: failed to detect major and minor version numbers" +\
               " in '{}' utf8 encoding: {}".format(s, [s.encode('utf8')]))

#=====================================
# Main sequence of checkers & fixers
Reads a CSV file with headers 'labels' and 'text' (containing label string and text respectively)
dataset/ETHPy150Open googlefonts/fontbakery/fontbakery-update-families.py/parse_version_string--crossover with--dataset/ETHPy150Open flipkart-incubator/optimus/cnn_text_trainer/rw/datasets.py/build_data