Backend: Update label rules

Signed-off-by: Michael Mayer <michael@liquidbytes.net>
This commit is contained in:
Michael Mayer 2020-01-13 11:08:50 +01:00
parent e184cad553
commit c6866bb746
6 changed files with 5189 additions and 5198 deletions

View file

@ -15,7 +15,7 @@ endif
all: dep build all: dep build
dep: dep-tensorflow dep-js dep-go dep: dep-tensorflow dep-js dep-go
build: build-js build-go build: generate build-js build-go
install: install-bin install-assets install: install-bin install-assets
test: test-js test-go test: test-js test-go
acceptance-all: start acceptance acceptance-firefox stop acceptance-all: start acceptance acceptance-firefox stop
@ -32,6 +32,9 @@ terminal:
docker-compose exec photoprism bash docker-compose exec photoprism bash
migrate: migrate:
go run cmd/photoprism/photoprism.go migrate go run cmd/photoprism/photoprism.go migrate
generate:
go generate ./pkg/... ./internal/...
go fmt ./pkg/... ./internal/...
install-bin: install-bin:
scripts/build.sh prod ~/.local/bin/$(BINARY_NAME) scripts/build.sh prod ~/.local/bin/$(BINARY_NAME)
install-assets: install-assets:

View file

@ -22,7 +22,7 @@ var rules = LabelRules{
}, },
"accordion": { "accordion": {
Label: "instrument", Label: "instrument",
Threshold: 0.600000, Threshold: 0.700000,
Priority: 0, Priority: 0,
Categories: []string{"music", "entertainment"}, Categories: []string{"music", "entertainment"},
}, },
@ -36,11 +36,11 @@ var rules = LabelRules{
Label: "pumpkin", Label: "pumpkin",
Threshold: 0.400000, Threshold: 0.400000,
Priority: 0, Priority: 0,
Categories: []string{"cooking", "vegetables"}, Categories: []string{"vegetables"},
}, },
"acoustic guitar": { "acoustic guitar": {
Label: "instrument", Label: "instrument",
Threshold: 0.600000, Threshold: 0.700000,
Priority: 0, Priority: 0,
Categories: []string{"music", "entertainment"}, Categories: []string{"music", "entertainment"},
}, },
@ -268,9 +268,9 @@ var rules = LabelRules{
}, },
"artichoke": { "artichoke": {
Label: "vegetables", Label: "vegetables",
Threshold: 0.300000, Threshold: 0.330000,
Priority: 0, Priority: 0,
Categories: []string{"cooking"}, Categories: []string{"dining"},
}, },
"ashcan": { "ashcan": {
Label: "", Label: "",
@ -394,7 +394,7 @@ var rules = LabelRules{
}, },
"banjo": { "banjo": {
Label: "instrument", Label: "instrument",
Threshold: 0.600000, Threshold: 0.700000,
Priority: 0, Priority: 0,
Categories: []string{"music", "entertainment"}, Categories: []string{"music", "entertainment"},
}, },
@ -573,22 +573,22 @@ var rules = LabelRules{
Categories: []string{"animal"}, Categories: []string{"animal"},
}, },
"beer": { "beer": {
Label: "beer", Label: "drinks",
Threshold: 0.400000, Threshold: 0.400000,
Priority: 0, Priority: 0,
Categories: []string{"beverage", "drinks"}, Categories: []string{"beverage"},
}, },
"beer bottle": { "beer bottle": {
Label: "beer", Label: "drinks",
Threshold: 0.400000, Threshold: 0.400000,
Priority: 0, Priority: 0,
Categories: []string{"beverage", "drinks"}, Categories: []string{"beverage"},
}, },
"beer glass": { "beer glass": {
Label: "beer", Label: "drinks",
Threshold: 0.400000, Threshold: 0.400000,
Priority: 0, Priority: 0,
Categories: []string{"beverage", "drinks"}, Categories: []string{"beverage"},
}, },
"beetle": { "beetle": {
Label: "beetle", Label: "beetle",
@ -604,9 +604,9 @@ var rules = LabelRules{
}, },
"bell pepper": { "bell pepper": {
Label: "vegetables", Label: "vegetables",
Threshold: 0.300000, Threshold: 0.330000,
Priority: 0, Priority: 0,
Categories: []string{"cooking"}, Categories: []string{"dining"},
}, },
"belt": { "belt": {
Label: "portrait", Label: "portrait",
@ -934,9 +934,9 @@ var rules = LabelRules{
}, },
"broccoli": { "broccoli": {
Label: "vegetables", Label: "vegetables",
Threshold: 0.300000, Threshold: 0.330000,
Priority: 0, Priority: 0,
Categories: []string{"cooking"}, Categories: []string{"dining"},
}, },
"broom": { "broom": {
Label: "", Label: "",
@ -1006,7 +1006,7 @@ var rules = LabelRules{
}, },
"burrito": { "burrito": {
Label: "fast food", Label: "fast food",
Threshold: 0.300000, Threshold: 0.330000,
Priority: 0, Priority: 0,
Categories: []string{}, Categories: []string{},
}, },
@ -1029,10 +1029,10 @@ var rules = LabelRules{
Categories: []string{"animal", "insect"}, Categories: []string{"animal", "insect"},
}, },
"butternut squash": { "butternut squash": {
Label: "squash", Label: "vegetables",
Threshold: 0.400000, Threshold: 0.400000,
Priority: 0, Priority: 0,
Categories: []string{"cooking", "vegetables"}, Categories: []string{"dining"},
}, },
"cab": { "cab": {
Label: "", Label: "",
@ -1104,7 +1104,7 @@ var rules = LabelRules{
Label: "pasta", Label: "pasta",
Threshold: 0.200000, Threshold: 0.200000,
Priority: 0, Priority: 0,
Categories: []string{"cooking"}, Categories: []string{"dining"},
}, },
"cardigan": { "cardigan": {
Label: "portrait", Label: "portrait",
@ -1144,19 +1144,19 @@ var rules = LabelRules{
}, },
"cash machine": { "cash machine": {
Label: "building", Label: "building",
Threshold: 0.200000, Threshold: 0.300000,
Priority: 0, Priority: 0,
Categories: []string{}, Categories: []string{},
}, },
"cassette": { "cassette": {
Label: "electronics", Label: "electronics",
Threshold: 0.300000, Threshold: 0.400000,
Priority: 0, Priority: 0,
Categories: []string{}, Categories: []string{},
}, },
"cassette player": { "cassette player": {
Label: "electronics", Label: "electronics",
Threshold: 0.300000, Threshold: 0.400000,
Priority: 0, Priority: 0,
Categories: []string{}, Categories: []string{},
}, },
@ -1180,25 +1180,25 @@ var rules = LabelRules{
}, },
"cauliflower": { "cauliflower": {
Label: "vegetables", Label: "vegetables",
Threshold: 0.300000, Threshold: 0.330000,
Priority: 0, Priority: 0,
Categories: []string{"cooking"}, Categories: []string{"dining"},
}, },
"cd player": { "cd player": {
Label: "electronics", Label: "electronics",
Threshold: 0.300000, Threshold: 0.400000,
Priority: 0, Priority: 0,
Categories: []string{}, Categories: []string{},
}, },
"cello": { "cello": {
Label: "instrument", Label: "instrument",
Threshold: 0.600000, Threshold: 0.700000,
Priority: 0, Priority: 0,
Categories: []string{"music", "entertainment"}, Categories: []string{"music", "entertainment"},
}, },
"cellular telephone": { "cellular telephone": {
Label: "electronics", Label: "electronics",
Threshold: 0.300000, Threshold: 0.400000,
Priority: 0, Priority: 0,
Categories: []string{}, Categories: []string{},
}, },
@ -1246,7 +1246,7 @@ var rules = LabelRules{
}, },
"cheeseburger": { "cheeseburger": {
Label: "fast food", Label: "fast food",
Threshold: 0.300000, Threshold: 0.330000,
Priority: 0, Priority: 0,
Categories: []string{}, Categories: []string{},
}, },
@ -1500,7 +1500,7 @@ var rules = LabelRules{
Label: "soup", Label: "soup",
Threshold: 0.200000, Threshold: 0.200000,
Priority: 0, Priority: 0,
Categories: []string{"cooking"}, Categories: []string{"dining"},
}, },
"container ship": { "container ship": {
Label: "ship", Label: "ship",
@ -1534,13 +1534,13 @@ var rules = LabelRules{
}, },
"corn": { "corn": {
Label: "vegetables", Label: "vegetables",
Threshold: 0.300000, Threshold: 0.330000,
Priority: 0, Priority: 0,
Categories: []string{"cooking"}, Categories: []string{"dining"},
}, },
"cornet": { "cornet": {
Label: "instrument", Label: "instrument",
Threshold: 0.600000, Threshold: 0.700000,
Priority: 0, Priority: 0,
Categories: []string{"music", "entertainment"}, Categories: []string{"music", "entertainment"},
}, },
@ -1648,9 +1648,9 @@ var rules = LabelRules{
}, },
"cucumber": { "cucumber": {
Label: "vegetables", Label: "vegetables",
Threshold: 0.300000, Threshold: 0.330000,
Priority: 0, Priority: 0,
Categories: []string{"cooking"}, Categories: []string{"dining"},
}, },
"cuirass": { "cuirass": {
Label: "portrait", Label: "portrait",
@ -1720,7 +1720,7 @@ var rules = LabelRules{
}, },
"dial telephone": { "dial telephone": {
Label: "electronics", Label: "electronics",
Threshold: 0.300000, Threshold: 0.400000,
Priority: 0, Priority: 0,
Categories: []string{}, Categories: []string{},
}, },
@ -1755,10 +1755,10 @@ var rules = LabelRules{
Categories: []string{"animal"}, Categories: []string{"animal"},
}, },
"dining table": { "dining table": {
Label: "", Label: "dining",
Threshold: 0.300000, Threshold: 0.300000,
Priority: 0, Priority: 0,
Categories: []string{"funriture", "desk", "table"}, Categories: []string{"table"},
}, },
"dishrag": { "dishrag": {
Label: "", Label: "",
@ -1852,7 +1852,7 @@ var rules = LabelRules{
}, },
"drum": { "drum": {
Label: "instrument", Label: "instrument",
Threshold: 0.600000, Threshold: 0.700000,
Priority: 0, Priority: 0,
Categories: []string{"music", "entertainment"}, Categories: []string{"music", "entertainment"},
}, },
@ -1942,7 +1942,7 @@ var rules = LabelRules{
}, },
"electric guitar": { "electric guitar": {
Label: "instrument", Label: "instrument",
Threshold: 0.600000, Threshold: 0.700000,
Priority: 0, Priority: 0,
Categories: []string{"music", "entertainment"}, Categories: []string{"music", "entertainment"},
}, },
@ -1960,7 +1960,7 @@ var rules = LabelRules{
}, },
"electronics": { "electronics": {
Label: "electronics", Label: "electronics",
Threshold: 0.300000, Threshold: 0.400000,
Priority: 0, Priority: 0,
Categories: []string{}, Categories: []string{},
}, },
@ -2050,7 +2050,7 @@ var rules = LabelRules{
}, },
"fast food": { "fast food": {
Label: "fast food", Label: "fast food",
Threshold: 0.300000, Threshold: 0.330000,
Priority: 0, Priority: 0,
Categories: []string{}, Categories: []string{},
}, },
@ -2134,7 +2134,7 @@ var rules = LabelRules{
}, },
"flute": { "flute": {
Label: "instrument", Label: "instrument",
Threshold: 0.600000, Threshold: 0.700000,
Priority: 0, Priority: 0,
Categories: []string{"music", "entertainment"}, Categories: []string{"music", "entertainment"},
}, },
@ -2212,7 +2212,7 @@ var rules = LabelRules{
}, },
"french horn": { "french horn": {
Label: "instrument", Label: "instrument",
Threshold: 0.600000, Threshold: 0.700000,
Priority: 0, Priority: 0,
Categories: []string{"music", "entertainment"}, Categories: []string{"music", "entertainment"},
}, },
@ -2380,7 +2380,7 @@ var rules = LabelRules{
}, },
"gong": { "gong": {
Label: "instrument", Label: "instrument",
Threshold: 0.600000, Threshold: 0.700000,
Priority: 0, Priority: 0,
Categories: []string{"music", "entertainment"}, Categories: []string{"music", "entertainment"},
}, },
@ -2410,7 +2410,7 @@ var rules = LabelRules{
}, },
"grand piano": { "grand piano": {
Label: "instrument", Label: "instrument",
Threshold: 0.600000, Threshold: 0.700000,
Priority: 0, Priority: 0,
Categories: []string{"music", "entertainment"}, Categories: []string{"music", "entertainment"},
}, },
@ -2614,7 +2614,7 @@ var rules = LabelRules{
}, },
"hard disc": { "hard disc": {
Label: "electronics", Label: "electronics",
Threshold: 0.300000, Threshold: 0.400000,
Priority: 0, Priority: 0,
Categories: []string{}, Categories: []string{},
}, },
@ -2626,13 +2626,13 @@ var rules = LabelRules{
}, },
"harmonica": { "harmonica": {
Label: "instrument", Label: "instrument",
Threshold: 0.600000, Threshold: 0.700000,
Priority: 0, Priority: 0,
Categories: []string{"music", "entertainment"}, Categories: []string{"music", "entertainment"},
}, },
"harp": { "harp": {
Label: "instrument", Label: "instrument",
Threshold: 0.600000, Threshold: 0.700000,
Priority: 0, Priority: 0,
Categories: []string{"music", "entertainment"}, Categories: []string{"music", "entertainment"},
}, },
@ -2668,9 +2668,9 @@ var rules = LabelRules{
}, },
"head cabbage": { "head cabbage": {
Label: "vegetables", Label: "vegetables",
Threshold: 0.300000, Threshold: 0.330000,
Priority: 0, Priority: 0,
Categories: []string{"cooking"}, Categories: []string{"dining"},
}, },
"helmet": { "helmet": {
Label: "helmet", Label: "helmet",
@ -2784,11 +2784,11 @@ var rules = LabelRules{
Label: "soup", Label: "soup",
Threshold: 0.200000, Threshold: 0.200000,
Priority: 0, Priority: 0,
Categories: []string{"cooking"}, Categories: []string{"dining"},
}, },
"hotdog": { "hotdog": {
Label: "fast food", Label: "fast food",
Threshold: 0.300000, Threshold: 0.330000,
Priority: 0, Priority: 0,
Categories: []string{}, Categories: []string{},
}, },
@ -2844,7 +2844,7 @@ var rules = LabelRules{
Label: "dessert", Label: "dessert",
Threshold: 0.300000, Threshold: 0.300000,
Priority: 0, Priority: 0,
Categories: []string{"cooking"}, Categories: []string{},
}, },
"ice lolly": { "ice lolly": {
Label: "dessert", Label: "dessert",
@ -2896,13 +2896,13 @@ var rules = LabelRules{
}, },
"instrument": { "instrument": {
Label: "instrument", Label: "instrument",
Threshold: 0.600000, Threshold: 0.700000,
Priority: 0, Priority: 0,
Categories: []string{"music", "entertainment"}, Categories: []string{"music", "entertainment"},
}, },
"ipod": { "ipod": {
Label: "electronics", Label: "electronics",
Threshold: 0.300000, Threshold: 0.400000,
Priority: 0, Priority: 0,
Categories: []string{}, Categories: []string{},
}, },
@ -3022,7 +3022,7 @@ var rules = LabelRules{
}, },
"joystick": { "joystick": {
Label: "electronics", Label: "electronics",
Threshold: 0.300000, Threshold: 0.400000,
Priority: 0, Priority: 0,
Categories: []string{}, Categories: []string{},
}, },
@ -3376,7 +3376,7 @@ var rules = LabelRules{
}, },
"loudspeaker": { "loudspeaker": {
Label: "electronics", Label: "electronics",
Threshold: 0.300000, Threshold: 0.400000,
Priority: 0, Priority: 0,
Categories: []string{}, Categories: []string{},
}, },
@ -3472,13 +3472,13 @@ var rules = LabelRules{
}, },
"maraca": { "maraca": {
Label: "instrument", Label: "instrument",
Threshold: 0.600000, Threshold: 0.700000,
Priority: 0, Priority: 0,
Categories: []string{"music", "entertainment"}, Categories: []string{"music", "entertainment"},
}, },
"marimba": { "marimba": {
Label: "instrument", Label: "instrument",
Threshold: 0.600000, Threshold: 0.700000,
Priority: 0, Priority: 0,
Categories: []string{"music", "entertainment"}, Categories: []string{"music", "entertainment"},
}, },
@ -3496,9 +3496,9 @@ var rules = LabelRules{
}, },
"mashed potato": { "mashed potato": {
Label: "vegetables", Label: "vegetables",
Threshold: 0.300000, Threshold: 0.330000,
Priority: 0, Priority: 0,
Categories: []string{"cooking"}, Categories: []string{"dining"},
}, },
"matchstick": { "matchstick": {
Label: "", Label: "",
@ -3639,10 +3639,10 @@ var rules = LabelRules{
Categories: []string{"cooking"}, Categories: []string{"cooking"},
}, },
"mobile home": { "mobile home": {
Label: "", Label: "camper",
Threshold: 0.000000, Threshold: 0.200000,
Priority: -1, Priority: 0,
Categories: []string{"building"}, Categories: []string{"vehicle"},
}, },
"model t": { "model t": {
Label: "car", Label: "car",
@ -3652,7 +3652,7 @@ var rules = LabelRules{
}, },
"modem": { "modem": {
Label: "electronics", Label: "electronics",
Threshold: 0.300000, Threshold: 0.400000,
Priority: 0, Priority: 0,
Categories: []string{}, Categories: []string{},
}, },
@ -3844,13 +3844,13 @@ var rules = LabelRules{
}, },
"oboe": { "oboe": {
Label: "instrument", Label: "instrument",
Threshold: 0.600000, Threshold: 0.700000,
Priority: 0, Priority: 0,
Categories: []string{"music", "entertainment"}, Categories: []string{"music", "entertainment"},
}, },
"ocarina": { "ocarina": {
Label: "instrument", Label: "instrument",
Threshold: 0.600000, Threshold: 0.700000,
Priority: 0, Priority: 0,
Categories: []string{"music", "entertainment"}, Categories: []string{"music", "entertainment"},
}, },
@ -3858,7 +3858,7 @@ var rules = LabelRules{
Label: "display", Label: "display",
Threshold: 0.300000, Threshold: 0.300000,
Priority: 0, Priority: 0,
Categories: []string{"car"}, Categories: []string{},
}, },
"office": { "office": {
Label: "office", Label: "office",
@ -3892,7 +3892,7 @@ var rules = LabelRules{
}, },
"organ": { "organ": {
Label: "instrument", Label: "instrument",
Threshold: 0.600000, Threshold: 0.700000,
Priority: 0, Priority: 0,
Categories: []string{"music", "entertainment"}, Categories: []string{"music", "entertainment"},
}, },
@ -4072,7 +4072,7 @@ var rules = LabelRules{
}, },
"pay-phone": { "pay-phone": {
Label: "electronics", Label: "electronics",
Threshold: 0.300000, Threshold: 0.400000,
Priority: 0, Priority: 0,
Categories: []string{}, Categories: []string{},
}, },
@ -4138,7 +4138,7 @@ var rules = LabelRules{
}, },
"phone": { "phone": {
Label: "electronics", Label: "electronics",
Threshold: 0.300000, Threshold: 0.400000,
Priority: 0, Priority: 0,
Categories: []string{}, Categories: []string{},
}, },
@ -4408,7 +4408,7 @@ var rules = LabelRules{
}, },
"projector": { "projector": {
Label: "electronics", Label: "electronics",
Threshold: 0.300000, Threshold: 0.400000,
Priority: 0, Priority: 0,
Categories: []string{}, Categories: []string{},
}, },
@ -4504,7 +4504,7 @@ var rules = LabelRules{
}, },
"radio": { "radio": {
Label: "electronics", Label: "electronics",
Threshold: 0.300000, Threshold: 0.400000,
Priority: 0, Priority: 0,
Categories: []string{}, Categories: []string{},
}, },
@ -4600,15 +4600,15 @@ var rules = LabelRules{
}, },
"remote control": { "remote control": {
Label: "electronics", Label: "electronics",
Threshold: 0.300000, Threshold: 0.400000,
Priority: 0, Priority: 0,
Categories: []string{}, Categories: []string{},
}, },
"restaurant": { "restaurant": {
Label: "", Label: "",
Threshold: 0.000000, Threshold: 0.200000,
Priority: 0, Priority: 0,
Categories: []string{"cooking"}, Categories: []string{"dining"},
}, },
"revolver": { "revolver": {
Label: "weapon", Label: "weapon",
@ -4780,7 +4780,7 @@ var rules = LabelRules{
}, },
"sax": { "sax": {
Label: "instrument", Label: "instrument",
Threshold: 0.600000, Threshold: 0.700000,
Priority: 0, Priority: 0,
Categories: []string{"music", "entertainment"}, Categories: []string{"music", "entertainment"},
}, },
@ -5136,7 +5136,7 @@ var rules = LabelRules{
Label: "bowl", Label: "bowl",
Threshold: 0.200000, Threshold: 0.200000,
Priority: 0, Priority: 0,
Categories: []string{"cooking"}, Categories: []string{"dining"},
}, },
"space bar": { "space bar": {
Label: "keyboard", Label: "keyboard",
@ -5146,7 +5146,7 @@ var rules = LabelRules{
}, },
"space heater": { "space heater": {
Label: "electronics", Label: "electronics",
Threshold: 0.300000, Threshold: 0.400000,
Priority: 0, Priority: 0,
Categories: []string{}, Categories: []string{},
}, },
@ -5157,10 +5157,10 @@ var rules = LabelRules{
Categories: []string{"vehicle"}, Categories: []string{"vehicle"},
}, },
"spaghetti squash": { "spaghetti squash": {
Label: "squash", Label: "vegetables",
Threshold: 0.400000, Threshold: 0.400000,
Priority: 0, Priority: 0,
Categories: []string{"cooking", "vegetables"}, Categories: []string{"dining"},
}, },
"spatula": { "spatula": {
Label: "cooking", Label: "cooking",
@ -5229,10 +5229,10 @@ var rules = LabelRules{
Categories: []string{"animal"}, Categories: []string{"animal"},
}, },
"squash": { "squash": {
Label: "squash", Label: "vegetables",
Threshold: 0.400000, Threshold: 0.400000,
Priority: 0, Priority: 0,
Categories: []string{"cooking", "vegetables"}, Categories: []string{"dining"},
}, },
"squirrel monkey": { "squirrel monkey": {
Label: "monkey", Label: "monkey",
@ -5290,7 +5290,7 @@ var rules = LabelRules{
}, },
"steel drum": { "steel drum": {
Label: "instrument", Label: "instrument",
Threshold: 0.600000, Threshold: 0.700000,
Priority: 0, Priority: 0,
Categories: []string{"music", "entertainment"}, Categories: []string{"music", "entertainment"},
}, },
@ -5458,7 +5458,7 @@ var rules = LabelRules{
}, },
"switch": { "switch": {
Label: "electronics", Label: "electronics",
Threshold: 0.300000, Threshold: 0.400000,
Priority: 0, Priority: 0,
Categories: []string{}, Categories: []string{},
}, },
@ -5500,7 +5500,7 @@ var rules = LabelRules{
}, },
"tape player": { "tape player": {
Label: "electronics", Label: "electronics",
Threshold: 0.300000, Threshold: 0.400000,
Priority: 0, Priority: 0,
Categories: []string{}, Categories: []string{},
}, },
@ -5514,7 +5514,7 @@ var rules = LabelRules{
Label: "", Label: "",
Threshold: 0.300000, Threshold: 0.300000,
Priority: 0, Priority: 0,
Categories: []string{"cooking"}, Categories: []string{"beverage"},
}, },
"television": { "television": {
Label: "screen", Label: "screen",
@ -5646,7 +5646,7 @@ var rules = LabelRules{
Label: "", Label: "",
Threshold: 0.200000, Threshold: 0.200000,
Priority: 0, Priority: 0,
Categories: []string{"cooking", "indoor"}, Categories: []string{"cooking"},
}, },
"tobacco shop": { "tobacco shop": {
Label: "shop", Label: "shop",
@ -5766,7 +5766,7 @@ var rules = LabelRules{
Label: "dessert", Label: "dessert",
Threshold: 0.200000, Threshold: 0.200000,
Priority: 0, Priority: 0,
Categories: []string{"cooking"}, Categories: []string{"dining"},
}, },
"trilobite": { "trilobite": {
Label: "animal", Label: "animal",
@ -5800,7 +5800,7 @@ var rules = LabelRules{
}, },
"trombone": { "trombone": {
Label: "instrument", Label: "instrument",
Threshold: 0.600000, Threshold: 0.700000,
Priority: 0, Priority: 0,
Categories: []string{"music", "entertainment"}, Categories: []string{"music", "entertainment"},
}, },
@ -5866,9 +5866,9 @@ var rules = LabelRules{
}, },
"vegetables": { "vegetables": {
Label: "vegetables", Label: "vegetables",
Threshold: 0.300000, Threshold: 0.330000,
Priority: 0, Priority: 0,
Categories: []string{"cooking"}, Categories: []string{"dining"},
}, },
"velvet": { "velvet": {
Label: "nature", Label: "nature",
@ -5902,7 +5902,7 @@ var rules = LabelRules{
}, },
"violin": { "violin": {
Label: "instrument", Label: "instrument",
Threshold: 0.600000, Threshold: 0.700000,
Priority: 0, Priority: 0,
Categories: []string{"music", "entertainment"}, Categories: []string{"music", "entertainment"},
}, },
@ -6238,8 +6238,8 @@ var rules = LabelRules{
}, },
"zucchini": { "zucchini": {
Label: "vegetables", Label: "vegetables",
Threshold: 0.300000, Threshold: 0.330000,
Priority: 0, Priority: 0,
Categories: []string{"cooking"}, Categories: []string{"dining"},
}, },
} }

View file

@ -1764,7 +1764,7 @@ puffer:
instrument: instrument:
label: instrument label: instrument
threshold: 0.6 threshold: 0.7
categories: categories:
- music - music
- entertainment - entertainment
@ -1879,11 +1879,10 @@ beacon:
- architecture - architecture
beer: beer:
label: beer label: drinks
threshold: 0.4 threshold: 0.4
categories: categories:
- beverage - beverage
- drinks
beer bottle: beer bottle:
see: beer see: beer
@ -2139,10 +2138,9 @@ oscilloscope:
see: display see: display
dining table: dining table:
label: dining
threshold: 0.3 threshold: 0.3
categories: categories:
- funriture
- desk
- table - table
maze: maze:
@ -2480,9 +2478,7 @@ mixing bowl:
- cooking - cooking
mobile home: mobile home:
priority: -1 see: recreational vehicle
categories:
- building
model t: model t:
label: car label: car
@ -2565,10 +2561,7 @@ ocarina:
see: instrument see: instrument
odometer: odometer:
label: display see: display
threshold: 0.3
categories:
- car
organ: organ:
see: instrument see: instrument
@ -2783,8 +2776,9 @@ refrigerator:
- kitchen - kitchen
restaurant: restaurant:
threshold: 0.2
categories: categories:
- cooking - dining
revolver: revolver:
see: weapon see: weapon
@ -2909,7 +2903,7 @@ soup bowl:
label: bowl label: bowl
threshold: 0.2 threshold: 0.2
categories: categories:
- cooking - dining
spatula: spatula:
label: cooking label: cooking
@ -2988,7 +2982,7 @@ table lamp:
teapot: teapot:
threshold: 0.3 threshold: 0.3
categories: categories:
- cooking - beverage
theater curtain: theater curtain:
label: theater label: theater
@ -2998,7 +2992,6 @@ toaster:
threshold: 0.2 threshold: 0.2
categories: categories:
- cooking - cooking
- indoor
toilet seat: toilet seat:
see: ignore see: ignore
@ -3137,25 +3130,23 @@ consomme:
label: soup label: soup
threshold: 0.2 threshold: 0.2
categories: categories:
- cooking - dining
hot pot: hot pot:
label: soup label: soup
threshold: 0.2 threshold: 0.2
categories: categories:
- cooking - dining
trifle: trifle:
label: dessert label: dessert
threshold: 0.2 threshold: 0.2
categories: categories:
- cooking - dining
ice cream: ice cream:
label: dessert label: dessert
threshold: 0.3 threshold: 0.3
categories:
- cooking
ice lolly: ice lolly:
label: dessert label: dessert
@ -3184,7 +3175,7 @@ pretzel:
fast food: fast food:
label: fast food label: fast food
threshold: 0.3 threshold: 0.33
cheeseburger: cheeseburger:
see: fast food see: fast food
@ -3194,9 +3185,9 @@ hotdog:
vegetables: vegetables:
label: vegetables label: vegetables
threshold: 0.3 threshold: 0.33
categories: categories:
- cooking - dining
mashed potato: mashed potato:
see: vegetables see: vegetables
@ -3223,11 +3214,10 @@ cucumber:
see: vegetables see: vegetables
squash: squash:
label: squash label: vegetables
threshold: 0.4 threshold: 0.4
categories: categories:
- cooking - dining
- vegetables
spaghetti squash: spaghetti squash:
see: squash see: squash
@ -3239,7 +3229,6 @@ acorn squash:
label: pumpkin label: pumpkin
threshold: 0.4 threshold: 0.4
categories: categories:
- cooking
- vegetables - vegetables
granny smith: granny smith:
@ -3293,7 +3282,7 @@ carbonara:
label: pasta label: pasta
threshold: 0.2 threshold: 0.2
categories: categories:
- cooking - dining
dough: dough:
label: cooking label: cooking
@ -3802,11 +3791,11 @@ caldron:
cash machine: cash machine:
label: building label: building
threshold: 0.2 threshold: 0.3
electronics: electronics:
label: electronics label: electronics
threshold: 0.3 threshold: 0.4
switch: switch:
see: electronics see: electronics

View file

@ -55,7 +55,6 @@ func BenchmarkRandomToken3(b *testing.B) {
} }
} }
func TestPPID(t *testing.T) { func TestPPID(t *testing.T) {
for n := 0; n < 5; n++ { for n := 0; n < 5; n++ {
uuid := PPID('x') uuid := PPID('x')

File diff suppressed because it is too large Load diff

View file

@ -1,97 +1,97 @@
package txt package txt
// List of titles and ranks in lowercase, see https://en.wikipedia.org/wiki/List_of_titles. // List of titles and ranks in lowercase, see https://en.wikipedia.org/wiki/List_of_titles.
var TitlesAndRanks = map[string]bool { var TitlesAndRanks = map[string]bool{
"emperor": true, "emperor": true,
"caliph": true, "caliph": true,
"king": true, "king": true,
"kings": true, "kings": true,
"shahanshah": true, "shahanshah": true,
"padishah": true, "padishah": true,
"sultan": true, "sultan": true,
"chakravarti": true, "chakravarti": true,
"chhatrapati": true, "chhatrapati": true,
"samrat": true, "samrat": true,
"khagan": true, "khagan": true,
"high": true, "high": true,
"great": true, "great": true,
"maharaja": true, "maharaja": true,
"beg": true, "beg": true,
"khan": true, "khan": true,
"amir": true, "amir": true,
"al-umara": true, "al-umara": true,
"bek": true, "bek": true,
"malik": true, "malik": true,
"emir": true, "emir": true,
"hakim": true, "hakim": true,
"sharif": true, "sharif": true,
"shah": true, "shah": true,
"shirvanshah": true, "shirvanshah": true,
"raja": true, "raja": true,
"dey": true, "dey": true,
"duke": true, "duke": true,
"khedive": true, "khedive": true,
"nawab": true, "nawab": true,
"wāli": true, "wāli": true,
"nizam": true, "nizam": true,
"crown": true, "crown": true,
"prince": true, "prince": true,
"shahzada": true, "shahzada": true,
"mirza": true, "mirza": true,
"awabzada": true, "awabzada": true,
"yuvraj": true, "yuvraj": true,
"vali": true, "vali": true,
"mir": true, "mir": true,
"ikhshid": true, "ikhshid": true,
"pasha": true, "pasha": true,
"thakur": true, "thakur": true,
"babu": true, "babu": true,
"saheb": true, "saheb": true,
"sardar": true, "sardar": true,
"rajkumar": true, "rajkumar": true,
"sahibzada": true, "sahibzada": true,
"nawabzada": true, "nawabzada": true,
"earl": true, "earl": true,
"mankari": true, "mankari": true,
"dewan": true, "dewan": true,
"rao": true, "rao": true,
"bahadur": true, "bahadur": true,
"rai": true, "rai": true,
"beylerbey": true, "beylerbey": true,
"atabeg": true, "atabeg": true,
"viscount": true, "viscount": true,
"zamindar": true, "zamindar": true,
"sahib": true, "sahib": true,
"bey": true, "bey": true,
"begum": true, "begum": true,
"begzada": true, "begzada": true,
"baron": true, "baron": true,
"lala": true, "lala": true,
"agha": true, "agha": true,
"hazinedar": true, "hazinedar": true,
"queen": true, "queen": true,
"pope": true, "pope": true,
"marquess": true, "marquess": true,
"baroness": true, "baroness": true,
"princess": true, "princess": true,
"lord": true, "lord": true,
"lady": true, "lady": true,
"supreme": true, "supreme": true,
"leader": true, "leader": true,
"chief": true, "chief": true,
"excellency": true, "excellency": true,
"doctor": true, "doctor": true,
"president": true, "president": true,
"marshal": true, "marshal": true,
"conqueror": true, "conqueror": true,
"general": true, "general": true,
"admiral": true, "admiral": true,
"guide": true, "guide": true,
"executive": true, "executive": true,
"bishop": true, "bishop": true,
"highness": true, "highness": true,
"his": true, "his": true,
"her": true, "her": true,
"monsignor": true, "monsignor": true,
"sire": true, "sire": true,
} }