API Documentation¶
semstr.constraints Module¶
Functions¶
contains(s, tag) |
|
incoming_tags(node, except_edge) |
|
outgoing_tags(node, except_edge) |
|
set_prod(set1[, set2]) |
|
tags(node, except_edge, direction) |
Classes¶
Constraints([multigraph, …]) |
|
Direction |
An enumeration. |
Enum |
Generic enumeration. |
TagRule(trigger[, allowed, disallowed]) |
|
Valid([valid, message]) |
Class Inheritance Diagram¶

semstr.convert Module¶
Functions¶
add_boolean_option(argparser, name, description) |
|
add_convert_args(p) |
|
add_verbose_arg(argparser, **kwargs) |
|
from_amr(lines[, passage_id, …]) |
Converts from parsed text in AMR PENMAN format to a Passage object. |
from_conll(lines, passage_id[, …]) |
Converts from parsed text in CoNLL format to a Passage object. |
from_conllu(lines[, passage_id, …]) |
Converts from parsed text in Universal Dependencies format to a Passage object. |
from_export(lines[, passage_id, return_original]) |
Converts from parsed text in NeGra export format to a Passage object. |
from_sdp(lines, passage_id[, mark_aux, …]) |
Converts from parsed text in SemEval 2015 SDP format to a Passage object. |
glob(pathname, *[, recursive]) |
Return a list of paths matching a pathname pattern. |
iter_files(patterns) |
|
iter_passages(patterns[, desc, …]) |
|
main(args) |
|
map_labels(passage, label_map_file) |
|
print_errors(errors, passage_id[, id_len]) |
|
to_amr(passage[, metadata, wikification, …]) |
Convert from a Passage object to a string in AMR PENMAN format (export) |
to_conll(passage[, test, tree, preprocess]) |
Convert from a Passage object to a string in CoNLL-X format (conll) |
to_conllu(passage[, test, enhanced, preprocess]) |
Convert from a Passage object to a string in Universal Dependencies format (conllu) |
to_export(passage[, test, tree]) |
Convert from a Passage object to a string in NeGra export format (export) |
to_sdp(passage[, test, tree, mark_aux, …]) |
Convert from a Passage object to a string in SemEval 2015 SDP format (sdp) |
validate(passage[, normalization, …]) |
|
write_passage(passage[, out_dir, …]) |
semstr.evaluate Module¶
Functions¶
add_boolean_option(argparser, name, description) |
|
add_verbose_arg(argparser, **kwargs) |
|
align_fields(fields, titles, title2index) |
Make sure score fields for individual passage are aligned with summary result fields by inserting empties |
evaluate_all(evaluate, files[, name, …]) |
|
evaluate_amr(*args, **kwargs) |
|
evaluate_conllu(*args, **kwargs) |
|
evaluate_sdp(*args, **kwargs) |
|
main(args) |
|
passage_format(filename) |
|
read_files(files[, verbose, force_basename]) |
|
summarize(scores[, errors]) |
|
write_csv(filename, rows) |
Classes¶
ConvertedPassage(converted[, original, …]) |
|
Scores(scores) |
Keeps score objects from multiple formats and/or languages |
groupby(iterable[, key]) |
keys and groups from the iterable. |
repeat(object [,times]) |
for the specified number of times. |
Class Inheritance Diagram¶

semstr.validation Module¶
Functions¶
amr_constraints(*args, **kwargs) |
|
check_implicit_children(constraints, node) |
|
check_multigraph(constraints, node) |
|
check_multiple_incoming(constraints, node) |
|
check_orphan_terminals(constraints, terminal) |
|
check_required_outgoing(constraints, node) |
|
check_root_terminal_children(constraints, …) |
|
check_tag_rules(constraints, node) |
|
check_top_level_allowed(constraints, l1) |
|
check_top_level_only(constraints, l1, node) |
|
conllu_constraints(*args, **kwargs) |
|
detect_cycles(passage) |
|
join(edges) |
|
print_errors(errors, passage_id[, id_len]) |
|
sdp_constraints(*args, **kwargs) |
|
ucca_constraints(*args, **kwargs) |
|
validate(passage[, normalization, …]) |