Skip to content

Commit 1a125bf

Browse files
author
mgeipel
committed
added example for calculate-metrics
1 parent 0e412c5 commit 1a125bf

File tree

2 files changed

+41
-0
lines changed

2 files changed

+41
-0
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
2+
catalogue|
3+
open-file|
4+
as-lines|
5+
catch-object-exception|
6+
decode-pica|
7+
batch-log(batchsize="100000")|
8+
morph(FLUX_DIR + "subject-cooccurrence.xml")|
9+
stream-to-triples|
10+
count-triples(countBy="object")|
11+
calculate-metrics("X2")|
12+
template("${s} ${o}")|
13+
//write("stdout");
14+
write(FLUX_DIR+"x2.dat");
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<metamorph xmlns="http://www.culturegraph.org/metamorph"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1">
4+
<rules>
5+
6+
<data source="041A*.9" name="@subj">
7+
<trim />
8+
<unique />
9+
</data>
10+
11+
<square delimiter="&amp;" name="">
12+
<data source="@subj" name=""/>
13+
<postprocess>
14+
<compose prefix="2:"/>
15+
</postprocess>
16+
</square>
17+
18+
<data source="@subj" name="">
19+
<compose prefix="2:"/>
20+
</data>
21+
22+
<data source="@subj" name="">
23+
<occurrence only="1" />
24+
<constant value="1:" />
25+
</data>
26+
</rules>
27+
</metamorph>

0 commit comments

Comments
 (0)