Removing "a" as a synonym from all cats in English

This commit is contained in:
Jamie Hardt
2024-10-31 20:08:10 -07:00
parent 32f17ca7b5
commit daa714a9b4
2 changed files with 9 additions and 3 deletions

View File

@@ -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",

View File

@@ -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)