public class DataExtractionProcessor extends Object implements EntityDocumentProcessor
EntityDocumentProcessor
finds all items with a GND
identifier (property P227) who are also humans (P31 with value Q5), and
extracts for each of them the id, GND value, as well as English and German
labels and Wikipedia articles, if any. The results are written to a CSV file
"extracted-data.csv". The extracted property can be modified by changing the
value for extractPropertyId
. The current code
only extracts the first value for this property if many are given. The filter
condition (P31::Q5) can also be changed in the code.Constructor and Description |
---|
DataExtractionProcessor() |
Modifier and Type | Method and Description |
---|---|
void |
close() |
static void |
main(String[] args)
Main method.
|
static void |
printDocumentation()
Prints some basic documentation about this program.
|
void |
printStatus()
Prints the current status, time and entity count.
|
void |
processItemDocument(ItemDocument itemDocument)
Processes the given ItemDocument.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
processEntityRedirectDocument, processLexemeDocument, processMediaInfoDocument, processPropertyDocument
public DataExtractionProcessor() throws IOException
IOException
public static void main(String[] args) throws IOException
ExampleHelpers
.args
- IOException
public void processItemDocument(ItemDocument itemDocument)
EntityDocumentProcessor
processItemDocument
in interface EntityDocumentProcessor
itemDocument
- the ItemDocumentpublic void printStatus()
public static void printDocumentation()
public void close()
Copyright © 2014–2024 Wikidata Toolkit Developers. Generated from source code published under the Apache License 2.0. For more information, see the Wikidata Toolkit homepage