> Where does "grams" in "n-grams" come from?
< Ancient Greek γράμμα (grámma, "letter; something written"), used both in Classical derivations (anagram, epigram, program) and in new coinages (telegram). The specific sense of "word consisting of N characters" is slightly post-Classical, first attested in monogram (< Latin monogrammum < Byzantine Greek μονόγραμμον), but productive in English: bigram, trigram, tetragram (~=tetragrammaton), pentagram, etc.
> How is "BP" calculated in "n-grams"?
I don't know what you mean by BP in this context