cterdam commited on
Commit
ad02c76
·
1 Parent(s): a16ce3f

Add 航空 to zh airport-word blocklist

Browse files

Data fixes: BCY/QOW had airline names as name_zh ('衣索比亞航空',
'馬拉維航空'); NEL/ROW had facility names ('萊克湖海軍航空總站',
'羅斯威爾國際航空中心'). All replaced with city transliterations.

Files changed (1) hide show
  1. test/test_invariants.py +2 -2
test/test_invariants.py CHANGED
@@ -190,11 +190,11 @@ def test_no_typographic_quotes_in_ru(dataset):
190
  assert bad == [], f"name_ru with «» quotes: {bad[:10]}"
191
 
192
 
193
- _AIRPORT_ZH = re.compile(r'機場|机場|机场|空港')
194
 
195
 
196
  def test_no_airport_words_in_zh(dataset):
197
- """name_zh must not contain airport-article words like 機場."""
198
  bad = [(e['code'], e['name_zh']) for e in dataset
199
  if e.get('name_zh') and _AIRPORT_ZH.search(e['name_zh'])]
200
  assert bad == [], f"name_zh with airport word: {bad[:10]}"
 
190
  assert bad == [], f"name_ru with «» quotes: {bad[:10]}"
191
 
192
 
193
+ _AIRPORT_ZH = re.compile(r'機場|机場|机场|空港|航空')
194
 
195
 
196
  def test_no_airport_words_in_zh(dataset):
197
+ """name_zh must not contain airport/aviation words like 機場 or 航空."""
198
  bad = [(e['code'], e['name_zh']) for e in dataset
199
  if e.get('name_zh') and _AIRPORT_ZH.search(e['name_zh'])]
200
  assert bad == [], f"name_zh with airport word: {bad[:10]}"