Skip to content

Commit

Permalink
reviewer comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Christoph Lüscher committed Mar 26, 2024
1 parent 51d5a63 commit d0c3865
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions lm/srilm.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ def __init__(
self.counts = counts
self.vocab = vocab
self.count_exe = count_exe
self.discount_args = extra_discount_args
self.discount_args = extra_discount_args or []

self.out_discounts = self.output_path("discounts", cached=True)

Expand All @@ -138,18 +138,11 @@ def create_files(self):
f"{self.count_exe.get_path()} \\\n",
f" -order {self.ngram_order} \\\n",
f" -vocab {self.vocab.get_cached_path()} \\\n",
]

cmd += [
f" -kn discounts",
f" -read {self.counts.get_cached_path()} \\\n",
f" {' '.join(self.discount_args)} -memuse\n",
]

if self.discount_args is not None:
cmd += [
f" {' '.join(self.discount_args)} -memuse\n",
]

create_executable("run.sh", cmd)

def run(self):
Expand Down

0 comments on commit d0c3865

Please sign in to comment.