 symbol as vertices and a directed edge between every pair of distinct words and from the root symbol to every word. The directed graph $G_S$ is defined as:

$$\begin{aligned}
        V_S &= \{w_0 = \text{\sc root}, w_1, \dots,w_N\} \\
        E_S &= \{ \langle i, j \rangle: i \ne j, \langle i, j \rangle \in [0, N] \times [1, N] \} \\
        s(i, j) &= P_{head}(w_i | w_j, S) \quad \langle i, j \rangle \in E_S
    \end{aligned}$$

where $s(i, j)$ is the weight of edge $\langle i, j \rangle$ and $P_{head}(w_i | w_j, S)$ is known. The problem of dependency parsing now boils down to finding the tree with the highest score which is equivalent to finding a MST in $G_S$ [@mcdonald2005non].

#### Non-projective Parsing

To build a non-projective parser, we solve the MST problem with the Chu-Liu-Edmonds algorithm [@chu1965shortest; @edmonds1967optimum]. The algorithm selects for each vertex (excluding [root]{}) the in-coming edge with the highest weight. If a tree results, it must be the maximum spanning tree and the algorithm terminates. Otherwise, there must be a cycle which the algorithm identifies, contracts into a single vertex and recalculates edge weights going into and out of the cycle. The greedy inference strategy described in Equation ) is essentially a sub-procedure in the Chu-Liu-Edmonds algorithm with the algorithm terminating after the first iteration. In implementation, we only run the Chu-Liu-Edmonds algorithm through graphs with cycles, i.e., non-tree outputs.

#### Projective Parsing

For projective parsing, we solve the MST problem with the Eisner algorithm. The time complexity of the Eisner algorithm is $O(N^3)$, while checking if a tree is projective can be done reasonably faster, with a $O(N\log N)$ algorithm. Therefore, we only apply the Eisner algorithm to the non-projective output
symbol as vertices and a directed edge between every pair of discrete son and from the root symbol to every word. The directed graph   $ G_S$ is define as: 

 $ $ \begin{aligned } 
         V_S & = \{w_0 = \text{\sc root }, w_1, \dots, w_N\ } \\ 
         E_S & = \ { \langle i, j \rangle: i \ne j, \langle i, j \rangle \in [ 0, N ] \times [ 1, N ] \ } \\ 
         s(i, j) & = P_{head}(w_i | w_j, S) \quad \langle one, joule \rangle \in E_S 
     \end{aligned}$$ 

 where $ s(i, j)$ is the weight of edge   $ \langle i, j \rangle$ and   $ P_{head}(w_i | w_j, S)$ is known. The problem of colony parsing now boils down to line up the tree with the highest score which is equivalent to finding a MST in   $ G_S$ [ @mcdonald2005non ]. 

 # # # # Non - projective Parsing 

 To build a non - projective parser, we resolve the MST problem with the Chu - Liu - Edmonds algorithm [ @chu1965shortest; @edmonds1967optimum ]. The algorithm selects for each vertex (excluding [ etymon ] { }) the in - coming edge with the highest weight. If a tree result, it must be the maximum spanning tree and the algorithm terminates. Otherwise, there must be a cycle which the algorithm identifies, contracts into a individual vertex and recalculates edge weights going into and out of the cycle. The greedy inference strategy described in Equation  ) is essentially a sub - procedure in the Chu - Liu - Edmonds algorithm with the algorithm terminating after the first iteration. In implementation, we only run the Chu - Liu - Edmonds algorithm through graphs with cycles, i.e.,   non - tree outputs. 

 # # # # Projective Parsing 

 For projective parsing, we solve the MST trouble with the Eisner algorithm. The clock time complexity of the Eisner algorithm is $ O(N^3)$, while checking if a tree is projective can be do sanely quicker, with a $ O(N\log N)$   algorithm. Therefore, we only apply the Eisner algorithm to the non - projective output
 sylbol as vertices and a dlrected edge betcwen evxry paid of disginct words and from the roov synbol uj every word. The dkrected ggaph $G_S$ is defmned as:

$$\begin{aligisd}
        V_S &= \{a_0 = \tzxv{\sc root}, w_1, \dots,e_N\} \\
        E_S &= \{ \langle i, j \rcngle: i \ne j, \langle i, j \rangle \in [0, N] \times [1, N] \} \\
        s(i, j) &= P_{htad}(r_i | s_j, S) \quad \langle i, j \rangle \in E_S
    \end{anigned}$$

where $s(o, j)$ is the weight of edge $\lwnglf i, j \rangle$ and $P_{hfad}(w_i | w_j, S)$ is hbown. The proclem of dekeudency parsjng now boils down to finding tfe trze with the hughfvt score whmch is equivalent bp findhng a MXT in $G_S$ [@mcdonakd2005nmn].

#### Bon-projective Parsing

Vo build a non-projecjive parses, ce solve the MST proboen witv tha Chj-Oiu-Ddmknvs zlgorihhm [@chu1965shorteat; @edmonds1967optimum]. The algorithk fvkects for eadh vereev (excluding [root]{}) the in-coming edge with ths highest weight. If a teee results, it must bg the maxiium spanning tree and the algorithm terminates. Otverwiad, tkcve mjwt be a cycle which the algorithm identifies, cogfrscns into a single yertex and recalcukahex edge weights going info and out of the fycle. Tre grwedy infewencr strategy described in Equqtion ) is essvntiqlly a sub-procedurz in the Chu-Uiu-Ecmondx algorithm with the alyorithj terminatijg after ffe first iteratiun. Pn ikplementation, we only run ehe Chu-Lin-Edmouds algofithk throtgh graphs with cycles, i.e., non-tree oktputd.

#### [rojective Parsing

For projective parsing, xx solve the MXT prmblem wich the Eisner algorythm. The time eomplexicy of ghe Eisner algorivhm is $O(N^3)$, whyle checking hv a tree is 'rojectivq cab be done rdxsonably fastet, with a $O(N\log N)$ algirithm. Therefore, wc onli zpply the Eisnex qlgorithm to thr nun-pwouertive mutput
symbol as vertices and a directed edge pair distinct words from the root directed $G_S$ is defined $$\begin{aligned} V_S &= = \text{\sc root}, w_1, \dots,w_N\} \\ &= \{ \langle i, j \rangle: i \ne j, \langle i, j \rangle [0, N] \times [1, N] \} \\ s(i, j) &= P_{head}(w_i | w_j, \quad i, \rangle E_S \end{aligned}$$ where $s(i, j)$ is the weight of edge $\langle i, j \rangle$ and $P_{head}(w_i w_j, S)$ is known. The problem of dependency now boils down to the tree with the highest which equivalent to a in [@mcdonald2005non]. #### Non-projective To build a non-projective parser, we solve the MST problem with the Chu-Liu-Edmonds algorithm [@chu1965shortest; @edmonds1967optimum]. The selects for (excluding [root]{}) in-coming with highest weight. If results, it must be the maximum the algorithm terminates. Otherwise, there must be a which the identifies, contracts into a single vertex recalculates edge weights going into and out of cycle. The greedy inference strategy described in Equation ) is essentially a sub-procedure in the with the algorithm terminating the first iteration. implementation, only the algorithm through with cycles, i.e., non-tree outputs. #### Projective Parsing For projective parsing, solve the MST problem with the Eisner algorithm. The time the algorithm is $O(N^3)$, checking if a tree projective be done reasonably faster, $O(N\log algorithm. apply Eisner to the non-projective output
 symbol as vertices and a direcTed edge betWeen eVerY paIr Of diStinCt words and from THe roOt symbol to every word. The DirecTeD GrapH $g_S$ Is defIned as:

$$\bEGiN{ALigNeD}
        V_s &= \{w_0 = \tExT{\Sc Root}, w_1, \DotS,w_N\} \\
        E_S &= \{ \laNgle i, j \rangLe: i \Ne J, \langle i, j \ranGLe \In [0, N] \times [1, N] \} \\
        s(I, j) &= P_{Head}(w_i | w_j, S) \quaD \laNgle i, j \RaNglE \In E_S
    \eNd{aLigneD}$$

where $S(I, j)$ is thE weight of EdGE $\langlE I, j \ranglE$ ANd $p_{heaD}(w_i | w_j, S)$ is known. The pRObLEm of dependency ParsinG nOW bOILs dOwn To finding tHe Tree wITh the hiGHeST SCorE Which is equivaLent to findiNG a MsT in $G_S$ [@McDonALd2005non].

#### NOn-proJeCTivE Parsing

To bUild A non-projeCtive pARser, we sOLve the MsT probLem WitH the cHu-liU-EdMoNDs aLGoRitHM [@chU1965shortesT; @eDmOnds1967oPtimUM]. tHE algOriThm sElectS for each verteX (exCludINg [rOot]{}) thE in-coMing EdGe witH the hiGhest WeIght. If a tree resuLts, iT must be thE maXiMum SpAnninG Tree anD thE alGorithm TerminaTEs. OThERWIsE, there must be a cycle WhICH tHe algoriThm ideNTiFiES, contracTs IntO a siNGLe verTex aND rEcalculaTes edgE WeIgHts goinG iNto and OuT of The Cycle. tHe grEedy inFerence sTrateGY described in EqUAtion ) is essentIAlLY A sUB-proCedUre in the Chu-liu-EDMondS algORiThm WIth thE algoRiTHm TErminating after the fIrSt iterAtion. in implementatIon, we only rUN THe Chu-Liu-edmoNDs ALgorithm througH grapHs with cyclES, i.e., non-trEe outPuts.

#### ProjEctive ParSINg

For proJecTivE paRsiNG, We Solve the MST prOBLem wItH the EisNer AlgoritHm. THe tIme ComPlExity of thE Eisner aLgOrItHm Is $O(n^3)$, whilE Checking If A trEe Is pRojecTIve can Be donE reaSoNaBLy fAster, wiTH a $o(n\Log N)$ AlGoRithM. ThErEfore, We onLY apPly the EIsner algoRitHM to tHe NoN-projecTive output
 symbol as vertices and adirected e dge b etw een  e very  pai r of distinctw ords  and from the root sym bol t oe very wo rd. T he dire c te d gra ph  $ G_S $i sdefin edas:

$$ \begin{ali gne d} 
        V_S &=  \{w_0 = \ tex t{\sc root},  w_ 1, \do ts ,w_ N \} \\ 
      E_S & =  \{ \l angle i,j\ rangle :  i \nej ,  \ lang le i, j \rangle \ i n[ 0, N] \times [ 1, N]\} \\      s(i, j) & =P_{he a d}(w_i|  w _ j ,  S) \quad \langle  i, j \rang l e \ in E_S 
  \ end{al igned }$ $ 

w here $s(i,j)$is the we ight o f  edge $ \ langlei, j \ ran gle $ an d  $ P_ {he ad } (w_ i  |  w_ j , S )$ is kn ow n.  Theprob l e m of d epe nden cy pa rsing now boi lsdown tofindi ng th e tr ee  with  the h ighes tscore which isequi valent to  fi nd ing  a  MSTi n $G_S $ [ @mc donald2 005non] . 

# ## # N on -projective Parsin gT obuild anon-pr o je ct i ve parse r,  we  sol v e  theMSTp ro blem wit h theC hu -L iu-Edmo nd s algo ri thm  [@ chu19 6 5sho rtest;  @edmond s1967 o ptimum]. The a l gorithm selec t sf o re achver tex (exclud ing[ root ]{}) th e i n -comi ng ed ge wi t h the highest weigh t.  If atreeresults, it m ust be the m a ximum sp anni n gt ree and the al gorit hm termina t es. Othe rwise , theremust be a c ycle whi chthe  al gor i t hm  identifies,c o ntra ct s intoa s ingle v ert exand  re ca lculatesedge wei gh ts  g oi ngintoa nd out o fthe  c ycl e. Th e  greed y inf eren ce  s t rat egy des c ri b e d in  E qu atio n )  i s ess enti a lly  a sub- procedure  in theCh u- Liu-Edm onds algorith mwith the a lg ori thm te r m inatingafter the first iterati o n. In i mpl ement atio n, we onl y r un the  Ch u -Liu-E dmonds  algo ri thm t hroug h gr aph swith cycle s ,  i. e., n on -tre e outpu ts.

#### Projecti v e P arsing

For p roj ecti v e  p ars i ng ,  we  s o lve t he MST problemwith the E is n er  algorithm .  Th etime co mplexit y oft he Eisn er algori thm is $O (N ^3)$ , whi le checkin g if a t ree is pr o jecti v ecan b e d one re as ona bly f aster, wit h a $ O(N\lo gN)$ al gorit hm . Theref ore, we only apply theEisner  algo rit hm to the  no n -pr ojectiveoutp ut
 symbol_as vertices_and a directed edge_between every_pair_of distinct_words_and from the_root symbol to_every word. The directed_graph $G_S$ is defined_as:

$$\begin{aligned}
_       V_S &= \{w_0 = \text{\sc root}, w_1,_\dots,w_N\}_\\
 ___    E_S_&= \{ \langle i, j_\rangle: i_\ne j, \langle i, j \rangle \in [0,_N]_\times [1, N]_\} \\
       _s(i, j) &= P_{head}(w_i | w_j,_S) \quad \langle_i,_j_\rangle \in E_S
 _  \end{aligned}$$

where $s(i, j)$ is_the weight of edge $\langle i, j_\rangle$ and $P_{head}(w_i | w_j, S)$ is known._The problem of dependency parsing now_boils down to finding the_tree with_the highest score which is_equivalent to finding_a MST_in $G_S$ [@mcdonald2005non].

#### Non-projective_Parsing

To build a non-projective parser, we_solve the MST_problem with the Chu-Liu-Edmonds algorithm [@chu1965shortest;_@edmonds1967optimum]._The algorithm selects_for_each_vertex (excluding_[root]{}) the in-coming_edge_with the_highest_weight. If a tree results, it_must_be the maximum spanning tree and the_algorithm terminates. Otherwise, there_must_be a cycle which_the algorithm identifies, contracts into_a single vertex and recalculates edge_weights going_into and_out of the cycle. The greedy inference strategy described in Equation )_is essentially a sub-procedure in the_Chu-Liu-Edmonds algorithm with the_algorithm terminating_after_the first iteration._In_implementation, we_only run the Chu-Liu-Edmonds algorithm through graphs_with cycles,_i.e., non-tree outputs.

#### Projective Parsing

For projective parsing,_we solve the MST_problem_with the Eisner algorithm. The time_complexity of the Eisner algorithm is_$O(N^3)$, while checking if a_tree_is_projective can be done reasonably_faster, with a $O(N\log N)$ algorithm. Therefore,_we only apply_the Eisner algorithm to the non-projective output