92083a3323755ba796ebcbfd5ae372c73768ea1f,allennlp/models/simple_tagger.py,SimpleTagger,tag,#SimpleTagger#Any#,102

Before Change


            distribution over classes for a given token in the sentence.
        
        text_field.index(self.vocab)
        padding_lengths = text_field.get_padding_lengths()
        array_input = text_field.as_array(padding_lengths)
        model_input = arrays_to_variables(array_input, add_batch_dimension=True)
        output_dict = self.forward(tokens=model_input)

        // Remove batch dimension, as we only had one input.

After Change


        
        instance = Instance({"tokens": text_field})
        instance.index_fields(self.vocab)
        model_input = arrays_to_variables(instance.as_array_dict(), add_batch_dimension=True)
        output_dict = self.forward(**model_input)

        // Remove batch dimension, as we only had one input.
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: allenai/allennlp
Commit Name: 92083a3323755ba796ebcbfd5ae372c73768ea1f
Time: 2017-08-03
Author: mattg@allenai.org
File Name: allennlp/models/simple_tagger.py
Class Name: SimpleTagger
Method Name: tag


Project Name: allenai/allennlp
Commit Name: 92083a3323755ba796ebcbfd5ae372c73768ea1f
Time: 2017-08-03
Author: mattg@allenai.org
File Name: allennlp/models/semantic_role_labeler.py
Class Name: SemanticRoleLabeler
Method Name: tag


Project Name: allenai/allennlp
Commit Name: 92083a3323755ba796ebcbfd5ae372c73768ea1f
Time: 2017-08-03
Author: mattg@allenai.org
File Name: allennlp/models/bidaf.py
Class Name: BidirectionalAttentionFlow
Method Name: predict_span