Hi there,
I’m doing a Proof of Concept to build a chatbot using ChatScript. Basically the bots can help explain banking terms. However, I ran into some issues to query the fact table. Some works and some doesn’t. Hope you can help me with that.
Here is the fact table I created:
concept: ~bank_term()
table: bank_term_table (^term ^description)
^createfact (^term member ~bank_term)
^createfact (^term mean ^description)
data:
“acceptance letter of credit” “A letter of credit available \“by acceptance\” calling for a time draft (or usance draft), drawn on an intermediate accepting bank, that the drawee (payer) has accepted and is unconditionally obligated to pay at maturity.”
“advance payment” “The buyer delivers payment to the seller before the seller releases the goods. Some sellers ask for this payment to show good faith on the part of the buyer and also to enhance their cash flow related to the sale of particular custom-made items.”
“bill of exchange” “A written, unconditional order, signed by the drawer and addressed to the drawee, to pay a sum of money at a fixed or future date to the order of the payee or to the bearer.”
“deferred payment letter of credit” “A letter of credit in which the payment is deferred to a specific later date.”
Here is a snippet of the rule:
u: (_~bank_term)
Here is the explaination for _0: \n
if (^query(direct_sv _0 mean ?))
{
_0 means ^"\"@0object\""
}
else
{
Oops, for some reason, I cannot locate the answer for you.
}
The above rule works for “bill of exchange”, but doesn’t work for others. I did do a dump of all facts using a debug command, and it did show all the facts there as excerpted below:
( acceptance_letter_of_credit mean `A_letter_of_credit_available_\“by_acceptance\“_calling_for_a_time_draft_(or_usance_draft),_drawn_on_an_intermediate_accepting_bank,_that_the_drawee_(payer)_has_accepted_and_is_unconditionally_obligated_to_pay_at_maturity.` x100000 )
( advance_payment mean The_buyer_delivers_payment_to_the_seller_before_the_seller_releases_the_goods_._Some_sellers_ask_for_this_payment_to_show_good_faith_on_the_part_of_the_buyer_and_also_to_enhance_their_cash_flow_related_to_the_sale_of_particular_custom-made_items. x100000 )
( bill_of_exchange mean A_written,_unconditional_order,_signed_by_the_drawer_and_addressed_to_the_drawee,_to_pay_a_sum_of_money_at_a_fixed_or_future_date_to_the_order_of_the_payee_or_to_the_bearer. x100000 )
( deferred_payment_letter_of_credit mean A_letter_of_credit_in_which_the_payment_is_deferred_to_a_specific_later_date. x100000 )
( pengbot defaultbot defaultbot x100000 )
I have spent a few hours and tried different things, but could not get that working.
Will appreciate if you can help me here.
Thanks
Peng