Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alignment error #66

Open
djbpitt opened this issue Aug 19, 2018 · 0 comments
Open

Alignment error #66

djbpitt opened this issue Aug 19, 2018 · 0 comments

Comments

@djbpitt
Copy link
Collaborator

djbpitt commented Aug 19, 2018

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant