2c693b70538a5aad807b0411da05d1b6d024658b,snips_nlu/preprocessing.py,,stem,#Any#Any#,33
Before Change
def stem(string, language, *default):
if len(default) == 0:
return language_stems(language)[string]
elif len(default) == 1:
return language_stems(language).get(string, default[0])
else:
raise ValueError("Can only have 0 or 1 default argument")
After Change
def stem(string, language):
tokens = string.split()
stemmed_tokens = [_stem(token, language, token) for token in tokens]
return " ".join(stemmed_tokens)
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 4
Instances
Project Name: snipsco/snips-nlu
Commit Name: 2c693b70538a5aad807b0411da05d1b6d024658b
Time: 2017-04-07
Author: adrien.ball@snips.net
File Name: snips_nlu/preprocessing.py
Class Name:
Method Name: stem
Project Name: apache/incubator-mxnet
Commit Name: 1efb747ad5cf695f181c64bfb16daccd6ca4c456
Time: 2020-03-17
Author: fhztc1997618@gmail.com
File Name: python/mxnet/ndarray/numpy/_op.py
Class Name:
Method Name: split
Project Name: horovod/horovod
Commit Name: a38040921420f6e03f46b029b3300bb0f7094062
Time: 2020-03-25
Author: fardin@uber.com
File Name: horovod/run/run.py
Class Name:
Method Name: _run