Given a closed surface of genus $g\geq 2$, we know that the mapping class group $Mod(S)$ is generated by the Dehn twists. My question is

**Given an element as a product of Dehn twist, is it possible to write down the corresponding Nielsen-Thurston decomposition?**

Explicitly, suppose $\phi\in Mod(S)$ such that $\phi=\prod_{i=1}^nT_{x_i}^{k_i}$ where $x_i$'s are simple closed curves, $T_{x_i}$ is the left Dehn twist about $x_i$ and $k_i\in\mathbb{Z}$. Given this data, is it possible to write down the Nielsen-Thurston decomposition of $\phi.$

PS: Rivin's comment have helped me to find this exact link.