class_docstr: Featurizer that takes utterances and extracts ordered word cooccurrence
  features matrix from them
class_docstr_tok: ["Featurizer","that","takes","utterances","and","extracts","ordered","word","cooccurrence","features","matrix","from","them"]
docstr: Computes the cooccurrence feature matrix.
  
  Args:
      x (list of dict): list of utterances
  
  Returns:
      :class:`.scipy.sparse.csr_matrix`: A sparse matrix X of shape
      (len(x), len(self.word_pairs)) where X[i, j] = 1.0 if
      x[i][0] contains the words cooccurrence (w1, w2) and if
      self.word_pairs[(w1, w2)] = j
  
  Raises:
      NotTrained: when the vectorizer is not fitted
docstr_tok: ["Computes","the","cooccurrence","feature","matrix",".","Args",":","x","(","list","of","dict",")",":","list","of","utterances","Returns",":",":","class",":","`",".scipy.sparse.csr_matrix","`",":","A","sparse","matrix","X","of","shape","(","len","(","x",")",",","len","(","self.word_pairs",")",")","where","X","[","i",",","j","]","=","1.0","if","x","[","i","]","[","0","]","contains","the","words","cooccurrence","(","w1",",","w2",")","and","if","self.word_pairs","[","(","w1",",","w2",")","]","=","j","Raises",":","NotTrained",":","when","the","vectorizer","is","not","fitted"]
code: def transform(self, x):
      """Computes the cooccurrence feature matrix.
  
      Args:
          x (list of dict): list of utterances
  
      Returns:
          :class:`.scipy.sparse.csr_matrix`: A sparse matrix X of shape
          (len(x), len(self.word_pairs)) where X[i, j] = 1.0 if
          x[i][0] contains the words cooccurrence (w1, w2) and if
          self.word_pairs[(w1, w2)] = j
  
      Raises:
          NotTrained: when the vectorizer is not fitted
      """
      import numpy as np
      import scipy.sparse as sp
  
      preprocessed = self._preprocess(x)
      utterances = [
          self._enrich_utterance(utterance, builtin_ents, custom_ent)
          for utterance, builtin_ents, custom_ent in zip(*preprocessed)
      ]
  
      x_coo = sp.dok_matrix(
          (len(x), len(self.word_pairs)), dtype=np.int32
      )
      for i, u in enumerate(utterances):
          for p in self._extract_word_pairs(u):
              if p in self.word_pairs:
                  x_coo[i, self.word_pairs[p]] = 1
  
      return x_coo.tocsr()
  
imports: from __future__ import division, unicode_literals
  import json
  from builtins import str, zip
  from copy import deepcopy
  from pathlib import Path
  from future.utils import iteritems
  from snips_nlu.common.utils import json_string, fitted_required, replace_entities_with_placeholders, check_persisted_path
  from snips_nlu.constants import DATA, ENTITY, ENTITY_KIND, LANGUAGE, NGRAM, TEXT, ENTITIES
  from snips_nlu.dataset import get_text_from_chunks, validate_and_format_dataset
  from snips_nlu.entity_parser.builtin_entity_parser import is_builtin_entity
  from snips_nlu.exceptions import _EmptyDatasetUtterancesError, LoadingError
  from snips_nlu.languages import get_default_sep
  from snips_nlu.pipeline.configs import FeaturizerConfig
  from snips_nlu.pipeline.configs.intent_classifier import CooccurrenceVectorizerConfig, TfidfVectorizerConfig
  from snips_nlu.pipeline.processing_unit import ProcessingUnit
  from snips_nlu.preprocessing import stem, tokenize_light
  from snips_nlu.resources import get_stop_words, get_word_cluster
  from snips_nlu.slot_filler.features_utils import get_all_ngrams
label_desc: Use image node_id 8 for calling the CooccurrenceVectorizer obj's underlying member method code with example usage: obj.transform(x) and returns: x_coo