5ea2eab7090c2f1c0449d1ab93c0fba318f61628,allennlp/models/semantic_role_labeler.py,SemanticRoleLabeler,from_params,#Any#Any#Any#,207

Before Change


        text_field_embedder = TextFieldEmbedder.from_params(vocab, embedder_params)
        stacked_encoder = Seq2SeqEncoder.from_params(params.pop("stacked_encoder"))
        binary_feature_dim = params.pop("binary_feature_dim")
        initializer = InitializerApplicator.from_params(params.pop("initializer", []))

        return cls(vocab=vocab,
                   text_field_embedder=text_field_embedder,
                   stacked_encoder=stacked_encoder,

After Change


        stacked_encoder = Seq2SeqEncoder.from_params(params.pop("stacked_encoder"))
        binary_feature_dim = params.pop("binary_feature_dim")

        init_params = params.pop("initializer", None)
        reg_params = params.pop("regularizer", None)
        initializer = (InitializerApplicator.from_params(init_params)
                       if init_params is not None
                       else InitializerApplicator())
        regularizer = RegularizerApplicator.from_params(reg_params) if reg_params is not None else None

        return cls(vocab=vocab,
                   text_field_embedder=text_field_embedder,
                   stacked_encoder=stacked_encoder,
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 14

Instances


Project Name: allenai/allennlp
Commit Name: 5ea2eab7090c2f1c0449d1ab93c0fba318f61628
Time: 2017-09-26
Author: joelgrus@gmail.com
File Name: allennlp/models/semantic_role_labeler.py
Class Name: SemanticRoleLabeler
Method Name: from_params


Project Name: allenai/allennlp
Commit Name: 5ea2eab7090c2f1c0449d1ab93c0fba318f61628
Time: 2017-09-26
Author: joelgrus@gmail.com
File Name: allennlp/models/decomposable_attention.py
Class Name: DecomposableAttention
Method Name: from_params


Project Name: allenai/allennlp
Commit Name: 5ea2eab7090c2f1c0449d1ab93c0fba318f61628
Time: 2017-09-26
Author: joelgrus@gmail.com
File Name: allennlp/models/reading_comprehension/bidaf.py
Class Name: BidirectionalAttentionFlow
Method Name: from_params