Skip to content
Snippets Groups Projects
Commit e41f7061 authored by Simon Will's avatar Simon Will
Browse files

Improve distance templates and add some special phrases (“sight” and sports)

parent 9b23b399
No related branches found
No related tags found
No related merge requests found
......@@ -7385,6 +7385,90 @@
|-
| Wine Stores near || shop || wine || near || Y
|-
| Basketball || sport || basketball || - || N
|-
| Basketball in || sport || basketball || - || N
|-
| Basketball near || sport || basketball || - || N
|-
| Baseball || sport || baseball || - || N
|-
| Baseball in || sport || baseball || - || N
|-
| Baseball near || sport || baseball || - || N
|-
| Swimming || sport || swimming || - || N
|-
| Swimming in || sport || swimming || - || N
|-
| Swimming near || sport || swimming || - || N
|-
| Golf || sport || golf || - || N
|-
| Golf in || sport || golf || - || N
|-
| Golf near || sport || golf || - || N
|-
| Beachvolleyball || sport || beachvolleyball || - || N
|-
| Beachvolleyball in || sport || beachvolleyball || - || N
|-
| Beachvolleyball near || sport || beachvolleyball || - || N
|-
| Bouldering || sport || climbing || - || N
|-
| Bouldering in || sport || climbing || - || N
|-
| Bouldering near || sport || climbing || - || N
|-
| Volleyball || sport || volleyball || - || N
|-
| Volleyball in || sport || volleyball || - || N
|-
| Volleyball near || sport || volleyball || - || N
|-
| Boules || sport || boules || - || N
|-
| Boules in || sport || boules || - || N
|-
| Boules near || sport || boules || - || N
|-
| Skiing || sport || skiing || - || N
|-
| Skiing in || sport || skiing || - || N
|-
| Skiing near || sport || skiing || - || N
|-
| American Football || sport || american_football || - || N
|-
| American Football in || sport || american_football || - || N
|-
| American Football near || sport || american_football || - || N
|-
| Football || sport || american_football || - || N
|-
| Football in || sport || american_football || - || N
|-
| Football near || sport || american_football || - || N
|-
| Soccer || sport || soccer || - || N
|-
| Soccer in || sport || soccer || - || N
|-
| Soccer near || sport || soccer || - || N
|-
| Table tennis || sport || table_tennis || - || N
|-
| Table tennis in || sport || table_tennis || - || N
|-
| Table tennis near || sport || table_tennis || - || N
|-
| Tennis || sport || tennis || - || N
|-
| Tennis in || sport || tennis || - || N
|-
| Tennis near || sport || tennis || - || N
|-
| Nursing Home || social_facility || nursing_home || - || N
|-
| Nursing Homes || social_facility || nursing_home || - || Y
......@@ -7445,6 +7529,18 @@
|-
| Attractions near || tourism || attraction || near || Y
|-
| Sight || tourism || attraction || - || N
|-
| Sights || tourism || attraction || - || Y
|-
| Sight in || tourism || attraction || in || N
|-
| Sights in || tourism || attraction || in || Y
|-
| Sight near || tourism || attraction || near || N
|-
| Sights near || tourism || attraction || near || Y
|-
| Tourist Attraction || tourism || attraction || - || N
|-
| Tourist Attractions || tourism || attraction || - || Y
......@@ -7457,6 +7553,18 @@
|-
| Tourist Attractions near || tourism || attraction || near || Y
|-
| Tourist Sight || tourism || attraction || - || N
|-
| Tourist Sights || tourism || attraction || - || Y
|-
| Tourist Sight in || tourism || attraction || in || N
|-
| Tourist Sights in || tourism || attraction || in || Y
|-
| Tourist Sight near || tourism || attraction || near || N
|-
| Tourist Sights near || tourism || attraction || near || Y
|-
| Campground || tourism || camp_site || - || N
|-
| Campgrounds || tourism || camp_site || - || Y
......
......@@ -129,7 +129,7 @@ def choose_poi(pois):
def generate_features(thing_table, areas, pois):
if optional('dist', 0.1):
if optional('dist', 0.2):
return generate_dist_query_features(thing_table, areas, pois)
return generate_poi_query_features(thing_table, areas, pois)
......
{% include 'meta/dist_tell_distance.jinja2' %}
{% set wording = choose([('from', 'to'), ('between', 'and'), ('', 'from')], [0.4, 0.3, 0.3]) %}
{% set old_features = features %}
{% set features = features['sub'][0] %}
{% if optional('location_first') %}
{{ choose(['from', 'between']) }}
{{ wording[0] }}
{% include 'meta/around_query_bare_location.jinja2' %}
{{ choose(['to', 'and']) }}
{{ wording[1] }}
{{ optional('the', 0.8) }}
{% include 'meta/closest_around_query_closest_thing.jinja2' %}
{% else %}
{{ choose(['from', 'between']) }}
{{ wording[0] }}
{{ optional('the', 0.8) }}
{% include 'meta/closest_around_query_closest_thing.jinja2' %}
{{ choose(['to', 'and']) }}
{{ wording[1] }}
{% include 'meta/around_query_bare_location.jinja2' %}
{% endif %}
{% set features = old_features %}
......
{% include 'meta/dist_tell_distance.jinja2' %}
{{ choose(['from', 'between']) }}
{% set wording = choose([('from', 'to'), ('between', 'and'), ('', 'from')], [0.4, 0.3, 0.3]) %}
{{ wording[0] }}
{{ first_thing_plural if first_plural else first_thing_singular }}
{% set old_features = features %}
{% set features = features['sub'][0] %}
{% include 'meta/in_location.jinja2' %}
{% set features = old_features %}
{{ choose(['to', 'and']) }}
{{ wording[1] }}
{{ second_thing_plural if second_plural else second_thing_singular }}
{% set old_features = features %}
......
......@@ -5,8 +5,10 @@
{% include 'meta/dist_tell_distance.jinja2' %}
{{ choose(['from', 'between']) }}
{% set wording = choose([('from', 'to'), ('between', 'and'), ('', 'from')], [0.4, 0.3, 0.3]) %}
{{ wording[0] }}
{{ first_thing_plural if first_plural else first_thing_singular }}
{{ choose(['to', 'and']) }}
{{ wording[1] }}
{{ second_thing_plural if second_plural else second_thing_singular }}
{{ choose(['?', '!', '.', ''], [0.3, 0.15, 0.15, 0.4]) }}
......@@ -17,7 +17,7 @@
how
{{ choose(['far', 'long']) }}
{{ optional('apart', 0.2) }}
{{ choose(['is it', 'is', ''], [0.5, 0.1, 0.4]) }}
{{ choose(['is it', 'is', ''], [0.4, 0.25, 0.35]) }}
{% else %}
tell
{{ choose(['me', 'us', ''], [0.3, 0.3, 0.4]) }}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment