You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Taking an example from the latedeliveryandpenalty template, one of the sentences uses the same variable/property twice:
Any fractional part of a [{fractionalPart}] is to be considered a full
[{fractionalPart}].
The current implementation allows for distinct values of that same property, but disregards the second value. Here is a parsing run that illustrates this:
bash-3.2$ cat latedeliveryandpenalty/sample.txt
Late Delivery and Penalty. In case of delayed delivery except for Force Majeure cases, the Seller shall pay to the Buyer for every 2 DAY of delay penalty amounting to 10.5% of the total value of the Equipment whose delivery has been delayed. Any fractional part of a DAY is to be considered a full WEEK. The total amount of penalty shall not however, exceed 55% of the total value of the Equipment involved in late delivery. If the delay is more than 15 DAY, the Buyer is entitled to terminate this Contract.
bash-3.2$
bash-3.2$ cicero parse --template ./latedeliveryandpenalty/ --dsl ./latedeliveryandpenalty/sample.txt
14:58:56 - info: Logging initialized. 2017-12-23T19:58:56.569Z
14:58:56 - info: Logging initialized. 2017-12-23T19:58:56.741Z
14:58:57 - info: {"$class":"org.accordproject.latedeliveryandpenalty.TemplateModel","forceMajeure":true,"penaltyDuration":{"$class":"org.accordproject.base.Duration","amount":2,"unit":"DAY"},"penaltyPercentage":10.5,"capPercentage":55,"termination":{"$class":"org.accordproject.base.Duration","amount":15,"unit":"DAY"},"fractionalPart":"DAY"}
Note that the corresponding sentence is Any fractional part of a DAY is to be considered a full WEEK. which seems inconsistent, and the second occurrence (WEEK) of the fractional part is ignored.
Should the template parser unify on those fields used more than once, in which case the above sentence will be rejected?
The text was updated successfully, but these errors were encountered:
Taking an example from the
latedeliveryandpenalty
template, one of the sentences uses the same variable/property twice:The current implementation allows for distinct values of that same property, but disregards the second value. Here is a parsing run that illustrates this:
Note that the corresponding sentence is
Any fractional part of a DAY is to be considered a full WEEK.
which seems inconsistent, and the second occurrence (WEEK
) of the fractional part is ignored.Should the template parser unify on those fields used more than once, in which case the above sentence will be rejected?
The text was updated successfully, but these errors were encountered: