Git Product home page Git Product logo

Comments (5)

jermp avatar jermp commented on July 21, 2024 1

Yes, I will implement this.
So far, the trie that stores the count assumes ngrams are always found.

from tongrams.

jermp avatar jermp commented on July 21, 2024 1

Done. See also the test_data/queries.not_found for some examples of strings that must not be found after indexing the test_data.

from tongrams.

jermp avatar jermp commented on July 21, 2024

That should never happen. I tested the library with ngrams not indexed by the data structure, e.g., when computing perplexity score from a text.
Can you do more tests? Are you trying to read some queries from a file?
You can text me at my e-mail in my profile if you prefer.
Anyway, I will perform some sanity checks and verify that behaviour myself.

from tongrams.

jermp avatar jermp commented on July 21, 2024

Also, try to recompile the code with -DCMAKE_BUILD_TYPE=Release
and run the tests again.
You could see this exception arising:
https://github.com/jermp/tongrams/blob/master/vectors/sorted_array.hpp#L111

from tongrams.

ndvbd avatar ndvbd commented on July 21, 2024

@jermp is it possible to return -1 when ngram is not found in data structure?

from tongrams.

Related Issues (18)

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.