API documentation
Exported functions
Modelling page layout
MiseEnPage.MSPage
— TypeModel for analyzing layout of a page of a manuscript. Note that pagebounds
is an image URN with region of interest showing position of the physical page within a documentary photograph. iliad_bbox
is a bounding box for Iliad passages on the page, expressed in the same image-percent coordinates as image URNs.
MiseEnPage.msPage
— FunctionCollect all information needed to analyze the layout of a page. Optionally include a CEX data string; if not included, the current release data of the Homer Multitext project is retrieved from github and used.
msPage(pageurn; data)
MiseEnPage.pageurn
— FunctionURN identifying page mspage
.
pageurn(mspage)
URN of page scored.
pageurn(score)
MiseEnPage.rv
— FunctionDetermine if page is :recto
or :verso
.
rv(mspage)
MiseEnPage.imageurn
— FunctionURN for documentary image illustrating page.
imageurn(mspage)
MiseEnPage.iliadlines
— FunctionLines of Iliad on page mspage
. Returns a (possibly empty) vector of URNs.
iliadlines(mspage)
MiseEnPage.iliadrange
— FunctionCompose a CTS URN for the range of Iliad lines on page mspage
. Returns nothing
if there are no Iliad lines on the page.
iliadrange(mspage)
MiseEnPage.textpairs
— FunctionPairings of scholia with Iliad line they comment on appearing on page mspage
.
textpairs(mspage)
MiseEnPage.page_bbox_roi
— FunctionFind a bounding box for the physical page mspage
on a documentary image. Returns a named tuple of floats.
page_bbox_roi(mspage; digits)
MiseEnPage.page_top
— FunctionTop of page's bounding box.
page_top(mspage; digits)
MiseEnPage.page_bottom
— FunctionBottom of page's bounding box.
page_bottom(mspage; digits)
MiseEnPage.page_right
— FunctionRight edge of page's bounding box.
page_right(mspage; digits)
MiseEnPage.page_left
— FunctionLeft edge of page's bounding box.
page_left(mspage; digits)
MiseEnPage.iliad_bbox_roi
— FunctionFind a bounding box on a documentary image for the Iliad lines on page mspage
. Returns a named tuple of floats.
iliad_bbox_roi(mspage; digits)
Analyzing page layout
MiseEnPage.PageScore
— TypeRecord of score for analysis of a page.
MiseEnPage.score_by_proximity_y
— FunctionScore number of scholia correctly placed on page using proximity model. Optionally specify siglum of scholia to model. If siglum
is nothing
, include all scholia.
score_by_proximity_y(mspage; threshhold, siglum)
MiseEnPage.score_by_zones
— FunctionScore number of scholia correctly placed on page using model of placement by zone. Optionally specify siglum of scholia to model. If siglum
is nothing
, include all scholia.
score_by_zones(mspage; threshold, siglum)
MiseEnPage.successes
— FunctionNumber of scholia successfully modeled.
successes(score)
MiseEnPage.failures
— FunctionNumber of scholia unsuccessfully modeled.
failures(score)
MiseEnPage.total
— FunctionTotal number of scholia on page.
total(score)
MiseEnPage.success_rate
— FunctionSuccess rate of model's layout (0.0:1.0).
success_rate(score)
MiseEnPage.delimited
— FunctionSerialize score for a single page.
delimited(pgScore; delimiter)
MiseEnPage.resultsfromdelimited
— FunctionInstantiate a single PageScore
object from a delimited-text source.
resultsfromdelimited(txt; delimiter)
Documentary images
MiseEnPage.load_rgba
— FunctionInstantiate an Image
from a URN. Returns a matrix of RGBA values.
load_rgba(imgurn; w, alpha)
Load documentary image for page mspage
.
load_rgba(mspage; alpha, w)
MiseEnPage.dimensions
— FunctionFind dimensions of image img
, and format as a named tuple with :h
and :w
values.
dimensions(img)
Composing visualizations with Luxor
MiseEnPage.pagebox_luxor
— FunctionCreate a Luxor box
command to draw a box on image img
around the physical page illustrated there.
pagebox_luxor(pg, img; luxoraction)
MiseEnPage.iliadbox_luxor
— FunctionCreate a Luxor box
command to draw a box on image img
around the block of Iliad text on page pg
.
iliadbox_luxor(pg, img; luxoraction)
Functions used internally
Working with page layout data
MiseEnPage.ScholionIliadPair
— TypeA scholion paired with the Iliad line it comments on. Each text passage has a corresponding image with region of interest. lineindex
is the relative position of the Iliad text on its page.
MiseEnPage.pairtexts
— FunctionPair data for each scholion in scholialist
with corresponding Iliad data as a ScholionIliadPair
.
pairtexts(scholialist, commentarydata, dsedata, iliadreff)
MiseEnPage.iliadboundbox
— FunctionGet a containing rectangle for the Iliad lines on a page. iliadlines
should be a Vector with Iliad lines on a single page; dse
is a DSE collection covering those lines.
iliadboundbox(textpairs; digits)
MiseEnPage.scholion_heights
— FunctionFind height in image percent coordinates of scholia on page.
scholion_heights(mspage; siglum)
MiseEnPage.scholion_height
— FunctionHeight of scholion's bounding box.
scholion_height(sipair; digits)
MiseEnPage.scholion_tops
— FunctionFind height in image percent coordinates of scholia on page.
scholion_tops(mspage; siglum)
MiseEnPage.scholion_top
— FunctionTop of scholion's bounding box.
scholion_top(sipair; digits)
MiseEnPage.iliad_tops
— FunctionFind tops of Iliad lines in image percent coordinates of scholia on page.
iliad_tops(mspage)
MiseEnPage.iliad_top
— FunctionTop of Iliad text's bounding box.
iliad_top(sipair; digits)
MiseEnPage.topzone_box
— FunctionFind location of top zone for scholia in manuscript siglum
.
topzone_box(; siglum)
MiseEnPage.adjacentzone_box
— FunctionFind location of adjacent (middle) zone for scholia in manuscript siglum
.
adjacentzone_box(; siglum)
MiseEnPage.bottomzone_box
— FunctionFind location of bottom zone for scholia in manuscript siglum
.
bottomzone_box(; siglum)
Working with images and Luxor diagrams
CitableImage.imagefloats
— FunctionExtract region-of-interest string from an image URN, and convert to a vector of floats rounded to digits
significant places. It is an error if the syntax of the URN's subreference is invalid.
imagefloats(imgu; digits)
MiseEnPage.imgservice
— FunctionInstantiate a citable image service.
imgservice()
MiseEnPage.load_rgb
— FunctionInstantiate an Image
from a URN. Returns a matrix of RGB values.
load_rgb(imgurn; w)
MiseEnPage.boxscaled
— FunctionScale percentage coordinate values in the named tuple boxtuple
to pixels on the image rgba_img
. Returns a named tuple of floats.
boxscaled(boxtuple, rgba_img)
Scale percentage coordinate values in the named tuple boxtuple
to pixels on the image rgb_img
. Returns a named tuple of floats.
boxscaled(boxtuple, rgb_img)
Scale percentage coordinate values in the named tuple boxtuple
to pixels on an image with height imgheight
and width imgwidth
. Returns a named tuple of floats.
boxscaled(boxtuple, imgwidth, imgheight; digits)
MiseEnPage.pageboxscaled
— FunctionFind a bounding box for the physical page scaled to pixels on the image downloaded for the page RoI urn. Returns a named tuple of floats.
pageboxscaled(mspage; digits)
Find a bounding box for the physical page mspage
scaled to pixels on the image rgba_img
. Returns a named tuple of floats.
pageboxscaled(mspage, rgba_img; digits)
MiseEnPage.iliadboxscaled
— FunctionFind a bounding box for the Iliad text on page mspage
scaled to pixels on the image rgba_img
. Returns a named tuple of floats.
iliadboxscaled(mspage, rgba_img; digits)
MiseEnPage.pointscaled
— FunctionScale point pt
expressed in percentage values to a new Luxor Point
scaled to fit image rgba_img
pointscaled(pt, rgba_img; digits)
Scale point pt
expressed in percentage values to a new Luxor Point
scaled to fit the given image dimensions.
pointscaled(pt, imgwidth, imgheight; digits)