Tool in Mylly: Relation algebra / Composition | fi
Composition of relations
Composition takes two relations and produces the set of combinations of the non-shared attributes where the shared attributes match. Use composition instead of join only when the shared attributes are not of interest in the result.
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 word forms in the first input relation that had their sentence number in the second input relation (all of them), still annotated with their token numbers and lemmas, no longer with the sentence number, but now also with the mood of the sentence.
Note that the two occurrences of on in the result are separate records only because their sentences were annotated with different moods.
- Relation algebra for context