Code Monkey home page Code Monkey logo

Comments (5)

plison avatar plison commented on June 12, 2024

Well, the sentiment analysis code is an example of text classification. More generally, you can do classification simply by implementing labelling functions that create spans covering the entire text (that is, from 0 to len(doc)), and then running the aggregation. Then only thing you have to remember is to set the argument sequence_labelling to False.

from skweak.

nlpravi avatar nlpravi commented on June 12, 2024

Thank you.

from skweak.

hiteshpara avatar hiteshpara commented on June 12, 2024

Hi, @plison I have a quick question,
To find the sentiment of sentences we many many libraries from markets like TextBlob, NLTK, Transformers, Flair...etc.
so when we don't have labeled data to train the sentiment analysis model we can get the labels from those libraries. and then we can train our model.
and how can I get labels to my domain data?
for ex: I have text like "my printer is not working" and I want to label it as "Hardware problem".
How can I achieve this with Skweak? Is there any demo code for that kind of labeling?

from skweak.

plison avatar plison commented on June 12, 2024

Well, to label your data with domain-specific labels (such as HardwareProblem), you can either write some heuristic rules (such as a rule stating that, if the word "printer" occurs in the sentence, it is likely to be a hardware problem), or have crowdsourcing annotators label those by hand. If you have several of those heuristics / annotators applied to the same texts, you can then use skweak to aggregate their predictions and get a single annotation layer that merges all of them together. Then, the only remaining step is to learn a classical neural classification model (like a language model with a text classification head) based on those aggregated annotations.

from skweak.

hiteshpara avatar hiteshpara commented on June 12, 2024

from skweak.

Related Issues (20)

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.