Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

actually add a default value #621

Merged
merged 1 commit into from
Jan 26, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions kgtk/cli/lexicalize.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
DEFAULT_HAS_PROPERTIES: typing.List[str] = []
DEFAULT_PROPERTY_VALUES: typing.List[str] = ["P17"]
DEFAULT_SENTENCE_LABEL: str = "sentence"
DEFAULT_LANGUAGE_PROPERTIES: str = "en"
DEFAULT_LANGUAGE: str = "en"

OUTPUT_COLUMNS: typing.List[str] = ["node1", "label", "node2"]

Expand Down Expand Up @@ -61,7 +61,7 @@ def add_arguments_extended(parser: KGTKArgumentParser, parsed_shared_args: Names
help="The description properties. (default=%s)" % repr(DEFAULT_DESCRIPTION_PROPERTIES))

parser.add_argument("--language", dest="language", nargs="*",
help="The label and description language. (default=%s)" % repr(DEFAULT_LANGUAGE_PROPERTIES))
help="The label and description language. (default=%s)" % repr(DEFAULT_LANGUAGE))

parser.add_argument("--isa-properties", dest="isa_properties", nargs="*",
help="The isa properties. (default=%s)" % repr(DEFAULT_ISA_PROPERTIES))
Expand Down Expand Up @@ -160,6 +160,9 @@ def run(input_file: KGTKFiles,
if property_values is None:
property_values = DEFAULT_PROPERTY_VALUES

if language is None:
language = DEFAULT_LANGUAGE

# Show the final option structures for debugging and documentation.
if show_options:
print("--input-file=%s" % str(input_kgtk_file), file=error_file, flush=True)
Expand Down