| { |
| "paper_id": "A97-1023", |
| "header": { |
| "generated_with": "S2ORC 1.0.0", |
| "date_generated": "2023-01-19T02:14:14.748098Z" |
| }, |
| "title": "Techniques for Accelerating a Grammar-Checker", |
| "authors": [ |
| { |
| "first": "Karel", |
| "middle": [ |
| "Oliva" |
| ], |
| "last": "Computa", |
| "suffix": "", |
| "affiliation": { |
| "laboratory": "", |
| "institution": "Linguistics University of Saa", |
| "location": { |
| "addrLine": "rla,nd Postfach 15 11 50 D -66 041 Sa" |
| } |
| }, |
| "email": "" |
| } |
| ], |
| "year": "", |
| "venue": null, |
| "identifiers": {}, |
| "abstract": "The paper describes several possibilities of using finite-state automata a~s means for speeding up the performance of a grammarand-parsing-based (as opposed to patternmatching-based) grammar-checker able to detect errors from a predefined set. The ideas contained have been successflfily implemented in a grammar-checker for Czech, a free-word-order language from the Slavic group.", |
| "pdf_parse": { |
| "paper_id": "A97-1023", |
| "_pdf_hash": "", |
| "abstract": [ |
| { |
| "text": "The paper describes several possibilities of using finite-state automata a~s means for speeding up the performance of a grammarand-parsing-based (as opposed to patternmatching-based) grammar-checker able to detect errors from a predefined set. The ideas contained have been successflfily implemented in a grammar-checker for Czech, a free-word-order language from the Slavic group.", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Abstract", |
| "sec_num": null |
| } |
| ], |
| "body_text": [ |
| { |
| "text": "This paper describes an efficiency-supporting tool for one of the two grarnmar-checker technologies developed in the fi'amework of the PECO2824 Joint Research Project sponsored by the European Union. The project, covering Bulgarian and Czech, two ti'eeword-order languages from the Slavic t~rnily, was performed between January 1993 and mid 1996 by a consortium consisting of both academic and industrial partners. The basic philosophy of the technology discussed in this paper 1 is that of linguistic-theoretically smmd grammar-and-parsing-based machinery able to detect, by constraint relaxation, errors from a predefined set (as opposed to pattern-matching approaches, which do not seem promising for a free word-order language). The core of the system (broad-coverage HPSG-based grammars of Bulgarian and Czech, and a single language-independent parser) was developed m the first three years of the project and was then passed to the industrial partners Bulgarian Business System IMC Sofia. and Macron Prague, Ltd. While the Bulgarian system remained in more or less a demonstrator stage only, the Czech one satisfied Macron's requirements as to syntactic coverage. However, Macron expressed serious worries about the speed of the system, should this be really introduced to the market. Following this, severa.1 possibili-IAs for the alterna.tive technology, cf. (Hola.n, Kubol't, a.ztd Pl/Ltek, 1997) ties of using finite-state automata (FSA) as means for speeding up the performance of the system were designed, developed and implemented, in particular:", |
| "cite_spans": [ |
| { |
| "start": 1367, |
| "end": 1405, |
| "text": "(Hola.n, Kubol't, a.ztd Pl/Ltek, 1997)", |
| "ref_id": null |
| } |
| ], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Introduction", |
| "sec_num": "1" |
| }, |
| { |
| "text": "\u2022 for detecting sentences where none of the predefined errors can occur (tiros ruling out such sentences from the procedure of error-search proper)", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Introduction", |
| "sec_num": "1" |
| }, |
| { |
| "text": "\u2022 for detecting which one(s) of tile predefined error types might possibly occur in a particular sentence (hence, cutting clown the search space of the error-search proper)", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Introduction", |
| "sec_num": "1" |
| }, |
| { |
| "text": "\u2022 for detecting errors which are of such a nature that their occurrence might be discovered by a machinery simpler than full-fledged parsing with constraint relaxation", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Introduction", |
| "sec_num": "1" |
| }, |
| { |
| "text": "\u2022 for splitting (certain cases of) complex sentences into independent clauses, a,llowing thus for the error-detection to be performed on short, er strings.", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Introduction", |
| "sec_num": "1" |
| }, |
| { |
| "text": "Very many of the errors to be discovered by the system can be traced down to mismatches of (vMues of) features projected into the synta.ctic structure from the lexicon. Even though the error searching capabilities of the systern are not lirnited m principle to these lexicMly induced errors, ibr a practicM implementation it turned out to be useful to narrow down the error search of the system to ahnost only these kinds of errors, fbr the following reasons: 1. the loss of generality of the system is in fact only minimM, since the majority of errors which the system is able to detect are of this nature anyway (the only exception being agreement errors revolving NPs with complicated internM structure, e.g., ellipses or coordina,tion) 2. this loss of error coverage (ahnost negligible tbr a real application) is outweighed by substa.ntim gain in overall (statistical) speed of the system, which is achieved by adding a preprocessing phase consisting of a finite state automaton pa,ssing through the input string and looking for a lexical trigger of a contingent error:", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Lexicalization of Error Search", |
| "sec_num": "2" |
| }, |
| { |
| "text": "\u2022 if this automaton does not find any such trigger, tile time-consurrfing grammarchecking process proper (i.e. parsing, possihly also reparsing with relaxed constraints) is not started at all and the sentence is iminediately marked as one containing no detectable error \u2022 if this automaton finds such a lexical trigger of an error, it. 'remelnbers' its nature so that in tile tbllowmg phases, only the respect,ive constrailltS are relaxed (which helps to cut down the search space, a.s compa.red to reparsing with relaxing of all predefined-errors-related constraints)", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Lexicalization of Error Search", |
| "sec_num": "2" |
| }, |
| { |
| "text": "As an example of this idea, let us consider a system deMing with errors in subject-verb agreement in Czech (and taking -for the very purpose of this example -detection of no other errors into account).", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Lexicalization of Error Search", |
| "sec_num": "2" |
| }, |
| { |
| "text": "Since the realistic pa.rt of such errors in Czech is the '-I/-Y' dichotomy on homophonic past tense verb endings occurring on plural verbs ('-I' ending sta.ndrag with l:)lural masculine animate subjects, '-Y ending with plural masculine inanimate and feminine subjects), the preprocessing finite-state automaton marks all sentences not conta.ining any of these forms (i.e. all sentences containing only singular verbs, or plural verbs but in present tense or in neuter gender, or infinite verb tbrms) as 'containing no detectable error', without any actual grammar-checking taking place (it is, however, obvious that this does not necessarily mea.n that the sentences are truly correctthey just do not contain the kind of error the system is able to detect).", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Lexicalization of Error Search", |
| "sec_num": "2" |
| }, |
| { |
| "text": "Alternative Error-Classification and Error Search by Finite Automata Another important step towards tile apl)lication of FSA to error-detection was developing a new dimension of cl~ussitication of errors to be detected: apart fi'om the lnore standard criteria of frequency a.nd lmrforlnance/conqmtence, we developed a scale based on the comI~lexit, y of the forlnal appara.tus needed for the detection of the particular error type (as for error typology developed for the purpose of the error detection techniques used in the l)roject, of. (l%odrignez Selles, GMvez, and Oliva, 1996)). On t, he one end of this sca.le were errors recognizable within a strictly local context, such as COmlnas missing in front of a certain kind of complementizers (subordinating conjunctions) or incorrect vocalization of a preposition (in both Bulgarian and C, zech, certain prepositions ending norlnally with a. consonant get, ~t supporting w)cal m case the word that follows them also starts with a. consonant -the parMlel in English would be the opt)osition between the two forms a and an of the indefinite article). On the other elm of the scale we put, e.g., the general case of subjectverb ~greement, errors. Pra.ctically lllOl'e imtn.~rtallt was tile question whether there exists a, (:lass of errors with complexity of detection lying between the \"trivial errors\" and the errors tor tile detection of which a fldl-fledged analysis is necessa.ry -in other words, the question whether there exist some errors for the recognition of which", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "3", |
| "sec_num": null |
| }, |
| { |
| "text": "\u2022 on the one hand, a limited local context is msuf ficient (i.e. it is necessa.ry tot this end to process a substring of length which ca.nnot be set in a.dvance, in generM the whole input string),", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "3", |
| "sec_num": null |
| }, |
| { |
| "text": "\u2022 on the other hand, it is not necessary t.o use the power of the fldl-fledged parser, al,d, in particular, it is sufficient to use the power of a finite state autolnaton or only slight augmenta.lion thereof.", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "3", |
| "sec_num": null |
| }, |
| { |
| "text": "Following some linguistic research, two such error types have been selected for implenlentation, and while one of thenr is just a lnarginal subtype of an error in subject-verb agreernent, the other is an error type of its own, and in addition one of really crucial importance tot practical gramma.r-checking due to its high frequency of occurrence. Tile forlner error to be detected by the l~init,e state machinery is a particular instance of an error where a plural masculine animate subject is conjoined with a verb in a phlrM feminine tbrm (el. also the example above). The idea of detecting some particular cases of this error by a finite state automaton results from the combination of the following observa.tions:", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "3", |
| "sec_num": null |
| }, |
| { |
| "text": "\u2022 the nominative plural forln of masculine animate nouns of the declension types pd'.. and pi'edse.da is not ambiguous (homonynmus) with any other case forms (apa.rt form vocative case, which we shall deal with innnediately below); this means that if such a. forn~ occurs in a sentence, then this forln ca.n be only -either a snbject, -or a nominal predicate (with copula) -or a colnparisoli to these, adjoined by means of the conjunctions jako, .'jako~to or cosy -or an excla.lnative expression (in nominative or vocative case)", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "3", |
| "sec_num": null |
| }, |
| { |
| "text": "\u2022 due to rules of Czech interl)unction, any exclanlative expression ha.s to be selm.ra.t, ed from the rest, of the sentence by COllllll~lb", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "3", |
| "sec_num": null |
| }, |
| { |
| "text": "\u2022 also, due to rules of Czech mt,erpunction, two finite verbs in Czech must be sepa.rated fi'oln each other by either a. comma, or by one of the following coordinating conjunctions: a., i and uebo Hence, if we buihl up a finite state am, oma.ton able to recognize the following substrings:", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "3", |
| "sec_num": null |
| }, |
| { |
| "text": "1. <unambiguous masculine a.nimate noun in nominative plural> followed by any string containing neither a finite verb [~,rm nor a. COlm-ne nor one of the conjunctions o, i and ~t, b,) fc>llowed by <unaml)igm,us 1,asl particii)le m plural feminine > or (due to free word order)", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "3", |
| "sec_num": null |
| }, |
| { |
| "text": "2. < unaml)iguoub past par ti<'iph-, in I)lura.l feminine> followed I)y a,ny string containing neither a tinite verb form nor a comma nor one of the conjunctions a, i, '..(bo followed by <unambiguous masculine animate noun in nominative plural> a,nd coml)ine it with a sin> ple automaton able to detect the absence of the words jako, jako2to and toby as well as the a.bsence of any finite torm of the copula b:\u00a2l ('to be') in the sentence, then we may conclude that we have built a device able to detect whether a sentence contains a particular instance of a subject-verb agreernent violation.", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "3", |
| "sec_num": null |
| }, |
| { |
| "text": "The det, e<'ti<m of the latter error is also based on the Czech interl)unct.ion rule prescribing that there alwa.ys lIlllSt, occllr a. (:onllna (it a coordina.ting conjunction between two finite verb forms. Hence, a simi)le finite state a./itolua.toll checking whether between any two finite verb f(~rllls a COllllna or a c()of dinating conjunction occurs is a.Me to detect ma.ny cases of the omission of a. co,tuna, a.t the end of an embedded subordinated clause, which is one of the most Dequent errors at all. (Of course, tile wordforms of the verb must be mmmbiguously identifia-Me as such -i.e. such tbrms as ~eu,., j~.d'u, lral.lm, holl etc., do not qualify due to their part of sl)eech ambiguity, which means that ill senten<'es containing them this stra.tegy cannot be used).", |
| "cite_spans": [ |
| { |
| "start": 621, |
| "end": 642, |
| "text": "j~.d'u, lral.lm, holl", |
| "ref_id": null |
| } |
| ], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "3", |
| "sec_num": null |
| }, |
| { |
| "text": "The last idea how to gain efficiency is that of splitting the sentence (if possible) into clauses before the processing, which has a two-fold positive effect on the overall process of grammar-checking: I. it. is less time consuming to parse two 'shorter' strings than one longer (a.ssmning that l)arsing is a.t least cubic in t, ime, this fl)llows trivially fronl the inequality A a+B a <A a+:C4 ~B+aAB=+B a =(A+B) a for A,B positive -length of strings)", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Using FSA for Splitting a Sentence into Clauses", |
| "sec_num": "4" |
| }, |
| { |
| "text": "2. it is possible to detect an error in one of the substrings (clauses) irrespective to the results of analysis of (any of) the other one(s); ill I>articular, also m ca.ses where a.t least one of them was not analyzed and, hence, also tile pa.rsing (including the pa.rsing with rela.xed constraints) of the whole input could not have I)een perforlned on the original st.ring, which would have hindered the error messa.ge pertinent to the substring successfully parsed during the parsing with constraint relaxation to be issued.", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Using FSA for Splitting a Sentence into Clauses", |
| "sec_num": "4" |
| }, |
| { |
| "text": "Ill particular, this means that measures are to be tbund which would allow for sl)litting the input sentence into clauses by purely superficial criteria. Obviously, this is not possible in a.ll cases (Ibr all sent-en<-es), but on tile ()tiler hand it is also clear that ill any language there exists a (statistically) huge subset of sentences of this language where such techniques are applicable. For Czech, such a.n al)proach might be iml)lemented using pattern matching techniques which wouht recognize for example the following patterns (and use them in an ol)vious way tbr splitting the sentence into clauses):", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Using FSA for Splitting a Sentence into Clauses", |
| "sec_num": "4" |
| }, |
| { |
| "text": "1. <any string> <finite verb> <ally string> <conjunctive coordinating conjunction> <any string> <finite verb> <a.ny string> <end of sentence> 2. <any string> <finite verb> <any string> <comma> <non-conjunctive coordinating conjunction or complementizer> <any string> <finite verb> <any string> <end of sentence> 3. <complementizer> <any string> <finite verb> <any string> <comma> <any string> <finite verb> <any string> <end of sentence> where the expressions have the following meaning(s):", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Using FSA for Splitting a Sentence into Clauses", |
| "sec_num": "4" |
| }, |
| { |
| "text": "\u2022 <a.ny string> is a variable for any string not containing elements of the following nature: finite verb or word form honlonynlous with a finite verb, coordinating conjunction (of any kind), complementizer, any interlmnction sign", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Using FSA for Splitting a Sentence into Clauses", |
| "sec_num": "4" |
| }, |
| { |
| "text": "\u2022 <finite verb> is a variaMe tbr a main verb (not tor an auxiliary) specified for person, -or for a past participle of a n,ain verb; neither of these might be homonyntous in part of speech (but they n-light he ambiguous within the defined class -such verbs as podr'obl, proudl do qualify)", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Using FSA for Splitting a Sentence into Clauses", |
| "sec_num": "4" |
| }, |
| { |
| "text": "\u2022 <end of sentence> is simI)ly either a full-stop, a question-mark, an exclamation-mark, a colon or a semi-colon.", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Using FSA for Splitting a Sentence into Clauses", |
| "sec_num": "4" |
| }, |
| { |
| "text": "All the renlaining expressions have clear mnemonics, and also the classes which they stand for do not contain elements which are ambiguous as to part of speech.", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Using FSA for Splitting a Sentence into Clauses", |
| "sec_num": "4" |
| }, |
| { |
| "text": "The techniques to be used for gaining overall performance, speed and nlemory efficiency etc., of a gramma.r-checking system presented result solely frorn research concerning relevant l)rOl)erties of the syntax of a particular language (( :ze(-ll, in t)art also Bulgarian), and, herlce, they are strongly languagedependent. However, it seems t.o be self evident that the core idea is transferable t<) <:)tiler languages. The introduction of these techniques contributes to tile process of ripening of the system into a real industrial application at least in the following points:", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Significance and Caveats", |
| "sec_num": null |
| }, |
| { |
| "text": "\u2022 it speeds up the overall performance of the system considerably (in the order ranging from one to two magnitudes, depending on the text to be processed) by avoiding full-fledged parsing to be performed in unnecessary cases or by making this parsing simpler", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Significance and Caveats", |
| "sec_num": null |
| }, |
| { |
| "text": "\u2022 it extends its coverage, in particular the caimbilities of the system to recognize a.s error-free also a large nmnber of sentences which in the original version of the system would be unanalyzable by the non-relaxed grammar (ms well as by the grammar with relaxed constraints, tot that matter) due to either incompleteness of the grammar proper or the exhaustion of hardware resources.", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Significance and Caveats", |
| "sec_num": null |
| }, |
| { |
| "text": "There is a serious caveat to be issued, however: since they do not employ fllll anMysis of the input sentence, these techniques are -albeit probably only rarely on the practical level -more likely to issue incorrect error messages, in the sense that their capabilities of detecting an erroneous sentence are exacffy the same as on the full-fledged approach, but their capabilities of detecting 'what kind of error occurred in the sentence are slightly reduced. For example, in (the Czech equivalent of) tile sentence *Your wife drives very drives tast a grammar-checker based solely on the flfll-fledged philosophy would correctly recognize that the same verb is repeated twice, while a checker using only finite state automaton detecting the presence/absence of a comma or a coordinating conjunction between two finite verbs issues a message concerning exactly the 'missing connna' -and similar exarrq:~les can be constructed also for all the other cases. In other words, there is a price to be paid for the speed-up of the error-checking process by means of tile techniques proposed.", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Significance and Caveats", |
| "sec_num": null |
| } |
| ], |
| "back_matter": [], |
| "bib_entries": { |
| "BIBREF0": { |
| "ref_id": "b0", |
| "title": "A prototype of a grammar checker for Czech", |
| "authors": [ |
| { |
| "first": "T", |
| "middle": [], |
| "last": "Holan", |
| "suffix": "" |
| }, |
| { |
| "first": "V", |
| "middle": [], |
| "last": "Kubofl", |
| "suffix": "" |
| }, |
| { |
| "first": "M", |
| "middle": [], |
| "last": "Plgtek", |
| "suffix": "" |
| } |
| ], |
| "year": 1997, |
| "venue": "", |
| "volume": "", |
| "issue": "", |
| "pages": "", |
| "other_ids": {}, |
| "num": null, |
| "urls": [], |
| "raw_text": "Holan, T., V. Kubofl, and M. Plgtek. 1997. A pro- totype of a grammar checker for Czech. Ill this volume.", |
| "links": null |
| }, |
| "BIBREF1": { |
| "ref_id": "b1", |
| "title": "Error detection techniques m grammarchecking. Technical report of the PECO2824 project", |
| "authors": [ |
| { |
| "first": "Y", |
| "middle": [], |
| "last": "Rodriguez Selles", |
| "suffix": "" |
| }, |
| { |
| "first": "M", |
| "middle": [ |
| "R" |
| ], |
| "last": "Gmvez", |
| "suffix": "" |
| }, |
| { |
| "first": "K", |
| "middle": [], |
| "last": "Oliva", |
| "suffix": "" |
| } |
| ], |
| "year": null, |
| "venue": "", |
| "volume": "", |
| "issue": "", |
| "pages": "", |
| "other_ids": {}, |
| "num": null, |
| "urls": [], |
| "raw_text": "Rodriguez Selles, Y., M.R. GMvez, and K. Oliva. 19.96. Error detection techniques m grammar- checking. Technical report of the PECO2824 pro- ject, Autonomous University of Barcelona. and University of Saarland.", |
| "links": null |
| } |
| }, |
| "ref_entries": {} |
| } |
| } |