

def indexing(inputf, delim_in):
    intfile = (inputf + '.i')
    indexf = (inputf + '.index')
    delim_out = ' '
    wi = WordIndexer(indexf)
    with open(inputf, 'r') as ins:
        reader = csv.reader(ins, delimiter=delim_in)
        with open(intfile, 'w') as outs:
            writer = csv.writer(outs, delimiter=delim_out)
            for row in reader:
                cols = [wi.add_word(w) for w in row]
                writer.writerow(cols)
    wi.close()
    return (intfile, indexf)

dataset/ETHPy150Open uwescience/raco/c_test_environment/c_index_strings.py indexing/original