Words splitting logic (raw variant)