Skip to content

derhuerst/tokenize-db-station-name

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tokenize-db-station-name

Make Deutsche Bahn station names search-safe.

The station names from DB are inconsistent and user's search queries are not perfect either. This module tries to compensate edge cases:

  • Reuth (b Plauen/Vogtl) -> reuth bei plauen vogtland
  • Königstein (Sächs Schweiz) -> koenigstein saechische schweiz
  • Zwickau (Sachs) Hbf -> zwickau sachsen hauptbahnhof

npm version build status ISC-licensed support me via GitHub Sponsors chat with me on Twitter

Installing

npm install tokenize-db-station-name

Usage

const tokenize = require('tokenize-db-station-name')

tokenize('Königstein (Sächs Schweiz)')
.join(' ') // -> 'koenigstein saechsische schweiz'

Related

  • db-clean-station-name – Remove noise and fix common typographic errors in Deutsche Bahn (German railways) station names.

Contributing

If you have a question, found a bug or want to propose a feature, have a look at the issues page.