Skip to content

Commit 1cc94f2

Browse files
authored
[fix] remove punc in decimal (#226)
1 parent c632358 commit 1cc94f2

2 files changed

Lines changed: 4 additions & 6 deletions

File tree

tn/english/rules/decimal.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,7 @@ def get_quantity(decimal: 'pynini.FstLike',
5555
else:
5656
quantity = quantities
5757
res |= (decimal + pynini.closure(pynutil.delete(" "), 0, 1) +
58-
pynutil.insert(" quantity: \"") + quantity +
59-
Processor("tmp").PUNCT.ques + pynutil.insert("\""))
58+
pynutil.insert(" quantity: \"") + quantity + pynutil.insert("\""))
6059
return res
6160

6261

@@ -95,11 +94,9 @@ def build_tagger(self):
9594
1)
9695

9796
self.graph_fractional = pynutil.insert(
98-
"fractional_part: \""
99-
) + self.graph + self.PUNCT.ques + pynutil.insert("\"")
97+
"fractional_part: \"") + self.graph + pynutil.insert("\"")
10098
self.graph_integer = pynutil.insert(
101-
"integer_part: \""
102-
) + cardinal_graph + self.PUNCT.ques + pynutil.insert("\"")
99+
"integer_part: \"") + cardinal_graph + pynutil.insert("\"")
103100
final_graph_wo_sign = (
104101
pynini.closure(self.graph_integer + pynutil.insert(" "), 0, 1) +
105102
point + pynutil.insert(" ") + self.graph_fractional)
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
this is 12th game, number 256, 2024-05-06, 2021-03-07 31.990 billion. ¾ people like chattts, let's eat at 03:43 p.m. run 10 km, give me $12.345 please, call 123-123-5678-1 Mt Hill "HAHAHA" billion 4 March => this is twelfth game, number two hundred and fifty six, the sixth of may twenty twenty four, the seventh of march twenty twenty one thirty one point nine nine oh billion. three quarters people like chattts, let' s eat at three forty three PM run ten kilometers, give me twelve point three four five dollars please, call one two three, one two three, five six seven eight, one Mt Hill" HAHAHA" billion the fourth of march
22
The National Map, accessed April 1, 2011" Site Description of Koppers Co. From the quartet's recording" Jefferson Friedman: Quartets,"" String Quartet no, Riots again broke out, Atassi resigned, and Syrian independence was deferred until after World War II. 1988 (1988) ( 1988) ( 1988). Starling, Arthur E.( 1988 ). this is 12th game, number 256, 2024-05-06, 2021-03-07 31.990 billion. 3/4 people like chattts Retrieved December 2011. Information on Album" Thepodule.com"" Biography by Amy Hanson". => The National Map, accessed the first of april , twenty eleven" Site Description of Koppers company From the quartet' s recording" Jefferson Friedman: Quartets,"" String Quartet no, Riots again broke out, Atassi resigned, and Syrian independence was deferred until after World War two nineteen eighty eight( nineteen eighty eight )( nineteen eighty eight )( nineteen eighty eight). Starling, Arthur E.( nineteen eighty eight). this is twelfth game, number two fifty six, the sixth of may twenty twenty four, the seventh of march twenty twenty one thirty one point nine nine oh billion. three quarters people like chattts Retrieved december twenty eleven. Information on Album" Thepodule dot com"" Biography by Amy Hanson".
3+
.345" and ".456" "9.456" or 6.7890" => point three four five" and". four hundred and fifty six" " nine point four five six" or six point seven eight nine oh"

0 commit comments

Comments
 (0)