Skip to content

Commit 2a5309e

Browse files
author
Daniel
committed
wikidata statistics script
1 parent 238db83 commit 2a5309e

File tree

10 files changed

+44
-11
lines changed

10 files changed

+44
-11
lines changed

.metadata/.log

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5517,3 +5517,28 @@ java.lang.ClassCastException: org.eclipse.osgi.internal.framework.EquinoxConfigu
55175517

55185518
!ENTRY org.eclipse.jdt.core 4 0 2017-03-01 14:41:53.130
55195519
!MESSAGE Invalid ZIP archive: /Applications/apache-jena-3.0.0/lib/commons-codec-1.9.jar
5520+
!SESSION 2017-03-02 09:43:28.154 -----------------------------------------------
5521+
eclipse.buildId=4.4.1.M20140925-0400
5522+
java.version=1.8.0_101
5523+
java.vendor=Oracle Corporation
5524+
BootLoader constants: OS=macosx, ARCH=x86_64, WS=cocoa, NL=en_US
5525+
Framework arguments: -product org.eclipse.epp.package.jee.product -keyring /Users/curtis/.eclipse_keyring -showlocation
5526+
Command-line arguments: -os macosx -ws cocoa -arch x86_64 -product org.eclipse.epp.package.jee.product -keyring /Users/curtis/.eclipse_keyring -showlocation
5527+
5528+
!ENTRY org.eclipse.m2e.logback.configuration 2 0 2017-03-02 09:43:32.089
5529+
!MESSAGE Exception while setting up logging:org.eclipse.osgi.internal.framework.EquinoxConfiguration$1 cannot be cast to java.lang.String
5530+
!STACK 0
5531+
java.lang.ClassCastException: org.eclipse.osgi.internal.framework.EquinoxConfiguration$1 cannot be cast to java.lang.String
5532+
at org.eclipse.m2e.logback.configuration.LogHelper.logJavaProperties(LogHelper.java:26)
5533+
at org.eclipse.m2e.logback.configuration.LogPlugin.loadConfiguration(LogPlugin.java:189)
5534+
at org.eclipse.m2e.logback.configuration.LogPlugin.configureLogback(LogPlugin.java:144)
5535+
at org.eclipse.m2e.logback.configuration.LogPlugin.access$2(LogPlugin.java:107)
5536+
at org.eclipse.m2e.logback.configuration.LogPlugin$1.run(LogPlugin.java:62)
5537+
at java.util.TimerThread.mainLoop(Timer.java:555)
5538+
at java.util.TimerThread.run(Timer.java:505)
5539+
5540+
!ENTRY org.eclipse.core.net 1 0 2017-03-02 09:43:36.086
5541+
!MESSAGE System property http.nonProxyHosts has been set to local|*.local|169.254/16|*.169.254/16 by an external source. This value will be overwritten using the values from the preferences
5542+
5543+
!ENTRY org.eclipse.jdt.core 4 0 2017-03-02 09:43:44.372
5544+
!MESSAGE Invalid ZIP archive: /Applications/apache-jena-3.0.0/lib/commons-codec-1.9.jar

.metadata/.plugins/org.eclipse.e4.workbench/workbench.xmi

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
<persistedState key="workingSets" value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?>&#xA;&lt;workingSets/>"/>
1010
<persistedState key="aggregateWorkingSetId" value="Aggregate for window 1451835937631"/>
1111
<tags>topLevel</tags>
12+
<tags>shellMaximized</tags>
1213
<children xsi:type="basic:PartSashContainer" xmi:id="_jKwmMufDEea-3pqbpr38xg" selectedElement="_jKwmM-fDEea-3pqbpr38xg" horizontal="true">
1314
<children xsi:type="advanced:PerspectiveStack" xmi:id="_jKwmM-fDEea-3pqbpr38xg" elementId="org.eclipse.ui.ide.perspectivestack" containerData="7500" selectedElement="_jKwmNOfDEea-3pqbpr38xg">
1415
<children xsi:type="advanced:Perspective" xmi:id="_jKwmNOfDEea-3pqbpr38xg" elementId="org.eclipse.jst.j2ee.J2EEPerspective" selectedElement="_jKwmNefDEea-3pqbpr38xg" label="Java EE" iconURI="platform:/plugin/org.eclipse.jst.j2ee.ui/icons/full/cview16/j2ee_perspective.gif">
@@ -354,7 +355,7 @@
354355
</menus>
355356
</children>
356357
<children xsi:type="basic:Part" xmi:id="_09zNIP6EEeag_729lH28rw" elementId="org.eclipse.e4.ui.compatibility.editor" contributionURI="bundleclass://org.eclipse.ui.workbench/org.eclipse.ui.internal.e4.compatibility.CompatibilityEditor" label="QueryObject.java" iconURI="platform:/plugin/org.eclipse.jdt.ui/icons/full/obj16/jcu_obj.gif" closeable="true">
357-
<persistedState key="memento" value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?>&#xA;&lt;editor id=&quot;org.eclipse.jdt.ui.CompilationUnitEditor&quot; name=&quot;QueryObject.java&quot; partName=&quot;QueryObject.java&quot; title=&quot;QueryObject.java&quot; tooltip=&quot;QuerySPARQL/src/QueryObject.java&quot;>&#xA;&lt;input factoryID=&quot;org.eclipse.ui.part.FileEditorInputFactory&quot; path=&quot;/QuerySPARQL/src/QueryObject.java&quot;/>&#xA;&lt;editorState selectionHorizontalPixel=&quot;0&quot; selectionLength=&quot;0&quot; selectionOffset=&quot;13489&quot; selectionTopPixel=&quot;5601&quot;/>&#xA;&lt;/editor>"/>
358+
<persistedState key="memento" value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?>&#xA;&lt;editor id=&quot;org.eclipse.jdt.ui.CompilationUnitEditor&quot; name=&quot;QueryObject.java&quot; partName=&quot;QueryObject.java&quot; title=&quot;QueryObject.java&quot; tooltip=&quot;QuerySPARQL/src/QueryObject.java&quot;>&#xA;&lt;input factoryID=&quot;org.eclipse.ui.part.FileEditorInputFactory&quot; path=&quot;/QuerySPARQL/src/QueryObject.java&quot;/>&#xA;&lt;editorState selectionHorizontalPixel=&quot;0&quot; selectionLength=&quot;0&quot; selectionOffset=&quot;13489&quot; selectionTopPixel=&quot;3668&quot;/>&#xA;&lt;/editor>"/>
358359
<tags>Editor</tags>
359360
<tags>org.eclipse.jdt.ui.CompilationUnitEditor</tags>
360361
<tags>removeOnHide</tags>
@@ -844,7 +845,7 @@
844845
</children>
845846
<children xsi:type="menu:ToolBar" xmi:id="_jKycQefDEea-3pqbpr38xg" elementId="org.eclipse.ui.workbench.file">
846847
<tags>Draggable</tags>
847-
<children xsi:type="menu:HandledToolItem" xmi:id="_yUnkYP6EEeag_729lH28rw" elementId="print" iconURI="platform:/plugin/org.eclipse.ui/icons/full/etool16/print_edit.png" tooltip="Print" enabled="false" command="_jK2t4efDEea-3pqbpr38xg"/>
848+
<children xsi:type="menu:HandledToolItem" xmi:id="_VLLTUP8kEeaqOvNukJLPMQ" elementId="print" iconURI="platform:/plugin/org.eclipse.ui/icons/full/etool16/print_edit.png" tooltip="Print" enabled="false" command="_jK2t4efDEea-3pqbpr38xg"/>
848849
</children>
849850
<children xsi:type="menu:ToolBar" xmi:id="_jKycTufDEea-3pqbpr38xg" elementId="additions" toBeRendered="false">
850851
<tags>toolbarSeparator</tags>
@@ -877,7 +878,7 @@
877878
</children>
878879
<children xsi:type="menu:ToolBar" xmi:id="_jKycnefDEea-3pqbpr38xg" elementId="org.eclipse.ui.workbench.navigate">
879880
<tags>Draggable</tags>
880-
<children xsi:type="menu:HandledToolItem" xmi:id="_yUsc4P6EEeag_729lH28rw" elementId="org.eclipse.ui.window.pinEditor" visible="false" iconURI="platform:/plugin/org.eclipse.ui/icons/full/etool16/pin_editor.png" tooltip="Pin Editor" type="Check" command="_jK2thefDEea-3pqbpr38xg"/>
881+
<children xsi:type="menu:HandledToolItem" xmi:id="_VLmKEP8kEeaqOvNukJLPMQ" elementId="org.eclipse.ui.window.pinEditor" visible="false" iconURI="platform:/plugin/org.eclipse.ui/icons/full/etool16/pin_editor.png" tooltip="Pin Editor" type="Check" command="_jK2thefDEea-3pqbpr38xg"/>
881882
</children>
882883
<children xsi:type="menu:ToolBar" xmi:id="_jKycqOfDEea-3pqbpr38xg" elementId="group.editor" toBeRendered="false">
883884
<tags>toolbarSeparator</tags>
@@ -1238,7 +1239,7 @@
12381239
<tags>platform:cocoa</tags>
12391240
<parameters xmi:id="_jKzDK-fDEea-3pqbpr38xg" elementId="org.eclipse.ui.views.showView.viewId" name="org.eclipse.ui.views.showView.viewId" value="org.eclipse.jdt.ui.TypeHierarchy"/>
12401241
</bindings>
1241-
<bindings xmi:id="_xyqt4f6EEeag_729lH28rw" keySequence="COMMAND+CTRL+F" command="_jK2usufDEea-3pqbpr38xg"/>
1242+
<bindings xmi:id="_UVDjof8kEeaqOvNukJLPMQ" keySequence="COMMAND+CTRL+F" command="_jK2usufDEea-3pqbpr38xg"/>
12421243
</bindingTables>
12431244
<bindingTables xmi:id="_jKzDLefDEea-3pqbpr38xg" elementId="org.eclipse.tm.terminal.TerminalContext" bindingContext="_jKzpqefDEea-3pqbpr38xg">
12441245
<bindings xmi:id="_jKzDLufDEea-3pqbpr38xg" keySequence="ALT+D" command="_jK2GrOfDEea-3pqbpr38xg"/>
@@ -1675,7 +1676,7 @@
16751676
<bindings xmi:id="_jKzEQefDEea-3pqbpr38xg" keySequence="COMMAND+C" command="_jK1fqefDEea-3pqbpr38xg"/>
16761677
</bindingTables>
16771678
<bindingTables xmi:id="_jKzEQufDEea-3pqbpr38xg" contributorURI="platform:/fragment/org.eclipse.e4.ui.workbench.renderers.swt.cocoa" bindingContext="_jKzprOfDEea-3pqbpr38xg">
1678-
<bindings xmi:id="_xyrU8P6EEeag_729lH28rw" keySequence="M1+W" command="_jK2utOfDEea-3pqbpr38xg"/>
1679+
<bindings xmi:id="_UVEKsP8kEeaqOvNukJLPMQ" keySequence="M1+W" command="_jK2utOfDEea-3pqbpr38xg"/>
16791680
</bindingTables>
16801681
<bindingTables xmi:id="_jKzEROfDEea-3pqbpr38xg" bindingContext="_jKzptOfDEea-3pqbpr38xg"/>
16811682
<bindingTables xmi:id="_jKzERefDEea-3pqbpr38xg" bindingContext="_jKzptefDEea-3pqbpr38xg"/>
Binary file not shown.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
#Cached timestamps
2-
#Wed Mar 01 16:33:13 CET 2017
2+
#Thu Mar 02 09:51:36 CET 2017

.metadata/.plugins/org.eclipse.ui.workbench/dialog_settings.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
<item value="95" key="DIALOG_Y_ORIGIN"/>
66
</section>
77
<section name="org.eclipse.ui.internal.QuickAccess">
8-
<item value="675" key="dialogHeight"/>
9-
<item value="1200" key="dialogWidth"/>
8+
<item value="657" key="dialogHeight"/>
9+
<item value="1050" key="dialogWidth"/>
1010
<list key="textEntries">
1111
</list>
1212
<list key="orderedElements">

.metadata/version.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
#Wed Mar 01 14:41:29 CET 2017
1+
#Thu Mar 02 09:43:31 CET 2017
22
org.eclipse.core.runtime=2
33
org.eclipse.platform=4.4.0.v20140925-0400

Wikidata/statistics_wikidata.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@
22
import numpy
33
import operator
44

5-
#readFile = '/Volumes/Samsung/wikidata.nt'
6-
readFile = '../../../SeminarPaper_KG_Files/Wikidata/wikidata_s_1m.nt'
5+
#readFile = '/Volumes/Samsung/Wikidata/wikidata_s.nt'
6+
readFile = 'wikidata.nt'
7+
#readFile = '../../../SeminarPaper_KG_Files/Wikidata/wikidata_s_1m.nt'
78

89
isA = '<http://www.wikidata.org/prop/direct/P31>'
910

@@ -119,6 +120,10 @@ def getMedian(d):
119120
#print sNodes
120121
#print sProperties
121122
#print sClasses
123+
fw = open('wikidata_statistics.csv', 'w')
124+
fw.write('#triples, #nodes, #properties, #classes, avgIndegree, medianIndegree, avgOutdegree, medianOutdegree\n')
125+
fw.write('{}, {}, {}, {}, {}, {}, {}, {}'.format(sTriples, len(sNodes), len(sProperties), len(sClasses), getAvg(indegreeDict), getMedian(indegreeDict), getAvg(outdegreeDict), getMedian(outdegreeDict)))
126+
fw.close()
122127
except:
123128
print('ERROR')
124129

Wikidata/wikidata_statistics.csv

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#triples, #nodes, #properties, #classes, avgIndegree, medianIndegree, avgOutdegree, medianOutdegree
2+
8478, 1439, 502, 8, 3.65584415584, 1.0, 7.59677419355, 4.0

0 commit comments

Comments
 (0)