Skip to content

Commit

Permalink
Add lid-baseline
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinThoma committed Jan 21, 2018
1 parent 3bbcf02 commit cd66817
Show file tree
Hide file tree
Showing 5 changed files with 80 additions and 0 deletions.
36 changes: 36 additions & 0 deletions tikz/lid-pipeline/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
SOURCE = lid-pipeline
DELAY = 80
DENSITY = 300
WIDTH = 512

make:
pdflatex $(SOURCE).tex -output-format=pdf
pdfcrop $(SOURCE).pdf $(SOURCE).pdf
make clean

clean:
rm -rf $(TARGET) *.class *.html *.log *.aux *.data *.gnuplot

gif:
pdfcrop $(SOURCE).pdf
convert -verbose -delay $(DELAY) -loop 0 -density $(DENSITY) $(SOURCE)-crop.pdf $(SOURCE).gif
make clean

png:
make
make svg
inkscape $(SOURCE).svg -w $(WIDTH) --export-png=$(SOURCE).png

transparentGif:
convert $(SOURCE).pdf -transparent white result.gif
make clean

svg:
make
#inkscape $(SOURCE).pdf --export-plain-svg=$(SOURCE).svg
pdf2svg $(SOURCE).pdf $(SOURCE).svg
# Necessary, as pdf2svg does not always create valid svgs:
inkscape $(SOURCE).svg --export-plain-svg=$(SOURCE).svg
rsvg-convert -a -w $(WIDTH) -f svg $(SOURCE).svg -o $(SOURCE)2.svg
inkscape $(SOURCE)2.svg --export-plain-svg=$(SOURCE).svg
rm $(SOURCE)2.svg
3 changes: 3 additions & 0 deletions tikz/lid-pipeline/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Compiled example
----------------
![Example](lid-pipeline.png)
28 changes: 28 additions & 0 deletions tikz/lid-pipeline/baseline.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
\newcommand{\width}{0.2}
\newcommand{\height}{0.4}
\newcommand{\disty}{0.2}
\definecolor{colorbblue}{HTML}{0072B2}
\definecolor{colorbgreen}{HTML}{009E73}
\definecolor{colorborange}{HTML}{D55E00}


\tikzstyle{act}=[draw=black, fill=black!10]
\def \coldist {2.3}
\def \widthb {1.9}

\begin{tikzpicture}[scale=2]
\draw[->, -Latex, line width=5pt]
(1.0+0*\coldist, 0.2) --(1.0+0*\coldist, -0*\disty-1*\height-0.3) --(2.1+0*\coldist, -0*\disty-1*\height-0.3) --(2.2+0*\coldist, 0.2)
-- (1.0+1*\coldist, 0.2) --(1.0+1*\coldist, -0*\disty-1*\height-0.3) --(2.1+1*\coldist, -0*\disty-1*\height-0.3) --(2.2+1*\coldist, 0.2)
-- (1.0+2*\coldist, 0.2) --(1.0+2*\coldist, -0*\disty-1*\height-0.6);% --(2.1+4*\coldist, -4.3) --(2.2+4*\coldist, 0.5)
% -- (1.0+5*\coldist, 0.5) --(1.0+5*\coldist, -4.5);

\draw[act] (0*\coldist,-0*\height-0*\disty) rectangle (0*\coldist+\widthb,-0*\disty-1*\height) node[pos=.5] {Preprocessing};
\draw[act] (1*\coldist,-0*\height-0*\disty) rectangle (1*\coldist+\widthb,-0*\disty-1*\height) node[pos=.5] {Feature Extraction};
\draw[act] (2*\coldist,-0*\height-0*\disty) rectangle (2*\coldist+\widthb,-0*\disty-1*\height) node[pos=.5] {Classification};

\draw[draw=none, align=center] (0.5 + 0*\coldist,+0.5*\disty-0*\height) rectangle (0.5 + 0*\coldist,+0.5*\disty-0*\height) node[pos=.5] {Raw Text};
\draw[draw=none, align=center] (1.0 + 0*\coldist,-0*\disty-2*\height) rectangle (1.0 + 0*\coldist,-2*\disty-2*\height) node[pos=.5] {Cleaned\\Text};
\draw[draw=none, align=center] (1.0 + 1*\coldist,-0*\disty-2*\height) rectangle (1.0 + 1*\coldist,-2*\disty-2*\height) node[pos=.5] {Fixed-length\\float array};
\draw[draw=none, align=center] (1.0 + 2*\coldist,-0*\disty-2*\height) rectangle (1.0 + 2*\coldist,-3*\disty-2*\height) node[pos=.5] {Language probabilities};
\end{tikzpicture}
Binary file added tikz/lid-pipeline/lid-pipeline.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 13 additions & 0 deletions tikz/lid-pipeline/lid-pipeline.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
\documentclass{article}
\usepackage{xcolor}
\usepackage[pdftex,active,tightpage]{preview}
\setlength\PreviewBorder{2mm}

\usepackage{amsmath}
\usepackage{tikz}
\usetikzlibrary{shapes, calc, shapes, arrows, snakes, arrows.meta}
\begin{document}
\begin{preview}
\input{baseline}
\end{preview}
\end{document}

0 comments on commit cd66817

Please sign in to comment.