Git Product home page Git Product logo

Comments (2)

vacant2011 avatar vacant2011 commented on July 21, 2024

另外,请问这部分
total * v / (ngrams[j].get(w[:j+1], total) * ngrams[i-j-1].get(w[j+1:], total))
我理解分母的两个乘数,应该是大于等于v的,所以default值理论上应该设为v,为什么这里设为了total呢?

from word-discovery.

vacant2011 avatar vacant2011 commented on July 21, 2024

还有一个问题,加载ngram这里:
for j in range(len(c)): self.ngrams[j][c[:j+1]] = self.ngrams[j].get(c[:j+1], 0) + n
是否有重复计算的问题?c的组成部分,应该已经被计算过了吧?为什么还要把它部分的n累加一次?我理解这里应该直接是:
self.ngrams[len(c)][c] = n

from word-discovery.

Related Issues (12)

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.