Code Monkey home page Code Monkey logo

cluestar's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

cluestar's Issues

ValueError: You must give this preprocessor text as input.

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"])

Embed within Streamlit?

Hello!
I really like this package. It would be great to use these interactive plots in Streamlit apps. Is this currently possible?
Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.