  The layered compound $\mathrm{Ta_2NiSe_5}$ is a quasi-one-dimensional and
narrow-gap semiconductor, which is proposed to undergo a transition to an
excitonic insulator at $T_\mathrm{c}=326$ K. We found a clear anomaly at
$T_\mathrm{c}$ in the in-plane thermal conductivities both parallel
($\parallel$ $a$) and perpendicular ($\parallel$ $c$) to the one-dimensional
chains, $\kappa_\mathrm{a}$ and $\kappa_\mathrm{c}$. While $\kappa_\mathrm{a}$
shows a rapid decrease below $T_\mathrm{c}$, $\kappa_\mathrm{c}$ shows a
pronounced V-shaped suppression centered at $T_\mathrm{c}$. We argue that the
decrease of $\kappa_\mathrm{a}$ represents the suppression of the quasiparticle
contribution below $T_\mathrm{c}$ due to excitonic condensation. On the other
hand, the V-shaped suppression of $\kappa_\mathrm{c}$ comes from the enhanced
phonon scattering by soft phonons associated with the monoclinic transition
with momentum $\mathbf{q}\parallel c$. The continued suppression of
$\kappa_\mathrm{c}$ up to an extremely high temperature above $T_\mathrm{c}$
suggests the persistence of phonon softening likely coupled to electronic,
presumably excitonic, fluctuations.
