Removing "a" as a synonym from all cats in English
This commit is contained in:
@@ -12550,7 +12550,6 @@
|
||||
"CatShort": "GAME",
|
||||
"Explanations": "Game sounds not fitting another category in this list. Cards would go here. Jenga.",
|
||||
"Synonyms": [
|
||||
"a",
|
||||
"bag",
|
||||
"ball",
|
||||
"balloon",
|
||||
@@ -22234,7 +22233,6 @@
|
||||
"CatShort": "VEH",
|
||||
"Explanations": "Very old vehicles, such a Model A, Model T. Mainly cars, but possible other very old vehicles, trucks, tractors.",
|
||||
"Synonyms": [
|
||||
"a",
|
||||
"antique",
|
||||
"austin",
|
||||
"auto",
|
||||
@@ -23550,7 +23548,6 @@
|
||||
"CatShort": "VOX",
|
||||
"Explanations": "A single voice singing, a child singing. For a crowd, use CROWDS-SINGING",
|
||||
"Synonyms": [
|
||||
"a",
|
||||
"cappella",
|
||||
"caroling",
|
||||
"chanting",
|
||||
|
@@ -85,6 +85,15 @@ for lang in langs:
|
||||
split_pattern = r'\W+'
|
||||
syn_list = re.split(split_pattern, syns_raw)
|
||||
category['Synonyms'] = [s.lower() for s in syn_list]
|
||||
|
||||
# if the sub-category name is not in the synonym list, include it
|
||||
# if category['SubCategory'].lower() not in category['Synonyms']:
|
||||
# category['Synonyms'].append(category['SubCategory'].lower())
|
||||
|
||||
if lang == 'en':
|
||||
for i, syn in enumerate(category['Synonyms']):
|
||||
if syn == "a":
|
||||
del category['Synonyms'][i]
|
||||
|
||||
schedule.append(category)
|
||||
|
||||
|
Reference in New Issue
Block a user