Alignment error
Opened this issue · 0 comments
djbpitt commented
Given the following in a Jupyter Notebook, using CollateX Python 2.2:
%reload_ext autoreload
%autoreload 2
from collatex import *
collation1 = Collation()
collation1.add_plain_witness("A", "The gray koala.")
collation1.add_plain_witness("B", "The gray koala.")
collation1.add_plain_witness("C", "The koala lives in a tree.")
table1 = collate(collation1, segmentation=False)
print(table1)
collation2 = Collation()
collation2.add_plain_witness("A", "The gray koala.")
collation2.add_plain_witness("B", "The big gray koala.")
collation2.add_plain_witness("C", "The koala lives in a tree.")
table2 = collate(collation2, segmentation=False)
print(table2)
collation3 = Collation()
collation3.add_plain_witness("C", "The koala lives in a tree.")
collation3.add_plain_witness("A", "The gray koala.")
collation3.add_plain_witness("B", "The big gray koala.")
table3 = collate(collation3, segmentation=False)
print(table3)
The output is:
+---+-----+------+-------+-------+----+---+------+---+
| A | The | gray | koala | - | - | - | - | . |
| B | The | gray | koala | - | - | - | - | . |
| C | The | - | koala | lives | in | a | tree | . |
+---+-----+------+-------+-------+----+---+------+---+
+---+-----+-------+-------+-------+---+------+---+
| A | The | - | gray | koala | - | - | . |
| B | The | big | gray | koala | - | - | . |
| C | The | koala | lives | in | a | tree | . |
+---+-----+-------+-------+-------+---+------+---+
+---+-----+-----+------+-------+-------+----+---+------+---+
| C | The | - | - | koala | lives | in | a | tree | . |
| A | The | - | gray | koala | - | - | - | - | . |
| B | The | big | gray | koala | - | - | - | - | . |
+---+-----+-----+------+-------+-------+----+---+------+---+
The first and third collations are correct; the second is incorrect. The second has the same witnesses as the third, but they are added in a different order.