Created
January 17, 2018 15:18
-
-
Save jonathanrobie/d12229ec9be4f315cb11e468c3a987ee to your computer and use it in GitHub Desktop.
interrogative type
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"cells": [ | |
{ | |
"metadata": { | |
"trusted": true | |
}, | |
"cell_type": "code", | |
"source": "from greeksyntax.lowfat import *\n\nq = lowfat(\"nestle1904lowfat\")", | |
"execution_count": 1, | |
"outputs": [ | |
{ | |
"output_type": "stream", | |
"text": "Database 'nestle1904lowfat' was opened in 0.32 ms.\n\n", | |
"name": "stdout" | |
} | |
] | |
}, | |
{ | |
"metadata": {}, | |
"cell_type": "markdown", | |
"source": "The following classes are sometime flagged 'interrogative'. No other class is." | |
}, | |
{ | |
"metadata": { | |
"trusted": true | |
}, | |
"cell_type": "code", | |
"source": "query = \"\"\"\n for $w in //w\n where $w/@type = 'interrogative'\n let $class := $w/@class ! string(.)\n let $lemma := $w/@lemma ! string(.)\n group by $class, $lemma\n order by $class, $lemma\n return <div>{ $class, $lemma }</div>\n\"\"\"\n\nprint(q.xquery(query))", | |
"execution_count": 2, | |
"outputs": [ | |
{ | |
"output_type": "stream", | |
"text": "<div>adj ἡλίκος</div>\n<div>adj ὁποῖος</div>\n<div>adj πηλίκος</div>\n<div>adj ποταπός</div>\n<div>pron ποῖος</div>\n<div>pron πόσος</div>\n<div>pron τίς</div>\n", | |
"name": "stdout" | |
} | |
] | |
}, | |
{ | |
"metadata": {}, | |
"cell_type": "markdown", | |
"source": "Should we also have `@type='interrogative'` for interrogative adverbs (πόθεν, πότε, ποῦ, πῶς), interrogative particles, etc? This type designation is helpful, it would be more helpful if made consistently." | |
} | |
], | |
"metadata": { | |
"kernelspec": { | |
"name": "python3", | |
"display_name": "Python 3", | |
"language": "python" | |
}, | |
"toc": { | |
"nav_menu": {}, | |
"number_sections": true, | |
"sideBar": true, | |
"skip_h1_title": false, | |
"toc_cell": false, | |
"toc_position": {}, | |
"toc_section_display": "block", | |
"toc_window_display": false | |
}, | |
"language_info": { | |
"name": "python", | |
"version": "3.6.3", | |
"mimetype": "text/x-python", | |
"codemirror_mode": { | |
"name": "ipython", | |
"version": 3 | |
}, | |
"pygments_lexer": "ipython3", | |
"nbconvert_exporter": "python", | |
"file_extension": ".py" | |
}, | |
"gist": { | |
"id": "", | |
"data": { | |
"description": "interrogative type", | |
"public": true | |
} | |
} | |
}, | |
"nbformat": 4, | |
"nbformat_minor": 2 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment