翻訳と辞書
Words near each other
・ Sweatshop
・ Sweatshop (disambiguation)
・ Sweatshop (film)
・ Sweatshop (retailer)
・ Sweatshop Union
・ Sweatshop-free
・ Sweatsuit (album)
・ Sweatt
・ Sweatt v. Painter
・ Sweatworking
・ Sweaty Betty
・ Sweaty Handshake
・ Sweaty Nipples
・ Sweave
・ SWEB Energy
Sweble
・ Swebus Express
・ Swecha
・ SweClockers.com
・ Sweco
・ Swecoin
・ Swecon
・ Sweda
・ SWEDAC
・ Swedair
・ Swedavia
・ Swedbank
・ Swedbank (Ukraine)
・ Swedbank Arena
・ Swedbank Park


Dictionary Lists
翻訳と辞書 辞書検索 [ 開発暫定版 ]
スポンサード リンク

Sweble : ウィキペディア英語版
Sweble

The Sweble Wikitext parser〔(Homepage of the Sweble project )〕 is an open-source tool to parse the Wikitext markup language used by MediaWiki, the software behind Wikipedia. The initial development was done by Hannes Dohrn as a Ph.D. thesis project at the (Open Source Research Group ) of professor Dirk Riehle at the University of Erlangen-Nuremberg from 2009 until 2011. The results were presented to the public for the first time at the WikiSym conference in 2011.〔(Announcement at WikiSym conference website )〕 Before that, the dissertation was inspected and approved by an independent scientific peer-review and was published at ACM Press.
Based on the statistics at Ohloh〔(Ohloh page of the Sweble project )〕 the parser is mainly written in the Java programming language. It was open-sourced in May 2011.〔
The parser itself is generated from a parsing expression grammar (PEG) using the (Rats! parser generator ).
The encoding validation is done using a flex lexical analyser written in (JFlex ).
A preprint version of the paper on the design of the Sweble Wikitext Parser can be found at the projects homepage.〔(paper on the design of the Sweble Wikitext Parser )〕 In addition to that, a summary page exists at the MediaWiki's futures.〔(Future page for Sweble at MediaWiki )〕
== The current state of parsing ==
The parser used in MediaWiki converts the content directly from Wikitext into HTML. This process is done in two stages:〔(Markup Spec - MediaWiki )〕
# Searching and expansion of templates (like infoboxes), variables, and meta-information (e.g. '''' gets converted into lower-case ''abc''). Template pages can again have such meta-information so that those have to be evaluated as well (Recursion). This approach is similar to macro expansion used e.g. in programming languages like C++.
# Parsing and rendering of the now fully expanded text. Hereby, the text is processed by a sequence of built-in functions of MediaWiki that each recognise a single construct. Those analyse the content using Regular Expressions and replace e.g. ''= HEAD ='' with its HTML equivalent ''<h1>HEAD</h1>''. In most of the cases this steps are done line by line (with exceptions like e.g. tables or lists).
As the authors of Sweble write in their paper,〔 an analysis of the source code of MediaWiki's parser showed that the strategy of using separate transformation steps leads to new problems: Most of the used functions do not take the scope of the surrounding elements into account. This consequently leads to wrong nesting in the resulting HTML output. As a result, the evaluation and rendering of the latter can be ambiguous and depends on the rendering engine of the used web browser. They state:
:"The individual processing steps often lead to unexpected and inconsistent behavior of the parser. For example, lists are recognized inside table cells. However, if the table itself appears inside a framed image, lists are not recognized."〔
As argued on the WikiSym conference in 2008, a lack of language precision and component decoupling hinders evolution of wiki software. If the wiki content had a well-specified representation that is fully machine processable, this would not only lead to better accessibility of its content but also improve and extend the ways in which it can be processed.
In addition, a well-defined object model for wiki content would allow further tools to operate on it. Until now there have been numerous attempts at implementing a new parser for MediaWiki (see ()).
None of them has succeeded so far. The authors of Sweble state that this might be "due to their choice of grammar, namely the well-known LALR(1) and LL(k) grammars. While these grammars are only a subset of context-free grammars, Wikitext requires global parser state and can therefore be considered a context-sensitive language."〔 As a result, they base their parser on a parsing expression grammar (PEG).

抄文引用元・出典: フリー百科事典『 ウィキペディア(Wikipedia)
ウィキペディアで「Sweble」の詳細全文を読む



スポンサード リンク
翻訳と辞書 : 翻訳のためのインターネットリソース

Copyright(C) kotoba.ne.jp 1997-2016. All Rights Reserved.