map_country()

audformat.utils.map_country(country)[source]

Map country to ISO 3166-1.

Parameters

country (str) – country string

Return type

str

Returns

mapped string

Raises

ValueError – if country is not supported

Examples

>>> map_country("gb")
'GBR'
>>> map_country("gbr")
'GBR'
>>> map_country("United Kingdom of Great Britain and Northern Ireland")
'GBR'