class_docstr: Text Classification Model.
  
  The model takes word embeddings, puts them into an RNN to obtain a text
  representation, and puts the text representation in the end into a linear
  layer to get the actual class label. The model can handle single and multi
  class data sets.
class_docstr_tok: ["Text","Classification","Model",".","The","model","takes","word","embeddings",",","puts","them","into","an","RNN","to","obtain","a","text","representation",",","and","puts","the","text","representation","in","the","end","into","a","linear","layer","to","get","the","actual","class","label",".","The","model","can","handle","single","and","multi","class","data","sets","."]
code: def _fetch_model(model_name) -> str:
      model_map = {}
      hu_path: str = (
          "https://nlp.informatik.hu-berlin.de/resources/models"
      )
  
      model_map["de-offensive-language"] = "/".join(
          [
              hu_path,
              "de-offensive-language",
              "germ-eval-2018-task-1-v0.8.pt",
          ]
      )
  
      # English sentiment models
      model_map["sentiment"] = "/".join(
          [
              hu_path,
              "sentiment-curated-distilbert",
              "sentiment-en-mix-distillbert_4.pt",
          ]
      )
      model_map["en-sentiment"] = "/".join(
          [
              hu_path,
              "sentiment-curated-distilbert",
              "sentiment-en-mix-distillbert_4.pt",
          ]
      )
      model_map["sentiment-fast"] = "/".join(
          [
              hu_path,
              "sentiment-curated-fasttext-rnn",
              "sentiment-en-mix-ft-rnn_v8.pt",
          ]
      )
  
      # Communicative Functions Model
      model_map["communicative-functions"] = "/".join(
          [hu_path, "comfunc", "communicative-functions.pt"]
      )
  
      cache_dir = Path("models")
      if model_name in model_map:
          model_name = cached_path(
              model_map[model_name], cache_dir=cache_dir
          )
  
      return model_name
  
file_path: flair/flair/models/text_classification_model.py
imports: import logging
  from pathlib import Path
  from typing import Any, Dict, List, Union
  import torch
  import flair.embeddings
  import flair.nn
  from flair.data import Sentence
  from flair.file_utils import cached_path
label_desc: Use image node_id 6 for calling the TextClassifier obj's underlying member method code with example usage: obj._fetch_model(model_name) and returns: model_name