plot_ngrams
Plot n-gram frequencies. The text for the plot is extracted from
the column named corpus
. If there is no column with that name,
an exception is raised. If the documents are not tokenized, the
words are separated by spaces.
Parameters: |
ngram: str or int, optional (default="bigram")
index: int, str, sequence or None, optional (default=None)
show: int, optional (default=10)
title: str or None, optional (default=None)
figsize: tuple, optional (default=None)
filename: str or None, optional (default=None)
display: bool or None, optional (default=True) |
Returns: |
matplotlib.figure.Figure Plot object. Only returned if display=None .
|
Example
from atom import ATOMClassifier
atom = ATOMClassifier(X_text, y_text)
atom.textclean()
atom.plot_ngrams("bigrams")