Difficulties in Handling Mathematical Expressions in U niversal D ependencies (2023)

Abstract: In this paper, we give a brief survey of the difficulties in handling the syntax of mathematical expressions in Universal Dependencies, focusing on examples from English language corpora. We first examine the prevalence and current handling of mathematical expressions in UD corpora. We then examine several strategies for how to approach the handling of syntactic dependencies for such expressions: as multi-word expressions, as a domain appropriate for code-switching, or as approximate to other types of natural language. Ultimately, we argue that mathematical expressions should primarily be analyzed as natural language, and we offer recommendations for the treatment of basic mathematical expressions as analogous to English natural language.

## introduction universal dependencies (ud, @xcite @xcite ) is a project that aims to develop cross-linguistically consistent guidelines for multiple annotation layers, including syntactic dependency relations. mathematical and numerical expressions comprise a particularly challenging class of cases, which require special attention to handle. thus far, work on how to handle numerical expressions in ud has included analysis on annotating date and time cross-linguistically @xcite , discussion of numbered entities in nominal expressions @xcite , and discussion of different types of numeral related expressions in ud corpora of uralic languages @xcite . however, there has been little discussion of how mathematical expressions, such as equations and other language which includes mathematical symbols and operators, should be handled in ud. as mathematical expressions are likely to appear as little more than edge cases in many corpus gen-res, this is understandable, but mathematical expressions can also feature prominently in corpora related to academic and scientific domains, such as the acl anthology corpus @xcite and the academic section of the corpus of contemporary american english (coca) @xcite . unfortunately, the amount of corpora built for technical domains is limited, and the specialized nature of the language in such corpora has been a barrier in annotating them with more complex schemas, such as dependency relations. this means that there is a large gap in availability for annotated texts containing mathematical expressions that can be leveraged by nlp systems. 1 as a result, technical texts with mathematical expressions can be viewed as a low-resource domain, and state-of-the-art systems trained on standard language will inevitably face a large drop in performance when handling such out of domain texts @xcite . this is particularly an issue for real world applications of nlp technologies in technical domains, such as text mining or document processing in industrial engineering, where copious amounts of technical documents are generated by industry systems @xcite . pushing for the annotation of domain specific technical corpora will help to address this gap and provide more resources for nlp systems attempting to handle technical language. this will first require discussions on how to handle the annotation of such technical language, including standards for the handling of mathematical expressions. in this paper, we will first examine the current state of mathematical expressions in ud corpora, and then we will consider several possible approaches for handling such expressions. we will then give recommendations on how to handle the dependency relations for basic mathematical expressions, which we hope will encourage the inclusion of more mathematical texts in future annotation work. it should be noted that while many arguments about syntactic analysis of mathematical expressions apply cross-linguistically, the focus of this paper is on mathematical expressions in english corpora, as mathematical english is the basis of most academic and professional stem discourse, making it a logical place to start. ## prevalence and existing treatment of mathematical expressions in ud data in this section we will examine the prevalence of mathematical expressions in universal dependencies corpora (version 2.11), foot_1 as well as the distribution of dependency relations used to handle such expressions. we will also compare the prevalence of mathematical expressions in ud corpora with the prevalence of mathematical expressions in a subsection of the acl anthology corpus, illustrating that expanding ud coverage more broadly into academic and technical domains would require a meaningful treatment of such expressions. ## approaches for handling mathematical expressions now that we've examined several examples of the types of mathematical expressions that can appear in scientific and academically oriented corpora, we will discuss various approaches we can take to analyze these expressions with dependency relations. ## preliminary recommendations for analysis of mathematical operators as natural language in this section we offer some brief guidelines on how to treat mathematical operators as analogous to english natural language in the application of dependency relations. as previously shown in figure 2 , mathematical operators present in ud corpora are primarily those for basic arithmetic, predicate relations, and parentheses. as such, these operators will be the focus of our recommendations. since functions are a fundamental means of expressing relations in mathematics, we also give brief recommendations for the treatment of function application. in these guidelines, we follow the view put forward by schneider and zeldes, 2021 that the relation nummod should be strictly used for quantity modification, as opposed to being a more general modifier to be used in any situation involving numbers. as such, we generally treat free standing numbers in mathematical expressions (e.g., "4" in "x + 4") syntactically the same as we treat variables like "x": as nominal terms. if we want to handle mathematical operators in a manner analogous to handling natural language, we may start by considering how the operators would be realized in spoken language. the predicate operator "=" is pronounced as the verb "equals" in spoken language, and it seems reasonable to treat "=" similarly. as discussed in section 3.2, the verb "equals", is generally analyzed with arguments taking the nsubj relation and the xcomp relation. an example of such an analysis is shown below in (1) for the expression "@xmath0: similarly, we may consider that "<" is generally pronounced as "less than" when spoken aloud. however, we must additionally take into account that the natural language context surrounding the operator will influence what syntactic analysis we want to apply to it. for instance, in the example "let us consider @xmath1, "@xmath2. in this example, we can analyze "< 5" as an adnominal clause headed by "5". the clause then functions as a modifier to the leftmost term "x", and we give its head the relation acl. "<" is then an extent modifer for the nominal term "5", so we give it the relation obl. the analysis for this example is shown in (2) below: we may also consider the example "we will prove that @xmath3, where "@xmath4. in this instance, "<" must be the predicate and serve as the head of "@xmath5. it follows that we may treat "x" as the nsubj of the predicate, and because the predicate relation is that of a comparative adjective, we may treat "5" as an obl argument to "<". the analysis for this example is shown in (3) below: the ">" operator can be analyzed in a manner analogous to the above examples. next, we will consider the operators for the mathematical operations of addition ("+"), subtraction ("-"), multiplication ("*"), and division ("/"). it is worth noting here that some of these operations may be represented in multiple forms, not all of which will have the same syntactic analysis (e.g., in mathematical expressions, multiplication can be implied by the adjacency of terms, as well as by the use of the "*" or "x" operators). we primarily consider these operations to be conjoining relations, and as such, we link the terms to the left and right of the operator with the conj relation, and the operator itself can be labeled with the cc relation. an example of this analysis is shown in (4) for the expression "x + y": in contrast, consider the expression "( 8 -6 ) / 2", which used parentheses to force the subtraction to occur first so the expression evaluates to 1 rather than 5. we can express this difference by making "2" a dependent of "8" rather than "6". the added parentheses are treated as punctuation to the head. this analysis is show below: as previously mentioned, multiplication can be implied by the adjacency of terms, and in such cases, there is no operator to assign the cc relation. even so, if it is two adjacent variable terms (such as "xy"), we believe it is still appropriate to apply the relation conj. however, if it is a coef-ficient adjacent to a variable, as in "2x", then we believe the coefficient can be treated as nummod to the variable. this is because "2x" (pronounced "two x") is generally interpreted as quantity modification on the number of "x", similar to how "5 bottles" is quantity modification on the number of bottles. while in this section we have treated basic mathematical operators as conjoining relations, we also note that it is possible to view them as instances of more general function application (for which we offer a recommended treatment in the next section). while this is reasonable from a semantic perspective, we believe that in the formulation of mathematical expressions the verbalizations of these basic operators typically occupy syntactic positions more similar to natural language conjunctions (which themselves could be modeled as simple functions if desired), and as such can be handled using the conj and cc relations in most instances. ## conclusion in this paper, we gave an high level overview of the current treatment of mathematical expressions in ud corpora, and considered various difficulties that arise when attempting to handle mathematical expressions with dependency relations by examining different types expressions attested in corpora related to academic and scientific domains. we argued that in most cases mathematical expressions should be treated in a manner analogous to natural language, rather than being treated as multi-word expressions with minimal internal structure, or as instances of an entirely separate "language" that would be handled via code-switching. as a part of this argument, we provided guidelines for using dependency relations to analyze basic mathematical expressions as natural language. the main purpose of this paper is to raise awareness of the problems presented by mathematical expressions, and present various alternative philosophies for how to address them. we also wish to highlight the current lack of ud resources containing mathematical and technical texts. we believe that the adoption of the philosophy to treat mathematical expressions as natural language and the further development of such guidelines will help to facilitate the inclusion of such technical texts in future ud corpora and expand the resources available for the under resourced domain of technical language.