548 adjust applicability keyphrase density and distribution#22343
Merged
JorPV merged 36 commits intofeature/off-the-bat-analysisfrom Sep 25, 2025
Merged
Conversation
…e real researcher instead of mock researcher
…t-applicability-keyphrase-density-and-distribution
…t-applicability-keyphrase-density-and-distribution
Pull Request Test Coverage Report for Build fd3d1fc9e34afe0042090e7c288ddbdd2705ea22Details
💛 - Coveralls |
…t-applicability-keyphrase-density-and-distribution
…e instead of the assessment file
…xt length; add new keyphrase density configuration
…curacy of match evaluations
FAMarfuaty
reviewed
Sep 22, 2025
| return ( keyphraseCount.count / wordCount ) * 100; | ||
| return { | ||
| density: ( keyphraseCount.count / wordCount ) * 100, | ||
| textLength: wordCount, |
Contributor
There was a problem hiding this comment.
Also return the text length here so that we don't need to recalculate the length inside the assessment
…ress-seo into 548-adjust-applicability-keyphrase-density-and-distribution
FAMarfuaty
reviewed
Sep 22, 2025
| matches: 0, | ||
| percentReflectingTopic: 0, | ||
| text: text, | ||
| textLength: customCountLength ? customCountLength( text ) : getWords( text ).length, |
Contributor
There was a problem hiding this comment.
Also return the text length here so we don't need to recalculate it inside the assessment
JorPV
reviewed
Sep 24, 2025
Contributor
JorPV
left a comment
There was a problem hiding this comment.
CR ✅ Just two tiny typo adjustments to make.
| * @param {number} [config.scores.okay] The score to return if keyword occurrences are somewhat unevenly distributed. | ||
| * @param {number} [config.scores.bad] The score to return if there is way too much text between keyword occurrences. | ||
| * @param {number} [config.scores.consideration] The score to return if there are no keyword occurrences. | ||
| * @param {number} [config.scores.noKeyphraseOrText] The score to return if there is way no text and/or no keyphrase set. |
Contributor
There was a problem hiding this comment.
The score to return if there is way no text and/or no keyphrase set.
Typo: the word way doesn't make sense in this sentence.
| } ); | ||
| } ); | ||
| */ | ||
|
|
Contributor
There was a problem hiding this comment.
Maybe remove this last extra line 😅
…ress-seo into 548-adjust-applicability-keyphrase-density-and-distribution
Contributor
|
CR ✅ AT ✅ It works like magic 🪄 |
17 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Context
Summary
This PR can be summarized in the following changelog entry:
Relevant technical choices:
For all 3 assessments we added a new condition that covers the case when no keyphrase was set and/or no text was added.
They keyphrase distribution had a feedback string set for when there is a keyphrase set, but it's not in the text (
Include your keyphrase or its synonyms in the text so that we can check keyphrase). For efficiency, we removed that string and made sure our new string is used for that condition. The reason for that is the following:considerationcondition would lead to separate feedback for a text with a set keyphrase that's not in the text, and a separate feedback for a text with a keyphrase that was not set. That didn't seem valuable when the new feedback string (Please add both a keyphrase and some text containing the keyphrase or its synonyms) can cover both of these cases.The choices of feedback strings are explained here.
Test instructions
Test instructions for the acceptance test before the PR gets merged
This PR can be acceptance tested by following these steps:
WordPress: Regular content
Testing keyphrase density
Testing keyphrase distribution
Testing keyphrase in subheading
Test in Japanese
Note for developers: You can test with the site language set to Japanese and and the user profile language to English if you want your site interface shown in English instead of Japanese.
WooCommerce products
Shopify
Google docs extension
Relevant test scenarios
Test instructions for QA when the code is in the RC
QA can test this PR by following these steps:
Impact check
This PR affects the following parts of the plugin, which may require extra testing:
UI changes
Other environments
[shopify-seo], added test instructions for Shopify and attached theShopifylabel to this PR.Documentation
yoastseopackage and in the Confluence page for JapaneseQuality assurance
Innovation
innovationlabel.Fixes https://github.com/Yoast/lingo-other-tasks/issues/548