[Tex/LaTex] Drawing system architecture in Latex

metapostpstrickstikz-pgf

I want to draw a system architecture as in the picture below
enter image description here

Can you help me?

Best Answer

Maybe something along these lines with TikZ:

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{matrix,shapes.multipart,shapes.geometric,fit,scopes}
\tikzset{
  >= latex,
  el/.style={ellipse, draw, text width=8em, align=center},
  rs/.style={rectangle split, draw, rectangle split parts=#1},
  ou/.style={draw, inner xsep=1em, inner ysep=1ex, fit=#1}
}
\begin{document}
\begin{tikzpicture}
  \matrix[matrix of nodes, row sep=5ex, column sep=1em] (mx) {
    INPUT:& |[el]| newspaper text \\
    ANALYSER& |[rs=3]|
    lexical tagger\nodepart{two}morphological analyser\nodepart{three}parser \\
    & |[el]| {analysed newspaper text} \\
    SIMPLIFIER& |[rs=2]| syntactic simplifier\nodepart{two}lexical simplifier \\
    OUTPUT:& |[el]| simplified newspaper text \\
  };
  \node[ou=(mx-2-2)] (ana) {};
  \node[ou=(mx-4-2)] (sim) {};
  {[->]
  \draw(mx-1-2)edge(ana) (ana)edge(mx-3-2) (mx-3-2)edge(sim) (sim)edge(mx-5-2);
  }
\end{tikzpicture}
\end{document}

enter image description here

Or, with MetaPost (compile with lualatex):

\documentclass{article}
\usepackage{luamplib}
\begin{document}
\begin{mplibcode}
input boxes;

nodesep := 15; % space between nodes
ellipdy := 15; % the dy of ellipses

vardef cuta(suffix a, b) = % from Peter Grogono's MetaPost reference manual
  drawarrow a.c -- b.c cutbefore bpath.a cutafter bpath.b;
enddef;

beginfig(1);
  % define contents
  circleit.txt("newspaper text");
  boxjoin(a.sw = b.nw; a.se = b.ne);
  boxit.lext("lexical tagger");
  boxit.mora("morphological analyser");
  boxit.prsr("parser");
  boxjoin();
  circleit.atxt("analysed text");
  boxjoin(a.sw = b.nw; a.se = b.ne);
  boxit.syns("syntactic simplifier");
  boxit.lexs("lexical simplifier");
  boxjoin();
  circleit.stxt("simplified text");

  % position and tweak
  txt.dy  = ellipdy;
  atxt.dy = ellipdy;
  stxt.dy = ellipdy;
  lext.ne - lext.nw = (110,0);
  txt.s  - lext.n = (0,nodesep);
  prsr.s - atxt.n = (0,nodesep);
  atxt.s - syns.n = (0,nodesep);
  lexs.s - stxt.n = (0,nodesep);

  % draw everything
  picture pic; pic := image(drawboxed(lext, mora, prsr););
  draw pic; draw bbox pic;
  drawboxed(txt, atxt);
  pic := image(drawboxed(syns, lexs));
  draw pic; draw bbox pic;
  drawboxed(stxt);
  cuta(txt, lext);
  cuta(prsr, atxt);
  cuta(atxt, syns);
  cuta(lexs, stxt);
endfig;
end;
\end{mplibcode}
\end{document}

enter image description here