Many thanks. I've learned much from this topic. With your hints, I've now come up with three modified approaches to solve the problem successfully, which are summed up as follows:
Method 1)
>>> import nltk
>>> def FreqBigram5(text):
bigrams = nltk.bigrams(text)
stopwords = nltk.corpus.stopwords.words('english')
filtered=[]
for pairs in bigrams:
if pairs[0].lower() in stopwords or pairs[1].lower() in stopwords:
continue
filtered.append(pairs)
fdist = nltk.FreqDist(filtered)
print fdist.keys()[:50]
>>> text = nltk.corpus.brown.words(categories = 'news')
>>> FreqBigram5(text)
[("''", '.'), ('.', '``'), ("''", ','), (';', ';'), (',', '``'), ('said', '.'), (',', 'Mrs.'), ('said', ','), ('.', 'Mr.'), (',', 'said'), ('New', 'York'), ('per', 'cent'), ('.', 'Mrs.'), (':', '``'), ('?', '?'), ('United', 'States'), ('year', '.'), (',', 'however'), ('last', 'year'), ('however', ','), (',', 'Mr.'), ('White', 'House'), ('last', 'week'), ('Jr.', ','), (')', '--'), ('week', '.'), (')', '.'), ('home', 'runs'), (',', 'according'), ('.', '('), ('.', 'One'), ("''", '?'), (')', ','), ('U.', 'S.'), ('year', ','), ('!', '!'), (',', 'including'), (',', 'would'), ('President', 'Kennedy'), ('years', '.'), ('daughter', ','), ('last', 'night'), (',', 'president'), (',', 'says'), ('wife', ','), ('San', 'Francisco'), ('time', ','), ('time', '.'), ('years', 'ago'), ('(', 'AP')]
Method 2)
>>> def FreqBigram5(text):
bigrams = nltk.bigrams(text)
stopwords = nltk.corpus.stopwords.words('english')
pairs = [p for p in bigrams if p[0].lower() not in stopwords and p[1].lower()not in stopwords]
fdist= nltk.FreqDist(pairs)
print fdist.keys()[:50]
>>> text = nltk.corpus.brown.words(categories = 'news')
>>> FreqBigram5(text)
[("''", '.'), ('.', '``'), ("''", ','), (';', ';'), (',', '``'), ('said', '.'), (',', 'Mrs.'), ('said', ','), ('.', 'Mr.'), (',', 'said'), ('New', 'York'), ('per', 'cent'), ('.', 'Mrs.'), (':', '``'), ('?', '?'), ('United', 'States'), ('year', '.'), (',', 'however'), ('last', 'year'), ('however', ','), (',', 'Mr.'), ('White', 'House'), ('last', 'week'), ('Jr.', ','), (')', '--'), ('week', '.'), (')', '.'), ('home', 'runs'), (',', 'according'), ('.', '('), ('.', 'One'), ("''", '?'), (')', ','), ('U.', 'S.'), ('year', ','), ('!', '!'), (',', 'including'), (',', 'would'), ('President', 'Kennedy'), ('years', '.'), ('daughter', ','), ('last', 'night'), (',', 'president'), (',', 'says'), ('wife', ','), ('San', 'Francisco'), ('time', ','), ('time', '.'), ('years', 'ago'), ('(', 'AP')]
Method 3)
>>> def FreqBigram5(text):
bigrams = nltk.bigrams(text)
stopwords = nltk.corpus.stopwords.words('english')
pairs = [tup for tup in bigrams if not False in [False for wrd in tup if wrd.lower() in stopwords]]
fdist = nltk.FreqDist(pairs)
print fdist.keys()[:50]
>>> text = nltk.corpus.brown.words(categories = 'news')
>>> FreqBigram5(text)
[("''", '.'), ('.', '``'), ("''", ','), (';', ';'), (',', '``'), ('said', '.'), (',', 'Mrs.'), ('said', ','), ('.', 'Mr.'), (',', 'said'), ('New', 'York'), ('per', 'cent'), ('.', 'Mrs.'), (':', '``'), ('?', '?'), ('United', 'States'), ('year', '.'), (',', 'however'), ('last', 'year'), ('however', ','), (',', 'Mr.'), ('White', 'House'), ('last', 'week'), ('Jr.', ','), (')', '--'), ('week', '.'), (')', '.'), ('home', 'runs'), (',', 'according'), ('.', '('), ('.', 'One'), ("''", '?'), (')', ','), ('U.', 'S.'), ('year', ','), ('!', '!'), (',', 'including'), (',', 'would'), ('President', 'Kennedy'), ('years', '.'), ('daughter', ','), ('last', 'night'), (',', 'president'), (',', 'says'), ('wife', ','), ('San', 'Francisco'), ('time', ','), ('time', '.'), ('years', 'ago'), ('(', 'AP')]