GithubHelp home page GithubHelp logo

Comments (3)

Newmu avatar Newmu commented on May 19, 2024 4

2388 is the unit visualized and the single experiment results are reported on in the paper

from generating-reviews-discovering-sentiment.

dthiagarajan avatar dthiagarajan commented on May 19, 2024 1

Referenced in #3 - it's something to do with how HTMLParser.HTMLParser().unescape(text) works. I ran into the same problem trying it with Python 2, but wasn't able to resolve it.

from generating-reviews-discovering-sentiment.

bitliner avatar bitliner commented on May 19, 2024

Extracting the 2388-th does not work for me. I always get 0 as value.

I used examples that are predicted as positive in the paper.

Example:

if __name__ == '__main__':
    mdl = Model()
    text = [
        'too bad!', 
        'it was so cool, beautiful', 
        'the screenplay and the directing were horrendous', 
        'best books'
    ]
    text_features = mdl.transform(text)
    print('shape')
    print(text_features.shape)
    sentiment = text_features[:, 2388]
    print('sentiment')
    print(sentiment)

Result:

0.000 seconds to transform 4 examples
shape
(4, 4096)
sentiment
[ 0.  0.  0.  0.]

Apparently I get 0. for every value of the feature vector extracted, there must be an error somewhere else I guess, looking for it.

from generating-reviews-discovering-sentiment.

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.