aitor / seobiro
Natural language processing applied to search engine optimization
dev-master
2020-06-02 06:07 UTC
Requires
- andreskrey/readability.php: 2.1
- async-request/async-request: ^1.0
- fabpot/goutte: 4.0
- google/cloud: 0.133.0
- landrok/language-detector: 1.2.0
- voku/stop-words: 2.0.1
- yooper/php-text-analysis: 1.5.6
This package is auto-updated.
Last update: 2025-03-01 00:24:49 UTC
README
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.