class_docstr: Implements conditional random fields (CRF) to do named entity recognition.
class_docstr_tok: ["Implements","conditional","random","fields","(","CRF",")","to","do","named","entity","recognition","."]
docstr: The component's default config (see parent class for full docstring).
docstr_tok: ["The","component","'s","default","config","(","see","parent","class","for","full","docstring",")","."]
code: def get_default_config() -> Dict[Text, Any]:
      """The component's default config (see parent class for full docstring)."""
      return {
          # BILOU_flag determines whether to use BILOU tagging or not.
          # More rigorous however requires more examples per entity
          # rule of thumb: use only if more than 100 egs. per entity
          BILOU_FLAG: True,
          # Split entities by comma, this makes sense e.g. for a list of ingredients
          # in a recipie, but it doesn't make sense for the parts of an address
          SPLIT_ENTITIES_BY_COMMA: True,
          # crf_features is [before, token, after] array with before, token,
          # after holding keys about which features to use for each token,
          # for example, 'title' in array before will have the feature
          # "is the preceding token in title case?"
          # POS features require SpacyTokenizer
          # pattern feature require RegexFeaturizer
          CRFEntityExtractor.CONFIG_FEATURES: [
              [
                  CRFEntityExtractorOptions.LOW,
                  CRFEntityExtractorOptions.TITLE,
                  CRFEntityExtractorOptions.UPPER,
              ],
              [
                  CRFEntityExtractorOptions.LOW,
                  CRFEntityExtractorOptions.BIAS,
                  CRFEntityExtractorOptions.PREFIX5,
                  CRFEntityExtractorOptions.PREFIX2,
                  CRFEntityExtractorOptions.SUFFIX5,
                  CRFEntityExtractorOptions.SUFFIX3,
                  CRFEntityExtractorOptions.SUFFIX2,
                  CRFEntityExtractorOptions.UPPER,
                  CRFEntityExtractorOptions.TITLE,
                  CRFEntityExtractorOptions.DIGIT,
                  CRFEntityExtractorOptions.PATTERN,
              ],
              [
                  CRFEntityExtractorOptions.LOW,
                  CRFEntityExtractorOptions.TITLE,
                  CRFEntityExtractorOptions.UPPER,
              ],
          ],
          # The maximum number of iterations for optimization algorithms.
          "max_iterations": 50,
          # weight of the L1 regularization
          "L1_c": 0.1,
          # weight of the L2 regularization
          "L2_c": 0.1,
          # Name of dense featurizers to use.
          # If list is empty all available dense features are used.
          "featurizers": [],
      }
  
imports: from __future__ import annotations
  from collections import OrderedDict
  from enum import Enum
  import logging
  import typing
  import numpy
  from typing import Any, Dict, List, Optional, Text, Tuple, Callable, Type
  import rasa.nlu.utils.bilou_utils
  import rasa.shared.utils.io
  import rasa.utils.train_utils
  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.test import determine_token_labels
  from rasa.nlu.tokenizers.spacy_tokenizer import POS_TAG_KEY
  from rasa.nlu.extractors.extractor import EntityExtractorMixin
  from rasa.nlu.tokenizers.tokenizer import Token, Tokenizer
  from rasa.shared.nlu.training_data.training_data import TrainingData
  from rasa.shared.nlu.training_data.message import Message
  from rasa.nlu.constants import TOKENS_NAMES
  from rasa.shared.nlu.constants import TEXT, ENTITIES, ENTITY_ATTRIBUTE_TYPE, ENTITY_ATTRIBUTE_GROUP, ENTITY_ATTRIBUTE_ROLE, NO_ENTITY_TAG, SPLIT_ENTITIES_BY_COMMA, SPLIT_ENTITIES_BY_COMMA_DEFAULT_VALUE
  from rasa.shared.constants import DOCS_URL_COMPONENTS
  from rasa.utils.tensorflow.constants import BILOU_FLAG, FEATURIZERS
label_desc: Use image node_id 2 for calling the CRFEntityExtractor obj's underlying member method code with example usage: obj.get_default_config() and returns: dict