How would you suggest dealing with scenarios where you want ‘no’ or ‘none’ to match to a 0 cardinal entity? I’m using the ner_spacy for entity extraction. The slot of the form action is being filled with CARDINAL
entity. I’ve shown an example of the conversation below. They all should fill the form action slot with 0.
bot: How many apply do you have? user: I have 0 (cardinal) apples
bot: How many apply do you have? user: I do not have any apples
bot: How many apply do you have? user: None
How do you extract the 0 cardinal from the last two examples? I have specified the above examples in stories labeling, [None](Cardinal:0)
and I [do not](Cardinal:0)
have any apples, but doesn’t seem to work. Would custom entities be the way to go for this? Or I could do some manual check on if there’s no number, and if no cardinal entities were found, return 0 to slot.
Have attached code samples below;.
def slot_mappings(self) -> Dict[Text, Union[Dict, List[Dict]]]: return { "num_apples": [ self.from_entity(entity="CARDINAL") ] }