scaife-viewer / beyond-translation-site

Site used to iterate on translation alignments within the Scaife Viewer ecosystem
3 stars 4 forks source link

Add the ability to browse to other instances of a lemma in a given text #48

Closed jacobwegner closed 2 years ago

jacobwegner commented 2 years ago

(aka, the lemma traversal widget)

Similar to what is possible on vocab.perseus.org:

image

Acceptance Criteria

Developer Notes

Have started some WIP queries locally; need to think through performance as number of lemmas grow.

jacobwegner commented 2 years ago

(There might be some reusable bits with something like the table of contents widget, with the difference being that we generate the TOC on-demand rather than at ingestion time)

jacobwegner commented 2 years ago

@gregorycrane I have a first pass of this done.

1) Browse to https://beyond-translation-gagdt-dev.herokuapp.com/reader/urn:cts:greekLit:tlg0012.tlg001.perseus-grc2:5.34?mode=syntax-trees&entryUrn=urn%3Acite2%3AexploreHomer%3Aentries.atlas_v1%3A1.6424 2) Click μῆνιν in 5.34 3) Scroll down to the "Passages With Lemma" widget

image

4) Click 1.1 in the widget to navigate to 1.1;

image

5) Navigate to other occurrences

gregorycrane commented 2 years ago

This is really really good!

A useful addition -- hopefully easy: include the form as well as the citation. You get the citation from the record that also have the form in it. You have space to print the form next to each citation -- a big help.

So the record for mhnin in Il. 5.34 is:

<word id="29" form="μῆνιν" lemma="μῆνις" postag="n-s---fa-" head="28" relation="OBJ" cite="urn:cts:greekLit:tlg0012.tlg001:5.34"/>

Print:

5.34 μῆνιν

or even use the postag:

5.34 μῆνιν n-s---fa-
gregorycrane commented 2 years ago

This display allowed me immediately to see an error in the lemmatization

ἀλεώμεθα does not mean "grind" and come from ἀλέω. It comes from ἀλέομαι, "to escape"

image

jacobwegner commented 2 years ago

I'll be deploying the changes we talked about (adding form and postag) later this afternoon:

image

gregorycrane commented 2 years ago

Now THAT is EVEN more awesome! This is great!

jacobwegner commented 2 years ago

We'll iterate using https://github.com/scaife-viewer/beyond-translation-site/issues/56