Skip to content

Commit

Permalink
Generate NL sentences.csv under a new nl directory. (#246)
Browse files Browse the repository at this point in the history
  • Loading branch information
keyurva authored Nov 6, 2023
1 parent f5155a1 commit 00c9b3a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
File renamed without changes.
1 change: 1 addition & 0 deletions simple/stats/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
OBSERVATIONS_FILE_NAME_PREFIX = "observations"
DEBUG_RESOLVE_FILE_NAME_PREFIX = "debug_resolve"
PROCESS_DIR_NAME = "process"
NL_DIR_NAME = "nl"

PROPERTY_DESCRIPTION = "description"
"""
Expand Down
4 changes: 3 additions & 1 deletion simple/stats/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ def __init__(
) -> None:
self.input_fh = create_file_handler(input_path)
self.output_dir_fh = create_file_handler(output_dir)
self.nl_dir_fh = self.output_dir_fh.make_file(f"{constants.NL_DIR_NAME}/")
self.process_dir_fh = self.output_dir_fh.make_file(
f"{constants.PROCESS_DIR_NAME}/")
self.reporter = ImportReporter(report_fh=self.process_dir_fh.make_file(
Expand All @@ -57,6 +58,7 @@ def __init__(
self.nodes = Nodes(self.config)

self.output_dir_fh.make_dirs()
self.nl_dir_fh.make_dirs()
self.process_dir_fh.make_dirs()

def run(self):
Expand All @@ -71,7 +73,7 @@ def run(self):
# Generate SV sentences.
nl.generate_sv_sentences(
list(self.nodes.variables.values()),
self.output_dir_fh.make_file(constants.SENTENCES_FILE_NAME))
self.nl_dir_fh.make_file(constants.SENTENCES_FILE_NAME))

# Report done.
self.reporter.report_done()
Expand Down

0 comments on commit 00c9b3a

Please sign in to comment.