aitor/seobiro

Natural language processing applied to search engine optimization

dev-master 2020-06-02 06:07 UTC

This package is auto-updated.

Last update: 2022-05-29 01:56:52 UTC


README

Latest Version on Packagist Software License Total Downloads

Natural language processing applied to search engine optimization

Dataforseo (Get urls for keyword in Google)

$dataforseo = new \aitor\seobiro\Dataforseo({EMAIL},{KEY});
$results = $dataforseo->get_organic_results("aitor rodriguez");

Google Cloud (NLP)

// No need to initiate, just place the key.json in the main directory.

Usage

$seobiro = new \aitor\seobiro\Seobiro();

Get url contents

$url = "https://aitor.me";
$content = $seobiro->getUrl($url);

Get plain_text from content object

$text = $seobiro->getText($content);

Get language from plain_text

$language = $seobiro->getLanguage($text);

Get Tokens from plain_text

$tokens = $seobiro->getTokens($text);

Get Normalized Tokens

$normalized = $seobiro->getNormalizedTokens($tokens);

Get Stemmed Tokens

  $tokens = $seobiro->getStemmedTokens($tokens);

Remove Stopwords from token list

$seobiro->removeStopWords($normalized,$language);

Get Frequency Distribution from tokens

$frequency = $seobiro->getFrequencyDistribution($normalized)
$frequency->getKeyValuesByWeight();

Get Meta Description from content

$description = $seobiro->getDescription($content);

Get Meta Title from content

$title = $seobiro->getTitle($content);

Get Headers (h1-h6) from content

$headers = $seobiro->getHeaders($content);

Get Google Cloud NLP Entities

$GoogleEntities = $seobiro->getGoogleEntities($text);

Get Google Cloud NLP Sentiment

$GoogleSentiment = $seobiro->getGoogleSentiment($text);

Structure

If any of the following are applicable to your project, then the directory structure should follow industry best practices by being named the following.

src/        
example/

Install

Via Composer

$ composer require aitor/seobiro

Security

If you discover any security related issues, please email soy[at]aitor.me instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.