Git Product home page Git Product logo

Comments (2)

rspeer avatar rspeer commented on August 9, 2024

Well, in this particular example, you seem to have found a flaw in the documentation. I might have waffled at the last minute about whether 'this' was a stopword. I should fix that. Fortunately, the standardization is about to get a lot simpler, as I found that stemming isn't necessary on ConceptNet 5.5.

When it comes to turning a sentence into a list of concepts, that's a slightly different thing. You can avoid a lot of complexity by sticking with single-word terms. (Multi-word phrases are valuable, but a process for looking them up can come later.) And you'd probably rather not put too much weight on the frequent words like 'is' or 'an', regardless of whether they'd be dropped from a multi-word concept.

I've applied this version of Conceptnet Numberbatch directly to the Story Cloze test, and it worked well compared to many other methods (despite having no representation of events or even word order). What I did -- and this is not at all standardized, and quite prone to tweaking -- is to weight the words by their log inverse frequency. You've already got wordfreq as a dependency of ConceptNet, so you can:

  • Tokenize the text with wordfreq.tokenize
  • Give each token a weight of -log(wordfreq.word_frequency(word, 'en', 'large', default=1e-9))

from conceptnet-numberbatch.

eng1neer avatar eng1neer commented on August 9, 2024

@rspeer

I see, will stick to single words for now.

Thanks for the insight on how to weight the words with wordfreq!

from conceptnet-numberbatch.

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.