mirror of
https://github.com/k2-fsa/icefall.git
synced 2025-09-03 22:24:19 +00:00
Small change to avoid hardcoded change in make_kn_lm.py
Signed-off-by: Xinyuan Li <xli257@b17.clsp.jhu.edu>
This commit is contained in:
parent
eec59410f1
commit
6ba1e63c41
@ -169,7 +169,10 @@ class NgramCounts:
|
||||
with open(filename, encoding=default_encoding) as fp:
|
||||
for line in fp:
|
||||
line = line.strip(strip_chars)
|
||||
self.add_raw_counts_from_line(line.split()[0])
|
||||
if self.ngram_order == 1:
|
||||
self.add_raw_counts_from_line(line.split()[0])
|
||||
else:
|
||||
self.add_raw_counts_from_line(line)
|
||||
lines_processed += 1
|
||||
if lines_processed == 0 or args.verbose > 0:
|
||||
print(
|
||||
|
Loading…
x
Reference in New Issue
Block a user