Skip to content

Commit 995ef70

Browse files
authored
[fix] english tn, whitelist exclude punct (#228)
1 parent eb94c53 commit 995ef70

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

tn/english/rules/whitelist.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ def _get_whitelist_graph(input_case,
106106

107107
states.extend(additional_options)
108108
state_graph = pynini.string_map(states)
109-
graph |= pynini.closure(self.NOT_SPACE, 1) + pynini.union(
109+
graph |= pynini.closure(self.ALPHA, 1) + pynini.union(
110110
", ", ",") + pynini.invert(state_graph).optimize()
111111

112112
self.graph = graph.optimize()

tn/english/test/data/whitelist.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@ Hon. => honorable
33
Mt. => Mount
44
Maj. => Major
55
Rev. => Reverend
6+
Stroudsburg, PA => Stroudsburg, Pennsylvania

0 commit comments

Comments
 (0)