<?xml version="1.0" encoding="iso-8859-1"?><rss version="2.0"><channel><title>Nieuwskanaal voor: Frontend</title><link>http://www.garfixia.nl/</link><description>De laatste nieuws artikelen</description><language>nl-NL</language><lastBuildDate>Mon, 05 Dec 2011 21:43:35 +0100</lastBuildDate><docs>http://blogs.law.harvard.edu/tech/rss</docs><generator>Procurios RSS2 Feed</generator><item><title>Implementation of an Earley parser with unification</title><description>&lt;p&gt;I just completed a PHP implementation of the Earley parser, extended with unification, that is described in the book &amp;quot;Speech and Language Processing&amp;quot; by Jurafsky and Martin. I thought it might be a good idea to share my code since it took me quite some time and effort to create it and, what&amp;#039;s more important, I could not find any other implementation of it on the internet.&lt;/p&gt;&lt;p&gt;&lt;/p&gt;
&lt;p&gt;The Earley algorithm is a top-down chart parser that parses natural language and does this very efficiently. Given a grammar that contains syntax rules and the words of a language, it parses a sentence into all possible syntax trees. The unification extension adds further restrictions to the syntax rules. An example of such a restriction is that the rule S =&amp;gt; NP VP only applies if the number and person of the NP agrees with that of the VP. When NP is &quot;The children&quot;, then the VP may be &quot;are playing&quot;, but cannot be &quot;is playing&quot; (a restriction on number) or &quot;am playing&quot; (a restriction on person). The grammar should provide extra feature structures for the syntax rules. The unification extension of the Earley parser applies these structures and ensures that a sentence with a feature error will not be parsed.&lt;br /&gt;&lt;br /&gt;I just provide the code to give you some idea and hints on to implement it. The code has not been tested very much since I just finished it. I place it under MIT license.&lt;/p&gt;
&lt;p&gt;&lt;a href='http://www.garfixia.nl/l/library/download/urn:uuid:cb39e072-fae1-4c3a-8191-cb9db0ddba6c/earley+source.zip?format=save_to_disk&amp;amp;ext=.zip'&gt;Earley parser source code&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The algorithm may be found in the book &quot;Speech and language Processing&quot; (first edition), chapter 11, page 431. In the second edition of the book the algorithm may be found in chapter 15. The rest of this article presumes you have read it, since I cannot quickly repeat all the information given in chapter 11.&lt;br /&gt;&lt;br /&gt;The book first describes the basic Earley algorithm, which can be found &lt;a href=&quot;http://en.wikipedia.org/wiki/Earley_parser&quot;&gt;on Wikipedia&lt;/a&gt;. Some implementations are available there as well. It is described in chapter 10 of the book but can be hard to really understand it, because of the undescriptive use of variable names like A and B, and that it uses two functions that are not specified, NEXT-CAT and PARTS-OF-SPEECH.&lt;/p&gt;
&lt;h2&gt;Syntax rules and feature structures&lt;/h2&gt;
&lt;p&gt;For the basic algorithm I use syntax rules like the following S =&amp;gt; NP VP&lt;/p&gt;
&lt;pre&gt;array(&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;array('cat' =&amp;gt; 'S'),&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;array('cat' =&amp;gt; 'NP'),&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;array('cat' =&amp;gt; 'VP'),&lt;br /&gt;),&lt;/pre&gt;
&lt;p&gt;The same rule, extended with feature structures looks like this:&lt;/p&gt;
&lt;pre&gt;array(&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;array('cat' =&amp;gt; 'S', 'features' =&amp;gt; array('head-1' =&amp;gt; null)),&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;array('cat' =&amp;gt; 'NP', 'features' =&amp;gt; array('head' =&amp;gt; array('agreement-2' =&amp;gt; null))),&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;array('cat' =&amp;gt; 'VP', 'features' =&amp;gt; array('head-1' =&amp;gt; array('agreement-2' =&amp;gt; null))),&lt;br /&gt;),&lt;/pre&gt;
&lt;p&gt;This implements the feature structure that is described on page 428 of the book:&lt;/p&gt;
&lt;p&gt;&lt;img title=&quot;&quot; onclick=&quot;&quot; onmouseover=&quot;&quot; onmouseout=&quot;&quot; src='http://www.garfixia.nl/l/library/download/urn:uuid:ddb69947-5c5f-4cc3-a011-bf5fe9a2240d/feature+structure.jpg?width=279&amp;amp;height=151&amp;amp;ext=.jpg' alt=&quot;&quot; data-lightbox-galleryname=&quot;&quot; width=&quot;279&quot; height=&quot;151&quot; /&gt;&lt;/p&gt;
&lt;h2&gt;Features of the implementation&lt;/h2&gt;
&lt;p&gt;The implementation of the algorithm handles unification for syntax rules like this,&lt;/p&gt;
&lt;pre&gt;VP =&amp;gt; NP NP&lt;/pre&gt;
&lt;p&gt;as described on the bottom of page 406. The rule as two identical consequents. If the grammatical categories of the rule are implemented as keys in a hashtable (as they are in my code) then they need to be discerned. I do that by adding the position of the category in the rule.&lt;br /&gt;&lt;br /&gt;The book says: VP =&amp;gt; NP(1) NP(2)&lt;br /&gt;&lt;br /&gt;in the implementation it looks like this: VP@0 =&amp;gt; NP@1 NP@2 (but you don't need to think about this when you write the syntax rules)&lt;br /&gt;&lt;br /&gt;It also deals with rules like this NP =&amp;gt; NP PP where one consequent is identical to the antecedent.&lt;/p&gt;
&lt;h2&gt;Remarks on the algorithm&lt;/h2&gt;
&lt;p&gt;The meaning of the function &quot;FOLLOW-PATH&quot; is not described in the book, but I presume that it means that it returns a subset of its argument. It starts out with the label &quot;cat&quot; and follows it to the end.&lt;br /&gt;&lt;br /&gt;The function &quot;UNIFY-STATES&quot; of the original algorithm performed a &quot;FOLLOW-PATH&quot; of &quot;dag2&quot;. I think this is an error in the algorithm, because it would corrupt the feature set of the charted state. &lt;br /&gt;&lt;br /&gt;My version of unifyStates is also somewhat different since I take into account that a rule may have the same category at different positions (as in the VP =&amp;gt; NP NP example).&lt;/p&gt;
&lt;h2&gt;Labeled DAGs&lt;/h2&gt;
&lt;p&gt;Unifying DAGs is a very elegant to implement unification. I could not follow the explanation of the unification process as described on page 423, unfortunately. That's why I decided to create a different implementation of this function. I introduced a class to separate the logic of the datastructure: LabeledDAG, a labeled directed acyclic graph (or DAG). Which reminds me to thank my employer at &lt;a href=&quot;http://www.procurios.nl/&quot;&gt;Procurios&lt;/a&gt;, Bert Slagter, for inadvertently providing me with a perfect datastructure for this task.&lt;/p&gt;
&lt;h2&gt;Finally&lt;/h2&gt;
&lt;p&gt;I also added the possibility to stop parsing when the first complete sentence is found. For some applications you are only interested in a single interpretation; it might as well be the first one, especially if you succeed to order your syntax rules in such a way that the best interpretation is found first.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;</description><link>http://www.garfixia.nl/k/n133/news/view/1425/15</link><pubDate>Mon, 05 Dec 2011 21:43:35 +0100</pubDate><guid isPermaLink='true'>http://www.garfixia.nl/k/n133/news/view/1425/15</guid></item><item><title>Geld naar Wikipedia</title><description>&lt;p&gt;Ik heb maar eens wat geld overgemaakt naar Wikipedia. Waarom niet? Het is een briljant concept met een geweldige uitwerking en ik hoop dat het nog lang mag bestaan.&lt;/p&gt;
&lt;p&gt;&lt;a href='http://www.garfixia.nlhttps://wikimediafoundation.org/wiki/Support_Wikipedia/en'&gt;&lt;img src='http://www.garfixia.nl//upload.wikimedia.org/wikipedia/commons/4/4b/Fundraising_2009-square-treasure-en.png' alt=&quot;Support Wikipedia&quot; /&gt;&lt;/a&gt;&lt;/p&gt;</description><link>http://www.garfixia.nl/k/n133/news/view/1424/15</link><pubDate>Wed, 23 Nov 2011 20:49:36 +0100</pubDate><guid isPermaLink='true'>http://www.garfixia.nl/k/n133/news/view/1424/15</guid></item><item><title>Sense and reference in an NLP parser</title><description>&lt;p&gt;Consider this short story.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;George Bush was lazy. When I called him he just ignored me. But when I was sad he always comforted me. Gosh, I loved that cat.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;It is tempting to resolve an obvious reference directly. So when the name &quot;George Bush&quot; comes along you look up entity by that name in the knowledge base and directly attach the new statement to it.&lt;/p&gt;
&lt;p&gt;&lt;img title=&quot;&quot; onclick=&quot;&quot; onmouseover=&quot;&quot; onmouseout=&quot;&quot; src='http://www.garfixia.nl/l/library/download/urn:uuid:4f59c46c-10f3-4481-b9fa-ff0d524a779e/bush1.jpg' alt=&quot;&quot; data-lightbox-galleryname=&quot;&quot; width=&quot;409&quot; height=&quot;171&quot; /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;But when we continue the story, the former president of the US of A will have an even stranger predicate attached:&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;img title=&quot;&quot; onclick=&quot;&quot; onmouseover=&quot;&quot; onmouseout=&quot;&quot; src='http://www.garfixia.nl/l/library/download/urn:uuid:0ed194ac-ca50-4f7b-8bd7-dc5c69b68150/bush2.jpg' alt=&quot;&quot; data-lightbox-galleryname=&quot;&quot; width=&quot;625&quot; height=&quot;171&quot; /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;This is obviously a bad idea. So what we need to do is create a temporary object within our context of discourse to which we add the predicates and to which we add the most likely external reference:&lt;/p&gt;
&lt;p&gt;&lt;img title=&quot;&quot; onclick=&quot;&quot; onmouseover=&quot;&quot; onmouseout=&quot;&quot; src='http://www.garfixia.nl/l/library/download/urn:uuid:55c9d791-c38d-46e2-8823-b46130f8fe3f/bush3.jpg' alt=&quot;&quot; data-lightbox-galleryname=&quot;&quot; width=&quot;673&quot; height=&quot;382&quot; /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;This implementation reminds me of the distinction between &lt;a href=&quot;http://en.wikipedia.org/wiki/Sense_and_reference&quot;&gt;sense and reference&lt;/a&gt;. The &lt;em&gt;reference&lt;/em&gt; of a word is the object it denotes in the world. The &lt;em&gt;sense&lt;/em&gt; of a word is the cognitive representation of the object in an agent. In our case both sense and reference are representations. But one of them, reference, is more absolute. The sense of a word is here an object in &lt;em&gt;working memory&lt;/em&gt; whereas the reference of a word is an object in &lt;em&gt;long term memory&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;Now when the last sentence is parsed, we will drop the external reference when we find out we are in error (how we do this is another story). The temporary object can later be added as a new entry to our knowledge base. A second entry with the name George Bush.&lt;/p&gt;
&lt;p&gt;&lt;img title=&quot;&quot; onclick=&quot;&quot; onmouseover=&quot;&quot; onmouseout=&quot;&quot; src='http://www.garfixia.nl/l/library/download/urn:uuid:f967a167-ebfd-4568-bb7f-3660b77f8827/bush4.jpg' alt=&quot;&quot; data-lightbox-galleryname=&quot;&quot; width=&quot;649&quot; height=&quot;169&quot; /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Naming a cat after George Bush is not as unlikely as it may seem. George Bush loves cats. And no, we don't call George Bush a cat. We're not hippies.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;img title=&quot;&quot; onclick=&quot;&quot; onmouseover=&quot;&quot; onmouseout=&quot;&quot; src='http://www.garfixia.nl/l/library/download/urn:uuid:34788e48-cb34-46f7-9230-8375cbda3904/george-bush-eats-a-kitten.jpg' alt=&quot;&quot; data-lightbox-galleryname=&quot;&quot; width=&quot;400&quot; height=&quot;344&quot; style=&quot;display:block;margin-left:auto;margin-right:auto;&quot; /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I am reading &quot;Linguistic Semantics&quot; by William Frawley. A wonderful book full of new ideas.&lt;/p&gt;</description><link>http://www.garfixia.nl/k/n133/news/view/1422/15</link><pubDate>Sun, 18 Sep 2011 21:15:12 +0200</pubDate><guid isPermaLink='true'>http://www.garfixia.nl/k/n133/news/view/1422/15</guid></item><item><title>Semantic analysis: predicates and arguments</title><description>&lt;p&gt;One of the things that is needed for the semantic analysis of a sentence is the extraction of its predicates and their arguments. When I was trying to find out how to do this, I came by several linguistic techniques that are involved in this task. I thought it might be interesting for you to see what&amp;#039;s available in this field. It was certainly interesting to me and it even made me understand some of the stuff that always troubled me in high school :)&lt;/p&gt;&lt;h2&gt;Introduction&lt;/h2&gt;
&lt;p&gt;Let's start with an example. Take this simple sentence:&lt;/p&gt;
&lt;pre&gt;John Milton wrote Paradise Lost.&lt;/pre&gt;
&lt;p&gt;Using &lt;a href=&quot;http://en.wikipedia.org/wiki/First-order_logic&quot;&gt;predicate logic&lt;/a&gt; we can write this sentence as follows:&lt;/p&gt;
&lt;pre&gt;write(john-milton, paradise-lost)&lt;/pre&gt;
&lt;p&gt;This representation of the sentence has the advantage that it can be stored easily in a relational database. Note that the paste tense has been lost in this representation. Also note that the token 'john-milton' is a constant that represents that which is named &quot;John Milton&quot; in the english sentence. And finally notice that 'write' has two arguments (or variables): the first one is assigned to john-milton, the second to paradise-lost. At this point it is not clear why there are two arguments and not three or four. Also it is not clear why john-milton needs to be in the first position and paradise-lost in the second.&lt;br /&gt;&lt;br /&gt;But the actual sentence I want to be able to parse is:&lt;/p&gt;
&lt;pre&gt;John Milton wrote Paradise Lost in the sixteen fifties.&lt;/pre&gt;
&lt;p&gt;The sentence is true. &lt;a href=&quot;http://www4.uwm.edu/libraries/special/exhibits/clastext/clspg117.cfm&quot;&gt;Many scholars guess&lt;/a&gt; the epic poem is written in London around 1650-1660.&lt;br /&gt;&lt;br /&gt;Syntactically, this sentence looks like this:&lt;/p&gt;
&lt;pre&gt;S&lt;br /&gt;+-- NP&lt;br /&gt;|&amp;nbsp;&amp;nbsp; +-- noun: John Milton&lt;br /&gt;|&lt;br /&gt;+-- VP&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; +-- verb: wrote&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; +-- NP&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;+-- NP&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; |&amp;nbsp;&amp;nbsp; +-- noun: Paradise Lost&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; |&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; +-- PP&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; +-- preposition: in&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; +-- NP&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; +-- determiner: the&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; +-- noun: sixteen fifties&lt;/pre&gt;
&lt;p&gt;&lt;br /&gt;&lt;br /&gt;This sentence doesn't fit predicate logic well, because we cannot simply add extra first-order sentences to represent the extra information (&quot;in the sixteen fifties&quot;).&lt;br /&gt;&lt;br /&gt;But let's try anyway:&lt;/p&gt;
&lt;pre&gt;write(john-milton, paradise-lost, decade-1650)&lt;/pre&gt;
&lt;p&gt;This looks good, but what would the following sentence look like?&lt;/p&gt;
&lt;pre&gt;John Milton wrote Paradise Lost in London.&lt;/pre&gt;
&lt;pre&gt;write(john-milton, paradise-lost, london)&lt;/pre&gt;
&lt;p&gt;No that can't be right because that is the position where &lt;em&gt;time&lt;/em&gt; used to be.&lt;/p&gt;
&lt;h2&gt;Predicate logic&lt;/h2&gt;
&lt;p&gt;A representation that solves this problem is like this:&lt;/p&gt;
&lt;pre&gt;isa(e, writing)&lt;br /&gt;writer(e, john-milton)&lt;br /&gt;writee(e, paradise-lost)&lt;br /&gt;time(e, decade-1650)&lt;/pre&gt;
&lt;p&gt;As you can see an extra constant 'e' (for event) is introduced to link the different sentences together. But that's not all: along with e comes the constant 'writing', and the predicates 'isa', 'writer', 'writing', and 'time'.&lt;br /&gt;&lt;br /&gt;What happens here is that the single predicate 'write' is split up and the concept of &lt;em&gt;role&lt;/em&gt; is introduced. Each of the arguments of the predicate gets its own role and each of these roles is given a predicate. For example, argument 1 in the original predicate of 'write' now has the role of 'writer' and argument 2 has the role of 'writee'. By naming the roles explicitly rather than implictly it is possible to extend them arbitrarily. We can now add both 'time' and 'place' as extra roles.&lt;br /&gt;&lt;br /&gt;However, calling these roles 'writer' and 'writee' is suboptimal. These roles can only be used in relation to the predicate 'write'. Whereas the role 'time' can be used to compare very different types of events, the role of 'writer' can only be used in the context of writing. Changing this role to 'agent' would generalize it and allows it to be used in a survey of all events in which a given person was the agent, for example. And the fact that the person is a writer can still be deducted from the fact that he or she is the agent in the event of 'writing'.&lt;br /&gt;&lt;br /&gt;If we follow this reasoning, we end up with:&lt;/p&gt;
&lt;pre&gt;isa(e, writing)&lt;br /&gt;agent(e, john-milton)&lt;br /&gt;patient(e, paradise-lost)&lt;br /&gt;time(e, decade-1650)&lt;/pre&gt;
&lt;p&gt;The question arises what this finite set of roles can be.&lt;/p&gt;
&lt;h2&gt;Scholastic semantic analysis&lt;/h2&gt;
&lt;p&gt;In school we are taught that a sentence can be analysed in two ways: syntactically (in Dutch: taalkundige analyse) and semantically (redekundige analyse). Semantic analysis labels the parts of the sentence as &lt;a href=&quot;http://en.wikipedia.org/wiki/Subject_%28grammar%29&quot;&gt;'subject'&lt;/a&gt;, &lt;a href=&quot;http://en.wikipedia.org/wiki/Predicate_%28grammar%29&quot;&gt;'predicate'&lt;/a&gt;, &lt;a href=&quot;http://en.wikipedia.org/wiki/Object_%28grammar%29&quot;&gt;'object'&lt;/a&gt;, 'complement', and &lt;a href=&quot;http://en.wikipedia.org/wiki/Adjunct_%28grammar%29&quot;&gt;'adjunct'&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Our sentence is analysed as:&lt;/p&gt;
&lt;pre&gt;subject: john-milton&lt;br /&gt;predicate: write&lt;br /&gt;object: paradise-lost&lt;br /&gt;adjunct: decade-1650&lt;/pre&gt;
&lt;p&gt;This analysis produces general roles for the arguments in the sentence (subject, predicate, etc.). Several refinements of the roles are discerned, like 'infinitive' and 'indirect object' These roles keep very close to the surface form, however. This is especially true for passive sentences like:&lt;/p&gt;
&lt;pre&gt;Paradise Lost was written by John Milton in the sixteen fifties.&lt;/pre&gt;
&lt;p&gt;That produces paradise-lost as the subject and john-milton as the object.&lt;/p&gt;
&lt;pre&gt;subject: paradise-lost&lt;br /&gt;predicate: write&lt;br /&gt;object: john-milton&lt;br /&gt;adjunct: decade-1650&lt;/pre&gt;
&lt;p&gt;This is not very useful for our purpose. We want the roles to say something about the objects in the sentence, not about their form or their place in the sentence.&lt;/p&gt;
&lt;h2&gt;Grammatical case&lt;/h2&gt;
&lt;p&gt;Using &lt;a href=&quot;http://en.wikipedia.org/wiki/Grammatical_case&quot;&gt;grammatical case&lt;/a&gt; (in Dutch: naamvallen), the roles of arguments are expressed in a sentence through various forms. To express the fact that the book was written in London, we use the preposition 'in'. This is the locative case. The English language also uses word position to mark case. The subject of a sentence is placed first and denotes the nominative case. The direct object is placed second and denotes the accusative case.&lt;/p&gt;
&lt;pre&gt;nominative: john-milton&lt;br /&gt;accusative: paradise-lost&lt;br /&gt;locative: london&lt;/pre&gt;
&lt;p&gt;I wanted to add the right case of 'decade-1650', and what &lt;a href=&quot;http://en.wikipedia.org/wiki/Accusative_case#Indo-European_languages&quot;&gt;I found&lt;/a&gt; was 'accusative of duration of time'. This result is a little meagre if you ask me.&lt;/p&gt;
&lt;h2&gt;Theta roles&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;http://en.wikipedia.org/wiki/Theta_role&quot;&gt;Theta roles&lt;/a&gt; are syntactic in nature. They describe the number and type of the arguments of a verb. The number of theta roles of a verb is fixed. So this formalism stays quite close to the orginal predicate logic expression, except that it 'names' the arguments. An example will make this clear:&lt;/p&gt;
&lt;pre&gt;write(agent: john-milton, theme: paradise-lost)&lt;/pre&gt;
&lt;p&gt;Only 'required' arguments are used as theta roles. So the adjunct 'in the sixteen fifties' cannot be represented. It is not considered to be part of the argument structure of the verb.&lt;/p&gt;
&lt;h2&gt;Thematic relations&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;http://en.wikipedia.org/wiki/Thematic_relations&quot;&gt;Thematic relations&lt;/a&gt; are similar to theta roles, but their intention is semantic rather than syntactic. They assign roles to adjuncts ('in the sixteen fifties'). &lt;br /&gt;&lt;br /&gt;A list of the most important thematic relations is:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Agent&lt;/li&gt;
&lt;li&gt;Experiencer&lt;/li&gt;
&lt;li&gt;Theme&lt;/li&gt;
&lt;li&gt;Patient&lt;/li&gt;
&lt;li&gt;Instrument&lt;/li&gt;
&lt;li&gt;Force&lt;/li&gt;
&lt;li&gt;Location&lt;/li&gt;
&lt;li&gt;Direction&lt;/li&gt;
&lt;li&gt;Recipient&lt;/li&gt;
&lt;li&gt;Source&lt;/li&gt;
&lt;li&gt;Time&lt;/li&gt;
&lt;li&gt;Beneficiary&lt;/li&gt;
&lt;li&gt;Manner&lt;/li&gt;
&lt;li&gt;Purpose&lt;/li&gt;
&lt;li&gt;Cause&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;br /&gt;In our example this would make:&lt;/p&gt;
&lt;pre&gt;predicate: write&lt;br /&gt;agent: john-milton&lt;br /&gt;patient: paradise-lost&lt;br /&gt;time: decade-1650&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;
&lt;h2&gt;Summary and conclusion&lt;/h2&gt;
&lt;p&gt;Some things to take away:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;A simple sentence has a single predicate and some arguments&lt;/li&gt;
&lt;li&gt;There are required and optional arguments. The optional ones are not always considered 'real'&lt;/li&gt;
&lt;li&gt;There are restrictions to the contents of an argument in a given role&lt;/li&gt;
&lt;li&gt;The role of the arguments with respect to the predicate&lt;/li&gt;
&lt;li&gt;How do you recognize different roles in a sentence?&lt;/li&gt;
&lt;li&gt;There are different predicates with the same name, i.e., write(a, b), write(a, b, c)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I really like thematic relations. They give me the feeling of being 'right', so I will go with them.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;</description><link>http://www.garfixia.nl/k/n133/news/view/1421/15</link><pubDate>Tue, 06 Sep 2011 21:16:53 +0200</pubDate><guid isPermaLink='true'>http://www.garfixia.nl/k/n133/news/view/1421/15</guid></item><item><title>Review: Les enfants de la salamandre</title><description>&lt;p&gt;I read these three comic book albums some 20 years ago. They are absolutely fantastic. They contain very passionate and violent images, combined with some scenes of kindness and affection that stand out by comparison. Esotheric and biblical elements are located in the roughness of southwesternern USA.&lt;br /&gt;
&lt;br /&gt;
The story is based very strongly on a poem by Rainer Maria Rilke and gives it a completely new dimension. The same is done with a song of Laurie Anderson. These techniques are woven into the story so naturally that it awakens a strong sense of fascination.&lt;br /&gt;
&lt;br /&gt;
What I will do here is analyze the work as much as my limited mind can handle and add some links to informational places on the internet.&lt;/p&gt;&lt;h2&gt;Editions&lt;/h2&gt;
&lt;p&gt;The series contains three books: &lt;em&gt;Angie&lt;/em&gt;, &lt;em&gt;Arkadin&lt;/em&gt; and &lt;em&gt;Alicia&lt;/em&gt;. The first two albums I read were published as part of the series &quot;Collectie Pilote&quot;, by Dargaud, in 1988 and 1989, in Dutch. The series was called &quot;De kinderen van de salamander&quot;. &quot;Alicia&quot; was never added to this collection and I found a copy of an edition published by Novedi (in 1990). Gl&amp;eacute;nat published the series in French as a single volume in 1997. &lt;a href=&quot;http://www.amazon.fr/enfants-salamandre-lint%C3%A9grale-Renaud-Dufaux/dp/2723424073&quot;&gt;At Amazon&lt;/a&gt;. &lt;a href=&quot;http://www.stripinfo.be/strip.php?reeks=901&quot;&gt;Blitz&lt;/a&gt; published it in Dutch.&lt;/p&gt;
&lt;h2&gt;Story&lt;/h2&gt;
&lt;p&gt;The story is very intense. It describes the lives of three young adults, the &quot;children of the salamander&quot;, that are the living actors in the &lt;a href=&quot;http://en.wikipedia.org/wiki/Eschatology&quot;&gt;eschatology&lt;/a&gt; (ideas about the end of the world) of an obscure book. Their goal is to meet each other. The storyline is highly complex and braids the lives of the main characters both chronologically and in flashbacks.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;img title=&quot;&quot; onclick=&quot;&quot; onmouseover=&quot;&quot; onmouseout=&quot;&quot; src='http://www.garfixia.nl/l/library/download/urn:uuid:9b0bb434-88ce-4ab5-81e8-2fd347cceb4d/scene-angie.jpg' alt=&quot;&quot; data-lightbox-galleryname=&quot;&quot; width=&quot;500&quot; height=&quot;671&quot; /&gt;&lt;/p&gt;
&lt;p&gt;Scene from &lt;em&gt;Angie&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;br /&gt;&lt;/em&gt;&lt;/p&gt;
&lt;h2&gt;Main characters&lt;/h2&gt;
&lt;h3&gt;&lt;span style=&quot;text-decoration:underline;&quot;&gt;The children of the salamander&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;Angie, Arkadin and Alicia are the children of the salamander. When they are aroused too much, they produce some kind of electric current that destroys things and people around them (the &quot;sign of the salamander&quot;). They fear the sound of nails pounding in wood since it &quot;reminds them of the suffering of their lord&quot; (Alicia, p18). They have a special connection with old car wrecks and can see the &quot;lost legends&quot; in the form of a conquistador skeleton riding a horse (&lt;a href=&quot;http://en.wikipedia.org/wiki/Francisco_V%C3%A1squez_de_Coronado&quot;&gt;Francisco V&amp;aacute;squez de Coronado&lt;/a&gt;, conqueror of the indians of the southwestern United States).&lt;/p&gt;
&lt;h3&gt;Angie&lt;/h3&gt;
&lt;p&gt;(The name means angel) Angie enters the world as he breaks out of a stone angel in a room in hotel Angel Heart. He explains the goal of the children of the salamander like this: &quot;We all come from the same community.Everyone was part of the other, dependent on the other... all coming from the same dream and oblivion. We must fight this oblivion. We must rebuild the images of that dream. So that no sacrifice is in vain.&quot; The role of Angie is less explicit. &lt;em&gt;Angie&lt;/em&gt; p3 says &quot;Angie and Arkadin. Two sides of the same medal. Their glance filled with the same eternity, &lt;em&gt;The hope of the one&lt;/em&gt; against the hatred of the other.&quot;&lt;/p&gt;
&lt;h3&gt;Arkadin&lt;/h3&gt;
&lt;p&gt;(A rare name, mostly used as surname, is probably chosen after &lt;a href=&quot;http://www.munig.com/kino/film_mr_arkadin_der_satan_persoenlich.html&quot;&gt;Orson Welles' 1956 movie &quot;Mr. Arkadin&quot;, that has in German the subtitle &quot;Der Satan pers&amp;ouml;nlich&quot;&lt;/a&gt;) He is the evil one of the children of the salamander. He calls Satan his father (Alicia, p27) He is &quot;the beast of the apocalypse, marked by the seal&quot; (Arkadin, p41). He is found by the faceless in hotel SkyRoad. (Alicia p.37) He is able to shift form. He wants Alicia to be destroyed.&amp;nbsp; At the end of &lt;em&gt;Arkadin&lt;/em&gt; he grabs Myrvold (of the sect) and continues to live inside his body.&lt;/p&gt;
&lt;h3&gt;Alicia (Ali)&lt;/h3&gt;
&lt;p&gt;(The name means 'of noble birth') She enters the world as she rises from the flames of a temple (church), according to the Asgarod. She is raised by brother Leon and sister Clara. Alicia escapes in a process that kills her foster parents (Alicia p21) She then lives with Paddy and works as a librarian. In the library she reads from the Asgarod. She knows the contents of every book in the library, even though she has no recollection of when she has read them. After Angie and Alicia have had sex in an old diner their energies combine (Alicia p26) and parts of their mutual memories return. They remember the gateway they must return to: hotel Skyroad (Alicia, p34)&lt;/p&gt;
&lt;h3&gt;&lt;span style=&quot;text-decoration:underline;&quot;&gt;The community of the salamander&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;This community consists of people that have come into contact with the children of the salamander: the &lt;em&gt;sect&lt;/em&gt;, the&lt;em&gt; &quot;faceless&quot;&lt;/em&gt; and the &lt;em&gt;people in the old factory&lt;/em&gt;. They are &quot;a people that waits for its saviour and until then is robbed of its strengths.&quot; (Alicia, p36)&lt;/p&gt;
&lt;h3&gt;The sect&lt;/h3&gt;
&lt;p&gt;A group of people that live by the Asgorad. They wear dark glasses to avoid polluting their sight with the corruption of the world. (Alicia, p12) They worship in temples and these temples contain a statue of a &quot;guide&quot; who has a white complexion and black hair, combed sideways. These statues are destroyed at the beginning of &lt;em&gt;Arkadin&lt;/em&gt;, probably as a token to introduce the coming of Arkadin. The people of the sect meet with the faceless to find out where they found Arkadin, because this is the place where children of the salamander need to return to (hotel Skyroad). As soon as they find out out, they kill all the faceless (Alicia, p41)&lt;/p&gt;
&lt;h3&gt;The &quot;faceless&quot;&lt;/h3&gt;
&lt;p&gt;This 'special security' team of the &quot;police&quot; always wears motor helmets since their faces are being burned away. It is doubtful wether they are really part of the police force because of their brutal methods. They tortured first Arkadin and later&amp;nbsp;Angie to find out the meaning of their own life (Alicia, p41)&lt;/p&gt;
&lt;h3&gt;People in the old factory&lt;/h3&gt;
&lt;p&gt;These people, who only occur in &lt;em&gt;Arkadin&lt;/em&gt;, live in an old factory. Their health deteriorates. Their role is to help Alicia and Angie to find their way back to where they belong.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;img title=&quot;&quot; onclick=&quot;&quot; onmouseover=&quot;&quot; onmouseout=&quot;&quot; src='http://www.garfixia.nl/l/library/download/urn:uuid:f9eeb364-3308-46a8-a05b-5716c8608ab9/scene-arkadin.jpg' alt=&quot;&quot; data-lightbox-galleryname=&quot;&quot; width=&quot;500&quot; height=&quot;696&quot; /&gt;&lt;/p&gt;
&lt;p&gt;Scene from &lt;em&gt;Arkadin&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;br /&gt;&lt;/em&gt;&lt;/p&gt;
&lt;h2&gt;Asgarod&lt;/h2&gt;
&lt;p&gt;(The name may be related to the country of the Norse Gods, &lt;a href=&quot;http://en.wikipedia.org/wiki/Asgard&quot;&gt;Asgard&lt;/a&gt;) A key element in the story is the fictive book of Asgarod. It is the &quot;holy book that God left &lt;a href=&quot;http://www.redicecreations.com/specialreports/2005/11nov/lucifer.html&quot;&gt;Lucifer&lt;/a&gt; after his fall&quot; (Alicia, p12). Brother Achab (of the sect) spends his life decyphering (and probably translating) the book and found that it prophesies the coming of the children of the salamander, that they will meet, and that this will cause their mutual destruction. Only after that event, a Messiah will stand up and will save the community of the salamander (Alicia, p.17) The Asgarod is written in a logogrammatic language (in which several people&amp;nbsp;at least have their own character) and it is probably Achab's translation of this work that everyone is reading.&lt;/p&gt;
&lt;p&gt;The Asgarod says that the messiah will be sent after the three angels (the children of the salamander) have met and have been destroyed. Yet after this event has taken place, in hotel Skyroad, no messiah has appeared and so brother Achab resumes his studies. After many years he finds the answer to this enigma in a dream. The messiah is here already. (Alicia, p47)&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;img title=&quot;&quot; onclick=&quot;&quot; onmouseover=&quot;&quot; onmouseout=&quot;&quot; src='http://www.garfixia.nl/l/library/download/urn:uuid:9202b86c-2f1c-4c9f-928a-696e6a20c50d/scene-alicia.jpg' alt=&quot;&quot; data-lightbox-galleryname=&quot;&quot; width=&quot;500&quot; height=&quot;688&quot; /&gt;&lt;/p&gt;
&lt;p&gt;Scene from &lt;em&gt;Alicia&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;br /&gt;&lt;/em&gt;&lt;/p&gt;
&lt;h2&gt;Powerful references&lt;/h2&gt;
&lt;p&gt;The books mention several explicit references at the end of &lt;em&gt;Angie&lt;/em&gt; and &lt;em&gt;Alicia&lt;/em&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Gravity's angel - a song by Laurie Anderson (see below)&lt;/li&gt;
&lt;li&gt;&quot;The poem about the children of the salamander is by Rilke&quot; - Actually it is called &quot;N&amp;auml;chtens will ich mit dem Engel reden&quot; (see below)&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.amazon.com/Southwest-U-S-Gerd-Kittel/dp/0500541213&quot;&gt;South West USA&lt;/a&gt; (Gerd Kittel, 1986)&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.amazon.com/Written-West-Wim-Wenders/dp/B0001PBYX6&quot;&gt;Written in the west&lt;/a&gt; (Wim Wenders, 1987)&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.evene.fr/livres/livre/jacques-ferrier-usines-34456.php&quot;&gt;Usines&lt;/a&gt; (Jacques Ferrier, 1987)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;/p&gt;
&lt;h3&gt;Gravity's angel - Laurie Anderson:&lt;/h3&gt;
&lt;p&gt;&lt;iframe src=&quot;http://www.youtube.com/embed/rY7uTO_GuDg?autohide=1&amp;amp;autoplay=0&amp;amp;loop=0&amp;amp;fs=0&amp;amp;showinfo=true&amp;amp;rel=0&quot; title=&quot;YouTube video player&quot; type=&quot;text/html&quot; width=&quot;640&quot; height=&quot;360&quot; frameborder=&quot;0&quot; id=&quot;videorY7uTO_GuDg_GuDg&quot; class=&quot;youtube-player&quot;&gt;&lt;/iframe&gt;&lt;/p&gt;
&lt;h3&gt;&lt;br /&gt;N&amp;auml;chtens will ich mit dem Engel reden - Rainer Maria Rilke (&lt;a href=&quot;http://rainer-maria-rilke.de/100163naechtenswillich.html&quot;&gt;source&lt;/a&gt;) &lt;em&gt;(I hope you will read it, &lt;a href=&quot;http://home.claranet.nl/users/astrid/angel.htm&quot;&gt;Astrid&lt;/a&gt; :)&lt;/em&gt;&lt;/h3&gt;
&lt;blockquote&gt;
&lt;p&gt;N&amp;auml;chtens will ich mit dem Engel reden,&lt;br /&gt;ob er meine Augen anerkennt.&lt;br /&gt;Wenn er pl&amp;ouml;tzlich fragte: Schaust du Eden?&lt;br /&gt;Und ich m&amp;uuml;sste sagen: Eden brennt&lt;br /&gt;&lt;br /&gt;Meinen Mund will ich zu ihm erheben,&lt;br /&gt;hart wie einer, welcher nicht begehrt.&lt;br /&gt;Und der Engel spr&amp;auml;che: Ahnst du Leben?&lt;br /&gt;Und ich m&amp;uuml;sste sagen: Leben zehrt&lt;br /&gt;&lt;br /&gt;Wenn er jene Freude in mir f&amp;auml;nde,&lt;br /&gt;die in seinem Geiste ewig wird, -&lt;br /&gt;und er h&amp;uuml;be sie in seine H&amp;auml;nde,&lt;br /&gt;und ich m&amp;uuml;sste sagen: Freude irrt&lt;/p&gt;
&lt;/blockquote&gt;</description><link>http://www.garfixia.nl/k/n133/news/view/1418/15</link><pubDate>Sat, 20 Aug 2011 20:22:14 +0200</pubDate><guid isPermaLink='true'>http://www.garfixia.nl/k/n133/news/view/1418/15</guid></item><item><title>Parsing &quot;Was Ada Lovelace a daughter of Lord Byron?&quot;</title><description>&lt;p&gt;For the parser I am trying to write I need a fresh sentence to parse every week or so. This week the sentence is&lt;/p&gt;
&lt;p&gt;&quot;Was Ada Lovelace a daughter of Lord Byron?&quot;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (I'm using Byron related sentences)&lt;/p&gt;
&lt;p&gt;This is a so-called &quot;Yes-No question&quot; and its phrase structure is something like this:&lt;/p&gt;
&lt;p&gt;S&lt;br /&gt;+--- aux (was)&lt;br /&gt;+--- NP (proper noun: Ada Lovelace)&lt;br /&gt;+--- NP&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; +--- NP (determiner: a, noun: daughter)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; +--- PP (preposition: of, proper noun: Lord Byron)&lt;/p&gt;
&lt;p&gt;Simple, but there is a problem: the books I read on the subjects tell me that a yes-no-question has the structure:&lt;/p&gt;
&lt;p&gt;S&lt;br /&gt;+--- aux&lt;br /&gt;+--- NP&lt;br /&gt;+--- VP&lt;/p&gt;
&lt;p&gt;So I thought i'd get me an authorative reference on the subject. There is one. It's called &lt;a href=&quot;http://www.amazon.com/Comprehensive-Grammar-English-Language/dp/0582517346/&quot;&gt;&quot;A Comprehensive Grammar of the English Language&quot;&lt;/a&gt;. But it's expensive ($110.-) So I thought I'd see if I could find a second-hand copy. There weren't any cheap ones. But then I did find a xeroxed version of the book &lt;a href=&quot;http://www.4shared.com/get/jk6DwV70/A_Comprehensive_Grammar_of_the.html&quot;&gt;here&lt;/a&gt;. Great, now I could lookup if&amp;nbsp;&lt;em&gt;S -&amp;gt; aux NP NP&lt;/em&gt; was also allowed.&lt;/p&gt;
&lt;p&gt;The reference doesn't say. But it does say that &quot;Again as with negation, main verb BE functions as operator&quot;. Where &lt;em&gt;operator&lt;/em&gt; equals &lt;em&gt;aux(iliary&lt;/em&gt;). But if the word &lt;em&gt;was&lt;/em&gt; is the auxilliary then there has to be a main verb as well. Except there isn't! So I guess that the main verb is implicit, and I though what word it could be. First I landed on &lt;em&gt;identified&lt;/em&gt; which is close, but does make the sentence flow a little bit awkwardly.&lt;/p&gt;
&lt;p&gt;And then it came to me, and that's why I wrote this piece, that the word is &lt;em&gt;being&lt;/em&gt;:&lt;/p&gt;
&lt;p&gt;&quot;Was Ada Lovelace &lt;em&gt;being&lt;/em&gt; a daughter of Lord Byron?&quot;&lt;/p&gt;
&lt;p&gt;Which yields:&lt;/p&gt;
&lt;p&gt;S&lt;br /&gt;+--- aux (was)&lt;br /&gt;+--- NP (proper noun: Ada Lovelace)&lt;br /&gt;+--- VP&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; +--- verb (being)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; +--- NP&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; +--- NP (determiner: a, noun: daughter)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; +--- PP (preposition: of, proper noun: Lord Byron)&lt;/p&gt;
&lt;p&gt;This is all swell, but my parser doesn't read &lt;em&gt;implicit&lt;/em&gt; words. So I will allow the &lt;em&gt;S -&amp;gt; aux NP NP&lt;/em&gt; in my parser, and I will let it generate the verb &lt;em&gt;being&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;PS: If you are reading this and you know it is nonsense, please let me know (kindly), but you will have to provide a better alternative!&lt;/p&gt;</description><link>http://www.garfixia.nl/k/n133/news/view/1402/15</link><pubDate>Fri, 22 Jul 2011 22:30:55 +0200</pubDate><guid isPermaLink='true'>http://www.garfixia.nl/k/n133/news/view/1402/15</guid></item><item><title>Building Natural Language Generation Systems - Ehud Reiter and Robert Dale</title><description>&lt;p&gt;I want to write an agent that I can talk to and that can talk back to me. The talking back parts exists of turning some semantic representation (in predicate logic?) into a sentence that a human can read. Somewhere in the middle should be a syntax tree, an hierarchical representation of the sentence. That's all I knew. So there was a large gap between the stack of propositions and the &lt;em&gt;surface level representation&lt;/em&gt;. And I had no clue as to where to start.&lt;/p&gt;
&lt;p&gt;So I bought this book because I got the impression from Amazon reviews that it is the best book on NLG (natural language generation) available, even though it is ten years old. And I am glad I did. Because the book takes you through the jungle that is called Natural Language Processing and even tells you how to builld your house in it. I am calling it a jungle because there is &lt;em&gt;way too much information&lt;/em&gt; available in this field. And the information does not seem to form a coherent body. There are many conceptual views and they all cover but &lt;em&gt;part of&lt;/em&gt; the field. And I have no intention, nor the time, to understand everything that has been produced.&lt;/p&gt;
&lt;p&gt;The authors of the book (BNLGS) understand this and they really do a great job of making this as simple as possible. The book is about document generation, not discourse planning (having a conversation with someone), and the main flow of document generation is as follows:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Document Planning -&amp;gt; Microplanning -&amp;gt; Surface Realization&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Document Planning&lt;/em&gt; takes as input a &lt;em&gt;communicative goal&lt;/em&gt; and delivers as output a &lt;em&gt;document plan&lt;/em&gt;. A communicative goal is a simple statement of what the document is trying to achieve. A document plan is a tree whose branches are &lt;em&gt;rhetorical relations&lt;/em&gt; (or &lt;em&gt;discourse relations&lt;/em&gt;) and whose leaves are &lt;em&gt;messages&lt;/em&gt;. The document planner creates the structure of the text as a whole. There is a predefined set of messages that can be produced. What these messages look like, is completely up to the application. There are no standards.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Microplanning&lt;/em&gt; takes this document plan as input and produces proto-phrase specifications. It does this by applying templates to the messages and then applying &lt;em&gt;lexicalization, aggregation, and referring expression generation. &lt;/em&gt;A proto-phrase specification is not just a syntactic structure, it contains semantic information as well.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Surface Realization&lt;/em&gt; takes these proto-phrase specifications as input and produces a sentence as output. Existing surfice realizers take several types of proto-phrase specifications as input, but mainly these: &lt;em&gt;lexicalized case frames&lt;/em&gt;, and &lt;em&gt;abstract syntactic structures&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;The only drawback of the book is that it completely skips the implementation of the surface realizer. The reason for this is that the authors claim that it is not smart to build one from scratch, because several advanced one exist, notably KPML, SURGE, and RealPro. I have to disagree with them, because the realizers have a &quot;non-trivial learning curve&quot; and require some conceptual preconceptions.&lt;/p&gt;
&lt;p&gt;Natural Language Generation applications often use very specific types of grammars. The important ones are &lt;em&gt;Systemic Functional Grammar&lt;/em&gt; (KPML, SURGE) and &lt;em&gt;Functional Unification Grammar&lt;/em&gt; (RealPro). These are different from the ones oft used for Natural Language Understanding, because NLG is about &lt;em&gt;choice management&lt;/em&gt; and NLU is about &lt;em&gt;hypotheses management&lt;/em&gt;. There are many ways to express the same meaning and these grammars deal with the choices to be made better than, say, HPSG.&lt;/p&gt;
&lt;p&gt;So what exactly was missing in my idea of language generation before I read this book? Well mainly that you can't go for a system that tries to generate &lt;em&gt;just any&lt;/em&gt; &lt;em&gt;sentence&lt;/em&gt;. Choose your domain and create some domain specific rules and structures. This is what keeps in manageable. And keep semantics involved as long as possible. After all, you are trying to get your meaning across.&lt;/p&gt;
&lt;p&gt;In conclusion: I love this book. It gave me exactly what I needed, some structure in this complicated field, and it deals both with theory and its practical application. And very accessible too.&lt;/p&gt;</description><link>http://www.garfixia.nl/k/n133/news/view/1394/15</link><pubDate>Sun, 18 Sep 2011 18:51:06 +0200</pubDate><guid isPermaLink='true'>http://www.garfixia.nl/k/n133/news/view/1394/15</guid></item><item><title>The Emotional Brain - Joseph LeDoux</title><description>&lt;p&gt;I read this book, because I was looking at Minsky's &quot;The Emotion Machine&quot; on Amazon and some reviewer wrote that it was odd that Minsky didn't quote LeDoux because his book was supposedly the &quot;de facto standard&quot;.&lt;br /&gt;&lt;br /&gt;I don't think the reviewer was right. This book can never be a standard, because it only features a single emotion in depth - fear.&lt;/p&gt;
&lt;p&gt;But that doesn't mean the book isn't interesting. I have learned some very interesting things from it:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;LeDoux claims that cognitive science has deliberately excluded emotion from its field of research. Now I studied Cognitive Science and I have never heard this claim before. But I have to admit 'emotion' was not a subject I came across in my study. So this is interesting. The omission may have been deliberate.&lt;/li&gt;
&lt;li&gt;The book contains an brilliant account of the history of the search for emotion.&lt;/li&gt;
&lt;li&gt;LeDoux explains the role of the Amygdala in the functioning of the brain better then I have seen before.&lt;/li&gt;
&lt;li&gt;The dual processing of emotion via an unconscious route (via the Amygdala) and a conscious route (via the Prefrontal Cortex) is fascinating and truly insightful.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;br /&gt;LeDoux should have left it at that. A fine account of the way fear works in the human brain and the rest of the body. &lt;br /&gt;&lt;br /&gt;&lt;em&gt;But he didn't.&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;The book is written as if the editor came to him when he was done and said &quot;but what about feelings?&quot;. So he emphasises the importance of the strong and violent nature of the feelings that can accompany fear and other emotions and he admits that science as yet has no answer to the question how it is that these brain states are actually &lt;em&gt;felt&lt;/em&gt; by humans and other animals (the mind-body problem).&lt;br /&gt;&lt;br /&gt;Being that as it may, LeDoux then goes on to offer his own answer to that problem. He starts out by describing working memory as the basis of consciousness. Which is fine. But not enough, as he himself claims: &quot;I admit that I've passed the emotional consciousness buck&quot; (p. 282) So he continues with three ingredients needed for feelings:&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Direct Amygdala Influences on the Cortex&lt;/li&gt;
&lt;li&gt;Amygdala-Triggered Arousal&lt;/li&gt;
&lt;li&gt;Bodily Feedback&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;br /&gt;These ingredients themselves are very insightful. A job well done. But the reader (well, me at least) is still left wondering: these are interesting processes and I can see that they are highly related to the 'feelings' aspect of emotion. But the question still remains: how do these bodily processes lead to mental feelings? &lt;br /&gt;&lt;br /&gt;&lt;em&gt;Upon which LeDoux postulates:&lt;/em&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&quot;When all of these systems function together a conscious emotional experience is inevitable.&quot;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;br /&gt;And I know that many people feel this way. I myself think that it just doesn't make sense. He doesn't explain his statement any further, which is good because it would only weaken his claim.&lt;br /&gt;&lt;br /&gt;As an after-afterword to this same chapter, he then feels the need to say something about the feelings of animals, in &quot;Do Fish Have Feelings Too?&quot;. And this part is not written because his editor asked him to. This part was written because his own conscience told him to.&lt;br /&gt;&lt;br /&gt;Wether animals have feelings or not was already answered implicitly by LeDoux in the same chapter. Since all animals have the 'three ingredients' named above, it would follow 'inevitably' that they have a conscious emotional experience - feelings.&lt;br /&gt;&lt;br /&gt;But this is conclusion is not even mentioned by him. Instead he names the following arguments of why animals have a 'different' consciousness.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The human cortex is relatively larger - &quot;This alone would give us reason to be cautious about attributing consciousness to other animals.&quot; -- Why? He does not say.&lt;/li&gt;
&lt;li&gt;The prefrontal cortex (where working memory lives) is smaller&lt;/li&gt;
&lt;li&gt;Most animals are not self-aware (unable to recognize themselves in the mirror) -- How is this related to emotion?&lt;/li&gt;
&lt;li&gt;Natural language only exists in the human brain. It follows that the human brain is different from that of animals. It follows that we must be &quot;cautious to attribute consciousness beyond our species&quot;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;He summarizes:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&quot;Consciousness ... requires the capacity to relate several things at once (for example, the way a stimulus looks, memories of past experiences with that stimulus or related stimuli, a conception of the self as the experiencer). A brain that cannot form these relations, due to the absence of a cortical system that can put all of the information together at the same time, cannot be conscious.&quot;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;These are not the words of a scientist or a philosopher. These are the words of a man that has sacrificed many hundreds of animals (mainly rats) to the greater good of the body of human knowledge. A man that has consciously invoked fear, again and again in the lives of his fellow creatures on this planet. Just for the sake of understanding. A man that denies the very feelings he has researched most of his life. A man that fears the truth.&lt;/p&gt;</description><link>http://www.garfixia.nl/k/n133/news/view/1393/15</link><pubDate>Sun, 17 Apr 2011 21:49:46 +0200</pubDate><guid isPermaLink='true'>http://www.garfixia.nl/k/n133/news/view/1393/15</guid></item></channel></rss>
