scaife-viewer / beyond-translation-site

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

Ingest and display Cambridge Greek Lexicon #63

Open jacobwegner opened 2 years ago

jacobwegner commented 2 years ago

Developer Notes

Sample for μῆνις from LSJ

{
  dictionaryEntries(urn:"urn:cite2:scafife-viewer:dictionary-entries.atlas_v1:lsj-67481") {
    edges {
      node {
        idx
        urn
        headword
        headwordNormalized
        data
        dictionary {
          label
          urn
        }
      }
    }
  }
}
{
  "data": {
    "dictionaryEntries": {
      "edges": [
        {
          "node": {
            "idx": 67480,
            "urn": "urn:cite2:scafife-viewer:dictionary-entries.atlas_v1:lsj-67481",
            "headword": "μῆνις",
            "headwordNormalized": "μῆνις",
            "data": {
              "content": "<div class=\"entry\"> <span class=\"orth greek\">μῆνις</span>, Dor. and Aeol. <span class=\"orth greek\">μᾶν-</span>, <span class=\"gen greek\">ἡ</span>, gen. <div style=\"margin-top: 1.0em;\" class=\"sense depth-1\"> <span><strong>A).</strong></span> <span class=\"quote greek\">μήνιος</span> <a class=\"bibl\" target=\"_blank\" data-urn=\"urn:cts:greekLit:tlg0059.tlg030.perseus-grc1:390e\" href=\"https://catalog-api-dev.scaife.eldarion.com/urn:cts:greekLit:tlg0059.tlg030.perseus-grc1:390e/canonical-url/\"> <span class=\"author\" style=\"font-variant: small-caps;\">Pl.</span> <span class=\"title\" style=\"font-style: italic;\">R.</span> 390e </a> , later <span class=\"quote greek\">μήνιδος</span> <a class=\"bibl\" target=\"_blank\" data-urn=\"urn:cts:greekLit:tlg0545.tlg004:80\" href=\"https://catalog-api-dev.scaife.eldarion.com/urn:cts:greekLit:tlg0545.tlg004:80/canonical-url/\"> <span class=\"author\" style=\"font-variant: small-caps;\">Ael.</span> <span class=\"title\" style=\"font-style: italic;\">Fr.</span> 80 </a> , <a class=\"bibl\" target=\"_blank\" data-urn=\"urn:cts:greekLit:tlg2001.tlg022:265d\" href=\"https://catalog-api-dev.scaife.eldarion.com/urn:cts:greekLit:tlg2001.tlg022:265d/canonical-url/\"> <span class=\"author\" style=\"font-variant: small-caps;\">Them.</span> <span class=\"title\" style=\"font-style: italic;\">Or.</span> 22.265d </a>, <a class=\"bibl\" target=\"_blank\" data-urn=\"urn:cts:greekLit:tlg2003.tlg001:2:50b\" href=\"https://catalog-api-dev.scaife.eldarion.com/urn:cts:greekLit:tlg2003.tlg001:2.50b/canonical-url/\"> <span class=\"author\" style=\"font-variant: small-caps;\">Jul.</span> <span class=\"title\" style=\"font-style: italic;\">Or.</span> 2.50b </a>, <span class=\"bibl\"> <span class=\"title\" style=\"font-style: italic;\">AP</span> 9.168 </span> (<span class=\"bibl\"> <span class=\"author\" style=\"font-variant: small-caps;\">Pall.</span></span>):—<span class=\"tr\" style=\"font-weight: bold;\">wrath</span>; from <span class=\"bibl\"> <span class=\"author\" style=\"font-variant: small-caps;\">Hom.</span> </span> downwds. freq. of the <span class=\"tr\" style=\"font-weight: bold;\">wrath</span> of the gods, <a class=\"bibl\" target=\"_blank\" data-urn=\"urn:cts:greekLit:tlg0012.tlg001.perseus-grc1:5:34\" href=\"https://catalog-api-dev.scaife.eldarion.com/urn:cts:greekLit:tlg0012.tlg001.perseus-grc2:5.34/canonical-url/\"> <span class=\"author\" style=\"font-variant: small-caps;\">Il.</span> 5.34 </a>, al., <a class=\"bibl\" target=\"_blank\" data-urn=\"urn:cts:greekLit:tlg0085.tlg005.perseus-grc1:701\" href=\"https://catalog-api-dev.scaife.eldarion.com/urn:cts:greekLit:tlg0085.tlg005.perseus-grc1:701/canonical-url/\"> <span class=\"author\" style=\"font-variant: small-caps;\">A.</span> <span class=\"title\" style=\"font-style: italic;\">Ag.</span> 701 </a> (lyr.), <a class=\"bibl\" target=\"_blank\" data-urn=\"urn:cts:greekLit:tlg0059.tlg034.perseus-grc1:880e\" href=\"https://catalog-api-dev.scaife.eldarion.com/urn:cts:greekLit:tlg0059.tlg034.perseus-grc1:880e/canonical-url/\"> <span class=\"author\" style=\"font-variant: small-caps;\">Pl.</span> <span class=\"title\" style=\"font-style: italic;\">Lg.</span> 880e </a>, <a class=\"bibl\" target=\"_blank\" data-urn=\"urn:cts:greekLit:tlg0541.tlg001:585\" href=\"https://catalog-api-dev.scaife.eldarion.com/urn:cts:greekLit:tlg0541.tlg001:585/canonical-url/\"> <span class=\"author\" style=\"font-variant: small-caps;\">Men.</span> 585 </a>; <span class=\"foreign greek\">μῆνιν ἔχειν ἀπὸ θεοῦ</span> Vett. Val. <a class=\"bibl\" target=\"_blank\" data-urn=\"urn:cts:greekLit:tlg0541.tlg001:184:3\" href=\"https://catalog-api-dev.scaife.eldarion.com/urn:cts:greekLit:tlg0541.tlg001:184.3/canonical-url/\"> 184.3 </a>; <span class=\"quote greek\">μ. χθονίων</span> <a class=\"bibl\" target=\"_blank\" data-urn=\"urn:cts:greekLit:tlg0033.tlg002.perseus-grc1:4:159\" href=\"https://catalog-api-dev.scaife.eldarion.com/urn:cts:greekLit:tlg0033.tlg002.perseus-grc1:4.159/canonical-url/\"> <span class=\"author\" style=\"font-variant: small-caps;\">Pi.</span> <span class=\"title\" style=\"font-style: italic;\">P.</span> 4.159 </a> ; also of the dead worshipped as heroes, <span class=\"quote greek\">τοῖσι μ. κατέσκηψε Ταλθυβίου</span> <a class=\"bibl\" target=\"_blank\" data-urn=\"urn:cts:greekLit:tlg0016.tlg001.perseus-grc1:7:134\" href=\"https://catalog-api-dev.scaife.eldarion.com/urn:cts:greekLit:tlg0016.tlg001.perseus-grc1:7.134/canonical-url/\"> <span class=\"author\" style=\"font-variant: small-caps;\">Hdt.</span> 7.134 </a> , cf. <a class=\"bibl\" target=\"_blank\" data-urn=\"urn:cts:greekLit:tlg0016.tlg001.perseus-grc1:137\" href=\"https://catalog-api-dev.scaife.eldarion.com/urn:cts:greekLit:tlg0016.tlg001.perseus-grc1:137/canonical-url/\"> 137 </a>; <span class=\"quote greek\">μ. τῶν τετελευτηκότων</span> <a class=\"bibl\" target=\"_blank\" data-urn=\"urn:cts:greekLit:tlg0059.tlg025:282a\" href=\"https://catalog-api-dev.scaife.eldarion.com/urn:cts:greekLit:tlg0059.tlg025:282a/canonical-url/\"> <span class=\"author\" style=\"font-variant: small-caps;\">Pl.</span> <span class=\"title\" style=\"font-style: italic;\">Hp.Ma.</span> 282a </a> ; of injured parents, <a class=\"bibl\" target=\"_blank\" data-urn=\"urn:cts:greekLit:tlg0085.tlg005.perseus-grc1:155\" href=\"https://catalog-api-dev.scaife.eldarion.com/urn:cts:greekLit:tlg0085.tlg005.perseus-grc1:155/canonical-url/\"> <span class=\"author\" style=\"font-variant: small-caps;\">A.</span> <span class=\"title\" style=\"font-style: italic;\">Ag.</span> 155 </a> (lyr.), <a class=\"bibl\" target=\"_blank\" data-urn=\"urn:cts:greekLit:tlg0085.tlg006.perseus-grc1:294\" href=\"https://catalog-api-dev.scaife.eldarion.com/urn:cts:greekLit:tlg0085.tlg006.perseus-grc1:294/canonical-url/\"> <span class=\"title\" style=\"font-style: italic;\">Ch.</span> 294 </a>; of suppliants, <a class=\"bibl\" target=\"_blank\" data-urn=\"urn:cts:greekLit:tlg0085.tlg007.perseus-grc1:234\" href=\"https://catalog-api-dev.scaife.eldarion.com/urn:cts:greekLit:tlg0085.tlg007.perseus-grc1:234/canonical-url/\"> <span class=\"author\" style=\"font-variant: small-caps;\">Id.</span> <span class=\"title\" style=\"font-style: italic;\">Eu.</span> 234 </a>, cf. <a class=\"bibl\" target=\"_blank\" data-urn=\"urn:cts:greekLit:tlg0006.tlg004.perseus-grc1:762\" href=\"https://catalog-api-dev.scaife.eldarion.com/urn:cts:greekLit:tlg0006.tlg004.perseus-grc1:762/canonical-url/\"> <span class=\"author\" style=\"font-variant: small-caps;\">E.</span> <span class=\"title\" style=\"font-style: italic;\">Heracl.</span> 762 </a> (lyr.): but also, generally, of the <span class=\"tr\" style=\"font-weight: bold;\">wrath</span> of Achilles, <a class=\"bibl\" target=\"_blank\" data-urn=\"urn:cts:greekLit:tlg0012.tlg001.perseus-grc1:1:1\" href=\"https://catalog-api-dev.scaife.eldarion.com/urn:cts:greekLit:tlg0012.tlg001.perseus-grc2:1.1/canonical-url/\"> <span class=\"author\" style=\"font-variant: small-caps;\">Il.</span> 1.1 </a>, al., cf. <span class=\"bibl\"> <span class=\"author\" style=\"font-variant: small-caps;\">Alc.</span> <span class=\"title\" style=\"font-style: italic;\">Supp.</span> 10.7 </span>; of the <span class=\"tr\" style=\"font-weight: bold;\">revengeful temper</span> of a people, <a class=\"bibl\" target=\"_blank\" data-urn=\"urn:cts:greekLit:tlg0020.tlg003.perseus-grc1:21\" href=\"https://catalog-api-dev.scaife.eldarion.com/urn:cts:greekLit:tlg0020.tlg003.perseus-grc1:21/canonical-url/\"> <span class=\"author\" style=\"font-variant: small-caps;\">Hes.</span> <span class=\"title\" style=\"font-style: italic;\">Sc.</span> 21 </a>, <a class=\"bibl\" target=\"_blank\" data-urn=\"urn:cts:greekLit:tlg0016.tlg001.perseus-grc1:7:229\" href=\"https://catalog-api-dev.scaife.eldarion.com/urn:cts:greekLit:tlg0016.tlg001.perseus-grc1:7.229/canonical-url/\"> <span class=\"author\" style=\"font-variant: small-caps;\">Hdt.</span> 7.229 </a>: c. gen. objecti, <span class=\"quote greek\">ὅτου .. μ. τοσήνδε πράγματος στήσας ἔχεις</span> <a class=\"bibl\" target=\"_blank\" data-urn=\"urn:cts:greekLit:tlg0011.tlg004.perseus-grc1:699\" href=\"https://catalog-api-dev.scaife.eldarion.com/urn:cts:greekLit:tlg0011.tlg004.perseus-grc1:699/canonical-url/\"> <span class=\"author\" style=\"font-variant: small-caps;\">S.</span> <span class=\"title\" style=\"font-style: italic;\">OT</span> 699 </a> : in pl., <span class=\"quote greek\">Αἰήταο μήνιες</span> <a class=\"bibl\" target=\"_blank\" data-urn=\"urn:cts:greekLit:tlg0001.tlg001.perseus-grc1:4:1205\" href=\"https://catalog-api-dev.scaife.eldarion.com/urn:cts:greekLit:tlg0001.tlg001.perseus-grc1:4.1205/canonical-url/\"> <span class=\"author\" style=\"font-variant: small-caps;\">A.R.</span> 4.1205 </a> .</div> </div><br><br>"
            },
            "dictionary": {
              "label": "LSJ",
              "urn": "urn:cite2:scaife-viewer:dictionaries.v1:lsj"
            }
          }
        }
      ]
    }
  }
}

Sample output in Beyond Translation

image

image

For a first pass, focus on display of content.

Additional passes to mine out sense data, link to authors, etc.

jacobwegner commented 1 year ago

@jtauber gave a demo of display / styling that looks similar to the print book.

Next step is to ingest into Beyond Translation and link to the lemmas we have loaded for texts there.

jacobwegner commented 1 year ago

If we were to link to an author, we'd need to review some of the "front-matter" for abbreviations

jacobwegner commented 1 year ago

Some thoughts on adding styling:

jtauber commented 1 year ago

I now have a pipeline that can produce a tsv with headword and entry where entry is run through a specific XSLT (initial one that just excludes Ann and Cit)

e.g.

ἀβάστακτος      <AE><HG><HL>ἀ<hyph/>βάστακτος</HL><Infl>ον</Infl><PS>adj</PS><Ety><Ref>βαστάζω</Ref></Ety></HG> <aS1><Indic>of a burden, ref. to a responsibility</Indic><Tr>unbearable</Tr><Au>Plu.</Au></aS1></AE>
ἁ̄βᾱτά̄ς  <XE><HG><HL>ἁ̄βᾱτά̄ς</HL><PS>dial.masc.adj</PS></HG> <XR>see<Ref>ἡβητής</Ref></XR> </XE>
jtauber commented 1 year ago

I've pushed the TSV (for alpha) and CSS to the branch.

jtauber commented 1 year ago

Note I haven't fixed the vowel-length diacritic placement yet

jacobwegner commented 1 year ago

I'm working on the scaffolding within Beyond Translation:

image

This will load CSS and apply it to the content contained in the TSV.

jacobwegner commented 1 year ago

Next actions:

jacobwegner commented 1 year ago

@gregorycrane: If you browse to https://beyond-transl-pr-143.herokuapp.com/reader/urn:cts:greekLit:tlg0012.tlg001.perseus-grc2:1.1-1.7?mode=dictionary-entries&entryUrn=urn%3Acite2%3Ascafife-viewer%3Adictionary-entries.atlas_v1%3Acambridge-greek-lexicon-7011 you will see entries for "A"

image

@jtauber and I will keep working on getting additional entries live.

jacobwegner commented 1 year ago

@gregorycrane We're still working on a display / lemma resolution improvement, but @jtauber has expanded from alpha to the rest of the entries:

https://beyond-transl-pr-143.herokuapp.com/reader/urn:cts:greekLit:tlg0012.tlg001.perseus-grc2:1.1-1.7?mode=dictionary-entries&entryUrn=urn%3Acite2%3Ascafife-viewer%3Adictionary-entries.atlas_v1%3Acambridge-greek-lexicon-32364

image
jacobwegner commented 1 year ago

(Blocked pending some additional normalization of data)

jacobwegner commented 12 months ago

@jtauber: @gregorycrane was asking if we think we can get this wrapped up soon.

Do you think you'd have a chance to look at this in the next week, or would you like me to take a crack first via the pattern mentioned in this comment, mimicking headwordNormalizedStripped?

jacobwegner commented 11 months ago

(James is hoping to revisit this by the end of the week)

jacobwegner commented 10 months ago

We're going to merge in #143, but I will leave this issue open for resolving https://github.com/scaife-viewer/beyond-translation-site/issues/63#issuecomment-1609408265

jacobwegner commented 10 months ago

@gregorycrane We have released what I showed you yesterday on the dev instance in the v2023-08-30-001 release