tokenize-insa-station-name
v1.1.0
Published
Get search tokens from an INSA/NASA station name.
Downloads
5
Maintainers
Readme
tokenize-insa-station-name
Get search tokens from an INSA/NASA station name.
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.