class_docstr: The G2P model evaluation wrapper
  
  Arguments
  ---------
  hparams: dict
      the dictionary from a parsed hyperparameter file
  device: str
      the device identifier
  model_state: dict
      a pre-loaded model state for a "warm start" if applicable
      - could be useful if hyperparameters have changed, but
      the same model can be reused from one run to the next
docstr: Splits the provided grapheme sequence into words
  
  Arguments
  ---------
  graphemes: torch.Tensor
      an encoded sequence of phonemes
  
  Returns
  -------
  graphemes: generator
      a generator representing a sequence of words
docstr_tok: ["Splits","the","provided","grapheme","sequence","into","words","Arguments","--","--","--","--","-","graphemes",":","torch.Tensor","an","encoded","sequence","of","phonemes","Returns","--","--","--","-","graphemes",":","generator","a","generator","representing","a","sequence","of","words"]
code: def _split_words_seq(self, graphemes, length):
      """Splits the provided grapheme sequence into words
  
      Arguments
      ---------
      graphemes: torch.Tensor
          an encoded sequence of phonemes
  
      Returns
      -------
      graphemes: generator
          a generator representing a sequence of words
      """
      space_index = self.hparams.graphemes.index(" ")
      (word_boundaries,) = torch.where(graphemes == space_index)
      last_word_boundary = 0
      for word_boundary in word_boundaries:
          yield self._add_delimiters(
              graphemes[last_word_boundary + 1 : word_boundary]
          )
          last_word_boundary = word_boundary
      char_length = math.ceil(len(graphemes) * length)
      if last_word_boundary < char_length:
          yield self._add_delimiters(
              graphemes[last_word_boundary + 1 : char_length]
          )
  
imports: from hyperpyyaml import load_hyperpyyaml
  from speechbrain.dataio.batch import PaddedBatch
  from speechbrain.lobes.models.g2p.dataio import get_sequence_key
  from speechbrain.utils import hpopt
  from speechbrain.wordemb.util import expand_to_chars
  from train import dataio_prep, load_dependencies
  from types import SimpleNamespace
  from tqdm.auto import tqdm
  import math
  import itertools
  import speechbrain
  import torch
  import sys
  import logging
label_desc: Use image node_id 11 for calling the G2PEvaluator obj's underlying member method code with example usage: obj._split_words_seq(graphemes, length) without return types