Giter Club home page Giter Club logo

n-gram-detection-in-texts's Introduction

N-gram-Detection-in-texts

This project is similar to the challenge of Sigmod 2017 competition. For further details you can visit this page.

The main goal of this project is to detect N-grams in texts. To be more specific, we have a given list of N-grams, which is kept in memory, and a stream of texts in which we should detect possible occurrences of N-grams. N-gram add / remove commands will be submitted, during the flow of the text, to update the original list.

First of all, the structure, in which the information is saved, is a trie. The available actions that can be performed to this trie are Query (Q), Add (A) and Delete (D). These actions take place in batches. For example, one batch can have Q, Q, Q, A, A, Q, D and another batch can have A, D, D, A, Q, Q, D, Q.

The main utilities we have implemented are listed below:

  1. A bloom filter which is used to efficiently avoid inserting duplicate N-grams during a Q.
  2. A linear hash table that points to the root of trie. In this way, we find very fast the first word of an N-gram, which a very frequent query.
  3. A pointer based binary heap to find out which are the top-K N-grams in our structure.
  4. A static trie, which is a trie that the only allowed action is Q (not A and D). The nodes of the static trie are compressed.
  5. Finally, we have introduced multi-threading in order to minimize the execution time of Q actions. We use POSIX threads.

*In src/ there is a detailed report in Greek, but in the last pages there are measurements of the performance of our application.

Authors: Apostolos Florakis(https://github.com/apof) - Dimitrios Tsesmelis (https://github.com/JimTsesm) - Marinos Agapiou(https://github.com/MARINOSAG)

n-gram-detection-in-texts's People

Contributors

jimtsesm avatar apof avatar

Watchers

James Cloos avatar  avatar

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.