class_docstr: Creates a sequence of token counts features based on sklearn's `CountVectorizer`.
  
  All tokens which consist only of digits (e.g. 123 and 99
  but not ab12d) will be represented by a single feature.
  
  Set `analyzer` to 'char_wb'
  to use the idea of Subword Semantic Hashing
  from https://arxiv.org/abs/1810.07150.
class_docstr_tok: ["Creates","a","sequence","of","token","counts","features","based","on","sklearn","'s","`","CountVectorizer","`",".","All","tokens","which","consist","only","of","digits","(","e.g",".","123","and","99","but","not","ab12d",")","will","be","represented","by","a","single","feature",".","Set","`","analyzer","`","to","'char_wb'","to","use","the","idea","of","Subword","Semantic","Hashing","from","https",":","\/\/arxiv.org\/abs\/1810.07150","."]
docstr: Replace OOV words with OOV token.
code: def _replace_with_oov_token(
      self, tokens: List[Text], attribute: Text
  ) -> List[Text]:
      """Replace OOV words with OOV token."""
      if self.OOV_token and self.analyzer == "word":
          attribute_vocab = self._get_attribute_vocabulary(attribute)
          if (
              attribute_vocab is not None
              and self.OOV_token in attribute_vocab
          ):
              # CountVectorizer is trained, process for prediction
              attribute_vocabulary_tokens = set(attribute_vocab.keys())
              tokens = [
                  t
                  if t in attribute_vocabulary_tokens
                  else self.OOV_token
                  for t in tokens
              ]
          elif self.OOV_words:
              # CountVectorizer is not trained, process for train
              tokens = [
                  self.OOV_token if t in self.OOV_words else t
                  for t in tokens
              ]
  
      return tokens
  
imports: from __future__ import annotations
  import logging
  import re
  import scipy.sparse
  from typing import Any, Dict, List, Optional, Text, Tuple, Set, Type
  from rasa.nlu.tokenizers.tokenizer import Tokenizer
  import rasa.shared.utils.io
  from rasa.engine.graph import GraphComponent, ExecutionContext
  from rasa.engine.recipes.default_recipe import DefaultV1Recipe
  from rasa.engine.storage.resource import Resource
  from rasa.engine.storage.storage import ModelStorage
  from rasa.nlu.featurizers.sparse_featurizer.sparse_featurizer import SparseFeaturizer
  from rasa.nlu.utils.spacy_utils import SpacyModel
  from rasa.shared.constants import DOCS_URL_COMPONENTS
  import rasa.utils.io
  from sklearn.feature_extraction.text import CountVectorizer
  from rasa.shared.nlu.training_data.training_data import TrainingData
  from rasa.shared.nlu.training_data.message import Message
  from rasa.shared.exceptions import RasaException, FileIOException
  from rasa.nlu.constants import TOKENS_NAMES, MESSAGE_ATTRIBUTES, DENSE_FEATURIZABLE_ATTRIBUTES
  from rasa.shared.nlu.constants import TEXT, INTENT, INTENT_RESPONSE_KEY, ACTION_NAME
label_desc: Use image node_id 13 for calling the CountVectorsFeaturizer obj's underlying member method code with example usage: obj._replace_with_oov_token(tokens, attribute) and returns: tokens