9e8e04c4da3b2407291d1b5fe5426140c7e4780c,finetune/sequence_labeling.py,SequenceLabeler,_finetune,#SequenceLabeler#Any#Any#Any#,14

Before Change


        val_interval: The interval for which validation is performed, measured in number of steps.
        
        arr_encoded = self._text_to_ids_with_labels(X, Y=Y)
        return self._training_loop(
            arr_encoded,
            Y=arr_encoded.labels,
            batch_size=batch_size or self.config.batch_size
        )

    def _get_target_encoder(self):
        return SequenceLabelingEncoder()

After Change


        val_size: Float fraction or int number that represents the size of the validation set.
        val_interval: The interval for which validation is performed, measured in number of steps.
        
        self.label_encoder = self._get_target_encoder()
        train_x, test_x, train_y, test_y = train_test_split(X, Y, test_size=self.config.val_size,
                                                            random_state=self.config.seed)

        array_encoded_train = self._text_to_ids_with_labels(train_x, Y=train_y)
        array_encoded_val = self._text_to_ids_with_labels(test_x, Y=test_y)

        train_y = self.label_encoder.fit_transform(array_encoded_train.labels)
        test_y = self.label_encoder.transform(array_encoded_val.labels)

        return self._training_loop(arr_encoded_train=array_encoded_train, train_y=train_y,
                                   arr_encoded_val=array_encoded_val, val_y=test_y, batch_size=batch_size)

    def _get_target_encoder(self):
        return SequenceLabelingEncoder()
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 8

Instances


Project Name: IndicoDataSolutions/finetune
Commit Name: 9e8e04c4da3b2407291d1b5fe5426140c7e4780c
Time: 2018-07-26
Author: benlt@hotmail.co.uk
File Name: finetune/sequence_labeling.py
Class Name: SequenceLabeler
Method Name: _finetune


Project Name: snipsco/snips-nlu
Commit Name: 75df2742635b09f97e8d7ec9396750aa17046567
Time: 2017-03-24
Author: tristan.deleu@gmail.com
File Name: snips_nlu/intent_parser/builtin_intent_parser.py
Class Name: BuiltinIntentParser
Method Name: get_entities


Project Name: snipsco/snips-nlu
Commit Name: 75df2742635b09f97e8d7ec9396750aa17046567
Time: 2017-03-24
Author: tristan.deleu@gmail.com
File Name: snips_nlu/intent_parser/builtin_intent_parser.py
Class Name: BuiltinIntentParser
Method Name: get_intent