Skip to content

automatically align jdsw with cleaned source texts #11

Description

@thatbudakguy

@GDRom has already done some work to do this manually; we want to see if we can automate it.

#10 is a prerequisite for getting the JDSW in shape to align.
#9 is a prerequisite for getting 正文 versions to align to.

this uses a modified version of the algorithm from #10:

  1. Look thru cleaned JDSW from clean annotations of commentaries from jdsw #10 and break it up into k: v store, where each key is every unbroken sequence of characters prior to an annotation
  2. For each key: value pair...
    a. Look through the source text (same chapter) and find the first instance of the key (unbroken) that occurs after the previous annotation (annotations must be sequential)
    b. If that key is found, take the JDSW annotation and insert it into the source text at that point
    c. If that key isn't found, just skip since we'll already know about it from clean annotations of commentaries from jdsw #10

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions