class_docstr: Intent classifier which uses a Logistic Regression underneath
class_docstr_tok: ["Intent","classifier","which","uses","a","Logistic","Regression","underneath"]
code: def _get_intents(self, text, intents_filter):
      if isinstance(intents_filter, str):
          intents_filter = {intents_filter}
      elif isinstance(intents_filter, list):
          intents_filter = set(intents_filter)
  
      if not text or not self.intent_list or not self.featurizer:
          results = [intent_classification_result(None, 1.0)]
          results += [
              intent_classification_result(i, 0.0)
              for i in self.intent_list
              if i is not None
          ]
          return results
  
      if len(self.intent_list) == 1:
          return [
              intent_classification_result(self.intent_list[0], 1.0)
          ]
  
      # pylint: disable=C0103
      X = self.featurizer.transform([text_to_utterance(text)])
      # pylint: enable=C0103
      proba_vec = self._predict_proba(X)
      logger.debug(
          "%s",
          DifferedLoggingMessage(self.log_activation_weights, text, X),
      )
      results = [
          intent_classification_result(i, proba)
          for i, proba in zip(self.intent_list, proba_vec[0])
          if intents_filter is None or i is None or i in intents_filter
      ]
  
      return sorted(results, key=lambda res: -res[RES_PROBA])
  
imports: from __future__ import unicode_literals
  import json
  import logging
  from builtins import range, str, zip
  from pathlib import Path
  from snips_nlu.common.log_utils import DifferedLoggingMessage, log_elapsed_time
  from snips_nlu.common.utils import check_persisted_path, fitted_required, json_string
  from snips_nlu.constants import LANGUAGE, RES_PROBA
  from snips_nlu.dataset import validate_and_format_dataset
  from snips_nlu.exceptions import LoadingError, _EmptyDatasetUtterancesError
  from snips_nlu.intent_classifier.featurizer import Featurizer
  from snips_nlu.intent_classifier.intent_classifier import IntentClassifier
  from snips_nlu.intent_classifier.log_reg_classifier_utils import build_training_data, get_regularization_factor, text_to_utterance
  from snips_nlu.pipeline.configs import LogRegIntentClassifierConfig
  from snips_nlu.result import intent_classification_result
label_desc: Use image node_id 6 for calling the LogRegIntentClassifier obj's underlying member method code with example usage: obj._get_intents(text, intents_filter) and returns: sorted, results, list