2
0
Fork 0
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:
Martin Thoma 2018-01-21 15:00:39 +01:00
parent 3bbcf02a8a
commit cd6681720f
5 changed files with 80 additions and 0 deletions

View 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

View file

@ -0,0 +1,3 @@
Compiled example
----------------
![Example](lid-pipeline.png)

View 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}

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

View 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}