Skip to content

Commit

Permalink
link-parser.1: Add !dialect
Browse files Browse the repository at this point in the history
  • Loading branch information
ampli committed Feb 23, 2021
1 parent ab96fb5 commit 9a62ddc
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
12 changes: 12 additions & 0 deletions link-parser/link-parser.c
Original file line number Diff line number Diff line change
Expand Up @@ -682,11 +682,23 @@ int main(int argc, char * argv[])
parse_options_set_disjunct_cost(opts,
linkgrammar_get_dict_max_disjunct_cost(dict));

/* Remember the debug setting, because we temporary neglect it below. */
int verbosity_tmp = parse_options_get_verbosity(opts);
char *debug_tmp = strdup(parse_options_get_debug(opts));
char *test_tmp = strdup(parse_options_get_test(opts));

parse_options_set_verbosity(opts, 1); /* XXX assuming 1 is the default */
parse_options_set_debug(opts, "");
parse_options_set_test(opts, "");
save_default_opts(copts); /* Options so far are the defaults */

/* Restore the debug setting. */
parse_options_set_verbosity(opts, verbosity_tmp);
parse_options_set_debug(opts, debug_tmp);
parse_options_set_test(opts, test_tmp);
free(debug_tmp);
free(test_tmp);

/* Process options used by GNU programs. */
int quiet_start = 0; /* Iff > 0, inhibit the initial messages */
for (int i = 1; i < argc; i++)
Expand Down
9 changes: 9 additions & 0 deletions man/link-parser.1
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,12 @@ Flat, treebank-style tree (A like (B this))
.BR !cost-max \ (2.7)
Largest cost to be considered.
.TP
.BR !dialect \ (no\ value)
Use the specified (comma-separated) names.
.br
They modify the disjunct cost of dictionary words
whose expressions contain symbolic cost specifications.
.TP
.BR !disjuncts \ (off)
Display of disjuncts used.
.TP
Expand Down Expand Up @@ -433,6 +439,9 @@ Regular expressions (see
.BR regex (7))
that are used to match tokens not found in the dictionary.
.TP
.IR LL /4.0.dialect
Dialect component definitions.
.TP
.IR LL /4.0.knowledge
Post-processing definitions.
.TP
Expand Down

0 comments on commit 9a62ddc

Please sign in to comment.