Tool in Mylly: Relation algebra / Part that matches | fi
Part that matches another relation
Match takes two relations and produces the records of the first relation that match the shared attributes of the second.
The input and output relations are represented as TSV files.
The first input relation consists of some word forms annotated with a lemma, a sentence number, and a token number. The second input relation consists of sentence numbers annotated with the mood of a sentence.
The output relation consists of those records of the first input relation that had their sentence number in the second input relation (all of them).
On the other hand, reversing the roles of the input relations produces those records of the second relation (the one that annotates sentence numbers with moods) that have at least one corresponding token in the first relation (sentences 3 and 5 but no sentence 4).
- Relation algebra for context