loubnabnl HF staff commited on
Commit
40bf1b3
1 Parent(s): ed89bc7

update function comments

Browse files
Files changed (1) hide show
  1. preprocessing.py +2 -2
preprocessing.py CHANGED
@@ -50,12 +50,12 @@ def parse_data(ds):
50
 
51
 
52
  def get_hash(example):
53
- """Get hash of content field."""
54
  text = example["markdown"] + example["code"]
55
  return {"hash": hashlib.md5(re.sub(PATTERN, "", text).encode("utf-8")).hexdigest()}
56
 
57
  def preprocess(example):
58
- """Chain all preprocessing steps into one function to not fill cache."""
59
  results = dict()
60
  results.update(get_hash(example))
61
  return results
 
50
 
51
 
52
  def get_hash(example):
53
+ """Get hash of markdown + code"""
54
  text = example["markdown"] + example["code"]
55
  return {"hash": hashlib.md5(re.sub(PATTERN, "", text).encode("utf-8")).hexdigest()}
56
 
57
  def preprocess(example):
58
+ """add hash column to dataset."""
59
  results = dict()
60
  results.update(get_hash(example))
61
  return results