class_docstr: analogous to fairseq.data.IndexedCachedDataset
code: def parse_multilingual(
      self,
      corpora,
      reverse_order,
      append_eos,
      embed_bytes,
      prepend_language_id,
      already_numberized,
  ):
      word_array_list = []
      word_offsets = [0]
      char_array_list = []
      char_offsets = [0]
      sizes = []
      for corpus_config in corpora:
          prepend_inds = []
          append_inds = []
          if append_eos:
              append_inds.append(corpus_config.dict.eos_index)
          if corpus_config.dialect_id is not None:
              if prepend_language_id:
                  prepend_inds.append(corpus_config.dialect_id)
              else:
                  append_inds.append(corpus_config.dialect_id)
          with PathManager.open(corpus_config.data_file, "r") as f:
              for line in f:
                  words, word_inds = self._sent_to_word_ids(
                      sent=line,
                      word_dict=corpus_config.dict,
                      reverse_order=reverse_order,
                      prepend_inds=prepend_inds,
                      append_inds=append_inds,
                  )
  
                  word_array_list.append(
                      np.array(word_inds, dtype=np.int32)
                  )
                  word_offsets.append(word_offsets[-1] + len(word_inds))
                  sizes.append(len(word_inds))
  
                  for word in words:
                      char_inds = self._word_to_char_ids(
                          word=word,
                          word_dict=corpus_config.dict,
                          char_dict=corpus_config.char_dict,
                          embed_bytes=embed_bytes,
                      )
                      char_array_list.append(
                          np.array(char_inds, dtype=np.int32)
                      )
                      char_offsets.append(
                          char_offsets[-1] + len(char_inds)
                      )
                  if append_eos:
                      char_inds = [corpus_config.char_dict.eos_index]
                      char_array_list.append(
                          np.array(char_inds, dtype=np.int32)
                      )
                      char_offsets.append(
                          char_offsets[-1] + len(char_inds)
                      )
  
      self.word_buffer = np.concatenate(word_array_list)
      self.word_offsets = np.array(word_offsets, dtype=np.int32)
      self.char_buffer = np.concatenate(char_array_list)
      self.char_offsets = np.array(char_offsets, dtype=np.int32)
      self.sizes = np.array(sizes, dtype=np.int32)
  
      del (
          word_array_list,
          word_offsets,
          char_array_list,
          char_offsets,
          sizes,
      )
  
imports: from typing import Any, Dict
  import numpy
  import torch
  from fairseq import data, tokenizer
  from fvcore.common.file_io import PathManager
  from pytorch_translate import vocab_constants
  from pytorch_translate.data.dictionary import TAGS
label_desc: Use image node_id 11 for calling the InMemoryNumpyWordCharDataset obj's underlying member method code with example usage: obj.parse_multilingual(corpora, reverse_order, append_eos, embed_bytes, prepend_language_id, already_numberized) without return types