Accessing Configuration Args in Custom Component?

I am modifying a custom component to access a configuration variable, though I am not sure how to access this variable.

For example, if I were to modify the “CRFEntityExtractor”, how would I access the passed in “features” argument?

I took a brief look at the source file for the CRFEntityExtractor, and it looks like the configuration variables can be accessed through the init function:

def __init__(
    self,
    **component_config: Optional[Dict[Text, Any]] = None,**
    ent_tagger: Optional["CRF"] = None,
) -> None:

    **super().__init__(component_config)**

Am I on the correct path here? Thanks!

Yes, you are correct! Make sure to add a default value as well here -

# The maximum number of iterations for optimization algorithms.
        "max_iterations": 50,
        # weight of theL1 regularization
        "L1_c": 0.1,
        # weight of the L2 regularization
        "L2_c": 0.1,