Simplified this loop.
By using the word splitter configured or an adapter for the loc service, calculating string metrics can be made generic and shareable between different projects.