Hello everyone, I have a tough problem. When I define two custom slots (not the same round of conversation,So can’t write together a function), because the entities marked in the training data are all numbers, the recognition of the two entities will be confusing. Details are as follows
class MoneySlot1(Slot):
def feature_dimensionality(self):
return 2
def as_feature(self):
r = [0.0] * self.feature_dimensionality()
if self.value:
if int(self.value) <= 10000:
r[0] = 1.0
else:
r[1] = 1.0
return r
class MoneySlot2(Slot):
def feature_dimensionality(self):
return 2
def as_feature(self):
r = [0.0] * self.feature_dimensionality()
if self.value:
if int(self.value) <= 20000:
r[0] = 1.0
else:
r[1] = 1.0
return r
I need to compare with 20,000 in a certain round of dialogue, when enter a number, it will mistake the entity to compare with another custom slot type(Compare with 10,000). My story has already been saved correct dialogue. Even if I test it completely according to the story, there will be errors, so how to distinguish between two types of slots that are compared with different values.Any suggestions would be greatly appreciated