improved word boundaries in mapper