Skip to content

Commit

Permalink
Update srilm.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Atticus1806 authored Dec 6, 2023
1 parent e48ff4f commit 4bcb705
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lm/srilm.py
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ def _create_cmd(self) -> List[str]:
def run(self):
"""Call the srilm script and extracts the different weights from the log, then relinks log to output folder"""
cmd = self._create_cmd()
subprocess.check_call(cmd, stdout=open("cbm.log", "wb"), stderr=subprocess.STDOUT)
subprocess.check_call(cmd, stdout=open("cbm.log", "wt"), stderr=subprocess.STDOUT)

lines = open("cbm.log", "rt").readlines()
lbds = lines[-2].split("(")[1].replace(")", "")
Expand Down

0 comments on commit 4bcb705

Please sign in to comment.