class_docstr: WMT '14 machine-translation data, via TFDS.
class_docstr_tok: ["WMT","'14","machine-translation","data",",","via","TFDS","."]
docstr: Converts a record (typically np.array or pd.Series) into a JsonDict.
docstr_tok: ["Converts","a","record","(","typically","np.array","or","pd.Series",")","into","a","JsonDict","."]
code: def _record_to_dict(
      self,
      record: Mapping[str, Any],
      source_key: str,
      target_key: str,
  ) -> JsonDict:
      """Converts a record (typically np.array or pd.Series) into a JsonDict."""
      return {
          "source": six.ensure_text(record[source_key]),
          "source_language": source_key,
          "target": six.ensure_text(record[target_key]),
          "target_language": target_key,
      }
  
file_path: lit/lit_nlp/examples/datasets/mt.py
imports: from collections.abc import Mapping
  from typing import Any, Optional
  from lit_nlp.api import dataset
  from lit_nlp.api import types
  from lit_nlp.lib import file_cache
  import pandas
  import six
  import tensorflow_datasets
label_desc: Use image node_id 4 for calling the WMT14Data obj's underlying member method code with example usage: obj._record_to_dict(record, source_key, target_key) and returns: dict