5e04ec7ae0b1b3b1ee321a28e09616653373cef5,asdl/lang/sql/utils.py,,my_detokenize,#Any#Any#Any#,11
Before Change
if not match and raise_error:
raise ValueError("cannot find the entry for %s in the token dict" % token)
return "".join(literal).strip()
def detokenize_query(query, example_dict, table):
detokenized_conds = []
After Change
val = "".join(literal).strip()
except IndexError:
if raise_error:
raise IndexError("cannot find the entry for [%s] in the token dict [%s]" % (" ".join(tokens),
" ".join(token_dict["words"])))
// if we cannot find a consecutive sequence in the gloss dictionary,
// revert to token-wise matching
for token in tokens:
match = False
for word, gloss, after in zip(token_dict["words"], token_dict["gloss"], token_dict["after"]):
if token == word:
literal.extend([gloss, after])
match = True
break
if not match and raise_error:
raise IndexError("cannot find the entry for [%s] in the token dict [%s]" % (" ".join(tokens),
" ".join(
token_dict["words"])))
val = "".join(literal).strip()
return val
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 6
Instances Project Name: pcyin/tranX
Commit Name: 5e04ec7ae0b1b3b1ee321a28e09616653373cef5
Time: 2018-05-08
Author: pcyin@cs.cmu.edu
File Name: asdl/lang/sql/utils.py
Class Name:
Method Name: my_detokenize
Project Name: brian-team/brian2
Commit Name: a8f3ec3ff99008920ce442698003e6e191c1d2b4
Time: 2013-07-11
Author: marcel.stimberg@ens.fr
File Name: brian2/core/specifiers.py
Class Name: VariableView
Method Name: __getitem__
Project Name: scipy/scipy
Commit Name: f43c64c4fd913751764d324a1b85c895a051bced
Time: 2018-11-08
Author: perimosocordiae@gmail.com
File Name: scipy/sparse/csr.py
Class Name: csr_matrix
Method Name: getcol