This file contains hidden or 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
| import nltk | |
| import numpy as np | |
| from sklearn.feature_extraction.text import CountVectorizer | |
| from sklearn.decomposition import LatentDirichletAllocation | |
| def print_top_words(model, feature_names, n_top_words): | |
| for topic_idx, topic in enumerate(model.components_): | |
| message = "Topic #%d: " % topic_idx | |
| message += " ".join([feature_names[i] + " (" + str(round(topic[i], 2)) + ")" | |
| for i in topic.argsort()[:-n_top_words - 1:-1]]) |
This file contains hidden or 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
| presto> explain (type distributed, format json) select * from example.example.numbers; | |
| Query Plan | |
| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | |
| [ { | |
| "id" : "5", | |
| "name" : "Output", | |
| "identifier" : "[text, value]", | |
| "details" : "", | |
| "children" : [ { | |
| "id" : "63", |
OlderNewer