rustling-ontology icon indicating copy to clipboard operation
rustling-ontology copied to clipboard

Wrong resolution of big numbers (at the end) when number + currency

Open JohannaSimoens opened this issue 6 years ago • 3 comments

Parsing Error

Version

0.18.0

Language

en fr

Parser input

two hundred twenty-three million three hundred one thousand two hundred eleven euros trois cent deux millions quatre cent trente milles deux cent trente euros

Parser output

+----+-------------+-----------+--------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+
| ix | log(p)      | p         | text                                                                                 | value                                                                                          |
+====+=============+===========+======================================================================================+================================================================================================+
| 0  | -0.11813116 | 0.8885795 | two hundred twenty-three million three hundred one thousand two hundred eleven euros | AmountOfMoney(AmountOfMoneyOutput { value: 223301220.0, precision: Exact, unit: Some("EUR") }) |
+----+-------------+-----------+--------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+

| ix | log(p)     | p          | text                                                                      | value                                                                                          |
+====+============+============+===========================================================================+================================================================================================+
| 0  | -1.9776177 | 0.13839854 | trois cent deux millions quatre cent trente milles deux cent trente euros | AmountOfMoney(AmountOfMoneyOutput { value: 302430240.0, precision: Exact, unit: Some("EUR") }) |
+----+------------+------------+---------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+

Parser expected output (Optional)

+----+-------------+-----------+--------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+
| ix | log(p)      | p         | text                                                                                 | value                                                                                          |
+====+=============+===========+======================================================================================+================================================================================================+
| 0  | -0.11813116 | 0.8885795 | two hundred twenty-three million three hundred one thousand two hundred eleven euros | AmountOfMoney(AmountOfMoneyOutput { value: 223301220.0, precision: Exact, unit: Some("EUR") }) |
+----+-------------+-----------+--------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+
+----+------------+------------+---------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+
| ix | log(p)     | p          | text                                                                      | value                                                                                          |
+====+============+============+===========================================================================+================================================================================================+
| 0  | -1.9776177 | 0.13839854 | trois cent deux millions quatre cent trente milles deux cent trente euros | AmountOfMoney(AmountOfMoneyOutput { value: 302430230.0, precision: Exact, unit: Some("EUR") }) |
+----+------------+------------+---------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+

JohannaSimoens avatar May 09 '19 16:05 JohannaSimoens

@JohannaSimoens thanks for opening the ticket - maybe see if there are useful labels to add (cf. options on the right); also you can assign the issue, to you for example :)

  • I'm pretty sure I've seen the same issue for Spanish but haven't found my note on this yet. It might be that this is a cross-language issue, pertaining to the resolution function used rather than the rule parsing. We need to check.

rosastern avatar May 09 '19 20:05 rosastern

To do: check together with: https://github.com/snipsco/rustling-ontology/issues/125

rosastern avatar Sep 27 '19 09:09 rosastern

@kali or @hdlj , would be great to investigate this with your help!

rosastern avatar Oct 04 '19 07:10 rosastern