SEO

How to use Cocon.se with R ?


This summer, I had the opportunity to test YourText.guru and Cocon.se, both tools are known and used to optimize the SEO of its website(s).

In order to help people who do R and SEO, I created an R package that allows you to easily manipulate the APIs of these programs.

I started by introducing YourText.guru and the R open-source package specially created for the occasion :
https://data-seo.com/2018/08/03/how-to-use-yourtext-guru-r/

Now I have integrated all the metamot optimization features of Cocon.se (or English version, available at sem-eye.com)  into the writingAssistant package: https://github.com/voltek62/writingAssistantR

Presentation Cocon.se and metamots

Cocon.se contains a module to manage metamots. Each key phrase “generates” its metamot. Therefore, 1 expression = 1 metamot.

The metamot is a word made up of several words (lexies), where all must be used to have the ideal page.
Each lexie has a specific role in the metamot and should not be seen as possibly separate from the others.

The metamot is based on several algorithms:
– Signal processing where within the corpus, singularities must be identified.
– Successive filters to find the main intention of the SERP.

The result is a series of more or less “certain” lexies for determining the “ideal” signal.

The lexies are divided into 3 categories:
– omnipresent lexies,
– decisive lexies,
– other lexies.

The decisive lexies have the most important role in the signal because they are both almost “certain” but “not found together” in the current pages.

Attention, all the metamot lexies must be used, but the number of determining lexies and their repetitions make it possible to know, for example, if the subject of the page is well formulated.

A picture is better than a long speech:

There is an impressive documentation work done by Christian if you want to know more:
https://github.com/Cocon-Se/doc-metamots/blob/master/documentation.md

If you want to know more, there is also a Youtube playlist where everything is detailed :
https://www.youtube.com/watch?v=O7PfyjElKY8&list=PLA2jo0vmNfd-KkkRZE08ReJD603z6_so8

Get your token

To use the R package, you must have access to the API.
The use of the API remains private for the moment. It is more an API dedicated to partners than a public API.

Sylvain Deauré sent me the login credentials that allow me to generate a token that has a lifetime of 2H.

These login credentials must be copied to the root of your project in a text file: sme_configuration.txt

login=VOTRECLEAPI
pass=
debug=FALSE

Install my R package

To use the R package, you must have Rstudio and be trained in the basics.

I invite you to write these lines in the console.

library(devtools)
install_github("voltek62/writingAssistantR")

To initialize the package, you just have to use the following code, be careful the createToken function will create your token from the txt file “sme_configuration.txt”
The checkStatus function simply checks that the connection is correct.

library(RCurl)
library(rjson)
library(XML)

createToken()
checkStatus()

Create a Metamot

You must visit the site, it is not possible to create a metamot directly with the API.

I put a screenshot because when creating the metamot on sem-eye, you will have to specify the target language and the target country.

metamots
For more details on this step, I invite you to read the official documentation : https://github.com/Cocon-Se/doc-metamots/blob/master/documentation.md#calculer-des-metamots

Get your lexies

Once the metamot is created, you will be able to get the lexies.

Then with the metamot ID, you can request all associated lexies and their appearance frequencies with the listSimulatedLexies function for a text of 3500 words.

info <- metamots$data[[2]]
metamot_id <- info$mid

lexies <- listLexies(metamot_id)
lexie_id <- lexies$name[1]

url <- "https://www.lequipe.fr/Ilosport/Fitness/Actualites/Dossier-crossfit-1-2-definition-avantages-risques-et-limites-du-crossfit/778028"

model <- listSimulatedLexies(metamot_id,lexie_id)

Get your score

From the “model” variable previously created, you can compare your model to the content of a URL.

Here are the rules I followed to compute an optimization score:
1) All lexies must be in the text, if one is missing, the score is degraded proportionally to the missing lexies.
2) Each lexie must be repeated a certain number of times.
I use a first approach rule of 3 on the recommendations of the json “simulation3500” (3500 words) and the size of the current text
3) Then, if the lexies are not present enough, the score is degraded.

The package also gives you an SEO danger score if lexies are too present.

scores <- scoreLexies(model, url)

library(formattable)
percent(scores)

Top 100 Score Comparison

If you test my package, you will realize that semantic is a very important role on the Top 20.
I give you an example with the top 100 on “crossfit france”.
The two tools have different approaches but there is consistency in the scores.

positiontitleurlytg_scoreytg_dangersme_scoresme_danger
1WODNEWS - L'actualité du Crossfit en France et l'étranger !http://www.wodnews.com/32760
2Le CrossFit : la nouvelle tendance sportive ! - Crossfit-France.orghttp://www.crossfit-france.org/37700
3CrossFit France - Accueil | Facebookhttps://fr-fr.facebook.com/CrossFit-France-123647241054562/111180
4DOSSIER CROSSFIT 1/2 : Définition, avantages, risques et limites ...https://www.lequipe.fr/Ilosport/Fitness/Actualites/Dossier-crossfit-1-2-definition-avantages-risques-et-limites-du-crossfit/7780287425480
5Liste des Affiliées | play-fitnesshttp://play-fitness.fr/communaute/boxs/liste-des-boxs/34100137
6AU DELÀ DES LIMITES - Documentaire sur le Crossfit en France ...https://www.youtube.com/watch%3Fv%3Dbk4jlpt05co0000
7Trouvez la salle CrossFit la plus proche de chez vous | Reebok ...http://www.reebokcrossfitlouvre.com/crossfiters/salle-la-plus-proche801313
8Reebok CrossFit Louvre : préparation physique pour tous !http://www.reebokcrossfitlouvre.com/131137
9Apprenez à bien choisir votre box de CRossFit avant de débuterhttp://www.crossfitgavroche.com/choisir-sa-box-de-crossfit.html7329280
10Sport : on a testé le... CrossFit - France 3 Bourgogne-Franche-Comtéhttps://france3-regions.francetvinfo.fr/bourgogne-franche-comte/cote-d-or/dijon/sport-on-teste-crossfit-1452019.html245230
11CrossFit — Wikipédiahttps://fr.wikipedia.org/wiki/CrossFit10937320
12Le Crossfit, la discipline qui bouscule les salles de sport - La Croixhttps://www.la-croix.com/Sport/Le-Crossfit-discipline-bouscule-salles-sport-2016-11-19-120080427912452360
13Silvaticus CrossFit Paris 11https://www.silvaticus.fr/0000
14CrossFit Cestio | Lille | Découvrirhttp://crossfit-cestio.com/4014230
15Ils sont les stars du CrossFit ! - Le Parisienhttp://www.leparisien.fr/sports/iledefrance/paris-75/ils-sont-les-stars-du-crossfit-26-05-2016-5831235.php0000
16Guillaume Magnouat : « Le CrossFit explose en France » - Sportmaghttp://www.sportmag.fr/crossfit/guillaume-magnouat-le-crossfit-explose-en-france/123180
17Daniel Chaffey, le roi français du CrossFit - Fitness Challengeshttps://fitness-challenges.com/daniel-chaffey-le-roi-francais-du-crossfit/4617120
18CrossFit Nancyhttp://www.crossfit-nancy.fr/242320
19CrossFit Villeneuve Loubethttp://www.crossfit-villeneuve-loubet.com/161120
20Toulouse représente la France au Mondial de crossfit - 27/07/2018 ...https://www.ladepeche.fr/article/2018/07/27/2842548-toulouse-represente-la-france-au-mondial-de-crossfit.html267120
21French Throwdownhttps://frenchthrowdown.com/40120
22CrossFit France (@crossfitfrance) • Photos et vidéos Instagramhttps://www.instagram.com/crossfitfrance/%3Fhl%3Dfr0000
23Reebok CrossFit | Site Officiel Reebokhttps://www.reebok.fr/crossfit29967
24CrossFit Grenoble box affiliée | Découvre le fitness dans sa version 2.0https://grenoble-crossfit.com/265280
25Wod France Eventshttps://wodfrance-events.fr/8260
26Workout'mag - le numéro 1 du CrossFit en Francehttp://www.workoutmag.fr/0000
27Des lycéens aux championnats de France de crossfithttp://www.lavoixdunord.fr/342064/article/2018-03-23/des-lyceens-aux-championnats-de-france-de-crossfit92180
28CrossFit Rouen — avenue de la Libération, Rouen Rive Gauchehttps://www.crossfit-rouen.com/3067
29Reebok CrossFit débarque en France | - Sportsmarketing.frhttp://www.sportsmarketing.fr/reebok-crossfit-france/21560
30Chelles. Le CrossFit muscle la ville – actu.frhttps://actu.fr/ile-de-france/chelles_77108/chelles-crossfit-muscle-ville_15407762.html358180
31Crossfit : la mode US débarque en France - Barbichette.frhttp://barbichette.fr/crossfit-france/439320
32Home | CrossFit Antibes-Vallauris-Juan les Pinshttp://crossfit-vallisaurea.com/4060
33Rios CrossFithttp://rioscrossfit.com/12377
34FIT' & RACK | Materiel Sportif Made in France | Cross Training ...https://www.fitandrack.eu/0000
35Box de crossfit à Paris | Crossfit CMGhttps://www.crossfitxiii.fr/0000
36Agent commercial crossfit fitness sport FRANCEhttps://www.agent-co.fr/fr/missions-commerciales/agent-commercial-france-crossfit-fitness-sport--632557206180
37CROSSFIT BEZIERS: Salle de crossfit, Béziers, Narbonne, Sérignanhttps://www.crossfit-beziers.fr/329180
38Crossfit L'engrenage: Votre salle de CROSSFIT à Annecy le Vieuxhttp://www.crossfitlengrenage.com/8177
39CrossFit Ballershttp://www.crossfitballers.com/4077
40CrossFit Nimes, 1800m² dédiés à la forme & bien-êtrehttps://crossfit-nimes.com/13277
41Crossfit Arles-Salle de Crossfit à Arles PACAhttps://www.crossfitarles.fr/174120
42Crossfit Minimes - Crossfit Albi - Salle de CrossFit à Toulousehttps://www.crossfitminimes.com/14160
43Crossfit Chtx : Votre Salle de sport à Déols - Châteaurouxhttps://www.crossfitchtx.com/7160
442ème édition Challenge F5RCE France - 100 Pourcent CrossFithttps://100pourcentcrossfit.fr/2eme-edition-challenge-f5rce-france/3060
45CrossFit à Roissy en France, trouver les clubs de sport à proximitéhttps://www.pagesjaunes.fr/annuaire/roissy-en-france-95/crossfit0000
46Update Studio: CrossFit en France - CrossFit Gameshttps://games.crossfit.com/video/update-studio-crossfit-en-france/open12160
47Box officielle CrossFit BREST - Salle de sport fitness à BRESThttps://www.crossfit-brest.fr/17200
48CrossFit Lutèce, salle de CrossFit Paris 15e - CrossFit Lutècehttps://www.crossfitlutece.com/0000
49Cours particuliers de Crossfit, annonces de professeurs efficaces en ...https://www.superprof.fr/cours/crossfit/france/8036320
50T-shirt Noir France men Crossfit - THORUS WEARhttps://thorus-wear.com/fr/homme-t-shirts/33-t-shirt-noir-france-men.html1000
51CrossFit Laxou - Box de CrossFit affiliée en Lorraine - 54 - Francehttps://www.crossfitlaxou.com/7100
52Crossfit Caen - 1ère Box Caennaise avec des professionnels ...http://crossfitcaen.fr/275180
53CrossFit Essor x Bayonnehttp://www.crossfitessor.com/0000
54L'événement de CrossFit international en France : les Compex ...http://www.salonbodyfitness.com/actus/2017/l-evenement-de-crossfit-internationalen-france/0000
55CrossFit Thirsthttps://www.crossfit-thirst.fr/2060
56CROSSFIT EN FRANCE - Incepthttps://www.incept-sport.fr/actualites/2012/06/crossfit-en-france0000
57CrossFit G-Steel: Box De Crossfit Orleanshttps://www.crossfit-g-steel.com/91180
58Crossfit Naoned - Votre Box de CrossFit à Nantes !http://www.crossfit-naoned.com/17167
59Crossfit 3.84 – Salle de Crossfit à Vedène Vaucluse PACAhttp://www.crossfit384.fr/3060
605 questions à l'homme le plus fit de France - Men's Fitness Magazinehttps://www.mensfitness-magazine.fr/5-questions-lhomme-fit-france/21660
61CrossFit Original Addictshttp://crossfitoriginaladdicts.com/191320
62Chalon-sur-Saône | Le Colisée va accueillir le Crossfit - Le JSLhttps://www.lejsl.com/edition-de-chalon/2018/07/13/le-colisee-va-accueillir-le-crossfit247120
63TEAMS 5 ROISSY-EN-FRANCE - Foot indoor et Crossfithttp://roissy.teams5.com/2060
64Homepage | localhosthttp://www.fitfactorymarseille.fr/page/homepage7022320
65Championnat de France de musculation crossfit | Lycée Honoré d ...http://web3.estiennedorves.net/node/1034160
66Cours en salle de CrossFit Tremblay-en-France - CROSSFIT CENTERhttps://www.crossfit-center.fr/cours-en-salle-de-cross-ctc-be-fit-tremblay-en-france-944/20360
67CROSSFIT SBMhttp://crossfitsbm.com/212280
68Du CrossFit ®, du CrossFit ® et tout ce qui tourne autour du CrossFit ...https://ihatewallballs.com/142120
69DrWod - Le spécialiste des marques US de vêtements et ...https://drwod.com/17360
70CrossFit - Où pratiquer l'activité CrossFit® | MaSalleDeSporthttps://www.masalledesport.com/cours-crossfit-235.php509320
71Finale du championnat de France de crossFit (5e place) | Lycée ...https://perdonnet.fr/Finale-du-championnat-de-France-de2060
72CrossFit Strasbourg - CrossFit Strasbourghttps://www.crossfitstrasbourg.com/9160
73CrossFit Gravity Orvault Nantes | Sport Elite Fitness Orvault Nanteshttp://www.crossfitgravity.com/13260
74Équipement de Crossfit Venum et tenues de Fitness - Venum.com ...https://euro.venum.com/fr/sports/fitness-cross-training.html17560
75Alpes Crossfit Unity | Box Crossfit à Grenoblehttps://www.alpescrossfit-unity.fr/19560
76Le crossfit déferle sur le monde du fitnesshttps://www.lemonde.fr/sport-et-societe/article/2016/09/21/le-crossfit-deferle-sur-le-monde-du-fitness_5000999_1616888.html0000
77Crossfit des Sacres - Salle de crossfit à Reims et à Troyeshttps://crossfit-des-sacres.com/151120
78Bien-être. Le raz-de-marée crossfit - Morbihan - LeTelegramme.frhttps://www.letelegramme.fr/morbihan/bien-etre-le-raz-de-maree-crossfit-13-03-2018-11883902.php234180
79CrossFit Bordeaux :: 1ère Box de France :: Préparation ...http://crossfitbordeaux.com/index.php%3Fgo%3Dconfidentialite0000
80Les Formations CrossFit - Fuck Geneticshttp://www.fuck-genetics.fr/les-formations-crossfit/102120
81FITNESS, SALLE DE SPORT, CROSSFIT PAYS DE GEX, SAINT ...https://www.crossfittrinitial.com/4060
82Compétition Crossfit | France | AmiensThrowdownshttps://www.amiensthrowdown.com/4060
83CrossFit, Bootcamp, comment ça marche - Marie Francehttp://www.mariefrance.fr/equilibre/crossfit-bootcamp-quoi-faire-288932.html4410230
84CAMILLE RIBOUD – OCR/CROSSFIT – Site officiel Inov-8 Francehttps://teaminov8france.com/riboud-camille-ocrcrossfit/0000
85CHALLENGE F5RCE FRANCE - RSnatchhttps://rsnatch.com/challengef5rcefrance/3060
86CrossFit Le Havre — Centre Commercial Docks Vaubanhttps://www.crossfit-lehavre.com/2067
87CrossFit 6301 - Box de Crossfit à Clermont Ferrandhttp://www.crossfit6301.com/324390
88CrossFit Cap Martinhttps://www.crossfit-capmartin.com/225120
89Crossfit Antipolis: Indexhttp://crossfitantipolis.com/411760
90CrossFit Gerland: Accueilhttp://www.crossfit-gerland.com/11160
91CrossFit Roissy-en-France à Roissy-en-France - Les-horaires.frhttps://horaires.lefigaro.fr/95700/Roissy-en-France/CrossFit-Roissy-en-France-58-rue-de-la-belle-etoile,835703.html6060
92France 7 : En mode crossfit ! - FFRhttps://www.ffr.fr/Equipes-de-France/Rugby-a-7/France-7/France-7-En-mode-crossfit18760
93Qualification au championnat de France de musculation-crossfit ...http://sepia.ac-reims.fr/lyc-camille-claudel/-spip-/Qualification-au-championnat-de-France-de-musculation-crossfit.html2060
94Arabie Saoudite en France on Twitter: "Amal Baatia, une ...https://twitter.com/KSAembassyFRA/status/90138113331687014410060
95Cage à squat crossfit - Tunturi - Importateur Exclusif Francehttp://www.tunturi.fr/machines-musculation/722-cage-a-squat-crossfit-wt60--8717842028032.html5160
96Le lycée Emmanuel-Chabrier champion de France UNSS de ...https://www.lacommere43.fr/yssingeaux-les-sucs/item/6895-le-lycee-emmanuel-chabrier-champion-de-france-unss-de-musculation-crossfit.html50120
97R2 THE TRAINING FACTORY – Salle de sport à Paris – Crossfit ...http://www.r2training.fr/20560
98Rogue Basic - France - T-Shirts - Men's Apparel - Apparel | Rogue ...https://www.rogueeurope.eu/rogue-france-shirt%3Flocale%3Dfr0000
99Crossfit South West Anglethttp://crossfitsouthwest-anglet.com/369280

Conclusion

Now my R package will take a new turn because I will use its two excellent tools to generate quality texts.

0 Shares

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.