Barannikov and Kontsevich [Frobenius manifolds and formality of Lie algebras of polyvector fields. Int. Math. Res. Not. IMRN1998(4) (1998), 201–215], constructed a DGBV (differential Gerstenhaber–Batalin–Vilkovisky) algebra  $\mathbf{t}$ for a compact smooth Calabi–Yau complex manifold
$\mathbf{t}$ for a compact smooth Calabi–Yau complex manifold  $M$ of dimension
$M$ of dimension  $m$, which gives rise to the
$m$, which gives rise to the  $B$-side formal Frobenius manifold structure in the homological mirror symmetry conjecture. The cohomology of the DGBV algebra
$B$-side formal Frobenius manifold structure in the homological mirror symmetry conjecture. The cohomology of the DGBV algebra  $\mathbf{t}$ is isomorphic to the total singular cohomology
$\mathbf{t}$ is isomorphic to the total singular cohomology  $H^{\bullet }(M)=\bigoplus _{k=0}^{2m}H^{k}(M,\mathbb{C})$ of
$H^{\bullet }(M)=\bigoplus _{k=0}^{2m}H^{k}(M,\mathbb{C})$ of  $M$. If
$M$. If  $M=X_{G}(\mathbb{C})$, where
$M=X_{G}(\mathbb{C})$, where  $X_{G}$ is the hypersurface defined by a homogeneous polynomial
$X_{G}$ is the hypersurface defined by a homogeneous polynomial  $G(\text{}\underline{x})$ in the projective space
$G(\text{}\underline{x})$ in the projective space  $\mathbb{P}^{n}$, then we give a purely algorithmic construction of a DGBV algebra
$\mathbb{P}^{n}$, then we give a purely algorithmic construction of a DGBV algebra  ${\mathcal{A}}_{U}$, which computes the primitive part
${\mathcal{A}}_{U}$, which computes the primitive part  $\bigoplus _{k=0}^{m}\mathbf{PH}^{k}$ of the middle-dimensional cohomology
$\bigoplus _{k=0}^{m}\mathbf{PH}^{k}$ of the middle-dimensional cohomology  $\bigoplus _{k=0}^{m}H^{k}(M,\mathbb{C})$, using the de Rham cohomology of the hypersurface complement
$\bigoplus _{k=0}^{m}H^{k}(M,\mathbb{C})$, using the de Rham cohomology of the hypersurface complement  $U_{G}:=\mathbb{P}^{n}\setminus X_{G}$ and the residue isomorphism from
$U_{G}:=\mathbb{P}^{n}\setminus X_{G}$ and the residue isomorphism from  $H_{\text{dR}}^{k}(U_{G}/\mathbb{C})$ to
$H_{\text{dR}}^{k}(U_{G}/\mathbb{C})$ to  $\mathbf{PH}^{k}$. We observe that the DGBV algebra
$\mathbf{PH}^{k}$. We observe that the DGBV algebra  ${\mathcal{A}}_{U}$ still makes sense even for a singular projective Calabi–Yau hypersurface, i.e.
${\mathcal{A}}_{U}$ still makes sense even for a singular projective Calabi–Yau hypersurface, i.e.  ${\mathcal{A}}_{U}$ computes
${\mathcal{A}}_{U}$ computes  $\bigoplus _{k=0}^{m}H_{\text{dR}}^{k}(U_{G}/\mathbb{C})$ even for a singular
$\bigoplus _{k=0}^{m}H_{\text{dR}}^{k}(U_{G}/\mathbb{C})$ even for a singular  $X_{G}$. Moreover, we give a precise relationship between
$X_{G}$. Moreover, we give a precise relationship between  ${\mathcal{A}}_{U}$ and
${\mathcal{A}}_{U}$ and  $\mathbf{t}$ when
$\mathbf{t}$ when  $X_{G}$ is smooth in
$X_{G}$ is smooth in  $\mathbf{P}^{n}$.
$\mathbf{P}^{n}$.