-
Notifications
You must be signed in to change notification settings - Fork 1
/
context_dfd.tex
42 lines (36 loc) · 1.63 KB
/
context_dfd.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
% Data flow diagram
% Template adapted from http://www.texample.net/tikz/examples/data-flow-diagram/ by David Fokkema
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{arrows,shapes}
% Custom, should be provided in the same directory.
\usepackage{datastore}
% Disable page number for better SVG.
\pagenumbering{gobble}
\begin{document}
\begin{tikzpicture}[
font=\sffamily,
every matrix/.style={ampersand replacement=\&,column sep=2cm,row sep=2cm},
interface/.style={draw,thick,regular polygon,regular polygon sides=4,inner sep=0},
process/.style={draw,thick,rounded corners,inner sep=.3 cm},
datastore/.style={draw,thick,shape=datastore,inner sep=.3cm},
to/.style={->,>=stealth',shorten >=1pt,semithick,font=\sffamily\footnotesize},
every node/.style={align=center}]
% Position the nodes using a matrix layout
\matrix{
\& \node[interface] (mwapi) {MediaWiki API}; \\
\node[interface] (researcher) {Researcher};
\& \node[process] (ores) {ORES};
\& \node[interface] (labeler) {Labeler}; \\
\& \node[interface] (consumer) {ORES consumer}; \\
};
\node [below=3cm, align=flush center] at (consumer)
{\Large ORES: Context, level 0 \\ \normalsize data flow diagram};
% Draw the arrows between the nodes and label them.
\draw[to] (mwapi) -- node[midway,left] {new revision events}
node[midway,right] {revision content \\ revision metadata} (ores);
\draw[to] (ores) -- node[midway,right] {revision scores} (consumer);
\draw[to] (researcher) -- node[midway,above] {parameters \\ AI training} (ores);
\draw[to] (labeler) -- node[midway,above] {judgements} (ores);
\end{tikzpicture}
\end{document}