getAllStatuses(); $renderer = get_active_status_renderer(); echo ''; } function topic_icons_css() { echo "\n"; } function topic_icons_label( $label ) { global $topic; if (bb_is_front() || bb_is_forum() || bb_is_view() || bb_is_tag()) { $icon_set_name = topic_icons_get_active_icon_set(); $icon_set_url = ICON_SET_URL_BASE . $icon_set_name; $status = get_active_status_interpreter()->getStatus(bb_get_location(), $topic); $renderer = get_active_status_renderer(); $image = $renderer->renderStatus($status); $tooltip = $renderer->renderStatusTooltip($status); $exists = file_exists(dirname(__FILE__).'/icon-sets/'.$icon_set_name.'/'.$image); if (!$exists) { return sprintf(__('
%s
%s'), get_topic_link($topic->topic_id), ICON_SET_URL_BASE.'/empty.png', ICON_WIDTH, ICON_HEIGHT, $tooltip, $label); } else if (strlen($tooltip) > 0) { return sprintf(__('
%s%s
%s'), get_topic_link($topic->topic_id), $icon_set_url.'/'.$image, ICON_WIDTH, ICON_HEIGHT, $tooltip, $tooltip, $label); } else { return sprintf(__('
%s
%s'), get_topic_link($topic->topic_id), $icon_set_url.'/'.$image, ICON_WIDTH, ICON_HEIGHT, $tooltip, $label); } } return $label; } function topic_icons_init( ) { remove_filter('bb_topic_labels', 'bb_closed_label', 10); remove_filter('bb_topic_labels', 'bb_sticky_label', 20); add_filter('bb_topic_labels', 'topic_icons_label', 11); add_action('bb_head', 'topic_icons_css'); add_action('bb_admin_menu_generator', 'topic_icons_admin_page_add'); add_action('bb_admin-header.php', 'topic_icons_admin_page_process'); topic_icons_register_status_interpreter('default', new DefaultStatusInterpreter(BUSY_THRESHOLD)); topic_icons_register_status_renderer('default', new DefaultStatusRenderer()); } topic_icons_init(); ?> Digital Humanities Questions & Answers » Topic: Using YAML to model historical lives or events http://digitalhumanities.org/answers/topic/using-yaml-to-model-historical-lives-or-events Digital Humanities Questions & Answers » Topic: Using YAML to model historical lives or events en-US Sat, 23 Mar 2019 07:08:12 +0000 http://bbpress.org/?v=1.0.2 <![CDATA[Search]]> q http://digitalhumanities.org/answers/search.php Conal Tuohy on "Using YAML to model historical lives or events" http://digitalhumanities.org/answers/topic/using-yaml-to-model-historical-lives-or-events#post-1631 Thu, 03 May 2012 01:06:09 +0000 Conal Tuohy 1631@http://digitalhumanities.org/answers/ <p>I don't know of people using YAML for such things, to be honest; ARAIK the usual practice is to use an XML-based markup language such as EAC or TEI.</p> <p>Regarding the readability issue of XML-based markup languages, partly I think this is just what you're used to, but of course it's not an ideal rendering for notes. Nevertheless, it's very easy to make and link an XSLT or CSS stylesheet to an XML file and use that to format the document more readably. Then it's just a matter of opening the file in a browser to view it, and a text editor to edit it. </p> <p>Aside from the issue of readability, the advantages of an XML-based format are too numerous to mention.</p> <p>Apart from EAC which Ben mentioned already, I would recommend you take a look at TEI; specifically the "Personography Module". See <a href="http://www.tei-c.org/release/doc/tei-p5-doc/en/html/ND.html#NDPERS" rel="nofollow">http://www.tei-c.org/release/doc/tei-p5-doc/en/html/ND.html#NDPERS</a> and also see in the formal declaration of the TEI concept of "event": <a href="http://www.tei-c.org/release/doc/tei-p5-doc/en/html/ref-event.html" rel="nofollow">http://www.tei-c.org/release/doc/tei-p5-doc/en/html/ref-event.html</a> and the declarations for "person" <a href="http://www.tei-c.org/release/doc/tei-p5-doc/en/html/ref-person.html" rel="nofollow">http://www.tei-c.org/release/doc/tei-p5-doc/en/html/ref-person.html</a> and "faith" <a href="http://www.tei-c.org/release/doc/tei-p5-doc/en/html/ref-faith.html" rel="nofollow">http://www.tei-c.org/release/doc/tei-p5-doc/en/html/ref-faith.html</a></p> <p>It's certainly worth studying the EAC and TEI models even if you do adopt a custom YAML-based format for your data, even just so as to be able to export your data in one of those standard formats. </p> lmullen on "Using YAML to model historical lives or events" http://digitalhumanities.org/answers/topic/using-yaml-to-model-historical-lives-or-events#post-1630 Wed, 02 May 2012 19:35:03 +0000 lmullen 1630@http://digitalhumanities.org/answers/ <p><em>Replying to @Ben Brumfield's <a href="http://digitalhumanities.org/answers/topic/using-yaml-to-model-historical-lives-or-events#post-1629">post</a>:</em></p> <p>Ben, </p> <p>I've been thinking about how to go about encoding the data too. Vim (EMACS too, probably) has YAML syntax highlighting and other support out of the box. It would be pretty easy for me to create a snippet for a person record and for a conversion block to keep most things standard. Vim seems to have pretty good autocomplete too, so I could probably create a controlled vocabulary list and use that with autocomplete. </p> <p><em>Replying to @Ethan Gruber's <a href="http://digitalhumanities.org/answers/topic/using-yaml-to-model-historical-lives-or-events#post-1628">post</a>:</em></p> <p>Ethan,</p> <p>Thanks for the suggestions of EAC-CPF. I wasn't aware of that standard. I'm intrigued, and will have to investigate it further. I'm a little reluctant to do the encoding in XML, though, since these records have to double as regular notes. Perhaps I'll munge YAML into EAC-CPF at some point. </p> Ben Brumfield on "Using YAML to model historical lives or events" http://digitalhumanities.org/answers/topic/using-yaml-to-model-historical-lives-or-events#post-1629 Wed, 02 May 2012 18:22:49 +0000 Ben Brumfield 1629@http://digitalhumanities.org/answers/ <p>I think that YAML is an elegant solution here, since this is a file you'll be hand-editing and the data structures themselves are emerging as you create the data. YAML should be quite easy to programmatically transform into any standard format you want with some ruby data munging scripts.</p> <p>The only concern I have is that you may end up with a bit too much typing and inconsistent keys. I wonder if an editor like Emacs has a YAML mode, and if that mode would support auto-completion of keys you've already used? </p> Ethan Gruber on "Using YAML to model historical lives or events" http://digitalhumanities.org/answers/topic/using-yaml-to-model-historical-lives-or-events#post-1628 Wed, 02 May 2012 18:09:42 +0000 Ethan Gruber 1628@http://digitalhumanities.org/answers/ <p>It should theoretically be possible to represent this model in EAC-CPF. Churches or denominations could be represented by corporate records, but it make take a bit of thought to represent the chronology of converting from one belief to another in the EAC-CPF chronlist.</p> <p>Example document: <a href="http://socialarchive.iath.virginia.edu/xtf/view?docId=oppenheimer-j-robert-1904-1967-cr.xml" rel="nofollow">http://socialarchive.iath.virginia.edu/xtf/view?docId=oppenheimer-j-robert-1904-1967-cr.xml</a></p> <p>EAC-CPF provides some definite advantages over YAML:<br /> 1. It is an international standard in the LAM community for representing people, families, and corporate entities, therefore you will be able to receive support in terms of re-usable code and tools for creating and disseminating your data<br /> 2. It is effectively linked data, and thus inherits all of the benefits of linked data systems </p> lmullen on "Using YAML to model historical lives or events" http://digitalhumanities.org/answers/topic/using-yaml-to-model-historical-lives-or-events#post-1627 Wed, 02 May 2012 17:32:41 +0000 lmullen 1627@http://digitalhumanities.org/answers/ <p>For my dissertation, I'm keeping track of nineteenth-century converts. I'd like to keep the data about the converts in both a human- and computer readable format. The data model needs to grow organically, because I only have a reasonable guess right now what information might be interesting about converts. The amount of data on each convert will be vastly different, from the bare information that a person converted (I might not even know a name) to having volumes of the person's papers. Also, each person might convert multiple times. Some information I want to keep track of as data (e.g., converted from, converted to, converted date), and other information can be tossed into a notes field. Finally, I have to be able to read the data myself as notes for writing, and to access it programmatically from some unknown tool (probably Ruby). While these needs are specific to my purposes, I think they could be easily generalized. For example, someone might want to keep track of strikes for a labor history.</p> <p>I'm thinking about using <a href="http://www.yaml.org/spec/1.2/spec.html">YAML</a> as the format for the data. YAML's two top priorities are "YAML is easily readable by humans" and "YAML data is portable between programming languages," which match my own. It also seems to be dead-simple to markup data. I've created a sample file for modeling the life of Orestes Brownson, which is below.</p> <p>My questions are these:</p> <ol> <li>Is anyone using YAML for a digital humanities project? How are you using it, and what experience have you gained?</li> <li>Can anyone offer specific comments on the data modeled below?</li> </ol> <p> </p> <div class="bb_syntax"><table><tr><td class="line_numbers"><pre>1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 </pre></td><td class="code"><pre class="yaml" style="font-family:monospace;"># A model of a convert's life --- name-last : Brownson name-first : Orestes Augustus born : 1803-09-16 died : 1876-04-17 birth-religion : Congregationalism &nbsp; conversions : &nbsp; - origin-religion : Congregationalism destination-religion : Presbyterianism date : 1822 ritual : church membership citation : ANB notes : &gt; Brownson's change to congregationalism was more denominational switching than a change in conscience. &nbsp; - origin-religion : Presbyterianism destination-religion : Universalism date : 1826 ritual : ordination location : &quot;Jaffrey, New Hampshire&quot; citation : ANB notes : &gt; &quot;He would later refer to his years in this fold as 'the most anti-Christian period of my life'&quot; (ANB). &nbsp; Brownson was editor of _The Gospel Advocate and Impartial Investigator_, a Universalist publication. &nbsp; - origin-religion : Universalism destination-religion : Unitarianism ritual : further research location : &quot;Walpole, New Hampshire&quot; citation: : ANB notes : &gt; Brownson spent some time at Brook Farm, which prepared him for Transcendentalism &nbsp; - origin-religion : Unitarianism and Transcendentalism destination-religion : Catholicism date : 1844-10-19 ritual : baptism citation : ANB notes : &gt; Brownson studied after his conversion with a Sulpician priest. &nbsp; source : - Carey, Orestes Brownson - American National Biography &nbsp; comments : &gt; This is a minimal example of what a model of a convert might look like. The historical data is hastily gathered, so only the model is of interest here. &nbsp; N.B. I would like to replace the citations with BibTeX keys. ...</pre></td></tr></table></div>