638810ae894784dec9d65abe156ea2fba11f289e,torchtext/experimental/transforms.py,BasicEnglishNormalize,forward,#BasicEnglishNormalize#Any#,62
Before Change
line = line.lower()
for regex, replacement_string in self.regex_and_replacement_string_pairs:
line = regex.Sub(line, replacement_string)
return line.split()
class RegexTokenizer(nn.Module):
After Change
Returns:
List[str]: a list of tokens after normalizing and splitting on whitespace.
return self.regex_tokenizer.forward(line)
class RegexTokenizer(nn.Module):
rRegex tokenizer for a string sentence that applies all regex replacements defined in patterns_list.
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 7
Instances Project Name: pytorch/text
Commit Name: 638810ae894784dec9d65abe156ea2fba11f289e
Time: 2020-08-07
Author: 22487263+Nayef211@users.noreply.github.com
File Name: torchtext/experimental/transforms.py
Class Name: BasicEnglishNormalize
Method Name: forward
Project Name: pytorch/text
Commit Name: 638810ae894784dec9d65abe156ea2fba11f289e
Time: 2020-08-07
Author: 22487263+Nayef211@users.noreply.github.com
File Name: torchtext/experimental/transforms.py
Class Name: RegexTokenizer
Method Name: forward
Project Name: rail-berkeley/softlearning
Commit Name: b9f73135ad262404868530f0e574cad3254f7f77
Time: 2018-10-26
Author: kristian.hartikainen@gmail.com
File Name: softlearning/distributions/real_nvp_bijector.py
Class Name: RealNVPBijector
Method Name: _forward