I have edited the transfer_money_form with an additional OTP number (numerical), however, duckling captures the OTP and overwrites the amount-of-money slot as well.
Person: Transfer 5000 to John (Bot sets slots amount-of-money: 5000 and PERSON: John)
Bot: Please enter OTP
Person: 1234 (Bot sets both amount-of-money and OTP slots to 1234)
Bot: OTP correct. Transfered $1234 to John
This happens because both slots are filled with ‘number’ duckling entity.
As far i remember the duckling parser for amount-of-money, i find it surprising that an ordinary number without any currency mentioned is being picked up by amount-of-money.
have you provided tagged examples for amount-of-money in the training data?
duckling works in haskell with a very strong regex pattern to extract currency patterns and it does not require training examples. if you have given training examples for the same, you are not “training” a duckling extractor but DIET which maybe is filling the slot instead. try removing all tagged examples of duckling amount-of-money from the training examples.
p.s i wrote the amount of money extractor in duckling for dutch 2 years ago so as far as i know, amount-of-money can’t just pick numbers in random, it does not have a regex for that
Hello souvikg10, please note that the amount-of-money slot in the financial demo example, can be filled with duckling amount-of-money enitity or number enitity. please check the domain file I have provided.
This behaviour is needed so you do not need to provide a currency.
i understand. then perhaps the creators of the demo could help @akelad.
I can’t think of any other way to implement this. sorry
personally coming from a financial industry, i would never imagine a number being considered amount of money because it adds a huge level of randomness to a field which is considered very highly in banking - “Money”. i think amount-of-money should only look for patterns where the user indicates currency and thus in duckling rules, this has been strictly maintained. in our case, we guided the user to input the currency or currency symbols if you don’t control the UI and added further validation steps. numbers are very random and can occur in multiple scenarios and thus i would refrain from using numbers as part of the enttiy extraction for amount of money.