Skip to content

Commit

Permalink
[IT NumberWithUnits] Fix for currency prefix dollari for Italian (#3069)
Browse files Browse the repository at this point in the history
  • Loading branch information
KanchanKumar12 authored Jan 30, 2023
1 parent 1d910cb commit e7927a6
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -565,7 +565,7 @@ public static class NumbersWithUnitDefinitions
public const string CompoundUnitConnectorRegex = @"(?<spacer>e)";
public static readonly Dictionary<string, string> CurrencyPrefixList = new Dictionary<string, string>
{
{ @"Dollar", @"$" },
{ @"Dollar", @"$|dollari" },
{ @"United States dollar", @"$ stati uniti|us$|us $|u.s. $|u.s $" },
{ @"East Caribbean dollar", @"east caribbean $" },
{ @"Australian dollar", @"$ australiano|$ australia" },
Expand Down
2 changes: 1 addition & 1 deletion Patterns/Italian/Italian-NumbersWithUnit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -643,7 +643,7 @@ CurrencyPrefixList: !dictionary
types: [ string, string ]
entries:
#Dollar Prefix
Dollar: $
Dollar: $|dollari
United States dollar: $ stati uniti|us$|us $|u.s. $|u.s $
East Caribbean dollar: east caribbean $
Australian dollar: $ australiano|$ australia
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -541,7 +541,7 @@ class ItalianNumericWithUnit:
("Millibitcoin", "MILLIBITCOIN"),
("Satoshi", "SATOSHI")])
CompoundUnitConnectorRegex = f'(?<spacer>e)'
CurrencyPrefixList = dict([("Dollar", "$"),
CurrencyPrefixList = dict([("Dollar", "$|dollari"),
("United States dollar", "$ stati uniti|us$|us $|u.s. $|u.s $"),
("East Caribbean dollar", "east caribbean $"),
("Australian dollar", "$ australiano|$ australia"),
Expand Down
32 changes: 32 additions & 0 deletions Specs/NumberWithUnit/Italian/CurrencyModel.json
Original file line number Diff line number Diff line change
Expand Up @@ -1689,5 +1689,37 @@
"End": 5
}
]
},
{
"Input": "Ho bisogno di dollari 996",
"NotSupported": "javascript, java",
"Results": [
{
"Text": "dollari 996",
"TypeName": "currency",
"Resolution": {
"value": "996",
"unit": "Dollar"
},
"Start": 14,
"End": 24
}
]
},
{
"Input": "dollari 4",
"NotSupported": "javascript, java",
"Results": [
{
"Text": "dollari 4",
"TypeName": "currency",
"Resolution": {
"value": "4",
"unit": "Dollar"
},
"Start": 0,
"End": 8
}
]
}
]

0 comments on commit e7927a6

Please sign in to comment.