Bosonic and fermionic representations of Lie algebra central extensions