# Sports Data

> **Relevant source files**
> * [ArWikiCats/new_resolvers/__init__.py](../ArWikiCats/new_resolvers/__init__.py)
> * [ArWikiCats/new_resolvers/countries_names_resolvers/__init__.py](../ArWikiCats/new_resolvers/countries_names_resolvers/__init__.py)
> * [ArWikiCats/new_resolvers/countries_names_with_sports/__init__.py](../ArWikiCats/new_resolvers/countries_names_with_sports/__init__.py)
> * [ArWikiCats/new_resolvers/countries_names_with_sports/p17_bot_sport.py](../ArWikiCats/new_resolvers/countries_names_with_sports/p17_bot_sport.py)
> * [ArWikiCats/new_resolvers/countries_names_with_sports/p17_sport_to_move_under.py](../ArWikiCats/new_resolvers/countries_names_with_sports/p17_sport_to_move_under.py)
> * [ArWikiCats/new_resolvers/films_resolvers/__init__.py](../ArWikiCats/new_resolvers/films_resolvers/__init__.py)
> * [ArWikiCats/new_resolvers/films_resolvers/resolve_films_labels.py](../ArWikiCats/new_resolvers/films_resolvers/resolve_films_labels.py)
> * [ArWikiCats/new_resolvers/jobs_resolvers/__init__.py](../ArWikiCats/new_resolvers/jobs_resolvers/__init__.py)
> * [ArWikiCats/new_resolvers/jobs_resolvers/relegin_jobs_new.py](../ArWikiCats/new_resolvers/jobs_resolvers/relegin_jobs_new.py)
> * [ArWikiCats/new_resolvers/nationalities_resolvers/__init__.py](../ArWikiCats/new_resolvers/nationalities_resolvers/__init__.py)
> * [ArWikiCats/new_resolvers/sports_resolvers/__init__.py](../ArWikiCats/new_resolvers/sports_resolvers/__init__.py)
> * [ArWikiCats/new_resolvers/sports_resolvers/countries_names_and_sports.py](../ArWikiCats/new_resolvers/sports_resolvers/countries_names_and_sports.py)
> * [ArWikiCats/new_resolvers/sports_resolvers/nationalities_and_sports.py](../ArWikiCats/new_resolvers/sports_resolvers/nationalities_and_sports.py)
> * [ArWikiCats/new_resolvers/sports_resolvers/pre_defined.py](../ArWikiCats/new_resolvers/sports_resolvers/pre_defined.py)
> * [ArWikiCats/new_resolvers/sports_resolvers/raw_sports.py](../ArWikiCats/new_resolvers/sports_resolvers/raw_sports.py)
> * [ArWikiCats/new_resolvers/sports_resolvers/raw_sports_with_suffixes.py](../ArWikiCats/new_resolvers/sports_resolvers/raw_sports_with_suffixes.py)
> * [ArWikiCats/new_resolvers/sports_resolvers/sport_lab_nat.py](../ArWikiCats/new_resolvers/sports_resolvers/sport_lab_nat.py)
> * [ArWikiCats/new_resolvers/teams_mappings_ends.py](../ArWikiCats/new_resolvers/teams_mappings_ends.py)
> * [ArWikiCats/translations/__init__.py](../ArWikiCats/translations/__init__.py)
> * [ArWikiCats/translations/build_data/__init__.py](../ArWikiCats/translations/build_data/__init__.py)
> * [ArWikiCats/translations/funcs.py](../ArWikiCats/translations/funcs.py)
> * [ArWikiCats/translations/geo/__init__.py](../ArWikiCats/translations/geo/__init__.py)
> * [ArWikiCats/translations/geo/labels_country.py](../ArWikiCats/translations/geo/labels_country.py)
> * [ArWikiCats/translations/jobs/Jobs.py](../ArWikiCats/translations/jobs/Jobs.py)
> * [ArWikiCats/translations/jobs/Jobs2.py](../ArWikiCats/translations/jobs/Jobs2.py)
> * [ArWikiCats/translations/jobs/jobs_data_basic.py](../ArWikiCats/translations/jobs/jobs_data_basic.py)
> * [ArWikiCats/translations/jobs/jobs_players_list.py](../ArWikiCats/translations/jobs/jobs_players_list.py)
> * [ArWikiCats/translations/jobs/jobs_singers.py](../ArWikiCats/translations/jobs/jobs_singers.py)
> * [ArWikiCats/translations/jobs/jobs_womens.py](../ArWikiCats/translations/jobs/jobs_womens.py)
> * [ArWikiCats/translations/mixed/all_keys2.py](../ArWikiCats/translations/mixed/all_keys2.py)
> * [ArWikiCats/translations/mixed/female_keys.py](../ArWikiCats/translations/mixed/female_keys.py)
> * [ArWikiCats/translations/mixed/keys2.py](../ArWikiCats/translations/mixed/keys2.py)
> * [ArWikiCats/translations/others/__init__.py](../ArWikiCats/translations/others/__init__.py)
> * [ArWikiCats/translations/others/tax_table.py](../ArWikiCats/translations/others/tax_table.py)
> * [ArWikiCats/translations/sports/Sport_key.py](../ArWikiCats/translations/sports/Sport_key.py)
> * [ArWikiCats/translations/tv/films_mslslat.py](../ArWikiCats/translations/tv/films_mslslat.py)
> * [_work_files/data_len.json](../_work_files/data_len.json)

## Purpose and Scope

This document describes the sports-related translation data used in ArWikiCats. Sports data enables translation of English Wikipedia categories related to sports, athletes, teams, clubs, competitions, and venues into Arabic. The data structures support gender-specific forms, context-specific variants (jobs, labels, Olympic categories), and team/club translations.

For information about how sports resolvers use this data in the resolution chain, see [Sports Resolvers](19.Sports-Resolvers.md). For job-related sports data (e.g., "footballers", "basketball players"), see [Jobs and Occupations](9.Jobs-and-Occupations.md)

---

## Sports Data Architecture

The sports translation system consists of two main components: **sport type translations** (SPORT_KEY_RECORDS with 433 entries) and **team/club translations** (sub_teams_new with 7,832 entries). The sport type data is further specialized into five context-specific variants to handle different category patterns.

```mermaid
flowchart TD

OLYMPICS["Olympic Games Data"]
SUMMER["SUMMER_WINTER_GAMES<br/>48 games<br/>Named game instances"]
TABS["SUMMER_WINTER_TABS<br/>714 entries<br/>Season-specific tabs"]
SEASONAL["SEASONAL_GAME_LABELS<br/>119 labels"]
SPECIAL["Sport-Specific Keys"]
TENNIS["TENNIS_KEYS<br/>109 entries"]
CYCLING["CYCLING_TEMPLATES<br/>81 templates"]
TEAM_SPORT["TEAM_SPORT_LABELS<br/>31 labels"]
BASE["SPORT_KEY_RECORDS_BASE<br/>229 base sport entries"]
VARIANTS["SPORT_KEY_RECORDS_VARIANTS<br/>206 variant entries"]
RECORDS["SPORT_KEY_RECORDS<br/>433 total entries"]
LABEL["SPORTS_KEYS_FOR_LABEL<br/>433 entries<br/>Pattern: '{sport} {type}'"]
JOBS["SPORTS_KEYS_FOR_JOBS<br/>433 entries<br/>Pattern: '{sport} players'"]
OLYMPIC["SPORTS_KEYS_FOR_OLYMPIC<br/>432 entries<br/>Pattern: 'Olympic {sport}'"]
TEAM["SPORTS_KEYS_FOR_TEAM<br/>431 entries<br/>Pattern: '{sport} teams/clubs'"]
FEMALE["FEMALE_JOBS_SPORTS<br/>433 entries<br/>Gender-specific jobs"]
CHAMP["CHAMPION_LABELS<br/>433 entries<br/>Pattern: '{sport} champions'"]
WORLD["WORLD_CHAMPION_LABELS<br/>431 entries<br/>Pattern: 'world {sport} champions'"]
TEAMS["sub_teams_new<br/>7,832 entries<br/>Club/team translations"]
JOBVAR["SPORT_JOB_VARIANTS<br/>571 entries<br/>Player type variants"]
PLAYERS["PLAYERS_TO_MEN_WOMENS_JOBS<br/>1,345 entries<br/>Player gender mappings"]

RECORDS --> LABEL
RECORDS --> JOBS
RECORDS --> OLYMPIC
RECORDS --> TEAM
RECORDS --> FEMALE
RECORDS --> CHAMP
RECORDS --> WORLD
RECORDS --> JOBVAR

subgraph subGraph3 ["Team and Club Data"]
    TEAMS
    JOBVAR
    PLAYERS
end

subgraph subGraph2 ["Competition Labels"]
    CHAMP
    WORLD
end

subgraph subGraph1 ["Context-Specific Variants"]
    LABEL
    JOBS
    OLYMPIC
    TEAM
    FEMALE
end

subgraph subGraph0 ["Core Sports Data"]
    BASE
    VARIANTS
    RECORDS
    BASE --> RECORDS
    VARIANTS --> RECORDS
end

subgraph subGraph4 ["Sport-Specific Data"]
    OLYMPICS
    SUMMER
    TABS
    SEASONAL
    SPECIAL
    TENNIS
    CYCLING
    TEAM_SPORT
    OLYMPICS --> SUMMER
    OLYMPICS --> TABS
    OLYMPICS --> SEASONAL
    SPECIAL --> TENNIS
    SPECIAL --> CYCLING
    SPECIAL --> TEAM_SPORT
end
```

**Sources:** [_work_files/data_len.json L54-L62](../_work_files/data_len.json#L54-L62), [_work_files/data_len.json L7](../_work_files/data_len.json#L7), [_work_files/data_len.json L76-L80](../_work_files/data_len.json#L76-L80), [ArWikiCats/translations/__init__.py L56-L64](../ArWikiCats/translations/__init__.py#L56-L64)

---

## SPORT_KEY_RECORDS Structure

The `SPORT_KEY_RECORDS` dictionary contains 433 sport type entries, each mapping English sport names to Arabic translations with gender-specific forms. This is the foundational data structure for all sport-related translations.

### Data Entry Format

Each sport entry in `SPORT_KEY_RECORDS` typically contains:

| Field | Type | Purpose | Example |
| --- | --- | --- | --- |
| English Key | `str` | Lowercase sport name | `"football"`, `"basketball"` |
| Arabic Label | `str` | Base Arabic translation | `"كرة قدم"`, `"كرة سلة"` |
| Male Form | `str` | Masculine grammatical form | `"كرة قدم"` |
| Female Form | `str` | Feminine grammatical form | `"كرة قدم"` |
| Plural Forms | `str` | Plural variations | `"كرة القدم"` |

### Data Organization

```mermaid
flowchart TD

BASE_FILE["Sport_key.py<br/>SPORT_KEY_RECORDS_BASE<br/>229 entries"]
VAR_FILE["Sport_key.py<br/>SPORT_KEY_RECORDS_VARIANTS<br/>206 entries"]
COMBINED["SPORT_KEY_RECORDS<br/>433 total entries<br/>Merged base + variants"]
EXPORT1["SPORTS_KEYS_FOR_LABEL<br/>Label patterns"]
EXPORT2["SPORTS_KEYS_FOR_JOBS<br/>Job patterns"]
EXPORT3["SPORTS_KEYS_FOR_OLYMPIC<br/>Olympic patterns"]
EXPORT4["SPORTS_KEYS_FOR_TEAM<br/>Team patterns"]
EXPORT5["FEMALE_JOBS_SPORTS<br/>Female job patterns"]
RESOLVER["Sports Resolvers<br/>resolve_sports_main"]
MATCHER["match_sport_key<br/>Lookup utility"]

BASE_FILE --> COMBINED
VAR_FILE --> COMBINED
COMBINED --> EXPORT1
COMBINED --> EXPORT2
COMBINED --> EXPORT3
COMBINED --> EXPORT4
COMBINED --> EXPORT5
EXPORT1 --> RESOLVER
EXPORT2 --> RESOLVER
EXPORT3 --> RESOLVER
EXPORT4 --> RESOLVER
EXPORT5 --> RESOLVER
COMBINED --> MATCHER

subgraph subGraph3 ["Usage in Resolvers"]
    RESOLVER
    MATCHER
end

subgraph subGraph2 ["Export Paths"]
    EXPORT1
    EXPORT2
    EXPORT3
    EXPORT4
    EXPORT5
end

subgraph subGraph1 ["Combined Dictionary"]
    COMBINED
end

subgraph subGraph0 ["Source Data"]
    BASE_FILE
    VAR_FILE
end
```

**Sources:** [_work_files/data_len.json L54](../_work_files/data_len.json#L54), [_work_files/data_len.json L76](../_work_files/data_len.json#L76), [_work_files/data_len.json L80](../_work_files/data_len.json#L80), [ArWikiCats/translations/__init__.py L57-L63](../ArWikiCats/translations/__init__.py#L57-L63)

---

## Context-Specific Sport Variants

Sports data is exported in five specialized forms to match different category patterns. Each variant is optimized for specific English Wikipedia category structures.

### Variant Purposes

| Variant Name | Entry Count | Pattern Examples | Arabic Pattern |
| --- | --- | --- | --- |
| `SPORTS_KEYS_FOR_LABEL` | 433 | "American football films""Basketball culture" | `"{sport_ar} {type_ar}"` |
| `SPORTS_KEYS_FOR_JOBS` | 433 | "Football players""Basketball coaches" | `"لاعبو {sport_ar}"` |
| `SPORTS_KEYS_FOR_OLYMPIC` | 432 | "Olympic footballers""Olympic athletes" | `"{sport_ar} أولمبيون"` |
| `SPORTS_KEYS_FOR_TEAM` | 431 | "Football teams""Basketball clubs" | `"فرق {sport_ar}"` |
| `FEMALE_JOBS_SPORTS` | 433 | "Women footballers""Female basketball players" | `"لاعبات {sport_ar}"` |

### Translation Pattern Examples

```mermaid
flowchart TD

IN1["'american football players'"]
IN2["'olympic basketball athletes'"]
IN3["'football teams in spain'"]
IN4["'women's tennis players'"]
IN5["'football culture'"]
SEL1["SPORTS_KEYS_FOR_JOBS<br/>Player pattern detected"]
SEL2["SPORTS_KEYS_FOR_OLYMPIC<br/>Olympic keyword detected"]
SEL3["SPORTS_KEYS_FOR_TEAM<br/>Teams keyword detected"]
SEL4["FEMALE_JOBS_SPORTS<br/>Women's keyword detected"]
SEL5["SPORTS_KEYS_FOR_LABEL<br/>Default label pattern"]
LOOKUP1["Key: 'american football'<br/>Returns: كرة قدم أمريكية"]
LOOKUP2["Key: 'basketball'<br/>Returns: كرة سلة"]
LOOKUP3["Key: 'football'<br/>Returns: كرة قدم"]
LOOKUP4["Key: 'tennis'<br/>Returns: كرة مضرب"]
LOOKUP5["Key: 'football'<br/>Returns: كرة قدم"]
OUT1["'لاعبو كرة قدم أمريكية'"]
OUT2["'رياضيو كرة سلة أولمبيون'"]
OUT3["'فرق كرة قدم في إسبانيا'"]
OUT4["'لاعبات كرة مضرب'"]
OUT5["'ثقافة كرة قدم'"]

IN1 --> SEL1
SEL1 --> LOOKUP1
LOOKUP1 --> OUT1
IN2 --> SEL2
SEL2 --> LOOKUP2
LOOKUP2 --> OUT2
IN3 --> SEL3
SEL3 --> LOOKUP3
LOOKUP3 --> OUT3
IN4 --> SEL4
SEL4 --> LOOKUP4
LOOKUP4 --> OUT4
IN5 --> SEL5
SEL5 --> LOOKUP5
LOOKUP5 --> OUT5

subgraph subGraph3 ["Arabic Output"]
    OUT1
    OUT2
    OUT3
    OUT4
    OUT5
end

subgraph subGraph2 ["Sport Lookup"]
    LOOKUP1
    LOOKUP2
    LOOKUP3
    LOOKUP4
    LOOKUP5
end

subgraph subGraph1 ["Variant Selection"]
    SEL1
    SEL2
    SEL3
    SEL4
    SEL5
end

subgraph subGraph0 ["Input Category Patterns"]
    IN1
    IN2
    IN3
    IN4
    IN5
end
```

**Sources:** [_work_files/data_len.json L54-L62](../_work_files/data_len.json#L54-L62), [ArWikiCats/translations/__init__.py L57-L63](../ArWikiCats/translations/__init__.py#L57-L63)

---

## Team and Club Data (sub_teams_new)

The `sub_teams_new` dictionary contains 7,832 entries mapping English team and club names to Arabic translations. This is the largest sports-related dataset, covering professional teams, national teams, Olympic teams, and club organizations across all sports.

### Data Structure

```mermaid
flowchart TD

STRUCTURE["7,832 total entries<br/>Key: English team/club name<br/>Value: Arabic translation"]
PROF["Professional Teams<br/>'manchester united'<br/>'los angeles lakers'"]
NAT["National Teams<br/>'spain national football team'<br/>'usa basketball team'"]
OLYMPIC["Olympic Teams<br/>'great britain olympic team'<br/>'team usa'"]
CLUB["Club Organizations<br/>'real madrid'<br/>'bayern munich'"]
FOOTBALL["Football/Soccer Teams<br/>~4,000+ entries<br/>Largest category"]
BASKETBALL["Basketball Teams<br/>~800+ entries<br/>NBA, international leagues"]
BASEBALL["Baseball Teams<br/>~500+ entries<br/>MLB, minor leagues"]
HOCKEY["Ice Hockey Teams<br/>~400+ entries<br/>NHL, international"]
OTHER["Other Sports<br/>~2,000+ entries<br/>Rugby, cricket, etc."]

STRUCTURE --> PROF
STRUCTURE --> NAT
STRUCTURE --> OLYMPIC
STRUCTURE --> CLUB
PROF --> FOOTBALL
PROF --> BASKETBALL
PROF --> BASEBALL
PROF --> HOCKEY
PROF --> OTHER

subgraph subGraph2 ["Coverage by Sport Type"]
    FOOTBALL
    BASKETBALL
    BASEBALL
    HOCKEY
    OTHER
end

subgraph subGraph1 ["Entry Categories"]
    PROF
    NAT
    OLYMPIC
    CLUB
end

subgraph subGraph0 ["sub_teams_new Dictionary"]
    STRUCTURE
end
```

### Usage Pattern

The `sub_teams_new` data is primarily used in category patterns like:

* "Players of [team name]" → `"لاعبو [arabic_team_name]"`
* "[team name] seasons" → `"مواسم [arabic_team_name]"`
* "[team name] matches" → `"مباريات [arabic_team_name]"`

**Sources:** [_work_files/data_len.json L7](../_work_files/data_len.json#L7), [ArWikiCats/translations/__init__.py L64](../ArWikiCats/translations/__init__.py#L64)

---

## Sport Job Variants

The sports job system includes specialized data structures for translating athlete categories with proper gender agreement and positional specificity.

### SPORT_JOB_VARIANTS Structure

The `SPORT_JOB_VARIANTS` dictionary (571 entries) maps English player type patterns to Arabic equivalents with gender forms.

| Data Structure | Entries | Purpose | Example Mapping |
| --- | --- | --- | --- |
| `SPORT_JOB_VARIANTS` | 571 | Sport-specific job types | `"footballers"` → `{"male": "لاعبو كرة قدم", "female": "لاعبات كرة قدم"}` |
| `PLAYERS_TO_MEN_WOMENS_JOBS` | 1,345 | Player to job mappings | `"football players"` → `"footballers"` |
| `BASE_PLAYER_VARIANTS` | 435 | Base player patterns | Generic player translations |
| `FOOTBALL_KEYS_PLAYERS` | 46 | Football-specific players | Position-specific football roles |

### Integration with Jobs Data

```mermaid
flowchart TD

SPORTVAR["SPORT_JOB_VARIANTS<br/>571 entries"]
PLAYERS["PLAYERS_TO_MEN_WOMENS_JOBS<br/>1,345 entries"]
BASE["BASE_PLAYER_VARIANTS<br/>435 entries"]
MENS["jobs_mens_data<br/>4,015 entries<br/>From Jobs module"]
WOMENS["jobs_womens_data<br/>2,954 entries<br/>From Jobs module"]
INPUT["Category Input<br/>'american football players'"]
LOOKUP1["Check SPORT_JOB_VARIANTS"]
LOOKUP2["Check PLAYERS_TO_MEN_WOMENS_JOBS"]
LOOKUP3["Check jobs_mens_data"]
OUTPUT["Arabic Output<br/>'لاعبو كرة قدم أمريكية'"]

SPORTVAR --> MENS
SPORTVAR --> WOMENS
SPORTVAR --> LOOKUP1
PLAYERS --> LOOKUP2
MENS --> LOOKUP3

subgraph subGraph2 ["Resolution Flow"]
    INPUT
    LOOKUP1
    LOOKUP2
    LOOKUP3
    OUTPUT
    INPUT --> LOOKUP1
    LOOKUP1 --> LOOKUP2
    LOOKUP2 --> LOOKUP3
    LOOKUP3 --> OUTPUT
end

subgraph subGraph1 ["General Jobs Data"]
    MENS
    WOMENS
end

subgraph subGraph0 ["Sports Job Data"]
    SPORTVAR
    PLAYERS
    BASE
    PLAYERS --> SPORTVAR
    BASE --> SPORTVAR
end
```

**Sources:** [_work_files/data_len.json L45-L47](../_work_files/data_len.json#L45-L47), [_work_files/data_len.json L53](../_work_files/data_len.json#L53), [_work_files/data_len.json L24](../_work_files/data_len.json#L24), [_work_files/data_len.json L117](../_work_files/data_len.json#L117), [ArWikiCats/translations/__init__.py L8](../ArWikiCats/translations/__init__.py#L8)

---

## Olympic and Games Data

The Olympic-related data structures handle temporal and seasonal aspects of Olympic Games categories.

### Data Organization

| Data Structure | Entries | Content Type | Example Usage |
| --- | --- | --- | --- |
| `SUMMER_WINTER_GAMES` | 48 | Named games instances | `"2020 Summer Olympics"` → `"أولمبياد 2020 الصيفي"` |
| `SUMMER_WINTER_TABS` | 714 | Season-specific patterns | `"summer olympics"` → seasonal variants |
| `SEASONAL_GAME_LABELS` | 119 | Game label patterns | Generic seasonal patterns |
| `SPORTS_KEYS_FOR_OLYMPIC` | 432 | Sport + Olympic patterns | `"olympic football"` → `"كرة قدم أولمبية"` |

### Olympic Pattern Resolution

```mermaid
flowchart TD

P1["'footballers at 2020 summer olympics'"]
P2["'olympic basketball players'"]
P3["'summer olympics sports'"]
P4["'2016 olympic athletes'"]
L1["Extract year: 2020"]
L2["SUMMER_WINTER_GAMES<br/>Find named game"]
L3["SPORTS_KEYS_FOR_OLYMPIC<br/>Find sport translation"]
L4["SEASONAL_GAME_LABELS<br/>Find generic pattern"]
O1["'لاعبو كرة قدم في<br/>أولمبياد 2020 الصيفي'"]
O2["'لاعبو كرة سلة أولمبيون'"]
O3["'رياضات أولمبياد صيفي'"]
O4["'رياضيو أولمبياد 2016'"]

P1 --> L1
L3 --> O1
P2 --> L3
L3 --> O2
P3 --> L2
L4 --> O3
P4 --> L1
L2 --> O4

subgraph subGraph2 ["Arabic Output"]
    O1
    O2
    O3
    O4
end

subgraph subGraph1 ["Data Lookup Sequence"]
    L1
    L2
    L3
    L4
    L1 --> L2
    L2 --> L3
    L2 --> L4
    L1 --> L2
end

subgraph subGraph0 ["Olympic Category Patterns"]
    P1
    P2
    P3
    P4
end
```

**Sources:** [_work_files/data_len.json L41](../_work_files/data_len.json#L41), [_work_files/data_len.json L94](../_work_files/data_len.json#L94), [_work_files/data_len.json L114](../_work_files/data_len.json#L114), [_work_files/data_len.json L60](../_work_files/data_len.json#L60), [ArWikiCats/translations/__init__.py L56](../ArWikiCats/translations/__init__.py#L56)

---

## Sport-Specific Data Structures

Several sports have dedicated data structures for handling specialized vocabulary and patterns.

### Tennis Data (TENNIS_KEYS)

Contains 109 entries for tennis-specific terms including:

* Tournament names (Grand Slams, ATP/WTA events)
* Tennis equipment and facilities
* Tennis-specific player roles and categories

### Cycling Data

| Structure | Entries | Purpose |
| --- | --- | --- |
| `CYCLING_TEMPLATES` | 81 | Cycling category templates |
| `cycling_variants` | 27 | Cycling-related variants |

Covers:

* Cycling race types (road, track, mountain bike)
* Cycling team classifications
* Professional cycling competition formats

### Other Sport-Specific Data

| Structure | Entries | Coverage |
| --- | --- | --- |
| `TEAM_SPORT_LABELS` | 31 | Team sport generic labels |
| `sport_variants` | 35 | General sport variants |
| `BOXING_LABELS` | 42 | Boxing-specific terms |
| `SKATING_LABELS` | 4 | Skating categories |
| `STATIC_PLAYER_LABELS` | 4 | Fixed player labels |

**Sources:** [_work_files/data_len.json L97](../_work_files/data_len.json#L97), [_work_files/data_len.json L103](../_work_files/data_len.json#L103), [_work_files/data_len.json L130](../_work_files/data_len.json#L130), [_work_files/data_len.json L125](../_work_files/data_len.json#L125), [_work_files/data_len.json L143](../_work_files/data_len.json#L143), [_work_files/data_len.json L118](../_work_files/data_len.json#L118), [_work_files/data_len.json L149](../_work_files/data_len.json#L149), [_work_files/data_len.json L150](../_work_files/data_len.json#L150)

---

## Champion and Competition Labels

Two specialized dictionaries provide translations for championship and competition-related categories.

### Data Structures

```mermaid
flowchart TD

CHAMP["CHAMPION_LABELS<br/>433 entries<br/>Format: '{sport} champions'"]
WORLD["WORLD_CHAMPION_LABELS<br/>431 entries<br/>Format: 'world {sport} champions'"]
EX1["Input: 'football champions'<br/>Output: 'أبطال كرة قدم'"]
EX2["Input: 'world boxing champions'<br/>Output: 'أبطال العالم في الملاكمة'"]
EX3["Input: 'olympic champions'<br/>Output: 'أبطال أولمبيون'"]
SPORT["SPORT_KEY_RECORDS<br/>433 base sports<br/>Provides sport names"]

SPORT --> CHAMP
SPORT --> WORLD
CHAMP --> EX1
WORLD --> EX2
CHAMP --> EX3

subgraph subGraph2 ["Source Data"]
    SPORT
end

subgraph subGraph1 ["Pattern Examples"]
    EX1
    EX2
    EX3
end

subgraph subGraph0 ["Competition Label Data"]
    CHAMP
    WORLD
end
```

### Usage Context

These dictionaries handle categories like:

* `"[Sport] champions"` → Simple championship categories
* `"World [sport] champions"` → World-level competitions
* `"[Nationality] [sport] champions"` → Country-specific champions
* `"Olympic [sport] champions"` → Olympic medal categories

**Sources:** [_work_files/data_len.json L57](../_work_files/data_len.json#L57), [_work_files/data_len.json L62](../_work_files/data_len.json#L62)

---

## Data Access and Utilities

The sports data module provides utility functions for accessing and matching sport keys.

### Key Access Functions

```mermaid
flowchart TD

INIT["ArWikiCats/translations/init.py"]
RECORDS["SPORT_KEY_RECORDS"]
BASE["SPORT_KEY_RECORDS_BASE"]
LABEL["SPORTS_KEYS_FOR_LABEL"]
JOBS["SPORTS_KEYS_FOR_JOBS"]
TEAM["SPORTS_KEYS_FOR_TEAM"]
SUB["sub_teams_new"]
MATCH["match_sport_key<br/>Sport key lookup utility"]
RESOLVERS["Sports Resolvers<br/>new_resolvers/"]
FORMATTERS["Sport Formatters<br/>translations_formats/"]
JOBS_MODULE["Jobs Module<br/>translations/jobs/"]

INIT --> RECORDS
INIT --> BASE
INIT --> LABEL
INIT --> JOBS
INIT --> TEAM
INIT --> SUB
INIT --> MATCH
RECORDS --> RESOLVERS
LABEL --> RESOLVERS
JOBS --> RESOLVERS
TEAM --> RESOLVERS
SUB --> RESOLVERS
MATCH --> RESOLVERS
RECORDS --> FORMATTERS
RECORDS --> JOBS_MODULE

subgraph subGraph3 ["Consumer Modules"]
    RESOLVERS
    FORMATTERS
    JOBS_MODULE
end

subgraph subGraph2 ["Utility Functions"]
    MATCH
end

subgraph subGraph1 ["Exported Sports Data"]
    RECORDS
    BASE
    LABEL
    JOBS
    TEAM
    SUB
end

subgraph subGraph0 ["Import Module"]
    INIT
end
```

### match_sport_key Function

Located at [ArWikiCats/translations/utils/match_sport_keys.py](../ArWikiCats/translations/utils/match_sport_keys.py)

 this utility provides case-insensitive lookups for sport keys with fallback logic.

**Functionality:**

* Case-insensitive sport name matching
* Handles alternative sport name spellings
* Returns structured sport data with gender forms
* Used by sports resolvers for pattern matching

**Sources:** [ArWikiCats/translations/__init__.py L78](../ArWikiCats/translations/__init__.py#L78), [ArWikiCats/translations/__init__.py L57-L64](../ArWikiCats/translations/__init__.py#L57-L64)

---

## Data Maintenance and Tracking

Sports data is tracked in the metadata registry for size monitoring and consistency validation.

### Tracked Metrics in data_len.json

| Metric Name | Value | Description |
| --- | --- | --- |
| `sub_teams_new` | 7,832 | Total team/club entries |
| `SPORT_KEY_RECORDS` | 433 | Core sport type entries |
| `SPORT_KEY_RECORDS_BASE` | 229 | Base sport entries |
| `SPORT_KEY_RECORDS_VARIANTS` | 206 | Variant sport entries |
| `SPORT_JOB_VARIANTS` | 571 | Sport job type variants |
| `PLAYERS_TO_MEN_WOMENS_JOBS` | 1,345 | Player mapping entries |
| `SUMMER_WINTER_TABS` | 714 | Olympic season tabs |
| `SPORTS_KEYS_FOR_LABEL` | 433 | Label variant entries |
| `SPORTS_KEYS_FOR_JOBS` | 433 | Job variant entries |
| `SPORTS_KEYS_FOR_OLYMPIC` | 432 | Olympic variant entries |
| `SPORTS_KEYS_FOR_TEAM` | 431 | Team variant entries |
| `CHAMPION_LABELS` | 433 | Champion pattern entries |
| `WORLD_CHAMPION_LABELS` | 431 | World champion entries |
| `FEMALE_JOBS_SPORTS` | 433 | Female job sport entries |

### Validation

The data_len.json registry enables:

* Size change tracking across updates
* Consistency validation between related datasets
* Regression detection in test suites
* Dataset completeness monitoring

**Sources:** [_work_files/data_len.json L7](../_work_files/data_len.json#L7), [_work_files/data_len.json L54-L62](../_work_files/data_len.json#L54-L62), [_work_files/data_len.json L76-L80](../_work_files/data_len.json#L76-L80), [_work_files/data_len.json L24](../_work_files/data_len.json#L24), [_work_files/data_len.json L41](../_work_files/data_len.json#L41), [_work_files/data_len.json L45-L47](../_work_files/data_len.json#L45-L47)

---

## Example Category Translations

The following table demonstrates how sports data enables category translation across various patterns:

| English Category | Data Used | Arabic Translation |
| --- | --- | --- |
| `"American football players"` | SPORTS_KEYS_FOR_JOBS | `"لاعبو كرة قدم أمريكية"` |
| `"Olympic basketball athletes"` | SPORTS_KEYS_FOR_OLYMPIC | `"رياضيو كرة سلة أولمبيون"` |
| `"Real Madrid players"` | sub_teams_new | `"لاعبو ريال مدريد"` |
| `"Women's tennis players"` | FEMALE_JOBS_SPORTS | `"لاعبات كرة مضرب"` |
| `"Football teams in Spain"` | SPORTS_KEYS_FOR_TEAM | `"فرق كرة قدم في إسبانيا"` |
| `"World boxing champions"` | WORLD_CHAMPION_LABELS | `"أبطال العالم في الملاكمة"` |
| `"2020 Summer Olympics"` | SUMMER_WINTER_GAMES | `"أولمبياد 2020 الصيفي"` |
| `"Defunct football clubs"` | sub_teams_new + SPORTS_KEYS_FOR_TEAM | `"أندية كرة قدم سابقة"` |

**Sources:** [tests/event_lists/test_defunct.py L12-L65](../tests/event_lists/test_defunct.py#L12-L65)
