class_docstr: Tokenizer used for SacreBLEU calculation.
  
  Source: https://github.com/mjpost/sacrebleu/tree/master/sacrebleu/tokenizers
class_docstr_tok: ["Tokenizer","used","for","SacreBLEU","calculation",".","Source",":","https",":","\/\/github.com\/mjpost\/sacrebleu\/tree\/master\/sacrebleu\/tokenizers"]
docstr: Download necessary files for `flores` tokenization via `sentencepiece`.
docstr_tok: ["Download","necessary","files","for","`","flores","`","tokenization","via","`","sentencepiece","`","."]
code: def download_flores_file(
      model_name: Literal["flores101", "flores200"]
  ) -> None:
      """Download necessary files for `flores` tokenization via `sentencepiece`."""
      import ssl
      import urllib.request
  
      os.makedirs(_FLORES_LOCAL_DIR, exist_ok=True)
  
      model_url = _FLORES_MODELS_URL[model_name]
      file_path = os.path.join(
          _FLORES_LOCAL_DIR, model_url.split("/")[-1]
      )
  
      try:
          with open(
              file_path, "wb"
          ) as out_file, urllib.request.urlopen(
              model_url
          ) as remote_file:
              out_file.write(remote_file.read())
      except ssl.SSLError as e:
          raise OSError(
              f"Failed to download {model_name} model."
          ) from e
  
imports: import os
  import re
  import tempfile
  from functools import partial
  from typing import Any, ClassVar, Dict, Optional, Sequence, Type
  import torch
  from torch import Tensor, tensor
  from typing_extensions import Literal
  from torchmetrics.functional.text.bleu import _bleu_score_compute, _bleu_score_update
  from torchmetrics.utilities.imports import _IPADIC_AVAILABLE, _MECAB_AVAILABLE, _MECAB_KO_AVAILABLE, _MECAB_KO_DIC_AVAILABLE, _REGEX_AVAILABLE, _SENTENCEPIECE_AVAILABLE
label_desc: Use image node_id 18 for calling the _SacreBLEUTokenizer obj's underlying member method code with example usage: obj.download_flores_file(model_name) without return types