Giter VIP home page Giter VIP logo

Comments (3)

olekscode avatar olekscode commented on June 18, 2024

Hello @myroslavarm,
Could you provide a use case scenario in which you need to access the table of n-gram counts?
Because this table is hidden by design: it is an implementation detail of the NgramModel which should not be accessible through public API

from ngrammodel.

myroslavarm avatar myroslavarm commented on June 18, 2024

The use case i had in mind was to be able to access the table in order to cut off some of the results (for example, if you want to leave only the results with frequencies above a certain threshold). If this is by design and you don't want people to modify the tables for their own use, then maybe there should be some implementation from within the ngram model that would handle cases like this.

from ngrammodel.

olekscode avatar olekscode commented on June 18, 2024

OK. You are right! But the private properties should not be accessible from outside. The way I see it (I might be wrong), it is the responsibility of the NgramModel to perform the filtering after (or as part of) the training.

So you have two options:

  1. Create a subclass of NgramModel and add the filtering functionality to this class
  2. Update the current implementation of NgramModel and make a PR.

I think you should do the latter because indeed the filtering option could be very useful for many applications of the NgramModel.

from ngrammodel.

Related Issues (19)

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.