User:SafwatHalaby/scripts/brand/templates

From OpenStreetMap Wiki
Jump to: navigation, search

This script ensures branches/brands in Israel adhere to the following templates. Feel free to improve them. If you don't have a Wiki account, you can PM me your improvements or post them at the script discussion page. SwiftFast_bot periodically scans POIs in Israel, and changes them to fit the templates.

All comparisons are normalized first: whitespace or non-letter symbols do not affect comparisons, neither does upper/lowercase. For instance, if name is "Super Pharm", there is no need to add "SuperPharm", "Super-pharm", etc to alt_find. Tags with empty values are ignored. The bot will not add empty values. If you can fill them, please do.

  • alt_find: Alternative names, if a POI is found carrying one of them, it is attributed to the brand.
  • variants: Some brands have variants e.g. shufersal deal, shufersal sheli are both variants of shufersal. The main brand tags are applied first, then the variant tags are applied on top of them.

Banks

[

// last update 2017_09_25

{ tags: { 
	"name": "בנק הפועלים", "name:he": "בנק הפועלים", "name:en": "Bank Hapoalim",
	"name:ar": "بنك هبوعليم", "name:ru": "Банк Апоалим", "brand":"Bank Hapoalim",
	"amenity":"bank", "website": "https://www.bankhapoalim.co.il",
	"brand:wikidata": "Q2666775", "brand:wikipedia": "en:Bank Hapoalim"
	}, alt_find: ["Hapoalim", "הפועלים", "פועלים", "בנק פועלים", "Hapoalim Bank", "Poalim"], variants: [

		{ tags: {
			"name" : "פועלים אקספרס", "name:he":"פועלים אקספרס", "name:en": "Hapoalim Express"
			}, alt_find: [] 
		},

		{ tags: {
			"name" : "בנק הפועלים - סניף עסקי", "name:he":"בנק הפועלים - סניף עסקי",
			"name:en": "Bank Hapoalim - Business Branch" 
			}, alt_find: ["פועלים עסקי", "פועלים סניף עסקי", "בנק הפועלים סניף עסקים"] 
		}
	]
},

{ tags: { 
	"name": "בנק לאומי", "name:he": "בנק לאומי", "name:en": "Bank Leumi",
	"name:ar": "بنك ليئومي", "name:ru": "Банк Леуми", "brand":"Bank Leumi",
	"amenity":"bank", "website": "https://www.leumi.co.il",
	"brand:wikidata": "Q806641", "brand:wikipedia": "en:Bank Leumi"
	}, alt_find: ["Leumi", "לאומי", "Leumi Bank"], variants: []
},

{ tags: { 
	"name": "הבנק הבינלאומי", "name:he": "הבנק הבינלאומי", "name:en": "First International Bank",
	"name:ar": "", "name:ru": "Банк Бейнлеуми", "brand":"First International Bank",
	"amenity":"bank", "website": "https://www.fibi.co.il",
	"brand:wikidata": "Q2777497", "brand:wikipedia": "en:First International Bank of Israel"
	}, alt_find: ["הבינלאומי", "בנק בינלאומי", "הבנק הבינלאומי הראשון לישראל", "בינלאומי", 
	"HaBenleumi", "Benleumi", "Beinleumi"], variants: [

		{ tags: {
			"name" : "בנק מסד", "name:he":"בנק מסד", "name:en": "Bank Massad", "website":"https://www.bankmassad.co.il"
			}, alt_find: ["מסד", "Massad", "masad"] 
		},
	]
},

{ tags: { 
	"name": "בנק ירושלים", "name:he": "בנק ירושלים", "name:en": "Bank of Jerusalem",
	"name:ar": "", "name:ru": "Банк Ерушалаим", "brand":"Bank of Jerusalem",
	"amenity":"bank", "website": "https://www.bankjerusalem.co.il",
	"brand:wikidata": "Q2900227", "brand:wikipedia": "en:Bank of Jerusalem"
	}, alt_find: ["Jerusalem Bank"], variants: []
},

{ tags: { 
	"name": "בנק יהב", "name:he": "בנק יהב", "name:en": "Bank Yahav",
	"name:ar": "", "name:ru": "Банк Яхав", "brand":"Bank Yahav",
	"amenity":"bank", "website": "https://www.bank-yahav.co.il",
	"brand:wikidata": "Q7187611", "brand:wikipedia": "he:בנק יהב"
	}, alt_find: ["יהב", "Yahav"], variants: []
},

{ tags: { 
	"name": "בנק מזרחי טפחות", "name:he": "בנק מזרחי טפחות", "name:en": "Bank Mizrahi Tefahot",
	"name:ar": "", "name:ru": "Банк Мизрахи-Тфахот", "brand":"Bank Mizrahi Tefahot",
	"amenity":"bank", "website": "https://www.mizrahi-tefahot.co.il",
	"brand:wikidata": "Q2777129", "brand:wikipedia": "en:Bank Mizrahi-Tefahot"
	}, alt_find: ["מזרחי טפחות", "מזרחי", "טפחות", "Mizrahi", "Mizrahi Tfahot", "Mizrachi", "Mizrahi Tefahot", "Mezrahi"], variants: []
},

{ tags: { 
	"name": "בנק אוצר החייל", "name:he": "בנק אוצר החייל", "name:en": "Bank Otsar Ha-Hayal",
	"name:ar": "", "name:ru": "Банк Оцар Ха-Хайаль", "brand":"Bank Otsar Ha-Hayal",
	"amenity":"bank", "website": "https://online.bankotsar.co.il",
	"brand:wikidata": "Q2900674", "brand:wikipedia": "en:Bank Otsar Ha-Hayal"
	}, alt_find: ["אוצר החייל"], variants: []
},

{ tags: { 
	"name": "בנק דיסקונט", "name:he": "בנק דיסקונט", "name:en": "Discount Bank",
	"name:ar": "", "name:ru": "Банк Дисконт", "brand":"Discount Bank",
	"amenity":"bank", "website": "https://www.discountbank.co.il",
	"brand:wikidata": "Q250362", "brand:wikipedia": "en:Israel Discount Bank"
	}, alt_find: ["Discount", "דיסקונט"], variants: [
		{ tags: {
			"name" : "מרכנתיל", "name:he":"מרכנתיל", "name:en": "Mercantile", "name:ru":"Дисконт Меркантиль", "website": "https://www.mercantile.co.il"
			}, alt_find: ["מרקנטיל", "בנק מרקנטיל", "מרכנטיל", "מרקאנטיל", "מרכאנתיל"] 
		}
	]
},

{ tags: { 
	"name": "בנק איגוד", "name:he": "בנק איגוד", "name:en": "Union Bank",
	"name:ar": "", "name:ru": "Банк Игуд", "brand":"Union Bank",
	"amenity":"bank", "website": "https://www.unionbank.co.il",
	"brand:wikidata": "Q2903265", "brand:wikipedia": "en:בנק אגוד לישראל"
	}, alt_find: ["איגוד", "אגוד", "בנק אגוד", "union"], variants: []
}

]

Fuel

[

// last update 2017_09_25

{ tags: { 
	"name": "דלק", "name:he": "דלק", "name:en": "Delek",
	"name:ar": "ديليك", "name:ru": "Делек", "brand":"Delek",
	"amenity":"fuel", "website": "http://www.delek.co.il",
	"brand:wikidata": "Q1184087", "brand:wikipedia":"en:Delek"
	}, alt_find: [], variants: []
},

{ tags: { 
	"name": "סונול", "name:he": "סונול", "name:en": "Sonol",
	"name:ar": "سونول", "name:ru": "Сонол", "brand":"Sonol",
	"amenity":"fuel", "website": "https://www.sonol.co.il",
	"brand:wikidata": "Q3701622", "brand:wikipedia": "en:Sonol"
	}, alt_find: [], variants: []
},

{ tags: { 
	"name": "פז", "name:he": "פז", "name:en": "Paz",
	"name:ar": "باز", "name:ru": "Паз", "brand":"Paz",
	"amenity":"fuel", "website": "https://www.paz.co.il",
	"brand:wikidata": "Q2211731", "brand:wikipedia": "en:Paz Oil Company"
	}, alt_find: [], variants: [

		{ tags: {
			"name" : "טופז", "name:he":"טופז", "name:en": "Topaz"
			}, alt_find: ["Paz Topaz", "פז טופז"] 
		}
	]
},

{ tags: { 
	"name": "טן", "name:he": "טן", "name:en": "Ten",
	"name:ar": "", "name:ru": "Тэн", "brand":"Ten",
	"amenity":"fuel", "website": "http://www.10ten.co.il",
	"brand:wikidata": "Q18192134", "brand:wikipedia": "he:קבוצת פישמן"
	}, alt_find: ["טן10", "10", "Ten10"], variants: []
},

{ tags: { 
	"name": "דור אלון", "name:he": "דור אלון", "name:en": "Dor Alon",
	"name:ar": "دور الون", "name:ru": "Дор Алон", "brand":"Dor Alon",
	"amenity":"fuel", "website": "http://www.doralon.co.il",
	"brand:wikidata": "Q16130352", "brand:wikipedia": "he:דור אלון אנרגיה בישראל (1988)"
	}, alt_find: [], variants: []
},

{ tags: { 
	"name": 'סד"ש', "name:he": 'סד"ש', "name:en": "Sadash",
	"name:ar": "", "name:ru": "Садаш", "brand":"Sadash",
	"amenity":"fuel", "website": "",
	"brand:wikidata": "", "brand:wikipedia": ""
	}, alt_find: [], variants: []
},

{ tags: { 
	"name": "דיזול", "name:he": "דיזול", "name:en": "Dizol",
	"name:ar": "", "name:ru": "Дизол", "brand":"Dizol",
	"amenity":"fuel", "website": "",
	"brand:wikidata": "", "brand:wikipedia": ""
	}, alt_find: [], variants: []
},

{ tags: { 
	"name": "תפוז", "name:he": "תפוז", "name:en": "Tapuz",
	"name:ar": "", "name:ru": "Тапуз", "brand":"Tapuz",
	"amenity":"fuel", "website": "",
	"brand:wikidata": "", "brand:wikipedia": ""
	}, alt_find: ["Tapoz", "Tapooz"], variants: []
},

{ tags: { 
	"name": "יעד", "name:he": "יעד", "name:en": "Yaad",
	"name:ar": "", "name:ru": "Яад", "brand":"Yaad",
	"amenity":"fuel", "website": "http://yaadfuel.co.il/",
	"brand:wikidata": "", "brand:wikipedia": ""
	}, alt_find: ["Yad"], variants: []
}

]

Supermarkets

[

// last update 2017_09_25

{ tags: { 
	"name": "מגה", "name:he": "מגה", "name:en": "Mega",
	"name:ar": "", "name:ru": "Мега", "brand": "Mega",
	"shop": "supermarket", "website": "https://www.mega.co.il",
	"brand:wikidata": "Q12403907", "brand:wikipedia": "he:מגה קמעונאות"
	}, alt_find: [], variants: [

		{ tags: {
			"name": "מגה בעיר", "name:he": "מגה בעיר", "name:en" : "Mega Ba'Ir", "name:ru": "Мега Ба'Ир",
			"website": "http://www.mega-bair.co.il/" }, alt_find: [] 
		},

		{ tags: {
			"name": "מגה בול", "name:he": "מגה בול", "name:en": "Mega Bul", "name:ru": "Мега Буль" 
			}, alt_find: ["Mega Bool"] 
		}
	]
},

{ tags: { 
	"name": "שופרסל", "name:he": "שופרסל", "name:en": "Shufersal",
	"name:ar": "", "name:ru": "Шуферсаль", "brand": "Shufersal",
	"shop": "supermarket", "website": "https://www.shufersal.co.il",
	"brand:wikidata": "Q4523181", "brand:wikipedia": "en:Shufersal"
	}, alt_find: ["Supersal"], variants: [

		{ tags: {
			"name": "שופרסל דיל", "name:he": "שופרסל דיל", "name:en": "Shufersal Deal", "name:ru": "Шуферсаль Диль"
			}, alt_find: ["שופרסל ביג", "Shufersal Big"] 
		},

		{ tags: {
			"name": "שופרסל דיל אקסטרה", "name:he": "שופרסל דיל אקסטרה", "name:en": "Shufersal Deal Extra", "name:ru": ""
			}, alt_find: ["", ""] 
		},

		{ tags: {
			"name": "שופרסל אקספרס", "name:he": "שופרסל אקספרס", "name:en": "Shufersal Express", "name:ru": "Шуферсаль Экспресс"
			}, alt_find: [] 
		},
		
		{ tags: {
			"name": "שופרסל שלי", "name:he": "שופרסל שלי", "name:en": "Shufersal Sheli", "name:ru": "Шуферсаль Шели"
			}, alt_find: [] 
		}
	]
},	  
	  
{ tags: { 
	"name": "AM:PM", "name:he": "AM:PM", "name:en": "AM:PM",
	"name:ar": "", "name:ru": "", "brand": "AM:PM",
	"shop": "supermarket", "website": "http://www.ampm.co.il",
	"brand:wikidata": "Q6891113", "brand:wikipedia": "he:רשת AM:PM"
	}, alt_find: [], variants: []
},	
	  
{ tags: { 
	"name": "טיב טעם", "name:he": "טיב טעם", "name:en": "Tiv Ta'am",
	"name:ar": "", "name:ru": "Тив Та'ам", "brand": "Tiv Ta'am",
	"shop": "supermarket", "website": "https://www.tivtaam.co.il",
	"brand:wikidata": "Q2903718", "brand:wikipedia": "en:Tiv Ta'am"
	}, alt_find: [], variants: [
		{ tags: {
			"name": "טיב טעם סיטי", "name:he": "טיב טעם סיטי", "name:en": "Tiv Ta'am in the City", "name:ru": "Тив Та'ам Сити"
			}, alt_find: ["טיב טעם in the city"] 
		}
	]
},		  
	  
{ tags: { 
	"name": "רמי לוי", "name:he": "רמי לוי", "name:en": "Rami Levy",
	"name:ar": "", "name:ru": "Рами Леви",  "brand": "Rami Levy",
	"shop": "supermarket", "website": "https://www.rami-levy.co.il",
	"brand:wikidata": "Q6035779", "brand:wikipedia": "en:Rami Levy Hashikma Marketing"
	}, alt_find: ["rami levi", "Ramy Levi", "Ramy Levy"], variants: []
},		  
	  
{ tags: { 
	"name": "יינות ביתן", "name:he": "יינות ביתן", "name:en": "Yaynot Bitan",
	"name:ar": "", "name:ru": "Яэнот Битан", "brand": "Yaynot Bitan",
	"shop": "supermarket", "website": "https://www.ybitan.co.il",
	"brand:wikidata": "Q6561327", "brand:wikipedia": "he:יינות ביתן"
	}, alt_find: [], variants: []
},	
	  
{ tags: { 
	"name": "אושר עד", "name:he": "אושר עד", "name:en": "Osher Ad",
	"name:ar": "", "name:ru": "Ошер Ад", "brand": "Osher Ad",
	"shop": "supermarket", "website": "",
	"brand:wikidata": "", "brand:wikipedia": "", "wikimedia_commons": ""
	}, alt_find: ["אשר עד"], variants: []
},	
	  
/* yesh appears to be a major subrand of shufersal*/
{ tags: { 
	"name": "יש בשכונה", "name:he": "יש בשכונה", "name:en": "Yesh BaShkhuna",
	"name:ar": "", "name:ru": "Еш БаШхуна", "brand": "Yesh",
	"shop": "supermarket", "website": "http://www.yesh.co.il",
	"brand:wikidata": "", "brand:wikipedia": "he:שופרסל"
	}, alt_find: ["יש"], variants: [
		{ tags: {
			"name": "יש חסד", "name:he": "יש חסד", "name:en": "Yesh Hesed", "name:ru": "Еш Хесэд"
			}, alt_find: [] 
		}
	]
},	
	  
{ tags: { 
	"name": "ויקטורי", "name:he": "ויקטורי", "name:en": "Victory",
	"name:ar": "", "name:ru": "Виктори", "brand": "Victory",
	"shop": "supermarket", "website": "https://www.victory.co.il",
	"brand:wikidata": "Q6564842", "brand:wikipedia": "he:ויקטורי (רשת מרכולים)"
	}, alt_find: ["וקטורי"], variants: []
},	

/* eden teva appears to be a major subrand of mega*/
{ tags: { 
	"name": "עדן טבע מרקט", "name:he": "עדן טבע מרקט", "name:en": "Eden Teva Market",
	"name:ar": "", "name:ru": "Эден Тева",  "brand": "Eden Teva",
	"shop": "supermarket", "website": "https://www.edenteva.co.il",
	"brand:wikidata": "", "brand:wikipedia": "he:מגה קמעונאות"
	}, alt_find: [], variants: []
},	
	  
{ tags: { 
	"name": "יוחננוף", "name:he": "יוחננוף", "name:en": "Yochananof",
	"name:ar": "", "name:ru": "Йохананоф", "brand": "Yochananof",
	"shop": "supermarket", "website": "http://yochananof.co.il",
	"brand:wikidata": "Q25492676", "brand:wikipedia": "he:רשת יוחננוף"
	}, alt_find: ["יוחננף", "יוחחנוף", "Yochananoff"], variants: []
},
	  
{ tags: { 
	"name": "חצי חינם", "name:he": "חצי חינם", "name:en": "Hazi Hinam",
	"name:ar": "", "name:ru": "Хаци Хинам", "brand": "Hazi Hinam",
	"shop": "supermarket", "website": "https://www.hazi-hinam.co.il",
	"brand:wikidata": "", "brand:wikipedia": ""
	}, alt_find: [], variants: []
},
	  
{ tags: { 
	"name": "קואופ שופ", "name:he": "קואופ שופ", "name:en": "Coop Shop",
	"name:ar": "", "name:ru": "Кооп Шоп", "brand": "Coop",
	"shop": "supermarket", "website": "http://www.israel.coop",
	"brand:wikidata": "Q16132437", "brand:wikipedia": "he:קואופ ישראל"
	}, alt_find: ["קו-אופ", "Mr. Zol", "Mr. Sol", "Mister Zol", "מיסטר זול"], variants: [

		{ tags: {
			"name": "קואופ שופ בכפר", "name:he": "קואופ שופ בכפר", "name:en": "Coop Shop BaKfar", "name:ru": "Кооп Шоп БаКфар"
			}, alt_find: [] 
		},
		
		{ tags: {
			"name": "קואופ שופ אקסטרה", "name:he": "קואופ שופ אקסטרה", "name:en": "Coop Shop Extra", "name:ru": "Кооп Шоп Экстра"
			}, alt_find: [] 
		}
	]
},	  
		  
{ tags: { 
	"name": "קשת טעמים", "name:he": "קשת טעמים", "name:en": "Keshet Teamim",
	"name:ar": "", "name:ru": "Кешет Теамим", "brand": "Keshet Teamim",
	"shop": "supermarket", "website": "https://www.keshet-teamim.co.il",
	"brand:wikidata": "", "brand:wikipedia": ""
	}, alt_find: [], variants: []
},

{ tags: { 
	"name": "סופר קופיקס", "name:he": "סופר קופיקס", "name:en": "Super Cofix",
	"name:ar": "", "name:ru": "Супер Кофикс", "brand": "Cofix",
	"shop": "supermarket", "website": "http://www.cofix.co.il/super-cofix/",
	"brand:wikidata": "Q16132717", "brand:wikipedia": "en:Cofix"
	}, alt_find: [], variants: []
},
	
{ tags: { 
	"name": "פרש מרקט", "name:he": "פרש מרקט", "name:en": "Fresh Market",
	"name:ar": "", "name:ru": "Фрэш Маркет", "brand": "Fresh Market",
	"shop": "supermarket", "website": "",
	"brand:wikidata": "", "brand:wikipedia": ""
	}, alt_find: [], variants: []
},
	
{ tags: { 
	"name": "פוליצר", "name:he": "פוליצר", "name:en": "Politzer",
	"name:ar": "", "name:ru": "Полицер", "brand": "Politzer",
	"shop": "supermarket", "website": "http://politzer.co.il",
	"brand:wikidata": "", "brand:wikipedia": ""
	}, alt_find: ["Pulitzer"], variants: []
},
	
{ tags: { 
	"name": "סטופמרקט", "name:he": "סטופמרקט", "name:en": "Stopmarket",
	"name:ar": "", "name:ru": "Стопмаркет", "brand": "Stopmarket",
	"shop": "supermarket", "website": "http://stopmarket.co.il",
	"brand:wikidata": "", "brand:wikipedia": ""
	}, alt_find: [], variants: []
}

]

Pharmacies

[

// last update 2017_09_25

{ tags: { 
	"name": "סופר-פארם", "name:he": "סופר-פארם", "name:en": "Super-Pharm",
	"name:ar": "", "name:ru": "Супер-Фарм", "brand": "Super-Pharm",
	"amenity": "pharmacy", "website": "http://www.super-pharm.co.il",
	"brand:wikidata": "Q13220217", "brand:wikipedia": "en:Super-Pharm"
	}, alt_find: ["Super Farm"], variants: []
},	

{ tags: { 
	"name": "ניו-פארם", "name:he": "ניו-פארם", "name:en": "New-Pharm",
	"name:ar": "", "name:ru": "Нью-Фарм", "brand": "New-Pharm",
	"amenity": "pharmacy", "website": "http://www.new-pharm.co.il",
	"brand:wikidata": "", "brand:wikipedia": ""
	}, alt_find: ["New Farm"], variants: []
},

/* todo inspect potential collision with clinics { tags: { 
	"name": "כללית", "name:he": "כללית", "name:en": "Clalit",
	"name:ar": "", "name:ru": "Клалит", "brand": "Clalit",
	"amenity": "pharmacy", "website": "",
	"brand:wikidata": "", "brand:wikipedia": "", "wikimedia_commons": ""
	}, alt_find: ["Clallit", "Klalit", "Clalit Pharmacy"], variants: []
},

{ tags: { 
	"name": "מכבי פארם", "name:he": "מכבי פארם", "name:en": "Maccabi Pharm",
	"name:ar": "", "name:ru": "Макаби Фарм", "brand": "Maccabi Pharm",
	"amenity": "pharmacy", "website": "http://www.maccabi4u.co.il",
	"brand:wikidata": "", "brand:wikipedia": "", "wikimedia_commons": ""
	}, alt_find: ["מכבי" ,"בית מרקחת מכבי", "Maccabi Pharmacy"], variants: []
}*/

]

Food

[

// last update 2017_09_25

{ tags: { 
	"name": "מקדונלד'ס", "name:he": "מקדונלד'ס", "name:en": "McDonald's",
	"name:ar": "ماكدونالدز", "name:ru": "", "brand": "McDonald's",
	"amenity": "fast_food", "website": "https://www.mcdonalds.co.il/",
	"brand:wikidata": "Q38076", "brand:wikipedia": "en:McDonald's"
	}, alt_find: ["McDonald", "מקדונאלדס"], variants: [

		{ tags: {
			"name" : "מקדונלד'ס אקספרס", "name:he":"מקדונלד'ס אקספרס", "name:en": "McDonald's Express"
			}, alt_find: [] 
		},
	]
},	

]

Clinics

Todo

Bot settings

{
tagsToAttributeBrand: ["name:he", "name:en", "name:ar", "name:ru", "brand"],
tagsToSearchPOI: ["name", "name:he", "name:en", "name:ar", "brand", "operator", "branch", "operator:he", "operator:en", "operator:ar", "brand:en", "brand:he", "brand:ar"],
deleteForAll: [],      // tags to remove always, without exceptions
printBrandTable: true, // Should I print the generated brand table?
printTag: "name:en",    // The tag to be use for console messages.
dryRun: false,          // If true, only prints POIs and the brands they are believed to belong to. Doesn't modify anything.
verbose: false,         // If true, print tags for each node that is a branch of a brand.
fuzzyBlackList: {"דלק": true, "יש": true}, // words here must never be involved in a fuzzy match
tagsToCheck: ["shop", "amenity"]
}