in tasks/hierar-or-linear/generate_data.py [0:0]
def put_train_fpa(root, train_depth):
with open(f'{root}/train.src', 'w') as train_src, open(f'{root}/train.dst', 'w') as train_tgt:
for central_symbol, wrapper in itertools.product(['a', 'b'], ['a', 'b']):
train_input = [wrapper] * train_depth + [central_symbol] + [wrapper] * train_depth
train_input = ' '.join(train_input)
print(train_input, file=train_src)
train_output = central_symbol
print(train_output, file=train_tgt)