On 01.07.2015 18:03, Peter F. Patel-Schneider wrote:
...
Even the very nice email from Markus that gives numbers does not provide any
information on where the numbers come from.
I just ran a simple Java program based on Wikidata Toolkit to count the
date values. The features I used for counting are all part of the data
(concretely I accessed: year number, precision, and calendar model). I
used the JSON dump of 22 June 2015. The program counted all dates that
occur in any place (main values of statements, qualifiers, and
references). No other special processing was done.
Below is the main code snippet that did the counting, in case my
description was too vague. If you want to get your own numbers, it does
not require much (I just modified one of the example programs in
Wikidata Toolkit that gathers general statistics). Running the code took
about 25min on my laptop (the initial dump download took longer though).
The SPARQL endpoint at
https://wdqs-beta.wmflabs.org/ should also return
useful counts if it does not time out on the very large numbers. It uses
life data.
Best regards,
Markus
// after determining that snak is of appropriate type:
String cm = ((TimeValue) ((ValueSnak) snak).getValue())
.getPreferredCalendarModel();
if (TimeValue.CM_GREGORIAN_PRO.equals(cm)) {
this.countGregDates++;
} else if (TimeValue.CM_JULIAN_PRO.equals(cm)) {
this.countJulDates++;
} else {
System.err.println("Weird calendar model: "
+ ((ValueSnak) snak).getValue());
}
if (((TimeValue) ((ValueSnak) snak).getValue()).getPrecision() <=
TimeValue.PREC_MONTH) {
return;
}
long year = ((TimeValue) ((ValueSnak) snak).getValue()).getYear();
if (year >= 1923) {
this.countModernDates++;
} else if (year >= 1753) {
this.countAlmostModernDates++;
} else if (year >= 1582) {
this.countTransitionDates++;
} else {
this.countOldenDates++;
}