1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
// This is free and unencumbered software released into the public domain.
//! RDF matching: the matcher marker trait and serialization options.
use crateExecute;
use ;
use Builder;
/// An exact or approximate matcher that consumes RDF and describes matches as RDF.
///
/// The output need not be a subset of the input: it can introduce statements
/// describing correspondences or scores. The program defines the matching
/// relation, compared entities or reference data, output vocabulary, and score
/// interpretation. The pattern imposes no universal algorithm or score scale.
///
/// # Command-line contract
///
/// `PROGRAM [OPTIONS] [INPUT-FILE [OUTPUT-FILE]]`
///
/// Input and output default to stdin and stdout. A single operand selects
/// input; two select input then output, with `-` denoting a standard stream.
/// [`MatcherOptions`] selects serializations, both defaulting to `jsonl`.
///
/// `T` represents the result in the implementation's chosen form. The
/// concrete execution and transport behavior is documented through
/// [`crate::programs`]. See also the [matcher specification][spec].
///
/// [spec]: https://asimov-specs.github.io/program-patterns/#matcher
/// Input/output formats and additional arguments for a [`Matcher`].
///
/// `Default` leaves formats unset and `other` empty. The process wrapper omits
/// unset flags and lets the program apply its defaults. This type selects no
/// matching algorithm and does not validate or transform RDF.
///
/// # Examples
///
/// ```rust
/// use asimov_patterns::MatcherOptions;
///
/// let options = MatcherOptions::builder()
/// .input("jsonl")
/// .output("jsonl")
/// .build();
/// ```