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 and Apparatus View #16

Open
hlapin opened this issue Mar 21, 2018 · 15 comments
Open

Alignment and Apparatus View #16

hlapin opened this issue Mar 21, 2018 · 15 comments
Assignees

Comments

@hlapin
Copy link
Collaborator

hlapin commented Mar 21, 2018

Updated "index-Wit-Compos.xsl"
@raffazizzi
This runs faster than the original and combines the two steps in app:index-compos into one, gets rid of the need for index.xml, and groupFromIndex.xsl. Also does not need parameters passed.
Resulting XML has an element for every ab whether populated or not.
Assuming that exist caches the results of xslt transformations (docs to transform:transform, if I understood correctly), or if result document is storable, it should be immediately reusable for all the compare page elements: left TOC and wit list.
at heading should also provide text for mouseovers on the witlist if we want them.
Did not want to touch major changes until I understand the templating functions better.

@hlapin hlapin changed the title Updated "index-Wit-Compos.xsl" Alignment and Apparatus View Mar 23, 2018
@hlapin
Copy link
Collaborator Author

hlapin commented Mar 23, 2018

Have implemented some changes based on new xsl.
Does improve speed. One question: perhaps since ref.xml is effectively an index we can set up a procedure that runs this transform whenever the [header of] ref.xml is updated with new xrefs or new docs are loaded in the database. The saved XML (or json?) can then be queried rather than generated at run time.

@hlapin hlapin closed this as completed Mar 23, 2018
@hlapin hlapin reopened this Mar 23, 2018
@hlapin
Copy link
Collaborator Author

hlapin commented Mar 23, 2018

Rather than "variant/invariant" we should do grouping on surface. Same algorithm should work for both alignment and apparatus view. Apparatus view is NOT grouping properly (seems to not group the not-equal-to-group-1 items correctly).
I can work on this, but need @raffazizzi 's help to know how to return data so that it can by styled properly.
Styling is also an issue now that tokenization separates h1/h2; these are in IDs; need styles to distinguish.

@hlapin
Copy link
Collaborator Author

hlapin commented Mar 23, 2018

Whole chapter view:
Needs to check each mishnah and see if individual mishnah is attested in that witness.

@hlapin
Copy link
Collaborator Author

hlapin commented Mar 25, 2018

Whole chapter view on align/apparatus and synoptic view improved with latest sync.

@hlapin
Copy link
Collaborator Author

hlapin commented Mar 26, 2018

@raffazizzi raffazizzi self-assigned this Mar 29, 2018
@raffazizzi
Copy link
Member

http://localhost:8080/exist/apps/digitalmishnah/compare/4.1.2.1/S07326,S00483,S01520/apparatus
Apparatus view fails on reordering. Why?

It's because of this: https://github.com/umd-mith/mishnah/blob/exist/xsl/apparatus.xsl#L15
And it only becomes problematic in that comparison when S07326 is the base text.

@hlapin can you have a look at either the XSLT or the XML?

@hlapin
Copy link
Collaborator Author

hlapin commented Apr 8, 2018

Rather than "variant/invariant" we should do grouping on surface. Same algorithm should work for both alignment and apparatus view. Apparatus view is NOT grouping properly (seems to not group the not-equal-to-group-1 items correctly).
I can work on this, but need @raffazizzi 's help to know how to return data so that it can by styled properly.
Styling is also an issue now that tokenization separates h1/h2; these are in IDs; need styles to distinguish.

[replied by email, but copying here]
Rather than variant/invariant, we can use the same algorithm that we use in apparatus (also needs work, but I need to experiment a bit and see what is going on) to distinguish groups of distinct values and use colors or styling to do this.
This becomes a teensy bit more complicated than I realized with curated collations and we have some decisions to make and work around those.
For editing alignments we converted adjacent tokens with additions and deletions into distinct runs of text.. E.g.

    [The]     (E)U[SA] 
    tkn1      tkn2  

becomes:

h1:               EU 
                  tkn2-h1 

h2:     The       USA 
        tkn1-h1   tkn2-h2     

The ids with the suffixes -h1 and -h2 correspond to the same tokens.

For DISPLAY, I suspect that the typographical distinctions are both sufficient and in some ways better, because they better correspond to what visually appears in the text.
So this may get messy:

  • when things are flagged -h1, -h2 we need the css to pick up and distinguish
  • possibility of double alignments (h1/h2 in A align with h1/h2 in witness B)

What is the simplest way to handle this?

@raffazizzi
Copy link
Member

when things are flagged -h1, -h2 we need the css to pick up and distinguish

Is it always going to be h1 and h2, or is it incremental? (h3, h4, ...)

@hlapin
Copy link
Collaborator Author

hlapin commented Apr 10, 2018 via email

@raffazizzi
Copy link
Member

Something like this? (We can pick better colors)
screenshot from 2018-04-10 14-45-53

I got the h1/h2 from "resp" in the JSON table rather than the end of the id string. Is that a reliable place? It could be incremental as long as there's data in the "resp" field, but we'll need to add more colors to the CSS.

We'll discuss how to handle this in the TEI stand-off collations when we talk.

@hlapin
Copy link
Collaborator Author

hlapin commented Apr 10, 2018 via email

@hlapin
Copy link
Collaborator Author

hlapin commented Apr 10, 2018 via email

@raffazizzi
Copy link
Member

Ok, I've committed code for this. I'll leave this issue open because we still have the TEI part to sort out.

@hlapin
Copy link
Collaborator Author

hlapin commented Apr 10, 2018 via email

@hlapin
Copy link
Collaborator Author

hlapin commented Apr 20, 2018

Added a new collation 4.2.5.1.xml to collations based on my changes to editor and @raffazizzi's new toTEI.js implementation.

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