Giter Club home page Giter Club logo

Comments (3)

proycon avatar proycon commented on June 1, 2024

confirmed, reproduces on a smaller corpus, cause still unknown

from colibri-core.

proycon avatar proycon commented on June 1, 2024

Original issue:

$ colibri-patternmodeller -f europarl250000-en-train.colibri.dat -t 2 -W 3 -m 3 -l 4 -s -o model -u && test.py
...
totaloccurrencesingroup:  18501817
(helper structure has 14657 unigrams mapping to 42319 skipgrams total)
Iterations:  21284687

Simplifying, no -W no -m, issue still occurs:

$ colibri-patternmodeller -f europarl250000-en-train.colibri.dat -t 2 -l 4 -s -o modelnowm -u && test.py modelnowm
...
totaloccurrencesingroup:  31341064
(helper structure has 15057 unigrams mapping to 43274 skipgrams total)
Iterations:  34122432.

No skipgrams, issue does not occur:

$ colibri-patternmodeller -f europarl250000-en-train.colibri.dat -t 2 -W 3 -m 3 -l 4 -o modelnos -u && test.py
...
totaloccurrencesingroup:  6214396
Iterations:  6214396

from colibri-core.

proycon avatar proycon commented on June 1, 2024

Ok, as I suspected this is not a bug, but it is confusing nevertheless. The reason you get more occurrences when you loop over the corpus explicitly and use getreverseindex() is that Colibri Core will actively match the ngram under consideration against all skipgrams in the model. If the ngram is an instantiation of a skipgram, the skipgram will be returned, it doesn't even require the n-gram to be in the model (after all, this should work also for models that contain no ngrams at all). This ngram may therefore well have been below any threshold during computation and not considered a candidate for the skipgram at the time, which is why you end up with a higher occurrence count.

from colibri-core.

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.