  Dotsenko and Vallette discovered an extension to nonsymmetric operads of
Buchberger's algorithm for Gr\"obner bases of polynomial ideals. In the free
nonsymmetric operad with one ternary operation $({\ast}{\ast}{\ast})$, we
compute a Gr\"obner basis for the ideal generated by partial associativity
$((abc)de) + (a(bcd)e) + (ab(cde)$. In the category of $\mathbb{Z}$-graded
vector spaces with Koszul signs, the (homological) degree of
$({\ast}{\ast}{\ast})$ may be even or odd. We use the Gr\"obner bases to
calculate the dimension formulas for these operads.
