Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't disambiguate stations with same name #2

Open
olejorgenb opened this issue Nov 1, 2016 · 3 comments
Open

Can't disambiguate stations with same name #2

olejorgenb opened this issue Nov 1, 2016 · 3 comments

Comments

@olejorgenb
Copy link

$ ruter "Skøyen" "Forskningsparken (oslo)"
--------------------------------
REISEFORSLAG Skøyen -> Forskningsparken (oslo)
------- Forslag #1 -------
Departure:  Tue Nov 01 2016 20:04:00 GMT+0100
Arrival:  Tue Nov 01 2016 20:38:00 GMT+0100

[1]  Skøyen [tog] (20:04) L13 🚆  -> Lillestrøm [tog] (20:24)
[2] 🚶 Walk 00:03:00
[3]  Lillestrøm terminal (20:28) 401 🚌  -> Forskningsparken (20:38)

I'm after "Forskningsparken [T-bane] (Oslo)"

Maybe a ranking of the GetPlaces query result (eg. edit distance, adjusted so that [station type] is only one char) could work. Not sure why Ruter doesn't do that themself though.

Or just provide an option to add a offset in the result list. (an an option to print the list) Ruter's ranking probably doesn't change that often, and if I end up using this tool I'll use the shell history search 90% of the times. So as long as I can get the correct query into history I'm set.

@ErlendEllingsen
Copy link
Owner

ErlendEllingsen commented Nov 1, 2016

I’ll take a look at this issue, however you can do the following:

ruter "Skøyen" "Forskningsparken T”

This will give you

--------------------------------
REISEFORSLAG Skøyen -> Forskningsparken T
------- Forslag #1 -------
Departure:  Tue Nov 01 2016 20:22:00 GMT+0100
Arrival:  Tue Nov 01 2016 20:39:00 GMT+0100

[1]  Skøyen [tog] (20:22) L22 🚆  -> Nationaltheatret [tog] (20:25)
[2] 🚶 Walk 00:02:38
[3]  Nationaltheatret [T-bane] (20:33) 4 🚇  -> Forskningsparken [T-bane] (20:39)

@olejorgenb
Copy link
Author

Thanks, seems like Ruter considers the station type, but not area when ranking the list?

@ErlendEllingsen
Copy link
Owner

Everything is based on name searches I guess. Their search algorithm is quite smart (hence why it recognises "Forskningsparken [T-bane]" from "Forskningsparken T". I am not unsure wether this solution suits your needs @olejorgenb ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants