axyseo 2.0.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +228 -0
- package/build/bundledPlugins/index.js +14 -0
- package/build/bundledPlugins/index.js.map +1 -0
- package/build/bundledPlugins/previouslyUsedKeywords.js +171 -0
- package/build/bundledPlugins/previouslyUsedKeywords.js.map +1 -0
- package/build/config/diacritics.js +140 -0
- package/build/config/diacritics.js.map +1 -0
- package/build/config/getTransliterations.js +3572 -0
- package/build/config/getTransliterations.js.map +1 -0
- package/build/config/transliterationsWPstyle.js +1424 -0
- package/build/config/transliterationsWPstyle.js.map +1 -0
- package/build/config/wordBoundaries.js +26 -0
- package/build/config/wordBoundaries.js.map +1 -0
- package/build/config/wordBoundariesWithoutPunctuation.js +16 -0
- package/build/config/wordBoundariesWithoutPunctuation.js.map +1 -0
- package/build/const/analysis.js +20 -0
- package/build/const/analysis.js.map +1 -0
- package/build/errors/invalidType.js +22 -0
- package/build/errors/invalidType.js.map +1 -0
- package/build/errors/missingArgument.js +22 -0
- package/build/errors/missingArgument.js.map +1 -0
- package/build/helpers/createMeasurementElement.js +46 -0
- package/build/helpers/createMeasurementElement.js.map +1 -0
- package/build/helpers/domManipulation.js +66 -0
- package/build/helpers/domManipulation.js.map +1 -0
- package/build/helpers/errors.js +26 -0
- package/build/helpers/errors.js.map +1 -0
- package/build/helpers/factory.js +207 -0
- package/build/helpers/factory.js.map +1 -0
- package/build/helpers/formatNumber.js +18 -0
- package/build/helpers/formatNumber.js.map +1 -0
- package/build/helpers/formatString.js +38 -0
- package/build/helpers/formatString.js.map +1 -0
- package/build/helpers/getLanguagesWithWordComplexity.js +15 -0
- package/build/helpers/getLanguagesWithWordComplexity.js.map +1 -0
- package/build/helpers/getLanguagesWithWordFormSupport.js +16 -0
- package/build/helpers/getLanguagesWithWordFormSupport.js.map +1 -0
- package/build/helpers/getWordComplexityConfig.js +27 -0
- package/build/helpers/getWordComplexityConfig.js.map +1 -0
- package/build/helpers/getWordComplexityHelper.js +27 -0
- package/build/helpers/getWordComplexityHelper.js.map +1 -0
- package/build/helpers/htmlEntities.js +21 -0
- package/build/helpers/htmlEntities.js.map +1 -0
- package/build/helpers/includesAny.js +24 -0
- package/build/helpers/includesAny.js.map +1 -0
- package/build/helpers/index.js +179 -0
- package/build/helpers/index.js.map +1 -0
- package/build/helpers/shortlinker/Shortlinker.js +79 -0
- package/build/helpers/shortlinker/Shortlinker.js.map +1 -0
- package/build/helpers/shortlinker/index.js +17 -0
- package/build/helpers/shortlinker/index.js.map +1 -0
- package/build/helpers/shortlinker/singleton.js +76 -0
- package/build/helpers/shortlinker/singleton.js.map +1 -0
- package/build/helpers/types.js +37 -0
- package/build/helpers/types.js.map +1 -0
- package/build/index.js +103 -0
- package/build/index.js.map +1 -0
- package/build/languageProcessing/AbstractResearcher.js +348 -0
- package/build/languageProcessing/AbstractResearcher.js.map +1 -0
- package/build/languageProcessing/helpers/highlighting/getMarkingsInSentence.js +123 -0
- package/build/languageProcessing/helpers/highlighting/getMarkingsInSentence.js.map +1 -0
- package/build/languageProcessing/helpers/html/getFieldsToMark.js +37 -0
- package/build/languageProcessing/helpers/html/getFieldsToMark.js.map +1 -0
- package/build/languageProcessing/helpers/html/getSubheadingTexts.js +47 -0
- package/build/languageProcessing/helpers/html/getSubheadingTexts.js.map +1 -0
- package/build/languageProcessing/helpers/html/getSubheadings.js +92 -0
- package/build/languageProcessing/helpers/html/getSubheadings.js.map +1 -0
- package/build/languageProcessing/helpers/html/html.js +152 -0
- package/build/languageProcessing/helpers/html/html.js.map +1 -0
- package/build/languageProcessing/helpers/html/htmlParser.js +132 -0
- package/build/languageProcessing/helpers/html/htmlParser.js.map +1 -0
- package/build/languageProcessing/helpers/html/matchParagraphs.js +61 -0
- package/build/languageProcessing/helpers/html/matchParagraphs.js.map +1 -0
- package/build/languageProcessing/helpers/html/normalizeHTML.js +23 -0
- package/build/languageProcessing/helpers/html/normalizeHTML.js.map +1 -0
- package/build/languageProcessing/helpers/image/getAltAttribute.js +24 -0
- package/build/languageProcessing/helpers/image/getAltAttribute.js.map +1 -0
- package/build/languageProcessing/helpers/image/getImagesInTree.js +21 -0
- package/build/languageProcessing/helpers/image/getImagesInTree.js.map +1 -0
- package/build/languageProcessing/helpers/image/imageInText.js +26 -0
- package/build/languageProcessing/helpers/image/imageInText.js.map +1 -0
- package/build/languageProcessing/helpers/index.js +41 -0
- package/build/languageProcessing/helpers/index.js.map +1 -0
- package/build/languageProcessing/helpers/language/getLanguage.js +16 -0
- package/build/languageProcessing/helpers/language/getLanguage.js.map +1 -0
- package/build/languageProcessing/helpers/link/checkNofollow.js +42 -0
- package/build/languageProcessing/helpers/link/checkNofollow.js.map +1 -0
- package/build/languageProcessing/helpers/link/getAnchorsFromText.js +37 -0
- package/build/languageProcessing/helpers/link/getAnchorsFromText.js.map +1 -0
- package/build/languageProcessing/helpers/link/getLinkType.js +36 -0
- package/build/languageProcessing/helpers/link/getLinkType.js.map +1 -0
- package/build/languageProcessing/helpers/match/findKeywordFormsInString.js +101 -0
- package/build/languageProcessing/helpers/match/findKeywordFormsInString.js.map +1 -0
- package/build/languageProcessing/helpers/match/isDoubleQuoted.js +19 -0
- package/build/languageProcessing/helpers/match/isDoubleQuoted.js.map +1 -0
- package/build/languageProcessing/helpers/match/matchTextWithArray.js +41 -0
- package/build/languageProcessing/helpers/match/matchTextWithArray.js.map +1 -0
- package/build/languageProcessing/helpers/match/matchTextWithTransliteration.js +58 -0
- package/build/languageProcessing/helpers/match/matchTextWithTransliteration.js.map +1 -0
- package/build/languageProcessing/helpers/match/matchTextWithWord.js +47 -0
- package/build/languageProcessing/helpers/match/matchTextWithWord.js.map +1 -0
- package/build/languageProcessing/helpers/match/matchWordFormsWithSentence.js +162 -0
- package/build/languageProcessing/helpers/match/matchWordFormsWithSentence.js.map +1 -0
- package/build/languageProcessing/helpers/match/processExactMatchRequest.js +29 -0
- package/build/languageProcessing/helpers/match/processExactMatchRequest.js.map +1 -0
- package/build/languageProcessing/helpers/morphology/baseStemmer.js +18 -0
- package/build/languageProcessing/helpers/morphology/baseStemmer.js.map +1 -0
- package/build/languageProcessing/helpers/morphology/buildFormRule.js +26 -0
- package/build/languageProcessing/helpers/morphology/buildFormRule.js.map +1 -0
- package/build/languageProcessing/helpers/morphology/buildTopicStems.js +164 -0
- package/build/languageProcessing/helpers/morphology/buildTopicStems.js.map +1 -0
- package/build/languageProcessing/helpers/morphology/createRulesFromArrays.js +48 -0
- package/build/languageProcessing/helpers/morphology/createRulesFromArrays.js.map +1 -0
- package/build/languageProcessing/helpers/morphology/exceptionListHelpers.js +71 -0
- package/build/languageProcessing/helpers/morphology/exceptionListHelpers.js.map +1 -0
- package/build/languageProcessing/helpers/morphology/findMatchingEndingInArray.js +29 -0
- package/build/languageProcessing/helpers/morphology/findMatchingEndingInArray.js.map +1 -0
- package/build/languageProcessing/helpers/morphology/flattenSortLength.js +19 -0
- package/build/languageProcessing/helpers/morphology/flattenSortLength.js.map +1 -0
- package/build/languageProcessing/helpers/morphology/getAllWordsFromPaper.js +35 -0
- package/build/languageProcessing/helpers/morphology/getAllWordsFromPaper.js.map +1 -0
- package/build/languageProcessing/helpers/morphology/regexHelpers.js +53 -0
- package/build/languageProcessing/helpers/morphology/regexHelpers.js.map +1 -0
- package/build/languageProcessing/helpers/morphology/stemHelpers.js +46 -0
- package/build/languageProcessing/helpers/morphology/stemHelpers.js.map +1 -0
- package/build/languageProcessing/helpers/morphology/stemPrefixedFunctionWords.js +39 -0
- package/build/languageProcessing/helpers/morphology/stemPrefixedFunctionWords.js.map +1 -0
- package/build/languageProcessing/helpers/passiveVoice/periphrastic/directPrecedenceException.js +42 -0
- package/build/languageProcessing/helpers/passiveVoice/periphrastic/directPrecedenceException.js.map +1 -0
- package/build/languageProcessing/helpers/passiveVoice/periphrastic/freeAuxiliaryParticipleOrder/getClausesSplitOnStopWords.js +116 -0
- package/build/languageProcessing/helpers/passiveVoice/periphrastic/freeAuxiliaryParticipleOrder/getClausesSplitOnStopWords.js.map +1 -0
- package/build/languageProcessing/helpers/passiveVoice/periphrastic/freeAuxiliaryParticipleOrder/nonDirectParticiplePrecedenceException.js +45 -0
- package/build/languageProcessing/helpers/passiveVoice/periphrastic/freeAuxiliaryParticipleOrder/nonDirectParticiplePrecedenceException.js.map +1 -0
- package/build/languageProcessing/helpers/passiveVoice/periphrastic/getClauses.js +220 -0
- package/build/languageProcessing/helpers/passiveVoice/periphrastic/getClauses.js.map +1 -0
- package/build/languageProcessing/helpers/passiveVoice/periphrastic/getIndicesWithRegex.js +27 -0
- package/build/languageProcessing/helpers/passiveVoice/periphrastic/getIndicesWithRegex.js.map +1 -0
- package/build/languageProcessing/helpers/passiveVoice/periphrastic/matchRegularParticiples.js +28 -0
- package/build/languageProcessing/helpers/passiveVoice/periphrastic/matchRegularParticiples.js.map +1 -0
- package/build/languageProcessing/helpers/passiveVoice/periphrastic/precedenceException.js +46 -0
- package/build/languageProcessing/helpers/passiveVoice/periphrastic/precedenceException.js.map +1 -0
- package/build/languageProcessing/helpers/prominentWords/determineProminentWords.js +203 -0
- package/build/languageProcessing/helpers/prominentWords/determineProminentWords.js.map +1 -0
- package/build/languageProcessing/helpers/regex/createRegexFromArray.js +38 -0
- package/build/languageProcessing/helpers/regex/createRegexFromArray.js.map +1 -0
- package/build/languageProcessing/helpers/regex/createRegexFromDoubleArray.js +39 -0
- package/build/languageProcessing/helpers/regex/createRegexFromDoubleArray.js.map +1 -0
- package/build/languageProcessing/helpers/regex/createWordRegex.js +34 -0
- package/build/languageProcessing/helpers/regex/createWordRegex.js.map +1 -0
- package/build/languageProcessing/helpers/regex/matchStringWithRegex.js +24 -0
- package/build/languageProcessing/helpers/regex/matchStringWithRegex.js.map +1 -0
- package/build/languageProcessing/helpers/regex/searchAndReplaceWithOneRegex.js +21 -0
- package/build/languageProcessing/helpers/regex/searchAndReplaceWithOneRegex.js.map +1 -0
- package/build/languageProcessing/helpers/sanitize/doubleQuotes.js +19 -0
- package/build/languageProcessing/helpers/sanitize/doubleQuotes.js.map +1 -0
- package/build/languageProcessing/helpers/sanitize/filterShortcodesFromTree.js +131 -0
- package/build/languageProcessing/helpers/sanitize/filterShortcodesFromTree.js.map +1 -0
- package/build/languageProcessing/helpers/sanitize/mergeListItems.js +30 -0
- package/build/languageProcessing/helpers/sanitize/mergeListItems.js.map +1 -0
- package/build/languageProcessing/helpers/sanitize/parseSynonyms.js +24 -0
- package/build/languageProcessing/helpers/sanitize/parseSynonyms.js.map +1 -0
- package/build/languageProcessing/helpers/sanitize/quotes.js +47 -0
- package/build/languageProcessing/helpers/sanitize/quotes.js.map +1 -0
- package/build/languageProcessing/helpers/sanitize/removeEmailAddresses.js +19 -0
- package/build/languageProcessing/helpers/sanitize/removeEmailAddresses.js.map +1 -0
- package/build/languageProcessing/helpers/sanitize/removePunctuation.js +64 -0
- package/build/languageProcessing/helpers/sanitize/removePunctuation.js.map +1 -0
- package/build/languageProcessing/helpers/sanitize/removePunctuationExceptQuotes.js +24 -0
- package/build/languageProcessing/helpers/sanitize/removePunctuationExceptQuotes.js.map +1 -0
- package/build/languageProcessing/helpers/sanitize/removeSentenceTerminators.js +20 -0
- package/build/languageProcessing/helpers/sanitize/removeSentenceTerminators.js.map +1 -0
- package/build/languageProcessing/helpers/sanitize/removeURLs.js +19 -0
- package/build/languageProcessing/helpers/sanitize/removeURLs.js.map +1 -0
- package/build/languageProcessing/helpers/sanitize/sanitizeLineBreakTag.js +18 -0
- package/build/languageProcessing/helpers/sanitize/sanitizeLineBreakTag.js.map +1 -0
- package/build/languageProcessing/helpers/sanitize/sanitizeString.js +23 -0
- package/build/languageProcessing/helpers/sanitize/sanitizeString.js.map +1 -0
- package/build/languageProcessing/helpers/sanitize/stripHTMLTags.js +59 -0
- package/build/languageProcessing/helpers/sanitize/stripHTMLTags.js.map +1 -0
- package/build/languageProcessing/helpers/sanitize/stripNonTextTags.js +22 -0
- package/build/languageProcessing/helpers/sanitize/stripNonTextTags.js.map +1 -0
- package/build/languageProcessing/helpers/sanitize/stripNumbers.js +26 -0
- package/build/languageProcessing/helpers/sanitize/stripNumbers.js.map +1 -0
- package/build/languageProcessing/helpers/sanitize/stripSpaces.js +29 -0
- package/build/languageProcessing/helpers/sanitize/stripSpaces.js.map +1 -0
- package/build/languageProcessing/helpers/sanitize/stripWordBoundaries.js +65 -0
- package/build/languageProcessing/helpers/sanitize/stripWordBoundaries.js.map +1 -0
- package/build/languageProcessing/helpers/sanitize/unifyWhitespace.js +64 -0
- package/build/languageProcessing/helpers/sanitize/unifyWhitespace.js.map +1 -0
- package/build/languageProcessing/helpers/sentence/SentenceTokenizer.js +565 -0
- package/build/languageProcessing/helpers/sentence/SentenceTokenizer.js.map +1 -0
- package/build/languageProcessing/helpers/sentence/countSentences.js +27 -0
- package/build/languageProcessing/helpers/sentence/countSentences.js.map +1 -0
- package/build/languageProcessing/helpers/sentence/getSentences.js +71 -0
- package/build/languageProcessing/helpers/sentence/getSentences.js.map +1 -0
- package/build/languageProcessing/helpers/sentence/getSentencesFromTree.js +60 -0
- package/build/languageProcessing/helpers/sentence/getSentencesFromTree.js.map +1 -0
- package/build/languageProcessing/helpers/sentence/memoizedSentenceTokenizer.js +37 -0
- package/build/languageProcessing/helpers/sentence/memoizedSentenceTokenizer.js.map +1 -0
- package/build/languageProcessing/helpers/sentence/sentencesLength.js +37 -0
- package/build/languageProcessing/helpers/sentence/sentencesLength.js.map +1 -0
- package/build/languageProcessing/helpers/syllables/DeviationFragment.js +108 -0
- package/build/languageProcessing/helpers/syllables/DeviationFragment.js.map +1 -0
- package/build/languageProcessing/helpers/syllables/countSyllables.js +173 -0
- package/build/languageProcessing/helpers/syllables/countSyllables.js.map +1 -0
- package/build/languageProcessing/helpers/syllables/syllableCountIterator.js +63 -0
- package/build/languageProcessing/helpers/syllables/syllableCountIterator.js.map +1 -0
- package/build/languageProcessing/helpers/syllables/syllableCountStep.js +75 -0
- package/build/languageProcessing/helpers/syllables/syllableCountStep.js.map +1 -0
- package/build/languageProcessing/helpers/transform/transformWordsWithHyphens.js +24 -0
- package/build/languageProcessing/helpers/transform/transformWordsWithHyphens.js.map +1 -0
- package/build/languageProcessing/helpers/transliterate/replaceDiacritics.js +25 -0
- package/build/languageProcessing/helpers/transliterate/replaceDiacritics.js.map +1 -0
- package/build/languageProcessing/helpers/transliterate/specialCharacterMappings.js +194 -0
- package/build/languageProcessing/helpers/transliterate/specialCharacterMappings.js.map +1 -0
- package/build/languageProcessing/helpers/transliterate/transliterate.js +24 -0
- package/build/languageProcessing/helpers/transliterate/transliterate.js.map +1 -0
- package/build/languageProcessing/helpers/transliterate/transliterateWPstyle.js +25 -0
- package/build/languageProcessing/helpers/transliterate/transliterateWPstyle.js.map +1 -0
- package/build/languageProcessing/helpers/url/parseSlug.js +17 -0
- package/build/languageProcessing/helpers/url/parseSlug.js.map +1 -0
- package/build/languageProcessing/helpers/url/url.js +174 -0
- package/build/languageProcessing/helpers/url/url.js.map +1 -0
- package/build/languageProcessing/helpers/word/addWordboundary.js +41 -0
- package/build/languageProcessing/helpers/word/addWordboundary.js.map +1 -0
- package/build/languageProcessing/helpers/word/areWordsInSentence.js +23 -0
- package/build/languageProcessing/helpers/word/areWordsInSentence.js.map +1 -0
- package/build/languageProcessing/helpers/word/countMetaDescriptionLength.js +24 -0
- package/build/languageProcessing/helpers/word/countMetaDescriptionLength.js.map +1 -0
- package/build/languageProcessing/helpers/word/countWords.js +21 -0
- package/build/languageProcessing/helpers/word/countWords.js.map +1 -0
- package/build/languageProcessing/helpers/word/createPunctuationTokens.js +46 -0
- package/build/languageProcessing/helpers/word/createPunctuationTokens.js.map +1 -0
- package/build/languageProcessing/helpers/word/filterWordsFromArray.js +21 -0
- package/build/languageProcessing/helpers/word/filterWordsFromArray.js.map +1 -0
- package/build/languageProcessing/helpers/word/followsIndex.js +29 -0
- package/build/languageProcessing/helpers/word/followsIndex.js.map +1 -0
- package/build/languageProcessing/helpers/word/getAllWordsFromTree.js +30 -0
- package/build/languageProcessing/helpers/word/getAllWordsFromTree.js.map +1 -0
- package/build/languageProcessing/helpers/word/getWords.js +47 -0
- package/build/languageProcessing/helpers/word/getWords.js.map +1 -0
- package/build/languageProcessing/helpers/word/includesIndex.js +34 -0
- package/build/languageProcessing/helpers/word/includesIndex.js.map +1 -0
- package/build/languageProcessing/helpers/word/indices.js +141 -0
- package/build/languageProcessing/helpers/word/indices.js.map +1 -0
- package/build/languageProcessing/helpers/word/markWordsInSentences.js +189 -0
- package/build/languageProcessing/helpers/word/markWordsInSentences.js.map +1 -0
- package/build/languageProcessing/helpers/word/matchWordInSentence.js +63 -0
- package/build/languageProcessing/helpers/word/matchWordInSentence.js.map +1 -0
- package/build/languageProcessing/helpers/word/splitIntoTokens.js +52 -0
- package/build/languageProcessing/helpers/word/splitIntoTokens.js.map +1 -0
- package/build/languageProcessing/index.js +283 -0
- package/build/languageProcessing/index.js.map +1 -0
- package/build/languageProcessing/languages/_default/Researcher.js +43 -0
- package/build/languageProcessing/languages/_default/Researcher.js.map +1 -0
- package/build/languageProcessing/languages/_default/helpers/getStemmer.js +20 -0
- package/build/languageProcessing/languages/_default/helpers/getStemmer.js.map +1 -0
- package/build/languageProcessing/languages/ar/Researcher.js +54 -0
- package/build/languageProcessing/languages/ar/Researcher.js.map +1 -0
- package/build/languageProcessing/languages/ar/config/firstWordExceptions.js +18 -0
- package/build/languageProcessing/languages/ar/config/firstWordExceptions.js.map +1 -0
- package/build/languageProcessing/languages/ar/config/functionWords.js +80 -0
- package/build/languageProcessing/languages/ar/config/functionWords.js.map +1 -0
- package/build/languageProcessing/languages/ar/config/internal/passiveVerbsWithLongVowel.js +13 -0
- package/build/languageProcessing/languages/ar/config/internal/passiveVerbsWithLongVowel.js.map +1 -0
- package/build/languageProcessing/languages/ar/config/prefixedFunctionWords.js +11 -0
- package/build/languageProcessing/languages/ar/config/prefixedFunctionWords.js.map +1 -0
- package/build/languageProcessing/languages/ar/config/transitionWords.js +13 -0
- package/build/languageProcessing/languages/ar/config/transitionWords.js.map +1 -0
- package/build/languageProcessing/languages/ar/config/twoPartTransitionWords.js +13 -0
- package/build/languageProcessing/languages/ar/config/twoPartTransitionWords.js.map +1 -0
- package/build/languageProcessing/languages/ar/helpers/createBasicWordForms.js +38 -0
- package/build/languageProcessing/languages/ar/helpers/createBasicWordForms.js.map +1 -0
- package/build/languageProcessing/languages/ar/helpers/getStemmer.js +28 -0
- package/build/languageProcessing/languages/ar/helpers/getStemmer.js.map +1 -0
- package/build/languageProcessing/languages/ar/helpers/internal/stem.js +635 -0
- package/build/languageProcessing/languages/ar/helpers/internal/stem.js.map +1 -0
- package/build/languageProcessing/languages/ar/helpers/isPassiveSentence.js +41 -0
- package/build/languageProcessing/languages/ar/helpers/isPassiveSentence.js.map +1 -0
- package/build/languageProcessing/languages/ca/Researcher.js +52 -0
- package/build/languageProcessing/languages/ca/Researcher.js.map +1 -0
- package/build/languageProcessing/languages/ca/config/sentenceLength.js +10 -0
- package/build/languageProcessing/languages/ca/config/sentenceLength.js.map +1 -0
- package/build/languageProcessing/languages/ca/config/transitionWords.js +13 -0
- package/build/languageProcessing/languages/ca/config/transitionWords.js.map +1 -0
- package/build/languageProcessing/languages/ca/config/twoPartTransitionWords.js +13 -0
- package/build/languageProcessing/languages/ca/config/twoPartTransitionWords.js.map +1 -0
- package/build/languageProcessing/languages/ca/helpers/getStemmer.js +20 -0
- package/build/languageProcessing/languages/ca/helpers/getStemmer.js.map +1 -0
- package/build/languageProcessing/languages/cs/Researcher.js +52 -0
- package/build/languageProcessing/languages/cs/Researcher.js.map +1 -0
- package/build/languageProcessing/languages/cs/config/firstWordExceptions.js +20 -0
- package/build/languageProcessing/languages/cs/config/firstWordExceptions.js.map +1 -0
- package/build/languageProcessing/languages/cs/config/functionWords.js +50 -0
- package/build/languageProcessing/languages/cs/config/functionWords.js.map +1 -0
- package/build/languageProcessing/languages/cs/config/internal/passiveVoiceAuxiliaries.js +10 -0
- package/build/languageProcessing/languages/cs/config/internal/passiveVoiceAuxiliaries.js.map +1 -0
- package/build/languageProcessing/languages/cs/config/internal/passiveVoiceEndings.js +14 -0
- package/build/languageProcessing/languages/cs/config/internal/passiveVoiceEndings.js.map +1 -0
- package/build/languageProcessing/languages/cs/config/stopWords.js +12 -0
- package/build/languageProcessing/languages/cs/config/stopWords.js.map +1 -0
- package/build/languageProcessing/languages/cs/config/transitionWords.js +13 -0
- package/build/languageProcessing/languages/cs/config/transitionWords.js.map +1 -0
- package/build/languageProcessing/languages/cs/config/twoPartTransitionWords.js +13 -0
- package/build/languageProcessing/languages/cs/config/twoPartTransitionWords.js.map +1 -0
- package/build/languageProcessing/languages/cs/helpers/getClauses.js +35 -0
- package/build/languageProcessing/languages/cs/helpers/getClauses.js.map +1 -0
- package/build/languageProcessing/languages/cs/helpers/getStemmer.js +28 -0
- package/build/languageProcessing/languages/cs/helpers/getStemmer.js.map +1 -0
- package/build/languageProcessing/languages/cs/helpers/internal/getParticiples.js +24 -0
- package/build/languageProcessing/languages/cs/helpers/internal/getParticiples.js.map +1 -0
- package/build/languageProcessing/languages/cs/helpers/internal/stem.js +341 -0
- package/build/languageProcessing/languages/cs/helpers/internal/stem.js.map +1 -0
- package/build/languageProcessing/languages/cs/values/Clause.js +45 -0
- package/build/languageProcessing/languages/cs/values/Clause.js.map +1 -0
- package/build/languageProcessing/languages/de/Researcher.js +61 -0
- package/build/languageProcessing/languages/de/Researcher.js.map +1 -0
- package/build/languageProcessing/languages/de/config/firstWordExceptions.js +20 -0
- package/build/languageProcessing/languages/de/config/firstWordExceptions.js.map +1 -0
- package/build/languageProcessing/languages/de/config/functionWords.js +103 -0
- package/build/languageProcessing/languages/de/config/functionWords.js.map +1 -0
- package/build/languageProcessing/languages/de/config/internal/exceptionsParticiplesActive.js +13 -0
- package/build/languageProcessing/languages/de/config/internal/exceptionsParticiplesActive.js.map +1 -0
- package/build/languageProcessing/languages/de/config/internal/passiveVoiceAuxiliaries.js +29 -0
- package/build/languageProcessing/languages/de/config/internal/passiveVoiceAuxiliaries.js.map +1 -0
- package/build/languageProcessing/languages/de/config/internal/passiveVoiceIrregulars.js +15 -0
- package/build/languageProcessing/languages/de/config/internal/passiveVoiceIrregulars.js.map +1 -0
- package/build/languageProcessing/languages/de/config/internal/passiveVoiceRegex.js +78 -0
- package/build/languageProcessing/languages/de/config/internal/passiveVoiceRegex.js.map +1 -0
- package/build/languageProcessing/languages/de/config/keyphraseLength.js +17 -0
- package/build/languageProcessing/languages/de/config/keyphraseLength.js.map +1 -0
- package/build/languageProcessing/languages/de/config/stopWords.js +12 -0
- package/build/languageProcessing/languages/de/config/stopWords.js.map +1 -0
- package/build/languageProcessing/languages/de/config/syllables.json +460 -0
- package/build/languageProcessing/languages/de/config/transitionWords.js +13 -0
- package/build/languageProcessing/languages/de/config/transitionWords.js.map +1 -0
- package/build/languageProcessing/languages/de/config/twoPartTransitionWords.js +13 -0
- package/build/languageProcessing/languages/de/config/twoPartTransitionWords.js.map +1 -0
- package/build/languageProcessing/languages/de/config/wordComplexity.js +11 -0
- package/build/languageProcessing/languages/de/config/wordComplexity.js.map +1 -0
- package/build/languageProcessing/languages/de/helpers/calculateFleschReadingScore.js +23 -0
- package/build/languageProcessing/languages/de/helpers/calculateFleschReadingScore.js.map +1 -0
- package/build/languageProcessing/languages/de/helpers/checkIfWordIsComplex.js +47 -0
- package/build/languageProcessing/languages/de/helpers/checkIfWordIsComplex.js.map +1 -0
- package/build/languageProcessing/languages/de/helpers/checkIfWordIsFunction.js +20 -0
- package/build/languageProcessing/languages/de/helpers/checkIfWordIsFunction.js.map +1 -0
- package/build/languageProcessing/languages/de/helpers/getClauses.js +34 -0
- package/build/languageProcessing/languages/de/helpers/getClauses.js.map +1 -0
- package/build/languageProcessing/languages/de/helpers/getStemmer.js +28 -0
- package/build/languageProcessing/languages/de/helpers/getStemmer.js.map +1 -0
- package/build/languageProcessing/languages/de/helpers/internal/SentenceTokenizer.js +38 -0
- package/build/languageProcessing/languages/de/helpers/internal/SentenceTokenizer.js.map +1 -0
- package/build/languageProcessing/languages/de/helpers/internal/detectAndStemRegularParticiple.js +118 -0
- package/build/languageProcessing/languages/de/helpers/internal/detectAndStemRegularParticiple.js.map +1 -0
- package/build/languageProcessing/languages/de/helpers/internal/determineStem.js +113 -0
- package/build/languageProcessing/languages/de/helpers/internal/determineStem.js.map +1 -0
- package/build/languageProcessing/languages/de/helpers/internal/getParticiples.js +39 -0
- package/build/languageProcessing/languages/de/helpers/internal/getParticiples.js.map +1 -0
- package/build/languageProcessing/languages/de/helpers/internal/stem.js +222 -0
- package/build/languageProcessing/languages/de/helpers/internal/stem.js.map +1 -0
- package/build/languageProcessing/languages/de/helpers/memoizedSentenceTokenizer.js +37 -0
- package/build/languageProcessing/languages/de/helpers/memoizedSentenceTokenizer.js.map +1 -0
- package/build/languageProcessing/languages/de/values/Clause.js +91 -0
- package/build/languageProcessing/languages/de/values/Clause.js.map +1 -0
- package/build/languageProcessing/languages/el/Researcher.js +55 -0
- package/build/languageProcessing/languages/el/Researcher.js.map +1 -0
- package/build/languageProcessing/languages/el/config/firstWordExceptions.js +33 -0
- package/build/languageProcessing/languages/el/config/firstWordExceptions.js.map +1 -0
- package/build/languageProcessing/languages/el/config/functionWords.js +47 -0
- package/build/languageProcessing/languages/el/config/functionWords.js.map +1 -0
- package/build/languageProcessing/languages/el/config/internal/auxiliaries.js +12 -0
- package/build/languageProcessing/languages/el/config/internal/auxiliaries.js.map +1 -0
- package/build/languageProcessing/languages/el/config/internal/morphologicalPassiveSuffixes.js +8 -0
- package/build/languageProcessing/languages/el/config/internal/morphologicalPassiveSuffixes.js.map +1 -0
- package/build/languageProcessing/languages/el/config/internal/nonPassiveVerbStems.js +22 -0
- package/build/languageProcessing/languages/el/config/internal/nonPassiveVerbStems.js.map +1 -0
- package/build/languageProcessing/languages/el/config/stopWords.js +13 -0
- package/build/languageProcessing/languages/el/config/stopWords.js.map +1 -0
- package/build/languageProcessing/languages/el/config/transitionWords.js +18 -0
- package/build/languageProcessing/languages/el/config/transitionWords.js.map +1 -0
- package/build/languageProcessing/languages/el/config/twoPartTransitionWords.js +13 -0
- package/build/languageProcessing/languages/el/config/twoPartTransitionWords.js.map +1 -0
- package/build/languageProcessing/languages/el/helpers/getClauses.js +34 -0
- package/build/languageProcessing/languages/el/helpers/getClauses.js.map +1 -0
- package/build/languageProcessing/languages/el/helpers/getStemmer.js +29 -0
- package/build/languageProcessing/languages/el/helpers/getStemmer.js.map +1 -0
- package/build/languageProcessing/languages/el/helpers/internal/getParticiples.js +24 -0
- package/build/languageProcessing/languages/el/helpers/internal/getParticiples.js.map +1 -0
- package/build/languageProcessing/languages/el/helpers/internal/stem.js +347 -0
- package/build/languageProcessing/languages/el/helpers/internal/stem.js.map +1 -0
- package/build/languageProcessing/languages/el/helpers/isPassiveSentence.js +43 -0
- package/build/languageProcessing/languages/el/helpers/isPassiveSentence.js.map +1 -0
- package/build/languageProcessing/languages/el/values/Clause.js +46 -0
- package/build/languageProcessing/languages/el/values/Clause.js.map +1 -0
- package/build/languageProcessing/languages/en/Researcher.js +55 -0
- package/build/languageProcessing/languages/en/Researcher.js.map +1 -0
- package/build/languageProcessing/languages/en/config/abbreviations.js +16 -0
- package/build/languageProcessing/languages/en/config/abbreviations.js.map +1 -0
- package/build/languageProcessing/languages/en/config/firstWordExceptions.js +20 -0
- package/build/languageProcessing/languages/en/config/firstWordExceptions.js.map +1 -0
- package/build/languageProcessing/languages/en/config/functionWords.js +110 -0
- package/build/languageProcessing/languages/en/config/functionWords.js.map +1 -0
- package/build/languageProcessing/languages/en/config/internal/passiveVoiceAuxiliaries.js +15 -0
- package/build/languageProcessing/languages/en/config/internal/passiveVoiceAuxiliaries.js.map +1 -0
- package/build/languageProcessing/languages/en/config/internal/passiveVoiceIrregulars.js +15 -0
- package/build/languageProcessing/languages/en/config/internal/passiveVoiceIrregulars.js.map +1 -0
- package/build/languageProcessing/languages/en/config/internal/passiveVoiceNonVerbEndingEd.js +13 -0
- package/build/languageProcessing/languages/en/config/internal/passiveVoiceNonVerbEndingEd.js.map +1 -0
- package/build/languageProcessing/languages/en/config/regularParticiplesRegex.js +12 -0
- package/build/languageProcessing/languages/en/config/regularParticiplesRegex.js.map +1 -0
- package/build/languageProcessing/languages/en/config/stopWords.js +12 -0
- package/build/languageProcessing/languages/en/config/stopWords.js.map +1 -0
- package/build/languageProcessing/languages/en/config/syllables.json +86 -0
- package/build/languageProcessing/languages/en/config/transitionWords.js +13 -0
- package/build/languageProcessing/languages/en/config/transitionWords.js.map +1 -0
- package/build/languageProcessing/languages/en/config/twoPartTransitionWords.js +13 -0
- package/build/languageProcessing/languages/en/config/twoPartTransitionWords.js.map +1 -0
- package/build/languageProcessing/languages/en/config/wordComplexity.js +12 -0
- package/build/languageProcessing/languages/en/config/wordComplexity.js.map +1 -0
- package/build/languageProcessing/languages/en/helpers/calculateFleschReadingScore.js +23 -0
- package/build/languageProcessing/languages/en/helpers/calculateFleschReadingScore.js.map +1 -0
- package/build/languageProcessing/languages/en/helpers/checkIfWordIsComplex.js +49 -0
- package/build/languageProcessing/languages/en/helpers/checkIfWordIsComplex.js.map +1 -0
- package/build/languageProcessing/languages/en/helpers/getClauses.js +58 -0
- package/build/languageProcessing/languages/en/helpers/getClauses.js.map +1 -0
- package/build/languageProcessing/languages/en/helpers/getStemmer.js +28 -0
- package/build/languageProcessing/languages/en/helpers/getStemmer.js.map +1 -0
- package/build/languageProcessing/languages/en/helpers/internal/determineStem.js +161 -0
- package/build/languageProcessing/languages/en/helpers/internal/determineStem.js.map +1 -0
- package/build/languageProcessing/languages/en/helpers/internal/getAdjectiveStem.js +149 -0
- package/build/languageProcessing/languages/en/helpers/internal/getAdjectiveStem.js.map +1 -0
- package/build/languageProcessing/languages/en/helpers/internal/getParticiples.js +33 -0
- package/build/languageProcessing/languages/en/helpers/internal/getParticiples.js.map +1 -0
- package/build/languageProcessing/languages/en/helpers/internal/getVerbStem.js +228 -0
- package/build/languageProcessing/languages/en/helpers/internal/getVerbStem.js.map +1 -0
- package/build/languageProcessing/languages/en/values/Clause.js +68 -0
- package/build/languageProcessing/languages/en/values/Clause.js.map +1 -0
- package/build/languageProcessing/languages/es/Researcher.js +57 -0
- package/build/languageProcessing/languages/es/Researcher.js.map +1 -0
- package/build/languageProcessing/languages/es/config/firstWordExceptions.js +20 -0
- package/build/languageProcessing/languages/es/config/firstWordExceptions.js.map +1 -0
- package/build/languageProcessing/languages/es/config/functionWords.js +111 -0
- package/build/languageProcessing/languages/es/config/functionWords.js.map +1 -0
- package/build/languageProcessing/languages/es/config/internal/passiveVoiceAuxiliaries.js +12 -0
- package/build/languageProcessing/languages/es/config/internal/passiveVoiceAuxiliaries.js.map +1 -0
- package/build/languageProcessing/languages/es/config/internal/passiveVoiceParticiples.js +13 -0
- package/build/languageProcessing/languages/es/config/internal/passiveVoiceParticiples.js.map +1 -0
- package/build/languageProcessing/languages/es/config/sentenceLength.js +10 -0
- package/build/languageProcessing/languages/es/config/sentenceLength.js.map +1 -0
- package/build/languageProcessing/languages/es/config/stopWords.js +12 -0
- package/build/languageProcessing/languages/es/config/stopWords.js.map +1 -0
- package/build/languageProcessing/languages/es/config/syllables.json +176 -0
- package/build/languageProcessing/languages/es/config/transitionWords.js +13 -0
- package/build/languageProcessing/languages/es/config/transitionWords.js.map +1 -0
- package/build/languageProcessing/languages/es/config/twoPartTransitionWords.js +13 -0
- package/build/languageProcessing/languages/es/config/twoPartTransitionWords.js.map +1 -0
- package/build/languageProcessing/languages/es/config/wordComplexity.js +11 -0
- package/build/languageProcessing/languages/es/config/wordComplexity.js.map +1 -0
- package/build/languageProcessing/languages/es/helpers/calculateFleschReadingScore.js +23 -0
- package/build/languageProcessing/languages/es/helpers/calculateFleschReadingScore.js.map +1 -0
- package/build/languageProcessing/languages/es/helpers/checkIfWordIsComplex.js +59 -0
- package/build/languageProcessing/languages/es/helpers/checkIfWordIsComplex.js.map +1 -0
- package/build/languageProcessing/languages/es/helpers/getClauses.js +38 -0
- package/build/languageProcessing/languages/es/helpers/getClauses.js.map +1 -0
- package/build/languageProcessing/languages/es/helpers/getStemmer.js +28 -0
- package/build/languageProcessing/languages/es/helpers/getStemmer.js.map +1 -0
- package/build/languageProcessing/languages/es/helpers/internal/checkVerbStemModifications.js +40 -0
- package/build/languageProcessing/languages/es/helpers/internal/checkVerbStemModifications.js.map +1 -0
- package/build/languageProcessing/languages/es/helpers/internal/getParticiples.js +43 -0
- package/build/languageProcessing/languages/es/helpers/internal/getParticiples.js.map +1 -0
- package/build/languageProcessing/languages/es/helpers/internal/stem.js +574 -0
- package/build/languageProcessing/languages/es/helpers/internal/stem.js.map +1 -0
- package/build/languageProcessing/languages/es/values/Clause.js +49 -0
- package/build/languageProcessing/languages/es/values/Clause.js.map +1 -0
- package/build/languageProcessing/languages/fa/Researcher.js +56 -0
- package/build/languageProcessing/languages/fa/Researcher.js.map +1 -0
- package/build/languageProcessing/languages/fa/config/firstWordExceptions.js +18 -0
- package/build/languageProcessing/languages/fa/config/firstWordExceptions.js.map +1 -0
- package/build/languageProcessing/languages/fa/config/functionWords.js +41 -0
- package/build/languageProcessing/languages/fa/config/functionWords.js.map +1 -0
- package/build/languageProcessing/languages/fa/config/internal/participles.js +14 -0
- package/build/languageProcessing/languages/fa/config/internal/participles.js.map +1 -0
- package/build/languageProcessing/languages/fa/config/sentenceLength.js +10 -0
- package/build/languageProcessing/languages/fa/config/sentenceLength.js.map +1 -0
- package/build/languageProcessing/languages/fa/config/transitionWords.js +18 -0
- package/build/languageProcessing/languages/fa/config/transitionWords.js.map +1 -0
- package/build/languageProcessing/languages/fa/config/twoPartTransitionWords.js +13 -0
- package/build/languageProcessing/languages/fa/config/twoPartTransitionWords.js.map +1 -0
- package/build/languageProcessing/languages/fa/helpers/createBasicWordForms.js +99 -0
- package/build/languageProcessing/languages/fa/helpers/createBasicWordForms.js.map +1 -0
- package/build/languageProcessing/languages/fa/helpers/getStemmer.js +22 -0
- package/build/languageProcessing/languages/fa/helpers/getStemmer.js.map +1 -0
- package/build/languageProcessing/languages/fa/helpers/isPassiveSentence.js +22 -0
- package/build/languageProcessing/languages/fa/helpers/isPassiveSentence.js.map +1 -0
- package/build/languageProcessing/languages/fr/Researcher.js +55 -0
- package/build/languageProcessing/languages/fr/Researcher.js.map +1 -0
- package/build/languageProcessing/languages/fr/config/firstWordExceptions.js +20 -0
- package/build/languageProcessing/languages/fr/config/firstWordExceptions.js.map +1 -0
- package/build/languageProcessing/languages/fr/config/functionWords.js +144 -0
- package/build/languageProcessing/languages/fr/config/functionWords.js.map +1 -0
- package/build/languageProcessing/languages/fr/config/internal/exceptionsParticiplesActive.js +22 -0
- package/build/languageProcessing/languages/fr/config/internal/exceptionsParticiplesActive.js.map +1 -0
- package/build/languageProcessing/languages/fr/config/internal/passiveVoiceAuxiliaries.js +12 -0
- package/build/languageProcessing/languages/fr/config/internal/passiveVoiceAuxiliaries.js.map +1 -0
- package/build/languageProcessing/languages/fr/config/internal/passiveVoiceIrregulars.js +27 -0
- package/build/languageProcessing/languages/fr/config/internal/passiveVoiceIrregulars.js.map +1 -0
- package/build/languageProcessing/languages/fr/config/stopWords.js +12 -0
- package/build/languageProcessing/languages/fr/config/stopWords.js.map +1 -0
- package/build/languageProcessing/languages/fr/config/syllables.json +1426 -0
- package/build/languageProcessing/languages/fr/config/transitionWords.js +13 -0
- package/build/languageProcessing/languages/fr/config/transitionWords.js.map +1 -0
- package/build/languageProcessing/languages/fr/config/twoPartTransitionWords.js +13 -0
- package/build/languageProcessing/languages/fr/config/twoPartTransitionWords.js.map +1 -0
- package/build/languageProcessing/languages/fr/config/wordComplexity.js +11 -0
- package/build/languageProcessing/languages/fr/config/wordComplexity.js.map +1 -0
- package/build/languageProcessing/languages/fr/helpers/calculateFleschReadingScore.js +23 -0
- package/build/languageProcessing/languages/fr/helpers/calculateFleschReadingScore.js.map +1 -0
- package/build/languageProcessing/languages/fr/helpers/checkIfWordIsComplex.js +72 -0
- package/build/languageProcessing/languages/fr/helpers/checkIfWordIsComplex.js.map +1 -0
- package/build/languageProcessing/languages/fr/helpers/getClauses.js +42 -0
- package/build/languageProcessing/languages/fr/helpers/getClauses.js.map +1 -0
- package/build/languageProcessing/languages/fr/helpers/getStemmer.js +28 -0
- package/build/languageProcessing/languages/fr/helpers/getStemmer.js.map +1 -0
- package/build/languageProcessing/languages/fr/helpers/internal/getParticiples.js +71 -0
- package/build/languageProcessing/languages/fr/helpers/internal/getParticiples.js.map +1 -0
- package/build/languageProcessing/languages/fr/helpers/internal/stem.js +544 -0
- package/build/languageProcessing/languages/fr/helpers/internal/stem.js.map +1 -0
- package/build/languageProcessing/languages/fr/values/Clause.js +90 -0
- package/build/languageProcessing/languages/fr/values/Clause.js.map +1 -0
- package/build/languageProcessing/languages/he/Researcher.js +59 -0
- package/build/languageProcessing/languages/he/Researcher.js.map +1 -0
- package/build/languageProcessing/languages/he/config/firstWordExceptions.js +18 -0
- package/build/languageProcessing/languages/he/config/firstWordExceptions.js.map +1 -0
- package/build/languageProcessing/languages/he/config/functionWords.js +504 -0
- package/build/languageProcessing/languages/he/config/functionWords.js.map +1 -0
- package/build/languageProcessing/languages/he/config/internal/regularRootsHufal.js +13 -0
- package/build/languageProcessing/languages/he/config/internal/regularRootsHufal.js.map +1 -0
- package/build/languageProcessing/languages/he/config/internal/regularRootsNifal.js +13 -0
- package/build/languageProcessing/languages/he/config/internal/regularRootsNifal.js.map +1 -0
- package/build/languageProcessing/languages/he/config/internal/regularRootsPual.js +13 -0
- package/build/languageProcessing/languages/he/config/internal/regularRootsPual.js.map +1 -0
- package/build/languageProcessing/languages/he/config/passiveVoice/regularRootsHufal.js +15 -0
- package/build/languageProcessing/languages/he/config/passiveVoice/regularRootsHufal.js.map +1 -0
- package/build/languageProcessing/languages/he/config/passiveVoice/regularRootsNifal.js +15 -0
- package/build/languageProcessing/languages/he/config/passiveVoice/regularRootsNifal.js.map +1 -0
- package/build/languageProcessing/languages/he/config/passiveVoice/regularRootsPual.js +15 -0
- package/build/languageProcessing/languages/he/config/passiveVoice/regularRootsPual.js.map +1 -0
- package/build/languageProcessing/languages/he/config/prefixedFunctionWords.js +9 -0
- package/build/languageProcessing/languages/he/config/prefixedFunctionWords.js.map +1 -0
- package/build/languageProcessing/languages/he/config/sentenceLength.js +10 -0
- package/build/languageProcessing/languages/he/config/sentenceLength.js.map +1 -0
- package/build/languageProcessing/languages/he/config/transitionWords.js +13 -0
- package/build/languageProcessing/languages/he/config/transitionWords.js.map +1 -0
- package/build/languageProcessing/languages/he/config/twoPartTransitionWords.js +13 -0
- package/build/languageProcessing/languages/he/config/twoPartTransitionWords.js.map +1 -0
- package/build/languageProcessing/languages/he/helpers/createBasicWordForms.js +40 -0
- package/build/languageProcessing/languages/he/helpers/createBasicWordForms.js.map +1 -0
- package/build/languageProcessing/languages/he/helpers/getStemmer.js +28 -0
- package/build/languageProcessing/languages/he/helpers/getStemmer.js.map +1 -0
- package/build/languageProcessing/languages/he/helpers/internal/stem.js +59 -0
- package/build/languageProcessing/languages/he/helpers/internal/stem.js.map +1 -0
- package/build/languageProcessing/languages/he/helpers/isPassiveSentence.js +122 -0
- package/build/languageProcessing/languages/he/helpers/isPassiveSentence.js.map +1 -0
- package/build/languageProcessing/languages/he/helpers/stem.js +59 -0
- package/build/languageProcessing/languages/he/helpers/stem.js.map +1 -0
- package/build/languageProcessing/languages/hu/Researcher.js +57 -0
- package/build/languageProcessing/languages/hu/Researcher.js.map +1 -0
- package/build/languageProcessing/languages/hu/config/firstWordExceptions.js +32 -0
- package/build/languageProcessing/languages/hu/config/firstWordExceptions.js.map +1 -0
- package/build/languageProcessing/languages/hu/config/functionWords.js +52 -0
- package/build/languageProcessing/languages/hu/config/functionWords.js.map +1 -0
- package/build/languageProcessing/languages/hu/config/internal/auxiliaries.js +20 -0
- package/build/languageProcessing/languages/hu/config/internal/auxiliaries.js.map +1 -0
- package/build/languageProcessing/languages/hu/config/internal/morphologicalPassiveAffixes.js +12 -0
- package/build/languageProcessing/languages/hu/config/internal/morphologicalPassiveAffixes.js.map +1 -0
- package/build/languageProcessing/languages/hu/config/internal/nonPassivesInVaAndVe.js +25 -0
- package/build/languageProcessing/languages/hu/config/internal/nonPassivesInVaAndVe.js.map +1 -0
- package/build/languageProcessing/languages/hu/config/internal/odikVerbs.js +25 -0
- package/build/languageProcessing/languages/hu/config/internal/odikVerbs.js.map +1 -0
- package/build/languageProcessing/languages/hu/config/internal/participles.js +25 -0
- package/build/languageProcessing/languages/hu/config/internal/participles.js.map +1 -0
- package/build/languageProcessing/languages/hu/config/stopWords.js +29 -0
- package/build/languageProcessing/languages/hu/config/stopWords.js.map +1 -0
- package/build/languageProcessing/languages/hu/config/transitionWords.js +13 -0
- package/build/languageProcessing/languages/hu/config/transitionWords.js.map +1 -0
- package/build/languageProcessing/languages/hu/config/twoPartTransitionWords.js +13 -0
- package/build/languageProcessing/languages/hu/config/twoPartTransitionWords.js.map +1 -0
- package/build/languageProcessing/languages/hu/helpers/getClauses.js +34 -0
- package/build/languageProcessing/languages/hu/helpers/getClauses.js.map +1 -0
- package/build/languageProcessing/languages/hu/helpers/getStemmer.js +28 -0
- package/build/languageProcessing/languages/hu/helpers/getStemmer.js.map +1 -0
- package/build/languageProcessing/languages/hu/helpers/internal/getParticiples.js +25 -0
- package/build/languageProcessing/languages/hu/helpers/internal/getParticiples.js.map +1 -0
- package/build/languageProcessing/languages/hu/helpers/internal/stem.js +390 -0
- package/build/languageProcessing/languages/hu/helpers/internal/stem.js.map +1 -0
- package/build/languageProcessing/languages/hu/helpers/isPassiveSentence.js +53 -0
- package/build/languageProcessing/languages/hu/helpers/isPassiveSentence.js.map +1 -0
- package/build/languageProcessing/languages/hu/values/Clause.js +47 -0
- package/build/languageProcessing/languages/hu/values/Clause.js.map +1 -0
- package/build/languageProcessing/languages/id/Researcher.js +55 -0
- package/build/languageProcessing/languages/id/Researcher.js.map +1 -0
- package/build/languageProcessing/languages/id/config/firstWordExceptions.js +18 -0
- package/build/languageProcessing/languages/id/config/firstWordExceptions.js.map +1 -0
- package/build/languageProcessing/languages/id/config/functionWords.js +109 -0
- package/build/languageProcessing/languages/id/config/functionWords.js.map +1 -0
- package/build/languageProcessing/languages/id/config/internal/nonPassiveVerbsStartingDi.js +13 -0
- package/build/languageProcessing/languages/id/config/internal/nonPassiveVerbsStartingDi.js.map +1 -0
- package/build/languageProcessing/languages/id/config/transitionWords.js +30 -0
- package/build/languageProcessing/languages/id/config/transitionWords.js.map +1 -0
- package/build/languageProcessing/languages/id/config/twoPartTransitionWords.js +14 -0
- package/build/languageProcessing/languages/id/config/twoPartTransitionWords.js.map +1 -0
- package/build/languageProcessing/languages/id/helpers/getStemmer.js +28 -0
- package/build/languageProcessing/languages/id/helpers/getStemmer.js.map +1 -0
- package/build/languageProcessing/languages/id/helpers/internal/stem.js +394 -0
- package/build/languageProcessing/languages/id/helpers/internal/stem.js.map +1 -0
- package/build/languageProcessing/languages/id/helpers/internal/stemHelpers.js +86 -0
- package/build/languageProcessing/languages/id/helpers/internal/stemHelpers.js.map +1 -0
- package/build/languageProcessing/languages/id/helpers/isPassiveSentence.js +47 -0
- package/build/languageProcessing/languages/id/helpers/isPassiveSentence.js.map +1 -0
- package/build/languageProcessing/languages/id/helpers/splitIntoTokensCustom.js +53 -0
- package/build/languageProcessing/languages/id/helpers/splitIntoTokensCustom.js.map +1 -0
- package/build/languageProcessing/languages/it/Researcher.js +57 -0
- package/build/languageProcessing/languages/it/Researcher.js.map +1 -0
- package/build/languageProcessing/languages/it/config/firstWordExceptions.js +20 -0
- package/build/languageProcessing/languages/it/config/firstWordExceptions.js.map +1 -0
- package/build/languageProcessing/languages/it/config/functionWords.js +141 -0
- package/build/languageProcessing/languages/it/config/functionWords.js.map +1 -0
- package/build/languageProcessing/languages/it/config/internal/passiveVoiceAuxiliaries.js +12 -0
- package/build/languageProcessing/languages/it/config/internal/passiveVoiceAuxiliaries.js.map +1 -0
- package/build/languageProcessing/languages/it/config/internal/passiveVoiceParticiples.js +13 -0
- package/build/languageProcessing/languages/it/config/internal/passiveVoiceParticiples.js.map +1 -0
- package/build/languageProcessing/languages/it/config/sentenceLength.js +10 -0
- package/build/languageProcessing/languages/it/config/sentenceLength.js.map +1 -0
- package/build/languageProcessing/languages/it/config/stopWords.js +12 -0
- package/build/languageProcessing/languages/it/config/stopWords.js.map +1 -0
- package/build/languageProcessing/languages/it/config/syllables.json +573 -0
- package/build/languageProcessing/languages/it/config/transitionWords.js +13 -0
- package/build/languageProcessing/languages/it/config/transitionWords.js.map +1 -0
- package/build/languageProcessing/languages/it/config/twoPartTransitionWords.js +12 -0
- package/build/languageProcessing/languages/it/config/twoPartTransitionWords.js.map +1 -0
- package/build/languageProcessing/languages/it/helpers/calculateFleschReadingScore.js +23 -0
- package/build/languageProcessing/languages/it/helpers/calculateFleschReadingScore.js.map +1 -0
- package/build/languageProcessing/languages/it/helpers/getClauses.js +40 -0
- package/build/languageProcessing/languages/it/helpers/getClauses.js.map +1 -0
- package/build/languageProcessing/languages/it/helpers/getStemmer.js +28 -0
- package/build/languageProcessing/languages/it/helpers/getStemmer.js.map +1 -0
- package/build/languageProcessing/languages/it/helpers/internal/getParticiples.js +42 -0
- package/build/languageProcessing/languages/it/helpers/internal/getParticiples.js.map +1 -0
- package/build/languageProcessing/languages/it/helpers/internal/stem.js +408 -0
- package/build/languageProcessing/languages/it/helpers/internal/stem.js.map +1 -0
- package/build/languageProcessing/languages/it/values/Clause.js +51 -0
- package/build/languageProcessing/languages/it/values/Clause.js.map +1 -0
- package/build/languageProcessing/languages/ja/Researcher.js +94 -0
- package/build/languageProcessing/languages/ja/Researcher.js.map +1 -0
- package/build/languageProcessing/languages/ja/config/assessmentApplicabilityCharacterCount.js +11 -0
- package/build/languageProcessing/languages/ja/config/assessmentApplicabilityCharacterCount.js.map +1 -0
- package/build/languageProcessing/languages/ja/config/firstWordExceptions.js +14 -0
- package/build/languageProcessing/languages/ja/config/firstWordExceptions.js.map +1 -0
- package/build/languageProcessing/languages/ja/config/functionWords.js +8 -0
- package/build/languageProcessing/languages/ja/config/functionWords.js.map +1 -0
- package/build/languageProcessing/languages/ja/config/keyphraseLength.js +23 -0
- package/build/languageProcessing/languages/ja/config/keyphraseLength.js.map +1 -0
- package/build/languageProcessing/languages/ja/config/metaDescriptionLength.js +11 -0
- package/build/languageProcessing/languages/ja/config/metaDescriptionLength.js.map +1 -0
- package/build/languageProcessing/languages/ja/config/paragraphLength.js +17 -0
- package/build/languageProcessing/languages/ja/config/paragraphLength.js.map +1 -0
- package/build/languageProcessing/languages/ja/config/sentenceLength.js +11 -0
- package/build/languageProcessing/languages/ja/config/sentenceLength.js.map +1 -0
- package/build/languageProcessing/languages/ja/config/subheadingsTooLong.js +25 -0
- package/build/languageProcessing/languages/ja/config/subheadingsTooLong.js.map +1 -0
- package/build/languageProcessing/languages/ja/config/textLength.js +54 -0
- package/build/languageProcessing/languages/ja/config/textLength.js.map +1 -0
- package/build/languageProcessing/languages/ja/config/topicLength.js +12 -0
- package/build/languageProcessing/languages/ja/config/topicLength.js.map +1 -0
- package/build/languageProcessing/languages/ja/config/transitionWords.js +9 -0
- package/build/languageProcessing/languages/ja/config/transitionWords.js.map +1 -0
- package/build/languageProcessing/languages/ja/customResearches/findKeyphraseInSEOTitle.js +102 -0
- package/build/languageProcessing/languages/ja/customResearches/findKeyphraseInSEOTitle.js.map +1 -0
- package/build/languageProcessing/languages/ja/customResearches/getKeyphraseLength.js +25 -0
- package/build/languageProcessing/languages/ja/customResearches/getKeyphraseLength.js.map +1 -0
- package/build/languageProcessing/languages/ja/customResearches/getWordForms.js +57 -0
- package/build/languageProcessing/languages/ja/customResearches/getWordForms.js.map +1 -0
- package/build/languageProcessing/languages/ja/customResearches/textLength.js +31 -0
- package/build/languageProcessing/languages/ja/customResearches/textLength.js.map +1 -0
- package/build/languageProcessing/languages/ja/helpers/countCharacters.js +27 -0
- package/build/languageProcessing/languages/ja/helpers/countCharacters.js.map +1 -0
- package/build/languageProcessing/languages/ja/helpers/customGetStemmer.js +28 -0
- package/build/languageProcessing/languages/ja/helpers/customGetStemmer.js.map +1 -0
- package/build/languageProcessing/languages/ja/helpers/getContentWords.js +27 -0
- package/build/languageProcessing/languages/ja/helpers/getContentWords.js.map +1 -0
- package/build/languageProcessing/languages/ja/helpers/getWords.js +38 -0
- package/build/languageProcessing/languages/ja/helpers/getWords.js.map +1 -0
- package/build/languageProcessing/languages/ja/helpers/internal/SentenceTokenizer.js +99 -0
- package/build/languageProcessing/languages/ja/helpers/internal/SentenceTokenizer.js.map +1 -0
- package/build/languageProcessing/languages/ja/helpers/internal/createWordForms.js +70 -0
- package/build/languageProcessing/languages/ja/helpers/internal/createWordForms.js.map +1 -0
- package/build/languageProcessing/languages/ja/helpers/internal/determineStem.js +23 -0
- package/build/languageProcessing/languages/ja/helpers/internal/determineStem.js.map +1 -0
- package/build/languageProcessing/languages/ja/helpers/matchTextWithWord.js +58 -0
- package/build/languageProcessing/languages/ja/helpers/matchTextWithWord.js.map +1 -0
- package/build/languageProcessing/languages/ja/helpers/matchTransitionWords.js +29 -0
- package/build/languageProcessing/languages/ja/helpers/matchTransitionWords.js.map +1 -0
- package/build/languageProcessing/languages/ja/helpers/memoizedSentenceTokenizer.js +37 -0
- package/build/languageProcessing/languages/ja/helpers/memoizedSentenceTokenizer.js.map +1 -0
- package/build/languageProcessing/languages/ja/helpers/splitIntoTokensCustom.js +27 -0
- package/build/languageProcessing/languages/ja/helpers/splitIntoTokensCustom.js.map +1 -0
- package/build/languageProcessing/languages/ja/helpers/wordsCharacterCount.js +19 -0
- package/build/languageProcessing/languages/ja/helpers/wordsCharacterCount.js.map +1 -0
- package/build/languageProcessing/languages/nb/Researcher.js +54 -0
- package/build/languageProcessing/languages/nb/Researcher.js.map +1 -0
- package/build/languageProcessing/languages/nb/config/firstWordExceptions.js +18 -0
- package/build/languageProcessing/languages/nb/config/firstWordExceptions.js.map +1 -0
- package/build/languageProcessing/languages/nb/config/functionWords.js +54 -0
- package/build/languageProcessing/languages/nb/config/functionWords.js.map +1 -0
- package/build/languageProcessing/languages/nb/config/internal/participles.js +12 -0
- package/build/languageProcessing/languages/nb/config/internal/participles.js.map +1 -0
- package/build/languageProcessing/languages/nb/config/internal/passiveVoiceAuxiliaries.js +12 -0
- package/build/languageProcessing/languages/nb/config/internal/passiveVoiceAuxiliaries.js.map +1 -0
- package/build/languageProcessing/languages/nb/config/stopWords.js +13 -0
- package/build/languageProcessing/languages/nb/config/stopWords.js.map +1 -0
- package/build/languageProcessing/languages/nb/config/transitionWords.js +13 -0
- package/build/languageProcessing/languages/nb/config/transitionWords.js.map +1 -0
- package/build/languageProcessing/languages/nb/config/twoPartTransitionWords.js +13 -0
- package/build/languageProcessing/languages/nb/config/twoPartTransitionWords.js.map +1 -0
- package/build/languageProcessing/languages/nb/helpers/getClauses.js +37 -0
- package/build/languageProcessing/languages/nb/helpers/getClauses.js.map +1 -0
- package/build/languageProcessing/languages/nb/helpers/getStemmer.js +28 -0
- package/build/languageProcessing/languages/nb/helpers/getStemmer.js.map +1 -0
- package/build/languageProcessing/languages/nb/helpers/internal/getParticiples.js +31 -0
- package/build/languageProcessing/languages/nb/helpers/internal/getParticiples.js.map +1 -0
- package/build/languageProcessing/languages/nb/helpers/internal/stem.js +135 -0
- package/build/languageProcessing/languages/nb/helpers/internal/stem.js.map +1 -0
- package/build/languageProcessing/languages/nb/values/Clause.js +49 -0
- package/build/languageProcessing/languages/nb/values/Clause.js.map +1 -0
- package/build/languageProcessing/languages/nl/Researcher.js +57 -0
- package/build/languageProcessing/languages/nl/Researcher.js.map +1 -0
- package/build/languageProcessing/languages/nl/config/firstWordExceptions.js +20 -0
- package/build/languageProcessing/languages/nl/config/firstWordExceptions.js.map +1 -0
- package/build/languageProcessing/languages/nl/config/functionWords.js +102 -0
- package/build/languageProcessing/languages/nl/config/functionWords.js.map +1 -0
- package/build/languageProcessing/languages/nl/config/internal/nonParticiples.js +12 -0
- package/build/languageProcessing/languages/nl/config/internal/nonParticiples.js.map +1 -0
- package/build/languageProcessing/languages/nl/config/internal/passiveVoiceAuxiliaries.js +12 -0
- package/build/languageProcessing/languages/nl/config/internal/passiveVoiceAuxiliaries.js.map +1 -0
- package/build/languageProcessing/languages/nl/config/internal/passiveVoiceIrregulars.js +13 -0
- package/build/languageProcessing/languages/nl/config/internal/passiveVoiceIrregulars.js.map +1 -0
- package/build/languageProcessing/languages/nl/config/keyphraseLength.js +17 -0
- package/build/languageProcessing/languages/nl/config/keyphraseLength.js.map +1 -0
- package/build/languageProcessing/languages/nl/config/stopWords.js +12 -0
- package/build/languageProcessing/languages/nl/config/stopWords.js.map +1 -0
- package/build/languageProcessing/languages/nl/config/syllables.json +343 -0
- package/build/languageProcessing/languages/nl/config/transitionWords.js +11 -0
- package/build/languageProcessing/languages/nl/config/transitionWords.js.map +1 -0
- package/build/languageProcessing/languages/nl/config/twoPartTransitionWords.js +12 -0
- package/build/languageProcessing/languages/nl/config/twoPartTransitionWords.js.map +1 -0
- package/build/languageProcessing/languages/nl/helpers/calculateFleschReadingScore.js +23 -0
- package/build/languageProcessing/languages/nl/helpers/calculateFleschReadingScore.js.map +1 -0
- package/build/languageProcessing/languages/nl/helpers/getClauses.js +34 -0
- package/build/languageProcessing/languages/nl/helpers/getClauses.js.map +1 -0
- package/build/languageProcessing/languages/nl/helpers/getStemmer.js +28 -0
- package/build/languageProcessing/languages/nl/helpers/getStemmer.js.map +1 -0
- package/build/languageProcessing/languages/nl/helpers/internal/checkExceptionsWithFullForms.js +124 -0
- package/build/languageProcessing/languages/nl/helpers/internal/checkExceptionsWithFullForms.js.map +1 -0
- package/build/languageProcessing/languages/nl/helpers/internal/detectAndStemRegularParticiple.js +260 -0
- package/build/languageProcessing/languages/nl/helpers/internal/detectAndStemRegularParticiple.js.map +1 -0
- package/build/languageProcessing/languages/nl/helpers/internal/detectAndStemSuffixes.js +157 -0
- package/build/languageProcessing/languages/nl/helpers/internal/detectAndStemSuffixes.js.map +1 -0
- package/build/languageProcessing/languages/nl/helpers/internal/determineStem.js +120 -0
- package/build/languageProcessing/languages/nl/helpers/internal/determineStem.js.map +1 -0
- package/build/languageProcessing/languages/nl/helpers/internal/getParticiples.js +27 -0
- package/build/languageProcessing/languages/nl/helpers/internal/getParticiples.js.map +1 -0
- package/build/languageProcessing/languages/nl/helpers/internal/getStemWordsWithTAndDEnding.js +152 -0
- package/build/languageProcessing/languages/nl/helpers/internal/getStemWordsWithTAndDEnding.js.map +1 -0
- package/build/languageProcessing/languages/nl/helpers/internal/stem.js +131 -0
- package/build/languageProcessing/languages/nl/helpers/internal/stem.js.map +1 -0
- package/build/languageProcessing/languages/nl/helpers/internal/stemModificationHelpers.js +94 -0
- package/build/languageProcessing/languages/nl/helpers/internal/stemModificationHelpers.js.map +1 -0
- package/build/languageProcessing/languages/nl/helpers/internal/stemTOrDFromEndOfWord.js +59 -0
- package/build/languageProcessing/languages/nl/helpers/internal/stemTOrDFromEndOfWord.js.map +1 -0
- package/build/languageProcessing/languages/nl/values/Clause.js +63 -0
- package/build/languageProcessing/languages/nl/values/Clause.js.map +1 -0
- package/build/languageProcessing/languages/pl/Researcher.js +56 -0
- package/build/languageProcessing/languages/pl/Researcher.js.map +1 -0
- package/build/languageProcessing/languages/pl/config/firstWordExceptions.js +16 -0
- package/build/languageProcessing/languages/pl/config/firstWordExceptions.js.map +1 -0
- package/build/languageProcessing/languages/pl/config/functionWords.js +78 -0
- package/build/languageProcessing/languages/pl/config/functionWords.js.map +1 -0
- package/build/languageProcessing/languages/pl/config/internal/auxiliaries.js +12 -0
- package/build/languageProcessing/languages/pl/config/internal/auxiliaries.js.map +1 -0
- package/build/languageProcessing/languages/pl/config/internal/participles.js +13 -0
- package/build/languageProcessing/languages/pl/config/internal/participles.js.map +1 -0
- package/build/languageProcessing/languages/pl/config/sentenceLength.js +17 -0
- package/build/languageProcessing/languages/pl/config/sentenceLength.js.map +1 -0
- package/build/languageProcessing/languages/pl/config/stopWords.js +12 -0
- package/build/languageProcessing/languages/pl/config/stopWords.js.map +1 -0
- package/build/languageProcessing/languages/pl/config/transitionWords.js +13 -0
- package/build/languageProcessing/languages/pl/config/transitionWords.js.map +1 -0
- package/build/languageProcessing/languages/pl/config/twoPartTransitionWords.js +13 -0
- package/build/languageProcessing/languages/pl/config/twoPartTransitionWords.js.map +1 -0
- package/build/languageProcessing/languages/pl/helpers/getClauses.js +34 -0
- package/build/languageProcessing/languages/pl/helpers/getClauses.js.map +1 -0
- package/build/languageProcessing/languages/pl/helpers/getStemmer.js +28 -0
- package/build/languageProcessing/languages/pl/helpers/getStemmer.js.map +1 -0
- package/build/languageProcessing/languages/pl/helpers/internal/getParticiples.js +25 -0
- package/build/languageProcessing/languages/pl/helpers/internal/getParticiples.js.map +1 -0
- package/build/languageProcessing/languages/pl/helpers/internal/stem.js +158 -0
- package/build/languageProcessing/languages/pl/helpers/internal/stem.js.map +1 -0
- package/build/languageProcessing/languages/pl/values/Clause.js +51 -0
- package/build/languageProcessing/languages/pl/values/Clause.js.map +1 -0
- package/build/languageProcessing/languages/pt/Researcher.js +57 -0
- package/build/languageProcessing/languages/pt/Researcher.js.map +1 -0
- package/build/languageProcessing/languages/pt/config/firstWordExceptions.js +20 -0
- package/build/languageProcessing/languages/pt/config/firstWordExceptions.js.map +1 -0
- package/build/languageProcessing/languages/pt/config/functionWords.js +98 -0
- package/build/languageProcessing/languages/pt/config/functionWords.js.map +1 -0
- package/build/languageProcessing/languages/pt/config/internal/passiveVoiceAuxiliaries.js +12 -0
- package/build/languageProcessing/languages/pt/config/internal/passiveVoiceAuxiliaries.js.map +1 -0
- package/build/languageProcessing/languages/pt/config/internal/passiveVoiceParticiples.js +13 -0
- package/build/languageProcessing/languages/pt/config/internal/passiveVoiceParticiples.js.map +1 -0
- package/build/languageProcessing/languages/pt/config/sentenceLength.js +10 -0
- package/build/languageProcessing/languages/pt/config/sentenceLength.js.map +1 -0
- package/build/languageProcessing/languages/pt/config/stopWords.js +12 -0
- package/build/languageProcessing/languages/pt/config/stopWords.js.map +1 -0
- package/build/languageProcessing/languages/pt/config/syllables.json +38 -0
- package/build/languageProcessing/languages/pt/config/transitionWords.js +11 -0
- package/build/languageProcessing/languages/pt/config/transitionWords.js.map +1 -0
- package/build/languageProcessing/languages/pt/config/twoPartTransitionWords.js +12 -0
- package/build/languageProcessing/languages/pt/config/twoPartTransitionWords.js.map +1 -0
- package/build/languageProcessing/languages/pt/helpers/calculateFleschReadingScore.js +23 -0
- package/build/languageProcessing/languages/pt/helpers/calculateFleschReadingScore.js.map +1 -0
- package/build/languageProcessing/languages/pt/helpers/getClauses.js +38 -0
- package/build/languageProcessing/languages/pt/helpers/getClauses.js.map +1 -0
- package/build/languageProcessing/languages/pt/helpers/getStemmer.js +28 -0
- package/build/languageProcessing/languages/pt/helpers/getStemmer.js.map +1 -0
- package/build/languageProcessing/languages/pt/helpers/internal/getParticiples.js +43 -0
- package/build/languageProcessing/languages/pt/helpers/internal/getParticiples.js.map +1 -0
- package/build/languageProcessing/languages/pt/helpers/internal/stem.js +283 -0
- package/build/languageProcessing/languages/pt/helpers/internal/stem.js.map +1 -0
- package/build/languageProcessing/languages/pt/values/Clause.js +50 -0
- package/build/languageProcessing/languages/pt/values/Clause.js.map +1 -0
- package/build/languageProcessing/languages/ru/Researcher.js +57 -0
- package/build/languageProcessing/languages/ru/Researcher.js.map +1 -0
- package/build/languageProcessing/languages/ru/config/firstWordExceptions.js +16 -0
- package/build/languageProcessing/languages/ru/config/firstWordExceptions.js.map +1 -0
- package/build/languageProcessing/languages/ru/config/fleschReadingEaseScores.js +27 -0
- package/build/languageProcessing/languages/ru/config/fleschReadingEaseScores.js.map +1 -0
- package/build/languageProcessing/languages/ru/config/functionWords.js +91 -0
- package/build/languageProcessing/languages/ru/config/functionWords.js.map +1 -0
- package/build/languageProcessing/languages/ru/config/internal/participlesShortenedList.js +27 -0
- package/build/languageProcessing/languages/ru/config/internal/participlesShortenedList.js.map +1 -0
- package/build/languageProcessing/languages/ru/config/internal/passiveVoiceParticiples.js +24 -0
- package/build/languageProcessing/languages/ru/config/internal/passiveVoiceParticiples.js.map +1 -0
- package/build/languageProcessing/languages/ru/config/sentenceLength.js +10 -0
- package/build/languageProcessing/languages/ru/config/sentenceLength.js.map +1 -0
- package/build/languageProcessing/languages/ru/config/syllables.json +19 -0
- package/build/languageProcessing/languages/ru/config/transitionWords.js +13 -0
- package/build/languageProcessing/languages/ru/config/transitionWords.js.map +1 -0
- package/build/languageProcessing/languages/ru/config/twoPartTransitionWords.js +13 -0
- package/build/languageProcessing/languages/ru/config/twoPartTransitionWords.js.map +1 -0
- package/build/languageProcessing/languages/ru/helpers/calculateFleschReadingScore.js +23 -0
- package/build/languageProcessing/languages/ru/helpers/calculateFleschReadingScore.js.map +1 -0
- package/build/languageProcessing/languages/ru/helpers/getStemmer.js +28 -0
- package/build/languageProcessing/languages/ru/helpers/getStemmer.js.map +1 -0
- package/build/languageProcessing/languages/ru/helpers/internal/stem.js +271 -0
- package/build/languageProcessing/languages/ru/helpers/internal/stem.js.map +1 -0
- package/build/languageProcessing/languages/ru/helpers/isPassiveSentence.js +22 -0
- package/build/languageProcessing/languages/ru/helpers/isPassiveSentence.js.map +1 -0
- package/build/languageProcessing/languages/sk/Researcher.js +55 -0
- package/build/languageProcessing/languages/sk/Researcher.js.map +1 -0
- package/build/languageProcessing/languages/sk/config/firstWordExceptions.js +18 -0
- package/build/languageProcessing/languages/sk/config/firstWordExceptions.js.map +1 -0
- package/build/languageProcessing/languages/sk/config/functionWords.js +18 -0
- package/build/languageProcessing/languages/sk/config/functionWords.js.map +1 -0
- package/build/languageProcessing/languages/sk/config/internal/nonPassives.js +14 -0
- package/build/languageProcessing/languages/sk/config/internal/nonPassives.js.map +1 -0
- package/build/languageProcessing/languages/sk/config/internal/passiveVoiceAuxiliaries.js +10 -0
- package/build/languageProcessing/languages/sk/config/internal/passiveVoiceAuxiliaries.js.map +1 -0
- package/build/languageProcessing/languages/sk/config/stopWords.js +13 -0
- package/build/languageProcessing/languages/sk/config/stopWords.js.map +1 -0
- package/build/languageProcessing/languages/sk/config/transitionWords.js +13 -0
- package/build/languageProcessing/languages/sk/config/transitionWords.js.map +1 -0
- package/build/languageProcessing/languages/sk/config/twoPartTransitionWords.js +13 -0
- package/build/languageProcessing/languages/sk/config/twoPartTransitionWords.js.map +1 -0
- package/build/languageProcessing/languages/sk/helpers/getClauses.js +35 -0
- package/build/languageProcessing/languages/sk/helpers/getClauses.js.map +1 -0
- package/build/languageProcessing/languages/sk/helpers/getStemmer.js +28 -0
- package/build/languageProcessing/languages/sk/helpers/getStemmer.js.map +1 -0
- package/build/languageProcessing/languages/sk/helpers/internal/getParticiples.js +24 -0
- package/build/languageProcessing/languages/sk/helpers/internal/getParticiples.js.map +1 -0
- package/build/languageProcessing/languages/sk/helpers/internal/stem.js +322 -0
- package/build/languageProcessing/languages/sk/helpers/internal/stem.js.map +1 -0
- package/build/languageProcessing/languages/sk/values/Clause.js +47 -0
- package/build/languageProcessing/languages/sk/values/Clause.js.map +1 -0
- package/build/languageProcessing/languages/sv/Researcher.js +54 -0
- package/build/languageProcessing/languages/sv/Researcher.js.map +1 -0
- package/build/languageProcessing/languages/sv/config/firstWordExceptions.js +21 -0
- package/build/languageProcessing/languages/sv/config/firstWordExceptions.js.map +1 -0
- package/build/languageProcessing/languages/sv/config/functionWords.js +74 -0
- package/build/languageProcessing/languages/sv/config/functionWords.js.map +1 -0
- package/build/languageProcessing/languages/sv/config/internal/passiveVerbs.js +12 -0
- package/build/languageProcessing/languages/sv/config/internal/passiveVerbs.js.map +1 -0
- package/build/languageProcessing/languages/sv/config/keyphraseLength.js +17 -0
- package/build/languageProcessing/languages/sv/config/keyphraseLength.js.map +1 -0
- package/build/languageProcessing/languages/sv/config/transitionWords.js +13 -0
- package/build/languageProcessing/languages/sv/config/transitionWords.js.map +1 -0
- package/build/languageProcessing/languages/sv/config/twoPartTransitionWords.js +13 -0
- package/build/languageProcessing/languages/sv/config/twoPartTransitionWords.js.map +1 -0
- package/build/languageProcessing/languages/sv/helpers/getStemmer.js +28 -0
- package/build/languageProcessing/languages/sv/helpers/getStemmer.js.map +1 -0
- package/build/languageProcessing/languages/sv/helpers/internal/stem.js +159 -0
- package/build/languageProcessing/languages/sv/helpers/internal/stem.js.map +1 -0
- package/build/languageProcessing/languages/sv/helpers/isPassiveSentence.js +22 -0
- package/build/languageProcessing/languages/sv/helpers/isPassiveSentence.js.map +1 -0
- package/build/languageProcessing/languages/tr/Researcher.js +52 -0
- package/build/languageProcessing/languages/tr/Researcher.js.map +1 -0
- package/build/languageProcessing/languages/tr/config/firstWordExceptions.js +18 -0
- package/build/languageProcessing/languages/tr/config/firstWordExceptions.js.map +1 -0
- package/build/languageProcessing/languages/tr/config/functionWords.js +51 -0
- package/build/languageProcessing/languages/tr/config/functionWords.js.map +1 -0
- package/build/languageProcessing/languages/tr/config/internal/nonPassiveExceptions.js +13 -0
- package/build/languageProcessing/languages/tr/config/internal/nonPassiveExceptions.js.map +1 -0
- package/build/languageProcessing/languages/tr/config/internal/passiveEndings.js +13 -0
- package/build/languageProcessing/languages/tr/config/internal/passiveEndings.js.map +1 -0
- package/build/languageProcessing/languages/tr/config/sentenceLength.js +14 -0
- package/build/languageProcessing/languages/tr/config/sentenceLength.js.map +1 -0
- package/build/languageProcessing/languages/tr/config/transitionWords.js +13 -0
- package/build/languageProcessing/languages/tr/config/transitionWords.js.map +1 -0
- package/build/languageProcessing/languages/tr/config/twoPartTransitionWords.js +13 -0
- package/build/languageProcessing/languages/tr/config/twoPartTransitionWords.js.map +1 -0
- package/build/languageProcessing/languages/tr/helpers/getStemmer.js +28 -0
- package/build/languageProcessing/languages/tr/helpers/getStemmer.js.map +1 -0
- package/build/languageProcessing/languages/tr/helpers/internal/stem.js +25 -0
- package/build/languageProcessing/languages/tr/helpers/internal/stem.js.map +1 -0
- package/build/languageProcessing/languages/tr/helpers/isPassiveSentence.js +46 -0
- package/build/languageProcessing/languages/tr/helpers/isPassiveSentence.js.map +1 -0
- package/build/languageProcessing/researches/altTagCount.js +72 -0
- package/build/languageProcessing/researches/altTagCount.js.map +1 -0
- package/build/languageProcessing/researches/countSentencesFromText.js +26 -0
- package/build/languageProcessing/researches/countSentencesFromText.js.map +1 -0
- package/build/languageProcessing/researches/findKeyphraseInSEOTitle.js +257 -0
- package/build/languageProcessing/researches/findKeyphraseInSEOTitle.js.map +1 -0
- package/build/languageProcessing/researches/findKeywordInFirstParagraph.js +80 -0
- package/build/languageProcessing/researches/findKeywordInFirstParagraph.js.map +1 -0
- package/build/languageProcessing/researches/findTransitionWords.js +119 -0
- package/build/languageProcessing/researches/findTransitionWords.js.map +1 -0
- package/build/languageProcessing/researches/functionWordsInKeyphrase.js +48 -0
- package/build/languageProcessing/researches/functionWordsInKeyphrase.js.map +1 -0
- package/build/languageProcessing/researches/getAnchorsWithKeyphrase.js +222 -0
- package/build/languageProcessing/researches/getAnchorsWithKeyphrase.js.map +1 -0
- package/build/languageProcessing/researches/getFleschReadingScore.js +152 -0
- package/build/languageProcessing/researches/getFleschReadingScore.js.map +1 -0
- package/build/languageProcessing/researches/getKeywordDensity.js +49 -0
- package/build/languageProcessing/researches/getKeywordDensity.js.map +1 -0
- package/build/languageProcessing/researches/getLinkStatistics.js +56 -0
- package/build/languageProcessing/researches/getLinkStatistics.js.map +1 -0
- package/build/languageProcessing/researches/getLinks.js +23 -0
- package/build/languageProcessing/researches/getLinks.js.map +1 -0
- package/build/languageProcessing/researches/getLongCenterAlignedTexts.js +42 -0
- package/build/languageProcessing/researches/getLongCenterAlignedTexts.js.map +1 -0
- package/build/languageProcessing/researches/getParagraphLength.js +49 -0
- package/build/languageProcessing/researches/getParagraphLength.js.map +1 -0
- package/build/languageProcessing/researches/getParagraphs.js +23 -0
- package/build/languageProcessing/researches/getParagraphs.js.map +1 -0
- package/build/languageProcessing/researches/getPassiveVoiceResult.js +127 -0
- package/build/languageProcessing/researches/getPassiveVoiceResult.js.map +1 -0
- package/build/languageProcessing/researches/getProminentWordsForInsights.js +45 -0
- package/build/languageProcessing/researches/getProminentWordsForInsights.js.map +1 -0
- package/build/languageProcessing/researches/getProminentWordsForInternalLinking.js +103 -0
- package/build/languageProcessing/researches/getProminentWordsForInternalLinking.js.map +1 -0
- package/build/languageProcessing/researches/getSentenceBeginnings.js +122 -0
- package/build/languageProcessing/researches/getSentenceBeginnings.js.map +1 -0
- package/build/languageProcessing/researches/getSubheadingTextLengths.js +60 -0
- package/build/languageProcessing/researches/getSubheadingTextLengths.js.map +1 -0
- package/build/languageProcessing/researches/getWordForms.js +183 -0
- package/build/languageProcessing/researches/getWordForms.js.map +1 -0
- package/build/languageProcessing/researches/h1s.js +17 -0
- package/build/languageProcessing/researches/h1s.js.map +1 -0
- package/build/languageProcessing/researches/imageCount.js +22 -0
- package/build/languageProcessing/researches/imageCount.js.map +1 -0
- package/build/languageProcessing/researches/index.js +28 -0
- package/build/languageProcessing/researches/index.js.map +1 -0
- package/build/languageProcessing/researches/keyphraseDistribution.js +233 -0
- package/build/languageProcessing/researches/keyphraseDistribution.js.map +1 -0
- package/build/languageProcessing/researches/keyphraseLength.js +23 -0
- package/build/languageProcessing/researches/keyphraseLength.js.map +1 -0
- package/build/languageProcessing/researches/keywordCount.js +135 -0
- package/build/languageProcessing/researches/keywordCount.js.map +1 -0
- package/build/languageProcessing/researches/keywordCountInUrl.js +58 -0
- package/build/languageProcessing/researches/keywordCountInUrl.js.map +1 -0
- package/build/languageProcessing/researches/matchKeywordInSubheadings.js +68 -0
- package/build/languageProcessing/researches/matchKeywordInSubheadings.js.map +1 -0
- package/build/languageProcessing/researches/metaDescriptionKeyword.js +78 -0
- package/build/languageProcessing/researches/metaDescriptionKeyword.js.map +1 -0
- package/build/languageProcessing/researches/metaDescriptionLength.js +19 -0
- package/build/languageProcessing/researches/metaDescriptionLength.js.map +1 -0
- package/build/languageProcessing/researches/pageTitleWidth.js +18 -0
- package/build/languageProcessing/researches/pageTitleWidth.js.map +1 -0
- package/build/languageProcessing/researches/readingTime.js +84 -0
- package/build/languageProcessing/researches/readingTime.js.map +1 -0
- package/build/languageProcessing/researches/sentences.js +26 -0
- package/build/languageProcessing/researches/sentences.js.map +1 -0
- package/build/languageProcessing/researches/videoCount.js +39 -0
- package/build/languageProcessing/researches/videoCount.js.map +1 -0
- package/build/languageProcessing/researches/wordComplexity.js +128 -0
- package/build/languageProcessing/researches/wordComplexity.js.map +1 -0
- package/build/languageProcessing/researches/wordCountInText.js +36 -0
- package/build/languageProcessing/researches/wordCountInText.js.map +1 -0
- package/build/languageProcessing/values/Clause.js +113 -0
- package/build/languageProcessing/values/Clause.js.map +1 -0
- package/build/languageProcessing/values/ProminentWord.js +101 -0
- package/build/languageProcessing/values/ProminentWord.js.map +1 -0
- package/build/languageProcessing/values/Sentence.js +116 -0
- package/build/languageProcessing/values/Sentence.js.map +1 -0
- package/build/languageProcessing/values/index.js +28 -0
- package/build/languageProcessing/values/index.js.map +1 -0
- package/build/markers/addMark.js +16 -0
- package/build/markers/addMark.js.map +1 -0
- package/build/markers/addMarkSingleWord.js +37 -0
- package/build/markers/addMarkSingleWord.js.map +1 -0
- package/build/markers/index.js +21 -0
- package/build/markers/index.js.map +1 -0
- package/build/markers/removeDuplicateMarks.js +31 -0
- package/build/markers/removeDuplicateMarks.js.map +1 -0
- package/build/markers/removeMarks.js +16 -0
- package/build/markers/removeMarks.js.map +1 -0
- package/build/parse/build/build.js +62 -0
- package/build/parse/build/build.js.map +1 -0
- package/build/parse/build/index.js +14 -0
- package/build/parse/build/index.js.map +1 -0
- package/build/parse/build/private/adapt.js +111 -0
- package/build/parse/build/private/adapt.js.map +1 -0
- package/build/parse/build/private/adaptAttributes.js +41 -0
- package/build/parse/build/private/adaptAttributes.js.map +1 -0
- package/build/parse/build/private/alwaysFilterElements.js +32 -0
- package/build/parse/build/private/alwaysFilterElements.js.map +1 -0
- package/build/parse/build/private/combineIntoImplicitParagraphs.js +129 -0
- package/build/parse/build/private/combineIntoImplicitParagraphs.js.map +1 -0
- package/build/parse/build/private/filterBeforeTokenizing.js +37 -0
- package/build/parse/build/private/filterBeforeTokenizing.js.map +1 -0
- package/build/parse/build/private/filterHelpers.js +52 -0
- package/build/parse/build/private/filterHelpers.js.map +1 -0
- package/build/parse/build/private/filterTree.js +47 -0
- package/build/parse/build/private/filterTree.js.map +1 -0
- package/build/parse/build/private/getTextElementPositions.js +184 -0
- package/build/parse/build/private/getTextElementPositions.js.map +1 -0
- package/build/parse/build/private/helpers/parseClassAttribute.js +15 -0
- package/build/parse/build/private/helpers/parseClassAttribute.js.map +1 -0
- package/build/parse/build/private/isPhrasingContent.js +30 -0
- package/build/parse/build/private/isPhrasingContent.js.map +1 -0
- package/build/parse/build/private/parseBlocks.js +151 -0
- package/build/parse/build/private/parseBlocks.js.map +1 -0
- package/build/parse/build/private/tokenize.js +78 -0
- package/build/parse/build/private/tokenize.js.map +1 -0
- package/build/parse/language/LanguageProcessor.js +77 -0
- package/build/parse/language/LanguageProcessor.js.map +1 -0
- package/build/parse/structure/Heading.js +32 -0
- package/build/parse/structure/Heading.js.map +1 -0
- package/build/parse/structure/Node.js +75 -0
- package/build/parse/structure/Node.js.map +1 -0
- package/build/parse/structure/Paragraph.js +53 -0
- package/build/parse/structure/Paragraph.js.map +1 -0
- package/build/parse/structure/Sentence.js +36 -0
- package/build/parse/structure/Sentence.js.map +1 -0
- package/build/parse/structure/SourceCodeLocation.js +46 -0
- package/build/parse/structure/SourceCodeLocation.js.map +1 -0
- package/build/parse/structure/Text.js +33 -0
- package/build/parse/structure/Text.js.map +1 -0
- package/build/parse/structure/Token.js +29 -0
- package/build/parse/structure/Token.js.map +1 -0
- package/build/parse/structure/index.js +35 -0
- package/build/parse/structure/index.js.map +1 -0
- package/build/parse/traverse/findAllInTree.js +62 -0
- package/build/parse/traverse/findAllInTree.js.map +1 -0
- package/build/parse/traverse/index.js +21 -0
- package/build/parse/traverse/index.js.map +1 -0
- package/build/parse/traverse/innerText.js +30 -0
- package/build/parse/traverse/innerText.js.map +1 -0
- package/build/parsedPaper/ParsedPaper.js +100 -0
- package/build/parsedPaper/ParsedPaper.js.map +1 -0
- package/build/parsedPaper/assess/TreeAssessor.js +181 -0
- package/build/parsedPaper/assess/TreeAssessor.js.map +1 -0
- package/build/parsedPaper/assess/assessmentListFactories.js +77 -0
- package/build/parsedPaper/assess/assessmentListFactories.js.map +1 -0
- package/build/parsedPaper/assess/assessments/Assessment.js +86 -0
- package/build/parsedPaper/assess/assessments/Assessment.js.map +1 -0
- package/build/parsedPaper/assess/assessments/index.js +14 -0
- package/build/parsedPaper/assess/assessments/index.js.map +1 -0
- package/build/parsedPaper/assess/assessorFactories.js +104 -0
- package/build/parsedPaper/assess/assessorFactories.js.map +1 -0
- package/build/parsedPaper/assess/cornerstone/assessmentListFactories.js +51 -0
- package/build/parsedPaper/assess/cornerstone/assessmentListFactories.js.map +1 -0
- package/build/parsedPaper/assess/cornerstone/index.js +11 -0
- package/build/parsedPaper/assess/cornerstone/index.js.map +1 -0
- package/build/parsedPaper/assess/index.js +31 -0
- package/build/parsedPaper/assess/index.js.map +1 -0
- package/build/parsedPaper/build/PaperParser.js +103 -0
- package/build/parsedPaper/build/PaperParser.js.map +1 -0
- package/build/parsedPaper/build/linguisticParsing/Sentence.js +95 -0
- package/build/parsedPaper/build/linguisticParsing/Sentence.js.map +1 -0
- package/build/parsedPaper/build/linguisticParsing/SentenceTokenizer.js +294 -0
- package/build/parsedPaper/build/linguisticParsing/SentenceTokenizer.js.map +1 -0
- package/build/parsedPaper/build/linguisticParsing/parseText.js +26 -0
- package/build/parsedPaper/build/linguisticParsing/parseText.js.map +1 -0
- package/build/parsedPaper/build/tree/TreeBuilder.js +82 -0
- package/build/parsedPaper/build/tree/TreeBuilder.js.map +1 -0
- package/build/parsedPaper/build/tree/cleanup/calculateTextIndices.js +183 -0
- package/build/parsedPaper/build/tree/cleanup/calculateTextIndices.js.map +1 -0
- package/build/parsedPaper/build/tree/cleanup/getElementContent.js +27 -0
- package/build/parsedPaper/build/tree/cleanup/getElementContent.js.map +1 -0
- package/build/parsedPaper/build/tree/cleanup/postParsing.js +43 -0
- package/build/parsedPaper/build/tree/cleanup/postParsing.js.map +1 -0
- package/build/parsedPaper/build/tree/html/HTMLTreeConverter.js +226 -0
- package/build/parsedPaper/build/tree/html/HTMLTreeConverter.js.map +1 -0
- package/build/parsedPaper/build/tree/html/buildTree.js +36 -0
- package/build/parsedPaper/build/tree/html/buildTree.js.map +1 -0
- package/build/parsedPaper/build/tree/html/htmlConstants.js +35 -0
- package/build/parsedPaper/build/tree/html/htmlConstants.js.map +1 -0
- package/build/parsedPaper/build/tree/index.js +20 -0
- package/build/parsedPaper/build/tree/index.js.map +1 -0
- package/build/parsedPaper/build/tree/metadata/buildTree.js +36 -0
- package/build/parsedPaper/build/tree/metadata/buildTree.js.map +1 -0
- package/build/parsedPaper/research/TreeResearcher.js +136 -0
- package/build/parsedPaper/research/TreeResearcher.js.map +1 -0
- package/build/parsedPaper/research/index.js +14 -0
- package/build/parsedPaper/research/index.js.map +1 -0
- package/build/parsedPaper/research/researches/Headings.js +26 -0
- package/build/parsedPaper/research/researches/Headings.js.map +1 -0
- package/build/parsedPaper/research/researches/LinkStatistics.js +129 -0
- package/build/parsedPaper/research/researches/LinkStatistics.js.map +1 -0
- package/build/parsedPaper/research/researches/Research.js +58 -0
- package/build/parsedPaper/research/researches/Research.js.map +1 -0
- package/build/parsedPaper/research/researches/index.js +14 -0
- package/build/parsedPaper/research/researches/index.js.map +1 -0
- package/build/parsedPaper/structure/tree/FormattingElement.js +73 -0
- package/build/parsedPaper/structure/tree/FormattingElement.js.map +1 -0
- package/build/parsedPaper/structure/tree/SourceCodeLocation.js +48 -0
- package/build/parsedPaper/structure/tree/SourceCodeLocation.js.map +1 -0
- package/build/parsedPaper/structure/tree/TextContainer.js +89 -0
- package/build/parsedPaper/structure/tree/TextContainer.js.map +1 -0
- package/build/parsedPaper/structure/tree/index.js +76 -0
- package/build/parsedPaper/structure/tree/index.js.map +1 -0
- package/build/parsedPaper/structure/tree/nodes/Heading.js +33 -0
- package/build/parsedPaper/structure/tree/nodes/Heading.js.map +1 -0
- package/build/parsedPaper/structure/tree/nodes/LeafNode.js +82 -0
- package/build/parsedPaper/structure/tree/nodes/LeafNode.js.map +1 -0
- package/build/parsedPaper/structure/tree/nodes/List.js +54 -0
- package/build/parsedPaper/structure/tree/nodes/List.js.map +1 -0
- package/build/parsedPaper/structure/tree/nodes/ListItem.js +34 -0
- package/build/parsedPaper/structure/tree/nodes/ListItem.js.map +1 -0
- package/build/parsedPaper/structure/tree/nodes/MetadataMiscellaneous.js +51 -0
- package/build/parsedPaper/structure/tree/nodes/MetadataMiscellaneous.js.map +1 -0
- package/build/parsedPaper/structure/tree/nodes/MetadataText.js +31 -0
- package/build/parsedPaper/structure/tree/nodes/MetadataText.js.map +1 -0
- package/build/parsedPaper/structure/tree/nodes/Node.js +159 -0
- package/build/parsedPaper/structure/tree/nodes/Node.js.map +1 -0
- package/build/parsedPaper/structure/tree/nodes/Paragraph.js +29 -0
- package/build/parsedPaper/structure/tree/nodes/Paragraph.js.map +1 -0
- package/build/parsedPaper/structure/tree/nodes/StructuredNode.js +60 -0
- package/build/parsedPaper/structure/tree/nodes/StructuredNode.js.map +1 -0
- package/build/parsedPaper/structure/tree/nodes/index.js +70 -0
- package/build/parsedPaper/structure/tree/nodes/index.js.map +1 -0
- package/build/scoring/assessments/assessment.js +68 -0
- package/build/scoring/assessments/assessment.js.map +1 -0
- package/build/scoring/assessments/index.js +64 -0
- package/build/scoring/assessments/index.js.map +1 -0
- package/build/scoring/assessments/readability/ParagraphTooLongAssessment.js +162 -0
- package/build/scoring/assessments/readability/ParagraphTooLongAssessment.js.map +1 -0
- package/build/scoring/assessments/readability/SentenceBeginningsAssessment.js +131 -0
- package/build/scoring/assessments/readability/SentenceBeginningsAssessment.js.map +1 -0
- package/build/scoring/assessments/readability/SentenceLengthInTextAssessment.js +173 -0
- package/build/scoring/assessments/readability/SentenceLengthInTextAssessment.js.map +1 -0
- package/build/scoring/assessments/readability/TransitionWordsAssessment.js +159 -0
- package/build/scoring/assessments/readability/TransitionWordsAssessment.js.map +1 -0
- package/build/scoring/assessments/seo/ImageCountAssessment.js +107 -0
- package/build/scoring/assessments/seo/ImageCountAssessment.js.map +1 -0
- package/build/scoring/assessments/seo/InternalLinksAssessment.js +108 -0
- package/build/scoring/assessments/seo/InternalLinksAssessment.js.map +1 -0
- package/build/scoring/assessments/seo/IntroductionKeywordAssessment.js +105 -0
- package/build/scoring/assessments/seo/IntroductionKeywordAssessment.js.map +1 -0
- package/build/scoring/assessments/seo/KeyphraseAssessment.js +100 -0
- package/build/scoring/assessments/seo/KeyphraseAssessment.js.map +1 -0
- package/build/scoring/assessments/seo/KeyphraseLengthAssessment.js +105 -0
- package/build/scoring/assessments/seo/KeyphraseLengthAssessment.js.map +1 -0
- package/build/scoring/assessments/seo/KeywordDensityAssessment.js +111 -0
- package/build/scoring/assessments/seo/KeywordDensityAssessment.js.map +1 -0
- package/build/scoring/assessments/seo/MetaDescriptionKeywordAssessment.js +114 -0
- package/build/scoring/assessments/seo/MetaDescriptionKeywordAssessment.js.map +1 -0
- package/build/scoring/assessments/seo/MetaDescriptionLengthAssessment.js +107 -0
- package/build/scoring/assessments/seo/MetaDescriptionLengthAssessment.js.map +1 -0
- package/build/scoring/assessments/seo/MetaTitleKeywordAssessment.js +111 -0
- package/build/scoring/assessments/seo/MetaTitleKeywordAssessment.js.map +1 -0
- package/build/scoring/assessments/seo/NumberInMetaTitleAssessment.js +103 -0
- package/build/scoring/assessments/seo/NumberInMetaTitleAssessment.js.map +1 -0
- package/build/scoring/assessments/seo/OutboundLinksAssessment.js +110 -0
- package/build/scoring/assessments/seo/OutboundLinksAssessment.js.map +1 -0
- package/build/scoring/assessments/seo/PageTitleWidthAssessment.js +101 -0
- package/build/scoring/assessments/seo/PageTitleWidthAssessment.js.map +1 -0
- package/build/scoring/assessments/seo/SingleH1Assessment.js +110 -0
- package/build/scoring/assessments/seo/SingleH1Assessment.js.map +1 -0
- package/build/scoring/assessments/seo/SingleTitleAssessment.js +103 -0
- package/build/scoring/assessments/seo/SingleTitleAssessment.js.map +1 -0
- package/build/scoring/assessments/seo/SubHeadingsKeywordAssessment.js +103 -0
- package/build/scoring/assessments/seo/SubHeadingsKeywordAssessment.js.map +1 -0
- package/build/scoring/assessments/seo/TextImagesAssessment.js +138 -0
- package/build/scoring/assessments/seo/TextImagesAssessment.js.map +1 -0
- package/build/scoring/assessments/seo/TextLengthAssessment.js +100 -0
- package/build/scoring/assessments/seo/TextLengthAssessment.js.map +1 -0
- package/build/scoring/assessments/seo/UrlKeywordAssessment.js +102 -0
- package/build/scoring/assessments/seo/UrlKeywordAssessment.js.map +1 -0
- package/build/scoring/assessments/seo/UrlLengthAssessment.js +102 -0
- package/build/scoring/assessments/seo/UrlLengthAssessment.js.map +1 -0
- package/build/scoring/assessors/assessor.js +248 -0
- package/build/scoring/assessors/assessor.js.map +1 -0
- package/build/scoring/assessors/avadaAssessor.js +65 -0
- package/build/scoring/assessors/avadaAssessor.js.map +1 -0
- package/build/scoring/assessors/contentAssessor.js +149 -0
- package/build/scoring/assessors/contentAssessor.js.map +1 -0
- package/build/scoring/assessors/index.js +35 -0
- package/build/scoring/assessors/index.js.map +1 -0
- package/build/scoring/assessors/seoAssessor.js +44 -0
- package/build/scoring/assessors/seoAssessor.js.map +1 -0
- package/build/scoring/helpers/assessments/checkForTooLongSentences.js +19 -0
- package/build/scoring/helpers/assessments/checkForTooLongSentences.js.map +1 -0
- package/build/scoring/helpers/assessments/inRange.js +51 -0
- package/build/scoring/helpers/assessments/inRange.js.map +1 -0
- package/build/scoring/helpers/assessments/keyphraseLengthFactor.js +17 -0
- package/build/scoring/helpers/assessments/keyphraseLengthFactor.js.map +1 -0
- package/build/scoring/helpers/assessments/recommendedKeywordCount.js +47 -0
- package/build/scoring/helpers/assessments/recommendedKeywordCount.js.map +1 -0
- package/build/scoring/helpers/index.js +92 -0
- package/build/scoring/helpers/index.js.map +1 -0
- package/build/scoring/interpreters/index.js +14 -0
- package/build/scoring/interpreters/index.js.map +1 -0
- package/build/scoring/interpreters/scoreToRating.js +32 -0
- package/build/scoring/interpreters/scoreToRating.js.map +1 -0
- package/build/scoring/renderers/AssessorPresenter.js +348 -0
- package/build/scoring/renderers/AssessorPresenter.js.map +1 -0
- package/build/scoring/scoreAggregators/ReadabilityScoreAggregator.js +203 -0
- package/build/scoring/scoreAggregators/ReadabilityScoreAggregator.js.map +1 -0
- package/build/scoring/scoreAggregators/SEOScoreAggregator.js +60 -0
- package/build/scoring/scoreAggregators/SEOScoreAggregator.js.map +1 -0
- package/build/scoring/scoreAggregators/ScoreAggregator.js +30 -0
- package/build/scoring/scoreAggregators/ScoreAggregator.js.map +1 -0
- package/build/scoring/scoreAggregators/index.js +28 -0
- package/build/scoring/scoreAggregators/index.js.map +1 -0
- package/build/values/AssessmentResult.js +485 -0
- package/build/values/AssessmentResult.js.map +1 -0
- package/build/values/Mark.js +273 -0
- package/build/values/Mark.js.map +1 -0
- package/build/values/Paper.js +425 -0
- package/build/values/Paper.js.map +1 -0
- package/build/values/index.js +28 -0
- package/build/values/index.js.map +1 -0
- package/build/vendor/turkishStemmer.js +2817 -0
- package/build/vendor/turkishStemmer.js.map +1 -0
- package/package.json +42 -0
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = _default;
|
|
7
|
+
var _lodash = require("lodash");
|
|
8
|
+
var _filterWordsFromArray = _interopRequireDefault(require("../helpers/word/filterWordsFromArray"));
|
|
9
|
+
var _findKeywordFormsInString = require("../helpers/match/findKeywordFormsInString");
|
|
10
|
+
var _getWords = _interopRequireDefault(require("../helpers/word/getWords"));
|
|
11
|
+
var _matchTextWithArray = _interopRequireDefault(require("../helpers/match/matchTextWithArray"));
|
|
12
|
+
var _parseSynonyms = _interopRequireDefault(require("../helpers/sanitize/parseSynonyms"));
|
|
13
|
+
var _processExactMatchRequest = _interopRequireDefault(require("../helpers/match/processExactMatchRequest"));
|
|
14
|
+
var _url = _interopRequireDefault(require("../helpers/url/url.js"));
|
|
15
|
+
var _wordBoundariesWithoutPunctuation = require("../../config/wordBoundariesWithoutPunctuation");
|
|
16
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
17
|
+
let functionWords = [];
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Checks whether the anchor's link is a relative fragment or the same as the site url/domain.
|
|
21
|
+
* Relative fragment links always point to the page itself.
|
|
22
|
+
*
|
|
23
|
+
* @param {String} anchorLink The link anchor.
|
|
24
|
+
* @param {String} siteUrlOrDomain The site URL or domain of the paper.
|
|
25
|
+
*
|
|
26
|
+
* @returns {boolean} Whether the anchor's link is a relative fragment or the same as the site url/domain.
|
|
27
|
+
*/
|
|
28
|
+
function isLinkingToSelf(anchorLink, siteUrlOrDomain) {
|
|
29
|
+
return Boolean(_url.default.areEqual(anchorLink, siteUrlOrDomain) || _url.default.isRelativeFragmentURL(anchorLink));
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Gets the anchors whose url is not linking at the current site url/domain.
|
|
34
|
+
*
|
|
35
|
+
* @param {Array} anchors An array with all anchors from the paper.
|
|
36
|
+
* @param {String} siteUrlOrDomain The site URL or domain of the paper.
|
|
37
|
+
*
|
|
38
|
+
* @returns {Array} The array of all anchors whose url is not linking at the current site url/domain.
|
|
39
|
+
*/
|
|
40
|
+
function getAnchorsLinkingToSelf(anchors, siteUrlOrDomain) {
|
|
41
|
+
const anchorsLinkingToSelf = anchors.map(function (anchor) {
|
|
42
|
+
const anchorLink = anchor.attributes.href;
|
|
43
|
+
// Return false if there is no href attribute.
|
|
44
|
+
return anchorLink ? isLinkingToSelf(anchorLink, siteUrlOrDomain) : false;
|
|
45
|
+
});
|
|
46
|
+
return anchors.filter((anchor, index) => !anchorsLinkingToSelf[index]);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Gets the anchors with text that contains all content words of the topic (i.e. keyphrase or synonyms).
|
|
51
|
+
*
|
|
52
|
+
* @param {Array} anchors An array with all anchors from the paper
|
|
53
|
+
* @param {Object} topicForms The object with topicForms. It contains all forms of the keyphrase and synonyms.
|
|
54
|
+
* @param {String} locale The locale of the paper.
|
|
55
|
+
* @param {Function} matchWordCustomHelper The helper function to match word in text.
|
|
56
|
+
*
|
|
57
|
+
* @returns {String[]} The array of all anchors with text that contains all content words of the keyphrase or synonyms.
|
|
58
|
+
*/
|
|
59
|
+
function getAnchorsContainingTopic(anchors, topicForms, locale, matchWordCustomHelper) {
|
|
60
|
+
const anchorsContainingTopic = anchors.map(function (anchor) {
|
|
61
|
+
// Only retrieve the anchor's text. This is because we only use the anchor text for the following check.
|
|
62
|
+
const anchorText = anchor.innerText();
|
|
63
|
+
return (0, _findKeywordFormsInString.findTopicFormsInString)(topicForms, anchorText, true, locale, matchWordCustomHelper).percentWordMatches === 100;
|
|
64
|
+
});
|
|
65
|
+
return anchors.filter((anchor, index) => anchorsContainingTopic[index]);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* Gets the anchors with text that has the same content words as the keyphrase or synonyms.
|
|
70
|
+
*
|
|
71
|
+
* @param {Array} anchors An array with all anchors from the paper.
|
|
72
|
+
* @param {Object} topicForms The object with topicForms. It contains all forms of the keyphrase and synonyms.
|
|
73
|
+
* @param {string} locale The locale of the paper.
|
|
74
|
+
* @param {Object} customHelpers An object containing custom helpers.
|
|
75
|
+
* @param {Object[]} exactMatchRequest An array of objects containing the keyphrase and information on whether
|
|
76
|
+
* the exact match has been requested.
|
|
77
|
+
* @param {boolean} areHyphensWordBoundaries Whether hyphens should be treated as word boundaries.
|
|
78
|
+
*
|
|
79
|
+
* @returns {Array} The array of all anchors with text that has the same content words as the keyphrase/synonyms.
|
|
80
|
+
*/
|
|
81
|
+
function getAnchorsWithSameTextAsTopic(anchors, topicForms, locale, customHelpers, exactMatchRequest, areHyphensWordBoundaries) {
|
|
82
|
+
const matchWordCustomHelper = customHelpers.matchWordCustomHelper;
|
|
83
|
+
const getWordsCustomHelper = customHelpers.getWordsCustomHelper;
|
|
84
|
+
|
|
85
|
+
// Prepare keyphrase and synonym forms for comparison with anchors.
|
|
86
|
+
const keyphraseAndSynonymsWords = [(0, _lodash.flatten)(topicForms.keyphraseForms)];
|
|
87
|
+
const synonymsForms = topicForms.synonymsForms;
|
|
88
|
+
synonymsForms.forEach(form => keyphraseAndSynonymsWords.push((0, _lodash.flatten)(form)));
|
|
89
|
+
|
|
90
|
+
// The variable that will save all the anchors with text that has the same content words as the keyphrase/synonyms.
|
|
91
|
+
const anchorsContainedInTopic = [];
|
|
92
|
+
anchors.forEach(function (currentAnchor) {
|
|
93
|
+
const currentAnchorText = currentAnchor.innerText();
|
|
94
|
+
|
|
95
|
+
/*
|
|
96
|
+
* For keyphrase matching, we want to split words on hyphens and en-dashes, except for languages where hyphens shouldn't
|
|
97
|
+
* be treated as word boundaries. Currently, the latter only applies to Indonesian, where hyphens are used to create plural forms of nouns,
|
|
98
|
+
* such as "buku-buku" being a plural form of "buku". We want to treat forms like "buku-buku" as one word, so we shouldn't
|
|
99
|
+
* split words on hyphens in Indonesian.
|
|
100
|
+
* For languages where hyphens are treated as word boundaries we pass a custom word boundary regex string to the getWords helper
|
|
101
|
+
* that includes whitespaces, hyphens (u002d), and en-dashes (u2013). Otherwise, we pass a word boundary regex that only includes
|
|
102
|
+
* whitespaces and en-dashes.
|
|
103
|
+
*/
|
|
104
|
+
let anchorWords;
|
|
105
|
+
if (getWordsCustomHelper) {
|
|
106
|
+
anchorWords = (0, _lodash.uniq)(getWordsCustomHelper(currentAnchorText));
|
|
107
|
+
} else if (areHyphensWordBoundaries) {
|
|
108
|
+
anchorWords = (0, _lodash.uniq)((0, _getWords.default)(currentAnchorText, _wordBoundariesWithoutPunctuation.WORD_BOUNDARY_WITH_HYPHEN));
|
|
109
|
+
} else {
|
|
110
|
+
anchorWords = (0, _lodash.uniq)((0, _getWords.default)(currentAnchorText, _wordBoundariesWithoutPunctuation.WORD_BOUNDARY_WITHOUT_HYPHEN));
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
/*
|
|
114
|
+
* Filter function words out of the anchor text.
|
|
115
|
+
* If the anchor text contains only function words, we keep them.
|
|
116
|
+
*/
|
|
117
|
+
const filteredAnchorWords = (0, _filterWordsFromArray.default)(anchorWords, functionWords);
|
|
118
|
+
if (filteredAnchorWords.length > 0) {
|
|
119
|
+
anchorWords = filteredAnchorWords;
|
|
120
|
+
}
|
|
121
|
+
exactMatchRequest.forEach(request => {
|
|
122
|
+
/*
|
|
123
|
+
* Check a) if the exact match is requested for the keyphrase, and
|
|
124
|
+
* b) if every content word in the anchor text is included in the keyphrase or synonym.
|
|
125
|
+
*/
|
|
126
|
+
if (request.exactMatchRequested && anchorWords.every(anchorWord => request.keyphrase.includes(anchorWord))) {
|
|
127
|
+
anchorsContainedInTopic.push(true);
|
|
128
|
+
}
|
|
129
|
+
});
|
|
130
|
+
|
|
131
|
+
// Check if every word in the anchor text is also present in the keyphrase/synonym.
|
|
132
|
+
for (let i = 0; i < keyphraseAndSynonymsWords.length; i++) {
|
|
133
|
+
const topicForm = keyphraseAndSynonymsWords[i];
|
|
134
|
+
if (anchorWords.every(anchorWord => (0, _matchTextWithArray.default)(anchorWord, topicForm, locale, matchWordCustomHelper).count > 0)) {
|
|
135
|
+
anchorsContainedInTopic.push(true);
|
|
136
|
+
break;
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
});
|
|
140
|
+
return anchors.filter((anchor, index) => anchorsContainedInTopic[index]);
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
/**
|
|
144
|
+
* Checks whether the content words of the anchor text are the same as the content words of the keyphrase or synonym.
|
|
145
|
+
* Also includes different word forms if the morphology is available.
|
|
146
|
+
*
|
|
147
|
+
* @param {Paper} paper The paper to research.
|
|
148
|
+
* @param {Researcher} researcher The researcher to use.
|
|
149
|
+
*
|
|
150
|
+
* @returns {Object} The amount of anchor texts whose content words are the same as the keyphrase or synonyms' content words.
|
|
151
|
+
*/
|
|
152
|
+
function _default(paper, researcher) {
|
|
153
|
+
functionWords = researcher.getConfig("functionWords");
|
|
154
|
+
const areHyphensWordBoundaries = researcher.getConfig("areHyphensWordBoundaries");
|
|
155
|
+
const result = {
|
|
156
|
+
anchorsWithKeyphrase: [],
|
|
157
|
+
anchorsWithKeyphraseCount: 0
|
|
158
|
+
};
|
|
159
|
+
// STEP 1.
|
|
160
|
+
// If the paper's text is empty, return empty result.
|
|
161
|
+
if (paper.getText() === "") {
|
|
162
|
+
return result;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
// STEP 2.
|
|
166
|
+
const keyphrase = paper.getKeyword();
|
|
167
|
+
/*
|
|
168
|
+
* If no keyphrase is set, return empty result.
|
|
169
|
+
* This is a conscious decision where we won't assess the paper if the keyphrase is not set.
|
|
170
|
+
* This includes a case where only the synonym is set but not the keyphrase.
|
|
171
|
+
*/
|
|
172
|
+
if (keyphrase === "") {
|
|
173
|
+
return result;
|
|
174
|
+
}
|
|
175
|
+
/*
|
|
176
|
+
* When the keyphrase is set, also retrieve the synonyms and save them in "topics" array.
|
|
177
|
+
* Eventually, the term topics here refers to either keyphrase or synonyms.
|
|
178
|
+
*/
|
|
179
|
+
const originalTopics = (0, _parseSynonyms.default)(paper.getSynonyms());
|
|
180
|
+
originalTopics.push(keyphrase);
|
|
181
|
+
|
|
182
|
+
// Retrieve the anchors.
|
|
183
|
+
let anchors = paper.getTree().findAll(treeNode => treeNode.name === "a");
|
|
184
|
+
/*
|
|
185
|
+
* We get the site's URL (e.g., https://yoast.com) or domain (e.g., yoast.com) from the paper.
|
|
186
|
+
* In case of WordPress, the variable is a URL. In case of Shopify, it is a domain.
|
|
187
|
+
*/
|
|
188
|
+
const siteUrlOrDomain = paper.getPermalink();
|
|
189
|
+
|
|
190
|
+
// STEP 3.
|
|
191
|
+
// Get the anchors with urls that are not linking to the current site url/domain.
|
|
192
|
+
anchors = getAnchorsLinkingToSelf(anchors, siteUrlOrDomain);
|
|
193
|
+
// If all anchor urls are linking to the current site url/domain, return empty result.
|
|
194
|
+
if (anchors.length === 0) {
|
|
195
|
+
return result;
|
|
196
|
+
}
|
|
197
|
+
const locale = paper.getLocale();
|
|
198
|
+
const topicForms = researcher.getResearch("morphology");
|
|
199
|
+
const customHelpers = {
|
|
200
|
+
matchWordCustomHelper: researcher.getHelper("matchWordCustomHelper"),
|
|
201
|
+
getWordsCustomHelper: researcher.getHelper("getWordsCustomHelper")
|
|
202
|
+
};
|
|
203
|
+
|
|
204
|
+
// STEP 4.
|
|
205
|
+
// Get the anchors with text that contains the keyphrase/synonyms' content words.
|
|
206
|
+
anchors = getAnchorsContainingTopic(anchors, topicForms, locale, customHelpers.matchWordCustomHelper);
|
|
207
|
+
// If all anchor texts do not contain the keyphrase/synonyms' content words, return empty result.
|
|
208
|
+
if (anchors.length === 0) {
|
|
209
|
+
return result;
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
// STEP 5.
|
|
213
|
+
// Check if exact match is requested for every topic (keyphrase or synonym).
|
|
214
|
+
const isExactMatchRequested = originalTopics.map(originalTopic => (0, _processExactMatchRequest.default)(originalTopic));
|
|
215
|
+
// Get the anchors with text that has the same content words as the keyphrase/synonyms.
|
|
216
|
+
anchors = getAnchorsWithSameTextAsTopic(anchors, topicForms, locale, customHelpers, isExactMatchRequested, areHyphensWordBoundaries);
|
|
217
|
+
return {
|
|
218
|
+
anchorsWithKeyphrase: anchors,
|
|
219
|
+
anchorsWithKeyphraseCount: anchors.length
|
|
220
|
+
};
|
|
221
|
+
}
|
|
222
|
+
//# sourceMappingURL=getAnchorsWithKeyphrase.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getAnchorsWithKeyphrase.js","names":["_lodash","require","_filterWordsFromArray","_interopRequireDefault","_findKeywordFormsInString","_getWords","_matchTextWithArray","_parseSynonyms","_processExactMatchRequest","_url","_wordBoundariesWithoutPunctuation","e","__esModule","default","functionWords","isLinkingToSelf","anchorLink","siteUrlOrDomain","Boolean","urlHelper","areEqual","isRelativeFragmentURL","getAnchorsLinkingToSelf","anchors","anchorsLinkingToSelf","map","anchor","attributes","href","filter","index","getAnchorsContainingTopic","topicForms","locale","matchWordCustomHelper","anchorsContainingTopic","anchorText","innerText","findTopicFormsInString","percentWordMatches","getAnchorsWithSameTextAsTopic","customHelpers","exactMatchRequest","areHyphensWordBoundaries","getWordsCustomHelper","keyphraseAndSynonymsWords","flatten","keyphraseForms","synonymsForms","forEach","form","push","anchorsContainedInTopic","currentAnchor","currentAnchorText","anchorWords","uniq","getWords","WORD_BOUNDARY_WITH_HYPHEN","WORD_BOUNDARY_WITHOUT_HYPHEN","filteredAnchorWords","filterWordsFromArray","length","request","exactMatchRequested","every","anchorWord","keyphrase","includes","i","topicForm","matchTextWithArray","count","_default","paper","researcher","getConfig","result","anchorsWithKeyphrase","anchorsWithKeyphraseCount","getText","getKeyword","originalTopics","parseSynonyms","getSynonyms","getTree","findAll","treeNode","name","getPermalink","getLocale","getResearch","getHelper","isExactMatchRequested","originalTopic","processExactMatchRequest"],"sources":["../../../src/languageProcessing/researches/getAnchorsWithKeyphrase.js"],"sourcesContent":["import { flatten, uniq } from \"lodash\";\nimport filterWordsFromArray from \"../helpers/word/filterWordsFromArray\";\nimport { findTopicFormsInString } from \"../helpers/match/findKeywordFormsInString\";\nimport getWords from \"../helpers/word/getWords\";\nimport matchTextWithArray from \"../helpers/match/matchTextWithArray\";\nimport parseSynonyms from \"../helpers/sanitize/parseSynonyms\";\nimport processExactMatchRequest from \"../helpers/match/processExactMatchRequest\";\nimport urlHelper from \"../helpers/url/url.js\";\nimport { WORD_BOUNDARY_WITH_HYPHEN, WORD_BOUNDARY_WITHOUT_HYPHEN } from \"../../config/wordBoundariesWithoutPunctuation\";\n\nlet functionWords = [];\n\n/**\n * Checks whether the anchor's link is a relative fragment or the same as the site url/domain.\n * Relative fragment links always point to the page itself.\n *\n * @param {String} anchorLink The link anchor.\n * @param {String} siteUrlOrDomain The site URL or domain of the paper.\n *\n * @returns {boolean} Whether the anchor's link is a relative fragment or the same as the site url/domain.\n */\nfunction isLinkingToSelf( anchorLink, siteUrlOrDomain ) {\n\treturn Boolean( urlHelper.areEqual( anchorLink, siteUrlOrDomain ) || urlHelper.isRelativeFragmentURL( anchorLink ) );\n}\n\n/**\n * Gets the anchors whose url is not linking at the current site url/domain.\n *\n * @param {Array} anchors An array with all anchors from the paper.\n * @param {String} siteUrlOrDomain The site URL or domain of the paper.\n *\n * @returns {Array} The array of all anchors whose url is not linking at the current site url/domain.\n */\nfunction getAnchorsLinkingToSelf( anchors, siteUrlOrDomain ) {\n\tconst anchorsLinkingToSelf = anchors.map( function( anchor ) {\n\t\tconst anchorLink = anchor.attributes.href;\n\t\t// Return false if there is no href attribute.\n\t\treturn anchorLink ? isLinkingToSelf( anchorLink, siteUrlOrDomain ) : false;\n\t} );\n\n\treturn anchors.filter( ( anchor, index ) => ! anchorsLinkingToSelf[ index ] );\n}\n\n/**\n * Gets the anchors with text that contains all content words of the topic (i.e. keyphrase or synonyms).\n *\n * @param {Array} anchors An array with all anchors from the paper\n * @param {Object} topicForms The object with topicForms. It contains all forms of the keyphrase and synonyms.\n * @param {String} locale The locale of the paper.\n * @param {Function} matchWordCustomHelper The helper function to match word in text.\n *\n * @returns {String[]} The array of all anchors with text that contains all content words of the keyphrase or synonyms.\n */\nfunction getAnchorsContainingTopic( anchors, topicForms, locale, matchWordCustomHelper ) {\n\tconst anchorsContainingTopic = anchors.map( function( anchor ) {\n\t\t// Only retrieve the anchor's text. This is because we only use the anchor text for the following check.\n\t\tconst anchorText = anchor.innerText();\n\t\treturn findTopicFormsInString( topicForms, anchorText, true, locale, matchWordCustomHelper ).percentWordMatches === 100;\n\t} );\n\n\treturn anchors.filter( ( anchor, index ) => anchorsContainingTopic[ index ] );\n}\n\n/**\n * Gets the anchors with text that has the same content words as the keyphrase or synonyms.\n *\n * @param {Array} anchors \t\tAn array with all anchors from the paper.\n * @param {Object} topicForms \t\tThe object with topicForms. It contains all forms of the keyphrase and synonyms.\n * @param {string} locale \t\tThe locale of the paper.\n * @param {Object} customHelpers \t\tAn object containing custom helpers.\n * @param {Object[]} exactMatchRequest \t\tAn array of objects containing the keyphrase and information on whether\n * \t\t\t\t\t\t\t\t\t\t\t\t\tthe exact match has been requested.\n * @param {boolean}\t \tareHyphensWordBoundaries\tWhether hyphens should be treated as word boundaries.\n *\n * @returns {Array} The array of all anchors with text that has the same content words as the keyphrase/synonyms.\n */\nfunction getAnchorsWithSameTextAsTopic( anchors, topicForms, locale, customHelpers, exactMatchRequest, areHyphensWordBoundaries ) {\n\tconst matchWordCustomHelper = customHelpers.matchWordCustomHelper;\n\tconst getWordsCustomHelper = customHelpers.getWordsCustomHelper;\n\n\t// Prepare keyphrase and synonym forms for comparison with anchors.\n\tconst keyphraseAndSynonymsWords = [ flatten( topicForms.keyphraseForms ) ];\n\tconst synonymsForms = topicForms.synonymsForms;\n\tsynonymsForms.forEach( form => keyphraseAndSynonymsWords.push( flatten( form ) ) );\n\n\t// The variable that will save all the anchors with text that has the same content words as the keyphrase/synonyms.\n\tconst anchorsContainedInTopic = [];\n\n\tanchors.forEach( function( currentAnchor ) {\n\t\tconst currentAnchorText = currentAnchor.innerText();\n\n\t\t/*\n * For keyphrase matching, we want to split words on hyphens and en-dashes, except for languages where hyphens shouldn't\n * be treated as word boundaries. Currently, the latter only applies to Indonesian, where hyphens are used to create plural forms of nouns,\n * such as \"buku-buku\" being a plural form of \"buku\". We want to treat forms like \"buku-buku\" as one word, so we shouldn't\n * split words on hyphens in Indonesian.\n * For languages where hyphens are treated as word boundaries we pass a custom word boundary regex string to the getWords helper\n * that includes whitespaces, hyphens (u002d), and en-dashes (u2013). Otherwise, we pass a word boundary regex that only includes\n * whitespaces and en-dashes.\n */\n\t\tlet anchorWords;\n\t\tif ( getWordsCustomHelper ) {\n\t\t\tanchorWords = uniq( getWordsCustomHelper( currentAnchorText ) );\n\t\t} else if ( areHyphensWordBoundaries ) {\n\t\t\tanchorWords = uniq( getWords( currentAnchorText, WORD_BOUNDARY_WITH_HYPHEN ) );\n\t\t} else {\n\t\t\tanchorWords = uniq( getWords( currentAnchorText, WORD_BOUNDARY_WITHOUT_HYPHEN ) );\n\t\t}\n\n\t\t/*\n\t\t * Filter function words out of the anchor text.\n\t\t * If the anchor text contains only function words, we keep them.\n\t\t */\n\t\tconst filteredAnchorWords = filterWordsFromArray( anchorWords, functionWords );\n\t\tif ( filteredAnchorWords.length > 0 ) {\n\t\t\tanchorWords = filteredAnchorWords;\n\t\t}\n\n\t\texactMatchRequest.forEach( request => {\n\t\t\t/*\n\t\t\t * Check a) if the exact match is requested for the keyphrase, and\n\t\t\t * b) if every content word in the anchor text is included in the keyphrase or synonym.\n\t\t\t */\n\t\t\tif ( request.exactMatchRequested &&\n\t\t\t\tanchorWords.every( anchorWord => request.keyphrase.includes( anchorWord ) ) ) {\n\t\t\t\tanchorsContainedInTopic.push( true );\n\t\t\t}\n\t\t} );\n\n\t\t// Check if every word in the anchor text is also present in the keyphrase/synonym.\n\t\tfor ( let i = 0; i < keyphraseAndSynonymsWords.length; i++ ) {\n\t\t\tconst topicForm = keyphraseAndSynonymsWords[ i ];\n\n\t\t\tif ( anchorWords.every( anchorWord => matchTextWithArray( anchorWord, topicForm, locale, matchWordCustomHelper ).count > 0 ) ) {\n\t\t\t\tanchorsContainedInTopic.push( true );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t} );\n\n\treturn anchors.filter( ( anchor, index ) => anchorsContainedInTopic[ index ] );\n}\n\n/**\n * Checks whether the content words of the anchor text are the same as the content words of the keyphrase or synonym.\n * Also includes different word forms if the morphology is available.\n *\n * @param {Paper} paper The paper to research.\n * @param {Researcher} researcher The researcher to use.\n *\n * @returns {Object} The amount of anchor texts whose content words are the same as the keyphrase or synonyms' content words.\n */\nexport default function( paper, researcher ) {\n\tfunctionWords = researcher.getConfig( \"functionWords\" );\n\n\tconst areHyphensWordBoundaries = researcher.getConfig( \"areHyphensWordBoundaries\" );\n\n\tconst result = {\n\t\tanchorsWithKeyphrase: [],\n\t\tanchorsWithKeyphraseCount: 0,\n\t};\n\t// STEP 1.\n\t// If the paper's text is empty, return empty result.\n\tif ( paper.getText() === \"\" ) {\n\t\treturn result;\n\t}\n\n\t// STEP 2.\n\tconst keyphrase = paper.getKeyword();\n\t/*\n\t * If no keyphrase is set, return empty result.\n\t * This is a conscious decision where we won't assess the paper if the keyphrase is not set.\n\t * This includes a case where only the synonym is set but not the keyphrase.\n\t */\n\tif ( keyphrase === \"\" ) {\n\t\treturn result;\n\t}\n\t/*\n\t * When the keyphrase is set, also retrieve the synonyms and save them in \"topics\" array.\n\t * Eventually, the term topics here refers to either keyphrase or synonyms.\n\t */\n\tconst originalTopics = parseSynonyms( paper.getSynonyms() );\n\toriginalTopics.push( keyphrase );\n\n\t// Retrieve the anchors.\n\tlet anchors = paper.getTree().findAll( treeNode => treeNode.name === \"a\" );\n\t/*\n\t * We get the site's URL (e.g., https://yoast.com) or domain (e.g., yoast.com) from the paper.\n\t * In case of WordPress, the variable is a URL. In case of Shopify, it is a domain.\n\t */\n\tconst siteUrlOrDomain = paper.getPermalink();\n\n\t// STEP 3.\n\t// Get the anchors with urls that are not linking to the current site url/domain.\n\tanchors = getAnchorsLinkingToSelf( anchors, siteUrlOrDomain );\n\t// If all anchor urls are linking to the current site url/domain, return empty result.\n\tif ( anchors.length === 0 ) {\n\t\treturn result;\n\t}\n\n\tconst locale = paper.getLocale();\n\tconst topicForms = researcher.getResearch( \"morphology\" );\n\tconst customHelpers = {\n\t\tmatchWordCustomHelper: researcher.getHelper( \"matchWordCustomHelper\" ),\n\t\tgetWordsCustomHelper: researcher.getHelper( \"getWordsCustomHelper\" ),\n\t};\n\n\t// STEP 4.\n\t// Get the anchors with text that contains the keyphrase/synonyms' content words.\n\tanchors = getAnchorsContainingTopic( anchors, topicForms, locale, customHelpers.matchWordCustomHelper );\n\t// If all anchor texts do not contain the keyphrase/synonyms' content words, return empty result.\n\tif ( anchors.length === 0 ) {\n\t\treturn result;\n\t}\n\n\t// STEP 5.\n\t// Check if exact match is requested for every topic (keyphrase or synonym).\n\tconst isExactMatchRequested = originalTopics.map( originalTopic => processExactMatchRequest( originalTopic ) );\n\t// Get the anchors with text that has the same content words as the keyphrase/synonyms.\n\tanchors = getAnchorsWithSameTextAsTopic( anchors, topicForms, locale, customHelpers, isExactMatchRequested, areHyphensWordBoundaries );\n\n\treturn {\n\t\tanchorsWithKeyphrase: anchors,\n\t\tanchorsWithKeyphraseCount: anchors.length,\n\t};\n}\n\n"],"mappings":"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","ignoreList":[]}
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.DIFFICULTY = void 0;
|
|
7
|
+
exports.default = _default;
|
|
8
|
+
var _stripNumbers = _interopRequireDefault(require("../helpers/sanitize/stripNumbers.js"));
|
|
9
|
+
var _countSentences = _interopRequireDefault(require("../helpers/sentence/countSentences.js"));
|
|
10
|
+
var _countWords = _interopRequireDefault(require("../helpers/word/countWords.js"));
|
|
11
|
+
var _countSyllables = _interopRequireDefault(require("../helpers/syllables/countSyllables.js"));
|
|
12
|
+
var _lodash = require("lodash");
|
|
13
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
14
|
+
/** @module analyses/calculateFleschReading */
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Calculates an average from a total and an amount
|
|
18
|
+
*
|
|
19
|
+
* @param {number} total The total.
|
|
20
|
+
* @param {number} amount The amount.
|
|
21
|
+
* @returns {number} The average from the total and the amount.
|
|
22
|
+
*/
|
|
23
|
+
const getAverage = function (total, amount) {
|
|
24
|
+
return total / amount;
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* The Flesch reading ease difficulty.
|
|
29
|
+
* @readonly
|
|
30
|
+
* @enum {number}
|
|
31
|
+
*/
|
|
32
|
+
const DIFFICULTY = exports.DIFFICULTY = {
|
|
33
|
+
NO_DATA: -1,
|
|
34
|
+
VERY_EASY: 0,
|
|
35
|
+
EASY: 1,
|
|
36
|
+
FAIRLY_EASY: 2,
|
|
37
|
+
OKAY: 3,
|
|
38
|
+
FAIRLY_DIFFICULT: 4,
|
|
39
|
+
DIFFICULT: 5,
|
|
40
|
+
VERY_DIFFICULT: 6
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Returns the Flesch reading ease difficulty based on the boundaries
|
|
45
|
+
* defined in the score configuration.
|
|
46
|
+
*
|
|
47
|
+
* @param {number} score The Flesch reading ease score.
|
|
48
|
+
* @param {Object} scoreConfiguration The score configuration.
|
|
49
|
+
*
|
|
50
|
+
* @returns {DIFFICULTY} The Flesch reading ease difficulty.
|
|
51
|
+
*/
|
|
52
|
+
function getDifficulty(score, scoreConfiguration) {
|
|
53
|
+
if (score >= scoreConfiguration.borders.veryEasy) {
|
|
54
|
+
return DIFFICULTY.VERY_EASY;
|
|
55
|
+
} else if ((0, _lodash.inRange)(score, scoreConfiguration.borders.easy, scoreConfiguration.borders.veryEasy)) {
|
|
56
|
+
return DIFFICULTY.EASY;
|
|
57
|
+
} else if ((0, _lodash.inRange)(score, scoreConfiguration.borders.fairlyEasy, scoreConfiguration.borders.easy)) {
|
|
58
|
+
return DIFFICULTY.FAIRLY_EASY;
|
|
59
|
+
} else if ((0, _lodash.inRange)(score, scoreConfiguration.borders.okay, scoreConfiguration.borders.fairlyEasy)) {
|
|
60
|
+
return DIFFICULTY.OKAY;
|
|
61
|
+
} else if ((0, _lodash.inRange)(score, scoreConfiguration.borders.fairlyDifficult, scoreConfiguration.borders.okay)) {
|
|
62
|
+
return DIFFICULTY.FAIRLY_DIFFICULT;
|
|
63
|
+
} else if ((0, _lodash.inRange)(score, scoreConfiguration.borders.difficult, scoreConfiguration.borders.fairlyDifficult)) {
|
|
64
|
+
return DIFFICULTY.DIFFICULT;
|
|
65
|
+
}
|
|
66
|
+
return DIFFICULTY.VERY_DIFFICULT;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Retrieves the scoring configuration defining the boundaries to use to
|
|
71
|
+
* determine the Flesch reading ease difficulty.
|
|
72
|
+
*
|
|
73
|
+
* @param {Researcher} researcher The researcher.
|
|
74
|
+
*
|
|
75
|
+
* @returns {Object} The language specific scoring configuration, or the default configuration if not available.
|
|
76
|
+
*/
|
|
77
|
+
function getConfiguration(researcher) {
|
|
78
|
+
const languageSpecificConfig = researcher.getConfig("fleschReadingEaseScores");
|
|
79
|
+
const defaultConfig = {
|
|
80
|
+
borders: {
|
|
81
|
+
veryEasy: 90,
|
|
82
|
+
easy: 80,
|
|
83
|
+
fairlyEasy: 70,
|
|
84
|
+
okay: 60,
|
|
85
|
+
fairlyDifficult: 50,
|
|
86
|
+
difficult: 30,
|
|
87
|
+
veryDifficult: 0
|
|
88
|
+
},
|
|
89
|
+
scores: {
|
|
90
|
+
veryEasy: 9,
|
|
91
|
+
easy: 9,
|
|
92
|
+
fairlyEasy: 9,
|
|
93
|
+
okay: 9,
|
|
94
|
+
fairlyDifficult: 6,
|
|
95
|
+
difficult: 3,
|
|
96
|
+
veryDifficult: 3
|
|
97
|
+
}
|
|
98
|
+
};
|
|
99
|
+
return languageSpecificConfig ? languageSpecificConfig : defaultConfig;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* This calculates the Flesch reading score for a given text.
|
|
104
|
+
*
|
|
105
|
+
* @param {Paper} paper The paper containing the text.
|
|
106
|
+
* @param {Researcher} researcher The researcher.
|
|
107
|
+
*
|
|
108
|
+
* @returns {{ score: number, difficulty: DIFFICULTY }} The Flesch reading score.
|
|
109
|
+
*/
|
|
110
|
+
function _default(paper, researcher) {
|
|
111
|
+
const syllables = researcher.getConfig("syllables");
|
|
112
|
+
const memoizedTokenizer = researcher.getHelper("memoizedTokenizer");
|
|
113
|
+
const languageSpecificConfiguration = getConfiguration(researcher);
|
|
114
|
+
let text = paper.getText();
|
|
115
|
+
if (text === "") {
|
|
116
|
+
// A score of -1 signals to the code down the line that no valid FRE was calculated.
|
|
117
|
+
return {
|
|
118
|
+
score: -1,
|
|
119
|
+
difficulty: DIFFICULTY.NO_DATA
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
text = (0, _stripNumbers.default)(text);
|
|
123
|
+
const numberOfSentences = (0, _countSentences.default)(text, memoizedTokenizer);
|
|
124
|
+
const numberOfWords = (0, _countWords.default)(text);
|
|
125
|
+
|
|
126
|
+
// Do not show the Flesch reading ease when there is not enough data for the FRE to make sense. Also used to prevent division by zero errors.
|
|
127
|
+
// A score of -1 signals to the code down the line that no valid FRE was calculated.
|
|
128
|
+
if (numberOfSentences < 1 || numberOfWords <= 10) {
|
|
129
|
+
return {
|
|
130
|
+
score: -1,
|
|
131
|
+
difficulty: DIFFICULTY.NO_DATA
|
|
132
|
+
};
|
|
133
|
+
}
|
|
134
|
+
const numberOfSyllables = (0, _countSyllables.default)(text, syllables);
|
|
135
|
+
const averageWordsPerSentence = getAverage(numberOfWords, numberOfSentences);
|
|
136
|
+
const syllablesPer100Words = numberOfSyllables * (100 / numberOfWords);
|
|
137
|
+
const statistics = {
|
|
138
|
+
numberOfSentences,
|
|
139
|
+
numberOfWords,
|
|
140
|
+
numberOfSyllables,
|
|
141
|
+
averageWordsPerSentence,
|
|
142
|
+
syllablesPer100Words
|
|
143
|
+
};
|
|
144
|
+
const getScore = researcher.getHelper("fleschReadingScore");
|
|
145
|
+
const score = (0, _lodash.clamp)(getScore(statistics), 0, 100);
|
|
146
|
+
const difficulty = getDifficulty(score, languageSpecificConfiguration);
|
|
147
|
+
return {
|
|
148
|
+
score,
|
|
149
|
+
difficulty
|
|
150
|
+
};
|
|
151
|
+
}
|
|
152
|
+
//# sourceMappingURL=getFleschReadingScore.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getFleschReadingScore.js","names":["_stripNumbers","_interopRequireDefault","require","_countSentences","_countWords","_countSyllables","_lodash","e","__esModule","default","getAverage","total","amount","DIFFICULTY","exports","NO_DATA","VERY_EASY","EASY","FAIRLY_EASY","OKAY","FAIRLY_DIFFICULT","DIFFICULT","VERY_DIFFICULT","getDifficulty","score","scoreConfiguration","borders","veryEasy","inRange","easy","fairlyEasy","okay","fairlyDifficult","difficult","getConfiguration","researcher","languageSpecificConfig","getConfig","defaultConfig","veryDifficult","scores","_default","paper","syllables","memoizedTokenizer","getHelper","languageSpecificConfiguration","text","getText","difficulty","stripNumbers","numberOfSentences","countSentences","numberOfWords","countWords","numberOfSyllables","countSyllables","averageWordsPerSentence","syllablesPer100Words","statistics","getScore","clamp"],"sources":["../../../src/languageProcessing/researches/getFleschReadingScore.js"],"sourcesContent":["/** @module analyses/calculateFleschReading */\n\nimport stripNumbers from \"../helpers/sanitize/stripNumbers.js\";\nimport countSentences from \"../helpers/sentence/countSentences.js\";\nimport countWords from \"../helpers/word/countWords.js\";\nimport countSyllables from \"../helpers/syllables/countSyllables.js\";\nimport { clamp, inRange } from \"lodash\";\n\n/**\n * Calculates an average from a total and an amount\n *\n * @param {number} total The total.\n * @param {number} amount The amount.\n * @returns {number} The average from the total and the amount.\n */\nconst getAverage = function( total, amount ) {\n\treturn total / amount;\n};\n\n/**\n * The Flesch reading ease difficulty.\n * @readonly\n * @enum {number}\n */\nexport const DIFFICULTY = {\n\tNO_DATA: -1,\n\tVERY_EASY: 0,\n\tEASY: 1,\n\tFAIRLY_EASY: 2,\n\tOKAY: 3,\n\tFAIRLY_DIFFICULT: 4,\n\tDIFFICULT: 5,\n\tVERY_DIFFICULT: 6,\n};\n\n/**\n * Returns the Flesch reading ease difficulty based on the boundaries\n * defined in the score configuration.\n *\n * @param {number} score The Flesch reading ease score.\n * @param {Object} scoreConfiguration The score configuration.\n *\n * @returns {DIFFICULTY} The Flesch reading ease difficulty.\n */\nfunction getDifficulty( score, scoreConfiguration ) {\n\tif ( score >= scoreConfiguration.borders.veryEasy ) {\n\t\treturn DIFFICULTY.VERY_EASY;\n\t} else if ( inRange( score, scoreConfiguration.borders.easy, scoreConfiguration.borders.veryEasy ) ) {\n\t\treturn DIFFICULTY.EASY;\n\t} else if ( inRange( score, scoreConfiguration.borders.fairlyEasy, scoreConfiguration.borders.easy ) ) {\n\t\treturn DIFFICULTY.FAIRLY_EASY;\n\t} else if ( inRange( score, scoreConfiguration.borders.okay, scoreConfiguration.borders.fairlyEasy ) ) {\n\t\treturn DIFFICULTY.OKAY;\n\t} else if ( inRange( score, scoreConfiguration.borders.fairlyDifficult, scoreConfiguration.borders.okay ) ) {\n\t\treturn DIFFICULTY.FAIRLY_DIFFICULT;\n\t} else if ( inRange( score, scoreConfiguration.borders.difficult, scoreConfiguration.borders.fairlyDifficult ) ) {\n\t\treturn DIFFICULTY.DIFFICULT;\n\t}\n\n\treturn DIFFICULTY.VERY_DIFFICULT;\n}\n\n/**\n * Retrieves the scoring configuration defining the boundaries to use to\n * determine the Flesch reading ease difficulty.\n *\n * @param {Researcher} researcher The researcher.\n *\n * @returns {Object} The language specific scoring configuration, or the default configuration if not available.\n */\nfunction getConfiguration( researcher ) {\n\tconst languageSpecificConfig = researcher.getConfig( \"fleschReadingEaseScores\" );\n\tconst defaultConfig = {\n\t\tborders: {\n\t\t\tveryEasy: 90,\n\t\t\teasy: 80,\n\t\t\tfairlyEasy: 70,\n\t\t\tokay: 60,\n\t\t\tfairlyDifficult: 50,\n\t\t\tdifficult: 30,\n\t\t\tveryDifficult: 0,\n\t\t},\n\t\tscores: {\n\t\t\tveryEasy: 9,\n\t\t\teasy: 9,\n\t\t\tfairlyEasy: 9,\n\t\t\tokay: 9,\n\t\t\tfairlyDifficult: 6,\n\t\t\tdifficult: 3,\n\t\t\tveryDifficult: 3,\n\t\t},\n\t};\n\treturn languageSpecificConfig ? languageSpecificConfig : defaultConfig;\n}\n\n/**\n * This calculates the Flesch reading score for a given text.\n *\n * @param {Paper} paper The paper containing the text.\n * @param {Researcher} researcher The researcher.\n *\n * @returns {{ score: number, difficulty: DIFFICULTY }} The Flesch reading score.\n */\nexport default function( paper, researcher ) {\n\tconst syllables = researcher.getConfig( \"syllables\" );\n\tconst memoizedTokenizer = researcher.getHelper( \"memoizedTokenizer\" );\n\tconst languageSpecificConfiguration = getConfiguration( researcher );\n\n\tlet text = paper.getText();\n\tif ( text === \"\" ) {\n\t\t// A score of -1 signals to the code down the line that no valid FRE was calculated.\n\t\treturn {\n\t\t\tscore: -1,\n\t\t\tdifficulty: DIFFICULTY.NO_DATA,\n\t\t};\n\t}\n\n\ttext = stripNumbers( text );\n\n\tconst numberOfSentences = countSentences( text, memoizedTokenizer );\n\tconst numberOfWords = countWords( text );\n\n\t// Do not show the Flesch reading ease when there is not enough data for the FRE to make sense. Also used to prevent division by zero errors.\n\t// A score of -1 signals to the code down the line that no valid FRE was calculated.\n\tif ( numberOfSentences < 1 || numberOfWords <= 10 ) {\n\t\treturn {\n\t\t\tscore: -1,\n\t\t\tdifficulty: DIFFICULTY.NO_DATA,\n\t\t};\n\t}\n\n\tconst numberOfSyllables = countSyllables( text, syllables );\n\tconst averageWordsPerSentence = getAverage( numberOfWords, numberOfSentences );\n\tconst syllablesPer100Words = numberOfSyllables * ( 100 / numberOfWords );\n\tconst statistics = {\n\t\tnumberOfSentences,\n\t\tnumberOfWords,\n\t\tnumberOfSyllables,\n\t\taverageWordsPerSentence,\n\t\tsyllablesPer100Words,\n\t};\n\n\tconst getScore = researcher.getHelper( \"fleschReadingScore\" );\n\n\tconst score = clamp( getScore( statistics ), 0, 100 );\n\n\tconst difficulty = getDifficulty( score, languageSpecificConfiguration );\n\n\treturn { score, difficulty };\n}\n"],"mappings":"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","ignoreList":[]}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = getKeyphraseDensity;
|
|
7
|
+
exports.getKeywordDensity = getKeywordDensity;
|
|
8
|
+
var _getAllWordsFromTree = _interopRequireDefault(require("../helpers/word/getAllWordsFromTree"));
|
|
9
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
10
|
+
/**
|
|
11
|
+
* Calculates the keyphrase density.
|
|
12
|
+
*
|
|
13
|
+
* @param {Paper} paper The paper containing keyphrase and text.
|
|
14
|
+
* @param {Researcher} researcher The researcher.
|
|
15
|
+
*
|
|
16
|
+
* @returns {number} The keyphrase density.
|
|
17
|
+
*/
|
|
18
|
+
function getKeyphraseDensity(paper, researcher) {
|
|
19
|
+
const getWordsCustomHelper = researcher.getHelper("getWordsCustomHelper");
|
|
20
|
+
let wordCount = 0;
|
|
21
|
+
|
|
22
|
+
// If there is a custom getWords helper, use its output for countWords.
|
|
23
|
+
if (getWordsCustomHelper) {
|
|
24
|
+
wordCount = getWordsCustomHelper(paper.getText()).length;
|
|
25
|
+
} else {
|
|
26
|
+
wordCount = (0, _getAllWordsFromTree.default)(paper).length;
|
|
27
|
+
}
|
|
28
|
+
if (wordCount === 0) {
|
|
29
|
+
return 0;
|
|
30
|
+
}
|
|
31
|
+
const keyphraseCount = researcher.getResearch("getKeyphraseCount");
|
|
32
|
+
return keyphraseCount.count / wordCount * 100;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Calculates the keyphrase density.
|
|
37
|
+
*
|
|
38
|
+
* @deprecated Use getKeyphraseDensity instead.
|
|
39
|
+
*
|
|
40
|
+
* @param {Paper} paper The paper containing keyphrase and text.
|
|
41
|
+
* @param {Researcher} researcher The researcher.
|
|
42
|
+
*
|
|
43
|
+
* @returns {number} The keyphrase density.
|
|
44
|
+
*/
|
|
45
|
+
function getKeywordDensity(paper, researcher) {
|
|
46
|
+
console.warn("This function is deprecated, use getKeyphraseDensity instead.");
|
|
47
|
+
return getKeyphraseDensity(paper, researcher);
|
|
48
|
+
}
|
|
49
|
+
//# sourceMappingURL=getKeywordDensity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getKeywordDensity.js","names":["_getAllWordsFromTree","_interopRequireDefault","require","e","__esModule","default","getKeyphraseDensity","paper","researcher","getWordsCustomHelper","getHelper","wordCount","getText","length","getAllWordsFromTree","keyphraseCount","getResearch","count","getKeywordDensity","console","warn"],"sources":["../../../src/languageProcessing/researches/getKeywordDensity.js"],"sourcesContent":["import getAllWordsFromTree from \"../helpers/word/getAllWordsFromTree\";\n\n/**\n * Calculates the keyphrase density.\n *\n * @param {Paper} paper The paper containing keyphrase and text.\n * @param {Researcher} researcher The researcher.\n *\n * @returns {number} The keyphrase density.\n */\nexport default function getKeyphraseDensity( paper, researcher ) {\n\tconst getWordsCustomHelper = researcher.getHelper( \"getWordsCustomHelper\" );\n\tlet wordCount = 0;\n\n\t// If there is a custom getWords helper, use its output for countWords.\n\tif ( getWordsCustomHelper ) {\n\t\twordCount = getWordsCustomHelper( paper.getText() ).length;\n\t} else {\n\t\twordCount = getAllWordsFromTree( paper ).length;\n\t}\n\n\tif ( wordCount === 0 ) {\n\t\treturn 0;\n\t}\n\n\tconst keyphraseCount = researcher.getResearch( \"getKeyphraseCount\" );\n\n\treturn ( keyphraseCount.count / wordCount ) * 100;\n}\n\n/**\n * Calculates the keyphrase density.\n *\n * @deprecated Use getKeyphraseDensity instead.\n *\n * @param {Paper} paper The paper containing keyphrase and text.\n * @param {Researcher} researcher The researcher.\n *\n * @returns {number} The keyphrase density.\n */\nexport function getKeywordDensity( paper, researcher ) {\n\tconsole.warn( \"This function is deprecated, use getKeyphraseDensity instead.\" );\n\treturn getKeyphraseDensity( paper, researcher );\n}\n"],"mappings":";;;;;;;AAAA,IAAAA,oBAAA,GAAAC,sBAAA,CAAAC,OAAA;AAAsE,SAAAD,uBAAAE,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAEtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACe,SAASG,mBAAmBA,CAAEC,KAAK,EAAEC,UAAU,EAAG;EAChE,MAAMC,oBAAoB,GAAGD,UAAU,CAACE,SAAS,CAAE,sBAAuB,CAAC;EAC3E,IAAIC,SAAS,GAAG,CAAC;;EAEjB;EACA,IAAKF,oBAAoB,EAAG;IAC3BE,SAAS,GAAGF,oBAAoB,CAAEF,KAAK,CAACK,OAAO,CAAC,CAAE,CAAC,CAACC,MAAM;EAC3D,CAAC,MAAM;IACNF,SAAS,GAAG,IAAAG,4BAAmB,EAAEP,KAAM,CAAC,CAACM,MAAM;EAChD;EAEA,IAAKF,SAAS,KAAK,CAAC,EAAG;IACtB,OAAO,CAAC;EACT;EAEA,MAAMI,cAAc,GAAGP,UAAU,CAACQ,WAAW,CAAE,mBAAoB,CAAC;EAEpE,OAASD,cAAc,CAACE,KAAK,GAAGN,SAAS,GAAK,GAAG;AAClD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASO,iBAAiBA,CAAEX,KAAK,EAAEC,UAAU,EAAG;EACtDW,OAAO,CAACC,IAAI,CAAE,+DAAgE,CAAC;EAC/E,OAAOd,mBAAmB,CAAEC,KAAK,EAAEC,UAAW,CAAC;AAChD","ignoreList":[]}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = _default;
|
|
7
|
+
var _checkNofollow = _interopRequireDefault(require("../helpers/link/checkNofollow.js"));
|
|
8
|
+
var _getAnchorsFromText = _interopRequireDefault(require("../helpers/link/getAnchorsFromText.js"));
|
|
9
|
+
var _getLinkType = _interopRequireDefault(require("../helpers/link/getLinkType.js"));
|
|
10
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
11
|
+
/**
|
|
12
|
+
* Counts the links found in the text.
|
|
13
|
+
*
|
|
14
|
+
* @param {Paper} paper The paper object containing text, keyword and url.
|
|
15
|
+
*
|
|
16
|
+
* @returns {object} The object containing all linktypes.
|
|
17
|
+
* total: the total number of links found.
|
|
18
|
+
* internalTotal: the total number of links that are internal.
|
|
19
|
+
* internalDofollow: the internal links without a nofollow attribute.
|
|
20
|
+
* internalNofollow: the internal links with a nofollow attribute.
|
|
21
|
+
* externalTotal: the total number of links that are external.
|
|
22
|
+
* externalDofollow: the external links without a nofollow attribute.
|
|
23
|
+
* externalNofollow: the internal links with a dofollow attribute.
|
|
24
|
+
* otherTotal: all links that are not HTTP or HTTPS.
|
|
25
|
+
* otherDofollow: other links without a nofollow attribute.
|
|
26
|
+
* otherNofollow: other links with a nofollow attribute.
|
|
27
|
+
*/
|
|
28
|
+
function _default(paper) {
|
|
29
|
+
const anchors = (0, _getAnchorsFromText.default)(paper.getText());
|
|
30
|
+
/*
|
|
31
|
+
* We get the site's URL (e.g., https://yoast.com) or domain (e.g., yoast.com) from the paper.
|
|
32
|
+
* In case of WordPress, the variable is a URL. In case of Shopify, it is a domain.
|
|
33
|
+
*/
|
|
34
|
+
const siteUrlOrDomain = paper.getPermalink();
|
|
35
|
+
const linkCount = {
|
|
36
|
+
total: anchors.length,
|
|
37
|
+
internalTotal: 0,
|
|
38
|
+
internalDofollow: 0,
|
|
39
|
+
internalNofollow: 0,
|
|
40
|
+
externalTotal: 0,
|
|
41
|
+
externalDofollow: 0,
|
|
42
|
+
externalNofollow: 0,
|
|
43
|
+
otherTotal: 0,
|
|
44
|
+
otherDofollow: 0,
|
|
45
|
+
otherNofollow: 0
|
|
46
|
+
};
|
|
47
|
+
for (let i = 0; i < anchors.length; i++) {
|
|
48
|
+
const currentAnchor = anchors[i];
|
|
49
|
+
const linkType = (0, _getLinkType.default)(currentAnchor, siteUrlOrDomain);
|
|
50
|
+
const linkFollow = (0, _checkNofollow.default)(currentAnchor);
|
|
51
|
+
linkCount[linkType + "Total"]++;
|
|
52
|
+
linkCount[linkType + linkFollow]++;
|
|
53
|
+
}
|
|
54
|
+
return linkCount;
|
|
55
|
+
}
|
|
56
|
+
//# sourceMappingURL=getLinkStatistics.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getLinkStatistics.js","names":["_checkNofollow","_interopRequireDefault","require","_getAnchorsFromText","_getLinkType","e","__esModule","default","_default","paper","anchors","getAnchors","getText","siteUrlOrDomain","getPermalink","linkCount","total","length","internalTotal","internalDofollow","internalNofollow","externalTotal","externalDofollow","externalNofollow","otherTotal","otherDofollow","otherNofollow","i","currentAnchor","linkType","getLinkType","linkFollow","checkNofollow"],"sources":["../../../src/languageProcessing/researches/getLinkStatistics.js"],"sourcesContent":["import checkNofollow from \"../helpers/link/checkNofollow.js\";\nimport getAnchors from \"../helpers/link/getAnchorsFromText.js\";\nimport getLinkType from \"../helpers/link/getLinkType.js\";\n\n/**\n * Counts the links found in the text.\n *\n * @param {Paper} paper The paper object containing text, keyword and url.\n *\n * @returns {object} The object containing all linktypes.\n * total: the total number of links found.\n * internalTotal: the total number of links that are internal.\n * internalDofollow: the internal links without a nofollow attribute.\n * internalNofollow: the internal links with a nofollow attribute.\n * externalTotal: the total number of links that are external.\n * externalDofollow: the external links without a nofollow attribute.\n * externalNofollow: the internal links with a dofollow attribute.\n * otherTotal: all links that are not HTTP or HTTPS.\n * otherDofollow: other links without a nofollow attribute.\n * otherNofollow: other links with a nofollow attribute.\n */\nexport default function( paper ) {\n\tconst anchors = getAnchors( paper.getText() );\n\t/*\n\t * We get the site's URL (e.g., https://yoast.com) or domain (e.g., yoast.com) from the paper.\n\t * In case of WordPress, the variable is a URL. In case of Shopify, it is a domain.\n\t */\n\tconst siteUrlOrDomain = paper.getPermalink();\n\n\tconst linkCount = {\n\t\ttotal: anchors.length,\n\t\tinternalTotal: 0,\n\t\tinternalDofollow: 0,\n\t\tinternalNofollow: 0,\n\t\texternalTotal: 0,\n\t\texternalDofollow: 0,\n\t\texternalNofollow: 0,\n\t\totherTotal: 0,\n\t\totherDofollow: 0,\n\t\totherNofollow: 0,\n\t};\n\n\tfor ( let i = 0; i < anchors.length; i++ ) {\n\t\tconst currentAnchor = anchors[ i ];\n\n\t\tconst linkType = getLinkType( currentAnchor, siteUrlOrDomain );\n\t\tconst linkFollow = checkNofollow( currentAnchor );\n\n\t\tlinkCount[ linkType + \"Total\" ]++;\n\t\tlinkCount[ linkType + linkFollow ]++;\n\t}\n\n\treturn linkCount;\n}\n"],"mappings":";;;;;;AAAA,IAAAA,cAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,mBAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,YAAA,GAAAH,sBAAA,CAAAC,OAAA;AAAyD,SAAAD,uBAAAI,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAEzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACe,SAAAG,SAAUC,KAAK,EAAG;EAChC,MAAMC,OAAO,GAAG,IAAAC,2BAAU,EAAEF,KAAK,CAACG,OAAO,CAAC,CAAE,CAAC;EAC7C;AACD;AACA;AACA;EACC,MAAMC,eAAe,GAAGJ,KAAK,CAACK,YAAY,CAAC,CAAC;EAE5C,MAAMC,SAAS,GAAG;IACjBC,KAAK,EAAEN,OAAO,CAACO,MAAM;IACrBC,aAAa,EAAE,CAAC;IAChBC,gBAAgB,EAAE,CAAC;IACnBC,gBAAgB,EAAE,CAAC;IACnBC,aAAa,EAAE,CAAC;IAChBC,gBAAgB,EAAE,CAAC;IACnBC,gBAAgB,EAAE,CAAC;IACnBC,UAAU,EAAE,CAAC;IACbC,aAAa,EAAE,CAAC;IAChBC,aAAa,EAAE;EAChB,CAAC;EAED,KAAM,IAAIC,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAGjB,OAAO,CAACO,MAAM,EAAEU,CAAC,EAAE,EAAG;IAC1C,MAAMC,aAAa,GAAGlB,OAAO,CAAEiB,CAAC,CAAE;IAElC,MAAME,QAAQ,GAAG,IAAAC,oBAAW,EAAEF,aAAa,EAAEf,eAAgB,CAAC;IAC9D,MAAMkB,UAAU,GAAG,IAAAC,sBAAa,EAAEJ,aAAc,CAAC;IAEjDb,SAAS,CAAEc,QAAQ,GAAG,OAAO,CAAE,EAAE;IACjCd,SAAS,CAAEc,QAAQ,GAAGE,UAAU,CAAE,EAAE;EACrC;EAEA,OAAOhB,SAAS;AACjB","ignoreList":[]}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = _default;
|
|
7
|
+
var _getAnchorsFromText = _interopRequireDefault(require("../helpers/link/getAnchorsFromText.js"));
|
|
8
|
+
var _lodash = require("lodash");
|
|
9
|
+
var _url = _interopRequireDefault(require("../helpers/url/url.js"));
|
|
10
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
11
|
+
/** @module analyses/getLinkStatistics */
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Checks a text for anchors and returns the number found.
|
|
15
|
+
*
|
|
16
|
+
* @param {Object} paper The paper to get the text from.
|
|
17
|
+
* @returns {Array} An array with the anchors
|
|
18
|
+
*/
|
|
19
|
+
function _default(paper) {
|
|
20
|
+
const anchors = (0, _getAnchorsFromText.default)(paper.getText());
|
|
21
|
+
return (0, _lodash.map)(anchors, _url.default.getFromAnchorTag);
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=getLinks.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getLinks.js","names":["_getAnchorsFromText","_interopRequireDefault","require","_lodash","_url","e","__esModule","default","_default","paper","anchors","getAnchors","getText","map","url","getFromAnchorTag"],"sources":["../../../src/languageProcessing/researches/getLinks.js"],"sourcesContent":["/** @module analyses/getLinkStatistics */\n\nimport getAnchors from \"../helpers/link/getAnchorsFromText.js\";\n\nimport { map } from \"lodash\";\nimport url from \"../helpers/url/url.js\";\n\n/**\n * Checks a text for anchors and returns the number found.\n *\n * @param {Object} paper The paper to get the text from.\n * @returns {Array} An array with the anchors\n */\nexport default function( paper ) {\n\tconst anchors = getAnchors( paper.getText() );\n\n\treturn map( anchors, url.getFromAnchorTag );\n}\n"],"mappings":";;;;;;AAEA,IAAAA,mBAAA,GAAAC,sBAAA,CAAAC,OAAA;AAEA,IAAAC,OAAA,GAAAD,OAAA;AACA,IAAAE,IAAA,GAAAH,sBAAA,CAAAC,OAAA;AAAwC,SAAAD,uBAAAI,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AALxC;;AAOA;AACA;AACA;AACA;AACA;AACA;AACe,SAAAG,SAAUC,KAAK,EAAG;EAChC,MAAMC,OAAO,GAAG,IAAAC,2BAAU,EAAEF,KAAK,CAACG,OAAO,CAAC,CAAE,CAAC;EAE7C,OAAO,IAAAC,WAAG,EAAEH,OAAO,EAAEI,YAAG,CAACC,gBAAiB,CAAC;AAC5C","ignoreList":[]}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = _default;
|
|
7
|
+
/**
|
|
8
|
+
* The maximum allowed length of a center-aligned paragraph or heading in characters.
|
|
9
|
+
* @type {number}
|
|
10
|
+
*/
|
|
11
|
+
const MAX_CENTER_ALIGNED_LENGTH = 50;
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* A regular expression to match heading tags.
|
|
15
|
+
* @type {RegExp}
|
|
16
|
+
*/
|
|
17
|
+
const HEADING_TAGS_REGEX = /^h[1-6]$/;
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Filters out all nodes that are center-aligned and longer than 50 characters (as defined in `MAX_CENTER_ALIGNED_LENGTH`).
|
|
21
|
+
* @param {Node[]} nodes An array of nodes.
|
|
22
|
+
* @returns {Node[]} An array containing all center-aligned nodes that are longer than 50 characters.
|
|
23
|
+
*/
|
|
24
|
+
function getLongCenterAlignedElements(nodes) {
|
|
25
|
+
return nodes.filter(node => {
|
|
26
|
+
const isCenterAligned = node.attributes.class instanceof Set && node.attributes.class.has("has-text-align-center");
|
|
27
|
+
return isCenterAligned && node.innerText().length > MAX_CENTER_ALIGNED_LENGTH;
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Finds all paragraphs and headings that are center-aligned and longer than 50 characters (after stripping HTML tags).
|
|
33
|
+
* @param {Paper} paper The paper to analyze.
|
|
34
|
+
* @returns {Node[]} An array of nodes containing too long center-aligned paragraphs/headings.
|
|
35
|
+
*/
|
|
36
|
+
function _default(paper) {
|
|
37
|
+
const tree = paper.getTree();
|
|
38
|
+
const paragraphs = tree.findAll(node => node.name === "p");
|
|
39
|
+
const headings = tree.findAll(node => HEADING_TAGS_REGEX.test(node.name));
|
|
40
|
+
return getLongCenterAlignedElements(paragraphs.concat(headings));
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=getLongCenterAlignedTexts.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getLongCenterAlignedTexts.js","names":["MAX_CENTER_ALIGNED_LENGTH","HEADING_TAGS_REGEX","getLongCenterAlignedElements","nodes","filter","node","isCenterAligned","attributes","class","Set","has","innerText","length","_default","paper","tree","getTree","paragraphs","findAll","name","headings","test","concat"],"sources":["../../../src/languageProcessing/researches/getLongCenterAlignedTexts.js"],"sourcesContent":["/**\n * The maximum allowed length of a center-aligned paragraph or heading in characters.\n * @type {number}\n */\nconst MAX_CENTER_ALIGNED_LENGTH = 50;\n\n/**\n * A regular expression to match heading tags.\n * @type {RegExp}\n */\nconst HEADING_TAGS_REGEX = /^h[1-6]$/;\n\n/**\n * Filters out all nodes that are center-aligned and longer than 50 characters (as defined in `MAX_CENTER_ALIGNED_LENGTH`).\n * @param {Node[]} nodes An array of nodes.\n * @returns {Node[]} An array containing all center-aligned nodes that are longer than 50 characters.\n */\nfunction getLongCenterAlignedElements( nodes ) {\n\treturn nodes.filter( node => {\n\t\tconst isCenterAligned = node.attributes.class instanceof Set && node.attributes.class.has( \"has-text-align-center\" );\n\t\treturn isCenterAligned && node.innerText().length > MAX_CENTER_ALIGNED_LENGTH;\n\t} );\n}\n\n/**\n * Finds all paragraphs and headings that are center-aligned and longer than 50 characters (after stripping HTML tags).\n * @param {Paper} paper The paper to analyze.\n * @returns {Node[]} An array of nodes containing too long center-aligned paragraphs/headings.\n */\nexport default function( paper ) {\n\tconst tree = paper.getTree();\n\n\tconst paragraphs = tree.findAll( node => node.name === \"p\" );\n\tconst headings = tree.findAll( node => HEADING_TAGS_REGEX.test( node.name ) );\n\n\treturn getLongCenterAlignedElements( paragraphs.concat( headings ) );\n}\n"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA,MAAMA,yBAAyB,GAAG,EAAE;;AAEpC;AACA;AACA;AACA;AACA,MAAMC,kBAAkB,GAAG,UAAU;;AAErC;AACA;AACA;AACA;AACA;AACA,SAASC,4BAA4BA,CAAEC,KAAK,EAAG;EAC9C,OAAOA,KAAK,CAACC,MAAM,CAAEC,IAAI,IAAI;IAC5B,MAAMC,eAAe,GAAGD,IAAI,CAACE,UAAU,CAACC,KAAK,YAAYC,GAAG,IAAIJ,IAAI,CAACE,UAAU,CAACC,KAAK,CAACE,GAAG,CAAE,uBAAwB,CAAC;IACpH,OAAOJ,eAAe,IAAID,IAAI,CAACM,SAAS,CAAC,CAAC,CAACC,MAAM,GAAGZ,yBAAyB;EAC9E,CAAE,CAAC;AACJ;;AAEA;AACA;AACA;AACA;AACA;AACe,SAAAa,SAAUC,KAAK,EAAG;EAChC,MAAMC,IAAI,GAAGD,KAAK,CAACE,OAAO,CAAC,CAAC;EAE5B,MAAMC,UAAU,GAAGF,IAAI,CAACG,OAAO,CAAEb,IAAI,IAAIA,IAAI,CAACc,IAAI,KAAK,GAAI,CAAC;EAC5D,MAAMC,QAAQ,GAAGL,IAAI,CAACG,OAAO,CAAEb,IAAI,IAAIJ,kBAAkB,CAACoB,IAAI,CAAEhB,IAAI,CAACc,IAAK,CAAE,CAAC;EAE7E,OAAOjB,4BAA4B,CAAEe,UAAU,CAACK,MAAM,CAAEF,QAAS,CAAE,CAAC;AACrE","ignoreList":[]}
|