cb0c025ab87216d35b68a2b4b36d61621acd76ba,deeppavlov/models/ner/slotfill.py,DstcSlotFillingNetwork,infer,#DstcSlotFillingNetwork#Any#,70
Before Change
instance = instance.strip()
if not len(instance):
return dict()
return self.predict_slots(instance.lower())
def interact(self):
s = input("Type in the message you want to tag: ")
prediction = self.predict_slots(s)
After Change
@overrides
def infer(self, instance, *args, **kwargs):
instance = instance.strip().lower()
if not all([ord(c) < 128 for c in instance]):
print("Non ASCII symbols in the string, returning empty slots", file=sys.stderr)
return {}
tokens = tokenize_reg(instance)
if len(tokens) > 0:
return self.predict_slots(tokens)
else:
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 5
Instances Project Name: deepmipt/DeepPavlov
Commit Name: cb0c025ab87216d35b68a2b4b36d61621acd76ba
Time: 2018-01-31
Author: arkhipov@yahoo.com
File Name: deeppavlov/models/ner/slotfill.py
Class Name: DstcSlotFillingNetwork
Method Name: infer
Project Name: NifTK/NiftyNet
Commit Name: 4aaa81b9394773817b3925e3f068531432e90019
Time: 2017-08-21
Author: t.doel@ucl.ac.uk
File Name: niftynet/utilities/download.py
Class Name:
Method Name: download
Project Name: NervanaSystems/nlp-architect
Commit Name: b39a6ac91b28369e62e885f692db72232b405f82
Time: 2018-05-08
Author: peter.izsak@intel.com
File Name: core_models/ner/interactive.py
Class Name:
Method Name: read_input_args