This is a simple NLTK Python script which uses N-grams to construct phrases from a generative language model trained on the King James Bible.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SPHINXBUILD = sphinx-build | |
BUILDDIR = _build | |
SPHINXOPTS = -d $(BUILDDIR)/doctrees . | |
all: html | |
html: | |
$(SPHINXBUILD) -b html $(SPHINXOPTS) $(BUILDDIR)/html | |
@echo | |
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Bayesian Generative Classifier | |
------------------------------ | |
""" | |
# Author: Jake Vanderplas <jakevdp@cs.washington.edu> | |
import numpy as np | |
from sklearn.neighbors.kde import KernelDensity | |
from sklearn.mixture import GMM | |
from sklearn.base import BaseEstimator, clone |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
license: MIT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
license: MIT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
license: MIT |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
seed | count | |
---|---|---|
0 | 8094 | |
1 | 6700 | |
2 | 1232 | |
3 | 575 | |
4 | 474 | |
5 | 450 | |
6 | 128 | |
7 | 464 | |
8 | 132 |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.