0.3.0 • Published 9 years ago
vbb-tokenize-station v0.3.0
vbb-tokenize-station
Station names in VBB are terribly inconsistent and user's search queries are not perfect either. This module tries to compensate all the weird edge cases:
S Südkreuz Bhf (Berlin)->sbahn suedkreuz bahnhof berlinS Beusselstr->sbahn beussel strasseS+U Warschauer Str.->sbahn ubahn warschauer strasseCharité - Campus Benjamin Franklin (Berlin)->charite campus benjamin franklin berlin
Installing
npm install vbb-tokenize-stationUsage
const tokenize = require('vbb-tokenize-station')
tokenize('S+U Warschauer Str.')
.join(' ') // -> 'sbahn ubahn warschauer strasse'Called with no arguments or an invalid argument, tokenize will return [].
Contributing
If you have a question, found a bug or want to propose a feature, have a look at the issues page.