Dipole screening regime for pyroelectric and ferroelectric films and grains in semiconductor matrix