class_docstr: analogous to fairseq.data.IndexedCachedDataset
docstr: Extract the word ids for words associated with the input sentence.
docstr_tok: ["Extract","the","word","ids","for","words","associated","with","the","input","sentence","."]
code: def _sent_to_word_ids(
      self, sent, word_dict, reverse_order, prepend_inds, append_inds
  ):
      """
      Extract the word ids for words associated with the input sentence.
      """
      words = tokenizer.tokenize_line(sent)
      if reverse_order:
          words.reverse()
      word_inds = [word_dict.index(w) for w in words]
      word_inds = prepend_inds + word_inds + append_inds
      return words, word_inds
  
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 8 for calling the InMemoryNumpyWordCharDataset obj's underlying member method code with example usage: obj._sent_to_word_ids(sent, word_dict, reverse_order, prepend_inds, append_inds) and returns: words,  word_inds