63bde2f7cf28dbf6bca6e77fe0b0a9966dc6aee6,finetune/encoding/input_encoder.py,,tokenize_context,#Any#Any#Any#,203

Before Change


                current_char_loc += 1
                if current_char_loc >= len(context_by_char_loc):
                    // TODO: this is a workaround that has no guarantees of being correct
                    raise ValueError("Context cannot be fully matched as it appears to not cover the end of the sequence")
            tokenized_context.append(context_by_char_loc[current_char_loc][1])

    assert len(tokenized_context) == len(encoded_output.token_ends)
    // padded value doesn"t matter since it will be masked out

After Change


                if current_char_loc >= len(context_by_char_loc):
                    // TODO: this is a workaround that has no guarantees of being correct
                    raise ValueError("Context cannot be fully matched as it appears to not cover the end of the sequence for token {}".format(token))
            if token.strip() not in context_by_char_loc[current_char_loc][2]:
                warnings.warn("subtoken: {} has matched up with the context for token: {}".format(repr(token), repr(context_by_char_loc[current_char_loc][2])))
            tokenized_context.append(context_by_char_loc[current_char_loc][1])

    assert len(tokenized_context) == len(encoded_output.token_ends)
    // padded value doesn"t matter since it will be masked out
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: IndicoDataSolutions/finetune
Commit Name: 63bde2f7cf28dbf6bca6e77fe0b0a9966dc6aee6
Time: 2020-05-14
Author: benlt@hotmail.co.uk
File Name: finetune/encoding/input_encoder.py
Class Name:
Method Name: tokenize_context


Project Name: brian-team/brian2
Commit Name: 3daa1acdb68e7c305f23aa2eee308ceb8a440996
Time: 2017-03-17
Author: marcel.stimberg@inserm.fr
File Name: brian2/units/fundamentalunits.py
Class Name: Unit
Method Name: __init__


Project Name: scikit-learn/scikit-learn
Commit Name: 10b8bf7c54c5bf3281ebc393e3df614c5fb63a8f
Time: 2019-11-20
Author: olivier.grisel@ensta.org
File Name: sklearn/metrics/_ranking.py
Class Name:
Method Name: _binary_clf_curve