Visualising Linguistic Pathways for Computational Construction Grammar.
Sébastien Hoorens, Katrien Beuls and Paul Van Eecke
This web demo accompanies the paper: S. Hoorens, K. Beuls, and P. Van Eecke (2017). Constructions at Work! Visualising Linguistic Pathways for Computational Construction Grammar. Proceedings of the 29th Benelux Conference on Artificial Intelligence (BNAIC 2017). Submitted.
Computational construction grammar combines well known concepts from artificial intelligence, linguistics and computer science into fully operational language processing models. These models allow to map an utterance to its meaning representation (comprehension), as well as to map a meaning representation to an utterance (formulation). The processing machinery is based on the unification of usage-patterns that combine morpho-syntactic and semantic information (constructions) with intermediate structures that contain all information that is known at a certain point in processing (transient structures). Language processing is then implemented as a search process, which searches for a sequence of constructions (a linguistic pathway) that successfully transforms an initial transient structure containing the input into a transient structure that qualifies as a goal. For larger grammars, these linguistic pathways become increasingly more complex, which makes them difficult to interpret and debug for the human researcher. In order to accommodate this problem, we present a novel approach to visualising the outcome of constructional language processing. The linguistic pathways are visualised as graphs featuring the applied constructions, why they could apply, with which bindings, and what information they have added. The visualisation tool is concretely implemented for Fluid Construction Grammar, but is also of interest to other flavours of computational construction grammar, as well as more generally to other unification-based search problems of high complexity.
2. Linguistic Pathways in the Web Interface
We can enable the visualisation for constructional dependencies in the web interface by writing (set-configuration (visualization-configuration *fcg-constructions*) :show-constructional-dependencies t). When hovering over some of the elements in the visualisation, information about the bindings is shown in a tooltip. This is what we get when we comprehend "the cat will jump" with the English grammar:
Comprehending "the cat will jump"
Applying a large FCG CONSTRUCTION SET (37269) in comprehension
The constructional dependencies graph contains 17 blue node clusters, one for each construc- tion that has been applied. On the left side of the graph, we can see that there are four entry points, i.e. node clusters with no incoming edges. The comprehension locks of these four con- structions, jump-morph, will-morph, the and determiner-operation-cxn, only require strings that are found in the input utterance and do not need any features added by previous construction applications. They create one lexical unit each, which is shown on a green background. After the the construction has applied and created a ?definite-article unit, the determiner-operation- cxn can match its ?determiner unit on this unit and create a new ?np unit. The cat-noun-lex and jump constructions can respectively match on the units created by the jump-morph and cat-noun-morph constructions, adding information to these units, but not creating any new ones.
Then, we can see that the lexical units for the modal auxiliary and the lexical main verb are both affected by the marked-modality-cxn, which creates a new ?vp unit. This ?vp unit is then modified by the vp-cxn, non-perfect-cxn and the non-progressive-cxn. The determinednoun-cxn adds information into lexical units for the noun and the definite article, as well as to the ?np unit. The lexical unit for the noun is further affected by the singular-cxn.
After that, the subject and verb come together. The subject-verb-cxn matches on the ?np and ?vp units, and creates a new ?clause unit. These three units are then further extended by the declarative-main-clause-verb-cxn and the intrasitive-cxn.
The visualisation also works for formulation. When formulating "the lazy cat", we get the following trace:
Formulating
Applying a large FCG CONSTRUCTION SET (37269) in formulation
There are three options through which the visualisation can be customized: :labeled-paths, :colored-paths and :trace-units. These options can be set in the same manner as we did for :show-constructional-dependencies. When setting :colored-paths on and setting :labeled-paths to show the full edge labels, we obtain the following figure for comprehension of "the cat":
Below is another example in which :labeled-paths and :colored-paths have been disabled, and :trace-units has been set to '("?VP"), for comprehension of "the cat will jump":
4. Beyond Language Processing
Finally, we can also visualise the constructional dependencies that occur during planning. Here is the figure we get for planning with the pancake grammar, setting :labeled-paths to 'no-bindings:
We can see that in total, 11 actions have been performed to make the pancakes. 7 actions were take-... actions that could be independently performed based on the initial state. Then, a collect-pancakes-ingredients action matched on the ?flour, ?eggs and ?milk units, creating a new ?pancake-ingredients unit. The make-pancake-dough action then matched on the ?pancake- ingredients, ?whisk and ?bowl units and created a new ?pancake-dough unit. The prepare-pan action matches on the ?pan, ?butter and ?stove units and creates a new ?prepared-pan unit. Finally, the make-pancakes action matches on the ?prepared-pan unit and the pancake-dough unit and creates a new pancakes unit. The arrows are labelled with the features on which the actions match, and the bindings of these features. When looking at the make-pancakes action for example, we can see that it matches on a ?pancake-dough unit that does not have baked among its properties (marked in red in the figure). The make-pancakes construction will add baked to the properties of this unit, and indeed, pancake dough can only be baked a single time.