Keep it Surprisingly Simple: A Simple First Order Graph Based Parsing Model for Joint Morphosyntactic Parsing in S anskrit (2020)

Abstract: Morphologically rich languages seem to benefit from joint processing of morphology and syntax, as compared to pipeline architectures. We propose a graph-based model for joint morphological parsing and dependency parsing in Sanskrit. Here, we extend the Energy based model framework (Krishna et al., 2020), proposed for several structured prediction tasks in Sanskrit, in 2 simple yet significant ways. First, the framework’s default input graph generation method is modified to generate a multigraph, which enables the use of an exact search inference. Second, we prune the input search space using a linguistically motivated approach, rooted in the traditional grammatical analysis of Sanskrit. Our experiments show that the morphological parsing from our joint model outperforms standalone morphological parsers. We report state of the art results in morphological parsing, and in dependency parsing, both in standalone (with gold morphological tags) and joint morphosyntactic parsing setting.

## introduction morphology and syntax are often inextricably intertwined for morphologically rich languages (mrls). for such languages, it might be unrealistic to design dependency parsers that expect correct morphological tags to be provided as input @xcite . jointly modelling morphological parsing (mp) with dependency parsing (dp) has shown to be effective for several @xcite . in this work, we present multigraph-ebm (mg-ebm), a joint model for morphosyntactic parsing, i.e. joint mp and dp, in sanskrit. morphosyntactic parsing has been successfully applied to several mrls. @xcite proposed a transition based joint parser, extending the * work done while at iit kharagpur joint pos tagger and dependency parser of @xcite . similarly @xcite proposed a joint graph based parser for turkish. here, two different models, one predicting a morphological path and the other a dependency tree, are made to reach an agreement using dual decomposition. @xcite proposed a transition based joint parser for hebrew, where it aims to maximise a global score over both morphological and dependency transitions. sanskrit is an mrl which shows high degree of syncretism and homonymy in its morphological paradigm. about 90.96 % of the tokens in a dataset of 115,000 sanskrit sentences @xcite show syncretism with an average of 3.62 morphological tags per token. morphological features, especially case, are indicative of the syntactic roles that a word (nominal) can assume in a sentence. the interplay of morphological markers and syntactic roles has been formalised in the traditional grammatical analysis of sanskrit, ashtādhyāyī (pān . ini, 500 bce; @xcite . here, the joint modelling of syntactic and morphological information can help disambiguate each other @xcite . in mg-ebm, we use this information to prune the input search space. @xcite proposed an energy basedmodel (ebm) framework for multiple structured prediction tasks in sanskrit. for all the models under ebm, the input search space is a graph which considers every unique morphological analysis of the input words to be a separate node (figure 1a ). modeling morphosyntactic parsing over this input graph requires an approximation algorithm for inference as it needs to predict a structure containing only a subset of the nodes. we propose to modify the input space to be a multigraph where the number of nodes correspond to the number of tokens in a sentence. this enables us to use an exact search inference @xcite akin to the first order dependency parsing model of @xcite . mg-ebm achieves state of the art results (sota), improving the previous best results by 3 f-score points for mp and 2 uas points for standalone dp (expects gold morph tags as input). we set new sota results for joint mp and dp. further, we demonstrate that mp results obtained from our joint model outperforms standalone mp models. our proposed pruning approach in itself report an improvement of 6 f-score (2 uas) points with the original ebm configuration for mp (dp), and a further 2 f-score (2 uas) points improvement with the multigraph formulation for mp (dp). the framework uses an automated feature learning approach @xcite to generate a feature function consisting of 850 features. using this feature set the framework achieves state of the art (sota) results in several tasks. this is significant, given several morphologically rich languages still rely on models that use hand-crafted features for sota results @xcite . given the models are arc-factored, the edges are featurised. a feature would consider only one entity each from either of the nodes in the edge. the feature then calculates the distributional information between these entities conditioned on some specific morphological constraint. the type of the entities and the constraints, which constitute the features, are automatically learned as typed paths over a large morphologically tagged corpus. while the training and the feature function remain the same for all the tasks under the framework, the inference is task specific. it searches for a spanning tree with minimum energy @xcite for dp. for tasks that require prediction of a subset of nodes from the input graph, such as ws and mp, and standalone mp, approximation algorithms were used for inference. here the inference procedure searches for only a small percentage of all the possible candidates (< 1%) @xcite . ## mg-ebm: the proposed model multigraph-ebm (mg-ebm) extends the ebm framework in two simple yet significant ways. multigraph formulation: instead of the 'one node per unique morphological analysis', as shown in figure 1a , we propose to use a 'one node per inflected surface-form' multigraph representation, as shown in figure 1b . for instance, the surface form śriyah . , due to syncretism, has 2 possible morphological analyses m1 and m2. in figure 1a , these analyses are represented as separate nodes and are connected to the only analysis of patih . via the edges e and g. in figure 1b , the cases of syncretism for śriyah . are merged as a single node, though the edges e and g to patih . are retained. this leads to a multigraph formulation. 2 the new representation retains all the edges, and their feature vectors, present in the original representation. the design of our feature function guarantees that every edge will have a unique feature vector. with this formulation, we simplify the search problem for the joint mp and dp task to that of searching for the spanning tree with minimum energy. this enables the use of the exact search edmonds-chu-liu mst algorithm @xcite , rather than an approximation algorithm, for inference. it is straightforward to extend the algorithm to multigraph, as we just need to retain only the minimum energy edge and prune out all the other edges between a pair of nodes in the input graph @xcite . linguistically motivated pruning: linguistic constraints based on the traditional grammatical analysis and verbal cognition in sanskrit @xcite have been previously employed in various deterministic dependency parsers for sanskrit @xcite @xcite . we use these constraints to prune the edges in our input graph. during pruning, we first exhaustively enumerate all the unlabelled directed spanning-trees in the input graph using @xcite . 3 for each such tree, if every directed-edge in the spanning-tree can be kartā karma karaṇam sampradānam apadāna adhikaraṇa prayojanam tādarthyam hetu ṣ aṣ ṭ hisambṇ nirdhāraṇ am dependency relations nom. acc. inst. dat. abl. gen. loc case figure 2: case information and possible dependency relations that a case is indicative of. finally, all the edges which are not part of even one valid candidate-tree will be pruned from the input graph. this pruned unlabelled directed graph serves as the input for the inference procedure. this linguistically informed pruning can at best be seen as a rule-based deterministic delexicalised dependency parsing, which considers information only from the morphological tags. morphology can signal dependency in various ways. the morphological marker of a word may not only index the properties of the word itself, but it may also index the agreement between its head or dependants @xcite . the agreement between the subject and verb in terms of the number and person respectively is one such case. similarly, the case, number, and gender agreement between the words in an adjectival modifier (viśes . an . a) relation is another example of this in sanskrit. further, morphological markers are indicative not only of the presence of syntactic dependency between the words in a sentence, but also of the type of the syntactic dependency shared between them @xcite . in sanskrit, the case information of a nominal narrows down the possible relations it can have with a verb as the head. this is shown in figure 2 . we form constraints based on these morphosyntactic information and use it for pruning the edges. 4 the dependency relations shown in figure 2 are tem followed for sanskrit (pān . ini, 500 bce). the use of the relations from the pān . inian grammar, instead of other dependency tagsets such as universal dependencies @xcite , enables us to incorporate the linguistic constraints for the pruning. ## experimental framework systems: for dp, with gold morphology tags as input, we compare the performance of mg-ebm with 5 other parsers. the models are yap @xcite : a transition based parser for mrls, biaff @xcite : a neural biaffine classifier, dcst @xcite : a self-training based neural classifier, and two variants of ebm: t-ebm and t-ebm*. for mp, we use the current sota model, c-ebm, an ebm variant as the baseline. the ebm variants and the impact of these variations would be elaborated in section 5. for the joint morphosyntactic setting, we propose dcst++ as a neural baseline. dcst++ is our augmentation over dcst which integrates encoder outputs from a neural morphological tagger @xcite ) by a gating mechanism @xcite . 5 metric: all the results we report are macro averaged at a sentence level. for dp, we use uas and las and for mp, we use f-score. for joint mp and dp, all the ebm models other than mg-ebm may predict a tree that has a different vertex set than that of the ground truth. since uas cannot be used here, we use (unlabelled and labelled) f-score for those systems. for mg-ebm uas/las and unlabelled/labelled f-score would be the same. dataset foot_5 : we use a test set of 1,300 sentences, where 1,000 come from the sanskrit tree bank corpus @xcite and 300 from sisupāla-vadha, a work from classical sanskrit poetry @xcite . 1,500 and 1,000 sentences from stbc, other than the ones in test data, were used as the training and validation data respectively for dcst, dcst++, and biaff. however all the ebm models and yap were trained on 12,320 sentences obtained by augmenting the training data in stbc @xcite , §4.1). foot_6 mg-ebm achieves the state of the art (sota) results in mp and in dp, both in standalone (with gold morphological tags as input) and joint morphosyntactic parsing setting. ## conclusion in this work, we proposed mg-ebm, a model for joint morphological parsing and dp in sanskrit. it extends the ebm framework from @xcite by 1) incorporating a linguistically motivated pruning approach resulting in a substantial reduction in the input search space, and 2) modifying the input graph formation to a multigraph resulting in the use of @xcite , an exact search algorithm, as inference. while the multigraph formulation is language agnostic the linguistically motivated pruning is rooted on the grammatical tradition of sanskrit. experiments validate that the joint morphosyntacticparsing hypothesis, i.e., morphological information can benefit syntactic disambiguation and vice versa @xcite , holds true for sanskrit. we find that the mg-ebm reports state of the art results (sota) for morphological parsing, outperforming standalone morphological parsing models, similar to what is observed for hebrew @xcite . further, all the joint morphological parsing and dp variants of ebm, we experimented here, result in a superior performance than the pipeline morphological parsing and dp ebm model. we also establish sota results in sanskrit for dp, both in standalone and joint setting.