{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Relation Extraction Exercises\n", "\n", "\n", "\n", "In the lecture we took a look at [four different types of relation extraction](chapters/relation_extraction.ipynb). In this exercise we will expand our understanding of those methods by improving on some of the issues we observed with the basic solutions presented in the lecture." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## <font color='green'>Setup 1</font>: Load Libraries" ] }, { "cell_type": "code", "execution_count": 2, "metadata": { "collapsed": true }, "outputs": [], "source": [ "%%capture\n", "%load_ext autoreload\n", "%autoreload 2\n", "%matplotlib inline\n", "# %cd .. \n", "import sys\n", "sys.path.append(\"../statnlpbook/\")\n", "import math \n", "import tfutil,ie" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## <font color='blue'>Task 1</font>: Shortest Path for Relation Extraction\n", "\n", "Recall that for all the presented relation extraction methods, we were interested in determining the relation between two entities.\n", "A core component of all the relation extraction methods presented in the lecture was to determine the shortest path between those two entities. Features for the relation extraction model were then based on that shortest path. \n", "\n", "The solution to determining the shortest path presented in the lecture was to define it as the words occurring between the two entities. \n", "\n", "- What is a possible problem with this way of determining the shortest path?\n", "- What is a better way of producing such a shortest path?\n", "\n", "- Improve the relation extraction methods by implementing an alternative shortest path extraction method, the old one is \"sentenceToShortPath(sent)\".\n", "- Apply the new shortest path extraction method to the relation extraction methods presented with the lecture. \n", " - Note that in order for this to work, the new shortest path extraction method will need to return a list of words which define the shortest path.\n", "- Observe the differences between the old and new path shortening method.\n", "\n", "Hint: revisit the lecture materials on parsing." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## <font color='blue'>Task 2</font>: Shortest Path Features\n", "\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Recall that, in order to obtain features for supervised relation extraction, we transformed the shortest path between the two entities to word features using the built-in sklearn \"CountVectorizer()\". \n", "\n", "As discussed, this can lead to obtaining features which are too general (e.g. stopwords such as \"a\", \"of\"). A better approach would be to have features which are based on the syntax of the sentence.\n", "\n", "- Implement a method which, for each sentence, returns a syntactic representation of that sentence\n", "- Narrow this syntactic representation down to words on the shortest path between the two entities\n", "\n", "Hint: if you have completed Task 1, you should already have a solution for those the two exercises above.\n", "\n", "- Use the syntactic representation as features for supervised learning. To do this, replace the \"featTransform()\" method. \n", " - Note that you define the whole syntactic path as a feature, or split it into several words. \n", " - For the latter, pass the syntactic path to the CountVectorizer() and set the n-gram range appropriately. It is set to \"1, 1\" by default, meaning it returns single words only. See the [sklearn documentation](http://scikit-learn.org/stable/modules/generated/sklearn.feature_extraction.text.CountVectorizer.html) for the CountVectorizer.\n", "- Use a combination of the syntactic representation and words as features. In the literature, this is typically referred to as \"lexico-syntactic features\". Proceed in the same way as for syntax-only features above.\n", "- Observe the effect of choosing different features on the supervised relation extraction output." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## <font color='blue'>Task 2</font>: Helper Function\n", "\n", "The current state of the art parser is [SyntaxNet](https://github.com/tensorflow/models/tree/master/syntaxnet), also available as Docker container [here](http://www.whycouch.com/2016/07/how-to-install-and-use-syntaxnet-and.html).\n", "It parses sentences into the [CoNLL-U format](http://universaldependencies.org/format.html).\n", "\n", "The relation extraction data is already parsed with this parser, and you can load it like so:" ] }, { "cell_type": "code", "execution_count": 3, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "['1', 'demonstrates', '_', 'VERB', 'VBZ', '_', '0', 'ROOT', '_', '_']\n", "['2', 'XXXXX', '_', '.', ',', '_', '5', 'nn', '_', '_']\n", "['3', 'and', '_', 'CONJ', 'CC', '_', '2', 'cc', '_', '_']\n", "['4', 'clustering', '_', 'NOUN', 'NN', '_', '2', 'conj', '_', '_']\n", "['5', 'techniques', '_', 'NOUN', 'NNS', '_', '1', 'dobj', '_', '_']\n", "['6', 'for', '_', 'ADP', 'IN', '_', '5', 'prep', '_', '_']\n", "['7', 'XXXXX', '_', '.', '.', '_', '6', 'pobj', '_', '_']\n", "['']\n", "['1', 'demonstrates', '_', 'VERB', 'VBZ', '_', '0', 'ROOT', '_', '_']\n", "['2', 'text', '_', 'NOUN', 'NN', '_', '3', 'nn', '_', '_']\n", "['3', 'mining', '_', 'NOUN', 'NN', '_', '1', 'dobj', '_', '_']\n", "['4', 'and', '_', 'CONJ', 'CC', '_', '3', 'cc', '_', '_']\n", "['5', 'XXXXX', '_', '.', ',', '_', '3', 'conj', '_', '_']\n", "['6', 'for', '_', 'ADP', 'IN', '_', '3', 'prep', '_', '_']\n", "['7', 'building', '_', 'VERB', 'VBG', '_', '6', 'pobj', '_', '_']\n", "['8', 'XXXXX', '_', '.', '.', '_', '1', 'punct', '_', '_']\n", "['']\n", "['1', 'the', '_', 'DET', 'DT', '_', '2', 'det', '_', '_']\n", "['2', 'XXXXX', '_', 'NOUN', 'NN', '_', '4', 'nsubj', '_', '_']\n", "['3', 'is', '_', 'VERB', 'VBZ', '_', '4', 'cop', '_', '_']\n", "['4', 'able', '_', 'ADJ', 'JJ', '_', '0', 'ROOT', '_', '_']\n", "['5', 'to', '_', 'PRT', 'TO', '_', '6', 'aux', '_', '_']\n", "['6', 'enhance', '_', 'VERB', 'VB', '_', '4', 'xcomp', '_', '_']\n", "['7', 'the', '_', 'DET', 'DT', '_', '6', 'dobj', '_', '_']\n", "['8', 'XXXXX', '_', '.', '.', '_', '4', 'punct', '_', '_']\n", "['']\n", "['1', 'we', '_', 'PRON', 'PRP', '_', '2', 'nsubj', '_', '_']\n", "['2', 'propose', '_', 'VERB', 'VBP', '_', '0', 'ROOT', '_', '_']\n", "['3', 'a', '_', 'DET', 'DT', '_', '5', 'det', '_', '_']\n", "['4', 'fully', '_', 'ADV', 'RB', '_', '5', 'amod', '_', '_']\n", "['5', 'XXXXX', '_', '.', ',', '_', '2', 'dobj', '_', '_']\n", "['6', 'for', '_', 'ADP', 'IN', '_', '5', 'prep', '_', '_']\n", "['7', '3d', '_', 'NUM', 'CD', '_', '8', 'num', '_', '_']\n", "['8', 'XXXXX', '_', 'NOUN', 'NN', '_', '6', 'pobj', '_', '_']\n", "['9', 'of', '_', 'ADP', 'IN', '_', '8', 'prep', '_', '_']\n", "['10', 'buildings', '_', 'NOUN', 'NNS', '_', '9', 'pobj', '_', '_']\n", "['']\n", "['1', 'this', '_', 'DET', 'DT', '_', '2', 'det', '_', '_']\n", "['2', 'paper', '_', 'NOUN', 'NN', '_', '3', 'nsubj', '_', '_']\n", "['3', 'proposes', '_', 'VERB', 'VBZ', '_', '0', 'ROOT', '_', '_']\n", "['4', 'two', '_', 'NUM', 'CD', '_', '5', 'num', '_', '_']\n", "['5', 'XXXXX', '_', '.', ',', '_', '3', 'dobj', '_', '_']\n", "['6', 'to', '_', 'PRT', 'TO', '_', '7', 'aux', '_', '_']\n", "['7', 'solve', '_', 'VERB', 'VB', '_', '5', 'infmod', '_', '_']\n", "['8', 'a', '_', 'DET', 'DT', '_', '9', 'det', '_', '_']\n", "['9', 'XXXXX', '_', '.', '.', '_', '7', 'dobj', '_', '_']\n", "['']\n", "['1', 'XXXXX', '_', '.', 'NFP', '_', '4', 'punct', '_', '_']\n", "['2', 'is', '_', 'VERB', 'VBZ', '_', '4', 'cop', '_', '_']\n", "['3', 'more', '_', 'ADV', 'RBR', '_', '4', 'advmod', '_', '_']\n", "['4', 'capable', '_', 'ADJ', 'JJ', '_', '0', 'ROOT', '_', '_']\n", "['5', 'of', '_', 'ADP', 'IN', '_', '4', 'prep', '_', '_']\n", "['6', 'XXXXX', '_', '.', '.', '_', '4', 'punct', '_', '_']\n", "['']\n", "['1', 'XXXXX', '_', 'X', 'UH', '_', '5', 'nn', '_', '_']\n", "['2', 'and', '_', 'CONJ', 'CC', '_', '1', 'cc', '_', '_']\n", "['3', 'pso-based', '_', 'VERB', 'VBN', '_', '4', 'amod', '_', '_']\n", "['4', 'anfis', '_', '.', '$', '_', '1', 'conj', '_', '_']\n", "['5', 'approaches', '_', 'NOUN', 'NNS', '_', '7', 'nsubjpass', '_', '_']\n", "['6', 'are', '_', 'VERB', 'VBP', '_', '7', 'auxpass', '_', '_']\n", "['7', 'proposed', '_', 'VERB', 'VBN', '_', '0', 'ROOT', '_', '_']\n", "['8', 'to', '_', 'PRT', 'TO', '_', '9', 'aux', '_', '_']\n", "['9', 'model', '_', 'VERB', 'VB', '_', '7', 'xcomp', '_', '_']\n", "['10', 'XXXXX', '_', '.', ',', '_', '9', 'punct', '_', '_']\n", "['11', 'in', '_', 'ADP', 'IN', '_', '9', 'prep', '_', '_']\n", "['12', 'affective', '_', 'ADJ', 'JJ', '_', '14', 'amod', '_', '_']\n", "['13', 'product', '_', 'NOUN', 'NN', '_', '14', 'nn', '_', '_']\n", "['14', 'design', '_', 'NOUN', 'NN', '_', '11', 'pobj', '_', '_']\n", "['']\n", "['1', 'XXXXX', '_', 'X', 'UH', '_', '5', 'nn', '_', '_']\n", "['2', 'and', '_', 'CONJ', 'CC', '_', '1', 'cc', '_', '_']\n", "['3', 'pso-based', '_', 'VERB', 'VBN', '_', '4', 'amod', '_', '_']\n", "['4', 'anfis', '_', '.', '$', '_', '1', 'conj', '_', '_']\n", "['5', 'approaches', '_', 'NOUN', 'NNS', '_', '7', 'nsubjpass', '_', '_']\n", "['6', 'are', '_', 'VERB', 'VBP', '_', '7', 'auxpass', '_', '_']\n", "['7', 'proposed', '_', 'VERB', 'VBN', '_', '0', 'ROOT', '_', '_']\n", "['8', 'to', '_', 'PRT', 'TO', '_', '9', 'aux', '_', '_']\n", "['9', 'model', '_', 'VERB', 'VB', '_', '7', 'xcomp', '_', '_']\n", "['10', 'customer', '_', 'NOUN', 'NN', '_', '11', 'nn', '_', '_']\n", "['11', 'satisfaction', '_', 'NOUN', 'NN', '_', '9', 'dobj', '_', '_']\n", "['12', 'in', '_', 'ADP', 'IN', '_', '11', 'prep', '_', '_']\n", "['13', 'affective', '_', 'ADJ', 'JJ', '_', '12', 'pobj', '_', '_']\n", "['14', 'XXXXX', '_', '.', '.', '_', '7', 'punct', '_', '_']\n", "['']\n", "['1', 'XXXXX', '_', '.', 'NFP', '_', '2', 'punct', '_', '_']\n", "['2', 'solved', '_', 'VERB', 'VBD', '_', '0', 'ROOT', '_', '_']\n", "['3', 'the', '_', 'DET', 'DT', '_', '4', 'det', '_', '_']\n", "['4', 'XXXXX', '_', 'NOUN', 'NN', '_', '2', 'dobj', '_', '_']\n", "['5', 'and', '_', 'CONJ', 'CC', '_', '2', 'cc', '_', '_']\n", "['6', 'obtained', '_', 'VERB', 'VBD', '_', '2', 'conj', '_', '_']\n", "['7', 'the', '_', 'DET', 'DT', '_', '10', 'det', '_', '_']\n", "['8', 'optimal', '_', 'ADJ', 'JJ', '_', '9', 'amod', '_', '_']\n", "['9', 'section', '_', 'NOUN', 'NN', '_', '10', 'nn', '_', '_']\n", "['10', 'shape', '_', 'NOUN', 'NN', '_', '6', 'dobj', '_', '_']\n", "['']\n", "['1', 'XXXXX', '_', '.', 'NFP', '_', '0', 'ROOT', '_', '_']\n", "['2', 'for', '_', 'ADP', 'IN', '_', '1', 'prep', '_', '_']\n", "['3', 'sizing', '_', 'VERB', 'VBG', '_', '2', 'pcomp', '_', '_']\n", "['4', 'and', '_', 'CONJ', 'CC', '_', '3', 'cc', '_', '_']\n", "['5', 'XXXXX', '_', 'NOUN', 'NNP', '_', '3', 'conj', '_', '_']\n", "['6', 'of', '_', 'ADP', 'IN', '_', '5', 'prep', '_', '_']\n", "['7', 'cable', '_', 'NOUN', 'NN', '_', '6', 'pobj', '_', '_']\n", "['8', '--', '_', '.', ':', '_', '5', 'punct', '_', '_']\n", "['9', 'truss', '_', 'NOUN', 'NN', '_', '10', 'nn', '_', '_']\n", "['10', 'structures', '_', 'NOUN', 'NNS', '_', '3', 'dobj', '_', '_']\n", "['']\n", "['1', 'an', '_', 'DET', 'DT', '_', '3', 'det', '_', '_']\n", "['2', 'XXXXX', '_', '.', ',', '_', '3', 'nn', '_', '_']\n", "['3', 'model', '_', 'NOUN', 'NN', '_', '5', 'nsubjpass', '_', '_']\n", "['4', 'is', '_', 'VERB', 'VBZ', '_', '5', 'auxpass', '_', '_']\n", "['5', 'employed', '_', 'VERB', 'VBN', '_', '0', 'ROOT', '_', '_']\n", "['6', 'to', '_', 'ADP', 'IN', '_', '5', 'prep', '_', '_']\n", "['7', 'XXXXX', '_', '.', '.', '_', '5', 'punct', '_', '_']\n", "['']\n", "['1', 'XXXXX', '_', '.', '``', '_', '2', 'nsubj', '_', '_']\n", "['2', 'assists', '_', 'VERB', 'VBZ', '_', '0', 'ROOT', '_', '_']\n", "['3', 'the', '_', 'DET', 'DT', '_', '2', 'dobj', '_', '_']\n", "['4', 'XXXXX', '_', '.', '.', '_', '2', 'punct', '_', '_']\n", "['']\n", "['1', 'a', '_', 'DET', 'DT', '_', '3', 'det', '_', '_']\n", "['2', 'new', '_', 'ADJ', 'JJ', '_', '3', 'amod', '_', '_']\n", "['3', 'combination', '_', 'NOUN', 'NN', '_', '10', 'nsubjpass', '_', '_']\n", "['4', 'of', '_', 'ADP', 'IN', '_', '3', 'prep', '_', '_']\n", "['5', 'XXXXX', '_', 'NOUN', 'NNP', '_', '8', 'nn', '_', '_']\n", "['6', 'and', '_', 'CONJ', 'CC', '_', '5', 'cc', '_', '_']\n", "['7', 'chaos', '_', 'NOUN', 'NN', '_', '5', 'conj', '_', '_']\n", "['8', 'theory', '_', 'NOUN', 'NN', '_', '4', 'pobj', '_', '_']\n", "['9', 'is', '_', 'VERB', 'VBZ', '_', '10', 'auxpass', '_', '_']\n", "['10', 'presented', '_', 'VERB', 'VBN', '_', '0', 'ROOT', '_', '_']\n", "['11', 'for', '_', 'ADP', 'IN', '_', '10', 'prep', '_', '_']\n", "['12', 'XXXXX', '_', '.', '.', '_', '10', 'punct', '_', '_']\n", "['']\n", "['1', 'a', '_', 'DET', 'DT', '_', '3', 'det', '_', '_']\n", "['2', 'new', '_', 'ADJ', 'JJ', '_', '3', 'amod', '_', '_']\n", "['3', 'combination', '_', 'NOUN', 'NN', '_', '10', 'nsubjpass', '_', '_']\n", "['4', 'of', '_', 'ADP', 'IN', '_', '3', 'prep', '_', '_']\n", "['5', 'swarm', '_', 'ADJ', 'JJ', '_', '6', 'amod', '_', '_']\n", "['6', 'intelligence', '_', 'NOUN', 'NN', '_', '4', 'pobj', '_', '_']\n", "['7', 'and', '_', 'CONJ', 'CC', '_', '6', 'cc', '_', '_']\n", "['8', 'XXXXX', '_', 'NOUN', 'NN', '_', '6', 'conj', '_', '_']\n", "['9', 'is', '_', 'VERB', 'VBZ', '_', '10', 'auxpass', '_', '_']\n", "['10', 'presented', '_', 'VERB', 'VBN', '_', '0', 'ROOT', '_', '_']\n", "['11', 'for', '_', 'ADP', 'IN', '_', '10', 'prep', '_', '_']\n", "['12', 'XXXXX', '_', '.', '.', '_', '10', 'punct', '_', '_']\n", "['']\n", "['1', 'a', '_', 'DET', 'DT', '_', '3', 'det', '_', '_']\n", "['2', 'new', '_', 'ADJ', 'JJ', '_', '3', 'amod', '_', '_']\n", "['3', 'combination', '_', 'NOUN', 'NN', '_', '10', 'nsubjpass', '_', '_']\n", "['4', 'of', '_', 'ADP', 'IN', '_', '3', 'prep', '_', '_']\n", "['5', 'swarm', '_', 'ADJ', 'JJ', '_', '6', 'amod', '_', '_']\n", "['6', 'intelligence', '_', 'NOUN', 'NN', '_', '4', 'pobj', '_', '_']\n", "['7', 'and', '_', 'CONJ', 'CC', '_', '6', 'cc', '_', '_']\n", "['8', 'XXXXX', '_', 'NOUN', 'NN', '_', '6', 'conj', '_', '_']\n", "['9', 'is', '_', 'VERB', 'VBZ', '_', '10', 'auxpass', '_', '_']\n", "['10', 'presented', '_', 'VERB', 'VBN', '_', '0', 'ROOT', '_', '_']\n", "['11', 'for', '_', 'ADP', 'IN', '_', '10', 'prep', '_', '_']\n", "['12', 'XXXXX', '_', '.', '.', '_', '10', 'punct', '_', '_']\n", "['']\n", "['1', 'we', '_', 'PRON', 'PRP', '_', '2', 'nsubj', '_', '_']\n", "['2', 'propose', '_', 'VERB', 'VBP', '_', '0', 'ROOT', '_', '_']\n", "['3', 'here', '_', 'ADV', 'RB', '_', '2', 'advmod', '_', '_']\n", "['4', 'to', '_', 'PRT', 'TO', '_', '5', 'aux', '_', '_']\n", "['5', 'use', '_', 'VERB', 'VB', '_', '2', 'xcomp', '_', '_']\n", "['6', 'partially', '_', 'ADV', 'RB', '_', '7', 'advmod', '_', '_']\n", "['7', 'converged', '_', 'VERB', 'VBN', '_', '8', 'amod', '_', '_']\n", "['8', 'data', '_', 'NOUN', 'NNS', '_', '5', 'dobj', '_', '_']\n", "['9', 'to', '_', 'PRT', 'TO', '_', '10', 'aux', '_', '_']\n", "['10', 'construct', '_', 'VERB', 'VB', '_', '5', 'xcomp', '_', '_']\n", "['11', 'a', '_', 'DET', 'DT', '_', '12', 'det', '_', '_']\n", "['12', 'XXXXX', '_', 'NOUN', 'NN', '_', '10', 'dobj', '_', '_']\n", "['13', 'in', '_', 'ADP', 'IN', '_', '10', 'prep', '_', '_']\n", "['14', 'XXXXX', '_', '.', '.', '_', '2', 'punct', '_', '_']\n", "['']\n", "['1', 'a', '_', 'DET', 'DT', '_', '2', 'det', '_', '_']\n", "['2', 'XXXXX', '_', 'NOUN', 'NN', '_', '15', 'nsubjpass', '_', '_']\n", "['3', '-LRB-', '_', '.', '-LRB-', '_', '2', 'punct', '_', '_']\n", "['4', 'ga', '_', 'NOUN', 'NN', '_', '2', 'dep', '_', '_']\n", "['5', '-RRB-', '_', '.', '-RRB-', '_', '2', 'punct', '_', '_']\n", "['6', 'for', '_', 'ADP', 'IN', '_', '2', 'prep', '_', '_']\n", "['7', 'automated', '_', 'VERB', 'VBN', '_', '8', 'amod', '_', '_']\n", "['8', 'XXXXX', '_', 'NOUN', 'NNP', '_', '6', 'pobj', '_', '_']\n", "['9', 'of', '_', 'ADP', 'IN', '_', '8', 'prep', '_', '_']\n", "['10', 'a', '_', 'DET', 'DT', '_', '13', 'det', '_', '_']\n", "['11', 'two-stage', '_', 'ADJ', 'JJ', '_', '12', 'amod', '_', '_']\n", "['12', 'speed', '_', 'NOUN', 'NN', '_', '13', 'nn', '_', '_']\n", "['13', 'reducer', '_', 'NOUN', 'NN', '_', '9', 'pobj', '_', '_']\n", "['14', 'is', '_', 'VERB', 'VBZ', '_', '15', 'auxpass', '_', '_']\n", "['15', 'introduced', '_', 'VERB', 'VBN', '_', '0', 'ROOT', '_', '_']\n", "['']\n", "['1', 'XXXXX', '_', '.', 'NFP', '_', '3', 'nsubjpass', '_', '_']\n", "['2', 'are', '_', 'VERB', 'VBP', '_', '3', 'auxpass', '_', '_']\n", "['3', 'used', '_', 'VERB', 'VBN', '_', '0', 'ROOT', '_', '_']\n", "['4', 'to', '_', 'ADP', 'IN', '_', '3', 'prep', '_', '_']\n", "['5', 'XXXXX', '_', 'NOUN', 'NNP', '_', '4', 'pobj', '_', '_']\n", "['6', 'between', '_', 'ADP', 'IN', '_', '3', 'prep', '_', '_']\n", "['7', 'parameters', '_', 'NOUN', 'NNS', '_', '6', 'pobj', '_', '_']\n", "['8', 'and', '_', 'CONJ', 'CC', '_', '7', 'cc', '_', '_']\n", "['9', 'response', '_', 'NOUN', 'NN', '_', '7', 'conj', '_', '_']\n", "['10', 'of', '_', 'ADP', 'IN', '_', '7', 'prep', '_', '_']\n", "['11', 'the', '_', 'DET', 'DT', '_', '12', 'det', '_', '_']\n", "['12', 'model', '_', 'NOUN', 'NN', '_', '10', 'pobj', '_', '_']\n", "['']\n", "['1', 'a', '_', 'DET', 'DT', '_', '2', 'det', '_', '_']\n", "['2', 'XXXXX', '_', 'NOUN', 'NN', '_', '4', 'nsubjpass', '_', '_']\n", "['3', 'is', '_', 'VERB', 'VBZ', '_', '4', 'auxpass', '_', '_']\n", "['4', 'adopted', '_', 'VERB', 'VBN', '_', '0', 'ROOT', '_', '_']\n", "['5', 'as', '_', 'ADP', 'IN', '_', '4', 'prep', '_', '_']\n", "['6', 'the', '_', 'DET', 'DT', '_', '7', 'det', '_', '_']\n", "['7', 'XXXXX', '_', 'NOUN', 'NN', '_', '5', 'pobj', '_', '_']\n", "['8', 'of', '_', 'ADP', 'IN', '_', '7', 'prep', '_', '_']\n", "['9', 'vns', '_', 'NOUN', 'NNS', '_', '8', 'pobj', '_', '_']\n", "['']\n", "['1', 'XXXXX', '_', 'X', 'LS', '_', '2', 'nn', '_', '_']\n", "['2', 'application', '_', 'NOUN', 'NN', '_', '0', 'ROOT', '_', '_']\n", "['3', 'on', '_', 'ADP', 'IN', '_', '2', 'prep', '_', '_']\n", "['4', 'XXXXX', '_', '.', '.', '_', '3', 'pobj', '_', '_']\n", "['']\n", "['1', 'grid', '_', 'NOUN', 'NN', '_', '2', 'nn', '_', '_']\n", "['2', 'portioning', '_', 'NOUN', 'NN', '_', '6', 'nsubjpass', '_', '_']\n", "['3', 'and', '_', 'CONJ', 'CC', '_', '2', 'cc', '_', '_']\n", "['4', 'XXXXX', '_', '.', 'NFP', '_', '2', 'conj', '_', '_']\n", "['5', 'are', '_', 'VERB', 'VBP', '_', '6', 'auxpass', '_', '_']\n", "['6', 'used', '_', 'VERB', 'VBN', '_', '0', 'ROOT', '_', '_']\n", "['7', 'to', '_', 'ADP', 'IN', '_', '6', 'prep', '_', '_']\n", "['8', 'XXXXX', '_', '.', '.', '_', '6', 'punct', '_', '_']\n", "['']\n", "['1', 'a', '_', 'DET', 'DT', '_', '3', 'det', '_', '_']\n", "['2', 'new', '_', 'ADJ', 'JJ', '_', '3', 'amod', '_', '_']\n", "['3', 'XXXXX', '_', 'NOUN', 'NN', '_', '5', 'nsubjpass', '_', '_']\n", "['4', 'is', '_', 'VERB', 'VBZ', '_', '5', 'auxpass', '_', '_']\n", "['5', 'proposed', '_', 'VERB', 'VBN', '_', '0', 'ROOT', '_', '_']\n", "['6', 'to', '_', 'PRT', 'TO', '_', '7', 'aux', '_', '_']\n", "['7', 'solve', '_', 'VERB', 'VB', '_', '5', 'xcomp', '_', '_']\n", "['8', 'the', '_', 'DET', 'DT', '_', '9', 'det', '_', '_']\n", "['9', 'XXXXX', '_', 'NOUN', 'NNP', '_', '7', 'dobj', '_', '_']\n", "['10', 'associated', '_', 'VERB', 'VBN', '_', '9', 'partmod', '_', '_']\n", "['11', 'with', '_', 'ADP', 'IN', '_', '10', 'prep', '_', '_']\n", "['12', 'damage', '_', 'NOUN', 'NN', '_', '13', 'nn', '_', '_']\n", "['13', 'assessment', '_', 'NOUN', 'NN', '_', '11', 'pobj', '_', '_']\n", "['']\n", "['1', 'XXXXX', '_', 'X', 'UH', '_', '5', 'nsubj', '_', '_']\n", "['2', '-LRB-', '_', '.', '-LRB-', '_', '1', 'punct', '_', '_']\n", "['3', 'sa', '_', 'NOUN', 'NNP', '_', '1', 'dep', '_', '_']\n", "['4', '-RRB-', '_', '.', '-RRB-', '_', '1', 'punct', '_', '_']\n", "['5', 'helps', '_', 'VERB', 'VBZ', '_', '0', 'ROOT', '_', '_']\n", "['6', 'ivs', '_', 'ADV', 'RB', '_', '5', 'advmod', '_', '_']\n", "['7', 'in', '_', 'ADP', 'IN', '_', '5', 'prep', '_', '_']\n", "['8', 'XXXXX', '_', 'NOUN', 'NN', '_', '7', 'pobj', '_', '_']\n", "['9', 'with', '_', 'ADP', 'IN', '_', '8', 'prep', '_', '_']\n", "['10', 'time', '_', 'NOUN', 'NN', '_', '11', 'nn', '_', '_']\n", "['11', 'constraint', '_', 'NOUN', 'NN', '_', '9', 'pobj', '_', '_']\n", "['']\n", "['1', 'this', '_', 'DET', 'DT', '_', '2', 'det', '_', '_']\n", "['2', 'study', '_', 'NOUN', 'NN', '_', '3', 'nsubj', '_', '_']\n", "['3', 'focused', '_', 'VERB', 'VBD', '_', '0', 'ROOT', '_', '_']\n", "['4', 'on', '_', 'ADP', 'IN', '_', '3', 'prep', '_', '_']\n", "['5', 'the', '_', 'DET', 'DT', '_', '6', 'det', '_', '_']\n", "['6', 'XXXXX', '_', 'NOUN', 'NN', '_', '4', 'pobj', '_', '_']\n", "['7', 'of', '_', 'ADP', 'IN', '_', '6', 'prep', '_', '_']\n", "['8', 'XXXXX', '_', 'NOUN', 'NNP', '_', '7', 'pobj', '_', '_']\n", "['9', 'in', '_', 'ADP', 'IN', '_', '3', 'prep', '_', '_']\n", "['10', 'images', '_', 'NOUN', 'NNS', '_', '9', 'pobj', '_', '_']\n", "['']\n", "['1', 'design', '_', 'NOUN', 'NN', '_', '0', 'ROOT', '_', '_']\n", "['2', 'of', '_', 'ADP', 'IN', '_', '1', 'prep', '_', '_']\n", "['3', 'a', '_', 'DET', 'DT', '_', '4', 'det', '_', '_']\n", "['4', 'XXXXX', '_', 'NOUN', 'NN', '_', '2', 'pobj', '_', '_']\n", "['5', 'used', '_', 'VERB', 'VBN', '_', '4', 'partmod', '_', '_']\n", "['6', 'as', '_', 'ADP', 'IN', '_', '5', 'prep', '_', '_']\n", "['7', 'XXXXX', '_', '.', '.', '_', '1', 'punct', '_', '_']\n", "['']\n", "['1', 'this', '_', 'DET', 'DT', '_', '2', 'det', '_', '_']\n", "['2', 'research', '_', 'NOUN', 'NN', '_', '3', 'nsubj', '_', '_']\n", "['3', 'aims', '_', 'VERB', 'VBZ', '_', '0', 'ROOT', '_', '_']\n", "['4', 'to', '_', 'PRT', 'TO', '_', '5', 'aux', '_', '_']\n", "['5', 'reduce', '_', 'VERB', 'VB', '_', '3', 'xcomp', '_', '_']\n", "['6', 'the', '_', 'DET', 'DT', '_', '7', 'det', '_', '_']\n", "['7', 'XXXXX', '_', 'NOUN', 'NN', '_', '5', 'dobj', '_', '_']\n", "['8', 'for', '_', 'ADP', 'IN', '_', '5', 'prep', '_', '_']\n", "['9', 'overall', '_', 'ADJ', 'JJ', '_', '11', 'amod', '_', '_']\n", "['10', 'collision', '_', 'NOUN', 'NN', '_', '11', 'nn', '_', '_']\n", "['11', 'checks', '_', 'NOUN', 'NNS', '_', '8', 'pobj', '_', '_']\n", "['12', 'in', '_', 'ADP', 'IN', '_', '11', 'prep', '_', '_']\n", "['13', 'a', '_', 'DET', 'DT', '_', '14', 'det', '_', '_']\n", "['14', 'virtual', '_', 'ADJ', 'JJ', '_', '12', 'pobj', '_', '_']\n", "['15', 'XXXXX', '_', '.', '.', '_', '3', 'punct', '_', '_']\n", "['']\n", "['1', 'XXXXX', '_', '.', 'NFP', '_', '3', 'nsubjpass', '_', '_']\n", "['2', 'are', '_', 'VERB', 'VBP', '_', '3', 'auxpass', '_', '_']\n", "['3', 'introduced', '_', 'VERB', 'VBN', '_', '0', 'ROOT', '_', '_']\n", "['4', 'as', '_', 'ADP', 'IN', '_', '3', 'prep', '_', '_']\n", "['5', 'unified', '_', 'VERB', 'VBN', '_', '4', 'pobj', '_', '_']\n", "['6', 'XXXXX', '_', '.', '.', '_', '3', 'punct', '_', '_']\n", "['']\n", "['1', 'we', '_', 'PRON', 'PRP', '_', '2', 'nsubj', '_', '_']\n", "['2', 'propose', '_', 'VERB', 'VBP', '_', '0', 'ROOT', '_', '_']\n", "['3', 'a', '_', 'DET', 'DT', '_', '4', 'det', '_', '_']\n", "['4', 'methodology', '_', 'NOUN', 'NN', '_', '2', 'dobj', '_', '_']\n", "['5', 'for', '_', 'ADP', 'IN', '_', '4', 'prep', '_', '_']\n", "['6', 'the', '_', 'DET', 'DT', '_', '7', 'det', '_', '_']\n", "['7', 'XXXXX', '_', 'NOUN', 'NN', '_', '5', 'pobj', '_', '_']\n", "['8', 'of', '_', 'ADP', 'IN', '_', '7', 'prep', '_', '_']\n", "['9', 'XXXXX', '_', '.', '.', '_', '2', 'punct', '_', '_']\n", "['']\n", "['1', 'operations', '_', 'NOUN', 'NNS', '_', '2', 'nsubj', '_', '_']\n", "['2', 'generate', '_', 'VERB', 'VBP', '_', '0', 'ROOT', '_', '_']\n", "['3', 'XXXXX', '_', '.', ',', '_', '5', 'nn', '_', '_']\n", "['4', 'that', '_', 'DET', 'WDT', '_', '5', 'det', '_', '_']\n", "['5', 'model', '_', 'NOUN', 'NN', '_', '6', 'nn', '_', '_']\n", "['6', 'XXXXX', '_', '.', ',', '_', '2', 'dobj', '_', '_']\n", "['7', 'as', '_', 'ADP', 'IN', '_', '2', 'prep', '_', '_']\n", "['8', 'networks', '_', 'NOUN', 'NNS', '_', '7', 'pobj', '_', '_']\n", "['']\n", "['1', 'all', '_', 'DET', 'PDT', '_', '3', 'predet', '_', '_']\n", "['2', 'the', '_', 'DET', 'DT', '_', '3', 'det', '_', '_']\n", "['3', 'XXXXX', '_', '.', ',', '_', '10', 'nsubj', '_', '_']\n", "['4', 'except', '_', 'ADP', 'IN', '_', '3', 'prep', '_', '_']\n", "['5', 'XXXXX', '_', 'NOUN', 'NN', '_', '4', 'pobj', '_', '_']\n", "['6', 'and', '_', 'CONJ', 'CC', '_', '5', 'cc', '_', '_']\n", "['7', 'iteration', '_', 'NOUN', 'NN', '_', '8', 'amod', '_', '_']\n", "['8', 'times', '_', 'NOUN', 'NNS', '_', '5', 'conj', '_', '_']\n", "['9', 'are', '_', 'VERB', 'VBP', '_', '10', 'cop', '_', '_']\n", "['10', 'self-adapted', '_', 'VERB', 'VBN', '_', '0', 'ROOT', '_', '_']\n", "['11', 'and', '_', 'CONJ', 'CC', '_', '10', 'cc', '_', '_']\n", "['12', 'need', '_', 'VERB', 'VB', '_', '10', 'conj', '_', '_']\n", "['13', 'not', '_', 'ADV', 'RB', '_', '16', 'neg', '_', '_']\n", "['14', 'to', '_', 'PRT', 'TO', '_', '16', 'aux', '_', '_']\n", "['15', 'be', '_', 'VERB', 'VB', '_', '16', 'auxpass', '_', '_']\n", "['16', 'tuned', '_', 'VERB', 'VBN', '_', '12', 'xcomp', '_', '_']\n", "['']\n", "['1', 'leverages', '_', 'NOUN', 'NNS', '_', '0', 'ROOT', '_', '_']\n", "['2', 'empirical', '_', 'ADJ', 'JJ', '_', '6', 'amod', '_', '_']\n", "['3', 'XXXXX', '_', '.', '$', '_', '6', 'nn', '_', '_']\n", "['4', 'and', '_', 'CONJ', 'CC', '_', '3', 'cc', '_', '_']\n", "['5', 'data-mining', '_', 'NOUN', 'NN', '_', '3', 'conj', '_', '_']\n", "['6', 'algorithms', '_', 'NOUN', 'NNS', '_', '1', 'dobj', '_', '_']\n", "['7', 'with', '_', 'ADP', 'IN', '_', '6', 'prep', '_', '_']\n", "['8', 'XXXXX', '_', '.', '.', '_', '7', 'pobj', '_', '_']\n", "['']\n", "['1', 'rough', '_', 'ADJ', 'JJ', '_', '2', 'amod', '_', '_']\n", "['2', 'set', '_', 'NOUN', 'NN', '_', '8', 'nsubjpass', '_', '_']\n", "['3', 'and', '_', 'CONJ', 'CC', '_', '2', 'cc', '_', '_']\n", "['4', 'pso-based', '_', 'VERB', 'VBN', '_', '6', 'amod', '_', '_']\n", "['5', 'anfis', '_', '.', '$', '_', '6', 'nn', '_', '_']\n", "['6', 'approaches', '_', 'NOUN', 'NNS', '_', '2', 'conj', '_', '_']\n", "['7', 'are', '_', 'VERB', 'VBP', '_', '8', 'auxpass', '_', '_']\n", "['8', 'proposed', '_', 'VERB', 'VBN', '_', '0', 'ROOT', '_', '_']\n", "['9', 'to', '_', 'PRT', 'TO', '_', '10', 'aux', '_', '_']\n", "['10', 'model', '_', 'VERB', 'VB', '_', '8', 'xcomp', '_', '_']\n", "['11', 'XXXXX', '_', '.', ',', '_', '10', 'dobj', '_', '_']\n", "['12', 'in', '_', 'ADP', 'IN', '_', '10', 'prep', '_', '_']\n", "['13', 'affective', '_', 'ADJ', 'JJ', '_', '12', 'pobj', '_', '_']\n", "['14', 'XXXXX', '_', '.', '.', '_', '8', 'punct', '_', '_']\n", "['']\n", "['1', 'innovatively', '_', 'ADV', 'RB', '_', '0', 'ROOT', '_', '_']\n", "['2', 'establishing', '_', 'VERB', 'VBG', '_', '1', 'dep', '_', '_']\n", "['3', 'a', '_', 'DET', 'DT', '_', '4', 'det', '_', '_']\n", "['4', 'XXXXX', '_', 'NOUN', 'NN', '_', '2', 'dobj', '_', '_']\n", "['5', 'of', '_', 'ADP', 'IN', '_', '4', 'prep', '_', '_']\n", "['6', 'judging', '_', 'VERB', 'VBG', '_', '5', 'pobj', '_', '_']\n", "['7', 'XXXXX', '_', '.', '.', '_', '1', 'punct', '_', '_']\n", "['']\n", "['1', 'this', '_', 'DET', 'DT', '_', '2', 'det', '_', '_']\n", "['2', 'paper', '_', 'NOUN', 'NN', '_', '3', 'nsubj', '_', '_']\n", "['3', 'proposes', '_', 'VERB', 'VBZ', '_', '0', 'ROOT', '_', '_']\n", "['4', 'metrics', '_', 'NOUN', 'NNS', '_', '3', 'dobj', '_', '_']\n", "['5', 'to', '_', 'PRT', 'TO', '_', '6', 'aux', '_', '_']\n", "['6', 'estimate', '_', 'VERB', 'VB', '_', '4', 'infmod', '_', '_']\n", "['7', 'the', '_', 'DET', 'DT', '_', '9', 'det', '_', '_']\n", "['8', 'expected', '_', 'VERB', 'VBN', '_', '9', 'amod', '_', '_']\n", "['9', 'XXXXX', '_', 'NOUN', 'NN', '_', '6', 'dobj', '_', '_']\n", "['10', 'of', '_', 'ADP', 'IN', '_', '9', 'prep', '_', '_']\n", "['11', 'XXXXX', '_', '.', '.', '_', '3', 'punct', '_', '_']\n", "['']\n", "['1', 'a', '_', 'DET', 'DT', '_', '4', 'det', '_', '_']\n", "['2', 'laser', '_', 'NOUN', 'NN', '_', '3', 'nn', '_', '_']\n", "['3', 'scan', '_', 'ADJ', 'JJ', '_', '4', 'nn', '_', '_']\n", "['4', 'XXXXX', '_', 'NOUN', 'NN', '_', '6', 'nsubj', '_', '_']\n", "['5', 'can', '_', 'VERB', 'MD', '_', '6', 'aux', '_', '_']\n", "['6', 'ensure', '_', 'VERB', 'VB', '_', '0', 'ROOT', '_', '_']\n", "['7', 'XXXXX', '_', '.', ',', '_', '6', 'dobj', '_', '_']\n", "['8', 'for', '_', 'ADP', 'IN', '_', '6', 'prep', '_', '_']\n", "['9', 'dynamic', '_', 'ADJ', 'JJ', '_', '11', 'amod', '_', '_']\n", "['10', 'construction', '_', 'NOUN', 'NN', '_', '11', 'nn', '_', '_']\n", "['11', 'sites', '_', 'NOUN', 'NNS', '_', '8', 'pobj', '_', '_']\n", "['']\n", "['1', 'XXXXX', '_', 'NOUN', 'NN', '_', '7', 'nsubjpass', '_', '_']\n", "['2', 'of', '_', 'ADP', 'IN', '_', '1', 'prep', '_', '_']\n", "['3', 'the', '_', 'DET', 'DT', '_', '5', 'det', '_', '_']\n", "['4', 'travelling', '_', 'VERB', 'VBG', '_', '5', 'amod', '_', '_']\n", "['5', 'XXXXX', '_', 'NOUN', 'NN', '_', '2', 'pobj', '_', '_']\n", "['6', 'is', '_', 'VERB', 'VBZ', '_', '7', 'auxpass', '_', '_']\n", "['7', 'completed', '_', 'VERB', 'VBN', '_', '0', 'ROOT', '_', '_']\n", "['8', 'by', '_', 'ADP', 'IN', '_', '7', 'prep', '_', '_']\n", "['9', 'using', '_', 'VERB', 'VBG', '_', '8', 'pcomp', '_', '_']\n", "['10', 'fds', '_', 'NOUN', 'NNS', '_', '9', 'dobj', '_', '_']\n", "['']\n", "['1', 'a', '_', 'DET', 'DT', '_', '3', 'det', '_', '_']\n", "['2', 'practical', '_', 'ADJ', 'JJ', '_', '3', 'amod', '_', '_']\n", "['3', 'approach', '_', 'NOUN', 'NN', '_', '9', 'nsubjpass', '_', '_']\n", "['4', 'for', '_', 'ADP', 'IN', '_', '3', 'prep', '_', '_']\n", "['5', 'XXXXX', '_', 'NOUN', 'NN', '_', '4', 'pobj', '_', '_']\n", "['6', 'of', '_', 'ADP', 'IN', '_', '5', 'prep', '_', '_']\n", "['7', 'XXXXX', '_', 'NOUN', 'NNP', '_', '6', 'pobj', '_', '_']\n", "['8', 'is', '_', 'VERB', 'VBZ', '_', '9', 'auxpass', '_', '_']\n", "['9', 'presented', '_', 'VERB', 'VBN', '_', '0', 'ROOT', '_', '_']\n", "['']\n", "['1', 'applications', '_', 'NOUN', 'NNS', '_', '9', 'nsubjpass', '_', '_']\n", "['2', 'of', '_', 'ADP', 'IN', '_', '1', 'prep', '_', '_']\n", "['3', 'software', '_', 'NOUN', 'NN', '_', '2', 'pobj', '_', '_']\n", "['4', 'for', '_', 'ADP', 'IN', '_', '3', 'prep', '_', '_']\n", "['5', 'XXXXX', '_', 'NOUN', 'NNP', '_', '4', 'pobj', '_', '_']\n", "['6', 'of', '_', 'ADP', 'IN', '_', '5', 'prep', '_', '_']\n", "['7', 'XXXXX', '_', 'NOUN', 'NNP', '_', '6', 'pobj', '_', '_']\n", "['8', 'are', '_', 'VERB', 'VBP', '_', '9', 'auxpass', '_', '_']\n", "['9', 'listed', '_', 'VERB', 'VBN', '_', '0', 'ROOT', '_', '_']\n", "['']\n", "['1', 'using', '_', 'VERB', 'VBG', '_', '0', 'ROOT', '_', '_']\n", "['2', 'XXXXX', '_', 'X', 'GW', '_', '1', 'dobj', '_', '_']\n", "['3', '-LRB-', '_', '.', '-LRB-', '_', '2', 'punct', '_', '_']\n", "['4', 'ann', '_', 'NOUN', 'NNP', '_', '2', 'dep', '_', '_']\n", "['5', '-RRB-', '_', '.', '-RRB-', '_', '2', 'punct', '_', '_']\n", "['6', 'to', '_', 'PRT', 'TO', '_', '7', 'aux', '_', '_']\n", "['7', 'find', '_', 'VERB', 'VB', '_', '1', 'xcomp', '_', '_']\n", "['8', 'the', '_', 'DET', 'DT', '_', '9', 'det', '_', '_']\n", "['9', 'XXXXX', '_', 'NOUN', 'NN', '_', '7', 'dobj', '_', '_']\n", "['10', 'in', '_', 'ADP', 'IN', '_', '9', 'prep', '_', '_']\n", "['11', 'welding', '_', 'VERB', 'VBG', '_', '12', 'nn', '_', '_']\n", "['12', 'model', '_', 'NOUN', 'NN', '_', '10', 'pobj', '_', '_']\n", "['']\n", "['1', 'obtaining', '_', 'VERB', 'VBG', '_', '0', 'ROOT', '_', '_']\n", "['2', 'an', '_', 'DET', 'DT', '_', '3', 'det', '_', '_']\n", "['3', 'XXXXX', '_', '.', ',', '_', '1', 'dobj', '_', '_']\n", "['4', 'for', '_', 'ADP', 'IN', '_', '3', 'prep', '_', '_']\n", "['5', 'the', '_', 'DET', 'DT', '_', '7', 'det', '_', '_']\n", "['6', 'proposed', '_', 'VERB', 'VBN', '_', '7', 'amod', '_', '_']\n", "['7', 'XXXXX', '_', '.', '.', '_', '4', 'pobj', '_', '_']\n", "['']\n", "['1', 'we', '_', 'PRON', 'PRP', '_', '2', 'nsubj', '_', '_']\n", "['2', 'extended', '_', 'VERB', 'VBD', '_', '0', 'ROOT', '_', '_']\n", "['3', 'our', '_', 'PRON', 'PRP$', '_', '4', 'poss', '_', '_']\n", "['4', 'identification', '_', 'NOUN', 'NN', '_', '2', 'dobj', '_', '_']\n", "['5', 'with', '_', 'ADP', 'IN', '_', '4', 'prep', '_', '_']\n", "['6', 'a', '_', 'DET', 'DT', '_', '7', 'det', '_', '_']\n", "['7', 'XXXXX', '_', 'NOUN', 'NN', '_', '5', 'pobj', '_', '_']\n", "['8', 'in', '_', 'ADP', 'IN', '_', '7', 'prep', '_', '_']\n", "['9', 'XXXXX', '_', '.', '.', '_', '2', 'punct', '_', '_']\n", "['']\n", "['1', 'smoothing', '_', 'VERB', 'VBG', '_', '4', 'csubj', '_', '_']\n", "['2', 'in', '_', 'ADP', 'IN', '_', '1', 'prep', '_', '_']\n", "['3', 'XXXXX', '_', '.', ',', '_', '2', 'pobj', '_', '_']\n", "['4', 'decreases', '_', 'VERB', 'VBZ', '_', '0', 'ROOT', '_', '_']\n", "['5', 'the', '_', 'DET', 'DT', '_', '4', 'dobj', '_', '_']\n", "['6', 'XXXXX', '_', '.', '.', '_', '4', 'punct', '_', '_']\n", "['']\n", "['1', 'the', '_', 'DET', 'DT', '_', '2', 'det', '_', '_']\n", "['2', 'XXXXX', '_', 'NOUN', 'NN', '_', '4', 'nsubjpass', '_', '_']\n", "['3', 'is', '_', 'VERB', 'VBZ', '_', '4', 'auxpass', '_', '_']\n", "['4', 'specified', '_', 'VERB', 'VBN', '_', '0', 'ROOT', '_', '_']\n", "['5', 'using', '_', 'VERB', 'VBG', '_', '4', 'xcomp', '_', '_']\n", "['6', 'a', '_', 'DET', 'DT', '_', '5', 'dobj', '_', '_']\n", "['7', 'XXXXX', '_', '.', '.', '_', '4', 'punct', '_', '_']\n", "['']\n", "['1', 'huge', '_', 'ADJ', 'JJ', '_', '2', 'amod', '_', '_']\n", "['2', 'impact', '_', 'NOUN', 'NN', '_', '0', 'ROOT', '_', '_']\n", "['3', 'on', '_', 'ADP', 'IN', '_', '2', 'prep', '_', '_']\n", "['4', 'XXXXX', '_', 'NOUN', 'NNP', '_', '5', 'nsubj', '_', '_']\n", "['5', 'allowing', '_', 'VERB', 'VBG', '_', '3', 'pcomp', '_', '_']\n", "['6', 'XXXXX', '_', '.', '.', '_', '2', 'punct', '_', '_']\n", "['']\n" ] } ], "source": [ "def loadSyntRepr(path=\"../data/ie/ie_training_data.sents.parse\"):\n", " file = open(path, \"r\")\n", " \n", " sents = []\n", " s = []\n", " for l in file:\n", " l = l.strip()\n", " data = l.split(\"\\t\")\n", " print(data)\n", " if len(data) < 10:\n", " sents.append(s)\n", " s = []\n", " continue\n", " \n", " wid, token, lemma, upostag, xpostag, feats, head, deprel, deps, misc = data\n", " s.append(data)\n", " \n", " if len(s) != 0:\n", " sents.append(s)\n", " \n", " return sents\n", " \n", "sents = loadSyntRepr()" ] }, { "cell_type": "code", "execution_count": 4, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/plain": [ "[[['1', 'demonstrates', '_', 'VERB', 'VBZ', '_', '0', 'ROOT', '_', '_'],\n", " ['2', 'XXXXX', '_', '.', ',', '_', '5', 'nn', '_', '_'],\n", " ['3', 'and', '_', 'CONJ', 'CC', '_', '2', 'cc', '_', '_'],\n", " ['4', 'clustering', '_', 'NOUN', 'NN', '_', '2', 'conj', '_', '_'],\n", " ['5', 'techniques', '_', 'NOUN', 'NNS', '_', '1', 'dobj', '_', '_'],\n", " ['6', 'for', '_', 'ADP', 'IN', '_', '5', 'prep', '_', '_'],\n", " ['7', 'XXXXX', '_', '.', '.', '_', '6', 'pobj', '_', '_']],\n", " [['1', 'demonstrates', '_', 'VERB', 'VBZ', '_', '0', 'ROOT', '_', '_'],\n", " ['2', 'text', '_', 'NOUN', 'NN', '_', '3', 'nn', '_', '_'],\n", " ['3', 'mining', '_', 'NOUN', 'NN', '_', '1', 'dobj', '_', '_'],\n", " ['4', 'and', '_', 'CONJ', 'CC', '_', '3', 'cc', '_', '_'],\n", " ['5', 'XXXXX', '_', '.', ',', '_', '3', 'conj', '_', '_'],\n", " ['6', 'for', '_', 'ADP', 'IN', '_', '3', 'prep', '_', '_'],\n", " ['7', 'building', '_', 'VERB', 'VBG', '_', '6', 'pobj', '_', '_'],\n", " ['8', 'XXXXX', '_', '.', '.', '_', '1', 'punct', '_', '_']],\n", " [['1', 'the', '_', 'DET', 'DT', '_', '2', 'det', '_', '_'],\n", " ['2', 'XXXXX', '_', 'NOUN', 'NN', '_', '4', 'nsubj', '_', '_'],\n", " ['3', 'is', '_', 'VERB', 'VBZ', '_', '4', 'cop', '_', '_'],\n", " ['4', 'able', '_', 'ADJ', 'JJ', '_', '0', 'ROOT', '_', '_'],\n", " ['5', 'to', '_', 'PRT', 'TO', '_', '6', 'aux', '_', '_'],\n", " ['6', 'enhance', '_', 'VERB', 'VB', '_', '4', 'xcomp', '_', '_'],\n", " ['7', 'the', '_', 'DET', 'DT', '_', '6', 'dobj', '_', '_'],\n", " ['8', 'XXXXX', '_', '.', '.', '_', '4', 'punct', '_', '_']],\n", " [['1', 'we', '_', 'PRON', 'PRP', '_', '2', 'nsubj', '_', '_'],\n", " ['2', 'propose', '_', 'VERB', 'VBP', '_', '0', 'ROOT', '_', '_'],\n", " ['3', 'a', '_', 'DET', 'DT', '_', '5', 'det', '_', '_'],\n", " ['4', 'fully', '_', 'ADV', 'RB', '_', '5', 'amod', '_', '_'],\n", " ['5', 'XXXXX', '_', '.', ',', '_', '2', 'dobj', '_', '_'],\n", " ['6', 'for', '_', 'ADP', 'IN', '_', '5', 'prep', '_', '_'],\n", " ['7', '3d', '_', 'NUM', 'CD', '_', '8', 'num', '_', '_'],\n", " ['8', 'XXXXX', '_', 'NOUN', 'NN', '_', '6', 'pobj', '_', '_'],\n", " ['9', 'of', '_', 'ADP', 'IN', '_', '8', 'prep', '_', '_'],\n", " ['10', 'buildings', '_', 'NOUN', 'NNS', '_', '9', 'pobj', '_', '_']],\n", " [['1', 'this', '_', 'DET', 'DT', '_', '2', 'det', '_', '_'],\n", " ['2', 'paper', '_', 'NOUN', 'NN', '_', '3', 'nsubj', '_', '_'],\n", " ['3', 'proposes', '_', 'VERB', 'VBZ', '_', '0', 'ROOT', '_', '_'],\n", " ['4', 'two', '_', 'NUM', 'CD', '_', '5', 'num', '_', '_'],\n", " ['5', 'XXXXX', '_', '.', ',', '_', '3', 'dobj', '_', '_'],\n", " ['6', 'to', '_', 'PRT', 'TO', '_', '7', 'aux', '_', '_'],\n", " ['7', 'solve', '_', 'VERB', 'VB', '_', '5', 'infmod', '_', '_'],\n", " ['8', 'a', '_', 'DET', 'DT', '_', '9', 'det', '_', '_'],\n", " ['9', 'XXXXX', '_', '.', '.', '_', '7', 'dobj', '_', '_']],\n", " [['1', 'XXXXX', '_', '.', 'NFP', '_', '4', 'punct', '_', '_'],\n", " ['2', 'is', '_', 'VERB', 'VBZ', '_', '4', 'cop', '_', '_'],\n", " ['3', 'more', '_', 'ADV', 'RBR', '_', '4', 'advmod', '_', '_'],\n", " ['4', 'capable', '_', 'ADJ', 'JJ', '_', '0', 'ROOT', '_', '_'],\n", " ['5', 'of', '_', 'ADP', 'IN', '_', '4', 'prep', '_', '_'],\n", " ['6', 'XXXXX', '_', '.', '.', '_', '4', 'punct', '_', '_']],\n", " [['1', 'XXXXX', '_', 'X', 'UH', '_', '5', 'nn', '_', '_'],\n", " ['2', 'and', '_', 'CONJ', 'CC', '_', '1', 'cc', '_', '_'],\n", " ['3', 'pso-based', '_', 'VERB', 'VBN', '_', '4', 'amod', '_', '_'],\n", " ['4', 'anfis', '_', '.', '$', '_', '1', 'conj', '_', '_'],\n", " ['5', 'approaches', '_', 'NOUN', 'NNS', '_', '7', 'nsubjpass', '_', '_'],\n", " ['6', 'are', '_', 'VERB', 'VBP', '_', '7', 'auxpass', '_', '_'],\n", " ['7', 'proposed', '_', 'VERB', 'VBN', '_', '0', 'ROOT', '_', '_'],\n", " ['8', 'to', '_', 'PRT', 'TO', '_', '9', 'aux', '_', '_'],\n", " ['9', 'model', '_', 'VERB', 'VB', '_', '7', 'xcomp', '_', '_'],\n", " ['10', 'XXXXX', '_', '.', ',', '_', '9', 'punct', '_', '_'],\n", " ['11', 'in', '_', 'ADP', 'IN', '_', '9', 'prep', '_', '_'],\n", " ['12', 'affective', '_', 'ADJ', 'JJ', '_', '14', 'amod', '_', '_'],\n", " ['13', 'product', '_', 'NOUN', 'NN', '_', '14', 'nn', '_', '_'],\n", " ['14', 'design', '_', 'NOUN', 'NN', '_', '11', 'pobj', '_', '_']],\n", " [['1', 'XXXXX', '_', 'X', 'UH', '_', '5', 'nn', '_', '_'],\n", " ['2', 'and', '_', 'CONJ', 'CC', '_', '1', 'cc', '_', '_'],\n", " ['3', 'pso-based', '_', 'VERB', 'VBN', '_', '4', 'amod', '_', '_'],\n", " ['4', 'anfis', '_', '.', '$', '_', '1', 'conj', '_', '_'],\n", " ['5', 'approaches', '_', 'NOUN', 'NNS', '_', '7', 'nsubjpass', '_', '_'],\n", " ['6', 'are', '_', 'VERB', 'VBP', '_', '7', 'auxpass', '_', '_'],\n", " ['7', 'proposed', '_', 'VERB', 'VBN', '_', '0', 'ROOT', '_', '_'],\n", " ['8', 'to', '_', 'PRT', 'TO', '_', '9', 'aux', '_', '_'],\n", " ['9', 'model', '_', 'VERB', 'VB', '_', '7', 'xcomp', '_', '_'],\n", " ['10', 'customer', '_', 'NOUN', 'NN', '_', '11', 'nn', '_', '_'],\n", " ['11', 'satisfaction', '_', 'NOUN', 'NN', '_', '9', 'dobj', '_', '_'],\n", " ['12', 'in', '_', 'ADP', 'IN', '_', '11', 'prep', '_', '_'],\n", " ['13', 'affective', '_', 'ADJ', 'JJ', '_', '12', 'pobj', '_', '_'],\n", " ['14', 'XXXXX', '_', '.', '.', '_', '7', 'punct', '_', '_']],\n", " [['1', 'XXXXX', '_', '.', 'NFP', '_', '2', 'punct', '_', '_'],\n", " ['2', 'solved', '_', 'VERB', 'VBD', '_', '0', 'ROOT', '_', '_'],\n", " ['3', 'the', '_', 'DET', 'DT', '_', '4', 'det', '_', '_'],\n", " ['4', 'XXXXX', '_', 'NOUN', 'NN', '_', '2', 'dobj', '_', '_'],\n", " ['5', 'and', '_', 'CONJ', 'CC', '_', '2', 'cc', '_', '_'],\n", " ['6', 'obtained', '_', 'VERB', 'VBD', '_', '2', 'conj', '_', '_'],\n", " ['7', 'the', '_', 'DET', 'DT', '_', '10', 'det', '_', '_'],\n", " ['8', 'optimal', '_', 'ADJ', 'JJ', '_', '9', 'amod', '_', '_'],\n", " ['9', 'section', '_', 'NOUN', 'NN', '_', '10', 'nn', '_', '_'],\n", " ['10', 'shape', '_', 'NOUN', 'NN', '_', '6', 'dobj', '_', '_']],\n", " [['1', 'XXXXX', '_', '.', 'NFP', '_', '0', 'ROOT', '_', '_'],\n", " ['2', 'for', '_', 'ADP', 'IN', '_', '1', 'prep', '_', '_'],\n", " ['3', 'sizing', '_', 'VERB', 'VBG', '_', '2', 'pcomp', '_', '_'],\n", " ['4', 'and', '_', 'CONJ', 'CC', '_', '3', 'cc', '_', '_'],\n", " ['5', 'XXXXX', '_', 'NOUN', 'NNP', '_', '3', 'conj', '_', '_'],\n", " ['6', 'of', '_', 'ADP', 'IN', '_', '5', 'prep', '_', '_'],\n", " ['7', 'cable', '_', 'NOUN', 'NN', '_', '6', 'pobj', '_', '_'],\n", " ['8', '--', '_', '.', ':', '_', '5', 'punct', '_', '_'],\n", " ['9', 'truss', '_', 'NOUN', 'NN', '_', '10', 'nn', '_', '_'],\n", " ['10', 'structures', '_', 'NOUN', 'NNS', '_', '3', 'dobj', '_', '_']],\n", " [['1', 'an', '_', 'DET', 'DT', '_', '3', 'det', '_', '_'],\n", " ['2', 'XXXXX', '_', '.', ',', '_', '3', 'nn', '_', '_'],\n", " ['3', 'model', '_', 'NOUN', 'NN', '_', '5', 'nsubjpass', '_', '_'],\n", " ['4', 'is', '_', 'VERB', 'VBZ', '_', '5', 'auxpass', '_', '_'],\n", " ['5', 'employed', '_', 'VERB', 'VBN', '_', '0', 'ROOT', '_', '_'],\n", " ['6', 'to', '_', 'ADP', 'IN', '_', '5', 'prep', '_', '_'],\n", " ['7', 'XXXXX', '_', '.', '.', '_', '5', 'punct', '_', '_']],\n", " [['1', 'XXXXX', '_', '.', '``', '_', '2', 'nsubj', '_', '_'],\n", " ['2', 'assists', '_', 'VERB', 'VBZ', '_', '0', 'ROOT', '_', '_'],\n", " ['3', 'the', '_', 'DET', 'DT', '_', '2', 'dobj', '_', '_'],\n", " ['4', 'XXXXX', '_', '.', '.', '_', '2', 'punct', '_', '_']],\n", " [['1', 'a', '_', 'DET', 'DT', '_', '3', 'det', '_', '_'],\n", " ['2', 'new', '_', 'ADJ', 'JJ', '_', '3', 'amod', '_', '_'],\n", " ['3', 'combination', '_', 'NOUN', 'NN', '_', '10', 'nsubjpass', '_', '_'],\n", " ['4', 'of', '_', 'ADP', 'IN', '_', '3', 'prep', '_', '_'],\n", " ['5', 'XXXXX', '_', 'NOUN', 'NNP', '_', '8', 'nn', '_', '_'],\n", " ['6', 'and', '_', 'CONJ', 'CC', '_', '5', 'cc', '_', '_'],\n", " ['7', 'chaos', '_', 'NOUN', 'NN', '_', '5', 'conj', '_', '_'],\n", " ['8', 'theory', '_', 'NOUN', 'NN', '_', '4', 'pobj', '_', '_'],\n", " ['9', 'is', '_', 'VERB', 'VBZ', '_', '10', 'auxpass', '_', '_'],\n", " ['10', 'presented', '_', 'VERB', 'VBN', '_', '0', 'ROOT', '_', '_'],\n", " ['11', 'for', '_', 'ADP', 'IN', '_', '10', 'prep', '_', '_'],\n", " ['12', 'XXXXX', '_', '.', '.', '_', '10', 'punct', '_', '_']],\n", " [['1', 'a', '_', 'DET', 'DT', '_', '3', 'det', '_', '_'],\n", " ['2', 'new', '_', 'ADJ', 'JJ', '_', '3', 'amod', '_', '_'],\n", " ['3', 'combination', '_', 'NOUN', 'NN', '_', '10', 'nsubjpass', '_', '_'],\n", " ['4', 'of', '_', 'ADP', 'IN', '_', '3', 'prep', '_', '_'],\n", " ['5', 'swarm', '_', 'ADJ', 'JJ', '_', '6', 'amod', '_', '_'],\n", " ['6', 'intelligence', '_', 'NOUN', 'NN', '_', '4', 'pobj', '_', '_'],\n", " ['7', 'and', '_', 'CONJ', 'CC', '_', '6', 'cc', '_', '_'],\n", " ['8', 'XXXXX', '_', 'NOUN', 'NN', '_', '6', 'conj', '_', '_'],\n", " ['9', 'is', '_', 'VERB', 'VBZ', '_', '10', 'auxpass', '_', '_'],\n", " ['10', 'presented', '_', 'VERB', 'VBN', '_', '0', 'ROOT', '_', '_'],\n", " ['11', 'for', '_', 'ADP', 'IN', '_', '10', 'prep', '_', '_'],\n", " ['12', 'XXXXX', '_', '.', '.', '_', '10', 'punct', '_', '_']],\n", " [['1', 'a', '_', 'DET', 'DT', '_', '3', 'det', '_', '_'],\n", " ['2', 'new', '_', 'ADJ', 'JJ', '_', '3', 'amod', '_', '_'],\n", " ['3', 'combination', '_', 'NOUN', 'NN', '_', '10', 'nsubjpass', '_', '_'],\n", " ['4', 'of', '_', 'ADP', 'IN', '_', '3', 'prep', '_', '_'],\n", " ['5', 'swarm', '_', 'ADJ', 'JJ', '_', '6', 'amod', '_', '_'],\n", " ['6', 'intelligence', '_', 'NOUN', 'NN', '_', '4', 'pobj', '_', '_'],\n", " ['7', 'and', '_', 'CONJ', 'CC', '_', '6', 'cc', '_', '_'],\n", " ['8', 'XXXXX', '_', 'NOUN', 'NN', '_', '6', 'conj', '_', '_'],\n", " ['9', 'is', '_', 'VERB', 'VBZ', '_', '10', 'auxpass', '_', '_'],\n", " ['10', 'presented', '_', 'VERB', 'VBN', '_', '0', 'ROOT', '_', '_'],\n", " ['11', 'for', '_', 'ADP', 'IN', '_', '10', 'prep', '_', '_'],\n", " ['12', 'XXXXX', '_', '.', '.', '_', '10', 'punct', '_', '_']],\n", " [['1', 'we', '_', 'PRON', 'PRP', '_', '2', 'nsubj', '_', '_'],\n", " ['2', 'propose', '_', 'VERB', 'VBP', '_', '0', 'ROOT', '_', '_'],\n", " ['3', 'here', '_', 'ADV', 'RB', '_', '2', 'advmod', '_', '_'],\n", " ['4', 'to', '_', 'PRT', 'TO', '_', '5', 'aux', '_', '_'],\n", " ['5', 'use', '_', 'VERB', 'VB', '_', '2', 'xcomp', '_', '_'],\n", " ['6', 'partially', '_', 'ADV', 'RB', '_', '7', 'advmod', '_', '_'],\n", " ['7', 'converged', '_', 'VERB', 'VBN', '_', '8', 'amod', '_', '_'],\n", " ['8', 'data', '_', 'NOUN', 'NNS', '_', '5', 'dobj', '_', '_'],\n", " ['9', 'to', '_', 'PRT', 'TO', '_', '10', 'aux', '_', '_'],\n", " ['10', 'construct', '_', 'VERB', 'VB', '_', '5', 'xcomp', '_', '_'],\n", " ['11', 'a', '_', 'DET', 'DT', '_', '12', 'det', '_', '_'],\n", " ['12', 'XXXXX', '_', 'NOUN', 'NN', '_', '10', 'dobj', '_', '_'],\n", " ['13', 'in', '_', 'ADP', 'IN', '_', '10', 'prep', '_', '_'],\n", " ['14', 'XXXXX', '_', '.', '.', '_', '2', 'punct', '_', '_']],\n", " [['1', 'a', '_', 'DET', 'DT', '_', '2', 'det', '_', '_'],\n", " ['2', 'XXXXX', '_', 'NOUN', 'NN', '_', '15', 'nsubjpass', '_', '_'],\n", " ['3', '-LRB-', '_', '.', '-LRB-', '_', '2', 'punct', '_', '_'],\n", " ['4', 'ga', '_', 'NOUN', 'NN', '_', '2', 'dep', '_', '_'],\n", " ['5', '-RRB-', '_', '.', '-RRB-', '_', '2', 'punct', '_', '_'],\n", " ['6', 'for', '_', 'ADP', 'IN', '_', '2', 'prep', '_', '_'],\n", " ['7', 'automated', '_', 'VERB', 'VBN', '_', '8', 'amod', '_', '_'],\n", " ['8', 'XXXXX', '_', 'NOUN', 'NNP', '_', '6', 'pobj', '_', '_'],\n", " ['9', 'of', '_', 'ADP', 'IN', '_', '8', 'prep', '_', '_'],\n", " ['10', 'a', '_', 'DET', 'DT', '_', '13', 'det', '_', '_'],\n", " ['11', 'two-stage', '_', 'ADJ', 'JJ', '_', '12', 'amod', '_', '_'],\n", " ['12', 'speed', '_', 'NOUN', 'NN', '_', '13', 'nn', '_', '_'],\n", " ['13', 'reducer', '_', 'NOUN', 'NN', '_', '9', 'pobj', '_', '_'],\n", " ['14', 'is', '_', 'VERB', 'VBZ', '_', '15', 'auxpass', '_', '_'],\n", " ['15', 'introduced', '_', 'VERB', 'VBN', '_', '0', 'ROOT', '_', '_']],\n", " [['1', 'XXXXX', '_', '.', 'NFP', '_', '3', 'nsubjpass', '_', '_'],\n", " ['2', 'are', '_', 'VERB', 'VBP', '_', '3', 'auxpass', '_', '_'],\n", " ['3', 'used', '_', 'VERB', 'VBN', '_', '0', 'ROOT', '_', '_'],\n", " ['4', 'to', '_', 'ADP', 'IN', '_', '3', 'prep', '_', '_'],\n", " ['5', 'XXXXX', '_', 'NOUN', 'NNP', '_', '4', 'pobj', '_', '_'],\n", " ['6', 'between', '_', 'ADP', 'IN', '_', '3', 'prep', '_', '_'],\n", " ['7', 'parameters', '_', 'NOUN', 'NNS', '_', '6', 'pobj', '_', '_'],\n", " ['8', 'and', '_', 'CONJ', 'CC', '_', '7', 'cc', '_', '_'],\n", " ['9', 'response', '_', 'NOUN', 'NN', '_', '7', 'conj', '_', '_'],\n", " ['10', 'of', '_', 'ADP', 'IN', '_', '7', 'prep', '_', '_'],\n", " ['11', 'the', '_', 'DET', 'DT', '_', '12', 'det', '_', '_'],\n", " ['12', 'model', '_', 'NOUN', 'NN', '_', '10', 'pobj', '_', '_']],\n", " [['1', 'a', '_', 'DET', 'DT', '_', '2', 'det', '_', '_'],\n", " ['2', 'XXXXX', '_', 'NOUN', 'NN', '_', '4', 'nsubjpass', '_', '_'],\n", " ['3', 'is', '_', 'VERB', 'VBZ', '_', '4', 'auxpass', '_', '_'],\n", " ['4', 'adopted', '_', 'VERB', 'VBN', '_', '0', 'ROOT', '_', '_'],\n", " ['5', 'as', '_', 'ADP', 'IN', '_', '4', 'prep', '_', '_'],\n", " ['6', 'the', '_', 'DET', 'DT', '_', '7', 'det', '_', '_'],\n", " ['7', 'XXXXX', '_', 'NOUN', 'NN', '_', '5', 'pobj', '_', '_'],\n", " ['8', 'of', '_', 'ADP', 'IN', '_', '7', 'prep', '_', '_'],\n", " ['9', 'vns', '_', 'NOUN', 'NNS', '_', '8', 'pobj', '_', '_']],\n", " [['1', 'XXXXX', '_', 'X', 'LS', '_', '2', 'nn', '_', '_'],\n", " ['2', 'application', '_', 'NOUN', 'NN', '_', '0', 'ROOT', '_', '_'],\n", " ['3', 'on', '_', 'ADP', 'IN', '_', '2', 'prep', '_', '_'],\n", " ['4', 'XXXXX', '_', '.', '.', '_', '3', 'pobj', '_', '_']],\n", " [['1', 'grid', '_', 'NOUN', 'NN', '_', '2', 'nn', '_', '_'],\n", " ['2', 'portioning', '_', 'NOUN', 'NN', '_', '6', 'nsubjpass', '_', '_'],\n", " ['3', 'and', '_', 'CONJ', 'CC', '_', '2', 'cc', '_', '_'],\n", " ['4', 'XXXXX', '_', '.', 'NFP', '_', '2', 'conj', '_', '_'],\n", " ['5', 'are', '_', 'VERB', 'VBP', '_', '6', 'auxpass', '_', '_'],\n", " ['6', 'used', '_', 'VERB', 'VBN', '_', '0', 'ROOT', '_', '_'],\n", " ['7', 'to', '_', 'ADP', 'IN', '_', '6', 'prep', '_', '_'],\n", " ['8', 'XXXXX', '_', '.', '.', '_', '6', 'punct', '_', '_']],\n", " [['1', 'a', '_', 'DET', 'DT', '_', '3', 'det', '_', '_'],\n", " ['2', 'new', '_', 'ADJ', 'JJ', '_', '3', 'amod', '_', '_'],\n", " ['3', 'XXXXX', '_', 'NOUN', 'NN', '_', '5', 'nsubjpass', '_', '_'],\n", " ['4', 'is', '_', 'VERB', 'VBZ', '_', '5', 'auxpass', '_', '_'],\n", " ['5', 'proposed', '_', 'VERB', 'VBN', '_', '0', 'ROOT', '_', '_'],\n", " ['6', 'to', '_', 'PRT', 'TO', '_', '7', 'aux', '_', '_'],\n", " ['7', 'solve', '_', 'VERB', 'VB', '_', '5', 'xcomp', '_', '_'],\n", " ['8', 'the', '_', 'DET', 'DT', '_', '9', 'det', '_', '_'],\n", " ['9', 'XXXXX', '_', 'NOUN', 'NNP', '_', '7', 'dobj', '_', '_'],\n", " ['10', 'associated', '_', 'VERB', 'VBN', '_', '9', 'partmod', '_', '_'],\n", " ['11', 'with', '_', 'ADP', 'IN', '_', '10', 'prep', '_', '_'],\n", " ['12', 'damage', '_', 'NOUN', 'NN', '_', '13', 'nn', '_', '_'],\n", " ['13', 'assessment', '_', 'NOUN', 'NN', '_', '11', 'pobj', '_', '_']],\n", " [['1', 'XXXXX', '_', 'X', 'UH', '_', '5', 'nsubj', '_', '_'],\n", " ['2', '-LRB-', '_', '.', '-LRB-', '_', '1', 'punct', '_', '_'],\n", " ['3', 'sa', '_', 'NOUN', 'NNP', '_', '1', 'dep', '_', '_'],\n", " ['4', '-RRB-', '_', '.', '-RRB-', '_', '1', 'punct', '_', '_'],\n", " ['5', 'helps', '_', 'VERB', 'VBZ', '_', '0', 'ROOT', '_', '_'],\n", " ['6', 'ivs', '_', 'ADV', 'RB', '_', '5', 'advmod', '_', '_'],\n", " ['7', 'in', '_', 'ADP', 'IN', '_', '5', 'prep', '_', '_'],\n", " ['8', 'XXXXX', '_', 'NOUN', 'NN', '_', '7', 'pobj', '_', '_'],\n", " ['9', 'with', '_', 'ADP', 'IN', '_', '8', 'prep', '_', '_'],\n", " ['10', 'time', '_', 'NOUN', 'NN', '_', '11', 'nn', '_', '_'],\n", " ['11', 'constraint', '_', 'NOUN', 'NN', '_', '9', 'pobj', '_', '_']],\n", " [['1', 'this', '_', 'DET', 'DT', '_', '2', 'det', '_', '_'],\n", " ['2', 'study', '_', 'NOUN', 'NN', '_', '3', 'nsubj', '_', '_'],\n", " ['3', 'focused', '_', 'VERB', 'VBD', '_', '0', 'ROOT', '_', '_'],\n", " ['4', 'on', '_', 'ADP', 'IN', '_', '3', 'prep', '_', '_'],\n", " ['5', 'the', '_', 'DET', 'DT', '_', '6', 'det', '_', '_'],\n", " ['6', 'XXXXX', '_', 'NOUN', 'NN', '_', '4', 'pobj', '_', '_'],\n", " ['7', 'of', '_', 'ADP', 'IN', '_', '6', 'prep', '_', '_'],\n", " ['8', 'XXXXX', '_', 'NOUN', 'NNP', '_', '7', 'pobj', '_', '_'],\n", " ['9', 'in', '_', 'ADP', 'IN', '_', '3', 'prep', '_', '_'],\n", " ['10', 'images', '_', 'NOUN', 'NNS', '_', '9', 'pobj', '_', '_']],\n", " [['1', 'design', '_', 'NOUN', 'NN', '_', '0', 'ROOT', '_', '_'],\n", " ['2', 'of', '_', 'ADP', 'IN', '_', '1', 'prep', '_', '_'],\n", " ['3', 'a', '_', 'DET', 'DT', '_', '4', 'det', '_', '_'],\n", " ['4', 'XXXXX', '_', 'NOUN', 'NN', '_', '2', 'pobj', '_', '_'],\n", " ['5', 'used', '_', 'VERB', 'VBN', '_', '4', 'partmod', '_', '_'],\n", " ['6', 'as', '_', 'ADP', 'IN', '_', '5', 'prep', '_', '_'],\n", " ['7', 'XXXXX', '_', '.', '.', '_', '1', 'punct', '_', '_']],\n", " [['1', 'this', '_', 'DET', 'DT', '_', '2', 'det', '_', '_'],\n", " ['2', 'research', '_', 'NOUN', 'NN', '_', '3', 'nsubj', '_', '_'],\n", " ['3', 'aims', '_', 'VERB', 'VBZ', '_', '0', 'ROOT', '_', '_'],\n", " ['4', 'to', '_', 'PRT', 'TO', '_', '5', 'aux', '_', '_'],\n", " ['5', 'reduce', '_', 'VERB', 'VB', '_', '3', 'xcomp', '_', '_'],\n", " ['6', 'the', '_', 'DET', 'DT', '_', '7', 'det', '_', '_'],\n", " ['7', 'XXXXX', '_', 'NOUN', 'NN', '_', '5', 'dobj', '_', '_'],\n", " ['8', 'for', '_', 'ADP', 'IN', '_', '5', 'prep', '_', '_'],\n", " ['9', 'overall', '_', 'ADJ', 'JJ', '_', '11', 'amod', '_', '_'],\n", " ['10', 'collision', '_', 'NOUN', 'NN', '_', '11', 'nn', '_', '_'],\n", " ['11', 'checks', '_', 'NOUN', 'NNS', '_', '8', 'pobj', '_', '_'],\n", " ['12', 'in', '_', 'ADP', 'IN', '_', '11', 'prep', '_', '_'],\n", " ['13', 'a', '_', 'DET', 'DT', '_', '14', 'det', '_', '_'],\n", " ['14', 'virtual', '_', 'ADJ', 'JJ', '_', '12', 'pobj', '_', '_'],\n", " ['15', 'XXXXX', '_', '.', '.', '_', '3', 'punct', '_', '_']],\n", " [['1', 'XXXXX', '_', '.', 'NFP', '_', '3', 'nsubjpass', '_', '_'],\n", " ['2', 'are', '_', 'VERB', 'VBP', '_', '3', 'auxpass', '_', '_'],\n", " ['3', 'introduced', '_', 'VERB', 'VBN', '_', '0', 'ROOT', '_', '_'],\n", " ['4', 'as', '_', 'ADP', 'IN', '_', '3', 'prep', '_', '_'],\n", " ['5', 'unified', '_', 'VERB', 'VBN', '_', '4', 'pobj', '_', '_'],\n", " ['6', 'XXXXX', '_', '.', '.', '_', '3', 'punct', '_', '_']],\n", " [['1', 'we', '_', 'PRON', 'PRP', '_', '2', 'nsubj', '_', '_'],\n", " ['2', 'propose', '_', 'VERB', 'VBP', '_', '0', 'ROOT', '_', '_'],\n", " ['3', 'a', '_', 'DET', 'DT', '_', '4', 'det', '_', '_'],\n", " ['4', 'methodology', '_', 'NOUN', 'NN', '_', '2', 'dobj', '_', '_'],\n", " ['5', 'for', '_', 'ADP', 'IN', '_', '4', 'prep', '_', '_'],\n", " ['6', 'the', '_', 'DET', 'DT', '_', '7', 'det', '_', '_'],\n", " ['7', 'XXXXX', '_', 'NOUN', 'NN', '_', '5', 'pobj', '_', '_'],\n", " ['8', 'of', '_', 'ADP', 'IN', '_', '7', 'prep', '_', '_'],\n", " ['9', 'XXXXX', '_', '.', '.', '_', '2', 'punct', '_', '_']],\n", " [['1', 'operations', '_', 'NOUN', 'NNS', '_', '2', 'nsubj', '_', '_'],\n", " ['2', 'generate', '_', 'VERB', 'VBP', '_', '0', 'ROOT', '_', '_'],\n", " ['3', 'XXXXX', '_', '.', ',', '_', '5', 'nn', '_', '_'],\n", " ['4', 'that', '_', 'DET', 'WDT', '_', '5', 'det', '_', '_'],\n", " ['5', 'model', '_', 'NOUN', 'NN', '_', '6', 'nn', '_', '_'],\n", " ['6', 'XXXXX', '_', '.', ',', '_', '2', 'dobj', '_', '_'],\n", " ['7', 'as', '_', 'ADP', 'IN', '_', '2', 'prep', '_', '_'],\n", " ['8', 'networks', '_', 'NOUN', 'NNS', '_', '7', 'pobj', '_', '_']],\n", " [['1', 'all', '_', 'DET', 'PDT', '_', '3', 'predet', '_', '_'],\n", " ['2', 'the', '_', 'DET', 'DT', '_', '3', 'det', '_', '_'],\n", " ['3', 'XXXXX', '_', '.', ',', '_', '10', 'nsubj', '_', '_'],\n", " ['4', 'except', '_', 'ADP', 'IN', '_', '3', 'prep', '_', '_'],\n", " ['5', 'XXXXX', '_', 'NOUN', 'NN', '_', '4', 'pobj', '_', '_'],\n", " ['6', 'and', '_', 'CONJ', 'CC', '_', '5', 'cc', '_', '_'],\n", " ['7', 'iteration', '_', 'NOUN', 'NN', '_', '8', 'amod', '_', '_'],\n", " ['8', 'times', '_', 'NOUN', 'NNS', '_', '5', 'conj', '_', '_'],\n", " ['9', 'are', '_', 'VERB', 'VBP', '_', '10', 'cop', '_', '_'],\n", " ['10', 'self-adapted', '_', 'VERB', 'VBN', '_', '0', 'ROOT', '_', '_'],\n", " ['11', 'and', '_', 'CONJ', 'CC', '_', '10', 'cc', '_', '_'],\n", " ['12', 'need', '_', 'VERB', 'VB', '_', '10', 'conj', '_', '_'],\n", " ['13', 'not', '_', 'ADV', 'RB', '_', '16', 'neg', '_', '_'],\n", " ['14', 'to', '_', 'PRT', 'TO', '_', '16', 'aux', '_', '_'],\n", " ['15', 'be', '_', 'VERB', 'VB', '_', '16', 'auxpass', '_', '_'],\n", " ['16', 'tuned', '_', 'VERB', 'VBN', '_', '12', 'xcomp', '_', '_']],\n", " [['1', 'leverages', '_', 'NOUN', 'NNS', '_', '0', 'ROOT', '_', '_'],\n", " ['2', 'empirical', '_', 'ADJ', 'JJ', '_', '6', 'amod', '_', '_'],\n", " ['3', 'XXXXX', '_', '.', '$', '_', '6', 'nn', '_', '_'],\n", " ['4', 'and', '_', 'CONJ', 'CC', '_', '3', 'cc', '_', '_'],\n", " ['5', 'data-mining', '_', 'NOUN', 'NN', '_', '3', 'conj', '_', '_'],\n", " ['6', 'algorithms', '_', 'NOUN', 'NNS', '_', '1', 'dobj', '_', '_'],\n", " ['7', 'with', '_', 'ADP', 'IN', '_', '6', 'prep', '_', '_'],\n", " ['8', 'XXXXX', '_', '.', '.', '_', '7', 'pobj', '_', '_']],\n", " [['1', 'rough', '_', 'ADJ', 'JJ', '_', '2', 'amod', '_', '_'],\n", " ['2', 'set', '_', 'NOUN', 'NN', '_', '8', 'nsubjpass', '_', '_'],\n", " ['3', 'and', '_', 'CONJ', 'CC', '_', '2', 'cc', '_', '_'],\n", " ['4', 'pso-based', '_', 'VERB', 'VBN', '_', '6', 'amod', '_', '_'],\n", " ['5', 'anfis', '_', '.', '$', '_', '6', 'nn', '_', '_'],\n", " ['6', 'approaches', '_', 'NOUN', 'NNS', '_', '2', 'conj', '_', '_'],\n", " ['7', 'are', '_', 'VERB', 'VBP', '_', '8', 'auxpass', '_', '_'],\n", " ['8', 'proposed', '_', 'VERB', 'VBN', '_', '0', 'ROOT', '_', '_'],\n", " ['9', 'to', '_', 'PRT', 'TO', '_', '10', 'aux', '_', '_'],\n", " ['10', 'model', '_', 'VERB', 'VB', '_', '8', 'xcomp', '_', '_'],\n", " ['11', 'XXXXX', '_', '.', ',', '_', '10', 'dobj', '_', '_'],\n", " ['12', 'in', '_', 'ADP', 'IN', '_', '10', 'prep', '_', '_'],\n", " ['13', 'affective', '_', 'ADJ', 'JJ', '_', '12', 'pobj', '_', '_'],\n", " ['14', 'XXXXX', '_', '.', '.', '_', '8', 'punct', '_', '_']],\n", " [['1', 'innovatively', '_', 'ADV', 'RB', '_', '0', 'ROOT', '_', '_'],\n", " ['2', 'establishing', '_', 'VERB', 'VBG', '_', '1', 'dep', '_', '_'],\n", " ['3', 'a', '_', 'DET', 'DT', '_', '4', 'det', '_', '_'],\n", " ['4', 'XXXXX', '_', 'NOUN', 'NN', '_', '2', 'dobj', '_', '_'],\n", " ['5', 'of', '_', 'ADP', 'IN', '_', '4', 'prep', '_', '_'],\n", " ['6', 'judging', '_', 'VERB', 'VBG', '_', '5', 'pobj', '_', '_'],\n", " ['7', 'XXXXX', '_', '.', '.', '_', '1', 'punct', '_', '_']],\n", " [['1', 'this', '_', 'DET', 'DT', '_', '2', 'det', '_', '_'],\n", " ['2', 'paper', '_', 'NOUN', 'NN', '_', '3', 'nsubj', '_', '_'],\n", " ['3', 'proposes', '_', 'VERB', 'VBZ', '_', '0', 'ROOT', '_', '_'],\n", " ['4', 'metrics', '_', 'NOUN', 'NNS', '_', '3', 'dobj', '_', '_'],\n", " ['5', 'to', '_', 'PRT', 'TO', '_', '6', 'aux', '_', '_'],\n", " ['6', 'estimate', '_', 'VERB', 'VB', '_', '4', 'infmod', '_', '_'],\n", " ['7', 'the', '_', 'DET', 'DT', '_', '9', 'det', '_', '_'],\n", " ['8', 'expected', '_', 'VERB', 'VBN', '_', '9', 'amod', '_', '_'],\n", " ['9', 'XXXXX', '_', 'NOUN', 'NN', '_', '6', 'dobj', '_', '_'],\n", " ['10', 'of', '_', 'ADP', 'IN', '_', '9', 'prep', '_', '_'],\n", " ['11', 'XXXXX', '_', '.', '.', '_', '3', 'punct', '_', '_']],\n", " [['1', 'a', '_', 'DET', 'DT', '_', '4', 'det', '_', '_'],\n", " ['2', 'laser', '_', 'NOUN', 'NN', '_', '3', 'nn', '_', '_'],\n", " ['3', 'scan', '_', 'ADJ', 'JJ', '_', '4', 'nn', '_', '_'],\n", " ['4', 'XXXXX', '_', 'NOUN', 'NN', '_', '6', 'nsubj', '_', '_'],\n", " ['5', 'can', '_', 'VERB', 'MD', '_', '6', 'aux', '_', '_'],\n", " ['6', 'ensure', '_', 'VERB', 'VB', '_', '0', 'ROOT', '_', '_'],\n", " ['7', 'XXXXX', '_', '.', ',', '_', '6', 'dobj', '_', '_'],\n", " ['8', 'for', '_', 'ADP', 'IN', '_', '6', 'prep', '_', '_'],\n", " ['9', 'dynamic', '_', 'ADJ', 'JJ', '_', '11', 'amod', '_', '_'],\n", " ['10', 'construction', '_', 'NOUN', 'NN', '_', '11', 'nn', '_', '_'],\n", " ['11', 'sites', '_', 'NOUN', 'NNS', '_', '8', 'pobj', '_', '_']],\n", " [['1', 'XXXXX', '_', 'NOUN', 'NN', '_', '7', 'nsubjpass', '_', '_'],\n", " ['2', 'of', '_', 'ADP', 'IN', '_', '1', 'prep', '_', '_'],\n", " ['3', 'the', '_', 'DET', 'DT', '_', '5', 'det', '_', '_'],\n", " ['4', 'travelling', '_', 'VERB', 'VBG', '_', '5', 'amod', '_', '_'],\n", " ['5', 'XXXXX', '_', 'NOUN', 'NN', '_', '2', 'pobj', '_', '_'],\n", " ['6', 'is', '_', 'VERB', 'VBZ', '_', '7', 'auxpass', '_', '_'],\n", " ['7', 'completed', '_', 'VERB', 'VBN', '_', '0', 'ROOT', '_', '_'],\n", " ['8', 'by', '_', 'ADP', 'IN', '_', '7', 'prep', '_', '_'],\n", " ['9', 'using', '_', 'VERB', 'VBG', '_', '8', 'pcomp', '_', '_'],\n", " ['10', 'fds', '_', 'NOUN', 'NNS', '_', '9', 'dobj', '_', '_']],\n", " [['1', 'a', '_', 'DET', 'DT', '_', '3', 'det', '_', '_'],\n", " ['2', 'practical', '_', 'ADJ', 'JJ', '_', '3', 'amod', '_', '_'],\n", " ['3', 'approach', '_', 'NOUN', 'NN', '_', '9', 'nsubjpass', '_', '_'],\n", " ['4', 'for', '_', 'ADP', 'IN', '_', '3', 'prep', '_', '_'],\n", " ['5', 'XXXXX', '_', 'NOUN', 'NN', '_', '4', 'pobj', '_', '_'],\n", " ['6', 'of', '_', 'ADP', 'IN', '_', '5', 'prep', '_', '_'],\n", " ['7', 'XXXXX', '_', 'NOUN', 'NNP', '_', '6', 'pobj', '_', '_'],\n", " ['8', 'is', '_', 'VERB', 'VBZ', '_', '9', 'auxpass', '_', '_'],\n", " ['9', 'presented', '_', 'VERB', 'VBN', '_', '0', 'ROOT', '_', '_']],\n", " [['1', 'applications', '_', 'NOUN', 'NNS', '_', '9', 'nsubjpass', '_', '_'],\n", " ['2', 'of', '_', 'ADP', 'IN', '_', '1', 'prep', '_', '_'],\n", " ['3', 'software', '_', 'NOUN', 'NN', '_', '2', 'pobj', '_', '_'],\n", " ['4', 'for', '_', 'ADP', 'IN', '_', '3', 'prep', '_', '_'],\n", " ['5', 'XXXXX', '_', 'NOUN', 'NNP', '_', '4', 'pobj', '_', '_'],\n", " ['6', 'of', '_', 'ADP', 'IN', '_', '5', 'prep', '_', '_'],\n", " ['7', 'XXXXX', '_', 'NOUN', 'NNP', '_', '6', 'pobj', '_', '_'],\n", " ['8', 'are', '_', 'VERB', 'VBP', '_', '9', 'auxpass', '_', '_'],\n", " ['9', 'listed', '_', 'VERB', 'VBN', '_', '0', 'ROOT', '_', '_']],\n", " [['1', 'using', '_', 'VERB', 'VBG', '_', '0', 'ROOT', '_', '_'],\n", " ['2', 'XXXXX', '_', 'X', 'GW', '_', '1', 'dobj', '_', '_'],\n", " ['3', '-LRB-', '_', '.', '-LRB-', '_', '2', 'punct', '_', '_'],\n", " ['4', 'ann', '_', 'NOUN', 'NNP', '_', '2', 'dep', '_', '_'],\n", " ['5', '-RRB-', '_', '.', '-RRB-', '_', '2', 'punct', '_', '_'],\n", " ['6', 'to', '_', 'PRT', 'TO', '_', '7', 'aux', '_', '_'],\n", " ['7', 'find', '_', 'VERB', 'VB', '_', '1', 'xcomp', '_', '_'],\n", " ['8', 'the', '_', 'DET', 'DT', '_', '9', 'det', '_', '_'],\n", " ['9', 'XXXXX', '_', 'NOUN', 'NN', '_', '7', 'dobj', '_', '_'],\n", " ['10', 'in', '_', 'ADP', 'IN', '_', '9', 'prep', '_', '_'],\n", " ['11', 'welding', '_', 'VERB', 'VBG', '_', '12', 'nn', '_', '_'],\n", " ['12', 'model', '_', 'NOUN', 'NN', '_', '10', 'pobj', '_', '_']],\n", " [['1', 'obtaining', '_', 'VERB', 'VBG', '_', '0', 'ROOT', '_', '_'],\n", " ['2', 'an', '_', 'DET', 'DT', '_', '3', 'det', '_', '_'],\n", " ['3', 'XXXXX', '_', '.', ',', '_', '1', 'dobj', '_', '_'],\n", " ['4', 'for', '_', 'ADP', 'IN', '_', '3', 'prep', '_', '_'],\n", " ['5', 'the', '_', 'DET', 'DT', '_', '7', 'det', '_', '_'],\n", " ['6', 'proposed', '_', 'VERB', 'VBN', '_', '7', 'amod', '_', '_'],\n", " ['7', 'XXXXX', '_', '.', '.', '_', '4', 'pobj', '_', '_']],\n", " [['1', 'we', '_', 'PRON', 'PRP', '_', '2', 'nsubj', '_', '_'],\n", " ['2', 'extended', '_', 'VERB', 'VBD', '_', '0', 'ROOT', '_', '_'],\n", " ['3', 'our', '_', 'PRON', 'PRP$', '_', '4', 'poss', '_', '_'],\n", " ['4', 'identification', '_', 'NOUN', 'NN', '_', '2', 'dobj', '_', '_'],\n", " ['5', 'with', '_', 'ADP', 'IN', '_', '4', 'prep', '_', '_'],\n", " ['6', 'a', '_', 'DET', 'DT', '_', '7', 'det', '_', '_'],\n", " ['7', 'XXXXX', '_', 'NOUN', 'NN', '_', '5', 'pobj', '_', '_'],\n", " ['8', 'in', '_', 'ADP', 'IN', '_', '7', 'prep', '_', '_'],\n", " ['9', 'XXXXX', '_', '.', '.', '_', '2', 'punct', '_', '_']],\n", " [['1', 'smoothing', '_', 'VERB', 'VBG', '_', '4', 'csubj', '_', '_'],\n", " ['2', 'in', '_', 'ADP', 'IN', '_', '1', 'prep', '_', '_'],\n", " ['3', 'XXXXX', '_', '.', ',', '_', '2', 'pobj', '_', '_'],\n", " ['4', 'decreases', '_', 'VERB', 'VBZ', '_', '0', 'ROOT', '_', '_'],\n", " ['5', 'the', '_', 'DET', 'DT', '_', '4', 'dobj', '_', '_'],\n", " ['6', 'XXXXX', '_', '.', '.', '_', '4', 'punct', '_', '_']],\n", " [['1', 'the', '_', 'DET', 'DT', '_', '2', 'det', '_', '_'],\n", " ['2', 'XXXXX', '_', 'NOUN', 'NN', '_', '4', 'nsubjpass', '_', '_'],\n", " ['3', 'is', '_', 'VERB', 'VBZ', '_', '4', 'auxpass', '_', '_'],\n", " ['4', 'specified', '_', 'VERB', 'VBN', '_', '0', 'ROOT', '_', '_'],\n", " ['5', 'using', '_', 'VERB', 'VBG', '_', '4', 'xcomp', '_', '_'],\n", " ['6', 'a', '_', 'DET', 'DT', '_', '5', 'dobj', '_', '_'],\n", " ['7', 'XXXXX', '_', '.', '.', '_', '4', 'punct', '_', '_']],\n", " [['1', 'huge', '_', 'ADJ', 'JJ', '_', '2', 'amod', '_', '_'],\n", " ['2', 'impact', '_', 'NOUN', 'NN', '_', '0', 'ROOT', '_', '_'],\n", " ['3', 'on', '_', 'ADP', 'IN', '_', '2', 'prep', '_', '_'],\n", " ['4', 'XXXXX', '_', 'NOUN', 'NNP', '_', '5', 'nsubj', '_', '_'],\n", " ['5', 'allowing', '_', 'VERB', 'VBG', '_', '3', 'pcomp', '_', '_'],\n", " ['6', 'XXXXX', '_', '.', '.', '_', '2', 'punct', '_', '_']]]" ] }, "execution_count": 4, "metadata": {}, "output_type": "execute_result" } ], "source": [ "sents" ] } ], "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.5.1" } }, "nbformat": 4, "nbformat_minor": 0 }