Skip to content

Instantly share code, notes, and snippets.

View wadeharrell's full-sized avatar

Wade Harrell wadeharrell

View GitHub Profile
@wadeharrell
wadeharrell / mhll_primitive_output.txt
Created August 8, 2011 19:49
MHLL standoff markup primitive JS function output
the poem is 109 characters long
line 0: Mary had a little lamb,
line 1: Its fleece was white as snow,
line 2: And every where that Mary went
line 3: The lamb was sure to go;
@wadeharrell
wadeharrell / mhll_primitive.js
Created August 8, 2011 20:24
MHLL standoff markup primitive JS function
var i,l,
str = 'Mary had a little lamb, Its fleece was white as snow, And every where that Mary went The lamb was sure to go;',
poetryM = {'stanza':[[0,109]],'line':[[0,23],[24,53],[54,84],[85,109]]};
console.log('the poem is '+str.length+' characters long');
for(i=0,l=poetryM.line.length;i<l;i++){
console.log('line '+i+': '+str.slice(poetryM.line[i][0],poetryM.line[i][1]));
}
@wadeharrell
wadeharrell / mhll_poetryML_standoff.js
Created August 8, 2011 20:25
mary had a little lamb Semantic Markup for Poetry standoff
{
'stanza':[
[0,109]
],
'line':[
[0,23],
[24,53],
[54,84],
[85,109]
]
@wadeharrell
wadeharrell / mhll_html_standoff.js
Created August 8, 2011 20:27
mary had a little lamb HTML standoff markup
{
'p':[
[0,109]
],
'br':[
[24],
[54],
[85]
]
}
@wadeharrell
wadeharrell / maryhadalittlelamb_oneline.txt
Created August 8, 2011 20:27
first stanza of mary had a little lamb one line
Mary had a little lamb, Its fleece was white as snow, And every where that Mary went The lamb was sure to go;
@wadeharrell
wadeharrell / maryhadalittlelamb_poetryML.xml
Created August 8, 2011 20:28
mary had a little lamb Semantic Markup for Poetry
<stanza>
<line>Mary had a little lamb,</line>
<line>Its fleece was white as snow,</line>
<line>And every where that Mary went</line>
<line>The lamb was sure to go;</line>
</stanza>
@wadeharrell
wadeharrell / maryhadalittlelamb.html
Created August 8, 2011 20:28
mary had a little lamb first stanza html
<p>
Mary had a little lamb,<br/>
Its fleece was white as snow,<br/>
And every where that Mary went<br/>
The lamb was sure to go;
</p>
@wadeharrell
wadeharrell / maryhadalittlelamb.txt
Created August 8, 2011 20:29
first stanza of the poem mary had a little lamb
Mary had a little lamb,
Its fleece was white as snow,
And every where that Mary went
The lamb was sure to go;
<person>Mary</person> had a little <thing>lamb</thing>,
Its <thing>fleece</thing> was white as snow,
And every where that <person>Mary</person> went
The <thing>lamb</thing> was sure to go;
@wadeharrell
wadeharrell / mhll_standoff_grammar.js
Created August 8, 2011 21:23
example standoff markup showing grammar
{
'html':{
'p':[
[0,109]
],
'br':[
[24],
[54],
[85]
]