docstr: Creates a word vector from a text. Utility method.
docstr_tok: ["Creates","a","word","vector","from","a","text",".","Utility","method","."]
code: def _create_word_vector(self, document: Text) -> np.ndarray:
      """Creates a word vector from a text. Utility method."""
      encoded_ids = self.model.encode_ids(document)
      if encoded_ids:
          return self.model.vectors[encoded_ids[0]]
  
      return np.zeros((self.component_config["dim"],), dtype=np.float32)
  
imports: import numpy
  import logging
  from bpemb import BPEmb
  from typing import Any, Text, Dict, List, Type
  from rasa.engine.recipes.default_recipe import DefaultV1Recipe
  from rasa.engine.graph import ExecutionContext, GraphComponent
  from rasa.engine.storage.resource import Resource
  from rasa.engine.storage.storage import ModelStorage
  from rasa.nlu.featurizers.dense_featurizer.dense_featurizer import DenseFeaturizer
  from rasa.nlu.tokenizers.tokenizer import Tokenizer
  from rasa.shared.nlu.training_data.training_data import TrainingData
  from rasa.shared.nlu.training_data.features import Features
  from rasa.shared.nlu.training_data.message import Message
  from rasa.nlu.constants import DENSE_FEATURIZABLE_ATTRIBUTES, FEATURIZER_CLASS_ALIAS
  from rasa.shared.nlu.constants import TEXT, TEXT_TOKENS, FEATURE_TYPE_SENTENCE, FEATURE_TYPE_SEQUENCE
label_desc: Use image node_id 8 for calling the BytePairFeaturizer obj's underlying member method code with example usage: obj._create_word_vector(document) and returns: np, self