<?xml version="1.0"?><!DOCTYPE article SYSTEM "/project/take/software/searchbench_offline_processing/paperxml_generator/aclextractor/src/python/../resource/dtd/paperxml.dtd"><article><header><firstpageheader><page local="1" global="71"/><title>CCG parsing with one syntactic structure per n-gram</title><author surname="Dawborn" givenname="Tim"><org  name="University of Sydney" country="Australia" city="Sydney"/></author><author surname="Curran" givenname="James R."><org  name="University of Sydney" country="Australia" city="Sydney"/></author></firstpageheader><frontmatter><p><b>CCG </b><b>parsing with one syntactic structure per </b>n<b>-gram</b></p><p><b>Tim Dawborn </b>and <b>James R. Curran</b></p><p>School of Information Technologies University of Sydney NSW, 2006, Australia {tdaw3088,james}@it.usyd.edu.au</p></frontmatter><abstract>There is an inherent redundancy in natural languages whereby certain common phrases (or n-grams) appear frequently in general sen­tences, each time with the same syntactic anal­ysis. We explore the idea of exploiting this re­dundancy by pre-constructing the parse struc­tures for these frequent n-grams. When pars­ing sentences in the future, the parser does not have to re-derive the parse structure for these n-grams when they occur. Instead, their pre-constructed analysis can be reused. By gen­erating these pre-constructed databases over WSJ sections 02 to 21 and evaluating on sec­tion 00, a preliminary result of no signifi­cant change in F-score nor parse time was ob­served. </abstract></header><body><section number="1" title="Introduction"><p>Natural language parsing is the task of assigning syntactic structure to text. Initial parsing research mostly relied on manually constructed grammars. Statistical parsers have been able to achieve high ac­curacy since the creation of the Penn Treebank (Mar­cus et al., 1993); a corpus of Wall Street Journal text used for training. Statistical parsers are typically in­efficient, parsing only a few sentences per second on standard hardware (Kaplan et al., 2004). There has been substantial progress on addressing this is­sue over the last few years. Clark and Curran (2004) presented a statistical CCG parser, C&amp;C, which was an order of magnitude faster than those analysed in Kaplan et al. (2004). However the C&amp;C parser is still limited to around 25 sentences per second.</p><p>This paper investigates whether the speed of sta­tistical parsers can be improved using a novel form of caching. Currently, parsers treat each sentence independently, despite the fact that some phrases are constantly reused. We propose to store analyses for common phrases, instead of re-computing their syntactic structure each time the parser encounters them.</p><p>Our first idea was to store a single, spanning analysis for frequent n-grams. However, the most frequent n-grams often did not form constituents. Given that n-gram distributions are very long-tailed, this meant that the constituent n-grams covered only a small percentage of n-grams in the corpus.</p><p>We then turned our attention to the n-grams that were not forming constituents. First, we found that some actually <i>should </i>form constituents. However, the structure of noun-phrases in the Penn Treebank is underspecified, leading to incorrect derivations in the C&amp;C parser's training corpus (Hockenmaier, 2003). Secondly, we investigated whether the spuri­ous ambiguity of CCG derivations could be exploited to force frequent n-grams to compose into con­stituents, while still producing a semantically equiv­alent derivation. Here we encountered problems us­ing the composition rule to create new constituents. Some of these problems were due to further issues with the analyses in the corpus, while others were due to the ambiguity of the n-grams.</p><p>The sparsity of n-grams in a corpus of this size meant that we had very few caching candidates to work with. Our approach may be more successful when the caching process is performed using a data set.</p><page local="2" global="72"/></section><section number="2" title="Background"><p>We are interested in storing the parse structure for common n-grams, so that the analysis can be reused across multiple sentences. In a way, this is an exten­sion of an important innovation in parsing: the CKY chart parsing algorithm (Younger, 1967). Our pro­posal is an attempt to memoise sections of the chart across multiple sentences.</p><p>Most constituency parsers use some form of chart for constructing a derivation, so our investigation could have begun with a number of different parsers. We decided to use the C&amp;C parser (Clark and Cur-ran, 2007) for the following reasons. First, the aim of the caching we are proposing is to improve the speed of a parser. It makes sense to look at a parser that has already been optimised, to ensure that we do not demonstrate an improvement that could have been achieved using a much simpler solution. Sec­ondly, there are aspects of the parser's grammar for­malism, Combinatory Categorial Grammar, that are relevant to the issues we want to consider.</p><subsection number="2.1" title="Chart Parsing"><p>The chart is a triangular hierarchical structure used for storing the nodes in a parse tree, as seen in Fig­ure 1. A chart for a sentence consisting of n tokens contains ra("2+1) <i>cells, </i>represented as squares in the figure. Each cell in the chart contains the parse of a contiguous <i>span </i>or sequence of tokens of the sen­tence. As such, a cell stores the root nodes of all pos­sible parse trees for the tokens which the cell cov­ers. This coverage is called the <i>yield </i>of that node. This is illustrated as the linked-list style data struc­ture highlighted as being the contents of cell (1, 3) in Figure 1. The cell <i>(p,</i><i> </i><i>s)</i><i> </i>in the chart contains all pos­sible parses for all of the tokens in the range <i>[p,</i><i> </i>p+s) for a given sentence. The chart is built from the bot­tom up, starting with constituents spanning a single token, and then increasing the span to cover more tokens, until the whole sentence is covered.</p><p>Combinatory Categorial Grammar (CCG) (Steed-man, 2000) is a lexicalised grammar formalism. This means that each word in a sentence is assigned a composite object that reflects its function in the derivation. In CCG, these objects are called lexical categories.</p><p>Categories can be built recursively from atomic</p><p>i <footnote anchor="1"/>......</p><doubt alpha="30.8" length="26" tooSmall="True" monospace="0.0">span      o12     34 -pos-</doubt><figure caption="Figure 1: An illustration of the chart data structure used in parsing algorithms such asCKY"></figure><p>units, such as S (sentence), N (noun), and NP (noun phrase). Recursive construction of categories means that very few atomic units need to be used. For in­stance, there is no atomic category for a determiner in CCG. Instead, a determiner is a function which maps from a noun to a noun phrase.</p><p>Similarly, verbs are functions from some set of arguments to a complete sentence. For example, the transitive verb like would be assigned the category (S\NP)/NP. Here, the slashes indicate the direc­tionality of arguments, stating that an NP object is expected to the right, and an NP subject is expected to the left. An example CCG derivation containing the transitive verb like is:</p><p>I like the cat</p><doubt alpha="53.3" length="30" tooSmall="False" monospace="0.0">NP(S [del ]\NP )/NPNP[nb ]/N N</doubt><doubt alpha="57.1" length="7" tooSmall="False" monospace="0.0">NP\nb}&gt;</doubt><p>S [del] &lt; This derivation uses the rules of forward and backward application to build the representation of the sentence. Most of the information is contained in the lexical categories.</p></subsection><subsection number="2.2" title="The C&amp;C Parser"><p>The C&amp;C parser makes use of this property of CCG by dividing the parsing problem into two phases, following (Bangalore and Joshi, 1999). First, a <i>su­pertagger </i>proposes a set of likely categories for each token in the sentence. The parser then attempts to build a spanning analysis from the proposed cate­gories, using the modified CKY algorithm described in Steedman (2000). The supertagging phase dra­matically reduces the search space the parser must explore, making the C&amp;C parser very efficient.<page local="3" global="73"/></p></subsection></section><section number="3" title="Motivation"><p>It is important to note that the concepts motivating this paper could be applied to any grammar formal­ism. However, our experiments were conducted us­ing CCG and the C&amp;C parser for a number of rea­sons, which are outlined throughout the paper.</p><p>In order for our "one structure per n-gram" idea to work in practice, the parsed data must possess two properties. Firstly, there must be a small number of n-grams which account for a large percentage of the total n-grams in the corpus. If this property was not present, this this would imply that most of the n-grams within the text appear very infrequently. As a result, the size of the database containing the mem-oised analyses would grow in size, as there are no n-grams which clearly are more useful to memoise than others. The result of this would be that the time taken to load the analyses from the database would exceed the time taken to let the parser construct a derivation from scratch.</p><p>The second property is that the most frequent n-grams in the corpus must have on average very few distinct analyses. If the most frequent n-grams in the corpus all occurred with a large number of different analyses, then every time we see these frequent n-grams in the future, these multiple analyses will all have to be loaded up from the database. This again would result in more time taken in the database load­ing than letting the parser construct the derivation from scratch. If the most frequent n-grams in the corpus thus only occur with a very small number of analyses, then the time taken to load the pre-constructed structures should be less than the time the parser will take to construct the derivation from scratch.</p></section><section number="4" title="Analysis"><p>By analysing all of the n-grams within sections 02 to 21 of CCGbank for varying n, we were able to show that, under a very basic analysis, CCGbank satisfies both the properties discussed in Section 3. The re­sults of this analysis can be seen in Table 1.</p><p>One interesting result here is the average number of derivations varying n-grams occur with. On its first attempt at parsing a sentence, the C&amp;C parser</p><table caption="Table 1: Statistics about varying sized n-gram in CCG­bank sections 02 to 21"></table><p>Table 2: Constituent statistics about the 10 most frequent bigrams in CCGbank 02 to 21 which form constituents the majority of the time</p><p>assigns on average 1.27 CCG categories per word (Clark and Curran, 2007). Since the average num­ber of derivations for varying sized n-grams is less than the ambiguity introduced during the first at­tempt at the parsing process, this process of in­serting pre-built chart structures can potentially de­crease the overall parsing time, as the pre-built struc­tures would introduce less ambiguity to the overall parse compared to what the parser would provide normally.</p><subsection number="4.1" title="Constituents"><p>The first idea explored is how well can we do by storing only n-grams which primarily form con­stituents. Table 2 shows the 10 most frequent bi-grams in CCGbank sections 02 to 21 which primar­ily form constituents. The columns show the num­ber of times the n-gram was seen not forming and not forming a constituent, as well as the number of unique constituent-forming analyses formed.</p><p>A number of interesting observations can be made here. Firstly, the number of times these bigrams oc­cur drops off very quickly, with the 4th most fre­quent bigram appearing just under half the number of times the most frequent bigram occurs.<page local="4" global="74"/> This drop off contradicts our first desirable property for the corpus, that there should be a large number of fre­quent n-grams.</p><table caption="Table 1: Statistics about varying sized n-gram in CCGbank sections 02 to 21" class="main" frame="box" rules="all" border="1" regular="False"><tr class="row"><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p>n-gram size</p></td><td class="cell"><p>2</p></td><td class="cell"><p>3</p></td><td class="cell"><p>4</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p>Avg number derivations</p></td><td class="cell"><p>1.19</p></td><td class="cell"><p>1.09</p></td><td class="cell"><p>1.04</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p>Always form constituents</p></td><td class="cell"><p>23%</p></td><td class="cell"><p>10%</p></td><td class="cell"><p>5%</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p>Never form a constituent</p></td><td class="cell"><p>73%</p></td><td class="cell"><p>89%</p></td><td class="cell"><p>93%</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td></tr></table><table class="main" frame="box" rules="all" border="0" regular="False"><tr class="row"><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p>bigram</p></td><td class="cell"><p>#No</p></td><td class="cell"><p># Yes</p></td><td class="cell"><p>#Uniq</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p>the company</p></td><td class="cell"><p>8</p></td><td class="cell"><p>1157</p></td><td class="cell"><p>1</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p>a share</p></td><td class="cell"><p>3</p></td><td class="cell"><p>1082</p></td><td class="cell"><p>7</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p>New York</p></td><td class="cell"><p>4</p></td><td class="cell"><p>868</p></td><td class="cell"><p>7</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p>a year</p></td><td class="cell"><p>34</p></td><td class="cell"><p>572</p></td><td class="cell"><p>9</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p>do n't</p></td><td class="cell"><p>0</p></td><td class="cell"><p>474</p></td><td class="cell"><p>9</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p>the market</p></td><td class="cell"><p>37</p></td><td class="cell"><p>410</p></td><td class="cell"><p>1</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p>did n't</p></td><td class="cell"><p>0</p></td><td class="cell"><p>378</p></td><td class="cell"><p>11</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p>is n't</p></td><td class="cell"><p>1</p></td><td class="cell"><p>367</p></td><td class="cell"><p>21</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p>The company</p></td><td class="cell"><p>0</p></td><td class="cell"><p>359</p></td><td class="cell"><p>1</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p>does n't</p></td><td class="cell"><p>0</p></td><td class="cell"><p>328</p></td><td class="cell"><p>10</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td></tr></table><p>Observing the numbers in the last column of Ta­ble 2, it is easily seen that only 3 of the top 10 bigrams occur with less than 5 unique derivations, which goes against our second desirable property, that the most frequent n-grams occur with very few unique derivations.</p><p>These two factors indicate that an approach which persists only constituent-forming n-grams in these databases will not perform well, as neither of the two properties discussed in Section 3 are fulfilled.</p></subsection><subsection number="4.2" title="Non-constituents"><p>Section 4.1 showed that an approach to this problem which utilises only constituent-forming n-grams most likely will not produce the desired speed boost due to the properties mentioned in Section 3 not be­ing upheld.</p><p>The next natural direction to take is to the stor­ing of analyses for the non-constituent-forming n-grams. The use of CCG <i>type raising </i>and <i>composition </i>allow us to store non-constituent-forming analyses in these databases for n-grams, yet still be able to use these derivations later on to form correct seman-tically correct spanning analyses. For example, one of the frequent non-constituent-forming occurrences of the phrase of the in CCGbank is</p><p>of the company</p><doubt alpha="65.5" length="29" tooSmall="False" monospace="0.0">(nnpynpj/npNP/nn np &gt; np\np &gt;</doubt><p>The is forward applied to company before of can be joined with the. Instead, we could construct the following derivation and insert it into the pre-constructed database</p><doubt alpha="83.3" length="6" tooSmall="False" monospace="0.0">of the</doubt><doubt alpha="60.0" length="15" tooSmall="False" monospace="0.0">(np\np)7np np/n</doubt><p>Here we use CCG forwards composition to com­bine of and the into a constituent-forming analy­sis. This chart structure could be reused with CCG forwards application to construct a span of the orig­inal phrase in the following manner</p><doubt alpha="62.1" length="29" tooSmall="False" monospace="0.0">(nnpynpj/npNP/nn (np^np)/^-&gt;b</doubt><doubt alpha="57.1" length="7" tooSmall="False" monospace="0.0">np\np &gt;</doubt><p>Using the forward composed version of the bi­gram of the, an analysis for the whole phrase was still able to be constructed, even though in the original derivation of and the did not form a con­stituent. This technique of utilising CCG forward composition and type raising allows us to add these n-grams which primarily do not form constituents, into the database.</p><subsubsection number="4.2.1" title="Prepositional Phrase Attachment"><p>This technique does not work all ofthe time, how­ever it does work for many cases. One situation where this technique does not work is is with prepo­sitional phrase attachment. The correct CCG deriva­tion for the phrase on the king of England is</p><p>X on the king of England</p><p>np   <i>J</i><i>NP</i><i>x</i><i>NP</i><i>y</i><i>/NP    NP [nb </i><i>]      </i><i>NP\NP</i></p><doubt alpha="47.1" length="17" tooSmall="False" monospace="0.0">np &lt; np\np &gt; np &lt;</doubt><p>If we were to use in this example the same for­wards composed derivation of the bigram of the as described earlier for the bigram on the, the wrong analysis would be constructed.</p><doubt alpha="52.8" length="36" tooSmall="False" monospace="0.0">X   on      the      king of England</doubt><doubt alpha="63.2" length="19" tooSmall="False" monospace="0.0">NP(NP\NP)/N~N~NP\NP</doubt><doubt alpha="54.5" length="11" tooSmall="False" monospace="0.0">NP\NP&gt; NP &lt;</doubt><doubt alpha="50.0" length="4" tooSmall="False" monospace="0.0">NP &lt;</doubt><p>While an NP was still the resultant overall cat­egory assigned to the phrase, the internal noun phrases are incorrect; the named entity the king of England is not represented within this incor­rect derivation.</p><p>From an implementation point of view, being able to construct and use this forward composed parse structure for of the involves violating one of the normal-form constraints proposed in Eisner (1996) to eliminate CCG's "spurious ambiguity". The con­straint which was violated states that the left child of forward application cannot be the result of for­ward composition, as is the case in our previous ex­ample.<page local="5" global="75"/> The C&amp;C parser implements these Eisner constraints, and as such a special rule was added to the parser to allow any chart structures which were loaded from a pre-constructed database to violate the Eisner constraints.</p></subsubsection><subsubsection number="4.2.2" title="Coordination"><p>In CCG parsing, commas can be parsed in one of two ways depending on their semantic role in the sentence. They are either used for coordina­tion or they are absorbed. Consider the CCG deriva­tion for the sentence shown in Figure 2. The sec­ond comma between England and owned is ab­sorbed, as shown in the second last line of the deriva­tion. The first comma, however, between George and the king of England, is used to express apposition. Apposition in CCG is represented using the same coordination structure which and uses; the conjoining combinator. This combinator is denoted as <i>eonj </i>or &lt;J&gt; in CCG. The type signature of this com-binator is stating that the CCG category has to be the same on both sides of a <i>eonj, </i>and when the functor is in­voked, the resultant category is the same. Our n-gram pre-construction attempts to memoise analy­ses based purely on the tokens of n-grams. Because comma appears as a <i>eonj, </i>we are unable to use any n-grams which contain commas in our database, as at the token level it is not possible to determine ifthe comma will be absorbed or will be used in apposi­tion.</p><doubt alpha="53.3" length="15" tooSmall="False" monospace="0.0">X eonj X1=&gt;oX11</doubt></subsubsection></subsection><subsection number="4.3" title="Statistics"><p>Table 3 shows the 15 most frequent bigrams in CCG-bank sections 02 to 21. The first thing to note about this table is that only two of the top 15 most frequent bigrams primarily form a constituent, again leading to a conclusion that using only constituent-forming bigrams is not the correct approach to the problem. The second point to observe is that seven out ofthese 15 bigrams contain a comma, which as described in Section 4.2.2, implies these cannot be used in our database.</p><p>The S column shows an accumulative sum of the number of tokens covered in sections 00 to 21 just by using the bigrams in the table. The coverage figures shown in the neighbouring column show this sum as a percentage of the total number of tokens in sec­tions 00 to 21. This shows that by considering just the 15 most frequent bigrams, a coverage of 6.5% of the total number of tokens has been achieved. If a trend like this continues linearly down this list of fre­quency sorted bigrams and a pre-constructed analy­sis for the first 1000 bigrams could be memoised, for example, there is a great potential for the parse time to be improved.</p></subsection></section><section number="5" title="Evaluation"><p>The effect of these n-gram databases on the parsing process is evaluated in terms of the overall parsing time, as well as the accuracy of the resultant deriva­tions. The accuracy is measured in terms of F-score values for both labelled and unlabelled dependen­cies when evaluated against the predicate-argument dependencies in CCGbank (Clark and Hockenmaier, 2002). The parsing times reported do not include the time to load the grammar, statistical models, or our database.</p></section><section number="6" title="Implementation"><doubt alpha="50.0" length="8" tooSmall="False" monospace="0.0">6.1 Data</doubt><p>The models used by the C&amp;C parser for our experi­ments were trained using two different corpora. The WSJ models were trained using the CCG version of the Penn Treebank, CCGbank (Hockenmaier, 2003; Hockenmaier and Steedman, 2007), which is avail­able from the Linguistic Data Consortium<footnote anchor="1"/>. The second corpus is a version of CCGbank where the noun phrase bracketing has been corrected (Vadas and Curran, 2008; Vadas, 2009).</p><subsection number="6.2" title="Tokyo Cabinet"><p>Tokyo Cabinet<footnote anchor="2"/> is an open source, lightweight database API which provides a number of dif­ferent database implementations, including a hash database, B+ tree, and a fixed-length key database. Our experiments used Tokyo Cabinet to store the pre-constructed n-grams because of its ease of use, speed, and maximum database size (8EB). A large<page local="6" global="76"/></p><footnote label="1">http://ldc.upenn.edu/</footnote><footnote label="2">http://tokyocabinet.sourceforge.net/</footnote><doubt alpha="100.0" length="6" tooSmall="False" monospace="0.0">George</doubt><doubt alpha="100.0" length="3" tooSmall="False" monospace="0.0">NNP</doubt><doubt alpha="100.0" length="3" tooSmall="False" monospace="0.0">the</doubt><doubt alpha="100.0" length="4" tooSmall="False" monospace="0.0">king</doubt><doubt alpha="100.0" length="2" tooSmall="False" monospace="0.0">of</doubt><doubt alpha="100.0" length="7" tooSmall="False" monospace="0.0">England</doubt><doubt alpha="42.1" length="38" tooSmall="False" monospace="0.0">NP [nb]/N    N    (NP\NP )/NPNP~\nb} &gt;</doubt><doubt alpha="80.0" length="5" tooSmall="False" monospace="0.0">NP\NP</doubt><doubt alpha="66.7" length="6" tooSmall="False" monospace="0.0">NP[nb]</doubt><doubt alpha="100.0" length="1" tooSmall="False" monospace="0.0">N</doubt><doubt alpha="100.0" length="2" tooSmall="False" monospace="0.0">NP</doubt><p>owned the company</p><doubt alpha="47.8" length="23" tooSmall="False" monospace="0.0">(S\NP)/NP   NP [nb]/N N</doubt><doubt alpha="50.0" length="6" tooSmall="False" monospace="0.0">S\NP &gt;</doubt><figure caption="Figure 2: ACCGderivation containing commas used for apposition and absorption"></figure><p>Table 3: Constituent statistics about the 15 most frequent bigrams in CCGbank 02 to 21. The columns show the numberoftimes the bigram was seen forming a non-constituent, forming a constituent,and then the numberofunique constituent-forming chart structures. The next two columns show accumulatively what percentage of sections 02 to 21 these bigrams alone cover. The last column shows the ambiguity the C&amp;C supertagger associates to each n-gram</p><doubt alpha="0.0" length="1" tooSmall="False" monospace="0.0">&gt;</doubt><doubt alpha="0.0" length="1" tooSmall="False" monospace="0.0">&lt;</doubt><doubt alpha="100.0" length="1" tooSmall="False" monospace="0.0">S</doubt><p>Figure 3: When creating the trigram database, if a trigram forms a constituent in the chart, it is added to the database</p><p>maximum database size is important because more data is better for the database construction phase.</p></subsection><subsection number="6.3" title="Constructing the n -gram Databases"><p>The construction of the final database is a multi­stage process, with intermediate databases being generated and then refined. The first stage in this process is to parse all of the training data, which in our case is WSJ sections 02 to 21. The parse tree for every sentence is then analysed for constituent-forming n-grams. If a constituent-forming n-gram is found and its size (number of tokens) is one for which we would like to construct a database for, then the n-gram and its corresponding chart struc­ture are written out to a database. These first stage databases are implemented using a simple key-value Tokyo Cabinet hash database. The structure of the keys and values in this database are <b>Key </b>=  (n-gram,  hash of chart) <b>Value </b>=  (chart, occurrence counter)<page local="7" global="77"/></p><table class="main" frame="box" rules="all" border="0" regular="False"><tr class="row"><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p>bigram</p></td><td class="cell"><p>#No</p></td><td class="cell"><p>Constituent # Yes   # Uniq</p></td><td class="cell"><p>Coverage</p><p>S %</p></td><td class="cell"><p>Ambiguity</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p>of the</p></td><td class="cell"><p>4936</p></td><td class="cell"><p>0</p></td><td class="cell"><p></p></td><td class="cell"><p>0</p></td><td class="cell"><p>9872</p></td><td class="cell"><p>1.06</p></td><td class="cell"><p>1.031</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p>in the</p></td><td class="cell"><p>3911</p></td><td class="cell"><p>5</p></td><td class="cell"><p></p></td><td class="cell"><p>1</p></td><td class="cell"><p>17704</p></td><td class="cell"><p>1.90</p></td><td class="cell"><p>1.747</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p>, the</p></td><td class="cell"><p>3489</p></td><td class="cell"><p>0</p></td><td class="cell"><p></p></td><td class="cell"><p>0</p></td><td class="cell"><p>24682</p></td><td class="cell"><p>2.66</p></td><td class="cell"><p>1.005</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p>, and</p></td><td class="cell"><p>2219</p></td><td class="cell"><p>9</p></td><td class="cell"><p></p></td><td class="cell"><p>3</p></td><td class="cell"><p>29138</p></td><td class="cell"><p>3.13</p></td><td class="cell"><p>1.000</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p>, a</p></td><td class="cell"><p>2167</p></td><td class="cell"><p>0</p></td><td class="cell"><p></p></td><td class="cell"><p>0</p></td><td class="cell"><p>33472</p></td><td class="cell"><p>3.60</p></td><td class="cell"><p>1.000</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p>, which</p></td><td class="cell"><p>1705</p></td><td class="cell"><p>0</p></td><td class="cell"><p></p></td><td class="cell"><p>0</p></td><td class="cell"><p>36882</p></td><td class="cell"><p>3.97</p></td><td class="cell"><p>1.118</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p>for the</p></td><td class="cell"><p>1638</p></td><td class="cell"><p>0</p></td><td class="cell"><p></p></td><td class="cell"><p>0</p></td><td class="cell"><p>40158</p></td><td class="cell"><p>4.32</p></td><td class="cell"><p>1.958</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p>to the</p></td><td class="cell"><p>1588</p></td><td class="cell"><p>1</p></td><td class="cell"><p></p></td><td class="cell"><p>1</p></td><td class="cell"><p>43336</p></td><td class="cell"><p>4.66</p></td><td class="cell"><p>1.925</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p>on the</p></td><td class="cell"><p>1533</p></td><td class="cell"><p>0</p></td><td class="cell"><p></p></td><td class="cell"><p>0</p></td><td class="cell"><p>46402</p></td><td class="cell"><p>4.99</p></td><td class="cell"><p>1.962</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p>, said</p></td><td class="cell"><p>1258</p></td><td class="cell"><p>0</p></td><td class="cell"><p></p></td><td class="cell"><p>0</p></td><td class="cell"><p>48918</p></td><td class="cell"><p>5.26</p></td><td class="cell"><p>1.290</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p>, but</p></td><td class="cell"><p>1193</p></td><td class="cell"><p>1</p></td><td class="cell"><p></p></td><td class="cell"><p>1</p></td><td class="cell"><p>51306</p></td><td class="cell"><p>5.52</p></td><td class="cell"><p>1.045</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p>the company</p></td><td class="cell"><p>8</p></td><td class="cell"><p>1157</p></td><td class="cell"><p></p></td><td class="cell"><p>1</p></td><td class="cell"><p>53636</p></td><td class="cell"><p>5.77</p></td><td class="cell"><p>1.000</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p>, he</p></td><td class="cell"><p>1165</p></td><td class="cell"><p>0</p></td><td class="cell"><p></p></td><td class="cell"><p>0</p></td><td class="cell"><p>55966</p></td><td class="cell"><p>6.02</p></td><td class="cell"><p>1.000</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p>that the</p></td><td class="cell"><p>1150</p></td><td class="cell"><p>0</p></td><td class="cell"><p></p></td><td class="cell"><p>0</p></td><td class="cell"><p>58266</p></td><td class="cell"><p>6.27</p></td><td class="cell"><p>1.283</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p>a share</p></td><td class="cell"><p>3</p></td><td class="cell"><p>1082</p></td><td class="cell"><p></p></td><td class="cell"><p>7</p></td><td class="cell"><p>60436</p></td><td class="cell"><p>6.50</p></td><td class="cell"><p>1.107</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td></tr></table><p>The chart attribute in the value is a serialised version of the chart which can be unserialised at some later point for reuse. The occurrence counter is incremented each time an occurrence of a key is seen in the parsed training data. A record is also kept in the database for the number of times a particular n-gram was seen forming a non-constituent, for use in the filtering stage discussed in later Section 6.4.</p><p>This process of n-gram chart serialisation is illus­trated in Figure 3. When parsing the sentence A B C D E, the trigram B C D formed a constituent in the spanning analysis for the sentence. Because it formed a constituent, the trigram is added to the first stage trigram database.</p></subsection><subsection number="6.4" title="Frequency Reduction"><p>When constructing the initial set of databases over a body of text, a large number of the n-grams which were memoised should not be kept in the fi­nal databases because they occur too infrequently, or because the number of times they are seen forming a non-constituent outweighs the number of times they are seen forming a constituent. As such, a frequency based filtering stage is performed on the initial set of databases to produce the final database.</p><doubt alpha="50.0" length="24" tooSmall="False" monospace="0.0">V^r"&lt;X(1)m =arg maxCk(2)</doubt><doubt alpha="100.0" length="1" tooSmall="False" monospace="0.0">k</doubt><doubt alpha="53.3" length="15" tooSmall="False" monospace="0.0">(ekCk)~m&lt;xa(3)m</doubt><p>An n-gram was chosen to be filtered out differ­ently depending on whether or not it was seen form­ing a non-constituent during the database develop­ment phase. Equations 1 and 3 describe the predi­cates which need to be fulfilled in order for a par­ticular n-gram not to be filtered out. In these in­equalities, C is a mapping from chart structure to frequency count for the current n-gram, the 0th in­dex into C is the non-constituent-forming frequency count, and X and Y are parameters to the filtering process.</p><p>If an n-gram was seen forming a non-constituent during the initial database development phase, then Equation 1 is used. If an n-gram was never seen</p><p>Figure 4: Illustration of using the n-gram databases. The trigram B C D is loaded from the pre-constructed database, and blocks out the corresponding cells</p><p>forming a non-constituent during the development phase, then Equation 3 is used.</p><p>The values given to the X and Y parameters in the filtering process were determined through a trial and error process, training on sections 02 to 21 and testing on section 00 of the noun phrase corrected CCGbank. For all of our results, X was set to 0.05 and Y was set to 15.</p></subsection><subsection number="6.5" title="Using the n -gram Databases"><p>Once the n-gram database has been constructed, it is used when parsing sentences in the future. For every sentence that is parsed, the parser checks to see if any n-gram contained within the current sen­tence exists within the database, and if so, uses the memoised analysis for the n-gram. This process is illustrated in Figure 4.</p><p>This n-gram check is performed by iterating top to bottom, left to right through the chart for the cur­rent sentence. A consequence of this is that if two n-grams overlap and both exist in the database, then only the first n-gram encountered will have its anal­yses loaded in from the database. Once the analyses are loaded into the current chart for the n-gram, the corresponding cells in the current chart are blocked off from further use in the parse tree creation process (CKY), as illustrated in Figure 4. It is due to this cell blocking that the pre-constructed charts for the 2nd overlapping n-gram are not also loaded.</p><page local="8" global="78"/><p>Table 4: The speed versus performance trade-off for vary­ing sized n-grams evaluated on CCGbank 00 using dif­ferent parsing models. The evaluation attributes are parse time (s), labelled and unlabelled F-score (%), and per­centage of sentences covered</p></subsection></section><section number="7" title="Results"><p>A set of experiments were conducted using CCG­bank sections 02 to 21 as the corpus for developing our database. This corpus was parsed using a va­riety of statistical parsing models. Section 00 was then used for evaluation. Table 4 shows our pre­liminary results. The first two parsing models used were trained on the original CCGbank (WSJ derivs and hybrid), and the second two models were trained on the noun phrase corrected CCGbank corpus de­scribed in Vadas and Curran (2008) (NP derivs and hybrid). The databases used to obtain these results contained only constituent-forming n-grams.</p><p>These results show a non-significant change in speed nor F-score. One positive aspect of this non­significant change is that performance did not de­crease even though additional computation is needed to perform our database lookups and chart insertion. The C&amp;C parser is already very fast, and the amount of time taken to perform the chart loading and inser­tion from the databases happens to be very similar to the time taken to construct the derivations from scratch.</p><p>Another experiment was then performed in or­der to assess the potential of using non-constituent-</p><p>Table 5: Memoised structures were constructed for the most frequent derivations for varying non-constituent-forming bigrams, which were then used and evaluated againstsection 00 ofthe noun-phrasecorrectedCCGbank</p><p>forming n-grams for memoisation. The bigrams of the and in the are the two most frequently occurring non-constituent-forming bigrams in CCG-bank sections 02 to 21. In order to assess the viabil­ity of using non-constituents in our database, our ex­periments here used only the most frequently occur­ring analyses for these two bigrams. If no improve­ment in performance is observed using the most fre­quently occurring bigrams, then the idea is not worth pursuing further.</p><p>The results of these experiments can be seen in Table 5. As was the case in our constituent-forming experiment, no significant change in performance was achieved; positive or negative.</p></section><section number="8" title="Conclusion"><p>Through the analysis of this one structure per n-gram idea using CCG, combined with a preliminary set of empirical results, we have shown that memo-ising parse structures based on frequently occurring n-grams does not result in any form of performance improvement.</p></section><section number="9" title="Acknowledgments"><p>We would like to thank the anonymous reviewers for their useful feedback. This work was partially sup­ported by the Capital Markets Cooperative Research Centre Limited. Aspects of this work were carried out as part of the Summer Research Workshop on Machine Learning for Language Engineering at the Center for Language and Speech Processing, Johns Hopkins University.</p><table class="main" frame="box" rules="all" border="0" regular="False"><tr class="row"><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p>Model</p></td><td class="cell"><p>Baseline</p></td><td class="cell"><p>2-gram</p></td><td class="cell"><p>3-gram</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p></p></td><td class="cell"><p>Time</p></td><td class="cell"><p>82.8</p></td><td class="cell"><p>82.8</p></td><td class="cell"><p>82.6</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p>WSJ</p></td><td class="cell"><p>LF</p></td><td class="cell"><p>85.26</p></td><td class="cell"><p>85.26</p></td><td class="cell"><p>85.26</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p>derivs</p></td><td class="cell"><p>UF</p></td><td class="cell"><p>92.01</p></td><td class="cell"><p>92.01</p></td><td class="cell"><p>92.01</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p></p></td><td class="cell"><p>Cov</p></td><td class="cell"><p>98.64</p></td><td class="cell"><p>98.64</p></td><td class="cell"><p>98.64</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p></p></td><td class="cell"><p>Time</p></td><td class="cell"><p>84.1</p></td><td class="cell"><p>83.8</p></td><td class="cell"><p>83.9</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p>WSJ</p></td><td class="cell"><p>LF</p></td><td class="cell"><p>87.40</p></td><td class="cell"><p>87.40</p></td><td class="cell"><p>87.40</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p>hybrid</p></td><td class="cell"><p>UF</p></td><td class="cell"><p>93.10</p></td><td class="cell"><p>93.10</p></td><td class="cell"><p>93.10</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p></p></td><td class="cell"><p>Cov</p></td><td class="cell"><p>98.64</p></td><td class="cell"><p>98.64</p></td><td class="cell"><p>98.64</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p></p></td><td class="cell"><p>Time</p></td><td class="cell"><p>84.1</p></td><td class="cell"><p>84.0</p></td><td class="cell"><p>84.3</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p>NP</p></td><td class="cell"><p>LF</p></td><td class="cell"><p>83.60</p></td><td class="cell"><p>83.60</p></td><td class="cell"><p>83.60</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p>derivs</p></td><td class="cell"><p>UF</p></td><td class="cell"><p>90.48</p></td><td class="cell"><p>90.48</p></td><td class="cell"><p>90.48</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p></p></td><td class="cell"><p>Cov</p></td><td class="cell"><p>98.54</p></td><td class="cell"><p>98.54</p></td><td class="cell"><p>98.54</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p></p></td><td class="cell"><p>Time</p></td><td class="cell"><p>84.8</p></td><td class="cell"><p>84.9</p></td><td class="cell"><p>85.3</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p>NP</p></td><td class="cell"><p>LF</p></td><td class="cell"><p>85.88</p></td><td class="cell"><p>85.88</p></td><td class="cell"><p>85.88</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p>hybrid</p></td><td class="cell"><p>UF</p></td><td class="cell"><p>91.63</p></td><td class="cell"><p>91.63</p></td><td class="cell"><p>91.63</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p></p></td><td class="cell"><p>Cov</p></td><td class="cell"><p>98.54</p></td><td class="cell"><p>98.54</p></td><td class="cell"><p>98.54</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td></tr></table><table class="main" frame="box" rules="all" border="1" regular="False"><tr class="row"><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p></p></td><td class="cell"><p>Baseline</p></td><td class="cell"><p>of the</p></td><td class="cell"><p>in the</p></td><td class="cell"><p>Combined</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p>Time</p></td><td class="cell"><p>67.2</p></td><td class="cell"><p>67.0</p></td><td class="cell"><p>65.8</p></td><td class="cell"><p>66.0</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p>LF</p></td><td class="cell"><p>87.58</p></td><td class="cell"><p>87.30</p></td><td class="cell"><p>87.30</p></td><td class="cell"><p>87.24</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p>UF</p></td><td class="cell"><p>93.14</p></td><td class="cell"><p>92.86</p></td><td class="cell"><p>92.89</p></td><td class="cell"><p>82.83</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p>Cov</p></td><td class="cell"><p>94.30</p></td><td class="cell"><p>94.30</p></td><td class="cell"><p>84.41</p></td><td class="cell"><p>84.30</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td></tr></table></section><references><p>Srinivas Bangalore and Aravind K. Joshi.  1999. Su-pertagging: an approach to almost parsing. <i>Compu-</i> <i>tational Linguistics, </i>25(2):<page local="9" global="79"/>237-265.</p><p>Stephen Clark and James R. Curran. 2004. Parsing the WSJ using CCG and log-linear models. In <i>Proceed­ings of the 42nd Meeting of the Association for Com­putational Linguistics, Main Volume, </i>pages 103-110, Barcelona, Spain, July.</p><p>Stephen Clark and James R. Curran. 2007. Wide-coverage efficient statistical parsing with CCG and log-linear models.       <i>Computational Linguistics,</i> 33(4):493-552.</p><p>Stephen Clark and Julia Hockenmaier. 2002. Evaluat­ing a wide-coverage CCG parser. In <i>Proceedings of the LREC Workshop on Beyond Parseval, </i>pages 60­66, Las Palmas, Spain.</p><p>Jason Eisner. 1996. Efficient normal-form parsing for combinatory categorical grammar. In <i>Proceedings of the 34th annual meeting on Association for Compu­tational Linguistics, </i>pages 79-86, Morristown, NJ, USA. Association for Computational Linguistics.</p><p>Julia Hockenmaier and Mark Steedman. 2007. CCG-Bank: A corpus of CCG derivations and dependency structures extracted from the penn treebank. <i>Compu­tational Linguistics, </i>33(3):355-396.</p><p>Julia Hockenmaier. 2003. <i>Data and Models for Statisti­cal Parsing with Combinatory Categorical Grammar. </i>Ph.D. thesis, University of Edinburgh.</p><p>Ronald M. Kaplan, Stefan Riezler, Tracy H. King, John T. Maxwell III, and Er Vasserman. 2004. Speed and accuracy in shallow and deep stochastic pars­ing. In <i>Proceedings of HLT-NAACL04, </i>pages 97­104, Boston, Massachusetts, USA, May. Association for Computational Linguistics.</p><p>Mitchell P. Marcus, Mary Ann Marcinkiewicz, and Beat­rice Santorini. 1993. Building a large annotated cor­pus of English: The Penn Treebank. <i>Computational Linguistics, </i>19(2):313-330.</p><p>Mark Steedman. 2000. <i>The Syntactic Process. </i>MIT Press, Cambridge, MA.</p><p>David Vadas and James R. Curran. 2008. Parsing noun phrase structure with CCG. In <i>Proceedings of the 46th Meeting of the Association for Computational Lin­guists: HLT, </i>pages 335-343, Columbus, Ohio, June. Association for Computational Linguistics.</p><p>David Vadas. 2009. <i>Statistical Parsing ofNoun Phrase Structure. </i>Ph.D. thesis, University of Sydney.</p><p>D Younger. 1967. Recognition and parsing of context-free languages in time n<footnote anchor="3"/>. <i>Information and Control,</i> 10(2):189-208.</p></references></body></article>