@@ -0,0 +1,536 @@
+#! /usr/bin/env python%0A# -*- coding: utf-8 -*-%0A# vim:fenc=utf-8%0A#%0A# Copyright %C2%A9 2017 Judit Acs %3Cjudit@sch.bme.hu%3E%0A#%0A# Distributed under terms of the MIT license.%0A%0Afrom sys import stdin%0A%0A%0Adef main():%0A    for line in stdin:%0A        word, BE = line.rstrip(%22%5Cn%22).split(%22%5Ct%22)%5B:2%5D%0A        segments = %5B%5D%0A        for i, c in enumerate(word):%0A            if BE%5Bi%5D == %22B%22 and i %3E 0:%0A                segments.append(%22 %22)%0A            segments.append(c)%0A        print(%22%7B%7D%5Ct%7B%7D%22.format(word, %22%22.join(segments)))%0A%0Aif __name__ == '__main__':%0A    main()%0A

convert standoff to segmentation