Fixing spelling mistake
This commit is contained in:
parent
10062c847b
commit
905fbeb814
@ -39,7 +39,7 @@ import (
|
|||||||
// semantics
|
// semantics
|
||||||
//
|
//
|
||||||
type semantics struct {
|
type semantics struct {
|
||||||
Accomodating float64
|
Accommodating float64
|
||||||
Affordable float64
|
Affordable float64
|
||||||
Atmospheric float64
|
Atmospheric float64
|
||||||
Delicious float64
|
Delicious float64
|
||||||
@ -47,7 +47,7 @@ type semantics struct {
|
|||||||
|
|
||||||
func (s semantics) combine(other semantics, weight float64) semantics {
|
func (s semantics) combine(other semantics, weight float64) semantics {
|
||||||
return semantics{
|
return semantics{
|
||||||
s.Accomodating + other.Accomodating*weight,
|
s.Accommodating + other.Accommodating*weight,
|
||||||
s.Affordable + other.Affordable*weight,
|
s.Affordable + other.Affordable*weight,
|
||||||
s.Atmospheric + other.Atmospheric*weight,
|
s.Atmospheric + other.Atmospheric*weight,
|
||||||
s.Delicious + other.Delicious*weight,
|
s.Delicious + other.Delicious*weight,
|
||||||
@ -56,7 +56,7 @@ func (s semantics) combine(other semantics, weight float64) semantics {
|
|||||||
|
|
||||||
func (s semantics) reduce(weight float64) semantics {
|
func (s semantics) reduce(weight float64) semantics {
|
||||||
return semantics{
|
return semantics{
|
||||||
s.Accomodating / weight,
|
s.Accommodating / weight,
|
||||||
s.Affordable / weight,
|
s.Affordable / weight,
|
||||||
s.Atmospheric / weight,
|
s.Atmospheric / weight,
|
||||||
s.Delicious / weight,
|
s.Delicious / weight,
|
||||||
|
@ -20,7 +20,7 @@ domains = ["tabelog.com"]
|
|||||||
|
|
||||||
[item.props]
|
[item.props]
|
||||||
[item.props.service]
|
[item.props.service]
|
||||||
accomodating = 1.0
|
accommodating = 1.0
|
||||||
affordable = 0.0
|
affordable = 0.0
|
||||||
atmospheric = 0.0
|
atmospheric = 0.0
|
||||||
delicious = 0.0
|
delicious = 0.0
|
||||||
@ -29,7 +29,7 @@ domains = ["tabelog.com"]
|
|||||||
path = "dl#js-rating-detail > dd:nth-child(4)"
|
path = "dl#js-rating-detail > dd:nth-child(4)"
|
||||||
|
|
||||||
[item.props.dishes]
|
[item.props.dishes]
|
||||||
accomodating = 0.0
|
accommodating = 0.0
|
||||||
affordable = 0.0
|
affordable = 0.0
|
||||||
atmospheric = 0.0
|
atmospheric = 0.0
|
||||||
delicious = 0.8
|
delicious = 0.8
|
||||||
@ -38,7 +38,7 @@ domains = ["tabelog.com"]
|
|||||||
path = "dl#js-rating-detail > dd:nth-child(2)"
|
path = "dl#js-rating-detail > dd:nth-child(2)"
|
||||||
|
|
||||||
[item.props.drinks]
|
[item.props.drinks]
|
||||||
accomodating = 0.0
|
accommodating = 0.0
|
||||||
affordable = 0.0
|
affordable = 0.0
|
||||||
atmospheric = 0.0
|
atmospheric = 0.0
|
||||||
delicious = 0.2
|
delicious = 0.2
|
||||||
@ -47,7 +47,7 @@ domains = ["tabelog.com"]
|
|||||||
path = "dl#js-rating-detail > dd:nth-child(10)"
|
path = "dl#js-rating-detail > dd:nth-child(10)"
|
||||||
|
|
||||||
[item.props.cost]
|
[item.props.cost]
|
||||||
accomodating = 0.0
|
accommodating = 0.0
|
||||||
affordable = 1.0
|
affordable = 1.0
|
||||||
atmospheric = 0.0
|
atmospheric = 0.0
|
||||||
delicious = 0.0
|
delicious = 0.0
|
||||||
@ -56,7 +56,7 @@ domains = ["tabelog.com"]
|
|||||||
path = "dl#js-rating-detail > dd:nth-child(8)"
|
path = "dl#js-rating-detail > dd:nth-child(8)"
|
||||||
|
|
||||||
[item.props.atmosphere]
|
[item.props.atmosphere]
|
||||||
accomodating = 0.0
|
accommodating = 0.0
|
||||||
affordable = 0.0
|
affordable = 0.0
|
||||||
atmospheric = 1.0
|
atmospheric = 1.0
|
||||||
delicious = 0.0
|
delicious = 0.0
|
||||||
|
@ -21,7 +21,7 @@ domains = ["www.tripadvisor.com"]
|
|||||||
|
|
||||||
[item.props]
|
[item.props]
|
||||||
[item.props.service]
|
[item.props.service]
|
||||||
accomodating = 1.0
|
accommodating = 1.0
|
||||||
affordable = 0.0
|
affordable = 0.0
|
||||||
atmospheric = 0.0
|
atmospheric = 0.0
|
||||||
delicious = 0.0
|
delicious = 0.0
|
||||||
@ -32,7 +32,7 @@ domains = ["www.tripadvisor.com"]
|
|||||||
attr = "alt"
|
attr = "alt"
|
||||||
|
|
||||||
[item.props.food]
|
[item.props.food]
|
||||||
accomodating = 0.0
|
accommodating = 0.0
|
||||||
affordable = 0.0
|
affordable = 0.0
|
||||||
atmospheric = 0.0
|
atmospheric = 0.0
|
||||||
delicious = 1.0
|
delicious = 1.0
|
||||||
@ -43,7 +43,7 @@ domains = ["www.tripadvisor.com"]
|
|||||||
attr = "alt"
|
attr = "alt"
|
||||||
|
|
||||||
[item.props.value]
|
[item.props.value]
|
||||||
accomodating = 0.0
|
accommodating = 0.0
|
||||||
affordable = 1.0
|
affordable = 1.0
|
||||||
atmospheric = 0.0
|
atmospheric = 0.0
|
||||||
delicious = 0.0
|
delicious = 0.0
|
||||||
@ -54,7 +54,7 @@ domains = ["www.tripadvisor.com"]
|
|||||||
attr = "alt"
|
attr = "alt"
|
||||||
|
|
||||||
[item.props.atmosphere]
|
[item.props.atmosphere]
|
||||||
accomodating = 0.0
|
accommodating = 0.0
|
||||||
affordable = 0.0
|
affordable = 0.0
|
||||||
atmospheric = 1.0
|
atmospheric = 1.0
|
||||||
delicious = 0.0
|
delicious = 0.0
|
||||||
|
@ -20,7 +20,7 @@ domains = ["www.yelp.co.jp"]
|
|||||||
|
|
||||||
[item.props]
|
[item.props]
|
||||||
[item.props.overall]
|
[item.props.overall]
|
||||||
accomodating = 1.0
|
accommodating = 1.0
|
||||||
affordable = 1.0
|
affordable = 1.0
|
||||||
atmospheric = 1.0
|
atmospheric = 1.0
|
||||||
delicious = 1.0
|
delicious = 1.0
|
||||||
|
Binary file not shown.
@ -150,7 +150,7 @@ func dumpData(dbPath string, restaraunts map[uint32]*restaurant) error {
|
|||||||
rest.name,
|
rest.name,
|
||||||
rest.address,
|
rest.address,
|
||||||
rest.sem.Delicious,
|
rest.sem.Delicious,
|
||||||
rest.sem.Accomodating,
|
rest.sem.Accommodating,
|
||||||
rest.sem.Affordable,
|
rest.sem.Affordable,
|
||||||
rest.sem.Atmospheric,
|
rest.sem.Atmospheric,
|
||||||
rest.latitude,
|
rest.latitude,
|
||||||
|
Loading…
Reference in New Issue
Block a user