Collect Introduction section of wikipedia articles

Completado Publicado Aug 10, 2009 Pagado a la entrega
Completado Pagado a la entrega

A python script which takes a wikipedia xml dump as input & outputs titles with the introduction for each article.

## Deliverables

Goal:

A script which takes a wikipedia xml dump as input & outputs titles with the introduction for each article.

Output Specifications:

1) Output writes to a file designated by an input flag

2) Output format is tag based, as follows:

<wiki>

<article>

<title></title>

<text></text>

</article>

</wiki>

3) Both title and text tags are correctly encoded into UTF-8

4) All links and tags are removed. Except for internal wikipedia links, these are marked using the standard tags.

5) Paragraph spacing is preserved

6) Category and special pages are ignored, only article and disambiguation pages are kept.

7) Disambiguation pages.

Titles converted to: Disambiguation: title

Links list in text tags newline separated

8) If possible - please recognize list articles, such as [url removed, login to view], and treat them as disambiguation pages. "List of XXXX" articles do not require the conversion and can be ignored completely.

Code Style:

Code must be well commented and legible (i.e. explanatory variable names).

Language:

Python complete with all necessary libraries

Examples:

<title>Ronald Reagan</title>

<text>

'''Ronald Wilson Reagan''' was the [[List of Presidents of the United States|40th]] [[President of the United States]] (1981-1989) and the 33rd [[Governor of California]] (1967-1975). Born in [[Tampico, Illinois]], Reagan moved to [[Los Angeles, California]] in the 1930s. He began a career in filmmaking and later television, making 52 films and gaining enough success to become a household name. Though often described as a [[B movie|B film]] actor, he starred in both ''[[Knute Rockne, All American|Knute Rockne, All American]]'' and ''[[Kings Row]]''. Reagan served as president of the [[Screen Actors Guild]], and later spokesman for [[General Electric]] (GE); his start in politics occurred during his work for GE. Originally a member of the [[Democratic Party (United States)|Democratic Party]], he switched to the [[Republican Party (United States)|Republican Party]] in 1962. After delivering a [[A Time for Choosing|rousing speech]] in support of [[Barry Goldwater]]'s presidential candidacy in 1964, he was persuaded to seek the California governorship, winning [[California gubernatorial election, 1966|two years later]] and [[California gubernatorial election, 1970|again in 1970]]. He was defeated in his run for the Republican presidential nomination in [[United States presidential election, 1968|1968]] as well as [[United States presidential election, 1976|1976]], but won both the nomination and election in [[United States presidential election, 1980|1980]].

As president, Reagan implemented sweeping new political and economic initiatives. His [[Supply-side economics|supply-side economic]] policies, dubbed "[[Reaganomics]]," advocated reduced business regulation, controlling inflation, reducing growth in government spending, and spurring economic growth through [[Economic Recovery Tax Act of 1981|tax cuts]]. In his first term he survived an [[Reagan assassination attempt|assassination attempt]], [[Professional Air Traffic Controllers Organization (1968)#PATCO Strike|took a hard line against labor unions]], and ordered [[Invasion of Grenada|military actions]] in [[Grenada]]. He was reelected in a [[United States presidential election, 1984|landslide in 1984]], proclaiming it was "[[Morning in America]]."

His second term was primarily marked by foreign matters, namely the ending of the [[Cold War]], the [[bombing of Libya]], and the revelation of the [[Iran-Contra affair]]. Publicly describing the [[Soviet Union]] as an "[[evil empire]]", he [[Reagan Doctrine|supported anti-Communist movements worldwide]] and spent his first term forgoing the strategy of [[détente]] by ordering a massive military buildup in an arms race with the USSR. Reagan negotiated with [[General Secretary of the Communist Party of the Soviet Union|Soviet General Secretary]] [[Mikhail Gorbachev]], culminating in the [[INF Treaty]] and the decrease of both countries' nuclear arsenals.

Reagan left office in 1989. In 1994, the former president disclosed that he had been diagnosed with [[Alzheimer's disease]] earlier in the year; he [[Death and state funeral of Ronald Reagan|died ten years later]] at the age of 93. He ranks [[Historical rankings of United States Presidents|highly]] among former U.S. presidents in terms of approval rating.

</text>

<title>Disambiguation: Apple</title>

<text>

[[Apple Inc.]] (formerly Apple Computer, Inc.), a consumer electronics and software company

[[Apple Bank]], an American bank in the New York City area

[[Apple Corps]], a multimedia corporation founded by [[The Beatles]]

[[Apple (album)|''Apple'' (album)]], an album by Mother Love Bone

[[Apple (band)]], a British psychedelic rock band

[[Apple Records]], record label founded by [[The Beatles]]

[[The Apples]], an Israeli funk band

[[The Apple (1980 film)]] ,a 1980 [[Musical]] [[Science Fiction Film]]

[[Apple I]], [[Apple II series]], [[Apple III]], etc., various personal computer models produced by Apple, Inc and sold from 1976 until 1992.

[[Ariane Passenger Payload Experiment]], an Indian experimental communication satellite launched in 1981

[[Apple (automobile)]], an American automobile manufactured by Apple Automobile Company from 1917 to 1918

</text>

Ingeniería MySQL PHP Python Arquitectura de software Verificación de software Web Hosting Gestión de páginas web Verificación de páginas web

Nº del proyecto: #2831256

Sobre el proyecto

8 propuestas Proyecto remoto Activo Aug 11, 2009

Adjudicado a:

3apa

See private message.

$21.25 USD en 15 días
(47 comentarios)
5.3

8 freelancers están ofertando un promedio de $123 por este trabajo

nisithdash123

See private message.

$136 USD en 15 días
(12 comentarios)
4.1
jazzezravi

See private message.

$85.85 USD en 15 días
(2 comentarios)
2.6
Swagajul

See private message.

$85 USD en 15 días
(4 comentarios)
1.5
madeyemoodyvw

See private message.

$127.5 USD en 15 días
(0 comentarios)
0.0
gtk

See private message.

$63.75 USD en 15 días
(0 comentarios)
0.0
vw7317310vw

See private message.

$425 USD en 15 días
(0 comentarios)
0.0
vw7192710vw

See private message.

$42.5 USD en 15 días
(0 comentarios)
0.0