3146d1478501f47934e3a1136f731ba9e948420c,snips_nlu/resources.py,,_load_gazetteers,#Any#Any#,185
Before Change
normalized = normalize(line.strip())
if normalized:
token_values = (t.value
for t in tokenize(normalized, language) )
normalized = get_default_sep(language).join(token_values)
gazetteers[gazetteer_name].add(normalized)
return gazetteers
After Change
for gazetteer_name in gazetteer_names:
gazetteer_path = (gazetteers_dir / gazetteer_name).with_suffix(".txt")
with gazetteer_path.open(encoding="utf8") as f:
gazetteers[gazetteer_name] = set(v.strip() for v in f)
return gazetteers
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 4
Instances Project Name: snipsco/snips-nlu
Commit Name: 3146d1478501f47934e3a1136f731ba9e948420c
Time: 2018-07-09
Author: adrien.ball@snips.ai
File Name: snips_nlu/resources.py
Class Name:
Method Name: _load_gazetteers
Project Name: snipsco/snips-nlu
Commit Name: be5b7adef5a75a8db9af53c641cf6e2233fb2832
Time: 2017-04-12
Author: clement.doumouro@snips.ai
File Name: snips_nlu/slot_filler/data_augmentation.py
Class Name:
Method Name: get_noise_iterator
Project Name: MycroftAI/padatious
Commit Name: 001010c152897b4f476ca5e435f86c9b75b17078
Time: 2017-10-11
Author: matthew3311999@gmail.com
File Name: padatious/train_data.py
Class Name: TrainData
Method Name: add_lines