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

category scoring #106

Merged
merged 3 commits into from
Apr 30, 2015
Merged

category scoring #106

merged 3 commits into from
Apr 30, 2015

Conversation

hkrishna
Copy link
Contributor

Weights are all hardcoded to 10 currently - requires to be tweaked

'transport': 10,
'transport:air': 10,
'transport:air:aerodrome': 10,
'transport:air:airport': 10,
'recreation': 10,
'religion': 10,
'education': 10,
'entertainment': 10,
'nightlife': 10,
'food': 10,
'government': 10,
'professional': 10,
'finance': 10,
'health': 10,
'retail': 10,
'transport:public': 10,
'transport:bus': 10,
'transport:taxi': 10,
'transport:sea': 10,
'accomodation': 10,
'transport:station': 10,
'food:bagel': 10,
'food:barbecue': 10
...

uses https://github.com/pelias/scripts/pull/6
fixes #105

helper/category_weights.js
	-This should now make a record like "Newark Airport" appear
	above, say, "Newark Airport Station".
sevko added a commit that referenced this pull request Apr 30, 2015
@sevko sevko merged commit f72ed2a into master Apr 30, 2015
@sevko sevko removed the in progress label Apr 30, 2015
@sevko sevko deleted the category-scoring branch April 30, 2015 13:48
@sevko
Copy link
Contributor

sevko commented Apr 30, 2015

@hkrishna , @dianashk , @missinglink , did this merit more discussion before getting merged? I can revert so that we get a chance to collectively look it over.

@missinglink
Copy link
Member

[question] @sevko @hkrishna will this add a 3kb payload to each db query containing ./helper/category_weights.js? That sounds not ideal...

@sevko
Copy link
Contributor

sevko commented May 6, 2015

Currently, yes, and no, it isn't. Could either move those into the Groovy scripts, but that stops us from injecting and thus easily configuring them. Since they're virtually all currently set to 10, which serves as a default value, we can just remove anything that doesn't have a non-default weight (ie, in the Groovy script, assume a weight of 1 unless a custom weight for the given category was present in the injected weights object).

sevko added a commit that referenced this pull request May 6, 2015
helper/category_weights.js
	-Address @missinglink's comment:
	#106 (comment)
	-Remove category weights with default values, since they're
	unnecessary.
@missinglink
Copy link
Member

OK that sounds better, thanks.

@sevko sevko changed the title category scoring [WIP] category scoring May 11, 2015
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

Successfully merging this pull request may close these issues.

Use categories as a scoring function
3 participants