# Drawing dashed circles around words using TikZ

I am looking for a code to create the following schemes. As I have never worked with drawing packages in LaTeX before, any help will be appreciated. It would be great if someone could help me by writing a code snippet (including comments).

Using tikz package, you can start with something like this:

\documentclass[tikz,border=2pt]{standalone}
\usetikzlibrary{positioning, fit, calc}
\begin{document}

\begin{tikzpicture}
\node [align=center](tr) {transitive:\\};
\node [align=center, right=of tr] (A) {A\\NOM};
\node [align=center, right=of A] (P) {P\\ACC};
\node [align=center, right=5em of P] (ER) {A\\ERG};
\node [align=center, right=of ER] (AB) {P\\ABS};
\node [align=center,below=of $(ER.south)!.5!(AB.south)$] (SA) {S\\ABS};
\node [above=of $(A)!.5!(P)$] {(1) Nominative-accusative:};
\node [rotate=60][draw,dashed,inner sep=0pt, circle,yscale=.5,fit={(AB)(SA)}] {};

\node [align=center,below=of tr](itr) {intransitive:\\};
\node [align=center,below=of $(A.south)!.5!(P.south)$] (S) {S\\NOM};
\node [above=of $(ER)!.5!(AB)$] {(2) Ergative-absolutive:};
\node [rotate=-60][draw,dashed,inner sep=0pt, circle,yscale=.5, fit={(A) (S)}] {};
\end{tikzpicture}

\end{document}


To efficiently place nodes, the positioning library comes in handy. And to draw the dashed ellipses around the nodes, the fit library is required. Also, to point to a mid-position between two nodes (for example, $(A)!.5!(P)$) you need the calc library. You can find a comprehensive manual full of good examples for tikz package here.