All Projects → PHP-Science → Textrank

PHP-Science / Textrank

Licence: mit
🌀 ⚡️ 🌍 TextRank (automatic text summarization) for PHP8

Projects that are alternatives of or similar to Textrank

Algorithms
Minimal examples of data structures and algorithms in Python
Stars: ✭ 20,123 (+10326.42%)
Mutual labels:  algorithm, search
Dsa.js Data Structures Algorithms Javascript
🥞Data Structures and Algorithms explained and implemented in JavaScript + eBook
Stars: ✭ 6,251 (+3138.86%)
Mutual labels:  algorithm, search
Jstarcraft Rns
专注于解决推荐领域与搜索领域的两个核心问题:排序预测(Ranking)和评分预测(Rating). 为相关领域的研发人员提供完整的通用设计与参考实现. 涵盖了70多种排序预测与评分预测算法,是最快最全的Java推荐与搜索引擎.
Stars: ✭ 324 (+67.88%)
Mutual labels:  algorithm, search
Monster
The Art of Template MetaProgramming (TMP) in Modern C++♦️
Stars: ✭ 90 (-53.37%)
Mutual labels:  algorithm, search
Lexrank
LexRank algorithm for text summarization
Stars: ✭ 108 (-44.04%)
Mutual labels:  algorithm, summarization
C Plus Plus
Collection of various algorithms in mathematics, machine learning, computer science and physics implemented in C++ for educational purposes.
Stars: ✭ 17,151 (+8786.53%)
Mutual labels:  algorithm, search
Sciencefair
The futuristic, fabulous and free desktop app for working with scientific literature 🔬 📖
Stars: ✭ 561 (+190.67%)
Mutual labels:  search, science
Javascript
A repository for All algorithms implemented in Javascript (for educational purposes only)
Stars: ✭ 16,117 (+8250.78%)
Mutual labels:  algorithm, search
Fuse
🔍 Fuzzy search for PHP based on the Bitap algorithm
Stars: ✭ 189 (-2.07%)
Mutual labels:  algorithm, search
Haystack
🔍 Haystack is an open source NLP framework that leverages Transformer models. It enables developers to implement production-ready neural search, question answering, semantic document search and summarization for a wide range of applications.
Stars: ✭ 3,409 (+1666.32%)
Mutual labels:  search, summarization
Algorithm
The repository algorithms implemented on the Go
Stars: ✭ 163 (-15.54%)
Mutual labels:  algorithm, search
Beginners Python Examples
Basic Python CLI programs
Stars: ✭ 190 (-1.55%)
Mutual labels:  algorithm
Adversarial video summary
Unofficial PyTorch Implementation of SUM-GAN from "Unsupervised Video Summarization with Adversarial LSTM Networks" (CVPR 2017)
Stars: ✭ 187 (-3.11%)
Mutual labels:  summarization
Dailycodebase
2 month data structures and algorithmic scripting challenge starting from 20th December 2018 - Coding is Fun! 💯💯 Do it everyday!! Also, Do give us a ⭐ if you liked the repository
Stars: ✭ 186 (-3.63%)
Mutual labels:  algorithm
Search widget
Flutter package: Search Widget for selecting an option from a data list.
Stars: ✭ 188 (-2.59%)
Mutual labels:  search
Lolcate Rs
Lolcate -- A comically fast way of indexing and querying your filesystem. Replaces locate / mlocate / updatedb. Written in Rust.
Stars: ✭ 191 (-1.04%)
Mutual labels:  search
Rummage ecto
Search, Sort and Pagination for ecto queries
Stars: ✭ 190 (-1.55%)
Mutual labels:  search
Interview Questions
List of all the Interview questions practiced from online resources and books
Stars: ✭ 187 (-3.11%)
Mutual labels:  algorithm
Flot Downsample
Downsample plugin for Flot charts.
Stars: ✭ 186 (-3.63%)
Mutual labels:  algorithm
Atom Todo Show
Atom package that shows a list of todos from your project.
Stars: ✭ 186 (-3.63%)
Mutual labels:  search

TextRank

This source code is an implementation of the TextRank algorithm (Automatic summarization) on PHP7 strict mode. It can summarize a text, article for example to a short paragraph. Before it would start the summarizing it removes the junk words what are defined in the Stopwords namespace. It is possible to extend it with another languages.

TextRank or Automatic summarization

Automatic summarization is the process of reducing a text document with a computer program in order to create a summary that retains the most important points of the original document. Technologies that can make a coherent summary take into account variables such as length, writing style and syntax. Automatic data summarization is part of machine learning and data mining. The main idea of summarization is to find a representative subset of the data, which contains the information of the entire set. Summarization technologies are used in a large number of sectors in industry today. - Wikipedia

The algorithm of this implementation is:

  • Find sentences,
  • Remove stopwords,
  • Create integer values by find and count the matching words,
  • Change the integer values by the related words' integer values,
  • Normalize values to create scores,
  • Order by scores

Install

composer require php-science/textrank

Test

cd project-folder
composer test

or

cd project-folder
phpunit --colors='always' $(pwd)/tests

Examples

use PhpScience\TextRank\Tool\StopWords\English;

// String contains a long text, see the /res/sample1.txt file.
$text = "Lorem ipsum...";

$api = new TextRankFacade();
// English implementation for stopwords/junk words:
$stopWords = new English();
$api->setStopWords($stopWords);

// Array of the most important keywords:
$result = $api->getOnlyKeyWords($text); 

// Array of the sentences from the most important part of the text:
$result = $api->getHighlights($text); 

// Array of the most important sentences from the text:
$result = $api->summarizeTextBasic($text);

More examples:

Authors, Contributors

Name GitHub user
David Belicza @DavidBelicza
Riccardo Marton @riccardomarton
Syndesi @Syndesi
vincentsch @vincentsch
Andrew Welch @khalwat
Andrey Astashov @mvcaaa
Leo Toneff @bragle
Willy Arisky @willyarisky
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].