Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
event-wikifier
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Shyam Upadhyay
event-wikifier
Commits
342d0622
Commit
342d0622
authored
9 years ago
by
Shyam Upadhyay
Browse files
Options
Downloads
Patches
Plain Diff
dkpro added
parent
26f435bb
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
pom.xml
+6
-0
6 additions, 0 deletions
pom.xml
run.sh
+2
-1
2 additions, 1 deletion
run.sh
scripts/grabWikiUrls.py
+32
-0
32 additions, 0 deletions
scripts/grabWikiUrls.py
with
40 additions
and
1 deletion
pom.xml
+
6
−
0
View file @
342d0622
...
...
@@ -24,6 +24,12 @@
<dependencies>
<dependency>
<groupId>
de.tudarmstadt.ukp.wikipedia
</groupId>
<artifactId>
de.tudarmstadt.ukp.wikipedia.revisionmachine
</artifactId>
<version>
1.0.0
</version>
</dependency>
<dependency>
<groupId>
org.jsoup
</groupId>
<artifactId>
jsoup
</artifactId>
...
...
This diff is collapsed.
Click to expand it.
run.sh
+
2
−
1
View file @
342d0622
...
...
@@ -34,5 +34,6 @@ MAIN="$PACKAGE_PREFIX.wiki.events.newsarticle.NewsArticleMiner"
#MAIN="$PACKAGE_PREFIX.wiki.parsing.pageviews.IndexPageViews"
#MAIN="$PACKAGE_PREFIX.wiki.parsing.pageviews.PageViewIndexer"
#MAIN="$PACKAGE_PREFIX.wiki.parsing.pageviews.WikiClusters"
MAIN
=
"de.tudarmstadt.ukp.wikipedia.revisionmachine.difftool.config.gui.ConfigGUI"
#MAIN="de.tudarmstadt.ukp.wikipedia.revisionmachine.difftool.DiffTool"
time nice
java
$OPTIONS
$MAIN
$CONFIG_STR
$*
This diff is collapsed.
Click to expand it.
scripts/grabWikiUrls.py
0 → 100644
+
32
−
0
View file @
342d0622
import
os
import
sys
import
argparse
import
urllib
from
bs4
import
BeautifulSoup
,
SoupStrainer
import
httplib
import
httplib
from
urlparse
import
urlparse
# creates a file with urls, wikiurls.txt, which contains the download urls for all wikipedias (all languages)
# once this script generates wikiurls.txt, you can
# wget --no-clobber -i wikiurls.txt
# wiki.html is the html page "https://dumps.wikimedia.org/backup-index.html"
def
checkUrl
(
url
):
"
checks if the url is dead or not
"
p
=
urlparse
(
url
)
conn
=
httplib
.
HTTPConnection
(
p
.
netloc
)
conn
.
request
(
'
HEAD
'
,
p
.
path
)
resp
=
conn
.
getresponse
()
return
resp
.
status
<
400
import
httplib2
from
BeautifulSoup
import
BeautifulSoup
,
SoupStrainer
http
=
httplib2
.
Http
()
status
,
response
=
http
.
request
(
'
https://dumps.wikimedia.org/enwiki/20150805/
'
)
for
link
in
BeautifulSoup
(
response
,
parseOnlyThese
=
SoupStrainer
(
'
a
'
)):
if
"
pages-meta-history
"
in
link
[
"
href
"
]:
print
"
https://dumps.wikimedia.org/
"
+
link
[
"
href
"
]
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment