Best way to convert natural language sentence into machine readable format?

Viewed 43

I have a database of financial products which gets updated everyday from information that we obtain from a data vendor. These products contain an "exit load", which is like a fees for exiting an investment earlier than a stipulated time period, and that is stored as a string in a column.
An example of such an exit load that we have received from our data provider is: "If redeemed/ switched on or before 365 days from the date of allotment: - Nil for redemption/ switch out of units upto 24% of the units allotted (the limit), 1% on redemption in excess of 24% of the limit stated above- Redemption of units would be done on First in First out Basis (FIFO) Nil thereafter"

I need to be able to convert such a sentence into a formula that can be used by my applications. For example, the above sentence can be converted into something like: "if units_redeemed > 24% && investment_duration < 365 days then exit_load = 1% else 0%"
There are more than 1000 sentence variations of such types of exit loads.
How can this be done?

0 Answers
Related