https://github.com/derhuerst/tokenize-insa-station-name
Get search tokens from an INSA/NASA station name.
https://github.com/derhuerst/tokenize-insa-station-name
insa public-transport saxony-anhalt search transit
Last synced: 5 months ago
JSON representation
Get search tokens from an INSA/NASA station name.
- Host: GitHub
- URL: https://github.com/derhuerst/tokenize-insa-station-name
- Owner: derhuerst
- License: isc
- Created: 2020-03-06T18:12:40.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-03-06T20:27:12.000Z (over 5 years ago)
- Last Synced: 2025-02-08T00:38:27.198Z (5 months ago)
- Topics: insa, public-transport, saxony-anhalt, search, transit
- Language: JavaScript
- Homepage: https://github.com/derhuerst/tokenize-insa-station-name#tokenize-insa-station-name
- Size: 12.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: license.md
Awesome Lists containing this project
README
# tokenize-insa-station-name
**Get search tokens from an INSA/NASA station name.**
[](https://www.npmjs.com/package/tokenize-insa-station-name)
[](https://travis-ci.org/derhuerst/tokenize-insa-station-name)


[](https://gitter.im/derhuerst)
[](https://patreon.com/derhuerst)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
```shell
npm install tokenize-insa-station-name
```## Usage
```js
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](https://github.com/derhuerst/tokenize-insa-station-name/issues).