1.1.0 • Published 4 years ago

tokenize-insa-station-name v1.1.0

Weekly downloads
1
License
ISC
Repository
github
Last release
4 years ago

tokenize-insa-station-name

Get search tokens from an INSA/NASA station name.

npm version build status ISC-licensed minimum Node.js version chat with me on Gitter support me on Patreon

It

  • lower-cases
  • normalizes umlauts & non-ASCII chars (Foo ä–$ -> foo ae)
  • expands str & str. suffixes (Landstr. -> land strasse)
  • removes (Saale)/(Elbe)/etc (Schönebeck (Elbe), Bahnhof -> bahnhof schoenebeck)
  • removes (b. …) (Bornstedt (b. Lu. Eisleben), Neuglück -> neuglueck bornstedt)
  • moves municipalities to the end (Osterburg (Altmark), Raiffeisen -> raiffeisen osterburg)

Installation

npm install tokenize-insa-station-name

Usage

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

tokenize('Bornstedt (b. Lu. Eisleben), Neuglück')
.join(' ') // -> 'neuglueck bornstedt'

Contributing

If you have a question or need support using tokenize-insa-station-name, please double-check your code and setup first. If you think you have found a bug or want to propose a feature, use the issues page.