mirror of
https://github.com/MartinThoma/LaTeX-examples.git
synced 2025-04-18 19:18:21 +02:00
Add lid-baseline
This commit is contained in:
parent
3bbcf02a8a
commit
cd6681720f
5 changed files with 80 additions and 0 deletions
36
tikz/lid-pipeline/Makefile
Normal file
36
tikz/lid-pipeline/Makefile
Normal file
|
@ -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
tikz/lid-pipeline/README.md
Normal file
3
tikz/lid-pipeline/README.md
Normal file
|
@ -0,0 +1,3 @@
|
|||
Compiled example
|
||||
----------------
|
||||

|
28
tikz/lid-pipeline/baseline.tex
Normal file
28
tikz/lid-pipeline/baseline.tex
Normal file
|
@ -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}
|
BIN
tikz/lid-pipeline/lid-pipeline.png
Normal file
BIN
tikz/lid-pipeline/lid-pipeline.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 13 KiB |
13
tikz/lid-pipeline/lid-pipeline.tex
Normal file
13
tikz/lid-pipeline/lid-pipeline.tex
Normal file
|
@ -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}
|
Loading…
Add table
Add a link
Reference in a new issue