def get_language_id(input_text: Text) -> Language:
  """Maps string language id into integer."""
  if input_text.lower() == "arabic":
    language_id = Language.ARABIC
  elif input_text.lower() == "finnish":
    language_id = Language.FINNISH
  elif input_text.lower() == "indonesian":
    language_id = Language.INDONESIAN
  elif input_text.lower() == "japanese":
    language_id = Language.JAPANESE
  elif input_text.lower() == "korean":
    language_id = Language.KOREAN
  elif input_text.lower() == "russian":
    language_id = Language.RUSSIAN
  elif input_text.lower() == "swahili":
    language_id = Language.SWAHILI
  elif input_text.lower() == "thai":
    language_id = Language.THAI
  elif input_text.lower() == "telugu":
    language_id = Language.TELUGU
  elif input_text.lower() == "bengali":
    language_id = Language.BENGALI
  elif input_text.lower() == "english":
    language_id = Language.ENGLISH
  else:
    raise ValueError("Invalid language <%s>" % input_text)
  return language_id
Maps string language id into integer.
language/canine/tydiqa/data.py