Skip to content

Instantly share code, notes, and snippets.

View jonathanrobie's full-sized avatar

Jonathan Robie jonathanrobie

View GitHub Profile
declare default element namespace "http://www.tei-c.org/ns/1.0";
(:
Which scene does each actor appear in?
- group by actors (need a variable that iterates over actors)
- need another variable that is bound to the scene
:)
for $scene in //div2[@type='scene']
for $whoville in $scene//*[@who]
declare default element namespace "http://www.tei-c.org/ns/1.0";
(:
Call List: Which actors appear in each scene?
- group by scenes
- show unique actors in each scene
:)
for $act in //div1[@type='act']
for $act-number in $act/@n
declare default element namespace "http://www.tei-c.org/ns/1.0";
(:
Which actors appear in each scene?
- group by scenes
- show unique actors in each scene
:)
for $act in //div1[@type='act']
for $act-number in $act/@n
declare default element namespace "http://www.tei-c.org/ns/1.0";
declare function local:is-person($s as element(stage), $who as xs:string)
as xs:boolean
{
$s/@who ! tokenize(., "(#)|( #)") = $who
};
declare function local:next-exit($scene as element(div2), $entrance as element(stage), $who as xs:string)
as element(stage)
@jonathanrobie
jonathanrobie / Caesar-Enter-Exit-Windowing.xq
Last active August 29, 2015 14:02
Caesar's entrances and exits - using sliding windows
declare default element namespace "http://www.tei-c.org/ns/1.0";
declare function local:is-person($s as element(stage), $who as xs:string)
as xs:boolean
{
$s/@who ! tokenize(., "(#)|( #)") = $who
};
declare function local:enter-and-exit($act as element(div1), $scene as element(div2), $who as xs:string)
{
Let's make a list of structures that we want to represent, and compare various approaches to:
- Create them
- View them with various tools
- Query a treebank to find or use them
Use headers to create separate categories.
# Determiners
- Articular infinitives
@jonathanrobie
jonathanrobie / tis-nestle1904-morphology.ipynb
Last active January 16, 2018 14:27
tis-nestle1904-morphology.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jonathanrobie
jonathanrobie / type=interrogative.ipynb
Created January 17, 2018 15:18
interrogative type
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jonathanrobie
jonathanrobie / Imperatives - Aorist versus Present.ipynb
Created January 30, 2018 14:45
Imperatives: Aorist, Present, Perfect
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jonathanrobie
jonathanrobie / Imperatives - Aorist, Present, Perfect.ipynb
Created January 30, 2018 14:55
Imperatives: Aorist, Present, Perfect
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.