Understanding how to calculate $P(x|c_k)$ for the Bernoulli naïve Bayes classifier
Bernoulli naïve Bayes  

$P(x|c_k) = \prod^{n}_{i=1} p^{x_i}_{ki} (1-p_{ki})^{(1-x_i)}$

Let's examine the example of document classification.
Let K different text classes and n different terms that our vocabulary contains. $x_i$  are boolean variables (0, 1) expressing if the $i^{th}$ term exists in document x. x is a vector of dimension n.    

$P(x|c_k)$ is the probability that given the class k, document x to be generated. The equation uses a common trick to represent a multivariate Bernoulli event model, taking into account that when $x_i = 1$, then $1 - x_i = 0$ and inversely. In other words, for each term it takes the probability that the document does contain this term or it does not. 

$p_{ki}$ is the probability of class $c_k$ generating the term $x_i$, that is it could be the prior probability a document that belongs to k class contains this term of the vocabulary.