Giter Club home page Giter Club logo

-n-gram-algorithm-'s Introduction

N-gram-Algorithm

n-gram Algorithm Implementation in Intel x86 Assembly

In this project, we implemented n-gram algorithm using Intel assembly. N-gram defines a contagious sequence of n items (characters or samples) from any given information. It is commonly used in natural language processing (NLP) to derive probabilistic models.

N-gram function will take two strings and value of n as its main inputs parameters and will measure the similarity of the given strings.

int n_gram(char* str_1, int size_1, char* str_2, int size_2, int n);

The function will first determine the sequence sets of given string, listing the n-grams they contain. Let us use ๐‘†โ€ฒ and ๐‘†โ€ฒโ€ฒ to specify sets beloning to the first and second input strings respectively. Lastly, our function use the similarity parameters calculated as its return value and conclude its execution. It is important that you notice the return parameter of the function is declared as an integer.

N-gram

Implementation

nasm -f elf32 assembly.asm -o assembly.o
gcc -c last_main_asm.c -o last_main_asm.o
gcc assembly.o last_main_asm.o -o ngram
./ngram

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.