JONAS: final solution exercise 01
This commit is contained in:
parent
bf8647a97b
commit
62686b29db
File diff suppressed because one or more lines are too long
@ -1,678 +0,0 @@
|
||||
{
|
||||
"cells": [
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"# NLP-LAB Exercise 01 (Jonas Weinz)\n",
|
||||
"----"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"## playing around with nltk"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"* import nltk and download packages"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 1,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"[nltk_data] Downloading package punkt to /home/jonas/nltk_data...\n",
|
||||
"[nltk_data] Package punkt is already up-to-date!\n",
|
||||
"[nltk_data] Downloading package averaged_perceptron_tagger to\n",
|
||||
"[nltk_data] /home/jonas/nltk_data...\n",
|
||||
"[nltk_data] Package averaged_perceptron_tagger is already up-to-\n",
|
||||
"[nltk_data] date!\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
"data": {
|
||||
"text/plain": [
|
||||
"True"
|
||||
]
|
||||
},
|
||||
"execution_count": 1,
|
||||
"metadata": {},
|
||||
"output_type": "execute_result"
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"import nltk\n",
|
||||
"\n",
|
||||
"#nltk.download('all')\n",
|
||||
"nltk.download('punkt')\n",
|
||||
"nltk.download('averaged_perceptron_tagger')"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"* analyse a text fragment"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 2,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"monologue = \"\"\"Ah! Now I’ve done Philosophy,\n",
|
||||
"I’ve finished Law and Medicine,\n",
|
||||
"And sadly even Theology:\n",
|
||||
"Taken fierce pains, from end to end.\n",
|
||||
"Now here I am, a fool for sure!\n",
|
||||
"No wiser than I was before:\n",
|
||||
"Master, Doctor’s what they call me,\n",
|
||||
"And I’ve been ten years, already,\n",
|
||||
"Crosswise, arcing, to and fro,\n",
|
||||
"Leading my students by the nose,\n",
|
||||
"And see that we can know - nothing!\n",
|
||||
"It almost sets my heart burning.\n",
|
||||
"I’m cleverer than all these teachers,\n",
|
||||
"Doctors, Masters, scribes, preachers:\n",
|
||||
"I’m not plagued by doubt or scruple,\n",
|
||||
"Scared by neither Hell nor Devil –\n",
|
||||
"Instead all Joy is snatched away,\n",
|
||||
"What’s worth knowing, I can’t say,\n",
|
||||
"I can’t say what I should teach\n",
|
||||
"To make men better or convert each.\n",
|
||||
"And then I’ve neither goods nor gold,\n",
|
||||
"No worldly honour, or splendour hold:\n",
|
||||
"Not even a dog would play this part!\n",
|
||||
"So I’ve given myself to Magic art,\n",
|
||||
"To see if, through Spirit powers and lips,\n",
|
||||
"I might have all secrets at my fingertips.\n",
|
||||
"And no longer, with rancid sweat, so,\n",
|
||||
"Still have to speak what I cannot know:\n",
|
||||
"That I may understand whatever\n",
|
||||
"Binds the world’s innermost core together\"\"\""
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 3,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"data": {
|
||||
"text/plain": [
|
||||
"[('Ah', 'NN'),\n",
|
||||
" ('!', '.'),\n",
|
||||
" ('Now', 'RB'),\n",
|
||||
" ('I', 'PRP'),\n",
|
||||
" ('’', 'VBP'),\n",
|
||||
" ('ve', 'JJ'),\n",
|
||||
" ('done', 'VBN'),\n",
|
||||
" ('Philosophy', 'NNP'),\n",
|
||||
" (',', ','),\n",
|
||||
" ('I', 'PRP'),\n",
|
||||
" ('’', 'VBP'),\n",
|
||||
" ('ve', 'RB'),\n",
|
||||
" ('finished', 'VBN'),\n",
|
||||
" ('Law', 'NNP'),\n",
|
||||
" ('and', 'CC'),\n",
|
||||
" ('Medicine', 'NNP'),\n",
|
||||
" (',', ','),\n",
|
||||
" ('And', 'CC'),\n",
|
||||
" ('sadly', 'RB'),\n",
|
||||
" ('even', 'RB'),\n",
|
||||
" ('Theology', 'NNP'),\n",
|
||||
" (':', ':'),\n",
|
||||
" ('Taken', 'NNP'),\n",
|
||||
" ('fierce', 'NN'),\n",
|
||||
" ('pains', 'NNS'),\n",
|
||||
" (',', ','),\n",
|
||||
" ('from', 'IN'),\n",
|
||||
" ('end', 'NN'),\n",
|
||||
" ('to', 'TO'),\n",
|
||||
" ('end', 'VB'),\n",
|
||||
" ('.', '.'),\n",
|
||||
" ('Now', 'RB'),\n",
|
||||
" ('here', 'RB'),\n",
|
||||
" ('I', 'PRP'),\n",
|
||||
" ('am', 'VBP'),\n",
|
||||
" (',', ','),\n",
|
||||
" ('a', 'DT'),\n",
|
||||
" ('fool', 'NN'),\n",
|
||||
" ('for', 'IN'),\n",
|
||||
" ('sure', 'JJ'),\n",
|
||||
" ('!', '.'),\n",
|
||||
" ('No', 'DT'),\n",
|
||||
" ('wiser', 'JJR'),\n",
|
||||
" ('than', 'IN'),\n",
|
||||
" ('I', 'PRP'),\n",
|
||||
" ('was', 'VBD'),\n",
|
||||
" ('before', 'IN'),\n",
|
||||
" (':', ':'),\n",
|
||||
" ('Master', 'NN'),\n",
|
||||
" (',', ','),\n",
|
||||
" ('Doctor', 'NNP'),\n",
|
||||
" ('’', 'NNP'),\n",
|
||||
" ('s', 'VBD'),\n",
|
||||
" ('what', 'WP'),\n",
|
||||
" ('they', 'PRP'),\n",
|
||||
" ('call', 'VBP'),\n",
|
||||
" ('me', 'PRP'),\n",
|
||||
" (',', ','),\n",
|
||||
" ('And', 'CC'),\n",
|
||||
" ('I', 'PRP'),\n",
|
||||
" ('’', 'VBP'),\n",
|
||||
" ('ve', 'RB'),\n",
|
||||
" ('been', 'VBN'),\n",
|
||||
" ('ten', 'CD'),\n",
|
||||
" ('years', 'NNS'),\n",
|
||||
" (',', ','),\n",
|
||||
" ('already', 'RB'),\n",
|
||||
" (',', ','),\n",
|
||||
" ('Crosswise', 'NNP'),\n",
|
||||
" (',', ','),\n",
|
||||
" ('arcing', 'VBG'),\n",
|
||||
" (',', ','),\n",
|
||||
" ('to', 'TO'),\n",
|
||||
" ('and', 'CC'),\n",
|
||||
" ('fro', 'VB'),\n",
|
||||
" (',', ','),\n",
|
||||
" ('Leading', 'VBG'),\n",
|
||||
" ('my', 'PRP$'),\n",
|
||||
" ('students', 'NNS'),\n",
|
||||
" ('by', 'IN'),\n",
|
||||
" ('the', 'DT'),\n",
|
||||
" ('nose', 'NN'),\n",
|
||||
" (',', ','),\n",
|
||||
" ('And', 'CC'),\n",
|
||||
" ('see', 'VBP'),\n",
|
||||
" ('that', 'IN'),\n",
|
||||
" ('we', 'PRP'),\n",
|
||||
" ('can', 'MD'),\n",
|
||||
" ('know', 'VB'),\n",
|
||||
" ('-', ':'),\n",
|
||||
" ('nothing', 'NN'),\n",
|
||||
" ('!', '.'),\n",
|
||||
" ('It', 'PRP'),\n",
|
||||
" ('almost', 'RB'),\n",
|
||||
" ('sets', 'VBZ'),\n",
|
||||
" ('my', 'PRP$'),\n",
|
||||
" ('heart', 'NN'),\n",
|
||||
" ('burning', 'NN'),\n",
|
||||
" ('.', '.'),\n",
|
||||
" ('I', 'PRP'),\n",
|
||||
" ('’', 'VBP'),\n",
|
||||
" ('m', 'RB'),\n",
|
||||
" ('cleverer', 'JJR'),\n",
|
||||
" ('than', 'IN'),\n",
|
||||
" ('all', 'PDT'),\n",
|
||||
" ('these', 'DT'),\n",
|
||||
" ('teachers', 'NNS'),\n",
|
||||
" (',', ','),\n",
|
||||
" ('Doctors', 'NNS'),\n",
|
||||
" (',', ','),\n",
|
||||
" ('Masters', 'NNS'),\n",
|
||||
" (',', ','),\n",
|
||||
" ('scribes', 'NNS'),\n",
|
||||
" (',', ','),\n",
|
||||
" ('preachers', 'NNS'),\n",
|
||||
" (':', ':'),\n",
|
||||
" ('I', 'PRP'),\n",
|
||||
" ('’', 'VBP'),\n",
|
||||
" ('m', 'RB'),\n",
|
||||
" ('not', 'RB'),\n",
|
||||
" ('plagued', 'VBN'),\n",
|
||||
" ('by', 'IN'),\n",
|
||||
" ('doubt', 'NN'),\n",
|
||||
" ('or', 'CC'),\n",
|
||||
" ('scruple', 'NN'),\n",
|
||||
" (',', ','),\n",
|
||||
" ('Scared', 'VBN'),\n",
|
||||
" ('by', 'IN'),\n",
|
||||
" ('neither', 'DT'),\n",
|
||||
" ('Hell', 'NNP'),\n",
|
||||
" ('nor', 'CC'),\n",
|
||||
" ('Devil', 'NNP'),\n",
|
||||
" ('–', 'NNP'),\n",
|
||||
" ('Instead', 'RB'),\n",
|
||||
" ('all', 'DT'),\n",
|
||||
" ('Joy', 'NNP'),\n",
|
||||
" ('is', 'VBZ'),\n",
|
||||
" ('snatched', 'VBN'),\n",
|
||||
" ('away', 'RB'),\n",
|
||||
" (',', ','),\n",
|
||||
" ('What', 'WP'),\n",
|
||||
" ('’', 'VBD'),\n",
|
||||
" ('s', 'JJ'),\n",
|
||||
" ('worth', 'JJ'),\n",
|
||||
" ('knowing', 'NN'),\n",
|
||||
" (',', ','),\n",
|
||||
" ('I', 'PRP'),\n",
|
||||
" ('can', 'MD'),\n",
|
||||
" ('’', 'VB'),\n",
|
||||
" ('t', 'NNS'),\n",
|
||||
" ('say', 'VBP'),\n",
|
||||
" (',', ','),\n",
|
||||
" ('I', 'PRP'),\n",
|
||||
" ('can', 'MD'),\n",
|
||||
" ('’', 'VB'),\n",
|
||||
" ('t', 'NNS'),\n",
|
||||
" ('say', 'VBP'),\n",
|
||||
" ('what', 'WP'),\n",
|
||||
" ('I', 'PRP'),\n",
|
||||
" ('should', 'MD'),\n",
|
||||
" ('teach', 'VB'),\n",
|
||||
" ('To', 'TO'),\n",
|
||||
" ('make', 'VB'),\n",
|
||||
" ('men', 'NNS'),\n",
|
||||
" ('better', 'JJR'),\n",
|
||||
" ('or', 'CC'),\n",
|
||||
" ('convert', 'VB'),\n",
|
||||
" ('each', 'DT'),\n",
|
||||
" ('.', '.'),\n",
|
||||
" ('And', 'CC'),\n",
|
||||
" ('then', 'RB'),\n",
|
||||
" ('I', 'PRP'),\n",
|
||||
" ('’', 'VBP'),\n",
|
||||
" ('ve', 'JJ'),\n",
|
||||
" ('neither', 'CC'),\n",
|
||||
" ('goods', 'NNS'),\n",
|
||||
" ('nor', 'CC'),\n",
|
||||
" ('gold', 'NN'),\n",
|
||||
" (',', ','),\n",
|
||||
" ('No', 'DT'),\n",
|
||||
" ('worldly', 'RB'),\n",
|
||||
" ('honour', 'VBZ'),\n",
|
||||
" (',', ','),\n",
|
||||
" ('or', 'CC'),\n",
|
||||
" ('splendour', 'JJ'),\n",
|
||||
" ('hold', 'NN'),\n",
|
||||
" (':', ':'),\n",
|
||||
" ('Not', 'RB'),\n",
|
||||
" ('even', 'RB'),\n",
|
||||
" ('a', 'DT'),\n",
|
||||
" ('dog', 'NN'),\n",
|
||||
" ('would', 'MD'),\n",
|
||||
" ('play', 'VB'),\n",
|
||||
" ('this', 'DT'),\n",
|
||||
" ('part', 'NN'),\n",
|
||||
" ('!', '.'),\n",
|
||||
" ('So', 'RB'),\n",
|
||||
" ('I', 'PRP'),\n",
|
||||
" ('’', 'VBP'),\n",
|
||||
" ('ve', 'JJ'),\n",
|
||||
" ('given', 'VBN'),\n",
|
||||
" ('myself', 'PRP'),\n",
|
||||
" ('to', 'TO'),\n",
|
||||
" ('Magic', 'NNP'),\n",
|
||||
" ('art', 'NN'),\n",
|
||||
" (',', ','),\n",
|
||||
" ('To', 'TO'),\n",
|
||||
" ('see', 'VB'),\n",
|
||||
" ('if', 'IN'),\n",
|
||||
" (',', ','),\n",
|
||||
" ('through', 'IN'),\n",
|
||||
" ('Spirit', 'NNP'),\n",
|
||||
" ('powers', 'NNS'),\n",
|
||||
" ('and', 'CC'),\n",
|
||||
" ('lips', 'NNS'),\n",
|
||||
" (',', ','),\n",
|
||||
" ('I', 'PRP'),\n",
|
||||
" ('might', 'MD'),\n",
|
||||
" ('have', 'VB'),\n",
|
||||
" ('all', 'DT'),\n",
|
||||
" ('secrets', 'NNS'),\n",
|
||||
" ('at', 'IN'),\n",
|
||||
" ('my', 'PRP$'),\n",
|
||||
" ('fingertips', 'NNS'),\n",
|
||||
" ('.', '.'),\n",
|
||||
" ('And', 'CC'),\n",
|
||||
" ('no', 'DT'),\n",
|
||||
" ('longer', 'RBR'),\n",
|
||||
" (',', ','),\n",
|
||||
" ('with', 'IN'),\n",
|
||||
" ('rancid', 'JJ'),\n",
|
||||
" ('sweat', 'NN'),\n",
|
||||
" (',', ','),\n",
|
||||
" ('so', 'RB'),\n",
|
||||
" (',', ','),\n",
|
||||
" ('Still', 'RB'),\n",
|
||||
" ('have', 'VBP'),\n",
|
||||
" ('to', 'TO'),\n",
|
||||
" ('speak', 'VB'),\n",
|
||||
" ('what', 'WP'),\n",
|
||||
" ('I', 'PRP'),\n",
|
||||
" ('can', 'MD'),\n",
|
||||
" ('not', 'RB'),\n",
|
||||
" ('know', 'VB'),\n",
|
||||
" (':', ':'),\n",
|
||||
" ('That', 'IN'),\n",
|
||||
" ('I', 'PRP'),\n",
|
||||
" ('may', 'MD'),\n",
|
||||
" ('understand', 'VB'),\n",
|
||||
" ('whatever', 'WDT'),\n",
|
||||
" ('Binds', 'NNP'),\n",
|
||||
" ('the', 'DT'),\n",
|
||||
" ('world', 'NN'),\n",
|
||||
" ('’', 'NNP'),\n",
|
||||
" ('s', 'VBZ'),\n",
|
||||
" ('innermost', 'NN'),\n",
|
||||
" ('core', 'NN'),\n",
|
||||
" ('together', 'RB')]"
|
||||
]
|
||||
},
|
||||
"metadata": {},
|
||||
"output_type": "display_data"
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"tokens = nltk.word_tokenize(monologue)\n",
|
||||
"display(nltk.pos_tag(tokens))"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"## Exploring Penn TreeBank"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 4,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"[nltk_data] Downloading package treebank to /home/jonas/nltk_data...\n",
|
||||
"[nltk_data] Package treebank is already up-to-date!\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
"data": {
|
||||
"text/plain": [
|
||||
"[('Pierre', 'NNP'),\n",
|
||||
" ('Vinken', 'NNP'),\n",
|
||||
" (',', ','),\n",
|
||||
" ('61', 'CD'),\n",
|
||||
" ('years', 'NNS'),\n",
|
||||
" ('old', 'JJ'),\n",
|
||||
" (',', ','),\n",
|
||||
" ('will', 'MD'),\n",
|
||||
" ('join', 'VB'),\n",
|
||||
" ('the', 'DT'),\n",
|
||||
" ('board', 'NN'),\n",
|
||||
" ('as', 'IN'),\n",
|
||||
" ('a', 'DT'),\n",
|
||||
" ('nonexecutive', 'JJ'),\n",
|
||||
" ('director', 'NN'),\n",
|
||||
" ('Nov.', 'NNP'),\n",
|
||||
" ('29', 'CD'),\n",
|
||||
" ('.', '.')]"
|
||||
]
|
||||
},
|
||||
"metadata": {},
|
||||
"output_type": "display_data"
|
||||
},
|
||||
{
|
||||
"data": {
|
||||
"text/plain": [
|
||||
"'# Tagged sentences: 3914'"
|
||||
]
|
||||
},
|
||||
"metadata": {},
|
||||
"output_type": "display_data"
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"nltk.download('treebank')\n",
|
||||
"annotated_sent = nltk.corpus.treebank.tagged_sents()\n",
|
||||
"\n",
|
||||
"display(annotated_sent[0])\n",
|
||||
"display(\"# Tagged sentences: \" + str(len(annotated_sent)))"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"## tagset information"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 5,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"[nltk_data] Downloading package tagsets to /home/jonas/nltk_data...\n",
|
||||
"[nltk_data] Package tagsets is already up-to-date!\n",
|
||||
"$: dollar\n",
|
||||
" $ -$ --$ A$ C$ HK$ M$ NZ$ S$ U.S.$ US$\n",
|
||||
"'': closing quotation mark\n",
|
||||
" ' ''\n",
|
||||
"(: opening parenthesis\n",
|
||||
" ( [ {\n",
|
||||
"): closing parenthesis\n",
|
||||
" ) ] }\n",
|
||||
",: comma\n",
|
||||
" ,\n",
|
||||
"--: dash\n",
|
||||
" --\n",
|
||||
".: sentence terminator\n",
|
||||
" . ! ?\n",
|
||||
":: colon or ellipsis\n",
|
||||
" : ; ...\n",
|
||||
"CC: conjunction, coordinating\n",
|
||||
" & 'n and both but either et for less minus neither nor or plus so\n",
|
||||
" therefore times v. versus vs. whether yet\n",
|
||||
"CD: numeral, cardinal\n",
|
||||
" mid-1890 nine-thirty forty-two one-tenth ten million 0.5 one forty-\n",
|
||||
" seven 1987 twenty '79 zero two 78-degrees eighty-four IX '60s .025\n",
|
||||
" fifteen 271,124 dozen quintillion DM2,000 ...\n",
|
||||
"DT: determiner\n",
|
||||
" all an another any both del each either every half la many much nary\n",
|
||||
" neither no some such that the them these this those\n",
|
||||
"EX: existential there\n",
|
||||
" there\n",
|
||||
"FW: foreign word\n",
|
||||
" gemeinschaft hund ich jeux habeas Haementeria Herr K'ang-si vous\n",
|
||||
" lutihaw alai je jour objets salutaris fille quibusdam pas trop Monte\n",
|
||||
" terram fiche oui corporis ...\n",
|
||||
"IN: preposition or conjunction, subordinating\n",
|
||||
" astride among uppon whether out inside pro despite on by throughout\n",
|
||||
" below within for towards near behind atop around if like until below\n",
|
||||
" next into if beside ...\n",
|
||||
"JJ: adjective or numeral, ordinal\n",
|
||||
" third ill-mannered pre-war regrettable oiled calamitous first separable\n",
|
||||
" ectoplasmic battery-powered participatory fourth still-to-be-named\n",
|
||||
" multilingual multi-disciplinary ...\n",
|
||||
"JJR: adjective, comparative\n",
|
||||
" bleaker braver breezier briefer brighter brisker broader bumper busier\n",
|
||||
" calmer cheaper choosier cleaner clearer closer colder commoner costlier\n",
|
||||
" cozier creamier crunchier cuter ...\n",
|
||||
"JJS: adjective, superlative\n",
|
||||
" calmest cheapest choicest classiest cleanest clearest closest commonest\n",
|
||||
" corniest costliest crassest creepiest crudest cutest darkest deadliest\n",
|
||||
" dearest deepest densest dinkiest ...\n",
|
||||
"LS: list item marker\n",
|
||||
" A A. B B. C C. D E F First G H I J K One SP-44001 SP-44002 SP-44005\n",
|
||||
" SP-44007 Second Third Three Two * a b c d first five four one six three\n",
|
||||
" two\n",
|
||||
"MD: modal auxiliary\n",
|
||||
" can cannot could couldn't dare may might must need ought shall should\n",
|
||||
" shouldn't will would\n",
|
||||
"NN: noun, common, singular or mass\n",
|
||||
" common-carrier cabbage knuckle-duster Casino afghan shed thermostat\n",
|
||||
" investment slide humour falloff slick wind hyena override subhumanity\n",
|
||||
" machinist ...\n",
|
||||
"NNP: noun, proper, singular\n",
|
||||
" Motown Venneboerger Czestochwa Ranzer Conchita Trumplane Christos\n",
|
||||
" Oceanside Escobar Kreisler Sawyer Cougar Yvette Ervin ODI Darryl CTCA\n",
|
||||
" Shannon A.K.C. Meltex Liverpool ...\n",
|
||||
"NNPS: noun, proper, plural\n",
|
||||
" Americans Americas Amharas Amityvilles Amusements Anarcho-Syndicalists\n",
|
||||
" Andalusians Andes Andruses Angels Animals Anthony Antilles Antiques\n",
|
||||
" Apache Apaches Apocrypha ...\n",
|
||||
"NNS: noun, common, plural\n",
|
||||
" undergraduates scotches bric-a-brac products bodyguards facets coasts\n",
|
||||
" divestitures storehouses designs clubs fragrances averages\n",
|
||||
" subjectivists apprehensions muses factory-jobs ...\n",
|
||||
"PDT: pre-determiner\n",
|
||||
" all both half many quite such sure this\n",
|
||||
"POS: genitive marker\n",
|
||||
" ' 's\n",
|
||||
"PRP: pronoun, personal\n",
|
||||
" hers herself him himself hisself it itself me myself one oneself ours\n",
|
||||
" ourselves ownself self she thee theirs them themselves they thou thy us\n",
|
||||
"PRP$: pronoun, possessive\n",
|
||||
" her his mine my our ours their thy your\n",
|
||||
"RB: adverb\n",
|
||||
" occasionally unabatingly maddeningly adventurously professedly\n",
|
||||
" stirringly prominently technologically magisterially predominately\n",
|
||||
" swiftly fiscally pitilessly ...\n",
|
||||
"RBR: adverb, comparative\n",
|
||||
" further gloomier grander graver greater grimmer harder harsher\n",
|
||||
" healthier heavier higher however larger later leaner lengthier less-\n",
|
||||
" perfectly lesser lonelier longer louder lower more ...\n",
|
||||
"RBS: adverb, superlative\n",
|
||||
" best biggest bluntest earliest farthest first furthest hardest\n",
|
||||
" heartiest highest largest least less most nearest second tightest worst\n",
|
||||
"RP: particle\n",
|
||||
" aboard about across along apart around aside at away back before behind\n",
|
||||
" by crop down ever fast for forth from go high i.e. in into just later\n",
|
||||
" low more off on open out over per pie raising start teeth that through\n",
|
||||
" under unto up up-pp upon whole with you\n",
|
||||
"SYM: symbol\n",
|
||||
" % & ' '' ''. ) ). * + ,. < = > @ A[fj] U.S U.S.S.R * ** ***\n",
|
||||
"TO: \"to\" as preposition or infinitive marker\n",
|
||||
" to\n",
|
||||
"UH: interjection\n",
|
||||
" Goodbye Goody Gosh Wow Jeepers Jee-sus Hubba Hey Kee-reist Oops amen\n",
|
||||
" huh howdy uh dammit whammo shucks heck anyways whodunnit honey golly\n",
|
||||
" man baby diddle hush sonuvabitch ...\n",
|
||||
"VB: verb, base form\n",
|
||||
" ask assemble assess assign assume atone attention avoid bake balkanize\n",
|
||||
" bank begin behold believe bend benefit bevel beware bless boil bomb\n",
|
||||
" boost brace break bring broil brush build ...\n",
|
||||
"VBD: verb, past tense\n",
|
||||
" dipped pleaded swiped regummed soaked tidied convened halted registered\n",
|
||||
" cushioned exacted snubbed strode aimed adopted belied figgered\n",
|
||||
" speculated wore appreciated contemplated ...\n",
|
||||
"VBG: verb, present participle or gerund\n",
|
||||
" telegraphing stirring focusing angering judging stalling lactating\n",
|
||||
" hankerin' alleging veering capping approaching traveling besieging\n",
|
||||
" encrypting interrupting erasing wincing ...\n",
|
||||
"VBN: verb, past participle\n",
|
||||
" multihulled dilapidated aerosolized chaired languished panelized used\n",
|
||||
" experimented flourished imitated reunifed factored condensed sheared\n",
|
||||
" unsettled primed dubbed desired ...\n",
|
||||
"VBP: verb, present tense, not 3rd person singular\n",
|
||||
" predominate wrap resort sue twist spill cure lengthen brush terminate\n",
|
||||
" appear tend stray glisten obtain comprise detest tease attract\n",
|
||||
" emphasize mold postpone sever return wag ...\n",
|
||||
"VBZ: verb, present tense, 3rd person singular\n",
|
||||
" bases reconstructs marks mixes displeases seals carps weaves snatches\n",
|
||||
" slumps stretches authorizes smolders pictures emerges stockpiles\n",
|
||||
" seduces fizzes uses bolsters slaps speaks pleads ...\n",
|
||||
"WDT: WH-determiner\n",
|
||||
" that what whatever which whichever\n",
|
||||
"WP: WH-pronoun\n",
|
||||
" that what whatever whatsoever which who whom whosoever\n",
|
||||
"WP$: WH-pronoun, possessive\n",
|
||||
" whose\n",
|
||||
"WRB: Wh-adverb\n",
|
||||
" how however whence whenever where whereby whereever wherein whereof why\n",
|
||||
"``: opening quotation mark\n",
|
||||
" ` ``\n",
|
||||
"None\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"nltk.download('tagsets')\n",
|
||||
"print(nltk.help.upenn_tagset())"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 8,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"data": {
|
||||
"text/plain": [
|
||||
"[('Pierre', 'NNP'),\n",
|
||||
" ('Vinken', 'NNP'),\n",
|
||||
" (',', ','),\n",
|
||||
" ('61', 'CD'),\n",
|
||||
" ('years', 'NNS'),\n",
|
||||
" ('old', 'JJ'),\n",
|
||||
" (',', ','),\n",
|
||||
" ('will', 'MD'),\n",
|
||||
" ('join', 'VB'),\n",
|
||||
" ('the', 'DT'),\n",
|
||||
" ('board', 'NN'),\n",
|
||||
" ('as', 'IN'),\n",
|
||||
" ('a', 'DT'),\n",
|
||||
" ('nonexecutive', 'JJ'),\n",
|
||||
" ('director', 'NN'),\n",
|
||||
" ('Nov.', 'NNP'),\n",
|
||||
" ('29', 'CD'),\n",
|
||||
" ('.', '.')]"
|
||||
]
|
||||
},
|
||||
"execution_count": 8,
|
||||
"metadata": {},
|
||||
"output_type": "execute_result"
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"annotated_sent[0]"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": []
|
||||
}
|
||||
],
|
||||
"metadata": {
|
||||
"kernelspec": {
|
||||
"display_name": "Python 3",
|
||||
"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.6.3"
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
"nbformat_minor": 2
|
||||
}
|
File diff suppressed because it is too large
Load Diff
@ -1,382 +0,0 @@
|
||||
True : object.conclusion = "NN"
|
||||
object.tag == "ADV" : object.conclusion = "ADV"
|
||||
object.suffixL3 == "ено" : object.conclusion = "VERB"
|
||||
object.suffixL3 == "ано" : object.conclusion = "VERB"
|
||||
object.nextWord1 == "-" : object.conclusion = "ADV"
|
||||
object.nextTag1 == "PUNCT" and object.nextTag2 == "NOUN" : object.conclusion = "NOUN"
|
||||
object.word == "так" and object.nextWord1 == "как" : object.conclusion = "SCONJ"
|
||||
object.suffixL3 == "ино" : object.conclusion = "PROPN"
|
||||
object.nextWord1 == "-" : object.conclusion = "ADV"
|
||||
object.suffixL3 == "нко" : object.conclusion = "PROPN"
|
||||
object.word == "всё" and object.nextTag1 == "NOUN" : object.conclusion = "DET"
|
||||
object.nextTag1 == "SYM" : object.conclusion = "NUM"
|
||||
object.suffixL3 == "бро" : object.conclusion = "NOUN"
|
||||
object.suffixL3 == "ако" : object.conclusion = "PROPN"
|
||||
object.suffixL3 == "йко" : object.conclusion = "PROPN"
|
||||
object.word == "Сити" and object.nextWord1 == "''" : object.conclusion = "PROPN"
|
||||
object.suffixL4 == "бюро" : object.conclusion = "PROPN"
|
||||
object.nextWord1 == "км" : object.conclusion = "NUM"
|
||||
object.nextWord1 == "года" : object.conclusion = "ADJ"
|
||||
object.tag == "NOUN" : object.conclusion = "NOUN"
|
||||
object.suffixL4 == "ском" : object.conclusion = "ADJ"
|
||||
object.word == "войском" : object.conclusion = "NOUN"
|
||||
object.suffixL3 == "кие" : object.conclusion = "ADJ"
|
||||
object.prevTag1 == "PUNCT" and object.word == "русские" and object.nextTag1 == "PUNCT" : object.conclusion = "NOUN"
|
||||
object.suffixL3 == "ыми" : object.conclusion = "ADJ"
|
||||
object.prevTag1 == "PUNCT" and object.nextTag1 == "ADP" : object.conclusion = "VERB"
|
||||
object.prevTag1 == "PROPN" and object.nextTag1 == "PUNCT" : object.conclusion = "PROPN"
|
||||
object.suffixL2 == "es" : object.conclusion = "NOUN"
|
||||
object.suffixL3 == "" : object.conclusion = "ADV"
|
||||
object.suffixL2 == "ми" : object.conclusion = "NOUN"
|
||||
object.suffixL2 == "ия" : object.conclusion = "NOUN"
|
||||
object.nextWord1 == "-" : object.conclusion = "ADV"
|
||||
object.word == "Entertainment" : object.conclusion = "NOUN"
|
||||
object.suffixL2 == "ns" : object.conclusion = "NOUN"
|
||||
object.suffixL3 == "ing" : object.conclusion = "NOUN"
|
||||
object.nextWord2 == ":" : object.conclusion = "NOUN"
|
||||
object.nextWord1 == "-" : object.conclusion = "ADV"
|
||||
object.nextTag1 == "PUNCT" and object.nextTag2 == "NUM" : object.conclusion = "NOUN"
|
||||
object.nextTag1 == "PUNCT" and object.nextTag2 == "ADP" : object.conclusion = "PROPN"
|
||||
object.prevTag2 == "VERB" and object.prevTag1 == "NOUN" : object.conclusion = "PROPN"
|
||||
object.suffixL3 == "ена" : object.conclusion = "NOUN"
|
||||
object.suffixL3 == "ими" : object.conclusion = "ADJ"
|
||||
object.prevWord1 == "," : object.conclusion = "VERB"
|
||||
object.word == "русскими" : object.conclusion = "NOUN"
|
||||
object.suffixL4 == "ьном" : object.conclusion = "ADJ"
|
||||
object.suffixL3 == "шие" : object.conclusion = "VERB"
|
||||
object.prevWord1 == "" : object.conclusion = "ADJ"
|
||||
object.nextTag1 == "NOUN" and object.nextTag2 == "NOUN" : object.conclusion = "AUX"
|
||||
object.suffixL3 == "ово" : object.conclusion = "PROPN"
|
||||
object.word == "слово" : object.conclusion = "NOUN"
|
||||
object.suffixL3 == "ова" : object.conclusion = "PROPN"
|
||||
object.word == "слова" : object.conclusion = "NOUN"
|
||||
object.word == "острова" : object.conclusion = "NOUN"
|
||||
object.prevTag1 == "ADJ" and object.nextTag1 == "PUNCT" : object.conclusion = "NOUN"
|
||||
object.prevTag1 == "DET" and object.word == "вдова" : object.conclusion = "NOUN"
|
||||
object.suffixL4 == "ющей" : object.conclusion = "VERB"
|
||||
object.suffixL3 == "щие" : object.conclusion = "VERB"
|
||||
object.nextWord1 == "," : object.conclusion = "NOUN"
|
||||
object.prevTag1 == "PROPN" and object.nextTag1 == "VERB" : object.conclusion = "PROPN"
|
||||
object.nextWord2 == "альбом" : object.conclusion = "NOUN"
|
||||
object.prevWord2 == "-" : object.conclusion = "NOUN"
|
||||
object.prevTag1 == "PUNCT" and object.word == "м" : object.conclusion = "ADJ"
|
||||
object.suffixL4 == "нном" : object.conclusion = "ADJ"
|
||||
object.prevTag1 == "PUNCT" : object.conclusion = "VERB"
|
||||
object.suffixL4 == "рном" : object.conclusion = "ADJ"
|
||||
object.suffixL4 == "тном" : object.conclusion = "ADJ"
|
||||
object.prevWord1 == "городе" : object.conclusion = "PROPN"
|
||||
object.suffixL3 == "ева" : object.conclusion = "PROPN"
|
||||
object.word == "королева" and object.nextTag1 == "NOUN" and object.nextTag2 == "PUNCT" : object.conclusion = "NOUN"
|
||||
object.suffixL3 == "ево" : object.conclusion = "PROPN"
|
||||
object.suffixL4 == "ески" : object.conclusion = "ADV"
|
||||
object.prevTag1 == "ADV" : object.conclusion = "PROPN"
|
||||
object.prevWord1 == "город" : object.conclusion = "PROPN"
|
||||
object.suffixL4 == "овом" : object.conclusion = "ADJ"
|
||||
object.suffixL4 == "чном" : object.conclusion = "ADJ"
|
||||
object.prevWord1 == "реки" : object.conclusion = "PROPN"
|
||||
object.suffixL3 == "эля" : object.conclusion = "PROPN"
|
||||
object.suffixL4 == "вшей" : object.conclusion = "VERB"
|
||||
object.suffixL4 == "дние" : object.conclusion = "ADJ"
|
||||
object.suffixL4 == "дном" : object.conclusion = "ADJ"
|
||||
object.suffixL4 == "арда" : object.conclusion = "PROPN"
|
||||
object.suffixL4 == "тоне" : object.conclusion = "PROPN"
|
||||
object.suffixL3 == "рге" : object.conclusion = "PROPN"
|
||||
object.prevWord1 == "города" : object.conclusion = "PROPN"
|
||||
object.suffixL3 == "йти" : object.conclusion = "VERB"
|
||||
object.prevWord1 == "*" : object.conclusion = "ADV"
|
||||
object.suffixL3 == "кии" : object.conclusion = "PROPN"
|
||||
object.suffixL4 == "поле" : object.conclusion = "PROPN"
|
||||
object.suffixL4 == "овка" : object.conclusion = "PROPN"
|
||||
object.nextTag1 == "NOUN" : object.conclusion = "NOUN"
|
||||
object.prevWord1 == "провинцию" : object.conclusion = "PROPN"
|
||||
object.suffixL4 == "ичем" : object.conclusion = "PROPN"
|
||||
object.nextWord2 == "родился" : object.conclusion = "PROPN"
|
||||
object.suffixL3 == "ёва" : object.conclusion = "PROPN"
|
||||
object.suffixL4 == "поль" : object.conclusion = "PROPN"
|
||||
object.prevWord1 == "деревня" : object.conclusion = "PROPN"
|
||||
object.suffixL4 == "алия" : object.conclusion = "PROPN"
|
||||
object.suffixL4 == "льда" : object.conclusion = "PROPN"
|
||||
object.suffixL3 == "ите" : object.conclusion = "VERB"
|
||||
object.prevTag1 == "ADP" : object.conclusion = "NOUN"
|
||||
object.suffixL4 == "бном" : object.conclusion = "ADJ"
|
||||
object.suffixL3 == "ида" : object.conclusion = "PROPN"
|
||||
object.suffixL4 == "" : object.conclusion = "NOUN"
|
||||
object.suffixL4 == "ндия" : object.conclusion = "PROPN"
|
||||
object.suffixL4 == "тове" : object.conclusion = "PROPN"
|
||||
object.suffixL4 == "асом" : object.conclusion = "PROPN"
|
||||
object.suffixL3 == "нчи" : object.conclusion = "PROPN"
|
||||
object.suffixL3 == "бии" : object.conclusion = "PROPN"
|
||||
object.suffixL3 == "эль" : object.conclusion = "PROPN"
|
||||
object.suffixL3 == "мми" : object.conclusion = "PROPN"
|
||||
object.suffixL4 == "евка" : object.conclusion = "PROPN"
|
||||
object.suffixL3 == "кию" : object.conclusion = "PROPN"
|
||||
object.suffixL3 == "нне" : object.conclusion = "PROPN"
|
||||
object.prevWord1 == "у" and object.nextWord1 == ";" : object.conclusion = "PROPN"
|
||||
object.suffixL3 == "тти" : object.conclusion = "PROPN"
|
||||
object.suffixL4 == "кера" : object.conclusion = "PROPN"
|
||||
object.suffixL4 == "кове" : object.conclusion = "PROPN"
|
||||
object.prevWord1 == "село" : object.conclusion = "PROPN"
|
||||
object.suffixL4 == "рант" : object.conclusion = "PROPN"
|
||||
object.suffixL4 == "ндию" : object.conclusion = "PROPN"
|
||||
object.suffixL4 == "ейма" : object.conclusion = "PROPN"
|
||||
object.prevWord1 == "в" and object.nextWord1 == "(" : object.conclusion = "PROPN"
|
||||
object.prevTag2 == "ADJ" and object.prevTag1 == "ADP" : object.conclusion = "NOUN"
|
||||
object.prevWord1 == "Южной" : object.conclusion = "PROPN"
|
||||
object.prevWord1 == "святого" : object.conclusion = "PROPN"
|
||||
object.nextWord1 == "родился" : object.conclusion = "PROPN"
|
||||
object.suffixL4 == "берт" : object.conclusion = "PROPN"
|
||||
object.suffixL4 == "дора" : object.conclusion = "PROPN"
|
||||
object.suffixL4 == "нята" : object.conclusion = "VERB"
|
||||
object.suffixL4 == "тней" : object.conclusion = "ADJ"
|
||||
object.suffixL4 == "жном" : object.conclusion = "ADJ"
|
||||
object.suffixL4 == "мном" : object.conclusion = "ADJ"
|
||||
object.suffixL4 == "сном" : object.conclusion = "ADJ"
|
||||
object.prevWord1 == "-" and object.word == "мм" : object.conclusion = "ADJ"
|
||||
object.suffixL4 == "нней" : object.conclusion = "ADJ"
|
||||
object.tag == "NUM" : object.conclusion = "NUM"
|
||||
object.nextWord1 == "-" : object.conclusion = "ADV"
|
||||
object.suffixL4 == "BASE" : object.conclusion = "PROPN"
|
||||
object.nextTag1 == "NOUN" and object.nextTag2 == "ADJ" : object.conclusion = "ADJ"
|
||||
object.suffixL2 == "их" : object.conclusion = "NUM"
|
||||
object.prevTag2 == "ADP" and object.prevTag1 == "PRON" : object.conclusion = "NUM"
|
||||
object.prevWord1 == "," : object.conclusion = "NUM"
|
||||
object.suffixL4 == "ному" : object.conclusion = "NUM"
|
||||
object.prevWord2 == "на" : object.conclusion = "NUM"
|
||||
object.prevTag1 == "DET" : object.conclusion = "NUM"
|
||||
object.prevWord1 == "площадью" : object.conclusion = "NUM"
|
||||
object.nextWord1 == "году" : object.conclusion = "ADJ"
|
||||
object.prevWord1 == "-" : object.conclusion = "ADV"
|
||||
object.prevWord2 == "Ямал" : object.conclusion = "NUM"
|
||||
object.prevWord1 == "-" and object.word == "ти" : object.conclusion = "NUM"
|
||||
object.prevTag1 == "PUNCT" and object.word == "1" and object.nextTag1 == "PUNCT" : object.conclusion = "NUM"
|
||||
object.nextWord1 == "года" : object.conclusion = "ADJ"
|
||||
object.word == "два" : object.conclusion = "NUM"
|
||||
object.word == "три" and object.nextWord1 == "года" : object.conclusion = "NUM"
|
||||
object.prevWord2 == "," : object.conclusion = "NUM"
|
||||
object.prevWord1 == "на" : object.conclusion = "NUM"
|
||||
object.prevTag1 == "ADP" and object.word == "2" and object.nextTag1 == "NOUN" : object.conclusion = "NUM"
|
||||
object.word == "3" : object.conclusion = "NUM"
|
||||
object.nextWord1 == "годах" : object.conclusion = "ADJ"
|
||||
object.nextWord1 == "г." : object.conclusion = "ADJ"
|
||||
object.prevWord1 == "С" : object.conclusion = "ADJ"
|
||||
object.nextWord1 == "января" : object.conclusion = "ADJ"
|
||||
object.word == "много" and object.nextTag1 == "VERB" : object.conclusion = "ADV"
|
||||
object.nextWord1 == "годов" : object.conclusion = "ADJ"
|
||||
object.nextWord1 == "г" : object.conclusion = "ADJ"
|
||||
object.nextWord1 == "июня" : object.conclusion = "ADJ"
|
||||
object.nextWord1 == "сентября" : object.conclusion = "ADJ"
|
||||
object.nextWord1 == "октября" : object.conclusion = "ADJ"
|
||||
object.nextWord1 == "августа" : object.conclusion = "ADJ"
|
||||
object.suffixL2 == "S2" : object.conclusion = "PROPN"
|
||||
object.nextWord1 == "гг" : object.conclusion = "ADJ"
|
||||
object.nextTag1 == "PRON" and object.nextTag2 == "VERB" : object.conclusion = "ADJ"
|
||||
object.prevWord1 == "В" and object.nextWord1 == "--" : object.conclusion = "ADJ"
|
||||
object.nextWord1 == "ноября" : object.conclusion = "ADJ"
|
||||
object.prevWord1 == "в" and object.nextWord1 == "--" : object.conclusion = "ADJ"
|
||||
object.tag == "ADP" : object.conclusion = "ADP"
|
||||
object.prevWord1 == "так" and object.word == "как" : object.conclusion = "ADV"
|
||||
object.prevTag1 == "ADJ" and object.word == "типа" : object.conclusion = "NOUN"
|
||||
object.prevTag1 == "NOUN" and object.word == "как" and object.nextTag1 == "ADP" : object.conclusion = "ADV"
|
||||
object.word == "Как" and object.nextTag1 == "VERB" : object.conclusion = "SCONJ"
|
||||
object.word == "как" and object.nextTag1 == "VERB" and object.nextTag2 == "ADP" : object.conclusion = "ADV"
|
||||
object.prevWord2 == "того" and object.prevWord1 == "," and object.word == "как" : object.conclusion = "SCONJ"
|
||||
object.prevWord1 == "того" and object.word == "как" : object.conclusion = "SCONJ"
|
||||
object.tag == "PRON" : object.conclusion = "PRON"
|
||||
object.word == "том" and object.nextTag1 == "NOUN" : object.conclusion = "DET"
|
||||
object.nextTag1 == "PART" and object.nextTag2 == "NOUN" : object.conclusion = "DET"
|
||||
object.nextWord1 == "просто" : object.conclusion = "PRON"
|
||||
object.prevWord1 == "--" and object.word == "это" : object.conclusion = "AUX"
|
||||
object.word == "это" and object.nextTag1 == "NOUN" : object.conclusion = "DET"
|
||||
object.prevTag1 == "" and object.nextTag1 == "NOUN" : object.conclusion = "DET"
|
||||
object.word == "т." and object.nextTag1 == "ADV" : object.conclusion = "ADV"
|
||||
object.prevWord1 == "в" and object.word == "этом" : object.conclusion = "DET"
|
||||
object.word == "всего" and object.nextTag1 == "NOUN" : object.conclusion = "DET"
|
||||
object.word == "того" and object.nextWord1 == "времени" : object.conclusion = "DET"
|
||||
object.tag == "SCONJ" : object.conclusion = "SCONJ"
|
||||
object.word == "что" and object.nextTag1 == "VERB" : object.conclusion = "PRON"
|
||||
object.prevWord2 == "том" and object.word == "что" : object.conclusion = "SCONJ"
|
||||
object.prevWord2 == "признал" and object.word == "что" : object.conclusion = "SCONJ"
|
||||
object.nextWord2 == "в" : object.conclusion = "SCONJ"
|
||||
object.word == "потому" and object.nextTag1 == "PUNCT" : object.conclusion = "ADV"
|
||||
object.tag == "PROPN" : object.conclusion = "PROPN"
|
||||
object.prevTag1 == "AUX" : object.conclusion = "VERB"
|
||||
object.suffixL2 == "ий" : object.conclusion = "PROPN"
|
||||
object.suffixL4 == "" : object.conclusion = "PROPN"
|
||||
object.nextTag1 == "PROPN" and object.nextTag2 == "PUNCT" : object.conclusion = "PROPN"
|
||||
object.prevWord1 == "-" and object.nextWord1 == "-" : object.conclusion = "ADV"
|
||||
object.suffixL4 == "ован" : object.conclusion = "VERB"
|
||||
object.suffixL4 == "мена" : object.conclusion = "NOUN"
|
||||
object.suffixL4 == "гион" : object.conclusion = "NOUN"
|
||||
object.nextWord1 == "of" : object.conclusion = "NOUN"
|
||||
object.prevTag2 == "VERB" and object.prevTag1 == "ADJ" : object.conclusion = "NOUN"
|
||||
object.suffixL3 == "" : object.conclusion = "PROPN"
|
||||
object.prevTag1 == "NUM" and object.nextTag1 == "PUNCT" : object.conclusion = "NOUN"
|
||||
object.suffixL4 == "овед" : object.conclusion = "NOUN"
|
||||
object.prevTag2 == "ADJ" and object.prevTag1 == "ADJ" : object.conclusion = "NOUN"
|
||||
object.suffixL3 == "" : object.conclusion = "PROPN"
|
||||
object.suffixL3 == "ога" : object.conclusion = "NOUN"
|
||||
object.suffixL4 == "чена" : object.conclusion = "VERB"
|
||||
object.suffixL4 == "вана" : object.conclusion = "VERB"
|
||||
object.word == "Ивана" : object.conclusion = "PROPN"
|
||||
object.suffixL4 == "нена" : object.conclusion = "VERB"
|
||||
object.suffixL3 == "чна" : object.conclusion = "ADJ"
|
||||
object.nextTag1 == "PRON" and object.nextTag2 == "VERB" : object.conclusion = "NOUN"
|
||||
object.suffixL3 == "ics" : object.conclusion = "NOUN"
|
||||
object.prevTag1 == "VERB" and object.nextTag1 == "ADP" : object.conclusion = "NOUN"
|
||||
object.prevWord2 == "" : object.conclusion = "PROPN"
|
||||
object.suffixL2 == "ua" : object.conclusion = "NOUN"
|
||||
object.suffixL3 == "ача" : object.conclusion = "NOUN"
|
||||
object.suffixL2 == "nd" : object.conclusion = "NOUN"
|
||||
object.suffixL3 == "sis" : object.conclusion = "NOUN"
|
||||
object.prevWord1 == "of" : object.conclusion = "NOUN"
|
||||
object.prevTag1 == "ADP" and object.nextTag1 == "PROPN" : object.conclusion = "PROPN"
|
||||
object.suffixL2 == "ry" : object.conclusion = "NOUN"
|
||||
object.nextWord1 == "the" : object.conclusion = "VERB"
|
||||
object.suffixL2 == "ed" : object.conclusion = "VERB"
|
||||
object.prevTag2 == "PUNCT" and object.prevTag1 == "NOUN" : object.conclusion = "PROPN"
|
||||
object.nextWord1 == "Airlines" : object.conclusion = "ADJ"
|
||||
object.tag == "DET" : object.conclusion = "DET"
|
||||
object.nextWord2 == "что" : object.conclusion = "PRON"
|
||||
object.word == "его" and object.nextTag1 == "VERB" : object.conclusion = "PRON"
|
||||
object.prevTag1 == "PUNCT" and object.word == "то" : object.conclusion = "ADV"
|
||||
object.word == "то" and object.nextWord1 == "есть" : object.conclusion = "PRON"
|
||||
object.nextWord1 == "с" : object.conclusion = "CCONJ"
|
||||
object.prevTag1 == "VERB" and object.nextTag1 == "ADP" : object.conclusion = "PRON"
|
||||
object.nextWord1 == "из" : object.conclusion = "DET"
|
||||
object.prevTag1 == "ADP" and object.word == "этого" : object.conclusion = "PRON"
|
||||
object.nextTag2 == "PUNCT" : object.conclusion = "DET"
|
||||
object.nextTag1 == "NOUN" and object.nextTag2 == "NOUN" : object.conclusion = "DET"
|
||||
object.word == "этого" and object.nextTag1 == "NOUN" and object.nextTag2 == "ADP" : object.conclusion = "DET"
|
||||
object.nextTag2 == "PRON" : object.conclusion = "DET"
|
||||
object.prevWord1 == "с" : object.conclusion = "DET"
|
||||
object.prevTag1 == "VERB" and object.nextTag1 == "ADV" : object.conclusion = "PRON"
|
||||
object.prevTag1 == "ADJ" and object.nextTag1 == "ADP" : object.conclusion = "PRON"
|
||||
object.prevTag1 == "NOUN" and object.nextTag1 == "ADP" : object.conclusion = "PRON"
|
||||
object.prevTag1 == "VERB" and object.word == "его" and object.nextTag1 == "PUNCT" : object.conclusion = "PRON"
|
||||
object.nextTag1 == "CCONJ" : object.conclusion = "PRON"
|
||||
object.prevTag2 == "PRON" and object.prevTag1 == "VERB" and object.word == "её" : object.conclusion = "PRON"
|
||||
object.nextTag1 == "PUNCT" and object.nextTag2 == "NOUN" : object.conclusion = "PRON"
|
||||
object.word == "его" and object.nextTag1 == "PUNCT" : object.conclusion = "DET"
|
||||
object.tag == "SYM" : object.conclusion = "SYM"
|
||||
object.tag == "PART" : object.conclusion = "PART"
|
||||
object.tag == "PUNCT" : object.conclusion = "PUNCT"
|
||||
object.tag == "VERB" : object.conclusion = "VERB"
|
||||
object.suffixL4 == "ость" : object.conclusion = "NOUN"
|
||||
object.prevTag1 == "ADJ" and object.nextTag1 == "PUNCT" : object.conclusion = "NOUN"
|
||||
object.nextTag2 == "SCONJ" : object.conclusion = "VERB"
|
||||
object.suffixL4 == "тели" : object.conclusion = "NOUN"
|
||||
object.prevTag1 == "NOUN" and object.word == "хотели" and object.nextTag1 == "VERB" : object.conclusion = "VERB"
|
||||
object.suffixL3 == "лла" : object.conclusion = "PROPN"
|
||||
object.suffixL3 == "ины" : object.conclusion = "NOUN"
|
||||
object.suffixL4 == "щины" : object.conclusion = "PROPN"
|
||||
object.nextTag2 == "" : object.conclusion = "PROPN"
|
||||
object.nextWord1 == "-" : object.conclusion = "ADV"
|
||||
object.suffixL3 == "лав" : object.conclusion = "PROPN"
|
||||
object.prevWord1 == "-" : object.conclusion = "PROPN"
|
||||
object.suffixL3 == "оны" : object.conclusion = "NOUN"
|
||||
object.prevWord1 == "``" and object.nextWord1 == "''" : object.conclusion = "NOUN"
|
||||
object.suffixL2 == "ен" : object.conclusion = "PROPN"
|
||||
object.prevTag2 == "CCONJ" and object.prevTag1 == "PUNCT" : object.conclusion = "VERB"
|
||||
object.suffixL3 == "вен" : object.conclusion = "PROPN"
|
||||
object.suffixL3 == "мен" : object.conclusion = "NOUN"
|
||||
object.suffixL3 == "лли" : object.conclusion = "PROPN"
|
||||
object.suffixL4 == "итет" : object.conclusion = "NOUN"
|
||||
object.prevTag1 == "NOUN" and object.word == "правил" : object.conclusion = "NOUN"
|
||||
object.suffixL4 == "мены" : object.conclusion = "NOUN"
|
||||
object.suffixL4 == "иала" : object.conclusion = "NOUN"
|
||||
object.suffixL3 == "кет" : object.conclusion = "NOUN"
|
||||
object.nextWord1 == "города" : object.conclusion = "NOUN"
|
||||
object.suffixL3 == "уны" : object.conclusion = "NOUN"
|
||||
object.suffixL4 == "пись" : object.conclusion = "NOUN"
|
||||
object.suffixL3 == "дли" : object.conclusion = "PROPN"
|
||||
object.prevTag2 == "NOUN" and object.prevTag1 == "ADP" : object.conclusion = "PROPN"
|
||||
object.nextTag1 == "PUNCT" and object.nextTag2 == "PROPN" : object.conclusion = "PROPN"
|
||||
object.suffixL2 == "ся" : object.conclusion = "VERB"
|
||||
object.suffixL4 == "льны" : object.conclusion = "ADJ"
|
||||
object.suffixL3 == "тен" : object.conclusion = "ADJ"
|
||||
object.tag == "X" : object.conclusion = "X"
|
||||
object.tag == "CCONJ" : object.conclusion = "CCONJ"
|
||||
object.prevTag2 == "CCONJ" and object.prevTag1 == "ADV" : object.conclusion = "PART"
|
||||
object.word == "А" and object.nextTag1 == "PUNCT" : object.conclusion = "NOUN"
|
||||
object.prevWord1 == "-" and object.word == "либо" : object.conclusion = "ADV"
|
||||
object.prevTag1 == "SCONJ" : object.conclusion = "PART"
|
||||
object.tag == "AUX" : object.conclusion = "AUX"
|
||||
object.prevWord1 == "не" and object.word == "было" : object.conclusion = "VERB"
|
||||
object.word == "стал" and object.nextTag1 == "VERB" : object.conclusion = "VERB"
|
||||
object.nextTag1 == "ADP" : object.conclusion = "VERB"
|
||||
object.prevWord1 == "," and object.nextWord1 == "в" : object.conclusion = "AUX"
|
||||
object.prevTag1 == "NOUN" and object.word == "были" and object.nextTag1 == "ADP" : object.conclusion = "AUX"
|
||||
object.prevTag1 == "CCONJ" : object.conclusion = "AUX"
|
||||
object.word == "было" and object.nextTag1 == "NUM" : object.conclusion = "VERB"
|
||||
object.prevWord2 == "," and object.word == "было" : object.conclusion = "AUX"
|
||||
object.word == "стала" and object.nextTag1 == "VERB" : object.conclusion = "VERB"
|
||||
object.prevTag1 == "PUNCT" and object.nextTag1 == "PUNCT" : object.conclusion = "VERB"
|
||||
object.word == "стали" and object.nextTag1 == "VERB" : object.conclusion = "VERB"
|
||||
object.word == "быть" and object.nextTag1 == "PART" : object.conclusion = "VERB"
|
||||
object.prevTag1 == "PART" and object.nextTag1 == "PUNCT" : object.conclusion = "VERB"
|
||||
object.tag == "ADJ" : object.conclusion = "ADJ"
|
||||
object.prevTag1 == "PUNCT" and object.nextTag1 == "ADP" : object.conclusion = "VERB"
|
||||
object.prevWord1 == "-" : object.conclusion = "ADJ"
|
||||
object.prevWord1 == "--" : object.conclusion = "ADJ"
|
||||
object.prevTag2 == "NOUN" and object.prevTag1 == "PUNCT" and object.word == "многие" : object.conclusion = "ADJ"
|
||||
object.suffixL4 == "ений" : object.conclusion = "NOUN"
|
||||
object.nextWord1 == "-" : object.conclusion = "ADV"
|
||||
object.nextWord2 == "либо" : object.conclusion = "DET"
|
||||
object.suffixL3 == "ций" : object.conclusion = "NOUN"
|
||||
object.prevWord1 == "" : object.conclusion = "PROPN"
|
||||
object.prevTag1 == "ADJ" and object.nextTag1 == "PUNCT" : object.conclusion = "NOUN"
|
||||
object.suffixL3 == "ных" : object.conclusion = "ADJ"
|
||||
object.suffixL2 == "ый" : object.conclusion = "ADJ"
|
||||
object.suffixL3 == "ное" : object.conclusion = "ADJ"
|
||||
object.suffixL2 == "го" : object.conclusion = "ADJ"
|
||||
object.suffixL4 == "аний" : object.conclusion = "NOUN"
|
||||
object.suffixL4 == "вший" : object.conclusion = "VERB"
|
||||
object.word == "бывший" : object.conclusion = "ADJ"
|
||||
object.suffixL4 == "ющая" : object.conclusion = "VERB"
|
||||
object.nextWord1 == "км" : object.conclusion = "NUM"
|
||||
object.word == "кв." : object.conclusion = "ADJ"
|
||||
object.suffixL4 == "ющих" : object.conclusion = "VERB"
|
||||
object.word == "следующих" : object.conclusion = "ADJ"
|
||||
object.suffixL4 == "изму" : object.conclusion = "NOUN"
|
||||
object.suffixL4 == "вших" : object.conclusion = "VERB"
|
||||
object.word == "бывших" : object.conclusion = "ADJ"
|
||||
object.suffixL4 == "вшим" : object.conclusion = "VERB"
|
||||
object.suffixL4 == "ывая" : object.conclusion = "VERB"
|
||||
object.suffixL4 == "емых" : object.conclusion = "VERB"
|
||||
object.suffixL4 == "вшая" : object.conclusion = "VERB"
|
||||
object.suffixL3 == "рий" : object.conclusion = "NOUN"
|
||||
object.prevWord1 == "" : object.conclusion = "PROPN"
|
||||
object.nextTag2 == "PUNCT" : object.conclusion = "PROPN"
|
||||
object.prevTag2 == "PUNCT" and object.prevTag1 == "PART" : object.conclusion = "VERB"
|
||||
object.suffixL3 == "зий" : object.conclusion = "NOUN"
|
||||
object.suffixL3 == "лий" : object.conclusion = "NOUN"
|
||||
object.suffixL4 == "дкой" : object.conclusion = "NOUN"
|
||||
object.word == "я" and object.nextTag1 == "VERB" : object.conclusion = "PRON"
|
||||
object.prevTag1 == "PUNCT" and object.nextTag1 == "DET" : object.conclusion = "VERB"
|
||||
object.suffixL4 == "ивая" : object.conclusion = "VERB"
|
||||
object.nextTag1 == "PROPN" : object.conclusion = "NOUN"
|
||||
object.nextTag1 == "PRON" and object.nextTag2 == "NOUN" : object.conclusion = "VERB"
|
||||
object.prevWord1 == "с" and object.nextWord1 == "." : object.conclusion = "NOUN"
|
||||
object.prevWord1 == "семейства" : object.conclusion = "NOUN"
|
||||
object.suffixL4 == "иной" : object.conclusion = "NOUN"
|
||||
object.word == "21" and object.nextWord2 == "." : object.conclusion = "NUM"
|
||||
object.word == "14" and object.nextTag1 == "NOUN" and object.nextTag2 == "PUNCT" : object.conclusion = "NUM"
|
||||
object.suffixL4 == "ющее" : object.conclusion = "VERB"
|
||||
object.suffixL4 == "емые" : object.conclusion = "VERB"
|
||||
object.suffixL3 == "жая" : object.conclusion = "VERB"
|
||||
object.suffixL4 == "олго" : object.conclusion = "ADV"
|
||||
object.suffixL4 == "рмой" : object.conclusion = "NOUN"
|
||||
object.suffixL4 == "вкой" : object.conclusion = "NOUN"
|
||||
object.nextTag1 == "AUX" and object.nextTag2 == "ADV" : object.conclusion = "PROPN"
|
||||
object.prevWord2 == "названия" : object.conclusion = "PROPN"
|
||||
object.word == "12" and object.nextTag1 == "PUNCT" : object.conclusion = "NUM"
|
||||
object.word == "2005" and object.nextTag1 == "PUNCT" : object.conclusion = "NUM"
|
||||
object.word == "14" and object.nextWord1 == "лет" : object.conclusion = "NUM"
|
||||
object.suffixL4 == "ящих" : object.conclusion = "VERB"
|
||||
object.suffixL4 == "ющим" : object.conclusion = "VERB"
|
||||
object.nextTag1 == "NOUN" and object.nextTag2 == "ADP" : object.conclusion = "ADJ"
|
||||
object.suffixL4 == "ящий" : object.conclusion = "VERB"
|
||||
object.suffixL4 == "щему" : object.conclusion = "VERB"
|
||||
object.suffixL4 == "упая" : object.conclusion = "VERB"
|
||||
object.suffixL4 == "емой" : object.conclusion = "VERB"
|
||||
object.nextTag1 == "ADV" and object.nextTag2 == "ADP" : object.conclusion = "VERB"
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user