Basicity of binary hydrogen compounds

Basic compounds have an atom with a nonbonding pair that can form a bond to H+.
 
E: +  H+ E–H

Hydride ion (:H) and the molecular binary compounds of hydrogen below have a nonbonding electron pair.

In more basic compounds the electron pair is more available to form a bond with H+. The trend in the basicity of molecular hydrogen-containing compounds is opposite to the trend in acidity of the same compounds.
 
The basicity of the binary molecular compounds of hydrogen is lower for those containing more electronegative elements. These elements attract their electron pairs strongly, and make them less available for reaction. Basicity does NOT depend on the number of nonbonding electron pairs.

NH3 is more basic than water but much less basic than :H.

NH3 is classed as a weak base as it reacts with water to  less than 5%.