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

improve footnote reference and text alignment so footnotes from other cases do not appear #2063

Draft
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

ccatalfo-hil
Copy link

adjust and expand on case footnote ref/text matching logic in attempt to correctly match up refs and footnote texts.

The general approach is to try to use csae index to align footnote refs with texts, only relying the data available within the last export stage (docx stage).

  1. attempts to find which case each footnote ref and text belong to by alignging with closest document string position of case title, reference text and footnote text.

  2. corrects missing node_id variable (was previously always empty) and adjusts mark_text to include casebook index. These 2 variables are used to align refs and texts together.

  3. checks for footnote text elision marker and forces removal of corresponding footnote ref when found.

Note: there is an empirically found magic number of 1000 when looking for first real reference of case title.

… to correctly match up refs and footnote texts.

The general approach is to try to use csae index to align footnote refs with texts, only relying the data available within the last export stage (docx stage).

1. attempts to find which case each footnote ref and text belong to by alignging with closest document string position of case title, reference text and footnote text.

2. corrects missing node_id variable (was previously always empty) and adjusts mark_text to include casebook index. These 2 variables are used to align refs and texts together.

3. checks for footnote text elision marker and forces removal of corresponding footnote ref when found.

Note: there is an empirically found magic number of 1000 when looking for first real reference of case title.
@ccatalfo-hil ccatalfo-hil requested a review from a team as a code owner October 20, 2024 13:42
@ccatalfo-hil ccatalfo-hil requested review from cmsetzer and removed request for a team October 20, 2024 13:42
@ccatalfo-hil ccatalfo-hil marked this pull request as draft October 20, 2024 13:44
@rebeccacremona rebeccacremona removed the request for review from cmsetzer October 22, 2024 16:56
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

Successfully merging this pull request may close these issues.

1 participant