edd74909eb1cef75e88e50af6fee48bb6615b7fb,my/tokenize.py,,main,#,47
Before Change
for match in TOKEN.finditer(line):
if match.start() != end:
unmatched = line[end:match.start()]
STDOUT.write("Unmatched: %s\n" % repr(unmatched))
kind_token = GetToken(match)
STDOUT.write("token %6s: %s\n" % kind_token)
end = match.end()
if end < len(line):
After Change
tokens = list(Tokenize(line))
if not tokens:
continue
if all(kind in ("native", "punct", "space") for (kind, token) in tokens):
STDOUT.write("%s\n" % " ".join(token for (kind, token) in tokens
if kind == "native"))
else:
STDERR.write("%s\n" % line)
return
if __name__ == "__main__":
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 3
Instances Project Name: google/language-resources
Commit Name: edd74909eb1cef75e88e50af6fee48bb6615b7fb
Time: 2016-05-26
Author: mjansche@google.com
File Name: my/tokenize.py
Class Name:
Method Name: main
Project Name: brian-team/brian2
Commit Name: fdb8ed82b7323e0e6b8492f84c2aff78bc72c2e5
Time: 2019-11-04
Author: marcel.stimberg@inserm.fr
File Name: brian2/tests/__init__.py
Class Name:
Method Name: run
Project Name: senarvi/theanolm
Commit Name: b7453958eda963b0a2bc83472731adaa76ee4d11
Time: 2015-12-11
Author: seppo.git@marjaniemi.com
File Name: theanolm/commands/score.py
Class Name:
Method Name: _score_text