Git Product home page Git Product logo

Comments (4)

misner5 avatar misner5 commented on May 28, 2024 1

Ok... yah I was able to get point 1 to work with a bit of tinkering in count.cpp.
The 2 command lines I was running are:

./count ../test_data/1Billion.1M 1 --tmp tmp_dir --ram 0.25 --out 1-grams
./count ../test_data/1Billion.1M 2 --tmp tmp_dir --ram 0.25 --out 2-grams

I just modified the code that was blocking that on lines 53-56:

    if (config.max_order < 1 or config.max_order > global::max_order) {
        std::cerr << "invalid language model order" << std::endl;
        return 1;
    }

After I did that it all worked ok... for some reason it was blocking n-grams <= 2

If you're interested I can show you the project we're working on using this tool... you might find it interesting... I'll contact you directly for that.

Cheers and thanks again for all you hard work and open source contributions in this area,
Michael

from tongrams_estimation.

misner5 avatar misner5 commented on May 28, 2024

Just reflecting on this, I guess you kind of have this information in the "arpa" file output in Tongrams.
But it would be useful for that kind of information with counts.

from tongrams_estimation.

jermp avatar jermp commented on May 28, 2024

Hello @misner5,
and thank you for your kind words. Happy to know you found Tongrams useful.

I may have not understood what you mean in point 1 above. The n-gram length (i.e., the "n") is an input for the tool. So if you specify n=2 then you count n-grams of 1 and 2 words as you say. By default, I'm counting all n-grams of length 1..n.

Feature 2 could be nice to add. Right now I'm counting everything without pruning as it seems what it is done by other tools like KenLM.

Best,
-Giulio

from tongrams_estimation.

jermp avatar jermp commented on May 28, 2024

Hi @misner5, good to know you got what you wanted.
Thank you for your message! I just replied to you.
Best,
-Giulio

from tongrams_estimation.

Related Issues (2)

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.