Giter VIP home page Giter VIP logo

weblineindia / aiml-nlp-text-scoring Goto Github PK

View Code? Open in Web Editor NEW
10.0 3.0 1.0 92 KB

A Python based AI ML package for generating the best matching text from a paragraph for a given keyword/sentence.

Home Page: https://www.weblineindia.com/software-development-resources.html

License: MIT License

Python 100.00%
artificial-intelligence machine-learning aiml ai-ml ai-algorithm ml-algorithms machine-learning-algorithms artificial-intelligence-algorithms sentence-bleu similar-sentences

aiml-nlp-text-scoring's Introduction

Sentence scoring using NLTK bleu score

A Python based NLP package for generating the best matching text from a paragraph for a given keyword/sentence. A user can pass a keyword and a paragraph/text content throught the terminal and the paragraph undergoes cleaning process by eliminating special characters from the text, then preprocessing technique is applied to each sentences by removing stopwords and tokenizing it.

The sentence score is calculated by applying bleu_score. Here a cumulative bleu score is calculated for the each sentences.The code helps in calculatuing the score of each sentences with reference to the input keyword and top scored 3 sentences are displayed as output.

Regex used for removing special characters from text.
NLTK stopwords for removing stopwords from sentence.
NLTK word_tokenize used for tokenization of sentence.
NLTK WordNetLemmatizer used for lemmatization of words.
NLTK sentence_bleu used for sentence scoring.

Table of contents

Getting started

Prerequisites for running the code are:

Python = 3.6.8

nltk = 3.6.7

or

pip install nltk

We have tested our program in above version, however you can use it in other versions as well.

Features

  • Performs text cleaning
  • Uses nltk's sentence_bleu score for text scoring.

Usage

Inside the project's directory run:

python app.py

Enter keyword and a paragraph. It will display sentences with most relavent text to the keyword entered.

Output:

Want to Contribute?

  • Created something awesome, made this code better, added some functionality, or whatever (this is the hardest part).
  • Fork it.
  • Create new branch to contribute your changes.
  • Commit all your changes to your branch.
  • Submit a pull request.

Need Help?

We also provide a free, basic support for all users who want to use this AI ML based NLP text scoring technique for their projects. In case you want to customize this text scoring technique for your development needs, then feel free to contact our AI ML developers.


Collection of Components

We have built many other components and free resources for software development in various programming languages. Kindly click here to view our Free Resources for Software Development.


Changelog

Detailed changes for each release are documented in CHANGELOG.md.

Credits

Refered NLTK bleu score for evaluating sentence match. NLTK.

License

MIT

Keywords

nlp, nltk, sentence-bleu, text-scoring, keyword-match, similar-sentence, keyword-match-text, sent-tokenize, artificial-intelligence, machine-learning, ai-ml,tokenization, stopwords removal

aiml-nlp-text-scoring's People

Contributors

partners-wli avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

c00renut

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.