"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"# load the N1904 app and data from local disc\n",
"PLAY = use(\"app:/TF/app\", hoist=globals())"
]
},
{
"cell_type": "code",
"execution_count": 153,
"id": "6daf8e73-dbcf-4855-aad5-5807cc763907",
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"# Set default view in a way to limit noise as much as possible.\n",
"PLAY.displaySetup(condensed=True, multiFeatures=False,queryFeatures=False)"
]
},
{
"cell_type": "code",
"execution_count": 154,
"id": "390e1e18-df63-4b5f-859d-cb7c7f3ae2f7",
"metadata": {
"tags": []
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
" 0.01s 1 result\n"
]
}
],
"source": [
"SentenceQuery = '''\n",
"sentence headverse=1 book=John chapter=1\n",
"'''\n",
"\n",
"SentenceResults = PLAY.search(SentenceQuery)"
]
},
{
"cell_type": "code",
"execution_count": 155,
"id": "484a029e-ee13-43a6-a4fc-ac7de84aacc0",
"metadata": {
"tags": []
},
"outputs": [
{
"data": {
"text/html": [
"verse 1"
],
"text/plain": [
""
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/html": [
"verse John 1:1
sentence #1 (start: John 1:1)
"
],
"text/plain": [
""
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"PLAY.show(SentenceResults)"
]
},
{
"cell_type": "code",
"execution_count": 156,
"id": "b1e2c4b7-ddba-4f09-9246-4803734ad59b",
"metadata": {
"tags": []
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"[(141082,)]\n"
]
}
],
"source": [
"print (SentenceResults)"
]
},
{
"cell_type": "code",
"execution_count": 157,
"id": "6fd970cb-d89c-48c9-bd9b-92a13d8a1c0b",
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"n | p | verse | sentence |
\n",
"1 | John 1:1 | | Ἐν ἀρχῇ ἦν ὁ Λόγος, καὶ ὁ Λόγος ἦν πρὸς τὸν Θεόν, καὶ Θεὸς ἦν ὁ Λόγος. |
"
],
"text/plain": [
""
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"PLAY.table(SentenceResults)"
]
},
{
"cell_type": "code",
"execution_count": 158,
"id": "be1f2f30-b8a3-4c3a-8dea-9a1299ca74be",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
" 0.01s 1 result\n"
]
}
],
"source": [
"Query = '''\n",
"book book=Matthew\n",
" verse chapter=1 verse=1\n",
"'''\n",
"\n",
"Results = PLAY.search(Query)"
]
},
{
"cell_type": "code",
"execution_count": 159,
"id": "745cc777-255b-4b23-bc27-0abfc88055c3",
"metadata": {
"tags": []
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Feature: after \n",
"\n",
"\t value\t frequency\n",
"\t \t 119270\n",
"\t , \t 9462\n",
"\t . \t 5717\n",
"\t · \t 2359\n",
"\t ; \t 971\n",
"\n",
"\n",
"Feature: appos \n",
"\n",
"\t value\t frequency\n",
"\t \t 105430\n",
"\n",
"\n",
"Feature: book \n",
"\n",
"\t value\t frequency\n",
"\t Luke \t 21785\n",
"\t Matthew \t 20529\n",
"\t Acts \t 20307\n",
"\t John \t 17582\n",
"\t Mark \t 12695\n",
"\n",
"\n",
"Feature: booknumber \n",
"\n",
"\t value\t frequency\n",
"\t 3 \t 19457\n",
"\t 5 \t 18394\n",
"\t 1 \t 18300\n",
"\t 4 \t 15644\n",
"\t 2 \t 11278\n",
"\n",
"\n",
"Feature: bookshort \n",
"\n",
"\t value\t frequency\n",
"\t Luke \t 19457\n",
"\t Acts \t 18394\n",
"\t Matt \t 18300\n",
"\t John \t 15644\n",
"\t Mark \t 11278\n",
"\n",
"\n",
"Feature: case \n",
"\n",
"\t value\t frequency\n",
"\t \t 58261\n",
"\t nominative \t 24197\n",
"\t accusative \t 23031\n",
"\t genitive \t 19515\n",
"\t dative \t 12126\n",
"\n",
"\n",
"Feature: chapter \n",
"\n",
"\t value\t frequency\n",
"\t 1 \t 12922\n",
"\t 2 \t 10923\n",
"\t 3 \t 9652\n",
"\t 4 \t 9631\n",
"\t 5 \t 8788\n",
"\n",
"\n",
"Feature: clausetype \n",
"\n",
"\t value\t frequency\n",
"\t \t 102662\n",
"\t VerbElided \t 1009\n",
"\t Verbless \t 929\n",
"\t Minor \t 830\n",
"\n",
"\n",
"Feature: containedclause \n",
"\n",
"\t value\t frequency\n",
"\t \t 8372\n",
"\t 2 \t 148\n",
"\t 172 \t 69\n",
"\t 97 \t 69\n",
"\t 389 \t 68\n",
"\n",
"\n",
"Feature: degree \n",
"\n",
"\t value\t frequency\n",
"\t \t 137266\n",
"\t comparative \t 313\n",
"\t superlative \t 200\n",
"\n",
"\n",
"Feature: gloss \n",
"\n",
"\t value\t frequency\n",
"\t the \t 9857\n",
"\t and \t 6212\n",
"\t - \t 5496\n",
"\t in \t 2320\n",
"\t And \t 2218\n",
"\n",
"\n",
"Feature: gn \n",
"\n",
"\t value\t frequency\n",
"\t \t 63804\n",
"\t masculine \t 41486\n",
"\t feminine \t 18736\n",
"\t neuter \t 13753\n",
"\n",
"\n",
"Feature: headverse \n",
"\n",
"\t value\t frequency\n",
"\t 1 \t 298\n",
"\t 7 \t 270\n",
"\t 12 \t 267\n",
"\t 9 \t 264\n",
"\t 13 \t 260\n",
"\n",
"\n",
"Feature: junction \n",
"\n",
"\t value\t frequency\n",
"\t \t 103128\n",
"\t apposition \t 2302\n",
"\n",
"\n",
"Feature: lemma \n",
"\n",
"\t value\t frequency\n",
"\t ὁ \t 19783\n",
"\t καί \t 8978\n",
"\t αὐτός \t 5561\n",
"\t σύ \t 2892\n",
"\t δέ \t 2787\n",
"\n",
"\n",
"Feature: lex_dom \n",
"\n",
"\t value\t frequency\n",
"\t 092004 \t 26322\n",
"\t \t 10487\n",
"\t 089017 \t 4370\n",
"\t 093001 \t 3672\n",
"\t 033006 \t 3225\n",
"\n",
"\n",
"Feature: ln \n",
"\n",
"\t value\t frequency\n",
"\t 92.24 \t 19781\n",
"\t \t 10488\n",
"\t 92.11 \t 4718\n",
"\t 89.92 \t 2903\n",
"\t 89.87 \t 2756\n",
"\n",
"\n",
"Feature: markafter \n",
"\n",
"\t value\t frequency\n",
"\t \t 137728\n",
"\t — \t 31\n",
"\t ) \t 11\n",
"\t ]] \t 7\n",
"\t ( \t 1\n",
"\n",
"\n",
"Feature: markbefore \n",
"\n",
"\t value\t frequency\n",
"\t \t 137745\n",
"\t — \t 16\n",
"\t ( \t 10\n",
"\t [[ \t 7\n",
"\t [ \t 1\n",
"\n",
"\n",
"Feature: markorder \n",
"\n",
"\t value\t frequency\n",
"\t \t 137694\n",
"\t 0 \t 34\n",
"\t 3 \t 32\n",
"\t 2 \t 10\n",
"\t 1 \t 9\n",
"\n",
"\n",
"Feature: monad \n",
"\n",
"\t value\t frequency\n",
"\t 1 \t 1\n",
"\t 2 \t 1\n",
"\t 3 \t 1\n",
"\t 4 \t 1\n",
"\t 5 \t 1\n",
"\n",
"\n",
"Feature: mood \n",
"\n",
"\t value\t frequency\n",
"\t \t 109422\n",
"\t indicative \t 15617\n",
"\t participle \t 6653\n",
"\t infinitive \t 2285\n",
"\t imperative \t 1877\n",
"\n",
"\n",
"Feature: morph \n",
"\n",
"\t value\t frequency\n",
"\t CONJ \t 16316\n",
"\t PREP \t 10568\n",
"\t ADV \t 3808\n",
"\t N-NSM \t 3475\n",
"\t N-GSM \t 2935\n",
"\n",
"\n",
"Feature: nodeID \n",
"\n",
"\t value\t frequency\n",
"\t \t 52046\n",
"\t common \t 14186\n",
"\t personal \t 6040\n",
"\t proper \t 2192\n",
"\t relative \t 885\n",
"\n",
"\n",
"Feature: normalized \n",
"\n",
"\t value\t frequency\n",
"\t καί \t 8576\n",
"\t ὁ \t 2769\n",
"\t δέ \t 2764\n",
"\t ἐν \t 2684\n",
"\t τοῦ \t 2497\n",
"\n",
"\n",
"Feature: nu \n",
"\n",
"\t value\t frequency\n",
"\t singular \t 69846\n",
"\t \t 38842\n",
"\t plural \t 29091\n",
"\n",
"\n",
"Feature: number \n",
"\n",
"\t value\t frequency\n",
"\t singular \t 69846\n",
"\t \t 38842\n",
"\t plural \t 29091\n",
"\n",
"\n",
"Feature: person \n",
"\n",
"\t value\t frequency\n",
"\t \t 118360\n",
"\t third \t 12747\n",
"\t second \t 3729\n",
"\t first \t 2943\n",
"\n",
"\n",
"Feature: punctuation \n",
"\n",
"\t value\t frequency\n",
"\t \t 119270\n",
"\t , \t 9462\n",
"\t . \t 5717\n",
"\t · \t 2359\n",
"\t ; \t 971\n",
"\n",
"\n",
"Feature: ref \n",
"\n",
"\t value\t frequency\n",
"\t 1CO 10:1!1 \t 1\n",
"\t 1CO 10:1!10 \t 1\n",
"\t 1CO 10:1!11 \t 1\n",
"\t 1CO 10:1!12 \t 1\n",
"\t 1CO 10:1!13 \t 1\n",
"\n",
"\n",
"Feature: reference \n",
"\n",
"\t value\t frequency\n",
"\t 1CO 10:1!1 \t 1\n",
"\t 1CO 10:1!10 \t 1\n",
"\t 1CO 10:1!11 \t 1\n",
"\t 1CO 10:1!12 \t 1\n",
"\t 1CO 10:1!13 \t 1\n",
"\n",
"\n",
"Feature: roleclausedistance \n",
"\n",
"\t value\t frequency\n",
"\t 0 \t 56129\n",
"\t 1 \t 37597\n",
"\t 2 \t 22297\n",
"\t 3 \t 12084\n",
"\t 4 \t 5277\n",
"\n",
"\n",
"Feature: sentence \n",
"\n",
"\t value\t frequency\n",
"\t 3 \t 1130\n",
"\t 4 \t 987\n",
"\t 1 \t 810\n",
"\t 5 \t 774\n",
"\t 6 \t 707\n",
"\n",
"\n",
"Feature: sp \n",
"\n",
"\t value\t frequency\n",
"\t noun \t 28455\n",
"\t verb \t 28357\n",
"\t det \t 19786\n",
"\t conj \t 18227\n",
"\t pron \t 16177\n",
"\n",
"\n",
"Feature: sp_full \n",
"\n",
"\t value\t frequency\n",
"\t Noun \t 28455\n",
"\t Verb \t 28357\n",
"\t Determiner \t 19786\n",
"\t Conjunction \t 18227\n",
"\t Pronoun \t 16177\n",
"\n",
"\n",
"Feature: strongs \n",
"\n",
"\t value\t frequency\n",
"\t 3588 \t 19783\n",
"\t 2532 \t 8978\n",
"\t 846 \t 5561\n",
"\t 4771 \t 2892\n",
"\t 1161 \t 2787\n",
"\n",
"\n",
"Feature: subj_ref \n",
"\n",
"\t value\t frequency\n",
"\t \t 121204\n",
"\t n46003022002 \t 172\n",
"\t n66001009002 \t 131\n",
"\t n45001001001 \t 104\n",
"\t n47010001004 \t 104\n",
"\n",
"\n",
"Feature: tense \n",
"\n",
"\t value\t frequency\n",
"\t \t 109422\n",
"\t aorist \t 11803\n",
"\t present \t 11579\n",
"\t imperfect \t 1689\n",
"\t future \t 1626\n",
"\n",
"\n",
"Feature: type \n",
"\n",
"\t value\t frequency\n",
"\t \t 93321\n",
"\t common \t 23644\n",
"\t personal \t 11521\n",
"\t proper \t 4639\n",
"\t demonstrative \t 1722\n",
"\n",
"\n",
"Feature: unicode \n",
"\n",
"\t value\t frequency\n",
"\t καὶ \t 8541\n",
"\t ὁ \t 2768\n",
"\t ἐν \t 2683\n",
"\t δὲ \t 2619\n",
"\t τοῦ \t 2497\n",
"\n",
"\n",
"Feature: verse \n",
"\n",
"\t value\t frequency\n",
"\t 10 \t 4928\n",
"\t 12 \t 4910\n",
"\t 4 \t 4800\n",
"\t 9 \t 4800\n",
"\t 1 \t 4793\n",
"\n",
"\n",
"Feature: voice \n",
"\n",
"\t value\t frequency\n",
"\t \t 109422\n",
"\t active \t 20742\n",
"\t passive \t 3493\n",
"\t middle \t 2408\n",
"\t middlepassive \t 1714\n",
"\n",
"\n",
"Feature: wgclass \n",
"\n",
"\t value\t frequency\n",
"\t np \t 33710\n",
"\t cl \t 30857\n",
"\t cl* \t 16378\n",
"\t \t 12760\n",
"\t pp \t 11169\n",
"\n",
"\n",
"Feature: wglevel \n",
"\n",
"\t value\t frequency\n",
"\t 5 \t 16862\n",
"\t 4 \t 16527\n",
"\t 6 \t 15520\n",
"\t 7 \t 12162\n",
"\t 3 \t 10442\n",
"\n",
"\n",
"Feature: wgnum \n",
"\n",
"\t value\t frequency\n",
"\t 2 \t 27\n",
"\t 3 \t 27\n",
"\t 4 \t 27\n",
"\t 5 \t 27\n",
"\t 6 \t 27\n",
"\n",
"\n",
"Feature: wgrole \n",
"\n",
"\t value\t frequency\n",
"\t \t 69235\n",
"\t adv \t 16710\n",
"\t o \t 9329\n",
"\t s \t 6710\n",
"\t p \t 1770\n",
"\n",
"\n",
"Feature: wgrolelong \n",
"\n",
"\t value\t frequency\n",
"\t \t 69263\n",
"\t Adverbial \t 16710\n",
"\t Object \t 9329\n",
"\t Subject \t 6710\n",
"\t Predicate \t 1770\n",
"\n",
"\n",
"Feature: wgrule \n",
"\n",
"\t value\t frequency\n",
"\t DetNP \t 15696\n",
"\t \t 14701\n",
"\t PrepNp \t 11044\n",
"\t NPofNP \t 6819\n",
"\t Conj-CL \t 5571\n",
"\n",
"\n",
"Feature: wgtype \n",
"\n",
"\t value\t frequency\n",
"\t \t 92932\n",
"\t group \t 9699\n",
"\t apposition \t 2799\n",
"\n",
"\n",
"Feature: word \n",
"\n",
"\t value\t frequency\n",
"\t καὶ \t 8545\n",
"\t ὁ \t 2769\n",
"\t ἐν \t 2684\n",
"\t δὲ \t 2620\n",
"\t τοῦ \t 2497\n",
"\n",
"\n",
"Feature: wordlevel \n",
"\n",
"\t value\t frequency\n",
"\t 6 \t 21857\n",
"\t 7 \t 20984\n",
"\t 5 \t 20538\n",
"\t 8 \t 16755\n",
"\t 9 \t 12772\n",
"\n",
"\n",
"Feature: wordrole \n",
"\n",
"\t value\t frequency\n",
"\t adv \t 41598\n",
"\t v \t 25817\n",
"\t s \t 22908\n",
"\t o \t 21929\n",
"\t \t 9347\n",
"\n",
"\n",
"Feature: wordrolelong \n",
"\n",
"\t value\t frequency\n",
"\t Adverbial \t 41598\n",
"\t Verbal \t 25817\n",
"\t Subject \t 22908\n",
"\t Object \t 21929\n",
"\t \t 9347\n",
"\n",
"\n",
"Feature: wordtranslit \n",
"\n",
"\t value\t frequency\n",
"\t kai \t 8576\n",
"\t en \t 3152\n",
"\t o \t 3149\n",
"\t to \t 2885\n",
"\t de \t 2769\n",
"\n",
"\n",
"Feature: wordunacc \n",
"\n",
"\t value\t frequency\n",
"\t και \t 8576\n",
"\t ο \t 3019\n",
"\t δε \t 2764\n",
"\t εν \t 2752\n",
"\t του \t 2497\n",
"\n",
"\n"
]
}
],
"source": [
"FeatureList=Fall()\n",
"LinesToPrint=5\n",
"for Feature in FeatureList: \n",
" if Feature!='otype':\n",
" print ('Feature:',Feature,'\\n\\n\\t value\\t frequency')\n",
" FeatureFrequenceLists=Fs(Feature).freqList()\n",
" PrintedLine=0\n",
" for item, freq in FeatureFrequenceLists:\n",
" PrintedLine+=1\n",
" print ('\\t',item,'\\t',freq)\n",
" if PrintedLine==LinesToPrint: break\n",
" print ('\\n')"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "099ad8ce-e438-4f93-961f-c6bbd4756c86",
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.5"
}
},
"nbformat": 4,
"nbformat_minor": 5
}