请输入您要查询的百科知识:

 

词条 Constraint grammar
释义

  1. Implementations

     CG-1  CG-2  CG-3 

  2. List of systems

  3. References

  4. External links

{{distinguish|Constraint-based grammar}}

Constraint grammar (CG) is a methodological paradigm for natural language processing (NLP). Linguist-written, context dependent rules are compiled into a grammar that assigns grammatical tags ("readings") to words or other tokens in running text. Typical tags address lemmatisation (lexeme or base form), inflexion, derivation, syntactic function, dependency, valency, case roles, semantic type etc. Each rule either adds, removes, selects or replaces a tag or a set of grammatical tags in a given sentence context. Context conditions can be linked to any tag or tag set of any word anywhere in the sentence, either locally (defined distances) or globally (undefined distances). Context conditions in the same rule may be linked, i.e. conditioned upon each other, negated, or blocked by interfering words or tags. Typical CGs consist of thousands of rules, that are applied set-wise in progressive steps, covering ever more advanced levels of analysis. Within each level, safe rules are used before heuristic rules, and no rule is allowed to remove the last reading of a given kind, thus providing a high degree of robustness.

The CG concept was launched by Fred Karlsson in 1990 (Karlsson 1990; Karlsson et al., eds, 1995), and CG taggers and parsers have since been written for a large variety of languages, routinely achieving accuracy F-scores for part of speech (word class) of over 99%.[1] A number of syntactic CG systems have reported F-scores of around 95% for syntactic function labels. CG systems can be used to create full syntactic trees in other formalisms by adding small, non-terminal based phrase structure grammars or dependency grammars, and a number of Treebank projects have used CG for automatic annotation. CG methodology has also been used in a number of language technology applications, such as spell checkers and machine translation systems.

Implementations

CG-1

The first CG implementation was CGP by Fred Karlsson in the early 1990s. It was purely LISP-based, and the syntax was based on LISP s-expressions (Karlsson 1990).

CG-2

Pasi Tapanainen's CG-2 implementation mdis[2] removed some of the parentheses in the grammar format and was implemented in C++, interpreting the grammar as a Finite State Transducer for speed.

CG-2 was later reimplemented (with a non-FST method) by the VISL group at Syddansk Universitet as the open source VISL CG  , keeping the same format as Tapanainen's closed-source mdis.

CG-3

The VISL project later turned into VISL CG-3, which brought further changes and additions to the grammar format, e.g.:

  • full Unicode support through International Components for Unicode
  • different interpretation of negation (NOT)
  • named relations in addition to plain dependency relations
  • variable-setting
  • full regex matching
  • wrappers for reading/writing Apertium and HFST formats
  • support for subreadings (where one reading has several "parts", used for multi-word expressions and compounds)
  • scanning past point of origin or even window boundaries

Unlike the Tapanainen implementation, the VISL implementations do not use finite state transducers. Rules are ordered within sections, which gives more predictability when writing grammars, but at the cost of slower parsing and the possibility of endless loops.

Lately, there have been experimental open-source FST-based implementations that for small grammars reach the speed of VISL CG-3, if not mdis.[3]

List of systems

Free software
  • VISL CG-3 CGrammar compiler/parser
  • North and Lule Sami, Faroese, Komi and Greenlandic from the University of Tromsø ([https://web.archive.org/web/20110822024405/http://giellatekno.uit.no/english.html more information], Northern Sami documentation)
    • Fred Karlsson's original Finnish FinCG is also available from the University of Tromsø as GPL, both in the original [https://victorio.uit.no/langtech/trunk/kt/fin/src/fin-dis.cg1 CG1] and in a converted [https://archive.is/20110722011041/https://victorio.uit.no/langtech/trunk/kt/fin/src/fin-dis.rle CG3] version.
  • Estonian  
  • Norwegian Nynorsk and Bokmål [https://web.archive.org/web/20060925153901/http://decentius.hit.uib.no/cl/cgp/test.html online], Oslo-Bergen tagger([https://github.com/noklesta/The-Oslo-Bergen-Tagger source code])
  • Breton, Welsh, Irish Gaelic and Norwegian (converted from the above) in Apertium (see CG in Apertium)
Non-free software
  • Basque  
  • Catalan [https://web.archive.org/web/20060525020402/http://mutis.upf.es/cgi-bin/catcg/demo.pl CATCG]
  • Danish DanGram
  • English [https://web.archive.org/web/20060902140434/http://www2.lingsoft.fi/cgi-bin/engcg ENGCG], [https://web.archive.org/web/20060520170806/http://www.ling.helsinki.fi/~avoutila/cg/index.html ENGCG-2], VISL-ENGCG
  • Esperanto EspGram
  • French FrAG
  • German GerGram
  • Irish [https://www.cs.tcd.ie/Elaine.UiDhonnchadha/irish.htm online]
  • Italian ItaGram
  • Spanish HISPAL
  • Swedish SWECG
  • Swahili
  • Portuguese PALAVRAS

References

1. ^For English, see for example Tapanainen and Voutilainen 1994.
2. ^Tapanainen, Pasi 1996: The Constraint Grammar Parser CG-2. University of Helsinki Publications No. 27.
3. ^Nemeskey, D. M., Tyers, F. M. and Hulden, M. (2014) "Why Implementation Matters: Evaluation of an Open-source Constraint Grammar Parser". Proceedings of the 25th International Conference on Computational Linguistics (COLING 2014) (to appear)
* Bick, Eckhard. 2000. The Parsing System "Palavras": Automatic Grammatical Analysis of Portuguese in a Constraint Grammar Framework. Aarhus: Aarhus University Press. {{ISBN|87-7288-910-1}}.

  • Karlsson, Fred. 1990. Constraint Grammar as a Framework for Parsing Unrestricted Text. H. Karlgren, ed., Proceedings of the 13th International Conference of Computational Linguistics, Vol. 3. Helsinki 1990, 168-173.
  • Karlsson, Fred, Atro Voutilainen, Juha Heikkilä, and Arto Anttila, editors. 1995. Constraint Grammar: A Language-Independent System for Parsing Unrestricted Text. Natural Language Processing, No 4. Mouton de Gruyter, Berlin and New York. {{ISBN|3-11-014179-5}}.
  • [https://dx.doi.org/10.3115/974358.974370 Tapanainen, Pasi and Atro Voutilainen 1994: Tagging accurately: don't guess if you know. ANLC '94 Proceedings of the fourth conference on Applied natural language processing. ]

External links

  • CG Tutorial by Kevin Donnelly
  • VISL CG-3, the grammar compiler/parser
  • List of some Constraint Grammar publications (up to 2010 at least)

1 : Grammar frameworks

随便看

 

开放百科全书收录14589846条英语、德语、日语等多语种百科知识,基本涵盖了大多数领域的百科知识,是一部内容自由、开放的电子版国际百科全书。

 

Copyright © 2023 OENC.NET All Rights Reserved
京ICP备2021023879号 更新时间:2024/9/20 5:50:02