koaning / cluestar Goto Github PK
View Code? Open in Web Editor NEWGain clues from clustering!
Home Page: https://koaning.github.io/cluestar/
License: MIT License
Gain clues from clustering!
Home Page: https://koaning.github.io/cluestar/
License: MIT License
Hi. I'm providing the same type of data and using the same code as inside the Notebook of example and I'm getting this error. What could be wrong? I get the following error: ValueError: You must give this preprocessor text as input.
. I tried to debug but couldn't find out how to solve it. Any clues what's going on?
# Transforming data:
import re
import pandas as pd
import nltk
df = pd.read_csv('buscas_consecutivas.csv', sep = ',')
df["full"] = df["query"] + ' ' + df["next_query"]
rule = r"(?<!\w\.\w.)(?<![A-Z][a-z]\.)(?<=\.|\?)\s"
texts = df.loc[:5000, "full"].apply(lambda x: re.split(rule, x))
texts = [''.join(ele) for ele in texts]```
# Transformed data:
texts[:3]
['lg k 22 celular lg k 22',
'estantes estantes de acoestante colorida',
'porquinho cozinha porquinho saleiro']
# Runing the pipeline:
from sklearn.pipeline import make_pipeline
from sklearn.feature_extraction.text import TfidfVectorizer
from sklearn.decomposition import TruncatedSVD
import umap
from whatlies.language import UniversalSentenceLanguage
from cluestar import plot_text
pipe = make_pipeline(TfidfVectorizer(),
UniversalSentenceLanguage(variant='multi'),
umap.UMAP()
)
X = pipe.fit_transform(texts)
plot_text(X, texts, color_words=["vinho", "camisa", "tinta", "whiskey"])
Hello!
I really like this package. It would be great to use these interactive plots in Streamlit apps. Is this currently possible?
Thanks!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.