Yoast / YoastSEO.js

Analyze content on a page and give SEO feedback as well as render a snippet preview.
GNU General Public License v3.0
403 stars 170 forks source link

Incorrect marking of repeated sentence beginnings #619

Closed IreneStr closed 8 years ago

IreneStr commented 8 years ago

What did you expect to happen?

The marker to mark all sentences starting with the same word (in case of 3 consecutive sentences or more).

What happened instead?

The marker only marked the first and second sentence with repeated sentence beginnings: schermafbeelding 2016-06-07 om 13 22 30

How can we reproduce this behavior?

Start 3 consecutive sentences with the same word (not the/a/those/that/that/these/one/.../ten), with a <p> and </p> between the second and third sentence.

Technical info

tacoverdo commented 8 years ago

Using following text, highlighting consecutive sentences starting with the same word doesn't work at all.

Text:

The Content Analysis Tool in the <a href="https://yoast.com/wordpress/plugins/seo/">Yoast SEO plugin</a> measures many aspects of the text you’re writing. These checks run <a href="https://yoast.com/real-time-content-&lt;yoastmark class='yoast-text-mark'&gt;&lt;yoastmark class='yoast-text-mark'&gt;&lt;yoastmark class='yoast-text-mark'&gt;&lt;yoastmark class='yoast-text-mark'&gt;&lt;yoastmark class='yoast-text-mark'&gt;&lt;yoastmark class='yoast-text-mark'&gt;&lt;yoastmark class='yoast-text-mark'&gt;&lt;yoastmark class='yoast-text-mark'&gt;analysis&lt;/yoastmark&gt;&lt;/yoastmark&gt;&lt;/yoastmark&gt;&lt;/yoastmark&gt;&lt;/yoastmark&gt;&lt;/yoastmark&gt;&lt;/yoastmark&gt;&lt;/yoastmark&gt;/">real-time</a>, so you’ll receive feedback while writing! The content analysis helps you to make your text SEO-friendly. In this post, I’ll first describe the most important features of the Content Analysis Tool. After that, I’ll explain how to use and interpret these features.
<h2>Most important features</h2>
1.  The plugin allows you to formulate a <a href="https://yoast.com/meta-descriptions/">meta description</a>. This description has to be a short text describing the main topic of the page. If the meta description contains the search term people use, the exact text will be shown by Google below your URL in the search results.

2.  The plugin analyzes the text you write. It calculates the <a href="https://yoast.com/flesch-&lt;yoastmark class='yoast-text-mark'&gt;&lt;yoastmark class='yoast-text-mark'&gt;&lt;yoastmark class='yoast-text-mark'&gt;&lt;yoastmark class='yoast-text-mark'&gt;&lt;yoastmark class='yoast-text-mark'&gt;&lt;yoastmark class='yoast-text-mark'&gt;&lt;yoastmark class='yoast-text-mark'&gt;&lt;yoastmark class='yoast-text-mark'&gt;reading-ease&lt;/yoastmark&gt;&lt;/yoastmark&gt;&lt;/yoastmark&gt;&lt;/yoastmark&gt;&lt;/yoastmark&gt;&lt;/yoastmark&gt;&lt;/yoastmark&gt;&lt;/yoastmark&gt;-score/">Flesch reading-ease score</a>, which indicates the readability of your article. The Flesch reading-ease score takes into account sentence length, for example. In the future, we’ll add more checks on <a href="https://yoast.com/5-tips-improve-&lt;yoastmark class='yoast-text-mark'&gt;&lt;yoastmark class='yoast-text-mark'&gt;&lt;yoastmark class='yoast-text-mark'&gt;&lt;yoastmark class='yoast-text-mark'&gt;&lt;yoastmark class='yoast-text-mark'&gt;&lt;yoastmark class='yoast-text-mark'&gt;&lt;yoastmark class='yoast-text-mark'&gt;&lt;yoastmark class='yoast-text-mark'&gt;readability&lt;/yoastmark&gt;&lt;/yoastmark&gt;&lt;/yoastmark&gt;&lt;/yoastmark&gt;&lt;/yoastmark&gt;&lt;/yoastmark&gt;&lt;/yoastmark&gt;&lt;/yoastmark&gt;-blog-post/">readability</a>. This will allow you to check the SEO and readability of your text simultaneously.

3. The plugin does numerous content checks on your page. It checks whether you use your <a href="https://yoast.com/focus-keyword/">focus keyword</a> in:
<ul>
    <li>the title of the page;</li>
    <li>a <a href="https://yoast.com/headings-use/">heading</a>;</li>
    <li>the <a href="https://yoast.com/seo-friendly-urls/">URL</a>;</li>
    <li>the content of the article;</li>
    <li>the <a href="https://yoast.com/meta-descriptions/">meta description</a>;</li>
    <li>the <a href="https://yoast.com/image-seo-alt-tag-and-title-tag-optimization/">alt tag</a> of the images.</li>
</ul>
The plugin also checks the presence of links and <a href="https://yoast.com/image-seo/">images</a> in the article. It calculates the number of words and the density of usage of the focus keyword in the article. Moreover, the plugin checks whether you’re using the same focus keyword on other pages of your website. This should prevent you from competing with yourself.

If you write a relatively <a href="https://yoast.com/seo-friendly-blog-post/" target="_blank">SEO-friendly text</a> (based on the aspects mentioned above) the plugin will indicate this with a green bullet. Writing pages that are rewarded with green bullets will help you improve the ranking of those pages.

&nbsp;

add_new_post_ _clean_ _wordpress Example text

add_new_post_ _clean_ _wordpress Result

tacoverdo commented 8 years ago

Another example of the highlighter for consecutive sentences causing weird results:

add_new_post_ _clean_ _wordpress

I used TinyMCE Advanced plugin to create the table.