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,257 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _lodash = require("lodash");
|
|
8
|
+
var _matchTextWithWord = _interopRequireDefault(require("../helpers/match/matchTextWithWord.js"));
|
|
9
|
+
var _findKeywordFormsInString = require("../helpers/match/findKeywordFormsInString.js");
|
|
10
|
+
var _stemPrefixedFunctionWords = require("../helpers/morphology/stemPrefixedFunctionWords.js");
|
|
11
|
+
var _processExactMatchRequest = _interopRequireDefault(require("../helpers/match/processExactMatchRequest"));
|
|
12
|
+
var _getWords = _interopRequireDefault(require("../helpers/word/getWords"));
|
|
13
|
+
var _wordBoundariesWithoutPunctuation = require("../../config/wordBoundariesWithoutPunctuation");
|
|
14
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
15
|
+
let functionWords = [];
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Strips all function words from the start of the given string.
|
|
19
|
+
*
|
|
20
|
+
* @param {string} str The string from which to strip the function words.
|
|
21
|
+
*
|
|
22
|
+
* @returns {boolean} Whether the string consists of function words only.
|
|
23
|
+
*/
|
|
24
|
+
const stripFunctionWordsFromStart = function (str) {
|
|
25
|
+
str = str.toLocaleLowerCase();
|
|
26
|
+
|
|
27
|
+
/*
|
|
28
|
+
* We use a word boundary regex that includes whitespaces, en-dashes, and hyphens for all languages.
|
|
29
|
+
* This means that when we filter out function words from the beginning of the title, we also filter out words
|
|
30
|
+
* separated by hyphens (e.g. 'three-piece'), as well as function words attached to a content word with a hyphen
|
|
31
|
+
* (e.g. 'after' in 'after-school).
|
|
32
|
+
* In Indonesian we normally don't want to treat hyphens as word boundaries, but in this case it makes sense because
|
|
33
|
+
* an Indonesian title can also contain function words seperated by hyphens at the beginning of the title (e.g. 'dua'
|
|
34
|
+
* and 'lima' in 'dua-lima ribuan').
|
|
35
|
+
* As a downside, single function words containing hyphens (e.g. 'vis-à-vis') won't be filtered out, but we are solving this
|
|
36
|
+
* by adding each word from such function words as separate entries in the function words lists.
|
|
37
|
+
*/
|
|
38
|
+
let titleWords = (0, _getWords.default)(str.toLocaleLowerCase(), _wordBoundariesWithoutPunctuation.WORD_BOUNDARY_WITH_HYPHEN);
|
|
39
|
+
|
|
40
|
+
// Strip all function words from the start of the string.
|
|
41
|
+
titleWords = (0, _lodash.filter)(titleWords, function (word) {
|
|
42
|
+
return !(0, _lodash.includes)(functionWords, word.trim().toLocaleLowerCase());
|
|
43
|
+
});
|
|
44
|
+
return (0, _lodash.isEmpty)(titleWords);
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Checks the position of the keyphrase in the SEO title.
|
|
49
|
+
*
|
|
50
|
+
* @param {string} title The SEO title of the paper.
|
|
51
|
+
* @param {number} position The position of the keyphrase in the SEO title.
|
|
52
|
+
*
|
|
53
|
+
* @returns {number} Potentially adjusted position of the keyphrase in the SEO title.
|
|
54
|
+
*/
|
|
55
|
+
const adjustPosition = function (title, position) {
|
|
56
|
+
// Don't do anything if position is already 0.
|
|
57
|
+
if (position === 0) {
|
|
58
|
+
return position;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
// Don't do anything if no function words exist for this language.
|
|
62
|
+
if (functionWords.length === 0) {
|
|
63
|
+
return position;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
// Strip all function words from the beginning of the SEO title.
|
|
67
|
+
const titleBeforeKeyword = title.substring(0, position);
|
|
68
|
+
if (stripFunctionWordsFromStart(titleBeforeKeyword)) {
|
|
69
|
+
/*
|
|
70
|
+
* Return position 0 if there are no words left in the SEO title before the keyword after filtering
|
|
71
|
+
* the function words (such that "keyword" in "the keyword" is still counted as position 0).
|
|
72
|
+
*/
|
|
73
|
+
return 0;
|
|
74
|
+
}
|
|
75
|
+
return position;
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* Creates a cartesian product of the given arrays.
|
|
80
|
+
* This function is taken from: https://stackoverflow.com/questions/12303989/cartesian-product-of-multiple-arrays-in-javascript
|
|
81
|
+
*
|
|
82
|
+
* @param {array} arrays The arrays to create the cartesian product of.
|
|
83
|
+
*
|
|
84
|
+
* @returns {array} The cartesian product of the given arrays.
|
|
85
|
+
*/
|
|
86
|
+
function cartesian(...arrays) {
|
|
87
|
+
return arrays.reduce((a, b) => a.flatMap(d => b.map(e => [d, e].flat())));
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* Finds the exact match of the keyphrase in the SEO title for languages that have prefixed function words.
|
|
92
|
+
*
|
|
93
|
+
* @param {object} matchesObject The object that contains an array of matched words of the keyphrase in SEO title and the position of the match.
|
|
94
|
+
* @param {string} keyphrase The keyphrase to find in the SEO title.
|
|
95
|
+
* @param {object} result The result object to store the results in.
|
|
96
|
+
* @param {RegExp} prefixedFunctionWordsRegex The function to stem the prefixed function words.
|
|
97
|
+
* @param {string} title The SEO title of the paper.
|
|
98
|
+
* @param {string} locale The locale of the paper.
|
|
99
|
+
*
|
|
100
|
+
* @returns {object} The new result object containing the results of the analysis.
|
|
101
|
+
*/
|
|
102
|
+
function findExactMatch(matchesObject, keyphrase, result, prefixedFunctionWordsRegex, title, locale) {
|
|
103
|
+
let matchedPrefixedFunctionWords = [];
|
|
104
|
+
/*
|
|
105
|
+
For each matched word of the keyphrase, get the prefixed function word.
|
|
106
|
+
For example, for the matches array [ "القطط" ,"والوسيمة" ], the `matchedPrefixedFunctionWords` array will be [ "ال", "وال" ].
|
|
107
|
+
*/
|
|
108
|
+
matchesObject.matches.forEach(match => {
|
|
109
|
+
const {
|
|
110
|
+
prefix: prefixedFunctionWord
|
|
111
|
+
} = (0, _stemPrefixedFunctionWords.stemPrefixedFunctionWords)(match, prefixedFunctionWordsRegex);
|
|
112
|
+
matchedPrefixedFunctionWords.push(prefixedFunctionWord);
|
|
113
|
+
});
|
|
114
|
+
|
|
115
|
+
// Split the keyphrase into words. For example, the keyphrase "قطط وسيمة" will be split into [ قطط", "وسيمة" ].
|
|
116
|
+
const splitKeyphrase = keyphrase.split(" ");
|
|
117
|
+
let keyphraseVariations = [];
|
|
118
|
+
|
|
119
|
+
// Add an empty string to the array to account for the case where the word is not prefixed, remove duplicates.
|
|
120
|
+
matchedPrefixedFunctionWords = (0, _lodash.uniq)(matchedPrefixedFunctionWords.concat([""]));
|
|
121
|
+
/*
|
|
122
|
+
Create an array of arrays, where each array contains each word of the keyphrase with function word prefixes attached.
|
|
123
|
+
For example, when the split keyphrase is [ "قطط", "وسيمة" ] and the matchedPrefixedFunctionWords is [ "ال", "وال", "" ],
|
|
124
|
+
the array would be: [ [ "والقطط","القطط", "قطط" ], [ "والوسيمة" ,"الوسيمة", "وسيمة" ] ].
|
|
125
|
+
*/
|
|
126
|
+
const arrays = [];
|
|
127
|
+
splitKeyphrase.forEach(word => {
|
|
128
|
+
arrays.push(matchedPrefixedFunctionWords.map(prefixedFunctionWord => prefixedFunctionWord + word));
|
|
129
|
+
});
|
|
130
|
+
/*
|
|
131
|
+
Create the cartesian product of the created arrays: to create all possible combinations of the previously created arrays.
|
|
132
|
+
For example, the cartesian product of [ [ "والقطط","القطط", "قطط" ], [ "والوسيمة" ,"الوسيمة", "وسيمة" ] ] will be:
|
|
133
|
+
...[ [ "والقطط", "والوسيمة" ], [ "والقطط", "الوسيمة" ], [ "والقطط", "وسيمة" ], [ "القطط", "والوسيمة" ]]
|
|
134
|
+
*/
|
|
135
|
+
keyphraseVariations = cartesian(...arrays);
|
|
136
|
+
// Turn the keyphrase combination array into strings. For example, [ "والقطط", "والوسيمة" ] will be turned into "والقطط والوسيمة".
|
|
137
|
+
keyphraseVariations = keyphraseVariations.map(variation => Array.isArray(variation) ? variation.join(" ") : variation);
|
|
138
|
+
keyphraseVariations.forEach(variation => {
|
|
139
|
+
// Check if the exact match of the keyphrase combination is found in the SEO title.
|
|
140
|
+
const foundMatch = (0, _matchTextWithWord.default)(title, variation, locale, false);
|
|
141
|
+
if (foundMatch.count > 0) {
|
|
142
|
+
result.exactMatchFound = true;
|
|
143
|
+
// Adjust the position of the matched keyphrase if it's preceded by non-prefixed function words.
|
|
144
|
+
result.position = adjustPosition(title, foundMatch.position);
|
|
145
|
+
}
|
|
146
|
+
});
|
|
147
|
+
/*
|
|
148
|
+
This check if to account for the case where an exact match of the keyphrase is not found in the SEO title,
|
|
149
|
+
but it's found in the position is 0.
|
|
150
|
+
*/
|
|
151
|
+
if (matchesObject.position === 0) {
|
|
152
|
+
result.position = 0;
|
|
153
|
+
}
|
|
154
|
+
return result;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
/**
|
|
158
|
+
* An object containing the results of the keyphrase in SEO title research.
|
|
159
|
+
*
|
|
160
|
+
* @typedef {Object} KeyphraseInSEOTitleResult
|
|
161
|
+
* @property {boolean} exactMatchFound Whether the exact match of the keyphrase was found in the SEO title.
|
|
162
|
+
* @property {boolean} allWordsFound Whether all content words from the keyphrase were found in the SEO title.
|
|
163
|
+
* @property {number} position The position of the keyphrase in the SEO title.
|
|
164
|
+
* @property {boolean} exactMatchKeyphrase Whether the exact match was requested.
|
|
165
|
+
*/
|
|
166
|
+
|
|
167
|
+
/**
|
|
168
|
+
* Checks if all content words from the keyphrase are found in the SEO title.
|
|
169
|
+
*
|
|
170
|
+
* @param {Paper} paper The Paper object that contains analysis data.
|
|
171
|
+
* @param {Researcher} researcher The language researcher.
|
|
172
|
+
* @param {string} keyword The keyword to find in the SEO title.
|
|
173
|
+
* @param {object} result The result object to store the results in.
|
|
174
|
+
* @param {RegExp} prefixedFunctionWordsRegex The researcher to use for analysis.
|
|
175
|
+
* @returns {object} The new result object containing the results of the analysis.
|
|
176
|
+
*/
|
|
177
|
+
function checkIfAllWordsAreFound(paper, researcher, keyword, result, prefixedFunctionWordsRegex) {
|
|
178
|
+
const title = paper.getTitle();
|
|
179
|
+
const locale = paper.getLocale();
|
|
180
|
+
const topicForms = researcher.getResearch("morphology");
|
|
181
|
+
|
|
182
|
+
// Use only keyphrase (not the synonyms) to match topic words in the SEO title.
|
|
183
|
+
const useSynonyms = false;
|
|
184
|
+
const separateWordsMatched = (0, _findKeywordFormsInString.findTopicFormsInString)(topicForms, title, useSynonyms, locale, false);
|
|
185
|
+
if (separateWordsMatched.percentWordMatches === 100) {
|
|
186
|
+
/*
|
|
187
|
+
If all words are found and the position of the found words is 0, we further check if the exact match is found
|
|
188
|
+
for languages with a helper to stem prefixed function words, e.g. definite article.
|
|
189
|
+
Our support for this type of language is currently only for Arabic and Hebrew.
|
|
190
|
+
For example, in Arabic, the word "المنزل" (the house) is written as "ال" (the) + "منزل" (house).
|
|
191
|
+
And in Hebrew, the word "הבית" (the house) is written as "ה" (the) + "בית" (house).
|
|
192
|
+
In the above case, when the keyphrase is "منزل", and the SEO title starts with "المنزل" in Arabic,
|
|
193
|
+
or when the keyphrase is "בית" and the SEO title is "הבית", we want to consider this as an exact match
|
|
194
|
+
and the position is 0 if it's found in the beginning of the SEO title.
|
|
195
|
+
This treatment is to align with the way we match the keyphrase in SEO title for other languages.
|
|
196
|
+
For example, in English, the keyphrase "house" is considered to be found in the SEO title "the house" at position 0.
|
|
197
|
+
*/
|
|
198
|
+
if (prefixedFunctionWordsRegex) {
|
|
199
|
+
const {
|
|
200
|
+
exactMatchFound,
|
|
201
|
+
position
|
|
202
|
+
} = findExactMatch(separateWordsMatched, keyword, result, prefixedFunctionWordsRegex, title, locale);
|
|
203
|
+
result = {
|
|
204
|
+
...result,
|
|
205
|
+
exactMatchFound: exactMatchFound,
|
|
206
|
+
position: position
|
|
207
|
+
};
|
|
208
|
+
}
|
|
209
|
+
result.allWordsFound = true;
|
|
210
|
+
}
|
|
211
|
+
return result;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
/**
|
|
215
|
+
* Counts the occurrences of the keyword in the SEO title. Returns the result that contains information on
|
|
216
|
+
* (1) whether the exact match of the keyphrase was used in the SEO title,
|
|
217
|
+
* (2) whether all (content) words from the keyphrase were found in the SEO title,
|
|
218
|
+
* (3) at which position the exact match was found in the SEO title.
|
|
219
|
+
*
|
|
220
|
+
* @param {Object} paper The paper containing SEO title and keyword.
|
|
221
|
+
* @param {Researcher} researcher The researcher to use for analysis.
|
|
222
|
+
*
|
|
223
|
+
* @returns {KeyphraseInSEOTitleResult} An object containing the information on whether the keyphrase was matched in the SEO title and how.
|
|
224
|
+
*/
|
|
225
|
+
const findKeyphraseInSEOTitle = function (paper, researcher) {
|
|
226
|
+
functionWords = researcher.getConfig("functionWords");
|
|
227
|
+
let keyword = (0, _lodash.escapeRegExp)(paper.getKeyword());
|
|
228
|
+
const title = paper.getTitle();
|
|
229
|
+
const locale = paper.getLocale();
|
|
230
|
+
let result = {
|
|
231
|
+
exactMatchFound: false,
|
|
232
|
+
allWordsFound: false,
|
|
233
|
+
position: -1,
|
|
234
|
+
exactMatchKeyphrase: false
|
|
235
|
+
};
|
|
236
|
+
|
|
237
|
+
// Check if the keyphrase is enclosed in double quotation marks to ensure that only exact matches are processed.
|
|
238
|
+
const exactMatchRequest = (0, _processExactMatchRequest.default)(keyword);
|
|
239
|
+
if (exactMatchRequest.exactMatchRequested) {
|
|
240
|
+
keyword = exactMatchRequest.keyphrase;
|
|
241
|
+
result.exactMatchKeyphrase = true;
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
// Check if the exact match of the keyphrase is found in the SEO title.
|
|
245
|
+
const prefixedFunctionWordsRegex = researcher.getConfig("prefixedFunctionWordsRegex");
|
|
246
|
+
const keywordMatched = (0, _matchTextWithWord.default)(title, keyword, locale, false);
|
|
247
|
+
if (keywordMatched.count > 0 && !prefixedFunctionWordsRegex) {
|
|
248
|
+
result.exactMatchFound = true;
|
|
249
|
+
result.allWordsFound = true;
|
|
250
|
+
result.position = adjustPosition(title, keywordMatched.position);
|
|
251
|
+
return result;
|
|
252
|
+
}
|
|
253
|
+
result = checkIfAllWordsAreFound(paper, researcher, keyword, result, prefixedFunctionWordsRegex);
|
|
254
|
+
return result;
|
|
255
|
+
};
|
|
256
|
+
var _default = exports.default = findKeyphraseInSEOTitle;
|
|
257
|
+
//# sourceMappingURL=findKeyphraseInSEOTitle.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"findKeyphraseInSEOTitle.js","names":["_lodash","require","_matchTextWithWord","_interopRequireDefault","_findKeywordFormsInString","_stemPrefixedFunctionWords","_processExactMatchRequest","_getWords","_wordBoundariesWithoutPunctuation","e","__esModule","default","functionWords","stripFunctionWordsFromStart","str","toLocaleLowerCase","titleWords","getWords","WORD_BOUNDARY_WITH_HYPHEN","filter","word","includes","trim","isEmpty","adjustPosition","title","position","length","titleBeforeKeyword","substring","cartesian","arrays","reduce","a","b","flatMap","d","map","flat","findExactMatch","matchesObject","keyphrase","result","prefixedFunctionWordsRegex","locale","matchedPrefixedFunctionWords","matches","forEach","match","prefix","prefixedFunctionWord","stemPrefixedFunctionWords","push","splitKeyphrase","split","keyphraseVariations","uniq","concat","variation","Array","isArray","join","foundMatch","wordMatch","count","exactMatchFound","checkIfAllWordsAreFound","paper","researcher","keyword","getTitle","getLocale","topicForms","getResearch","useSynonyms","separateWordsMatched","findTopicFormsInString","percentWordMatches","allWordsFound","findKeyphraseInSEOTitle","getConfig","escapeRegExp","getKeyword","exactMatchKeyphrase","exactMatchRequest","processExactMatchRequest","exactMatchRequested","keywordMatched","_default","exports"],"sources":["../../../src/languageProcessing/researches/findKeyphraseInSEOTitle.js"],"sourcesContent":["import { escapeRegExp, filter, includes, isEmpty, uniq } from \"lodash\";\n\nimport wordMatch from \"../helpers/match/matchTextWithWord.js\";\nimport { findTopicFormsInString } from \"../helpers/match/findKeywordFormsInString.js\";\nimport { stemPrefixedFunctionWords } from \"../helpers/morphology/stemPrefixedFunctionWords.js\";\n\nimport processExactMatchRequest from \"../helpers/match/processExactMatchRequest\";\nimport getWords from \"../helpers/word/getWords\";\nimport { WORD_BOUNDARY_WITH_HYPHEN } from \"../../config/wordBoundariesWithoutPunctuation\";\n\nlet functionWords = [];\n\n/**\n * Strips all function words from the start of the given string.\n *\n * @param {string} str The string from which to strip the function words.\n *\n * @returns {boolean} Whether the string consists of function words only.\n */\nconst stripFunctionWordsFromStart = function( str ) {\n\tstr = str.toLocaleLowerCase();\n\n\t/*\n \t * We use a word boundary regex that includes whitespaces, en-dashes, and hyphens for all languages.\n \t * This means that when we filter out function words from the beginning of the title, we also filter out words\n \t * separated by hyphens (e.g. 'three-piece'), as well as function words attached to a content word with a hyphen\n \t * (e.g. 'after' in 'after-school).\n \t * In Indonesian we normally don't want to treat hyphens as word boundaries, but in this case it makes sense because\n \t * an Indonesian title can also contain function words seperated by hyphens at the beginning of the title (e.g. 'dua'\n \t * and 'lima' in 'dua-lima ribuan').\n \t * As a downside, single function words containing hyphens (e.g. 'vis-à-vis') won't be filtered out, but we are solving this\n \t * by adding each word from such function words as separate entries in the function words lists.\n \t */\n\tlet titleWords = getWords( str.toLocaleLowerCase(), WORD_BOUNDARY_WITH_HYPHEN );\n\n\t// Strip all function words from the start of the string.\n\ttitleWords = filter( titleWords, function( word ) {\n\t\treturn ( ! includes( functionWords, word.trim().toLocaleLowerCase() ) );\n\t} );\n\n\treturn isEmpty( titleWords );\n};\n\n/**\n * Checks the position of the keyphrase in the SEO title.\n *\n * @param {string} title \t\tThe SEO title of the paper.\n * @param {number} position \tThe position of the keyphrase in the SEO title.\n *\n * @returns {number} Potentially adjusted position of the keyphrase in the SEO title.\n */\nconst adjustPosition = function( title, position ) {\n\t// Don't do anything if position is already 0.\n\tif ( position === 0 ) {\n\t\treturn position;\n\t}\n\n\t// Don't do anything if no function words exist for this language.\n\tif ( functionWords.length === 0 ) {\n\t\treturn position;\n\t}\n\n\t// Strip all function words from the beginning of the SEO title.\n\tconst titleBeforeKeyword = title.substring( 0, position );\n\tif ( stripFunctionWordsFromStart( titleBeforeKeyword ) ) {\n\t\t/*\n\t\t * Return position 0 if there are no words left in the SEO title before the keyword after filtering\n\t\t * the function words (such that \"keyword\" in \"the keyword\" is still counted as position 0).\n \t\t */\n\t\treturn 0;\n\t}\n\n\treturn position;\n};\n\n/**\n * Creates a cartesian product of the given arrays.\n * This function is taken from: https://stackoverflow.com/questions/12303989/cartesian-product-of-multiple-arrays-in-javascript\n *\n * @param {array} arrays The arrays to create the cartesian product of.\n *\n * @returns {array} The cartesian product of the given arrays.\n */\nfunction cartesian( ...arrays ) {\n\treturn arrays.reduce( ( a, b ) => a.flatMap( d => b.map( e => [ d, e ].flat() ) ) );\n}\n\n/**\n * Finds the exact match of the keyphrase in the SEO title for languages that have prefixed function words.\n *\n * @param {object} matchesObject The object that contains an array of matched words of the keyphrase in SEO title and the position of the match.\n * @param {string} keyphrase The keyphrase to find in the SEO title.\n * @param {object} result The result object to store the results in.\n * @param {RegExp} prefixedFunctionWordsRegex The function to stem the prefixed function words.\n * @param {string} title The SEO title of the paper.\n * @param {string} locale The locale of the paper.\n *\n * @returns {object} The new result object containing the results of the analysis.\n */\nfunction findExactMatch( matchesObject, keyphrase, result, prefixedFunctionWordsRegex, title, locale ) {\n\tlet matchedPrefixedFunctionWords = [];\n\t/*\n\tFor each matched word of the keyphrase, get the prefixed function word.\n\tFor example, for the matches array [ \"القطط\" ,\"والوسيمة\" ], the `matchedPrefixedFunctionWords` array will be [ \"ال\", \"وال\" ].\n\t */\n\tmatchesObject.matches.forEach( match => {\n\t\tconst { prefix: prefixedFunctionWord } = stemPrefixedFunctionWords( match, prefixedFunctionWordsRegex );\n\t\tmatchedPrefixedFunctionWords.push( prefixedFunctionWord );\n\t} );\n\n\t// Split the keyphrase into words. For example, the keyphrase \"قطط وسيمة\" will be split into [ قطط\", \"وسيمة\" ].\n\tconst splitKeyphrase = keyphrase.split( \" \" );\n\tlet keyphraseVariations = [];\n\n\t// Add an empty string to the array to account for the case where the word is not prefixed, remove duplicates.\n\tmatchedPrefixedFunctionWords = uniq( matchedPrefixedFunctionWords.concat( [ \"\" ] ) );\n\t/*\n\t Create an array of arrays, where each array contains each word of the keyphrase with function word prefixes attached.\n\t For example, when the split keyphrase is [ \"قطط\", \"وسيمة\" ] and the matchedPrefixedFunctionWords is [ \"ال\", \"وال\", \"\" ],\n\t the array would be: [ [ \"والقطط\",\"القطط\", \"قطط\" ], [ \"والوسيمة\" ,\"الوسيمة\", \"وسيمة\" ] ].\n\t */\n\tconst arrays = [];\n\tsplitKeyphrase.forEach( word => {\n\t\tarrays.push( matchedPrefixedFunctionWords.map( prefixedFunctionWord => prefixedFunctionWord + word ) );\n\t} );\n\t/*\n\tCreate the cartesian product of the created arrays: to create all possible combinations of the previously created arrays.\n\tFor example, the cartesian product of [ [ \"والقطط\",\"القطط\", \"قطط\" ], [ \"والوسيمة\" ,\"الوسيمة\", \"وسيمة\" ] ] will be:\n\t...[ [ \"والقطط\", \"والوسيمة\" ], [ \"والقطط\", \"الوسيمة\" ], [ \"والقطط\", \"وسيمة\" ], [ \"القطط\", \"والوسيمة\" ]]\n\t */\n\tkeyphraseVariations = cartesian( ...arrays );\n\t// Turn the keyphrase combination array into strings. For example, [ \"والقطط\", \"والوسيمة\" ] will be turned into \"والقطط والوسيمة\".\n\tkeyphraseVariations = keyphraseVariations.map( variation => Array.isArray( variation ) ? variation.join( \" \" ) : variation );\n\tkeyphraseVariations.forEach( variation => {\n\t\t// Check if the exact match of the keyphrase combination is found in the SEO title.\n\t\tconst foundMatch = wordMatch( title, variation, locale, false );\n\t\tif ( foundMatch.count > 0 ) {\n\t\t\tresult.exactMatchFound = true;\n\t\t\t// Adjust the position of the matched keyphrase if it's preceded by non-prefixed function words.\n\t\t\tresult.position = adjustPosition( title, foundMatch.position );\n\t\t}\n\t} );\n\t/*\n\tThis check if to account for the case where an exact match of the keyphrase is not found in the SEO title,\n\tbut it's found in the position is 0.\n\t */\n\tif ( matchesObject.position === 0 ) {\n\t\tresult.position = 0;\n\t}\n\treturn result;\n}\n\n/**\n * An object containing the results of the keyphrase in SEO title research.\n *\n * @typedef {Object} \tKeyphraseInSEOTitleResult\n * @property {boolean}\texactMatchFound\tWhether the exact match of the keyphrase was found in the SEO title.\n * @property {boolean}\tallWordsFound\tWhether all content words from the keyphrase were found in the SEO title.\n * @property {number}\tposition The position of the keyphrase in the SEO title.\n * @property {boolean}\texactMatchKeyphrase Whether the exact match was requested.\n */\n\n/**\n * Checks if all content words from the keyphrase are found in the SEO title.\n *\n * @param {Paper} paper The Paper object that contains analysis data.\n * @param {Researcher} researcher The language researcher.\n * @param {string} keyword The keyword to find in the SEO title.\n * @param {object} result The result object to store the results in.\n * @param {RegExp} prefixedFunctionWordsRegex The researcher to use for analysis.\n * @returns {object} The new result object containing the results of the analysis.\n */\nfunction checkIfAllWordsAreFound( paper, researcher, keyword, result, prefixedFunctionWordsRegex ) {\n\tconst title = paper.getTitle();\n\tconst locale = paper.getLocale();\n\tconst topicForms = researcher.getResearch( \"morphology\" );\n\n\t// Use only keyphrase (not the synonyms) to match topic words in the SEO title.\n\tconst useSynonyms = false;\n\n\tconst separateWordsMatched = findTopicFormsInString( topicForms, title, useSynonyms, locale, false );\n\n\tif ( separateWordsMatched.percentWordMatches === 100 ) {\n\t\t/*\n\t\tIf all words are found and the position of the found words is 0, we further check if the exact match is found\n\t\tfor languages with a helper to stem prefixed function words, e.g. definite article.\n\t\tOur support for this type of language is currently only for Arabic and Hebrew.\n\t\tFor example, in Arabic, the word \"المنزل\" (the house) is written as \"ال\" (the) + \"منزل\" (house).\n\t\tAnd in Hebrew, the word \"הבית\" (the house) is written as \"ה\" (the) + \"בית\" (house).\n\t\tIn the above case, when the keyphrase is \"منزل\", and the SEO title starts with \"المنزل\" in Arabic,\n\t\tor when the keyphrase is \"בית\" and the SEO title is \"הבית\", we want to consider this as an exact match\n\t\tand the position is 0 if it's found in the beginning of the SEO title.\n\t\tThis treatment is to align with the way we match the keyphrase in SEO title for other languages.\n\t\tFor example, in English, the keyphrase \"house\" is considered to be found in the SEO title \"the house\" at position 0.\n\t\t */\n\t\tif ( prefixedFunctionWordsRegex ) {\n\t\t\tconst {\n\t\t\t\texactMatchFound,\n\t\t\t\tposition,\n\t\t\t} = findExactMatch( separateWordsMatched, keyword, result, prefixedFunctionWordsRegex, title, locale );\n\t\t\tresult = {\n\t\t\t\t...result,\n\t\t\t\texactMatchFound: exactMatchFound,\n\t\t\t\tposition: position,\n\t\t\t};\n\t\t}\n\t\tresult.allWordsFound = true;\n\t}\n\treturn result;\n}\n\n/**\n * Counts the occurrences of the keyword in the SEO title. Returns the result that contains information on\n * (1) whether the exact match of the keyphrase was used in the SEO title,\n * (2) whether all (content) words from the keyphrase were found in the SEO title,\n * (3) at which position the exact match was found in the SEO title.\n *\n * @param {Object} paper \t\t\tThe paper containing SEO title and keyword.\n * @param {Researcher} researcher \tThe researcher to use for analysis.\n *\n * @returns {KeyphraseInSEOTitleResult} An object containing the information on whether the keyphrase was matched in the SEO title and how.\n */\nconst findKeyphraseInSEOTitle = function( paper, researcher ) {\n\tfunctionWords = researcher.getConfig( \"functionWords\" );\n\n\tlet keyword = escapeRegExp( paper.getKeyword() );\n\tconst title = paper.getTitle();\n\tconst locale = paper.getLocale();\n\n\tlet result = { exactMatchFound: false, allWordsFound: false, position: -1, exactMatchKeyphrase: false };\n\n\t// Check if the keyphrase is enclosed in double quotation marks to ensure that only exact matches are processed.\n\tconst exactMatchRequest = processExactMatchRequest( keyword );\n\n\tif ( exactMatchRequest.exactMatchRequested ) {\n\t\tkeyword = exactMatchRequest.keyphrase;\n\t\tresult.exactMatchKeyphrase = true;\n\t}\n\n\t// Check if the exact match of the keyphrase is found in the SEO title.\n\tconst prefixedFunctionWordsRegex = researcher.getConfig( \"prefixedFunctionWordsRegex\" );\n\tconst keywordMatched = wordMatch( title, keyword, locale, false );\n\n\tif ( keywordMatched.count > 0 && ! prefixedFunctionWordsRegex ) {\n\t\tresult.exactMatchFound = true;\n\t\tresult.allWordsFound = true;\n\t\tresult.position = adjustPosition( title, keywordMatched.position );\n\n\t\treturn result;\n\t}\n\n\tresult = checkIfAllWordsAreFound( paper, researcher, keyword, result, prefixedFunctionWordsRegex );\n\n\treturn result;\n};\n\nexport default findKeyphraseInSEOTitle;\n"],"mappings":"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","ignoreList":[]}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = _default;
|
|
7
|
+
var _lodash = require("lodash");
|
|
8
|
+
var _findKeywordFormsInString = require("../helpers/match/findKeywordFormsInString.js");
|
|
9
|
+
var _getSentencesFromTree = require("../helpers/sentence/getSentencesFromTree");
|
|
10
|
+
var _helpers = require("../helpers");
|
|
11
|
+
/** @module analyses/findKeywordInFirstParagraph */
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Checks if the introductory paragraph contains keyphrase or synonyms.
|
|
15
|
+
* First splits the first paragraph by sentences. Finds the first paragraph which contains sentences e.g., not an image).
|
|
16
|
+
* (1) Tries to find all (content) words from the keyphrase or a synonym phrase within one sentence.
|
|
17
|
+
* If found all words within one sentence, returns an object with foundInOneSentence = true and keyphraseOrSynonym = "keyphrase"
|
|
18
|
+
* or "synonym".
|
|
19
|
+
* If it did not find all words within one sentence, goes ahead with matching the keyphrase with the entire first paragraph.
|
|
20
|
+
* (2) Tries to find all (content) words from the keyphrase or a synonym phrase within the paragraph.
|
|
21
|
+
* If found all words within the paragraph, returns an object with foundInOneSentence = false, foundInParagraph = true,
|
|
22
|
+
* and keyphraseOrSynonym = "keyphrase" or "synonym".
|
|
23
|
+
* If found not all words within the paragraph of nothing at all, returns an object with foundInOneSentence = false,
|
|
24
|
+
* foundInParagraph = false, and keyphraseOrSynonym = "".
|
|
25
|
+
*
|
|
26
|
+
* @param {Paper} paper The text to check for paragraphs.
|
|
27
|
+
* @param {Researcher} researcher The researcher to use for analysis.
|
|
28
|
+
*
|
|
29
|
+
* @returns {Object} Whether the keyphrase words were found in one sentence, whether the keyphrase words were found in
|
|
30
|
+
* the paragraph, whether a keyphrase or a synonym phrase was matched.
|
|
31
|
+
*/
|
|
32
|
+
function _default(paper, researcher) {
|
|
33
|
+
let paragraphs = researcher.getResearch("getParagraphs");
|
|
34
|
+
// Filter captions from non-Classic editors.
|
|
35
|
+
paragraphs = paragraphs.filter(paragraph => {
|
|
36
|
+
const parentNode = (0, _getSentencesFromTree.getParentNode)(paper, paragraph);
|
|
37
|
+
return !(paragraph.isImplicit && parentNode && parentNode.name === "figcaption");
|
|
38
|
+
});
|
|
39
|
+
// Filter captions from Classic editor and from classic block inside Block editor.
|
|
40
|
+
paragraphs = paragraphs.filter(paragraph => {
|
|
41
|
+
return !(paragraph.childNodes && paragraph.childNodes[0] && (0, _helpers.createShortcodeTagsRegex)(["caption"]).test(paragraph.childNodes[0].value));
|
|
42
|
+
});
|
|
43
|
+
const firstParagraph = paragraphs[0];
|
|
44
|
+
const topicForms = researcher.getResearch("morphology");
|
|
45
|
+
const matchWordCustomHelper = researcher.getHelper("matchWordCustomHelper");
|
|
46
|
+
const locale = paper.getLocale();
|
|
47
|
+
const startOffset = firstParagraph && firstParagraph.sourceCodeLocation.startOffset;
|
|
48
|
+
const mappedBlocks = paper._attributes.wpBlocks;
|
|
49
|
+
const filteredIntroductionBlock = mappedBlocks && mappedBlocks.filter(block => (0, _lodash.inRange)(startOffset, block.startOffset, block.endOffset))[0];
|
|
50
|
+
const result = {
|
|
51
|
+
foundInOneSentence: false,
|
|
52
|
+
foundInParagraph: false,
|
|
53
|
+
keyphraseOrSynonym: "",
|
|
54
|
+
introduction: firstParagraph,
|
|
55
|
+
parentBlock: filteredIntroductionBlock || null
|
|
56
|
+
};
|
|
57
|
+
if ((0, _lodash.isEmpty)(firstParagraph)) {
|
|
58
|
+
return result;
|
|
59
|
+
}
|
|
60
|
+
const sentences = firstParagraph.sentences.map(sentence => sentence.text);
|
|
61
|
+
// Use both keyphrase and synonyms to match topic words in the first paragraph.
|
|
62
|
+
const useSynonyms = true;
|
|
63
|
+
if (!(0, _lodash.isEmpty)(sentences)) {
|
|
64
|
+
const firstResultSentence = sentences.map(sentence => (0, _findKeywordFormsInString.findTopicFormsInString)(topicForms, sentence, useSynonyms, locale, matchWordCustomHelper)).find(resultSentence => resultSentence.percentWordMatches === 100);
|
|
65
|
+
if (firstResultSentence) {
|
|
66
|
+
result.foundInOneSentence = true;
|
|
67
|
+
result.foundInParagraph = true;
|
|
68
|
+
result.keyphraseOrSynonym = firstResultSentence.keyphraseOrSynonym;
|
|
69
|
+
return result;
|
|
70
|
+
}
|
|
71
|
+
const resultParagraph = (0, _findKeywordFormsInString.findTopicFormsInString)(topicForms, firstParagraph.innerText(), useSynonyms, locale, matchWordCustomHelper);
|
|
72
|
+
if (resultParagraph.percentWordMatches === 100) {
|
|
73
|
+
result.foundInParagraph = true;
|
|
74
|
+
result.keyphraseOrSynonym = resultParagraph.keyphraseOrSynonym;
|
|
75
|
+
return result;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
return result;
|
|
79
|
+
}
|
|
80
|
+
//# sourceMappingURL=findKeywordInFirstParagraph.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"findKeywordInFirstParagraph.js","names":["_lodash","require","_findKeywordFormsInString","_getSentencesFromTree","_helpers","_default","paper","researcher","paragraphs","getResearch","filter","paragraph","parentNode","getParentNode","isImplicit","name","childNodes","createShortcodeTagsRegex","test","value","firstParagraph","topicForms","matchWordCustomHelper","getHelper","locale","getLocale","startOffset","sourceCodeLocation","mappedBlocks","_attributes","wpBlocks","filteredIntroductionBlock","block","inRange","endOffset","result","foundInOneSentence","foundInParagraph","keyphraseOrSynonym","introduction","parentBlock","isEmpty","sentences","map","sentence","text","useSynonyms","firstResultSentence","findTopicFormsInString","find","resultSentence","percentWordMatches","resultParagraph","innerText"],"sources":["../../../src/languageProcessing/researches/findKeywordInFirstParagraph.js"],"sourcesContent":["/** @module analyses/findKeywordInFirstParagraph */\nimport { inRange, isEmpty } from \"lodash\";\n\nimport { findTopicFormsInString } from \"../helpers/match/findKeywordFormsInString.js\";\nimport { getParentNode } from \"../helpers/sentence/getSentencesFromTree\";\nimport { createShortcodeTagsRegex } from \"../helpers\";\n\n\n/**\n * Checks if the introductory paragraph contains keyphrase or synonyms.\n * First splits the first paragraph by sentences. Finds the first paragraph which contains sentences e.g., not an image).\n * (1) Tries to find all (content) words from the keyphrase or a synonym phrase within one sentence.\n * If found all words within one sentence, returns an object with foundInOneSentence = true and keyphraseOrSynonym = \"keyphrase\"\n * or \"synonym\".\n * If it did not find all words within one sentence, goes ahead with matching the keyphrase with the entire first paragraph.\n * (2) Tries to find all (content) words from the keyphrase or a synonym phrase within the paragraph.\n * If found all words within the paragraph, returns an object with foundInOneSentence = false, foundInParagraph = true,\n * and keyphraseOrSynonym = \"keyphrase\" or \"synonym\".\n * If found not all words within the paragraph of nothing at all, returns an object with foundInOneSentence = false,\n * foundInParagraph = false, and keyphraseOrSynonym = \"\".\n *\n * @param {Paper} paper The text to check for paragraphs.\n * @param {Researcher} researcher The researcher to use for analysis.\n *\n * @returns {Object} Whether the keyphrase words were found in one sentence, whether the keyphrase words were found in\n * the paragraph, whether a keyphrase or a synonym phrase was matched.\n */\nexport default function( paper, researcher ) {\n\tlet paragraphs = researcher.getResearch( \"getParagraphs\" );\n\t// Filter captions from non-Classic editors.\n\tparagraphs = paragraphs.filter( paragraph => {\n\t\tconst parentNode = getParentNode( paper, paragraph );\n\t\treturn ! ( paragraph.isImplicit && parentNode && parentNode.name === \"figcaption\" );\n\t} );\n\t// Filter captions from Classic editor and from classic block inside Block editor.\n\tparagraphs = paragraphs.filter( paragraph => {\n\t\treturn ! ( paragraph.childNodes && paragraph.childNodes[ 0 ] &&\n\t\t\tcreateShortcodeTagsRegex( [ \"caption\" ] ).test( paragraph.childNodes[ 0 ].value ) );\n\t} );\n\t const firstParagraph = paragraphs[ 0 ];\n\n\tconst topicForms = researcher.getResearch( \"morphology\" );\n\tconst matchWordCustomHelper = researcher.getHelper( \"matchWordCustomHelper\" );\n\tconst locale = paper.getLocale();\n\tconst startOffset = firstParagraph && firstParagraph.sourceCodeLocation.startOffset;\n\n\tconst mappedBlocks = paper._attributes.wpBlocks;\n\tconst filteredIntroductionBlock = mappedBlocks && mappedBlocks.filter( block => inRange( startOffset, block.startOffset, block.endOffset ) )[ 0 ];\n\tconst result = {\n\t\tfoundInOneSentence: false,\n\t\tfoundInParagraph: false,\n\t\tkeyphraseOrSynonym: \"\",\n\t\tintroduction: firstParagraph,\n\t\tparentBlock: filteredIntroductionBlock || null,\n\t};\n\n\tif ( isEmpty( firstParagraph ) ) {\n\t\treturn result;\n\t}\n\n\tconst sentences = firstParagraph.sentences.map( sentence => sentence.text );\n\t// Use both keyphrase and synonyms to match topic words in the first paragraph.\n\tconst useSynonyms = true;\n\n\tif ( ! isEmpty( sentences ) ) {\n\t\tconst firstResultSentence = sentences\n\t\t\t.map( sentence => findTopicFormsInString( topicForms, sentence, useSynonyms, locale, matchWordCustomHelper ) )\n\t\t\t.find( resultSentence => resultSentence.percentWordMatches === 100 );\n\n\t\tif ( firstResultSentence ) {\n\t\t\tresult.foundInOneSentence = true;\n\t\t\tresult.foundInParagraph = true;\n\t\t\tresult.keyphraseOrSynonym = firstResultSentence.keyphraseOrSynonym;\n\t\t\treturn result;\n\t\t}\n\n\t\tconst resultParagraph = findTopicFormsInString( topicForms, firstParagraph.innerText(), useSynonyms, locale, matchWordCustomHelper );\n\t\tif ( resultParagraph.percentWordMatches === 100 ) {\n\t\t\tresult.foundInParagraph = true;\n\t\t\tresult.keyphraseOrSynonym = resultParagraph.keyphraseOrSynonym;\n\t\t\treturn result;\n\t\t}\n\t}\n\n\treturn result;\n}\n"],"mappings":"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","ignoreList":[]}
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = _default;
|
|
7
|
+
var _createRegexFromDoubleArray = _interopRequireDefault(require("../helpers/regex/createRegexFromDoubleArray.js"));
|
|
8
|
+
var _getSentences = _interopRequireDefault(require("../helpers/sentence/getSentences.js"));
|
|
9
|
+
var _quotes = require("../helpers/sanitize/quotes.js");
|
|
10
|
+
var _matchWordInSentence = require("../helpers/word/matchWordInSentence.js");
|
|
11
|
+
var _htmlParser = _interopRequireDefault(require("../helpers/html/htmlParser"));
|
|
12
|
+
var _lodash = require("lodash");
|
|
13
|
+
var _helpers = require("../helpers");
|
|
14
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
15
|
+
let regexFromDoubleArray = null;
|
|
16
|
+
let regexFromDoubleArrayCacheKey = "";
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Memoizes the createRegexFromDoubleArray with the twoPartTransitionWords.
|
|
20
|
+
*
|
|
21
|
+
* @param {Array} twoPartTransitionWords The array containing two-part transition words.
|
|
22
|
+
*
|
|
23
|
+
* @returns {RegExp} The RegExp to match text with a double array.
|
|
24
|
+
*/
|
|
25
|
+
function getRegexFromDoubleArray(twoPartTransitionWords) {
|
|
26
|
+
const cacheKey = (0, _lodash.flattenDeep)(twoPartTransitionWords).join("");
|
|
27
|
+
if (regexFromDoubleArrayCacheKey !== cacheKey || regexFromDoubleArray === null) {
|
|
28
|
+
regexFromDoubleArrayCacheKey = cacheKey;
|
|
29
|
+
regexFromDoubleArray = (0, _createRegexFromDoubleArray.default)(twoPartTransitionWords);
|
|
30
|
+
}
|
|
31
|
+
return regexFromDoubleArray;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Matches the sentence against two part transition words.
|
|
36
|
+
*
|
|
37
|
+
* @param {string} sentence The sentence to match against.
|
|
38
|
+
* @param {Array} twoPartTransitionWords The array containing two-part transition words.
|
|
39
|
+
* @returns {Array} The found transitional words.
|
|
40
|
+
*/
|
|
41
|
+
const matchTwoPartTransitionWords = function (sentence, twoPartTransitionWords) {
|
|
42
|
+
sentence = (0, _quotes.normalizeSingle)(sentence);
|
|
43
|
+
const twoPartTransitionWordsRegex = getRegexFromDoubleArray(twoPartTransitionWords);
|
|
44
|
+
return sentence.match(twoPartTransitionWordsRegex);
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Matches the sentence against transition words.
|
|
49
|
+
*
|
|
50
|
+
* @param {string} sentence The sentence to match against.
|
|
51
|
+
* @param {Array} transitionWords The array containing transition words.
|
|
52
|
+
* @returns {Array} The found transitional words.
|
|
53
|
+
*/
|
|
54
|
+
const matchTransitionWords = function (sentence, transitionWords) {
|
|
55
|
+
sentence = (0, _quotes.normalizeSingle)(sentence);
|
|
56
|
+
return transitionWords.filter(word => (0, _matchWordInSentence.isWordInSentence)(word, sentence));
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Checks the passed sentences to see if they contain transition words.
|
|
61
|
+
*
|
|
62
|
+
* @param {Array} sentences The sentences to match against.
|
|
63
|
+
* @param {Array} transitionWords The array containing transition words.
|
|
64
|
+
* @param {Array} twoPartTransitionWords The array containing two part transition words.
|
|
65
|
+
* @param {function} matchTransitionWordsHelper The language-specific helper function to match transition words in a sentence.
|
|
66
|
+
*
|
|
67
|
+
* @returns {Array} Array of sentence objects containing the complete sentence and the transition words.
|
|
68
|
+
*/
|
|
69
|
+
const checkSentencesForTransitionWords = function (sentences, transitionWords, twoPartTransitionWords, matchTransitionWordsHelper) {
|
|
70
|
+
const results = [];
|
|
71
|
+
sentences.forEach(sentence => {
|
|
72
|
+
if (twoPartTransitionWords) {
|
|
73
|
+
const twoPartMatches = matchTwoPartTransitionWords(sentence, twoPartTransitionWords);
|
|
74
|
+
if (twoPartMatches !== null) {
|
|
75
|
+
results.push({
|
|
76
|
+
sentence: sentence,
|
|
77
|
+
transitionWords: twoPartMatches
|
|
78
|
+
});
|
|
79
|
+
return;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
const transitionWordMatches = matchTransitionWordsHelper ? matchTransitionWordsHelper(sentence, transitionWords) : matchTransitionWords(sentence, transitionWords);
|
|
83
|
+
if (transitionWordMatches.length !== 0) {
|
|
84
|
+
results.push({
|
|
85
|
+
sentence: sentence,
|
|
86
|
+
transitionWords: transitionWordMatches
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
});
|
|
90
|
+
return results;
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* Checks how many sentences from a text contain at least one transition word or two-part transition word
|
|
95
|
+
* that are defined in the transition words config and two part transition words config.
|
|
96
|
+
*
|
|
97
|
+
* @param {Paper} paper The Paper object to get text from.
|
|
98
|
+
* @param {Researcher} researcher The researcher.
|
|
99
|
+
*
|
|
100
|
+
* @returns {object} An object with the total number of sentences in the text
|
|
101
|
+
* and the total number of sentences containing one or more transition words.
|
|
102
|
+
*/
|
|
103
|
+
function _default(paper, researcher) {
|
|
104
|
+
const matchTransitionWordsHelper = researcher.getHelper("matchTransitionWordsHelper");
|
|
105
|
+
const transitionWords = researcher.getConfig("transitionWords");
|
|
106
|
+
const twoPartTransitionWords = researcher.getConfig("twoPartTransitionWords");
|
|
107
|
+
const memoizedTokenizer = researcher.getHelper("memoizedTokenizer");
|
|
108
|
+
let text = paper.getText();
|
|
109
|
+
text = (0, _htmlParser.default)(text);
|
|
110
|
+
text = (0, _helpers.filterShortcodesFromHTML)(text, paper._attributes && paper._attributes.shortcodes);
|
|
111
|
+
const sentences = (0, _getSentences.default)(text, memoizedTokenizer);
|
|
112
|
+
const sentenceResults = checkSentencesForTransitionWords(sentences, transitionWords, twoPartTransitionWords, matchTransitionWordsHelper);
|
|
113
|
+
return {
|
|
114
|
+
totalSentences: sentences.length,
|
|
115
|
+
sentenceResults: sentenceResults,
|
|
116
|
+
transitionWordSentences: sentenceResults.length
|
|
117
|
+
};
|
|
118
|
+
}
|
|
119
|
+
//# sourceMappingURL=findTransitionWords.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"findTransitionWords.js","names":["_createRegexFromDoubleArray","_interopRequireDefault","require","_getSentences","_quotes","_matchWordInSentence","_htmlParser","_lodash","_helpers","e","__esModule","default","regexFromDoubleArray","regexFromDoubleArrayCacheKey","getRegexFromDoubleArray","twoPartTransitionWords","cacheKey","flattenDeep","join","createRegexFromDoubleArray","matchTwoPartTransitionWords","sentence","normalizeSingleQuotes","twoPartTransitionWordsRegex","match","matchTransitionWords","transitionWords","filter","word","matchWordInSentence","checkSentencesForTransitionWords","sentences","matchTransitionWordsHelper","results","forEach","twoPartMatches","push","transitionWordMatches","length","_default","paper","researcher","getHelper","getConfig","memoizedTokenizer","text","getText","removeHtmlBlocks","filterShortcodesFromHTML","_attributes","shortcodes","getSentences","sentenceResults","totalSentences","transitionWordSentences"],"sources":["../../../src/languageProcessing/researches/findTransitionWords.js"],"sourcesContent":["import createRegexFromDoubleArray from \"../helpers/regex/createRegexFromDoubleArray.js\";\nimport getSentences from \"../helpers/sentence/getSentences.js\";\nimport { normalizeSingle as normalizeSingleQuotes } from \"../helpers/sanitize/quotes.js\";\nimport { isWordInSentence as matchWordInSentence } from \"../helpers/word/matchWordInSentence.js\";\nimport removeHtmlBlocks from \"../helpers/html/htmlParser\";\n\nimport { flattenDeep } from \"lodash\";\nimport { filterShortcodesFromHTML } from \"../helpers\";\n\nlet regexFromDoubleArray = null;\nlet regexFromDoubleArrayCacheKey = \"\";\n\n/**\n * Memoizes the createRegexFromDoubleArray with the twoPartTransitionWords.\n *\n * @param {Array} twoPartTransitionWords The array containing two-part transition words.\n *\n * @returns {RegExp} The RegExp to match text with a double array.\n */\nfunction getRegexFromDoubleArray( twoPartTransitionWords ) {\n\tconst cacheKey = flattenDeep( twoPartTransitionWords ).join( \"\" );\n\tif ( regexFromDoubleArrayCacheKey !== cacheKey || regexFromDoubleArray === null ) {\n\t\tregexFromDoubleArrayCacheKey = cacheKey;\n\t\tregexFromDoubleArray = createRegexFromDoubleArray( twoPartTransitionWords );\n\t}\n\treturn regexFromDoubleArray;\n}\n\n/**\n * Matches the sentence against two part transition words.\n *\n * @param {string} sentence The sentence to match against.\n * @param {Array} twoPartTransitionWords The array containing two-part transition words.\n * @returns {Array} The found transitional words.\n */\nconst matchTwoPartTransitionWords = function( sentence, twoPartTransitionWords ) {\n\tsentence = normalizeSingleQuotes( sentence );\n\tconst twoPartTransitionWordsRegex = getRegexFromDoubleArray( twoPartTransitionWords );\n\treturn sentence.match( twoPartTransitionWordsRegex );\n};\n\n/**\n * Matches the sentence against transition words.\n *\n * @param {string} sentence The sentence to match against.\n * @param {Array} transitionWords The array containing transition words.\n * @returns {Array} The found transitional words.\n */\nconst matchTransitionWords = function( sentence, transitionWords ) {\n\tsentence = normalizeSingleQuotes( sentence );\n\treturn transitionWords.filter( word => matchWordInSentence( word, sentence ) );\n};\n\n/**\n * Checks the passed sentences to see if they contain transition words.\n *\n * @param {Array} sentences The sentences to match against.\n * @param {Array} transitionWords The array containing transition words.\n * @param {Array} twoPartTransitionWords The array containing two part transition words.\n * @param {function} matchTransitionWordsHelper The language-specific helper function to match transition words in a sentence.\n *\n * @returns {Array} Array of sentence objects containing the complete sentence and the transition words.\n */\nconst checkSentencesForTransitionWords = function( sentences, transitionWords, twoPartTransitionWords, matchTransitionWordsHelper ) {\n\tconst results = [];\n\n\tsentences.forEach( sentence => {\n\t\tif ( twoPartTransitionWords ) {\n\t\t\tconst twoPartMatches = matchTwoPartTransitionWords( sentence, twoPartTransitionWords );\n\n\t\t\tif ( twoPartMatches !== null ) {\n\t\t\t\tresults.push( {\n\t\t\t\t\tsentence: sentence,\n\t\t\t\t\ttransitionWords: twoPartMatches,\n\t\t\t\t} );\n\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\tconst transitionWordMatches = matchTransitionWordsHelper\n\t\t\t? matchTransitionWordsHelper( sentence, transitionWords )\n\t\t\t: matchTransitionWords( sentence, transitionWords );\n\n\t\tif ( transitionWordMatches.length !== 0 ) {\n\t\t\tresults.push( {\n\t\t\t\tsentence: sentence,\n\t\t\t\ttransitionWords: transitionWordMatches,\n\t\t\t} );\n\t\t}\n\t} );\n\n\treturn results;\n};\n\n/**\n * Checks how many sentences from a text contain at least one transition word or two-part transition word\n * that are defined in the transition words config and two part transition words config.\n *\n * @param {Paper} paper The Paper object to get text from.\n * @param {Researcher} researcher The researcher.\n *\n * @returns {object} An object with the total number of sentences in the text\n * and the total number of sentences containing one or more transition words.\n */\nexport default function( paper, researcher ) {\n\tconst matchTransitionWordsHelper = researcher.getHelper( \"matchTransitionWordsHelper\" );\n\tconst transitionWords = researcher.getConfig( \"transitionWords\" );\n\tconst twoPartTransitionWords = researcher.getConfig( \"twoPartTransitionWords\" );\n\tconst memoizedTokenizer = researcher.getHelper( \"memoizedTokenizer\" );\n\n\tlet text = paper.getText();\n\ttext = removeHtmlBlocks( text );\n\ttext = filterShortcodesFromHTML( text, paper._attributes && paper._attributes.shortcodes );\n\tconst sentences = getSentences( text, memoizedTokenizer );\n\tconst sentenceResults = checkSentencesForTransitionWords( sentences, transitionWords, twoPartTransitionWords, matchTransitionWordsHelper );\n\n\treturn {\n\t\ttotalSentences: sentences.length,\n\t\tsentenceResults: sentenceResults,\n\t\ttransitionWordSentences: sentenceResults.length,\n\t};\n}\n"],"mappings":"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","ignoreList":[]}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = _default;
|
|
7
|
+
var _lodash = require("lodash");
|
|
8
|
+
var _getWords = _interopRequireDefault(require("../helpers/word/getWords"));
|
|
9
|
+
var _processExactMatchRequest = _interopRequireDefault(require("../helpers/match/processExactMatchRequest"));
|
|
10
|
+
var _wordBoundariesWithoutPunctuation = require("../../config/wordBoundariesWithoutPunctuation");
|
|
11
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
12
|
+
/**
|
|
13
|
+
* Checks if the keyphrase contains of function words only.
|
|
14
|
+
*
|
|
15
|
+
* @param {object} paper The paper containing the keyword.
|
|
16
|
+
* @param {Researcher} researcher The researcher.
|
|
17
|
+
*
|
|
18
|
+
* @returns {boolean} Whether the keyphrase contains of content words only.
|
|
19
|
+
*/
|
|
20
|
+
function _default(paper, researcher) {
|
|
21
|
+
const functionWords = researcher.getConfig("functionWords");
|
|
22
|
+
|
|
23
|
+
// A helper to get words from the keyphrase for languages that don't use the default way.
|
|
24
|
+
const getWordsCustomHelper = researcher.getHelper("getWordsCustomHelper");
|
|
25
|
+
const keyphrase = paper.getKeyword();
|
|
26
|
+
|
|
27
|
+
// Return false if there are double quotes around the keyphrase.
|
|
28
|
+
if ((0, _processExactMatchRequest.default)(keyphrase).exactMatchRequested) {
|
|
29
|
+
return false;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/*
|
|
33
|
+
* We use a word boundary regex that includes whitespaces, en-dashes, and hyphens for all languages.
|
|
34
|
+
* This means that we also consider keyphrases that consist of function words separated by hyphens (e.g. 'two-year-old')
|
|
35
|
+
* as containing only function words. Since many hyphenated phrases can also be written without hyphens, this way the
|
|
36
|
+
* behavior for hyphenated phrases matches the behavior for unhyphenated phrases.
|
|
37
|
+
* In Indonesian we normally don't want to treat hyphens as word boundaries, but in this case it makes sense because
|
|
38
|
+
* in Indonesian you can also have function words seperated by hyphens (e.g. 'dua-lima').
|
|
39
|
+
* As a downside, single function words containing hyphens (e.g. 'vis-à-vis') won't be automatically matched, but we
|
|
40
|
+
* are solving this by adding each word from such function words as separate entries in the function words lists.
|
|
41
|
+
*/
|
|
42
|
+
let keyphraseWords = getWordsCustomHelper ? getWordsCustomHelper(keyphrase) : (0, _getWords.default)(keyphrase, _wordBoundariesWithoutPunctuation.WORD_BOUNDARY_WITH_HYPHEN);
|
|
43
|
+
keyphraseWords = (0, _lodash.filter)(keyphraseWords, function (word) {
|
|
44
|
+
return !(0, _lodash.includes)(functionWords, word.trim().toLocaleLowerCase());
|
|
45
|
+
});
|
|
46
|
+
return (0, _lodash.isEmpty)(keyphraseWords);
|
|
47
|
+
}
|
|
48
|
+
//# sourceMappingURL=functionWordsInKeyphrase.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"functionWordsInKeyphrase.js","names":["_lodash","require","_getWords","_interopRequireDefault","_processExactMatchRequest","_wordBoundariesWithoutPunctuation","e","__esModule","default","_default","paper","researcher","functionWords","getConfig","getWordsCustomHelper","getHelper","keyphrase","getKeyword","processExactMatchRequest","exactMatchRequested","keyphraseWords","getWords","WORD_BOUNDARY_WITH_HYPHEN","filter","word","includes","trim","toLocaleLowerCase","isEmpty"],"sources":["../../../src/languageProcessing/researches/functionWordsInKeyphrase.js"],"sourcesContent":["import { filter, includes, isEmpty } from \"lodash\";\nimport getWords from \"../helpers/word/getWords\";\nimport processExactMatchRequest from \"../helpers/match/processExactMatchRequest\";\nimport { WORD_BOUNDARY_WITH_HYPHEN } from \"../../config/wordBoundariesWithoutPunctuation\";\n\n/**\n * Checks if the keyphrase contains of function words only.\n *\n * @param {object} paper The paper containing the keyword.\n * @param {Researcher} researcher The researcher.\n *\n * @returns {boolean} Whether the keyphrase contains of content words only.\n */\nexport default function( paper, researcher ) {\n\tconst functionWords = researcher.getConfig( \"functionWords\" );\n\n\t// A helper to get words from the keyphrase for languages that don't use the default way.\n\tconst getWordsCustomHelper = researcher.getHelper( \"getWordsCustomHelper\" );\n\tconst keyphrase = paper.getKeyword();\n\n\t// Return false if there are double quotes around the keyphrase.\n\tif ( processExactMatchRequest( keyphrase ).exactMatchRequested ) {\n\t\treturn false;\n\t}\n\n\t/*\n * We use a word boundary regex that includes whitespaces, en-dashes, and hyphens for all languages.\n * This means that we also consider keyphrases that consist of function words separated by hyphens (e.g. 'two-year-old')\n * as containing only function words. Since many hyphenated phrases can also be written without hyphens, this way the\n * behavior for hyphenated phrases matches the behavior for unhyphenated phrases.\n * In Indonesian we normally don't want to treat hyphens as word boundaries, but in this case it makes sense because\n * in Indonesian you can also have function words seperated by hyphens (e.g. 'dua-lima').\n * As a downside, single function words containing hyphens (e.g. 'vis-à-vis') won't be automatically matched, but we\n * are solving this by adding each word from such function words as separate entries in the function words lists.\n */\n\tlet keyphraseWords = getWordsCustomHelper ? getWordsCustomHelper( keyphrase )\n\t\t: getWords( keyphrase, WORD_BOUNDARY_WITH_HYPHEN );\n\n\tkeyphraseWords = filter( keyphraseWords, function( word ) {\n\t\treturn ( ! includes( functionWords, word.trim().toLocaleLowerCase() ) );\n\t} );\n\n\treturn isEmpty( keyphraseWords );\n}\n"],"mappings":";;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,SAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,yBAAA,GAAAD,sBAAA,CAAAF,OAAA;AACA,IAAAI,iCAAA,GAAAJ,OAAA;AAA0F,SAAAE,uBAAAG,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAE1F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACe,SAAAG,SAAUC,KAAK,EAAEC,UAAU,EAAG;EAC5C,MAAMC,aAAa,GAAGD,UAAU,CAACE,SAAS,CAAE,eAAgB,CAAC;;EAE7D;EACA,MAAMC,oBAAoB,GAAGH,UAAU,CAACI,SAAS,CAAE,sBAAuB,CAAC;EAC3E,MAAMC,SAAS,GAAGN,KAAK,CAACO,UAAU,CAAC,CAAC;;EAEpC;EACA,IAAK,IAAAC,iCAAwB,EAAEF,SAAU,CAAC,CAACG,mBAAmB,EAAG;IAChE,OAAO,KAAK;EACb;;EAEA;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EACC,IAAIC,cAAc,GAAGN,oBAAoB,GAAGA,oBAAoB,CAAEE,SAAU,CAAC,GAC1E,IAAAK,iBAAQ,EAAEL,SAAS,EAAEM,2DAA0B,CAAC;EAEnDF,cAAc,GAAG,IAAAG,cAAM,EAAEH,cAAc,EAAE,UAAUI,IAAI,EAAG;IACzD,OAAS,CAAE,IAAAC,gBAAQ,EAAEb,aAAa,EAAEY,IAAI,CAACE,IAAI,CAAC,CAAC,CAACC,iBAAiB,CAAC,CAAE,CAAC;EACtE,CAAE,CAAC;EAEH,OAAO,IAAAC,eAAO,EAAER,cAAe,CAAC;AACjC","ignoreList":[]}
|