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

Collate bug: loss of tokens during collation #94

Open
matgille opened this issue Aug 28, 2024 · 2 comments
Open

Collate bug: loss of tokens during collation #94

matgille opened this issue Aug 28, 2024 · 2 comments

Comments

@matgille
Copy link

matgille commented Aug 28, 2024

Hi,

I'm facing a loss of tokens with the following json data (juxtaposition_2.json), after collation.
juxtaposition_6.json

Token rmtBBTT is lost during process, and I don't know exactly why. The number of witnesses seems to have some influence on the result.
juxtaposition_6_coll.json

The data is of poor quality (it's HTR output and I want to use collation for correction purposes) but no token should disappear during the collation process...

The test code used to collate this data is the following:

import collatex
import json

with open("juxtaposition_6.json") as input_json:
  collatex_dict = json.load(input_json)
collation_table = collatex.collate(collation=collatex_dict, output="json", segmentation=False, near_match=True)


with open("juxtaposition_6_coll.json", "w") as output_json:
  output_json.write(collation_table)

I'll try to investigate when I have some time. Any clue on where to look ?

Best,

Matthias

@matgille matgille changed the title Collate bug: loss of tokens after collation Collate bug: loss of tokens during collation Aug 28, 2024
@matgille
Copy link
Author

Edit: with near_match set to False, the problem disapears.

@djbpitt
Copy link
Collaborator

djbpitt commented Aug 29, 2024

Thank you, @matgille , for reporting this. Could you please create a small reproducible example? The current input file has a very large number of tokens, which makes it challenging to trace the flow.

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

No branches or pull requests

2 participants