Skip to content

Commit 0f67969

Browse files
authored
remove unused function from ar tn decimals (#165)
* remove unused function from ar tn decimals Signed-off-by: Mariana Graterol Fuenmayor <[email protected]> * update ci date Signed-off-by: Mariana Graterol Fuenmayor <[email protected]> --------- Signed-off-by: Mariana Graterol Fuenmayor <[email protected]>
1 parent e750c2d commit 0f67969

File tree

2 files changed

+1
-26
lines changed

2 files changed

+1
-26
lines changed

Jenkinsfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ pipeline {
1111
}
1212
environment {
1313

14-
AR_TN_CACHE='/home/jenkinsci/TestData/text_norm/ci/grammars/10-23-23-0'
14+
AR_TN_CACHE='/home/jenkinsci/TestData/text_norm/ci/grammars/04-24-24-0'
1515
DE_TN_CACHE='/home/jenkinsci/TestData/text_norm/ci/grammars/06-08-23-0'
1616
EN_TN_CACHE='/home/jenkinsci/TestData/text_norm/ci/grammars/11-18-23-0'
1717
ES_TN_CACHE='/home/jenkinsci/TestData/text_norm/ci/grammars/10-27-23-0'

nemo_text_processing/text_normalization/ar/taggers/decimal.py

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -19,31 +19,6 @@
1919
from nemo_text_processing.text_normalization.ar.utils import get_abs_path
2020

2121

22-
def get_quantity(decimal: "pynini.FstLike", cardinal_up_to_hundred: "pynini.FstLike") -> "pynini.FstLike":
23-
"""
24-
Returns FST that transforms either a cardinal or decimal followed by a quantity into a numeral,
25-
e.g. 5 مليون -> integer_part: "خمسة" quantity: "مليون"
26-
e.g. 5.4 مليون -> integer_part: "خمسة" fractional_part: "اربعة من عشرة" quantity: "مليون"
27-
28-
Args:
29-
decimal: decimal FST
30-
cardinal_up_to_hundred: cardinal FST
31-
"""
32-
numbers = cardinal_up_to_hundred
33-
34-
res = (
35-
pynutil.insert('integer_part: "')
36-
+ numbers
37-
+ pynutil.insert('"')
38-
+ pynini.accep(" ")
39-
+ pynutil.insert('quantity: "')
40-
+ quantities
41-
+ pynutil.insert('"')
42-
)
43-
res |= decimal + pynini.accep(" ") + pynutil.insert('quantity: "') + quantities + pynutil.insert('"')
44-
return res
45-
46-
4722
class DecimalFst(GraphFst):
4823
"""
4924
Finite state transducer for classifying decimal, e.g.

0 commit comments

Comments
 (0)