changeset 66:d0edaceb04b6

first time to Sonra, Kostas
author Henry S. Thompson <ht@markup.co.uk>
date Mon, 12 Jun 2017 17:08:07 +0200
parents 53dd4ccac4fb
children b66bcfae65d6
files annotate.html
diffstat 1 files changed, 124 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/annotate.html	Mon Jun 12 17:08:07 2017 +0200
@@ -0,0 +1,124 @@
+<?xml version="1.0" encoding="US-ASCII"?>
+<!DOCTYPE html
+  PUBLIC "-//HST//DTD XHTML5 1.0 Transitional//EN" "http://www.ltg.ed.ac.uk/~ht/xhtml5.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta name="copyright" content="Copyright &#169; 2016"/><meta http-equiv="Content-type" content="text/html; charset=utf-8"/><style type="text/css">
+       ul.nolabel { margin: 0; margin-left: -2.5em}
+       ul.naked.nolabel {margin: 0; margin-left: 0; padding-left: 0}
+       ul.cdefn {clear: both}
+       div.ndli { margin-bottom: 1ex }
+       div.hidden {display: none}
+
+    ul.naked > li { list-style-type: none; background: none; margin-left: 2em;
+margin-bottom: 0 }
+    li ul.naked > li, dd ul.naked > li { list-style-type: none; background: none; margin-left: 0;
+margin-bottom: 0 }
+    li.cdefni {}
+    li.cdefni span.cl {display: inline-block; vertical-align: bottom}
+    li.cdefni span.cr {display: inline-block; margin-left: 1em; vertical-align: bottom}
+   pre.code {display: inline-block}
+   blockquote.vanilla {display: inline-block; margin-left: 1em;
+        border: solid 1px; background: rgb(238,234,230);
+                   padding: .5ex .5em}
+   blockquote.vanilla ul.naked li {margin-left: 0 ! important;font-size: 100%}
+    ol ol ol, ol ol ol li {list-style-type: lower-roman}
+    ol ol, ol ol li {list-style-type: lower-alpha}
+    i i {font-style: normal}
+    li li {font-style: normal}
+    li ul li {font-style: normal}
+    li { line-height: 100%; margin-top: 0.3em}
+    .math {font-family: 'Arial Unicode MS', 'Lucida Sans Unicode', serif}
+    .sub {font-size: 80%; vertical-align: sub}
+    .termref {text-decoration: none; color: #606000}
+       .licence {margin-left: 1em; font-size: 70%}
+       .credits {margin-left: 1.5em; font-size: 70%}
+    .right {position: absolute}
+   .stackdown {vertical-align: text-top; margin-top: 0}
+    body {font-size: 12pt}
+     @page { size: A4 portrait; margin: 2cm;
+             orphans: 2; widows: 2;} 
+     @media screen {
+     body {width: 20cm; margin-left: auto; margin-right: auto}
+       }
+     @media print {
+        body {font-size: 10pt}
+        h1, h2, h3, h4 {page-break-after: avoid}
+     }
+     pre.code {font-family: monospace;
+ font-weight: bold;
+ line-height: 120%;
+ padding-top: 0.2em;
+ padding-bottom: 0.2em;
+ padding-left: 1em;
+ padding-right: 1em;
+ border-style: solid;
+ border-left-width: 1em;
+ border-top-width: thin;
+ border-right-width: thin;
+ border-bottom-width: thin;
+ border-color: #95ABD0;
+ color: #00428C;
+ background-color: #E4E5E7;
+}
+       pre {margin-left: 0em}
+       div.toc h2 {font-size: 120%; margin-top: 0em; margin-bottom: 0em}
+       div.toc h4 {font-size: 100%; margin-top: 0em; margin-bottom: 0em;
+                   margin-left: 1em}
+       div.toc h1 {font-size: 140%; margin-bottom: 0em}
+       div.toc ul {margin-top: 1ex}
+       .byline {font-size: 120%}
+       div.figure {margin-left: 2em}
+       div.caption {font-style: italic; font-weight: bold; margin-top: 1em}
+       i i {font-style: normal}
+       img {border: 0}
+       .copyright {font-size: 70%}
+     </style><title>Spreadsheet annotation spec</title></head><body style="font-family: DejaVu Sans, Arial; background: rgb(254,250,246)"><div style="text-align: center" class="head"><hr/><h1>Spreadsheet annotation spec</h1><div class="byline">Henry S. Thompson</div><div class="byline">$Id$</div></div><div class="body"><div><h2>1.  Introduction</h2><p>This is a first pass at defining an annotation menu structure for
+spreadsheets. The assumption is that we'll have an 'Annotate' entry in the Excel
+right-button menu for selected regions, which will pop up region-appropriate
+menus.</p></div><div><h2>2.  Top-level menus</h2><div style="width: 20%; float: right; clear: right; margin-left: .5em"><small><i>If the selection is a single cell I guess we try popping up a selection type menu,
+with choices 'Row', 'Column', 'Matrix' and 'None' (the latter resulting in <code>_Nnnn</code>).</i></small></div><p>Right-clicking 'Annotate' when over a selected range will create a new
+defined name of the form <code>_Xnnn</code>, where <code>X</code> is one of <code>R</code>,
+<code>C</code> or <code>M</code> for <b>r</b>ows (horizontal range
+selection), <b>c</b>olumns (vertical range selection) or
+<b>m</b>atrix (for two-dimensional range selection) respectively, and
+<code>nnn</code> is a serial number for the relevant selection type.</p><p>The comment field (attribute in the XML) of the defined name should contain a
+feature-value dictionary, represented in JSON/Python style, that is, using the
+following BNF</p>:
+   <pre class="code"><code>fvd := '{' ( fvp ( ',' fvp )* )? '}'
+fvp := key ':' value
+key := string
+value := string | number | fvp | array
+string := '"' char* '"'
+array := '[' ( value ( ',' value )* )? ']'</code></pre><p>with whitespace ignored, 'number' being the usual integer or decimal
+representation and 'char' being ASCII-only (?).</p><p>If possible, the selected range should appear as the value of the new
+name <i>without</i> single-quotes.</p><p>Some features can and should be computed, others require annotator
+decision.  Some features and/or feature values are unique to a particular selection type, others are
+shared across all or some types.</p><p>Accordingly, in order for the annotator to supply the required
+information, a form should pop up with all the features appropriate to the
+selection type.  Literal or array-valued form fields will just require a value
+menu (allowing multiple selection in the array-valued case), but features with
+dictionary values will require cascading sub-forms.</p><p>The next two sections document the annotator-supplied and
+software-supplied features.  Except for 'comment', whose value is free text,
+allowed values are tabulated.</p></div><div><h2>3.  Annotator-supplied features</h2><div><h4>3.1.  All types</h4><dl class=" "><dt><b><a name="comment">comment</a></b></dt><dd>string: unconstrained.  By its nature difficult to
+exploit, really should only be used to document a problem with the available
+feature&amp;value vocabulary or structure.</dd></dl></div><div><h4>3.2.  Both one-dimensional types</h4><dl class=" "><dt><b><a name="type">type</a></b></dt><dd>string: <code>"data"|"key"|"label"</code><p>"key" is my preferred word for what Dresden call "attribute".  In the
+simpler cases, think of it as what you might use in an HLOOKUP or VLOOKUP cell.</p></dd><dt><b><a name="content">content</a></b></dt><dd>fvd:
+      <dl class=" "><dt><b><a name="type">type</a></b></dt><dd>string: <code>"currency"|"date"|"datetime"|"integer"|"float"|"key"|"label"|"string"|"time"</code></dd></dl><p>The "key" and "label" content types are for use (as in the Dresden
+paper example) where compound keys/labels are indicated by row or column spans.</p></dd></dl></div><div><h4>3.3.  Matrices</h4><dl class=" "><dt><b><a name="type">type</a></b></dt><dd>string: <code>"table"|"data"|"label"|"condition"</code></dd><dt><b><a name="content">content</a></b></dt><dd>fvd:
+      <ul class=" "><li>string: <code>"rows"|"columns"|"cells"</code></li></ul></dd></dl><p>When a form for a matrix is completed, if <code>type</code> is 'data' a pop-up should offer to auto-fill
+based on <code>content/type</code>.  If chosen, this fills the matrix with
+named ranges of the appropriate orientation (rows, columns or, in the case of
+<code>cells</code>, both).  If
+it's not too hard, it would be good to go on to pop up the form for each
+generated range
+in turn, either having asked in advance for appropriate
+features whose values are the same for all the ranges, or carrying forward
+values from one to the next as defaults.</p></div></div><div><h2>4.  Software-supplied features</h2></div><div><h2>5.  Issues</h2><div><h4>5.1.  Compound labels and keys</h4><p>There's a problem with
+defining the structure I want for compound labels and keys, in that you can't
+for example select the 6th column of rows 3 through 5 in the Dresden example,
+to denote the "Group stage/Match 2/GA" column label:</p><img src="dresdenPlus.png" class="image" alt="table with three-row labels involving column spans, row and column labels added, F3:F5 highlighted" title="table with three-row labels involving column spans, row and column labels added, F3:F5 highlighted" width="75%"/><p>Excel would allow you to define a name for
+F3:F5 in that spreadsheet, but I don't <i>think</i> you can select that
+range with the mouse.</p></div><div><h4>5.2.  Metadata</h4><p>Nothing in the above proposal provides a way to annotate what Dresden
+call 'Metadata'.  We could simply provide another 1-D type, e.g. 'meta', I suppose, or just allow uninteresting regions to remain unannotated. 
+There is a difference between on the one hand informative prose such as occurs in the Dresden
+example with the Metadata label, and regions whose type is just not obvious (as
+e.g. lots in the Kenneth Lay sheet from the Enron dataset...</p></div></div></div></body></html>
\ No newline at end of file