-
Notifications
You must be signed in to change notification settings - Fork 304
Dbpedia History #745
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: history-extraction
Are you sure you want to change the base?
Dbpedia History #745
Changes from 13 commits
5342469
7174c71
d00cf7a
89c6d5c
6461bce
9cdeb79
29329c0
06202d5
053f0ab
2050875
7ad20ae
f55d803
f7686ec
782214b
984b5d4
021ca01
7001bcd
78d91d6
d7929da
167b342
6112b94
e97dd88
969f3b4
e89f813
2246f21
da5f135
eb68385
cb076dd
9f870bb
837e402
cb1526d
0f85985
bbf64f4
37376c1
9ff3818
8932d97
367dfe9
a8c7736
716a780
fb87924
a3a8063
376d1cc
b247260
d9c12f7
4221c0f
a755007
67312b1
b08442d
4286753
a6ebbc5
f87066b
447bc7a
e119c8b
f97dafa
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -3,14 +3,26 @@ | |||||||||
| designed for testing abstracts extractors | ||||||||||
| ## Before all | ||||||||||
|
|
||||||||||
| * Delete tag @DoNotDiscover of ExtractionTestAbstract | ||||||||||
| * add the tag @DoNotDiscover to other test class | ||||||||||
| * Delete tag `@DoNotDiscover` of `ExtractionTestAbstract` | ||||||||||
| * add tag `@DoNotDiscover` to other test class | ||||||||||
|
|
||||||||||
| ## Procedure : | ||||||||||
| ## Procedure | ||||||||||
| 1. Clean your target directory with `mvn clean` in the root directory of DIEF | ||||||||||
| 1. Go to bash scripts via `cd /dump/src/test/bash` | ||||||||||
| 1. OPTIONAL: Create a new Wikipedia minidump sample with `bash create_custom_sample.sh -n $numberOfPage -l $lang -d $optionalDate` | ||||||||||
| 1. Process sample of Wikipedia pages `bash Minidump_custom_sample.sh -f $filename/lst` | ||||||||||
| 1. Go to bash scripts via | ||||||||||
| ```shell | ||||||||||
| cd /dump/src/test/bash | ||||||||||
| ``` | ||||||||||
| 1. OPTIONAL: Create a new Wikipedia minidump sample with | ||||||||||
| ```shell | ||||||||||
| bash create_custom_sample.sh -n $numberOfPage -l $lang -d $optionalDate | ||||||||||
| ``` | ||||||||||
| 1. Process sample of Wikipedia pages | ||||||||||
| ```shell | ||||||||||
| bash Minidump_custom_sample.sh -f $filename/lst | ||||||||||
| ``` | ||||||||||
| 1. Update the extraction language parameter for your minidump sample in [`extraction.nif.abstracts.properties`](https://github.com/datalogism/extraction-framework/blob/gsoc-celian/dump/src/test/resources/extraction-configs/extraction.nif.abstracts.properties) and in [`extraction.plain.abstracts.properties`](https://github.com/datalogism/extraction-framework/blob/gsoc-celian/dump/src/test/resources/extraction-configs/extraction.plain.abstracts.properties) | ||||||||||
| 1. Change the name of your log in the [`ExtractionTestAbstract.scala`](https://github.com/datalogism/extraction-framework/blob/gsoc-celian/dump/src/test/scala/org/dbpedia/extraction/dump/ExtractionTestAbstract.scala) file | ||||||||||
|
Comment on lines
+23
to
+24
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Update config links to stable in-repo paths. Hard-coding a link to the -1. Update the extraction language parameter for your minidump sample in [`extraction.nif.abstracts.properties`](https://github.com/datalogism/extraction-framework/blob/gsoc-celian/dump/src/test/resources/extraction-configs/extraction.nif.abstracts.properties) and in [`extraction.plain.abstracts.properties`](https://github.com/datalogism/extraction-framework/blob/gsoc-celian/dump/src/test/resources/extraction-configs/extraction.plain.abstracts.properties)
+1. Update the extraction language parameter for your minidump sample in [`extraction.nif.abstracts.properties`](../../../../../resources/extraction-configs/extraction.nif.abstracts.properties) and in [`extraction.plain.abstracts.properties`](../../../../../resources/extraction-configs/extraction.plain.abstracts.properties)📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||
| 1. Rebuild the app with `mvn install`, or just test it with `mvn test -Dtest="ExtractionTestAbstract2"` | ||||||||||
| 1. Rebuild the app with `mvn install`, or just test it with | ||||||||||
| ```shell | ||||||||||
| mvn test -Dtest="ExtractionTestAbstract2" | ||||||||||
| ``` | ||||||||||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -5,7 +5,7 @@ DBpedia History enables the history of a Wikipedia chapter to be extracted into | |||||||||||||||||||||
|
|
||||||||||||||||||||||
| ## Previous work | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| This DBpedia App is a scala/java version of the first work conducted by the French Chapter : https://github.com/dbpedia/Historic/ | ||||||||||||||||||||||
| This DBpedia App is a Scala/Java version of the first work conducted by the French Chapter, <https://github.com/dbpedia/Historic/>. | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| Fabien Gandon, Raphael Boyer, Olivier Corby, Alexandre Monnin. Wikipedia editing history in DBpedia: extracting and publishing the encyclopedia editing activity as linked data. IEEE/WIC/ACM International Joint Conference on Web Intelligence (WI' 16), Oct 2016, Omaha, United States. <hal-01359575> | ||||||||||||||||||||||
| https://hal.inria.fr/hal-01359575 | ||||||||||||||||||||||
|
|
@@ -15,26 +15,26 @@ https://hal.inria.fr/hal-01359583 | |||||||||||||||||||||
|
|
||||||||||||||||||||||
| ## A first working prototype | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| This prototype is not optimized, during its development of it we were faced with the WikiPage type checking constraints that are checked in almost every module of the DBpedia pipeline. | ||||||||||||||||||||||
| We hardly copy/paste and renamed all the classes and objects we needed for running the extractors. | ||||||||||||||||||||||
| This conception could be easily improved by making WikiPage and WikiPageWithRevision objects inherit from the same abstract object. | ||||||||||||||||||||||
| But as a first step, we wanted to touch the less possible DBpedia core module. | ||||||||||||||||||||||
| This prototype is not optimized. During its development, we were faced with the WikiPage type-checking constraints that are checked in almost every module of the DBpedia pipeline. | ||||||||||||||||||||||
| We basically copy/pasted and renamed all the classes and objects we needed for running the extractors. | ||||||||||||||||||||||
| This conception could be easily improved by making `WikiPage` and `WikiPageWithRevision` objects inherit from the same abstract object. | ||||||||||||||||||||||
| But as a first step, we didn't want to impact the core module. | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| Some other improvements that could be conducted: | ||||||||||||||||||||||
| Some other improvements that could be made: | ||||||||||||||||||||||
| * Scala version | ||||||||||||||||||||||
| * Being able to use a historic namespace taking into account the DBpedia chapter language | ||||||||||||||||||||||
| * Being able to follow if a revision impacts an infobox content | ||||||||||||||||||||||
| * Enabling use of a historic namespace, taking into account the DBpedia chapter language | ||||||||||||||||||||||
| * Enabling following when a revision impacts content of an `infobox` | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| ## Main Class | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| * [WikipediaDumpParserHistory.java](src/main/java/org/dbpedia/extraction/sources/WikipediaDumpParserHistory.java) : for parsing of the history dumps | ||||||||||||||||||||||
| * [RevisionNode.scala](src/main/scala/org/dbpedia/extraction/wikiparser/RevisionNode.scala) : define revision node object | ||||||||||||||||||||||
| * [WikiPageWithRevision](src/main/scala/org/dbpedia/extraction/wikiparser/WikiPageWithRevisions.scala) : define wikipage with revision list object | ||||||||||||||||||||||
| * [WikipediaDumpParserHistory.java](src/main/java/org/dbpedia/extraction/sources/WikipediaDumpParserHistory.java) — for parsing the history dumps | ||||||||||||||||||||||
| * [RevisionNode.scala](src/main/scala/org/dbpedia/extraction/wikiparser/RevisionNode.scala) — define revision of node object | ||||||||||||||||||||||
| * [WikiPageWithRevision](src/main/scala/org/dbpedia/extraction/wikiparser/WikiPageWithRevisions.scala) — define `wikipage` with revision list object | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
|
Comment on lines
+28
to
+33
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Pluralize heading and fix class name/link text “Main Class” → “Main classes”; link text should match file name (Revisions). -## Main Class
+## Main classes
@@
-* [WikiPageWithRevision](src/main/scala/org/dbpedia/extraction/wikiparser/WikiPageWithRevisions.scala) — define `wikipage` with revision list object
+* [WikiPageWithRevisions](src/main/scala/org/dbpedia/extraction/wikiparser/WikiPageWithRevisions.scala) — define `WikiPage` with a list of revisions📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||
| ## Extractors | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| * [HistoryPageExtractor.scala](src/main/scala/org/dbpedia/extraction/mappings/HistoryPageExtractor.scala): Extract all the revision of every wikipedia pages | ||||||||||||||||||||||
| * [HistoryStatsExtractor.scala](src/main/scala/org/dbpedia/extraction/mappings/HistoryStatsExtractor.scala) : Extract statistics about the revision activity for every page of Wikipedia | ||||||||||||||||||||||
| * [HistoryPageExtractor.scala](src/main/scala/org/dbpedia/extraction/mappings/HistoryPageExtractor.scala) — Extract all revisions of every Wikipedia page | ||||||||||||||||||||||
| * [HistoryStatsExtractor.scala](src/main/scala/org/dbpedia/extraction/mappings/HistoryStatsExtractor.scala) — Extract statistics about revision activity for every page of Wikipedia | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| ## How to run it ? | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
|
|
@@ -48,4 +48,4 @@ Some other improvements that could be conducted: | |||||||||||||||||||||
| * configure the [extraction.properties](extraction.properties) file | ||||||||||||||||||||||
| * and run ```../run run extraction.properties``` | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| * Test it with : mvn test (need to have a containing file frwiki-[YYYYMMDD]-download-complete empty flag file into the base-dir defined into the extraction-properties file ) | ||||||||||||||||||||||
| * Test it with `mvn test` (need to have a containing file, `frwiki-[YYYYMMDD]-download-complete` empty flag file into the `base-dir` defined into the `extraction-properties` file) | ||||||||||||||||||||||
|
datalogism marked this conversation as resolved.
Outdated
|
||||||||||||||||||||||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -14,7 +14,7 @@ import org.dbpedia.extraction.wikiparser.{Namespace, WikiPage, WikiPageWithRevis | |||||||||||||||||||
| * @param source The extraction source | ||||||||||||||||||||
| * @param namespaces Only extract pages in these namespaces | ||||||||||||||||||||
| * @param destination The extraction destination. Will be closed after the extraction has been finished. | ||||||||||||||||||||
| * @param language the language of this extraction. | ||||||||||||||||||||
| * @param language The language of this extraction. | ||||||||||||||||||||
| */ | ||||||||||||||||||||
| class ExtractionJob2( | ||||||||||||||||||||
| extractor: WikiPageWithRevisionsExtractor, | ||||||||||||||||||||
|
|
@@ -44,7 +44,7 @@ class ExtractionJob2( | |||||||||||||||||||
| println(graph.toString()) | ||||||||||||||||||||
| destination.write(graph) | ||||||||||||||||||||
| } | ||||||||||||||||||||
|
Comment on lines
+41
to
+46
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Remove per-page
- println("SimpleWorkers")
- println(extractor.toString)
val graph = extractor.extract(page, page.uri)
- println(graph.toString())
destination.write(graph)📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||
| //if the internal extraction process of this extractor yielded extraction records (e.g. non critical errors etc.), those will be forwarded to the ExtractionRecorder, else a new record is produced | ||||||||||||||||||||
| //if the internal extraction process of this extractor yielded extraction records (e.g., non-critical errors, etc.), those will be forwarded to the ExtractionRecorder; else, a new record is produced | ||||||||||||||||||||
| val records = page.getExtractionRecords() match{ | ||||||||||||||||||||
| case seq :Seq[RecordEntry2[WikiPageWithRevisions]] if seq.nonEmpty => seq | ||||||||||||||||||||
| case _ => Seq(new RecordEntry2[WikiPageWithRevisions](page, page.uri, RecordSeverity.Info, page.title.language)) | ||||||||||||||||||||
|
|
||||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix incorrect
cdpath.Using
/dump/src/test/bashassumes a root-level directory and will fail in a cloned repo. Switch to the project-relative path instead.📝 Committable suggestion
🤖 Prompt for AI Agents