axyseo 2.0.0-alpha.0.0.37 → 2.0.0-alpha.0.0.39
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/build/components/RelatedKeywordsDescription.js +38 -0
- package/build/components/RelatedKeywordsDescription.js.map +1 -0
- package/build/components/RelatedKeywordsDescription.scss +34 -0
- package/build/config/diacritics.js +134 -0
- package/build/config/diacritics.js.map +1 -0
- package/build/config/getTransliterations.js +3564 -0
- package/build/config/getTransliterations.js.map +1 -0
- package/build/config/transliterationsWPstyle.js +1417 -0
- package/build/config/transliterationsWPstyle.js.map +1 -0
- package/build/config/wordBoundaries.js +20 -0
- package/build/config/wordBoundaries.js.map +1 -0
- package/build/config/wordBoundariesWithoutPunctuation.js +10 -0
- package/build/config/wordBoundariesWithoutPunctuation.js.map +1 -0
- package/build/const/analysis.js +14 -0
- package/build/const/analysis.js.map +1 -0
- package/build/errors/invalidType.js +15 -0
- package/build/errors/invalidType.js.map +1 -0
- package/build/errors/missingArgument.js +15 -0
- package/build/errors/missingArgument.js.map +1 -0
- package/build/helpers/createMeasurementElement.js +39 -0
- package/build/helpers/createMeasurementElement.js.map +1 -0
- package/build/helpers/domManipulation.js +61 -0
- package/build/helpers/domManipulation.js.map +1 -0
- package/build/helpers/errors.js +21 -0
- package/build/helpers/errors.js.map +1 -0
- package/build/helpers/factory.js +201 -0
- package/build/helpers/factory.js.map +1 -0
- package/build/helpers/formatNumber.js +12 -0
- package/build/helpers/formatNumber.js.map +1 -0
- package/build/helpers/formatString.js +33 -0
- package/build/helpers/formatString.js.map +1 -0
- package/build/helpers/getLanguagesWithWordComplexity.js +9 -0
- package/build/helpers/getLanguagesWithWordComplexity.js.map +1 -0
- package/build/helpers/getLanguagesWithWordFormSupport.js +10 -0
- package/build/helpers/getLanguagesWithWordFormSupport.js.map +1 -0
- package/build/helpers/getWordComplexityConfig.js +21 -0
- package/build/helpers/getWordComplexityConfig.js.map +1 -0
- package/build/helpers/getWordComplexityHelper.js +21 -0
- package/build/helpers/getWordComplexityHelper.js.map +1 -0
- package/build/helpers/htmlEntities.js +16 -0
- package/build/helpers/htmlEntities.js.map +1 -0
- package/build/helpers/includesAny.js +19 -0
- package/build/helpers/includesAny.js.map +1 -0
- package/build/helpers/index.js +122 -0
- package/build/helpers/index.js.map +1 -0
- package/build/helpers/shortlinker/Shortlinker.js +72 -0
- package/build/helpers/shortlinker/Shortlinker.js.map +1 -0
- package/build/helpers/shortlinker/index.js +2 -0
- package/build/helpers/shortlinker/index.js.map +1 -0
- package/build/helpers/shortlinker/singleton.js +68 -0
- package/build/helpers/shortlinker/singleton.js.map +1 -0
- package/build/helpers/types.js +30 -0
- package/build/helpers/types.js.map +1 -0
- package/build/index.js +41 -0
- package/build/index.js.map +1 -0
- package/build/languageProcessing/AbstractResearcher.js +341 -0
- package/build/languageProcessing/AbstractResearcher.js.map +1 -0
- package/build/languageProcessing/helpers/highlighting/getMarkingsInSentence.js +116 -0
- package/build/languageProcessing/helpers/highlighting/getMarkingsInSentence.js.map +1 -0
- package/build/languageProcessing/helpers/html/getFieldsToMark.js +32 -0
- package/build/languageProcessing/helpers/html/getFieldsToMark.js.map +1 -0
- package/build/languageProcessing/helpers/html/getSubheadingTexts.js +42 -0
- package/build/languageProcessing/helpers/html/getSubheadingTexts.js.map +1 -0
- package/build/languageProcessing/helpers/html/getSubheadings.js +82 -0
- package/build/languageProcessing/helpers/html/getSubheadings.js.map +1 -0
- package/build/languageProcessing/helpers/html/html.js +144 -0
- package/build/languageProcessing/helpers/html/html.js.map +1 -0
- package/build/languageProcessing/helpers/html/htmlParser.js +125 -0
- package/build/languageProcessing/helpers/html/htmlParser.js.map +1 -0
- package/build/languageProcessing/helpers/html/matchParagraphs.js +56 -0
- package/build/languageProcessing/helpers/html/matchParagraphs.js.map +1 -0
- package/build/languageProcessing/helpers/html/normalizeHTML.js +17 -0
- package/build/languageProcessing/helpers/html/normalizeHTML.js.map +1 -0
- package/build/languageProcessing/helpers/image/getAltAttribute.js +18 -0
- package/build/languageProcessing/helpers/image/getAltAttribute.js.map +1 -0
- package/build/languageProcessing/helpers/image/getImagesInTree.js +15 -0
- package/build/languageProcessing/helpers/image/getImagesInTree.js.map +1 -0
- package/build/languageProcessing/helpers/image/imageInText.js +19 -0
- package/build/languageProcessing/helpers/image/imageInText.js.map +1 -0
- package/build/languageProcessing/helpers/index.js +6 -0
- package/build/languageProcessing/helpers/index.js.map +1 -0
- package/build/languageProcessing/helpers/language/getLanguage.js +10 -0
- package/build/languageProcessing/helpers/language/getLanguage.js.map +1 -0
- package/build/languageProcessing/helpers/link/checkNofollow.js +35 -0
- package/build/languageProcessing/helpers/link/checkNofollow.js.map +1 -0
- package/build/languageProcessing/helpers/link/getAnchorsFromText.js +31 -0
- package/build/languageProcessing/helpers/link/getAnchorsFromText.js.map +1 -0
- package/build/languageProcessing/helpers/link/getLinkType.js +30 -0
- package/build/languageProcessing/helpers/link/getLinkType.js.map +1 -0
- package/build/languageProcessing/helpers/match/findKeywordFormsInString.js +94 -0
- package/build/languageProcessing/helpers/match/findKeywordFormsInString.js.map +1 -0
- package/build/languageProcessing/helpers/match/isDoubleQuoted.js +13 -0
- package/build/languageProcessing/helpers/match/isDoubleQuoted.js.map +1 -0
- package/build/languageProcessing/helpers/match/matchTextWithArray.js +35 -0
- package/build/languageProcessing/helpers/match/matchTextWithArray.js.map +1 -0
- package/build/languageProcessing/helpers/match/matchTextWithTransliteration.js +52 -0
- package/build/languageProcessing/helpers/match/matchTextWithTransliteration.js.map +1 -0
- package/build/languageProcessing/helpers/match/matchTextWithWord.js +41 -0
- package/build/languageProcessing/helpers/match/matchTextWithWord.js.map +1 -0
- package/build/languageProcessing/helpers/match/matchWordFormsWithSentence.js +155 -0
- package/build/languageProcessing/helpers/match/matchWordFormsWithSentence.js.map +1 -0
- package/build/languageProcessing/helpers/match/processExactMatchRequest.js +23 -0
- package/build/languageProcessing/helpers/match/processExactMatchRequest.js.map +1 -0
- package/build/languageProcessing/helpers/morphology/baseStemmer.js +12 -0
- package/build/languageProcessing/helpers/morphology/baseStemmer.js.map +1 -0
- package/build/languageProcessing/helpers/morphology/buildFormRule.js +20 -0
- package/build/languageProcessing/helpers/morphology/buildFormRule.js.map +1 -0
- package/build/languageProcessing/helpers/morphology/buildTopicStems.js +154 -0
- package/build/languageProcessing/helpers/morphology/buildTopicStems.js.map +1 -0
- package/build/languageProcessing/helpers/morphology/createRulesFromArrays.js +41 -0
- package/build/languageProcessing/helpers/morphology/createRulesFromArrays.js.map +1 -0
- package/build/languageProcessing/helpers/morphology/exceptionListHelpers.js +63 -0
- package/build/languageProcessing/helpers/morphology/exceptionListHelpers.js.map +1 -0
- package/build/languageProcessing/helpers/morphology/findMatchingEndingInArray.js +23 -0
- package/build/languageProcessing/helpers/morphology/findMatchingEndingInArray.js.map +1 -0
- package/build/languageProcessing/helpers/morphology/flattenSortLength.js +14 -0
- package/build/languageProcessing/helpers/morphology/flattenSortLength.js.map +1 -0
- package/build/languageProcessing/helpers/morphology/getAllWordsFromPaper.js +29 -0
- package/build/languageProcessing/helpers/morphology/getAllWordsFromPaper.js.map +1 -0
- package/build/languageProcessing/helpers/morphology/regexHelpers.js +45 -0
- package/build/languageProcessing/helpers/morphology/regexHelpers.js.map +1 -0
- package/build/languageProcessing/helpers/morphology/stemHelpers.js +39 -0
- package/build/languageProcessing/helpers/morphology/stemHelpers.js.map +1 -0
- package/build/languageProcessing/helpers/morphology/stemPrefixedFunctionWords.js +33 -0
- package/build/languageProcessing/helpers/morphology/stemPrefixedFunctionWords.js.map +1 -0
- package/build/languageProcessing/helpers/passiveVoice/periphrastic/directPrecedenceException.js +36 -0
- package/build/languageProcessing/helpers/passiveVoice/periphrastic/directPrecedenceException.js.map +1 -0
- package/build/languageProcessing/helpers/passiveVoice/periphrastic/freeAuxiliaryParticipleOrder/getClausesSplitOnStopWords.js +110 -0
- package/build/languageProcessing/helpers/passiveVoice/periphrastic/freeAuxiliaryParticipleOrder/getClausesSplitOnStopWords.js.map +1 -0
- package/build/languageProcessing/helpers/passiveVoice/periphrastic/freeAuxiliaryParticipleOrder/nonDirectParticiplePrecedenceException.js +39 -0
- package/build/languageProcessing/helpers/passiveVoice/periphrastic/freeAuxiliaryParticipleOrder/nonDirectParticiplePrecedenceException.js.map +1 -0
- package/build/languageProcessing/helpers/passiveVoice/periphrastic/getClauses.js +214 -0
- package/build/languageProcessing/helpers/passiveVoice/periphrastic/getClauses.js.map +1 -0
- package/build/languageProcessing/helpers/passiveVoice/periphrastic/getIndicesWithRegex.js +21 -0
- package/build/languageProcessing/helpers/passiveVoice/periphrastic/getIndicesWithRegex.js.map +1 -0
- package/build/languageProcessing/helpers/passiveVoice/periphrastic/matchRegularParticiples.js +23 -0
- package/build/languageProcessing/helpers/passiveVoice/periphrastic/matchRegularParticiples.js.map +1 -0
- package/build/languageProcessing/helpers/passiveVoice/periphrastic/precedenceException.js +40 -0
- package/build/languageProcessing/helpers/passiveVoice/periphrastic/precedenceException.js.map +1 -0
- package/build/languageProcessing/helpers/prominentWords/determineProminentWords.js +191 -0
- package/build/languageProcessing/helpers/prominentWords/determineProminentWords.js.map +1 -0
- package/build/languageProcessing/helpers/regex/createRegexFromArray.js +32 -0
- package/build/languageProcessing/helpers/regex/createRegexFromArray.js.map +1 -0
- package/build/languageProcessing/helpers/regex/createRegexFromDoubleArray.js +33 -0
- package/build/languageProcessing/helpers/regex/createRegexFromDoubleArray.js.map +1 -0
- package/build/languageProcessing/helpers/regex/createWordRegex.js +28 -0
- package/build/languageProcessing/helpers/regex/createWordRegex.js.map +1 -0
- package/build/languageProcessing/helpers/regex/matchStringWithRegex.js +18 -0
- package/build/languageProcessing/helpers/regex/matchStringWithRegex.js.map +1 -0
- package/build/languageProcessing/helpers/regex/searchAndReplaceWithOneRegex.js +15 -0
- package/build/languageProcessing/helpers/regex/searchAndReplaceWithOneRegex.js.map +1 -0
- package/build/languageProcessing/helpers/sanitize/doubleQuotes.js +13 -0
- package/build/languageProcessing/helpers/sanitize/doubleQuotes.js.map +1 -0
- package/build/languageProcessing/helpers/sanitize/filterShortcodesFromTree.js +123 -0
- package/build/languageProcessing/helpers/sanitize/filterShortcodesFromTree.js.map +1 -0
- package/build/languageProcessing/helpers/sanitize/mergeListItems.js +24 -0
- package/build/languageProcessing/helpers/sanitize/mergeListItems.js.map +1 -0
- package/build/languageProcessing/helpers/sanitize/parseSynonyms.js +18 -0
- package/build/languageProcessing/helpers/sanitize/parseSynonyms.js.map +1 -0
- package/build/languageProcessing/helpers/sanitize/quotes.js +39 -0
- package/build/languageProcessing/helpers/sanitize/quotes.js.map +1 -0
- package/build/languageProcessing/helpers/sanitize/removeEmailAddresses.js +13 -0
- package/build/languageProcessing/helpers/sanitize/removeEmailAddresses.js.map +1 -0
- package/build/languageProcessing/helpers/sanitize/removePunctuation.js +58 -0
- package/build/languageProcessing/helpers/sanitize/removePunctuation.js.map +1 -0
- package/build/languageProcessing/helpers/sanitize/removePunctuationExceptQuotes.js +18 -0
- package/build/languageProcessing/helpers/sanitize/removePunctuationExceptQuotes.js.map +1 -0
- package/build/languageProcessing/helpers/sanitize/removeSentenceTerminators.js +14 -0
- package/build/languageProcessing/helpers/sanitize/removeSentenceTerminators.js.map +1 -0
- package/build/languageProcessing/helpers/sanitize/removeURLs.js +13 -0
- package/build/languageProcessing/helpers/sanitize/removeURLs.js.map +1 -0
- package/build/languageProcessing/helpers/sanitize/sanitizeLineBreakTag.js +12 -0
- package/build/languageProcessing/helpers/sanitize/sanitizeLineBreakTag.js.map +1 -0
- package/build/languageProcessing/helpers/sanitize/sanitizeString.js +18 -0
- package/build/languageProcessing/helpers/sanitize/sanitizeString.js.map +1 -0
- package/build/languageProcessing/helpers/sanitize/stripHTMLTags.js +50 -0
- package/build/languageProcessing/helpers/sanitize/stripHTMLTags.js.map +1 -0
- package/build/languageProcessing/helpers/sanitize/stripNonTextTags.js +16 -0
- package/build/languageProcessing/helpers/sanitize/stripNonTextTags.js.map +1 -0
- package/build/languageProcessing/helpers/sanitize/stripNumbers.js +20 -0
- package/build/languageProcessing/helpers/sanitize/stripNumbers.js.map +1 -0
- package/build/languageProcessing/helpers/sanitize/stripSpaces.js +23 -0
- package/build/languageProcessing/helpers/sanitize/stripSpaces.js.map +1 -0
- package/build/languageProcessing/helpers/sanitize/stripWordBoundaries.js +57 -0
- package/build/languageProcessing/helpers/sanitize/stripWordBoundaries.js.map +1 -0
- package/build/languageProcessing/helpers/sanitize/unifyWhitespace.js +55 -0
- package/build/languageProcessing/helpers/sanitize/unifyWhitespace.js.map +1 -0
- package/build/languageProcessing/helpers/sentence/SentenceTokenizer.js +558 -0
- package/build/languageProcessing/helpers/sentence/SentenceTokenizer.js.map +1 -0
- package/build/languageProcessing/helpers/sentence/countSentences.js +21 -0
- package/build/languageProcessing/helpers/sentence/countSentences.js.map +1 -0
- package/build/languageProcessing/helpers/sentence/getSentences.js +64 -0
- package/build/languageProcessing/helpers/sentence/getSentences.js.map +1 -0
- package/build/languageProcessing/helpers/sentence/getSentencesFromTree.js +53 -0
- package/build/languageProcessing/helpers/sentence/getSentencesFromTree.js.map +1 -0
- package/build/languageProcessing/helpers/sentence/memoizedSentenceTokenizer.js +31 -0
- package/build/languageProcessing/helpers/sentence/memoizedSentenceTokenizer.js.map +1 -0
- package/build/languageProcessing/helpers/sentence/sentencesLength.js +31 -0
- package/build/languageProcessing/helpers/sentence/sentencesLength.js.map +1 -0
- package/build/languageProcessing/helpers/syllables/DeviationFragment.js +102 -0
- package/build/languageProcessing/helpers/syllables/DeviationFragment.js.map +1 -0
- package/build/languageProcessing/helpers/syllables/countSyllables.js +166 -0
- package/build/languageProcessing/helpers/syllables/countSyllables.js.map +1 -0
- package/build/languageProcessing/helpers/syllables/syllableCountIterator.js +56 -0
- package/build/languageProcessing/helpers/syllables/syllableCountIterator.js.map +1 -0
- package/build/languageProcessing/helpers/syllables/syllableCountStep.js +68 -0
- package/build/languageProcessing/helpers/syllables/syllableCountStep.js.map +1 -0
- package/build/languageProcessing/helpers/transform/transformWordsWithHyphens.js +18 -0
- package/build/languageProcessing/helpers/transform/transformWordsWithHyphens.js.map +1 -0
- package/build/languageProcessing/helpers/transliterate/replaceDiacritics.js +19 -0
- package/build/languageProcessing/helpers/transliterate/replaceDiacritics.js.map +1 -0
- package/build/languageProcessing/helpers/transliterate/specialCharacterMappings.js +183 -0
- package/build/languageProcessing/helpers/transliterate/specialCharacterMappings.js.map +1 -0
- package/build/languageProcessing/helpers/transliterate/transliterate.js +18 -0
- package/build/languageProcessing/helpers/transliterate/transliterate.js.map +1 -0
- package/build/languageProcessing/helpers/transliterate/transliterateWPstyle.js +19 -0
- package/build/languageProcessing/helpers/transliterate/transliterateWPstyle.js.map +1 -0
- package/build/languageProcessing/helpers/url/parseSlug.js +11 -0
- package/build/languageProcessing/helpers/url/parseSlug.js.map +1 -0
- package/build/languageProcessing/helpers/url/url.js +168 -0
- package/build/languageProcessing/helpers/url/url.js.map +1 -0
- package/build/languageProcessing/helpers/word/addWordboundary.js +35 -0
- package/build/languageProcessing/helpers/word/addWordboundary.js.map +1 -0
- package/build/languageProcessing/helpers/word/areWordsInSentence.js +17 -0
- package/build/languageProcessing/helpers/word/areWordsInSentence.js.map +1 -0
- package/build/languageProcessing/helpers/word/countMetaDescriptionLength.js +18 -0
- package/build/languageProcessing/helpers/word/countMetaDescriptionLength.js.map +1 -0
- package/build/languageProcessing/helpers/word/countWords.js +15 -0
- package/build/languageProcessing/helpers/word/countWords.js.map +1 -0
- package/build/languageProcessing/helpers/word/createPunctuationTokens.js +41 -0
- package/build/languageProcessing/helpers/word/createPunctuationTokens.js.map +1 -0
- package/build/languageProcessing/helpers/word/filterWordsFromArray.js +16 -0
- package/build/languageProcessing/helpers/word/filterWordsFromArray.js.map +1 -0
- package/build/languageProcessing/helpers/word/followsIndex.js +24 -0
- package/build/languageProcessing/helpers/word/followsIndex.js.map +1 -0
- package/build/languageProcessing/helpers/word/getAllWordsFromTree.js +24 -0
- package/build/languageProcessing/helpers/word/getAllWordsFromTree.js.map +1 -0
- package/build/languageProcessing/helpers/word/getWords.js +37 -0
- package/build/languageProcessing/helpers/word/getWords.js.map +1 -0
- package/build/languageProcessing/helpers/word/includesIndex.js +29 -0
- package/build/languageProcessing/helpers/word/includesIndex.js.map +1 -0
- package/build/languageProcessing/helpers/word/indices.js +130 -0
- package/build/languageProcessing/helpers/word/indices.js.map +1 -0
- package/build/languageProcessing/helpers/word/markWordsInSentences.js +177 -0
- package/build/languageProcessing/helpers/word/markWordsInSentences.js.map +1 -0
- package/build/languageProcessing/helpers/word/matchWordInSentence.js +56 -0
- package/build/languageProcessing/helpers/word/matchWordInSentence.js.map +1 -0
- package/build/languageProcessing/helpers/word/splitIntoTokens.js +46 -0
- package/build/languageProcessing/helpers/word/splitIntoTokens.js.map +1 -0
- package/build/languageProcessing/index.js +42 -0
- package/build/languageProcessing/index.js.map +1 -0
- package/build/languageProcessing/languages/_default/Researcher.js +35 -0
- package/build/languageProcessing/languages/_default/Researcher.js.map +1 -0
- package/build/languageProcessing/languages/_default/helpers/getStemmer.js +14 -0
- package/build/languageProcessing/languages/_default/helpers/getStemmer.js.map +1 -0
- package/build/languageProcessing/languages/ar/Researcher.js +46 -0
- package/build/languageProcessing/languages/ar/Researcher.js.map +1 -0
- package/build/languageProcessing/languages/ar/config/firstWordExceptions.js +12 -0
- package/build/languageProcessing/languages/ar/config/firstWordExceptions.js.map +1 -0
- package/build/languageProcessing/languages/ar/config/functionWords.js +74 -0
- package/build/languageProcessing/languages/ar/config/functionWords.js.map +1 -0
- package/build/languageProcessing/languages/ar/config/internal/passiveVerbsWithLongVowel.js +7 -0
- package/build/languageProcessing/languages/ar/config/internal/passiveVerbsWithLongVowel.js.map +1 -0
- package/build/languageProcessing/languages/ar/config/prefixedFunctionWords.js +5 -0
- package/build/languageProcessing/languages/ar/config/prefixedFunctionWords.js.map +1 -0
- package/build/languageProcessing/languages/ar/config/transitionWords.js +7 -0
- package/build/languageProcessing/languages/ar/config/transitionWords.js.map +1 -0
- package/build/languageProcessing/languages/ar/config/twoPartTransitionWords.js +8 -0
- package/build/languageProcessing/languages/ar/config/twoPartTransitionWords.js.map +1 -0
- package/build/languageProcessing/languages/ar/helpers/createBasicWordForms.js +33 -0
- package/build/languageProcessing/languages/ar/helpers/createBasicWordForms.js.map +1 -0
- package/build/languageProcessing/languages/ar/helpers/getStemmer.js +22 -0
- package/build/languageProcessing/languages/ar/helpers/getStemmer.js.map +1 -0
- package/build/languageProcessing/languages/ar/helpers/internal/stem.js +629 -0
- package/build/languageProcessing/languages/ar/helpers/internal/stem.js.map +1 -0
- package/build/languageProcessing/languages/ar/helpers/isPassiveSentence.js +34 -0
- package/build/languageProcessing/languages/ar/helpers/isPassiveSentence.js.map +1 -0
- package/build/languageProcessing/languages/ca/Researcher.js +44 -0
- package/build/languageProcessing/languages/ca/Researcher.js.map +1 -0
- package/build/languageProcessing/languages/ca/config/sentenceLength.js +4 -0
- package/build/languageProcessing/languages/ca/config/sentenceLength.js.map +1 -0
- package/build/languageProcessing/languages/ca/config/transitionWords.js +7 -0
- package/build/languageProcessing/languages/ca/config/transitionWords.js.map +1 -0
- package/build/languageProcessing/languages/ca/config/twoPartTransitionWords.js +8 -0
- package/build/languageProcessing/languages/ca/config/twoPartTransitionWords.js.map +1 -0
- package/build/languageProcessing/languages/ca/helpers/getStemmer.js +14 -0
- package/build/languageProcessing/languages/ca/helpers/getStemmer.js.map +1 -0
- package/build/languageProcessing/languages/cs/Researcher.js +44 -0
- package/build/languageProcessing/languages/cs/Researcher.js.map +1 -0
- package/build/languageProcessing/languages/cs/config/firstWordExceptions.js +14 -0
- package/build/languageProcessing/languages/cs/config/firstWordExceptions.js.map +1 -0
- package/build/languageProcessing/languages/cs/config/functionWords.js +44 -0
- package/build/languageProcessing/languages/cs/config/functionWords.js.map +1 -0
- package/build/languageProcessing/languages/cs/config/internal/passiveVoiceAuxiliaries.js +4 -0
- package/build/languageProcessing/languages/cs/config/internal/passiveVoiceAuxiliaries.js.map +1 -0
- package/build/languageProcessing/languages/cs/config/internal/passiveVoiceEndings.js +8 -0
- package/build/languageProcessing/languages/cs/config/internal/passiveVoiceEndings.js.map +1 -0
- package/build/languageProcessing/languages/cs/config/stopWords.js +6 -0
- package/build/languageProcessing/languages/cs/config/stopWords.js.map +1 -0
- package/build/languageProcessing/languages/cs/config/transitionWords.js +7 -0
- package/build/languageProcessing/languages/cs/config/transitionWords.js.map +1 -0
- package/build/languageProcessing/languages/cs/config/twoPartTransitionWords.js +8 -0
- package/build/languageProcessing/languages/cs/config/twoPartTransitionWords.js.map +1 -0
- package/build/languageProcessing/languages/cs/helpers/getClauses.js +28 -0
- package/build/languageProcessing/languages/cs/helpers/getClauses.js.map +1 -0
- package/build/languageProcessing/languages/cs/helpers/getStemmer.js +22 -0
- package/build/languageProcessing/languages/cs/helpers/getStemmer.js.map +1 -0
- package/build/languageProcessing/languages/cs/helpers/internal/getParticiples.js +18 -0
- package/build/languageProcessing/languages/cs/helpers/internal/getParticiples.js.map +1 -0
- package/build/languageProcessing/languages/cs/helpers/internal/stem.js +335 -0
- package/build/languageProcessing/languages/cs/helpers/internal/stem.js.map +1 -0
- package/build/languageProcessing/languages/cs/values/Clause.js +38 -0
- package/build/languageProcessing/languages/cs/values/Clause.js.map +1 -0
- package/build/languageProcessing/languages/de/Researcher.js +53 -0
- package/build/languageProcessing/languages/de/Researcher.js.map +1 -0
- package/build/languageProcessing/languages/de/config/firstWordExceptions.js +14 -0
- package/build/languageProcessing/languages/de/config/firstWordExceptions.js.map +1 -0
- package/build/languageProcessing/languages/de/config/functionWords.js +95 -0
- package/build/languageProcessing/languages/de/config/functionWords.js.map +1 -0
- package/build/languageProcessing/languages/de/config/internal/exceptionsParticiplesActive.js +7 -0
- package/build/languageProcessing/languages/de/config/internal/exceptionsParticiplesActive.js.map +1 -0
- package/build/languageProcessing/languages/de/config/internal/passiveVoiceAuxiliaries.js +23 -0
- package/build/languageProcessing/languages/de/config/internal/passiveVoiceAuxiliaries.js.map +1 -0
- package/build/languageProcessing/languages/de/config/internal/passiveVoiceIrregulars.js +9 -0
- package/build/languageProcessing/languages/de/config/internal/passiveVoiceIrregulars.js.map +1 -0
- package/build/languageProcessing/languages/de/config/internal/passiveVoiceRegex.js +72 -0
- package/build/languageProcessing/languages/de/config/internal/passiveVoiceRegex.js.map +1 -0
- package/build/languageProcessing/languages/de/config/keyphraseLength.js +11 -0
- package/build/languageProcessing/languages/de/config/keyphraseLength.js.map +1 -0
- package/build/languageProcessing/languages/de/config/stopWords.js +6 -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 +7 -0
- package/build/languageProcessing/languages/de/config/transitionWords.js.map +1 -0
- package/build/languageProcessing/languages/de/config/twoPartTransitionWords.js +8 -0
- package/build/languageProcessing/languages/de/config/twoPartTransitionWords.js.map +1 -0
- package/build/languageProcessing/languages/de/config/wordComplexity.js +5 -0
- package/build/languageProcessing/languages/de/config/wordComplexity.js.map +1 -0
- package/build/languageProcessing/languages/de/helpers/calculateFleschReadingScore.js +17 -0
- package/build/languageProcessing/languages/de/helpers/calculateFleschReadingScore.js.map +1 -0
- package/build/languageProcessing/languages/de/helpers/checkIfWordIsComplex.js +41 -0
- package/build/languageProcessing/languages/de/helpers/checkIfWordIsComplex.js.map +1 -0
- package/build/languageProcessing/languages/de/helpers/checkIfWordIsFunction.js +15 -0
- package/build/languageProcessing/languages/de/helpers/checkIfWordIsFunction.js.map +1 -0
- package/build/languageProcessing/languages/de/helpers/getClauses.js +27 -0
- package/build/languageProcessing/languages/de/helpers/getClauses.js.map +1 -0
- package/build/languageProcessing/languages/de/helpers/getStemmer.js +22 -0
- package/build/languageProcessing/languages/de/helpers/getStemmer.js.map +1 -0
- package/build/languageProcessing/languages/de/helpers/internal/SentenceTokenizer.js +31 -0
- package/build/languageProcessing/languages/de/helpers/internal/SentenceTokenizer.js.map +1 -0
- package/build/languageProcessing/languages/de/helpers/internal/detectAndStemRegularParticiple.js +112 -0
- package/build/languageProcessing/languages/de/helpers/internal/detectAndStemRegularParticiple.js.map +1 -0
- package/build/languageProcessing/languages/de/helpers/internal/determineStem.js +107 -0
- package/build/languageProcessing/languages/de/helpers/internal/determineStem.js.map +1 -0
- package/build/languageProcessing/languages/de/helpers/internal/getParticiples.js +32 -0
- package/build/languageProcessing/languages/de/helpers/internal/getParticiples.js.map +1 -0
- package/build/languageProcessing/languages/de/helpers/internal/stem.js +216 -0
- package/build/languageProcessing/languages/de/helpers/internal/stem.js.map +1 -0
- package/build/languageProcessing/languages/de/helpers/memoizedSentenceTokenizer.js +31 -0
- package/build/languageProcessing/languages/de/helpers/memoizedSentenceTokenizer.js.map +1 -0
- package/build/languageProcessing/languages/de/values/Clause.js +84 -0
- package/build/languageProcessing/languages/de/values/Clause.js.map +1 -0
- package/build/languageProcessing/languages/el/Researcher.js +47 -0
- package/build/languageProcessing/languages/el/Researcher.js.map +1 -0
- package/build/languageProcessing/languages/el/config/firstWordExceptions.js +27 -0
- package/build/languageProcessing/languages/el/config/firstWordExceptions.js.map +1 -0
- package/build/languageProcessing/languages/el/config/functionWords.js +41 -0
- package/build/languageProcessing/languages/el/config/functionWords.js.map +1 -0
- package/build/languageProcessing/languages/el/config/internal/auxiliaries.js +6 -0
- package/build/languageProcessing/languages/el/config/internal/auxiliaries.js.map +1 -0
- package/build/languageProcessing/languages/el/config/internal/morphologicalPassiveSuffixes.js +2 -0
- package/build/languageProcessing/languages/el/config/internal/morphologicalPassiveSuffixes.js.map +1 -0
- package/build/languageProcessing/languages/el/config/internal/nonPassiveVerbStems.js +16 -0
- package/build/languageProcessing/languages/el/config/internal/nonPassiveVerbStems.js.map +1 -0
- package/build/languageProcessing/languages/el/config/stopWords.js +7 -0
- package/build/languageProcessing/languages/el/config/stopWords.js.map +1 -0
- package/build/languageProcessing/languages/el/config/transitionWords.js +12 -0
- package/build/languageProcessing/languages/el/config/transitionWords.js.map +1 -0
- package/build/languageProcessing/languages/el/config/twoPartTransitionWords.js +8 -0
- package/build/languageProcessing/languages/el/config/twoPartTransitionWords.js.map +1 -0
- package/build/languageProcessing/languages/el/helpers/getClauses.js +27 -0
- package/build/languageProcessing/languages/el/helpers/getClauses.js.map +1 -0
- package/build/languageProcessing/languages/el/helpers/getStemmer.js +22 -0
- package/build/languageProcessing/languages/el/helpers/getStemmer.js.map +1 -0
- package/build/languageProcessing/languages/el/helpers/internal/getParticiples.js +18 -0
- package/build/languageProcessing/languages/el/helpers/internal/getParticiples.js.map +1 -0
- package/build/languageProcessing/languages/el/helpers/internal/stem.js +338 -0
- package/build/languageProcessing/languages/el/helpers/internal/stem.js.map +1 -0
- package/build/languageProcessing/languages/el/helpers/isPassiveSentence.js +36 -0
- package/build/languageProcessing/languages/el/helpers/isPassiveSentence.js.map +1 -0
- package/build/languageProcessing/languages/el/values/Clause.js +40 -0
- package/build/languageProcessing/languages/el/values/Clause.js.map +1 -0
- package/build/languageProcessing/languages/en/Researcher.js +47 -0
- package/build/languageProcessing/languages/en/Researcher.js.map +1 -0
- package/build/languageProcessing/languages/en/config/abbreviations.js +10 -0
- package/build/languageProcessing/languages/en/config/abbreviations.js.map +1 -0
- package/build/languageProcessing/languages/en/config/firstWordExceptions.js +14 -0
- package/build/languageProcessing/languages/en/config/firstWordExceptions.js.map +1 -0
- package/build/languageProcessing/languages/en/config/functionWords.js +103 -0
- package/build/languageProcessing/languages/en/config/functionWords.js.map +1 -0
- package/build/languageProcessing/languages/en/config/internal/passiveVoiceAuxiliaries.js +9 -0
- package/build/languageProcessing/languages/en/config/internal/passiveVoiceAuxiliaries.js.map +1 -0
- package/build/languageProcessing/languages/en/config/internal/passiveVoiceIrregulars.js +9 -0
- package/build/languageProcessing/languages/en/config/internal/passiveVoiceIrregulars.js.map +1 -0
- package/build/languageProcessing/languages/en/config/internal/passiveVoiceNonVerbEndingEd.js +7 -0
- package/build/languageProcessing/languages/en/config/internal/passiveVoiceNonVerbEndingEd.js.map +1 -0
- package/build/languageProcessing/languages/en/config/regularParticiplesRegex.js +6 -0
- package/build/languageProcessing/languages/en/config/regularParticiplesRegex.js.map +1 -0
- package/build/languageProcessing/languages/en/config/stopWords.js +6 -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 +7 -0
- package/build/languageProcessing/languages/en/config/transitionWords.js.map +1 -0
- package/build/languageProcessing/languages/en/config/twoPartTransitionWords.js +8 -0
- package/build/languageProcessing/languages/en/config/twoPartTransitionWords.js.map +1 -0
- package/build/languageProcessing/languages/en/config/wordComplexity.js +6 -0
- package/build/languageProcessing/languages/en/config/wordComplexity.js.map +1 -0
- package/build/languageProcessing/languages/en/helpers/calculateFleschReadingScore.js +17 -0
- package/build/languageProcessing/languages/en/helpers/calculateFleschReadingScore.js.map +1 -0
- package/build/languageProcessing/languages/en/helpers/checkIfWordIsComplex.js +43 -0
- package/build/languageProcessing/languages/en/helpers/checkIfWordIsComplex.js.map +1 -0
- package/build/languageProcessing/languages/en/helpers/getClauses.js +51 -0
- package/build/languageProcessing/languages/en/helpers/getClauses.js.map +1 -0
- package/build/languageProcessing/languages/en/helpers/getStemmer.js +22 -0
- package/build/languageProcessing/languages/en/helpers/getStemmer.js.map +1 -0
- package/build/languageProcessing/languages/en/helpers/internal/determineStem.js +150 -0
- package/build/languageProcessing/languages/en/helpers/internal/determineStem.js.map +1 -0
- package/build/languageProcessing/languages/en/helpers/internal/getAdjectiveStem.js +142 -0
- package/build/languageProcessing/languages/en/helpers/internal/getAdjectiveStem.js.map +1 -0
- package/build/languageProcessing/languages/en/helpers/internal/getParticiples.js +27 -0
- package/build/languageProcessing/languages/en/helpers/internal/getParticiples.js.map +1 -0
- package/build/languageProcessing/languages/en/helpers/internal/getVerbStem.js +218 -0
- package/build/languageProcessing/languages/en/helpers/internal/getVerbStem.js.map +1 -0
- package/build/languageProcessing/languages/en/values/Clause.js +61 -0
- package/build/languageProcessing/languages/en/values/Clause.js.map +1 -0
- package/build/languageProcessing/languages/es/Researcher.js +49 -0
- package/build/languageProcessing/languages/es/Researcher.js.map +1 -0
- package/build/languageProcessing/languages/es/config/firstWordExceptions.js +14 -0
- package/build/languageProcessing/languages/es/config/firstWordExceptions.js.map +1 -0
- package/build/languageProcessing/languages/es/config/functionWords.js +105 -0
- package/build/languageProcessing/languages/es/config/functionWords.js.map +1 -0
- package/build/languageProcessing/languages/es/config/internal/passiveVoiceAuxiliaries.js +6 -0
- package/build/languageProcessing/languages/es/config/internal/passiveVoiceAuxiliaries.js.map +1 -0
- package/build/languageProcessing/languages/es/config/internal/passiveVoiceParticiples.js +7 -0
- package/build/languageProcessing/languages/es/config/internal/passiveVoiceParticiples.js.map +1 -0
- package/build/languageProcessing/languages/es/config/sentenceLength.js +4 -0
- package/build/languageProcessing/languages/es/config/sentenceLength.js.map +1 -0
- package/build/languageProcessing/languages/es/config/stopWords.js +6 -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 +7 -0
- package/build/languageProcessing/languages/es/config/transitionWords.js.map +1 -0
- package/build/languageProcessing/languages/es/config/twoPartTransitionWords.js +8 -0
- package/build/languageProcessing/languages/es/config/twoPartTransitionWords.js.map +1 -0
- package/build/languageProcessing/languages/es/config/wordComplexity.js +5 -0
- package/build/languageProcessing/languages/es/config/wordComplexity.js.map +1 -0
- package/build/languageProcessing/languages/es/helpers/calculateFleschReadingScore.js +17 -0
- package/build/languageProcessing/languages/es/helpers/calculateFleschReadingScore.js.map +1 -0
- package/build/languageProcessing/languages/es/helpers/checkIfWordIsComplex.js +53 -0
- package/build/languageProcessing/languages/es/helpers/checkIfWordIsComplex.js.map +1 -0
- package/build/languageProcessing/languages/es/helpers/getClauses.js +31 -0
- package/build/languageProcessing/languages/es/helpers/getClauses.js.map +1 -0
- package/build/languageProcessing/languages/es/helpers/getStemmer.js +22 -0
- package/build/languageProcessing/languages/es/helpers/getStemmer.js.map +1 -0
- package/build/languageProcessing/languages/es/helpers/internal/checkVerbStemModifications.js +34 -0
- package/build/languageProcessing/languages/es/helpers/internal/checkVerbStemModifications.js.map +1 -0
- package/build/languageProcessing/languages/es/helpers/internal/getParticiples.js +37 -0
- package/build/languageProcessing/languages/es/helpers/internal/getParticiples.js.map +1 -0
- package/build/languageProcessing/languages/es/helpers/internal/stem.js +566 -0
- package/build/languageProcessing/languages/es/helpers/internal/stem.js.map +1 -0
- package/build/languageProcessing/languages/es/values/Clause.js +42 -0
- package/build/languageProcessing/languages/es/values/Clause.js.map +1 -0
- package/build/languageProcessing/languages/fa/Researcher.js +48 -0
- package/build/languageProcessing/languages/fa/Researcher.js.map +1 -0
- package/build/languageProcessing/languages/fa/config/firstWordExceptions.js +12 -0
- package/build/languageProcessing/languages/fa/config/firstWordExceptions.js.map +1 -0
- package/build/languageProcessing/languages/fa/config/functionWords.js +35 -0
- package/build/languageProcessing/languages/fa/config/functionWords.js.map +1 -0
- package/build/languageProcessing/languages/fa/config/internal/participles.js +8 -0
- package/build/languageProcessing/languages/fa/config/internal/participles.js.map +1 -0
- package/build/languageProcessing/languages/fa/config/sentenceLength.js +4 -0
- package/build/languageProcessing/languages/fa/config/sentenceLength.js.map +1 -0
- package/build/languageProcessing/languages/fa/config/transitionWords.js +12 -0
- package/build/languageProcessing/languages/fa/config/transitionWords.js.map +1 -0
- package/build/languageProcessing/languages/fa/config/twoPartTransitionWords.js +8 -0
- package/build/languageProcessing/languages/fa/config/twoPartTransitionWords.js.map +1 -0
- package/build/languageProcessing/languages/fa/helpers/createBasicWordForms.js +93 -0
- package/build/languageProcessing/languages/fa/helpers/createBasicWordForms.js.map +1 -0
- package/build/languageProcessing/languages/fa/helpers/getStemmer.js +16 -0
- package/build/languageProcessing/languages/fa/helpers/getStemmer.js.map +1 -0
- package/build/languageProcessing/languages/fa/helpers/isPassiveSentence.js +16 -0
- package/build/languageProcessing/languages/fa/helpers/isPassiveSentence.js.map +1 -0
- package/build/languageProcessing/languages/fr/Researcher.js +47 -0
- package/build/languageProcessing/languages/fr/Researcher.js.map +1 -0
- package/build/languageProcessing/languages/fr/config/firstWordExceptions.js +14 -0
- package/build/languageProcessing/languages/fr/config/firstWordExceptions.js.map +1 -0
- package/build/languageProcessing/languages/fr/config/functionWords.js +138 -0
- package/build/languageProcessing/languages/fr/config/functionWords.js.map +1 -0
- package/build/languageProcessing/languages/fr/config/internal/exceptionsParticiplesActive.js +17 -0
- package/build/languageProcessing/languages/fr/config/internal/exceptionsParticiplesActive.js.map +1 -0
- package/build/languageProcessing/languages/fr/config/internal/passiveVoiceAuxiliaries.js +6 -0
- package/build/languageProcessing/languages/fr/config/internal/passiveVoiceAuxiliaries.js.map +1 -0
- package/build/languageProcessing/languages/fr/config/internal/passiveVoiceIrregulars.js +22 -0
- package/build/languageProcessing/languages/fr/config/internal/passiveVoiceIrregulars.js.map +1 -0
- package/build/languageProcessing/languages/fr/config/stopWords.js +6 -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 +7 -0
- package/build/languageProcessing/languages/fr/config/transitionWords.js.map +1 -0
- package/build/languageProcessing/languages/fr/config/twoPartTransitionWords.js +8 -0
- package/build/languageProcessing/languages/fr/config/twoPartTransitionWords.js.map +1 -0
- package/build/languageProcessing/languages/fr/config/wordComplexity.js +5 -0
- package/build/languageProcessing/languages/fr/config/wordComplexity.js.map +1 -0
- package/build/languageProcessing/languages/fr/helpers/calculateFleschReadingScore.js +17 -0
- package/build/languageProcessing/languages/fr/helpers/calculateFleschReadingScore.js.map +1 -0
- package/build/languageProcessing/languages/fr/helpers/checkIfWordIsComplex.js +66 -0
- package/build/languageProcessing/languages/fr/helpers/checkIfWordIsComplex.js.map +1 -0
- package/build/languageProcessing/languages/fr/helpers/getClauses.js +35 -0
- package/build/languageProcessing/languages/fr/helpers/getClauses.js.map +1 -0
- package/build/languageProcessing/languages/fr/helpers/getStemmer.js +22 -0
- package/build/languageProcessing/languages/fr/helpers/getStemmer.js.map +1 -0
- package/build/languageProcessing/languages/fr/helpers/internal/getParticiples.js +66 -0
- package/build/languageProcessing/languages/fr/helpers/internal/getParticiples.js.map +1 -0
- package/build/languageProcessing/languages/fr/helpers/internal/stem.js +537 -0
- package/build/languageProcessing/languages/fr/helpers/internal/stem.js.map +1 -0
- package/build/languageProcessing/languages/fr/values/Clause.js +84 -0
- package/build/languageProcessing/languages/fr/values/Clause.js.map +1 -0
- package/build/languageProcessing/languages/he/Researcher.js +51 -0
- package/build/languageProcessing/languages/he/Researcher.js.map +1 -0
- package/build/languageProcessing/languages/he/config/firstWordExceptions.js +12 -0
- package/build/languageProcessing/languages/he/config/firstWordExceptions.js.map +1 -0
- package/build/languageProcessing/languages/he/config/functionWords.js +497 -0
- package/build/languageProcessing/languages/he/config/functionWords.js.map +1 -0
- package/build/languageProcessing/languages/he/config/internal/regularRootsHufal.js +7 -0
- package/build/languageProcessing/languages/he/config/internal/regularRootsHufal.js.map +1 -0
- package/build/languageProcessing/languages/he/config/internal/regularRootsNifal.js +7 -0
- package/build/languageProcessing/languages/he/config/internal/regularRootsNifal.js.map +1 -0
- package/build/languageProcessing/languages/he/config/internal/regularRootsPual.js +7 -0
- package/build/languageProcessing/languages/he/config/internal/regularRootsPual.js.map +1 -0
- package/build/languageProcessing/languages/he/config/passiveVoice/regularRootsHufal.js +9 -0
- package/build/languageProcessing/languages/he/config/passiveVoice/regularRootsHufal.js.map +1 -0
- package/build/languageProcessing/languages/he/config/passiveVoice/regularRootsNifal.js +9 -0
- package/build/languageProcessing/languages/he/config/passiveVoice/regularRootsNifal.js.map +1 -0
- package/build/languageProcessing/languages/he/config/passiveVoice/regularRootsPual.js +9 -0
- package/build/languageProcessing/languages/he/config/passiveVoice/regularRootsPual.js.map +1 -0
- package/build/languageProcessing/languages/he/config/prefixedFunctionWords.js +3 -0
- package/build/languageProcessing/languages/he/config/prefixedFunctionWords.js.map +1 -0
- package/build/languageProcessing/languages/he/config/sentenceLength.js +4 -0
- package/build/languageProcessing/languages/he/config/sentenceLength.js.map +1 -0
- package/build/languageProcessing/languages/he/config/transitionWords.js +7 -0
- package/build/languageProcessing/languages/he/config/transitionWords.js.map +1 -0
- package/build/languageProcessing/languages/he/config/twoPartTransitionWords.js +8 -0
- package/build/languageProcessing/languages/he/config/twoPartTransitionWords.js.map +1 -0
- package/build/languageProcessing/languages/he/helpers/createBasicWordForms.js +35 -0
- package/build/languageProcessing/languages/he/helpers/createBasicWordForms.js.map +1 -0
- package/build/languageProcessing/languages/he/helpers/getStemmer.js +22 -0
- package/build/languageProcessing/languages/he/helpers/getStemmer.js.map +1 -0
- package/build/languageProcessing/languages/he/helpers/internal/stem.js +53 -0
- package/build/languageProcessing/languages/he/helpers/internal/stem.js.map +1 -0
- package/build/languageProcessing/languages/he/helpers/isPassiveSentence.js +116 -0
- package/build/languageProcessing/languages/he/helpers/isPassiveSentence.js.map +1 -0
- package/build/languageProcessing/languages/he/helpers/stem.js +53 -0
- package/build/languageProcessing/languages/he/helpers/stem.js.map +1 -0
- package/build/languageProcessing/languages/hu/Researcher.js +49 -0
- package/build/languageProcessing/languages/hu/Researcher.js.map +1 -0
- package/build/languageProcessing/languages/hu/config/firstWordExceptions.js +26 -0
- package/build/languageProcessing/languages/hu/config/firstWordExceptions.js.map +1 -0
- package/build/languageProcessing/languages/hu/config/functionWords.js +46 -0
- package/build/languageProcessing/languages/hu/config/functionWords.js.map +1 -0
- package/build/languageProcessing/languages/hu/config/internal/auxiliaries.js +14 -0
- package/build/languageProcessing/languages/hu/config/internal/auxiliaries.js.map +1 -0
- package/build/languageProcessing/languages/hu/config/internal/morphologicalPassiveAffixes.js +6 -0
- package/build/languageProcessing/languages/hu/config/internal/morphologicalPassiveAffixes.js.map +1 -0
- package/build/languageProcessing/languages/hu/config/internal/nonPassivesInVaAndVe.js +20 -0
- package/build/languageProcessing/languages/hu/config/internal/nonPassivesInVaAndVe.js.map +1 -0
- package/build/languageProcessing/languages/hu/config/internal/odikVerbs.js +19 -0
- package/build/languageProcessing/languages/hu/config/internal/odikVerbs.js.map +1 -0
- package/build/languageProcessing/languages/hu/config/internal/participles.js +20 -0
- package/build/languageProcessing/languages/hu/config/internal/participles.js.map +1 -0
- package/build/languageProcessing/languages/hu/config/stopWords.js +24 -0
- package/build/languageProcessing/languages/hu/config/stopWords.js.map +1 -0
- package/build/languageProcessing/languages/hu/config/transitionWords.js +7 -0
- package/build/languageProcessing/languages/hu/config/transitionWords.js.map +1 -0
- package/build/languageProcessing/languages/hu/config/twoPartTransitionWords.js +8 -0
- package/build/languageProcessing/languages/hu/config/twoPartTransitionWords.js.map +1 -0
- package/build/languageProcessing/languages/hu/helpers/getClauses.js +27 -0
- package/build/languageProcessing/languages/hu/helpers/getClauses.js.map +1 -0
- package/build/languageProcessing/languages/hu/helpers/getStemmer.js +22 -0
- package/build/languageProcessing/languages/hu/helpers/getStemmer.js.map +1 -0
- package/build/languageProcessing/languages/hu/helpers/internal/getParticiples.js +19 -0
- package/build/languageProcessing/languages/hu/helpers/internal/getParticiples.js.map +1 -0
- package/build/languageProcessing/languages/hu/helpers/internal/stem.js +384 -0
- package/build/languageProcessing/languages/hu/helpers/internal/stem.js.map +1 -0
- package/build/languageProcessing/languages/hu/helpers/isPassiveSentence.js +47 -0
- package/build/languageProcessing/languages/hu/helpers/isPassiveSentence.js.map +1 -0
- package/build/languageProcessing/languages/hu/values/Clause.js +41 -0
- package/build/languageProcessing/languages/hu/values/Clause.js.map +1 -0
- package/build/languageProcessing/languages/id/Researcher.js +47 -0
- package/build/languageProcessing/languages/id/Researcher.js.map +1 -0
- package/build/languageProcessing/languages/id/config/firstWordExceptions.js +12 -0
- package/build/languageProcessing/languages/id/config/firstWordExceptions.js.map +1 -0
- package/build/languageProcessing/languages/id/config/functionWords.js +101 -0
- package/build/languageProcessing/languages/id/config/functionWords.js.map +1 -0
- package/build/languageProcessing/languages/id/config/internal/nonPassiveVerbsStartingDi.js +7 -0
- package/build/languageProcessing/languages/id/config/internal/nonPassiveVerbsStartingDi.js.map +1 -0
- package/build/languageProcessing/languages/id/config/transitionWords.js +24 -0
- package/build/languageProcessing/languages/id/config/transitionWords.js.map +1 -0
- package/build/languageProcessing/languages/id/config/twoPartTransitionWords.js +9 -0
- package/build/languageProcessing/languages/id/config/twoPartTransitionWords.js.map +1 -0
- package/build/languageProcessing/languages/id/helpers/getStemmer.js +22 -0
- package/build/languageProcessing/languages/id/helpers/getStemmer.js.map +1 -0
- package/build/languageProcessing/languages/id/helpers/internal/stem.js +389 -0
- package/build/languageProcessing/languages/id/helpers/internal/stem.js.map +1 -0
- package/build/languageProcessing/languages/id/helpers/internal/stemHelpers.js +78 -0
- package/build/languageProcessing/languages/id/helpers/internal/stemHelpers.js.map +1 -0
- package/build/languageProcessing/languages/id/helpers/isPassiveSentence.js +40 -0
- package/build/languageProcessing/languages/id/helpers/isPassiveSentence.js.map +1 -0
- package/build/languageProcessing/languages/id/helpers/splitIntoTokensCustom.js +47 -0
- package/build/languageProcessing/languages/id/helpers/splitIntoTokensCustom.js.map +1 -0
- package/build/languageProcessing/languages/it/Researcher.js +49 -0
- package/build/languageProcessing/languages/it/Researcher.js.map +1 -0
- package/build/languageProcessing/languages/it/config/firstWordExceptions.js +14 -0
- package/build/languageProcessing/languages/it/config/firstWordExceptions.js.map +1 -0
- package/build/languageProcessing/languages/it/config/functionWords.js +135 -0
- package/build/languageProcessing/languages/it/config/functionWords.js.map +1 -0
- package/build/languageProcessing/languages/it/config/internal/passiveVoiceAuxiliaries.js +6 -0
- package/build/languageProcessing/languages/it/config/internal/passiveVoiceAuxiliaries.js.map +1 -0
- package/build/languageProcessing/languages/it/config/internal/passiveVoiceParticiples.js +7 -0
- package/build/languageProcessing/languages/it/config/internal/passiveVoiceParticiples.js.map +1 -0
- package/build/languageProcessing/languages/it/config/sentenceLength.js +4 -0
- package/build/languageProcessing/languages/it/config/sentenceLength.js.map +1 -0
- package/build/languageProcessing/languages/it/config/stopWords.js +6 -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 +7 -0
- package/build/languageProcessing/languages/it/config/transitionWords.js.map +1 -0
- package/build/languageProcessing/languages/it/config/twoPartTransitionWords.js +6 -0
- package/build/languageProcessing/languages/it/config/twoPartTransitionWords.js.map +1 -0
- package/build/languageProcessing/languages/it/helpers/calculateFleschReadingScore.js +17 -0
- package/build/languageProcessing/languages/it/helpers/calculateFleschReadingScore.js.map +1 -0
- package/build/languageProcessing/languages/it/helpers/getClauses.js +33 -0
- package/build/languageProcessing/languages/it/helpers/getClauses.js.map +1 -0
- package/build/languageProcessing/languages/it/helpers/getStemmer.js +22 -0
- package/build/languageProcessing/languages/it/helpers/getStemmer.js.map +1 -0
- package/build/languageProcessing/languages/it/helpers/internal/getParticiples.js +36 -0
- package/build/languageProcessing/languages/it/helpers/internal/getParticiples.js.map +1 -0
- package/build/languageProcessing/languages/it/helpers/internal/stem.js +402 -0
- package/build/languageProcessing/languages/it/helpers/internal/stem.js.map +1 -0
- package/build/languageProcessing/languages/it/values/Clause.js +44 -0
- package/build/languageProcessing/languages/it/values/Clause.js.map +1 -0
- package/build/languageProcessing/languages/ja/Researcher.js +86 -0
- package/build/languageProcessing/languages/ja/Researcher.js.map +1 -0
- package/build/languageProcessing/languages/ja/config/assessmentApplicabilityCharacterCount.js +5 -0
- package/build/languageProcessing/languages/ja/config/assessmentApplicabilityCharacterCount.js.map +1 -0
- package/build/languageProcessing/languages/ja/config/firstWordExceptions.js +8 -0
- package/build/languageProcessing/languages/ja/config/firstWordExceptions.js.map +1 -0
- package/build/languageProcessing/languages/ja/config/functionWords.js +2 -0
- package/build/languageProcessing/languages/ja/config/functionWords.js.map +1 -0
- package/build/languageProcessing/languages/ja/config/keyphraseLength.js +17 -0
- package/build/languageProcessing/languages/ja/config/keyphraseLength.js.map +1 -0
- package/build/languageProcessing/languages/ja/config/metaDescriptionLength.js +5 -0
- package/build/languageProcessing/languages/ja/config/metaDescriptionLength.js.map +1 -0
- package/build/languageProcessing/languages/ja/config/paragraphLength.js +11 -0
- package/build/languageProcessing/languages/ja/config/paragraphLength.js.map +1 -0
- package/build/languageProcessing/languages/ja/config/sentenceLength.js +5 -0
- package/build/languageProcessing/languages/ja/config/sentenceLength.js.map +1 -0
- package/build/languageProcessing/languages/ja/config/subheadingsTooLong.js +19 -0
- package/build/languageProcessing/languages/ja/config/subheadingsTooLong.js.map +1 -0
- package/build/languageProcessing/languages/ja/config/textLength.js +48 -0
- package/build/languageProcessing/languages/ja/config/textLength.js.map +1 -0
- package/build/languageProcessing/languages/ja/config/topicLength.js +6 -0
- package/build/languageProcessing/languages/ja/config/topicLength.js.map +1 -0
- package/build/languageProcessing/languages/ja/config/transitionWords.js +4 -0
- package/build/languageProcessing/languages/ja/config/transitionWords.js.map +1 -0
- package/build/languageProcessing/languages/ja/customResearches/findKeyphraseInSEOTitle.js +96 -0
- package/build/languageProcessing/languages/ja/customResearches/findKeyphraseInSEOTitle.js.map +1 -0
- package/build/languageProcessing/languages/ja/customResearches/getKeyphraseLength.js +19 -0
- package/build/languageProcessing/languages/ja/customResearches/getKeyphraseLength.js.map +1 -0
- package/build/languageProcessing/languages/ja/customResearches/getWordForms.js +51 -0
- package/build/languageProcessing/languages/ja/customResearches/getWordForms.js.map +1 -0
- package/build/languageProcessing/languages/ja/customResearches/textLength.js +25 -0
- package/build/languageProcessing/languages/ja/customResearches/textLength.js.map +1 -0
- package/build/languageProcessing/languages/ja/helpers/countCharacters.js +21 -0
- package/build/languageProcessing/languages/ja/helpers/countCharacters.js.map +1 -0
- package/build/languageProcessing/languages/ja/helpers/customGetStemmer.js +22 -0
- package/build/languageProcessing/languages/ja/helpers/customGetStemmer.js.map +1 -0
- package/build/languageProcessing/languages/ja/helpers/getContentWords.js +21 -0
- package/build/languageProcessing/languages/ja/helpers/getContentWords.js.map +1 -0
- package/build/languageProcessing/languages/ja/helpers/getWords.js +31 -0
- package/build/languageProcessing/languages/ja/helpers/getWords.js.map +1 -0
- package/build/languageProcessing/languages/ja/helpers/internal/SentenceTokenizer.js +92 -0
- package/build/languageProcessing/languages/ja/helpers/internal/SentenceTokenizer.js.map +1 -0
- package/build/languageProcessing/languages/ja/helpers/internal/createWordForms.js +65 -0
- package/build/languageProcessing/languages/ja/helpers/internal/createWordForms.js.map +1 -0
- package/build/languageProcessing/languages/ja/helpers/internal/determineStem.js +17 -0
- package/build/languageProcessing/languages/ja/helpers/internal/determineStem.js.map +1 -0
- package/build/languageProcessing/languages/ja/helpers/matchTextWithWord.js +52 -0
- package/build/languageProcessing/languages/ja/helpers/matchTextWithWord.js.map +1 -0
- package/build/languageProcessing/languages/ja/helpers/matchTransitionWords.js +23 -0
- package/build/languageProcessing/languages/ja/helpers/matchTransitionWords.js.map +1 -0
- package/build/languageProcessing/languages/ja/helpers/memoizedSentenceTokenizer.js +31 -0
- package/build/languageProcessing/languages/ja/helpers/memoizedSentenceTokenizer.js.map +1 -0
- package/build/languageProcessing/languages/ja/helpers/splitIntoTokensCustom.js +21 -0
- package/build/languageProcessing/languages/ja/helpers/splitIntoTokensCustom.js.map +1 -0
- package/build/languageProcessing/languages/ja/helpers/wordsCharacterCount.js +13 -0
- package/build/languageProcessing/languages/ja/helpers/wordsCharacterCount.js.map +1 -0
- package/build/languageProcessing/languages/nb/Researcher.js +46 -0
- package/build/languageProcessing/languages/nb/Researcher.js.map +1 -0
- package/build/languageProcessing/languages/nb/config/firstWordExceptions.js +12 -0
- package/build/languageProcessing/languages/nb/config/firstWordExceptions.js.map +1 -0
- package/build/languageProcessing/languages/nb/config/functionWords.js +48 -0
- package/build/languageProcessing/languages/nb/config/functionWords.js.map +1 -0
- package/build/languageProcessing/languages/nb/config/internal/participles.js +7 -0
- package/build/languageProcessing/languages/nb/config/internal/participles.js.map +1 -0
- package/build/languageProcessing/languages/nb/config/internal/passiveVoiceAuxiliaries.js +6 -0
- package/build/languageProcessing/languages/nb/config/internal/passiveVoiceAuxiliaries.js.map +1 -0
- package/build/languageProcessing/languages/nb/config/stopWords.js +7 -0
- package/build/languageProcessing/languages/nb/config/stopWords.js.map +1 -0
- package/build/languageProcessing/languages/nb/config/transitionWords.js +7 -0
- package/build/languageProcessing/languages/nb/config/transitionWords.js.map +1 -0
- package/build/languageProcessing/languages/nb/config/twoPartTransitionWords.js +8 -0
- package/build/languageProcessing/languages/nb/config/twoPartTransitionWords.js.map +1 -0
- package/build/languageProcessing/languages/nb/helpers/getClauses.js +30 -0
- package/build/languageProcessing/languages/nb/helpers/getClauses.js.map +1 -0
- package/build/languageProcessing/languages/nb/helpers/getStemmer.js +22 -0
- package/build/languageProcessing/languages/nb/helpers/getStemmer.js.map +1 -0
- package/build/languageProcessing/languages/nb/helpers/internal/getParticiples.js +25 -0
- package/build/languageProcessing/languages/nb/helpers/internal/getParticiples.js.map +1 -0
- package/build/languageProcessing/languages/nb/helpers/internal/stem.js +129 -0
- package/build/languageProcessing/languages/nb/helpers/internal/stem.js.map +1 -0
- package/build/languageProcessing/languages/nb/values/Clause.js +43 -0
- package/build/languageProcessing/languages/nb/values/Clause.js.map +1 -0
- package/build/languageProcessing/languages/nl/Researcher.js +49 -0
- package/build/languageProcessing/languages/nl/Researcher.js.map +1 -0
- package/build/languageProcessing/languages/nl/config/firstWordExceptions.js +14 -0
- package/build/languageProcessing/languages/nl/config/firstWordExceptions.js.map +1 -0
- package/build/languageProcessing/languages/nl/config/functionWords.js +96 -0
- package/build/languageProcessing/languages/nl/config/functionWords.js.map +1 -0
- package/build/languageProcessing/languages/nl/config/internal/nonParticiples.js +6 -0
- package/build/languageProcessing/languages/nl/config/internal/nonParticiples.js.map +1 -0
- package/build/languageProcessing/languages/nl/config/internal/passiveVoiceAuxiliaries.js +6 -0
- package/build/languageProcessing/languages/nl/config/internal/passiveVoiceAuxiliaries.js.map +1 -0
- package/build/languageProcessing/languages/nl/config/internal/passiveVoiceIrregulars.js +7 -0
- package/build/languageProcessing/languages/nl/config/internal/passiveVoiceIrregulars.js.map +1 -0
- package/build/languageProcessing/languages/nl/config/keyphraseLength.js +11 -0
- package/build/languageProcessing/languages/nl/config/keyphraseLength.js.map +1 -0
- package/build/languageProcessing/languages/nl/config/stopWords.js +6 -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 +5 -0
- package/build/languageProcessing/languages/nl/config/transitionWords.js.map +1 -0
- package/build/languageProcessing/languages/nl/config/twoPartTransitionWords.js +6 -0
- package/build/languageProcessing/languages/nl/config/twoPartTransitionWords.js.map +1 -0
- package/build/languageProcessing/languages/nl/helpers/calculateFleschReadingScore.js +17 -0
- package/build/languageProcessing/languages/nl/helpers/calculateFleschReadingScore.js.map +1 -0
- package/build/languageProcessing/languages/nl/helpers/getClauses.js +27 -0
- package/build/languageProcessing/languages/nl/helpers/getClauses.js.map +1 -0
- package/build/languageProcessing/languages/nl/helpers/getStemmer.js +22 -0
- package/build/languageProcessing/languages/nl/helpers/getStemmer.js.map +1 -0
- package/build/languageProcessing/languages/nl/helpers/internal/checkExceptionsWithFullForms.js +118 -0
- package/build/languageProcessing/languages/nl/helpers/internal/checkExceptionsWithFullForms.js.map +1 -0
- package/build/languageProcessing/languages/nl/helpers/internal/detectAndStemRegularParticiple.js +254 -0
- package/build/languageProcessing/languages/nl/helpers/internal/detectAndStemRegularParticiple.js.map +1 -0
- package/build/languageProcessing/languages/nl/helpers/internal/detectAndStemSuffixes.js +152 -0
- package/build/languageProcessing/languages/nl/helpers/internal/detectAndStemSuffixes.js.map +1 -0
- package/build/languageProcessing/languages/nl/helpers/internal/determineStem.js +114 -0
- package/build/languageProcessing/languages/nl/helpers/internal/determineStem.js.map +1 -0
- package/build/languageProcessing/languages/nl/helpers/internal/getParticiples.js +21 -0
- package/build/languageProcessing/languages/nl/helpers/internal/getParticiples.js.map +1 -0
- package/build/languageProcessing/languages/nl/helpers/internal/getStemWordsWithTAndDEnding.js +147 -0
- package/build/languageProcessing/languages/nl/helpers/internal/getStemWordsWithTAndDEnding.js.map +1 -0
- package/build/languageProcessing/languages/nl/helpers/internal/stem.js +125 -0
- package/build/languageProcessing/languages/nl/helpers/internal/stem.js.map +1 -0
- package/build/languageProcessing/languages/nl/helpers/internal/stemModificationHelpers.js +87 -0
- package/build/languageProcessing/languages/nl/helpers/internal/stemModificationHelpers.js.map +1 -0
- package/build/languageProcessing/languages/nl/helpers/internal/stemTOrDFromEndOfWord.js +53 -0
- package/build/languageProcessing/languages/nl/helpers/internal/stemTOrDFromEndOfWord.js.map +1 -0
- package/build/languageProcessing/languages/nl/values/Clause.js +57 -0
- package/build/languageProcessing/languages/nl/values/Clause.js.map +1 -0
- package/build/languageProcessing/languages/pl/Researcher.js +48 -0
- package/build/languageProcessing/languages/pl/Researcher.js.map +1 -0
- package/build/languageProcessing/languages/pl/config/firstWordExceptions.js +10 -0
- package/build/languageProcessing/languages/pl/config/firstWordExceptions.js.map +1 -0
- package/build/languageProcessing/languages/pl/config/functionWords.js +71 -0
- package/build/languageProcessing/languages/pl/config/functionWords.js.map +1 -0
- package/build/languageProcessing/languages/pl/config/internal/auxiliaries.js +6 -0
- package/build/languageProcessing/languages/pl/config/internal/auxiliaries.js.map +1 -0
- package/build/languageProcessing/languages/pl/config/internal/participles.js +7 -0
- package/build/languageProcessing/languages/pl/config/internal/participles.js.map +1 -0
- package/build/languageProcessing/languages/pl/config/sentenceLength.js +11 -0
- package/build/languageProcessing/languages/pl/config/sentenceLength.js.map +1 -0
- package/build/languageProcessing/languages/pl/config/stopWords.js +6 -0
- package/build/languageProcessing/languages/pl/config/stopWords.js.map +1 -0
- package/build/languageProcessing/languages/pl/config/transitionWords.js +7 -0
- package/build/languageProcessing/languages/pl/config/transitionWords.js.map +1 -0
- package/build/languageProcessing/languages/pl/config/twoPartTransitionWords.js +8 -0
- package/build/languageProcessing/languages/pl/config/twoPartTransitionWords.js.map +1 -0
- package/build/languageProcessing/languages/pl/helpers/getClauses.js +27 -0
- package/build/languageProcessing/languages/pl/helpers/getClauses.js.map +1 -0
- package/build/languageProcessing/languages/pl/helpers/getStemmer.js +22 -0
- package/build/languageProcessing/languages/pl/helpers/getStemmer.js.map +1 -0
- package/build/languageProcessing/languages/pl/helpers/internal/getParticiples.js +19 -0
- package/build/languageProcessing/languages/pl/helpers/internal/getParticiples.js.map +1 -0
- package/build/languageProcessing/languages/pl/helpers/internal/stem.js +152 -0
- package/build/languageProcessing/languages/pl/helpers/internal/stem.js.map +1 -0
- package/build/languageProcessing/languages/pl/values/Clause.js +45 -0
- package/build/languageProcessing/languages/pl/values/Clause.js.map +1 -0
- package/build/languageProcessing/languages/pt/Researcher.js +49 -0
- package/build/languageProcessing/languages/pt/Researcher.js.map +1 -0
- package/build/languageProcessing/languages/pt/config/firstWordExceptions.js +14 -0
- package/build/languageProcessing/languages/pt/config/firstWordExceptions.js.map +1 -0
- package/build/languageProcessing/languages/pt/config/functionWords.js +92 -0
- package/build/languageProcessing/languages/pt/config/functionWords.js.map +1 -0
- package/build/languageProcessing/languages/pt/config/internal/passiveVoiceAuxiliaries.js +6 -0
- package/build/languageProcessing/languages/pt/config/internal/passiveVoiceAuxiliaries.js.map +1 -0
- package/build/languageProcessing/languages/pt/config/internal/passiveVoiceParticiples.js +7 -0
- package/build/languageProcessing/languages/pt/config/internal/passiveVoiceParticiples.js.map +1 -0
- package/build/languageProcessing/languages/pt/config/sentenceLength.js +4 -0
- package/build/languageProcessing/languages/pt/config/sentenceLength.js.map +1 -0
- package/build/languageProcessing/languages/pt/config/stopWords.js +6 -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 +5 -0
- package/build/languageProcessing/languages/pt/config/transitionWords.js.map +1 -0
- package/build/languageProcessing/languages/pt/config/twoPartTransitionWords.js +6 -0
- package/build/languageProcessing/languages/pt/config/twoPartTransitionWords.js.map +1 -0
- package/build/languageProcessing/languages/pt/helpers/calculateFleschReadingScore.js +17 -0
- package/build/languageProcessing/languages/pt/helpers/calculateFleschReadingScore.js.map +1 -0
- package/build/languageProcessing/languages/pt/helpers/getClauses.js +31 -0
- package/build/languageProcessing/languages/pt/helpers/getClauses.js.map +1 -0
- package/build/languageProcessing/languages/pt/helpers/getStemmer.js +22 -0
- package/build/languageProcessing/languages/pt/helpers/getStemmer.js.map +1 -0
- package/build/languageProcessing/languages/pt/helpers/internal/getParticiples.js +37 -0
- package/build/languageProcessing/languages/pt/helpers/internal/getParticiples.js.map +1 -0
- package/build/languageProcessing/languages/pt/helpers/internal/stem.js +277 -0
- package/build/languageProcessing/languages/pt/helpers/internal/stem.js.map +1 -0
- package/build/languageProcessing/languages/pt/values/Clause.js +43 -0
- package/build/languageProcessing/languages/pt/values/Clause.js.map +1 -0
- package/build/languageProcessing/languages/ru/Researcher.js +49 -0
- package/build/languageProcessing/languages/ru/Researcher.js.map +1 -0
- package/build/languageProcessing/languages/ru/config/firstWordExceptions.js +10 -0
- package/build/languageProcessing/languages/ru/config/firstWordExceptions.js.map +1 -0
- package/build/languageProcessing/languages/ru/config/fleschReadingEaseScores.js +21 -0
- package/build/languageProcessing/languages/ru/config/fleschReadingEaseScores.js.map +1 -0
- package/build/languageProcessing/languages/ru/config/functionWords.js +85 -0
- package/build/languageProcessing/languages/ru/config/functionWords.js.map +1 -0
- package/build/languageProcessing/languages/ru/config/internal/participlesShortenedList.js +21 -0
- package/build/languageProcessing/languages/ru/config/internal/participlesShortenedList.js.map +1 -0
- package/build/languageProcessing/languages/ru/config/internal/passiveVoiceParticiples.js +18 -0
- package/build/languageProcessing/languages/ru/config/internal/passiveVoiceParticiples.js.map +1 -0
- package/build/languageProcessing/languages/ru/config/sentenceLength.js +4 -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 +7 -0
- package/build/languageProcessing/languages/ru/config/transitionWords.js.map +1 -0
- package/build/languageProcessing/languages/ru/config/twoPartTransitionWords.js +8 -0
- package/build/languageProcessing/languages/ru/config/twoPartTransitionWords.js.map +1 -0
- package/build/languageProcessing/languages/ru/helpers/calculateFleschReadingScore.js +17 -0
- package/build/languageProcessing/languages/ru/helpers/calculateFleschReadingScore.js.map +1 -0
- package/build/languageProcessing/languages/ru/helpers/getStemmer.js +22 -0
- package/build/languageProcessing/languages/ru/helpers/getStemmer.js.map +1 -0
- package/build/languageProcessing/languages/ru/helpers/internal/stem.js +265 -0
- package/build/languageProcessing/languages/ru/helpers/internal/stem.js.map +1 -0
- package/build/languageProcessing/languages/ru/helpers/isPassiveSentence.js +16 -0
- package/build/languageProcessing/languages/ru/helpers/isPassiveSentence.js.map +1 -0
- package/build/languageProcessing/languages/sk/Researcher.js +47 -0
- package/build/languageProcessing/languages/sk/Researcher.js.map +1 -0
- package/build/languageProcessing/languages/sk/config/firstWordExceptions.js +12 -0
- package/build/languageProcessing/languages/sk/config/firstWordExceptions.js.map +1 -0
- package/build/languageProcessing/languages/sk/config/functionWords.js +12 -0
- package/build/languageProcessing/languages/sk/config/functionWords.js.map +1 -0
- package/build/languageProcessing/languages/sk/config/internal/nonPassives.js +8 -0
- package/build/languageProcessing/languages/sk/config/internal/nonPassives.js.map +1 -0
- package/build/languageProcessing/languages/sk/config/internal/passiveVoiceAuxiliaries.js +4 -0
- package/build/languageProcessing/languages/sk/config/internal/passiveVoiceAuxiliaries.js.map +1 -0
- package/build/languageProcessing/languages/sk/config/stopWords.js +7 -0
- package/build/languageProcessing/languages/sk/config/stopWords.js.map +1 -0
- package/build/languageProcessing/languages/sk/config/transitionWords.js +7 -0
- package/build/languageProcessing/languages/sk/config/transitionWords.js.map +1 -0
- package/build/languageProcessing/languages/sk/config/twoPartTransitionWords.js +8 -0
- package/build/languageProcessing/languages/sk/config/twoPartTransitionWords.js.map +1 -0
- package/build/languageProcessing/languages/sk/helpers/getClauses.js +28 -0
- package/build/languageProcessing/languages/sk/helpers/getClauses.js.map +1 -0
- package/build/languageProcessing/languages/sk/helpers/getStemmer.js +22 -0
- package/build/languageProcessing/languages/sk/helpers/getStemmer.js.map +1 -0
- package/build/languageProcessing/languages/sk/helpers/internal/getParticiples.js +18 -0
- package/build/languageProcessing/languages/sk/helpers/internal/getParticiples.js.map +1 -0
- package/build/languageProcessing/languages/sk/helpers/internal/stem.js +316 -0
- package/build/languageProcessing/languages/sk/helpers/internal/stem.js.map +1 -0
- package/build/languageProcessing/languages/sk/values/Clause.js +41 -0
- package/build/languageProcessing/languages/sk/values/Clause.js.map +1 -0
- package/build/languageProcessing/languages/sv/Researcher.js +46 -0
- package/build/languageProcessing/languages/sv/Researcher.js.map +1 -0
- package/build/languageProcessing/languages/sv/config/firstWordExceptions.js +15 -0
- package/build/languageProcessing/languages/sv/config/firstWordExceptions.js.map +1 -0
- package/build/languageProcessing/languages/sv/config/functionWords.js +68 -0
- package/build/languageProcessing/languages/sv/config/functionWords.js.map +1 -0
- package/build/languageProcessing/languages/sv/config/internal/passiveVerbs.js +7 -0
- package/build/languageProcessing/languages/sv/config/internal/passiveVerbs.js.map +1 -0
- package/build/languageProcessing/languages/sv/config/keyphraseLength.js +11 -0
- package/build/languageProcessing/languages/sv/config/keyphraseLength.js.map +1 -0
- package/build/languageProcessing/languages/sv/config/transitionWords.js +7 -0
- package/build/languageProcessing/languages/sv/config/transitionWords.js.map +1 -0
- package/build/languageProcessing/languages/sv/config/twoPartTransitionWords.js +8 -0
- package/build/languageProcessing/languages/sv/config/twoPartTransitionWords.js.map +1 -0
- package/build/languageProcessing/languages/sv/helpers/getStemmer.js +22 -0
- package/build/languageProcessing/languages/sv/helpers/getStemmer.js.map +1 -0
- package/build/languageProcessing/languages/sv/helpers/internal/stem.js +153 -0
- package/build/languageProcessing/languages/sv/helpers/internal/stem.js.map +1 -0
- package/build/languageProcessing/languages/sv/helpers/isPassiveSentence.js +16 -0
- package/build/languageProcessing/languages/sv/helpers/isPassiveSentence.js.map +1 -0
- package/build/languageProcessing/languages/tr/Researcher.js +44 -0
- package/build/languageProcessing/languages/tr/Researcher.js.map +1 -0
- package/build/languageProcessing/languages/tr/config/firstWordExceptions.js +12 -0
- package/build/languageProcessing/languages/tr/config/firstWordExceptions.js.map +1 -0
- package/build/languageProcessing/languages/tr/config/functionWords.js +45 -0
- package/build/languageProcessing/languages/tr/config/functionWords.js.map +1 -0
- package/build/languageProcessing/languages/tr/config/internal/nonPassiveExceptions.js +8 -0
- package/build/languageProcessing/languages/tr/config/internal/nonPassiveExceptions.js.map +1 -0
- package/build/languageProcessing/languages/tr/config/internal/passiveEndings.js +7 -0
- package/build/languageProcessing/languages/tr/config/internal/passiveEndings.js.map +1 -0
- package/build/languageProcessing/languages/tr/config/sentenceLength.js +8 -0
- package/build/languageProcessing/languages/tr/config/sentenceLength.js.map +1 -0
- package/build/languageProcessing/languages/tr/config/transitionWords.js +7 -0
- package/build/languageProcessing/languages/tr/config/transitionWords.js.map +1 -0
- package/build/languageProcessing/languages/tr/config/twoPartTransitionWords.js +8 -0
- package/build/languageProcessing/languages/tr/config/twoPartTransitionWords.js.map +1 -0
- package/build/languageProcessing/languages/tr/helpers/getStemmer.js +22 -0
- package/build/languageProcessing/languages/tr/helpers/getStemmer.js.map +1 -0
- package/build/languageProcessing/languages/tr/helpers/internal/stem.js +19 -0
- package/build/languageProcessing/languages/tr/helpers/internal/stem.js.map +1 -0
- package/build/languageProcessing/languages/tr/helpers/isPassiveSentence.js +40 -0
- package/build/languageProcessing/languages/tr/helpers/isPassiveSentence.js.map +1 -0
- package/build/languageProcessing/researches/altTagCount.js +66 -0
- package/build/languageProcessing/researches/altTagCount.js.map +1 -0
- package/build/languageProcessing/researches/checkRelatedKeywords.js +71 -0
- package/build/languageProcessing/researches/checkRelatedKeywords.js.map +1 -0
- package/build/languageProcessing/researches/countSentencesFromText.js +20 -0
- package/build/languageProcessing/researches/countSentencesFromText.js.map +1 -0
- package/build/languageProcessing/researches/findKeyphraseInSEOTitle.js +250 -0
- package/build/languageProcessing/researches/findKeyphraseInSEOTitle.js.map +1 -0
- package/build/languageProcessing/researches/findKeywordInFirstParagraph.js +74 -0
- package/build/languageProcessing/researches/findKeywordInFirstParagraph.js.map +1 -0
- package/build/languageProcessing/researches/findTransitionWords.js +112 -0
- package/build/languageProcessing/researches/findTransitionWords.js.map +1 -0
- package/build/languageProcessing/researches/functionWordsInKeyphrase.js +42 -0
- package/build/languageProcessing/researches/functionWordsInKeyphrase.js.map +1 -0
- package/build/languageProcessing/researches/getAnchorsWithKeyphrase.js +215 -0
- package/build/languageProcessing/researches/getAnchorsWithKeyphrase.js.map +1 -0
- package/build/languageProcessing/researches/getFleschReadingScore.js +145 -0
- package/build/languageProcessing/researches/getFleschReadingScore.js.map +1 -0
- package/build/languageProcessing/researches/getKeywordDensity.js +42 -0
- package/build/languageProcessing/researches/getKeywordDensity.js.map +1 -0
- package/build/languageProcessing/researches/getLinkStatistics.js +50 -0
- package/build/languageProcessing/researches/getLinkStatistics.js.map +1 -0
- package/build/languageProcessing/researches/getLinks.js +17 -0
- package/build/languageProcessing/researches/getLinks.js.map +1 -0
- package/build/languageProcessing/researches/getLongCenterAlignedTexts.js +36 -0
- package/build/languageProcessing/researches/getLongCenterAlignedTexts.js.map +1 -0
- package/build/languageProcessing/researches/getParagraphLength.js +43 -0
- package/build/languageProcessing/researches/getParagraphLength.js.map +1 -0
- package/build/languageProcessing/researches/getParagraphs.js +18 -0
- package/build/languageProcessing/researches/getParagraphs.js.map +1 -0
- package/build/languageProcessing/researches/getPassiveVoiceResult.js +118 -0
- package/build/languageProcessing/researches/getPassiveVoiceResult.js.map +1 -0
- package/build/languageProcessing/researches/getProminentWordsForInsights.js +39 -0
- package/build/languageProcessing/researches/getProminentWordsForInsights.js.map +1 -0
- package/build/languageProcessing/researches/getProminentWordsForInternalLinking.js +97 -0
- package/build/languageProcessing/researches/getProminentWordsForInternalLinking.js.map +1 -0
- package/build/languageProcessing/researches/getSentenceBeginnings.js +116 -0
- package/build/languageProcessing/researches/getSentenceBeginnings.js.map +1 -0
- package/build/languageProcessing/researches/getSubheadingTextLengths.js +54 -0
- package/build/languageProcessing/researches/getSubheadingTextLengths.js.map +1 -0
- package/build/languageProcessing/researches/getWordForms.js +177 -0
- package/build/languageProcessing/researches/getWordForms.js.map +1 -0
- package/build/languageProcessing/researches/h1s.js +11 -0
- package/build/languageProcessing/researches/h1s.js.map +1 -0
- package/build/languageProcessing/researches/imageCount.js +16 -0
- package/build/languageProcessing/researches/imageCount.js.map +1 -0
- package/build/languageProcessing/researches/index.js +5 -0
- package/build/languageProcessing/researches/index.js.map +1 -0
- package/build/languageProcessing/researches/keyphraseDistribution.js +223 -0
- package/build/languageProcessing/researches/keyphraseDistribution.js.map +1 -0
- package/build/languageProcessing/researches/keyphraseLength.js +17 -0
- package/build/languageProcessing/researches/keyphraseLength.js.map +1 -0
- package/build/languageProcessing/researches/keywordCount.js +127 -0
- package/build/languageProcessing/researches/keywordCount.js.map +1 -0
- package/build/languageProcessing/researches/keywordCountInUrl.js +50 -0
- package/build/languageProcessing/researches/keywordCountInUrl.js.map +1 -0
- package/build/languageProcessing/researches/matchKeywordInSubheadings.js +62 -0
- package/build/languageProcessing/researches/matchKeywordInSubheadings.js.map +1 -0
- package/build/languageProcessing/researches/metaDescriptionKeyword.js +72 -0
- package/build/languageProcessing/researches/metaDescriptionKeyword.js.map +1 -0
- package/build/languageProcessing/researches/metaDescriptionLength.js +13 -0
- package/build/languageProcessing/researches/metaDescriptionLength.js.map +1 -0
- package/build/languageProcessing/researches/pageTitleWidth.js +12 -0
- package/build/languageProcessing/researches/pageTitleWidth.js.map +1 -0
- package/build/languageProcessing/researches/readingTime.js +78 -0
- package/build/languageProcessing/researches/readingTime.js.map +1 -0
- package/build/languageProcessing/researches/sentences.js +20 -0
- package/build/languageProcessing/researches/sentences.js.map +1 -0
- package/build/languageProcessing/researches/videoCount.js +33 -0
- package/build/languageProcessing/researches/videoCount.js.map +1 -0
- package/build/languageProcessing/researches/wordComplexity.js +122 -0
- package/build/languageProcessing/researches/wordComplexity.js.map +1 -0
- package/build/languageProcessing/researches/wordCountInText.js +30 -0
- package/build/languageProcessing/researches/wordCountInText.js.map +1 -0
- package/build/languageProcessing/values/Clause.js +107 -0
- package/build/languageProcessing/values/Clause.js.map +1 -0
- package/build/languageProcessing/values/ProminentWord.js +95 -0
- package/build/languageProcessing/values/ProminentWord.js.map +1 -0
- package/build/languageProcessing/values/Sentence.js +110 -0
- package/build/languageProcessing/values/Sentence.js.map +1 -0
- package/build/languageProcessing/values/index.js +5 -0
- package/build/languageProcessing/values/index.js.map +1 -0
- package/build/markers/addMark.js +10 -0
- package/build/markers/addMark.js.map +1 -0
- package/build/markers/addMarkSingleWord.js +32 -0
- package/build/markers/addMarkSingleWord.js.map +1 -0
- package/build/markers/index.js +4 -0
- package/build/markers/index.js.map +1 -0
- package/build/markers/removeDuplicateMarks.js +26 -0
- package/build/markers/removeDuplicateMarks.js.map +1 -0
- package/build/markers/removeMarks.js +10 -0
- package/build/markers/removeMarks.js.map +1 -0
- package/build/parse/build/build.js +54 -0
- package/build/parse/build/build.js.map +1 -0
- package/build/parse/build/index.js +9 -0
- package/build/parse/build/index.js.map +1 -0
- package/build/parse/build/private/adapt.js +105 -0
- package/build/parse/build/private/adapt.js.map +1 -0
- package/build/parse/build/private/adaptAttributes.js +35 -0
- package/build/parse/build/private/adaptAttributes.js.map +1 -0
- package/build/parse/build/private/alwaysFilterElements.js +27 -0
- package/build/parse/build/private/alwaysFilterElements.js.map +1 -0
- package/build/parse/build/private/combineIntoImplicitParagraphs.js +123 -0
- package/build/parse/build/private/combineIntoImplicitParagraphs.js.map +1 -0
- package/build/parse/build/private/filterBeforeTokenizing.js +32 -0
- package/build/parse/build/private/filterBeforeTokenizing.js.map +1 -0
- package/build/parse/build/private/filterHelpers.js +44 -0
- package/build/parse/build/private/filterHelpers.js.map +1 -0
- package/build/parse/build/private/filterTree.js +42 -0
- package/build/parse/build/private/filterTree.js.map +1 -0
- package/build/parse/build/private/getTextElementPositions.js +179 -0
- package/build/parse/build/private/getTextElementPositions.js.map +1 -0
- package/build/parse/build/private/helpers/parseClassAttribute.js +9 -0
- package/build/parse/build/private/helpers/parseClassAttribute.js.map +1 -0
- package/build/parse/build/private/isPhrasingContent.js +24 -0
- package/build/parse/build/private/isPhrasingContent.js.map +1 -0
- package/build/parse/build/private/parseBlocks.js +144 -0
- package/build/parse/build/private/parseBlocks.js.map +1 -0
- package/build/parse/build/private/tokenize.js +72 -0
- package/build/parse/build/private/tokenize.js.map +1 -0
- package/build/parse/language/LanguageProcessor.js +70 -0
- package/build/parse/language/LanguageProcessor.js.map +1 -0
- package/build/parse/structure/Heading.js +26 -0
- package/build/parse/structure/Heading.js.map +1 -0
- package/build/parse/structure/Node.js +69 -0
- package/build/parse/structure/Node.js.map +1 -0
- package/build/parse/structure/Paragraph.js +47 -0
- package/build/parse/structure/Paragraph.js.map +1 -0
- package/build/parse/structure/Sentence.js +30 -0
- package/build/parse/structure/Sentence.js.map +1 -0
- package/build/parse/structure/SourceCodeLocation.js +40 -0
- package/build/parse/structure/SourceCodeLocation.js.map +1 -0
- package/build/parse/structure/Text.js +26 -0
- package/build/parse/structure/Text.js.map +1 -0
- package/build/parse/structure/Token.js +24 -0
- package/build/parse/structure/Token.js.map +1 -0
- package/build/parse/structure/index.js +12 -0
- package/build/parse/structure/index.js.map +1 -0
- package/build/parse/traverse/findAllInTree.js +56 -0
- package/build/parse/traverse/findAllInTree.js.map +1 -0
- package/build/parse/traverse/index.js +10 -0
- package/build/parse/traverse/index.js.map +1 -0
- package/build/parse/traverse/innerText.js +25 -0
- package/build/parse/traverse/innerText.js.map +1 -0
- package/build/parsedPaper/ParsedPaper.js +93 -0
- package/build/parsedPaper/ParsedPaper.js.map +1 -0
- package/build/parsedPaper/assess/TreeAssessor.js +175 -0
- package/build/parsedPaper/assess/TreeAssessor.js.map +1 -0
- package/build/parsedPaper/assess/assessmentListFactories.js +67 -0
- package/build/parsedPaper/assess/assessmentListFactories.js.map +1 -0
- package/build/parsedPaper/assess/assessments/Assessment.js +92 -0
- package/build/parsedPaper/assess/assessments/Assessment.js.map +1 -0
- package/build/parsedPaper/assess/assessments/index.js +7 -0
- package/build/parsedPaper/assess/assessments/index.js.map +1 -0
- package/build/parsedPaper/assess/assessorFactories.js +96 -0
- package/build/parsedPaper/assess/assessorFactories.js.map +1 -0
- package/build/parsedPaper/assess/cornerstone/assessmentListFactories.js +43 -0
- package/build/parsedPaper/assess/cornerstone/assessmentListFactories.js.map +1 -0
- package/build/parsedPaper/assess/cornerstone/index.js +3 -0
- package/build/parsedPaper/assess/cornerstone/index.js.map +1 -0
- package/build/parsedPaper/assess/index.js +15 -0
- package/build/parsedPaper/assess/index.js.map +1 -0
- package/build/parsedPaper/build/PaperParser.js +97 -0
- package/build/parsedPaper/build/PaperParser.js.map +1 -0
- package/build/parsedPaper/build/linguisticParsing/Sentence.js +89 -0
- package/build/parsedPaper/build/linguisticParsing/Sentence.js.map +1 -0
- package/build/parsedPaper/build/linguisticParsing/SentenceTokenizer.js +287 -0
- package/build/parsedPaper/build/linguisticParsing/SentenceTokenizer.js.map +1 -0
- package/build/parsedPaper/build/linguisticParsing/parseText.js +20 -0
- package/build/parsedPaper/build/linguisticParsing/parseText.js.map +1 -0
- package/build/parsedPaper/build/tree/TreeBuilder.js +76 -0
- package/build/parsedPaper/build/tree/TreeBuilder.js.map +1 -0
- package/build/parsedPaper/build/tree/cleanup/calculateTextIndices.js +178 -0
- package/build/parsedPaper/build/tree/cleanup/calculateTextIndices.js.map +1 -0
- package/build/parsedPaper/build/tree/cleanup/getElementContent.js +21 -0
- package/build/parsedPaper/build/tree/cleanup/getElementContent.js.map +1 -0
- package/build/parsedPaper/build/tree/cleanup/postParsing.js +37 -0
- package/build/parsedPaper/build/tree/cleanup/postParsing.js.map +1 -0
- package/build/parsedPaper/build/tree/html/HTMLTreeConverter.js +220 -0
- package/build/parsedPaper/build/tree/html/HTMLTreeConverter.js.map +1 -0
- package/build/parsedPaper/build/tree/html/buildTree.js +30 -0
- package/build/parsedPaper/build/tree/html/buildTree.js.map +1 -0
- package/build/parsedPaper/build/tree/html/htmlConstants.js +30 -0
- package/build/parsedPaper/build/tree/html/htmlConstants.js.map +1 -0
- package/build/parsedPaper/build/tree/index.js +15 -0
- package/build/parsedPaper/build/tree/index.js.map +1 -0
- package/build/parsedPaper/build/tree/metadata/buildTree.js +30 -0
- package/build/parsedPaper/build/tree/metadata/buildTree.js.map +1 -0
- package/build/parsedPaper/research/TreeResearcher.js +131 -0
- package/build/parsedPaper/research/TreeResearcher.js.map +1 -0
- package/build/parsedPaper/research/index.js +12 -0
- package/build/parsedPaper/research/index.js.map +1 -0
- package/build/parsedPaper/research/researches/Headings.js +20 -0
- package/build/parsedPaper/research/researches/Headings.js.map +1 -0
- package/build/parsedPaper/research/researches/LinkStatistics.js +123 -0
- package/build/parsedPaper/research/researches/LinkStatistics.js.map +1 -0
- package/build/parsedPaper/research/researches/Research.js +53 -0
- package/build/parsedPaper/research/researches/Research.js.map +1 -0
- package/build/parsedPaper/research/researches/index.js +2 -0
- package/build/parsedPaper/research/researches/index.js.map +1 -0
- package/build/parsedPaper/structure/tree/FormattingElement.js +67 -0
- package/build/parsedPaper/structure/tree/FormattingElement.js.map +1 -0
- package/build/parsedPaper/structure/tree/SourceCodeLocation.js +42 -0
- package/build/parsedPaper/structure/tree/SourceCodeLocation.js.map +1 -0
- package/build/parsedPaper/structure/tree/TextContainer.js +84 -0
- package/build/parsedPaper/structure/tree/TextContainer.js.map +1 -0
- package/build/parsedPaper/structure/tree/index.js +11 -0
- package/build/parsedPaper/structure/tree/index.js.map +1 -0
- package/build/parsedPaper/structure/tree/nodes/Heading.js +27 -0
- package/build/parsedPaper/structure/tree/nodes/Heading.js.map +1 -0
- package/build/parsedPaper/structure/tree/nodes/LeafNode.js +75 -0
- package/build/parsedPaper/structure/tree/nodes/LeafNode.js.map +1 -0
- package/build/parsedPaper/structure/tree/nodes/List.js +48 -0
- package/build/parsedPaper/structure/tree/nodes/List.js.map +1 -0
- package/build/parsedPaper/structure/tree/nodes/ListItem.js +27 -0
- package/build/parsedPaper/structure/tree/nodes/ListItem.js.map +1 -0
- package/build/parsedPaper/structure/tree/nodes/MetadataMiscellaneous.js +45 -0
- package/build/parsedPaper/structure/tree/nodes/MetadataMiscellaneous.js.map +1 -0
- package/build/parsedPaper/structure/tree/nodes/MetadataText.js +25 -0
- package/build/parsedPaper/structure/tree/nodes/MetadataText.js.map +1 -0
- package/build/parsedPaper/structure/tree/nodes/Node.js +153 -0
- package/build/parsedPaper/structure/tree/nodes/Node.js.map +1 -0
- package/build/parsedPaper/structure/tree/nodes/Paragraph.js +23 -0
- package/build/parsedPaper/structure/tree/nodes/Paragraph.js.map +1 -0
- package/build/parsedPaper/structure/tree/nodes/StructuredNode.js +53 -0
- package/build/parsedPaper/structure/tree/nodes/StructuredNode.js.map +1 -0
- package/build/parsedPaper/structure/tree/nodes/index.js +11 -0
- package/build/parsedPaper/structure/tree/nodes/index.js.map +1 -0
- package/build/scoring/assessments/assessment.js +70 -0
- package/build/scoring/assessments/assessment.js.map +1 -0
- package/build/scoring/assessments/index.js +61 -0
- package/build/scoring/assessments/index.js.map +1 -0
- package/build/scoring/assessments/readability/ParagraphTooLongAssessment.js +159 -0
- package/build/scoring/assessments/readability/ParagraphTooLongAssessment.js.map +1 -0
- package/build/scoring/assessments/readability/RelatedKeywordsAssessment.js +114 -0
- package/build/scoring/assessments/readability/RelatedKeywordsAssessment.js.map +1 -0
- package/build/scoring/assessments/readability/SentenceBeginningsAssessment.js +128 -0
- package/build/scoring/assessments/readability/SentenceBeginningsAssessment.js.map +1 -0
- package/build/scoring/assessments/readability/SentenceLengthInTextAssessment.js +170 -0
- package/build/scoring/assessments/readability/SentenceLengthInTextAssessment.js.map +1 -0
- package/build/scoring/assessments/readability/TransitionWordsAssessment.js +156 -0
- package/build/scoring/assessments/readability/TransitionWordsAssessment.js.map +1 -0
- package/build/scoring/assessments/seo/ImageCountAssessment.js +104 -0
- package/build/scoring/assessments/seo/ImageCountAssessment.js.map +1 -0
- package/build/scoring/assessments/seo/InternalLinksAssessment.js +106 -0
- package/build/scoring/assessments/seo/InternalLinksAssessment.js.map +1 -0
- package/build/scoring/assessments/seo/IntroductionKeywordAssessment.js +103 -0
- package/build/scoring/assessments/seo/IntroductionKeywordAssessment.js.map +1 -0
- package/build/scoring/assessments/seo/KeyphraseAssessment.js +98 -0
- package/build/scoring/assessments/seo/KeyphraseAssessment.js.map +1 -0
- package/build/scoring/assessments/seo/KeyphraseLengthAssessment.js +103 -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 +111 -0
- package/build/scoring/assessments/seo/MetaDescriptionKeywordAssessment.js.map +1 -0
- package/build/scoring/assessments/seo/MetaDescriptionLengthAssessment.js +104 -0
- package/build/scoring/assessments/seo/MetaDescriptionLengthAssessment.js.map +1 -0
- package/build/scoring/assessments/seo/MetaTitleKeywordAssessment.js +108 -0
- package/build/scoring/assessments/seo/MetaTitleKeywordAssessment.js.map +1 -0
- package/build/scoring/assessments/seo/NumberInMetaTitleAssessment.js +101 -0
- package/build/scoring/assessments/seo/NumberInMetaTitleAssessment.js.map +1 -0
- package/build/scoring/assessments/seo/OutboundLinksAssessment.js +107 -0
- package/build/scoring/assessments/seo/OutboundLinksAssessment.js.map +1 -0
- package/build/scoring/assessments/seo/PageTitleWidthAssessment.js +99 -0
- package/build/scoring/assessments/seo/PageTitleWidthAssessment.js.map +1 -0
- package/build/scoring/assessments/seo/SchemaAssessment.js +108 -0
- package/build/scoring/assessments/seo/SchemaAssessment.js.map +1 -0
- package/build/scoring/assessments/seo/SingleH1Assessment.js +108 -0
- package/build/scoring/assessments/seo/SingleH1Assessment.js.map +1 -0
- package/build/scoring/assessments/seo/SingleTitleAssessment.js +101 -0
- package/build/scoring/assessments/seo/SingleTitleAssessment.js.map +1 -0
- package/build/scoring/assessments/seo/SubHeadingsKeywordAssessment.js +99 -0
- package/build/scoring/assessments/seo/SubHeadingsKeywordAssessment.js.map +1 -0
- package/build/scoring/assessments/seo/TextImagesAssessment.js +135 -0
- package/build/scoring/assessments/seo/TextImagesAssessment.js.map +1 -0
- package/build/scoring/assessments/seo/TextLengthAssessment.js +97 -0
- package/build/scoring/assessments/seo/TextLengthAssessment.js.map +1 -0
- package/build/scoring/assessments/seo/UrlKeywordAssessment.js +100 -0
- package/build/scoring/assessments/seo/UrlKeywordAssessment.js.map +1 -0
- package/build/scoring/assessments/seo/UrlLengthAssessment.js +99 -0
- package/build/scoring/assessments/seo/UrlLengthAssessment.js.map +1 -0
- package/build/scoring/assessors/assessor.js +277 -0
- package/build/scoring/assessors/assessor.js.map +1 -0
- package/build/scoring/assessors/avadaAssessor.js +85 -0
- package/build/scoring/assessors/avadaAssessor.js.map +1 -0
- package/build/scoring/assessors/contentAssessor.js +143 -0
- package/build/scoring/assessors/contentAssessor.js.map +1 -0
- package/build/scoring/assessors/index.js +5 -0
- package/build/scoring/assessors/index.js.map +1 -0
- package/build/scoring/assessors/seoAssessor.js +38 -0
- package/build/scoring/assessors/seoAssessor.js.map +1 -0
- package/build/scoring/helpers/assessments/checkForTooLongSentences.js +14 -0
- package/build/scoring/helpers/assessments/checkForTooLongSentences.js.map +1 -0
- package/build/scoring/helpers/assessments/inRange.js +43 -0
- package/build/scoring/helpers/assessments/inRange.js.map +1 -0
- package/build/scoring/helpers/assessments/keyphraseLengthFactor.js +11 -0
- package/build/scoring/helpers/assessments/keyphraseLengthFactor.js.map +1 -0
- package/build/scoring/helpers/assessments/recommendedKeywordCount.js +41 -0
- package/build/scoring/helpers/assessments/recommendedKeywordCount.js.map +1 -0
- package/build/scoring/helpers/index.js +84 -0
- package/build/scoring/helpers/index.js.map +1 -0
- package/build/scoring/interpreters/index.js +3 -0
- package/build/scoring/interpreters/index.js.map +1 -0
- package/build/scoring/interpreters/scoreToRating.js +26 -0
- package/build/scoring/interpreters/scoreToRating.js.map +1 -0
- package/build/scoring/renderers/AssessorPresenter.js +342 -0
- package/build/scoring/renderers/AssessorPresenter.js.map +1 -0
- package/build/scoring/scoreAggregators/ReadabilityScoreAggregator.js +197 -0
- package/build/scoring/scoreAggregators/ReadabilityScoreAggregator.js.map +1 -0
- package/build/scoring/scoreAggregators/SEOScoreAggregator.js +54 -0
- package/build/scoring/scoreAggregators/SEOScoreAggregator.js.map +1 -0
- package/build/scoring/scoreAggregators/ScoreAggregator.js +24 -0
- package/build/scoring/scoreAggregators/ScoreAggregator.js.map +1 -0
- package/build/scoring/scoreAggregators/index.js +4 -0
- package/build/scoring/scoreAggregators/index.js.map +1 -0
- package/build/values/AssessmentResult.js +479 -0
- package/build/values/AssessmentResult.js.map +1 -0
- package/build/values/Mark.js +267 -0
- package/build/values/Mark.js.map +1 -0
- package/build/values/Paper.js +489 -0
- package/build/values/Paper.js.map +1 -0
- package/build/values/index.js +5 -0
- package/build/values/index.js.map +1 -0
- package/build/vendor/turkishStemmer.js +2811 -0
- package/build/vendor/turkishStemmer.js.map +1 -0
- package/package.json +2 -2
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
import { pullAll } from "lodash";
|
|
2
|
+
import { ignoredHtmlElements } from "../html/htmlConstants";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Gathers all elements that can be closed given the position of the current element in the source code.
|
|
6
|
+
*
|
|
7
|
+
* Elements that can be closed are all elements that are opened before this element, but in which this element is
|
|
8
|
+
* not nested.
|
|
9
|
+
* E.g.
|
|
10
|
+
* ```html
|
|
11
|
+
* <strong>Hello</strong><em>World<b>!!!</b></em>`
|
|
12
|
+
* ```
|
|
13
|
+
* with `<b>!!!</b>` as the current element,
|
|
14
|
+
* means that the `<strong>` needs to be closed, but `<em>` **not**.
|
|
15
|
+
*
|
|
16
|
+
* @param {module:parsedPaper/structure.FormattingElement} currentElement The current element.
|
|
17
|
+
* @param {module:parsedPaper/structure.FormattingElement[]} openElements The elements that are currently open.
|
|
18
|
+
*
|
|
19
|
+
* @returns {module:parsedPaper/structure.FormattingElement[]} The elements that can be closed.
|
|
20
|
+
*/
|
|
21
|
+
const elementsThatCanBeClosed = function (currentElement, openElements) {
|
|
22
|
+
return openElements.filter(el => {
|
|
23
|
+
const endTag = el.sourceCodeLocation.endTag;
|
|
24
|
+
return endTag.endOffset <= currentElement.sourceCodeLocation.startOffset;
|
|
25
|
+
});
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Closes the elements that can be closed given the position of the current element within the source code.
|
|
30
|
+
*
|
|
31
|
+
* This does two things:
|
|
32
|
+
* 1. The closed element's text end index is calculated based on the current offset.
|
|
33
|
+
* 2. The closed element's end tag lengths are counted towards the current offset, to make sure that the computed position
|
|
34
|
+
* of the formatting elements are still correct.
|
|
35
|
+
*
|
|
36
|
+
* @param {module:parsedPaper/structure.FormattingElement[]} elementsToClose The list of open elements that need to be closed
|
|
37
|
+
* @param {number} currentOffset The current offset when parsing the formatting elements
|
|
38
|
+
*
|
|
39
|
+
* @returns {number} The updated current offset
|
|
40
|
+
*
|
|
41
|
+
* @private
|
|
42
|
+
*/
|
|
43
|
+
const closeElements = function (elementsToClose, currentOffset) {
|
|
44
|
+
// Sort, so we close all elements in the right order.
|
|
45
|
+
elementsToClose.sort((a, b) => a.sourceCodeLocation.endTag.endOffset - b.sourceCodeLocation.endTag.endOffset);
|
|
46
|
+
elementsToClose.forEach(elementToClose => {
|
|
47
|
+
const endTag = elementToClose.sourceCodeLocation.endTag;
|
|
48
|
+
// Set the end position as seen in the text.
|
|
49
|
+
elementToClose.textEndIndex = endTag.startOffset - currentOffset;
|
|
50
|
+
/*
|
|
51
|
+
Add the end tag length of the to be closed element to the total offset.
|
|
52
|
+
*/
|
|
53
|
+
const endTagLength = endTag.endOffset - endTag.startOffset;
|
|
54
|
+
currentOffset += endTagLength;
|
|
55
|
+
});
|
|
56
|
+
return currentOffset;
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Adds the content length of the given element (the part between the tags) to the current offset
|
|
61
|
+
* and adds the content to the element as a parameter.
|
|
62
|
+
*
|
|
63
|
+
* @param {module:parsedPaper/structure.FormattingElement} element The element of which to add the content length.
|
|
64
|
+
* @param {number} currentOffset The current offset to which to add the length to.
|
|
65
|
+
*
|
|
66
|
+
* @returns {number} The updated current offset
|
|
67
|
+
*/
|
|
68
|
+
const handleIgnoredContent = function (element, currentOffset) {
|
|
69
|
+
// Has 0 length in text, so end = start.
|
|
70
|
+
element.textEndIndex = element.textStartIndex;
|
|
71
|
+
|
|
72
|
+
// Update current offset.
|
|
73
|
+
const end = element.sourceCodeLocation.endTag ? element.sourceCodeLocation.endTag.startOffset : element.sourceCodeLocation.endOffset;
|
|
74
|
+
const start = element.sourceCodeLocation.startTag ? element.sourceCodeLocation.startTag.endOffset : element.sourceCodeLocation.startOffset;
|
|
75
|
+
currentOffset += end - start;
|
|
76
|
+
return currentOffset;
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* Sets the start and end text positions of a comment.
|
|
81
|
+
*
|
|
82
|
+
* @param {module:parsedPaper/structure.FormattingElement} element The formatting element to assign start and end text positions to.
|
|
83
|
+
* @param {int} currentOffset A sum of all characters in the source code that don't get rendered
|
|
84
|
+
* (e.g., tags, comments).
|
|
85
|
+
*
|
|
86
|
+
* @returns {number} The length of the comment.
|
|
87
|
+
*
|
|
88
|
+
* @private
|
|
89
|
+
*/
|
|
90
|
+
const computeCommentStartEndTextIndices = function (element, currentOffset) {
|
|
91
|
+
element.textStartIndex = element.sourceCodeLocation.startOffset - currentOffset;
|
|
92
|
+
element.textEndIndex = element.textStartIndex;
|
|
93
|
+
return element.sourceCodeLocation.endOffset - element.sourceCodeLocation.startOffset;
|
|
94
|
+
};
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* Sets the start and end text positions of one formatting element.
|
|
98
|
+
*
|
|
99
|
+
* @param {module:parsedPaper/structure.FormattingElement} element The formatting element to assign start and end text positions to.
|
|
100
|
+
* @param {int} currentOffset A sum of all characters in the source code that don't get rendered
|
|
101
|
+
* (e.g., tags, comments).
|
|
102
|
+
*
|
|
103
|
+
* @returns {int} The updated currentOffset.
|
|
104
|
+
*
|
|
105
|
+
* @private
|
|
106
|
+
*/
|
|
107
|
+
const computeElementStartTextIndex = function (element, currentOffset) {
|
|
108
|
+
const startTag = element.sourceCodeLocation.startTag;
|
|
109
|
+
|
|
110
|
+
// For example: "<strong>".length
|
|
111
|
+
const startTagLength = startTag.endOffset - startTag.startOffset;
|
|
112
|
+
currentOffset += startTagLength;
|
|
113
|
+
|
|
114
|
+
// Set start position of element in heading's / paragraph's text.
|
|
115
|
+
element.textStartIndex = startTag.endOffset - currentOffset;
|
|
116
|
+
|
|
117
|
+
/*
|
|
118
|
+
Elements that have no end tags (e.g., void element like <img/> or self-closing elements) can be closed immediately.
|
|
119
|
+
The text length of those elements will be automatically 0.
|
|
120
|
+
*/
|
|
121
|
+
if (!element.sourceCodeLocation.endTag) {
|
|
122
|
+
element.textEndIndex = element.textStartIndex;
|
|
123
|
+
}
|
|
124
|
+
return currentOffset;
|
|
125
|
+
};
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* Sets the start and end position of the text in formatting elements of the given node.
|
|
129
|
+
*
|
|
130
|
+
* @param {module:parsedPaper/structure.LeafNode} node The node containing a TextContainer
|
|
131
|
+
*
|
|
132
|
+
* @returns {void}
|
|
133
|
+
*
|
|
134
|
+
* @private
|
|
135
|
+
*/
|
|
136
|
+
const calculateTextIndices = function (node) {
|
|
137
|
+
if (!node.textContainer.formatting || node.textContainer.formatting.length === 0) {
|
|
138
|
+
return;
|
|
139
|
+
}
|
|
140
|
+
const openElements = [];
|
|
141
|
+
|
|
142
|
+
/*
|
|
143
|
+
Keeps track of the current total size of the start and end tags (and the ignored content)
|
|
144
|
+
These should not be counted towards the start and end position of the elements in the text.
|
|
145
|
+
*/
|
|
146
|
+
let currentOffset = node.sourceCodeLocation.startTag ? node.sourceCodeLocation.startTag.endOffset : node.sourceCodeLocation.startOffset;
|
|
147
|
+
node.textContainer.formatting.forEach(element => {
|
|
148
|
+
// Close elements that can be closed and remove them from the list of open elements.
|
|
149
|
+
const elementsToClose = elementsThatCanBeClosed(element, openElements);
|
|
150
|
+
currentOffset = closeElements(elementsToClose, currentOffset);
|
|
151
|
+
pullAll(openElements, elementsToClose);
|
|
152
|
+
|
|
153
|
+
// Comments are self-closing formatting elements that are completely ignored in rendering.
|
|
154
|
+
if (element.type === "#comment") {
|
|
155
|
+
currentOffset += computeCommentStartEndTextIndices(element, currentOffset);
|
|
156
|
+
return;
|
|
157
|
+
}
|
|
158
|
+
currentOffset = computeElementStartTextIndex(element, currentOffset);
|
|
159
|
+
|
|
160
|
+
// If there is an endTag, the element should be closed in one of the next iterations of the loop.
|
|
161
|
+
if (element.sourceCodeLocation.endTag) {
|
|
162
|
+
openElements.push(element);
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
/*
|
|
166
|
+
If this element is an ignored element its contents are not in the text,
|
|
167
|
+
so its content should be added to the respective formatting element instead,
|
|
168
|
+
and the current offset should be updated.
|
|
169
|
+
*/
|
|
170
|
+
if (ignoredHtmlElements.includes(element.type)) {
|
|
171
|
+
currentOffset = handleIgnoredContent(element, currentOffset);
|
|
172
|
+
}
|
|
173
|
+
});
|
|
174
|
+
// Close all remaining elements.
|
|
175
|
+
closeElements(openElements, currentOffset);
|
|
176
|
+
};
|
|
177
|
+
export default calculateTextIndices;
|
|
178
|
+
//# sourceMappingURL=calculateTextIndices.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"calculateTextIndices.js","names":["pullAll","ignoredHtmlElements","elementsThatCanBeClosed","currentElement","openElements","filter","el","endTag","sourceCodeLocation","endOffset","startOffset","closeElements","elementsToClose","currentOffset","sort","a","b","forEach","elementToClose","textEndIndex","endTagLength","handleIgnoredContent","element","textStartIndex","end","start","startTag","computeCommentStartEndTextIndices","computeElementStartTextIndex","startTagLength","calculateTextIndices","node","textContainer","formatting","length","type","push","includes"],"sources":["../../../../../src/parsedPaper/build/tree/cleanup/calculateTextIndices.js"],"sourcesContent":["import { pullAll } from \"lodash\";\n\nimport { ignoredHtmlElements } from \"../html/htmlConstants\";\n\n/**\n * Gathers all elements that can be closed given the position of the current element in the source code.\n *\n * Elements that can be closed are all elements that are opened before this element, but in which this element is\n * not nested.\n * E.g.\n * ```html\n * <strong>Hello</strong><em>World<b>!!!</b></em>`\n * ```\n * with `<b>!!!</b>` as the current element,\n * means that the `<strong>` needs to be closed, but `<em>` **not**.\n *\n * @param {module:parsedPaper/structure.FormattingElement} currentElement The current element.\n * @param {module:parsedPaper/structure.FormattingElement[]} openElements The elements that are currently open.\n *\n * @returns {module:parsedPaper/structure.FormattingElement[]} The elements that can be closed.\n */\nconst elementsThatCanBeClosed = function( currentElement, openElements ) {\n\treturn openElements.filter( el => {\n\t\tconst endTag = el.sourceCodeLocation.endTag;\n\t\treturn endTag.endOffset <= currentElement.sourceCodeLocation.startOffset;\n\t} );\n};\n\n/**\n * Closes the elements that can be closed given the position of the current element within the source code.\n *\n * This does two things:\n * 1. The closed element's text end index is calculated based on the current offset.\n * 2. The closed element's end tag lengths are counted towards the current offset, to make sure that the computed position\n * of the formatting elements are still correct.\n *\n * @param {module:parsedPaper/structure.FormattingElement[]} elementsToClose The list of open elements that need to be closed\n * @param {number} currentOffset The current offset when parsing the formatting elements\n *\n * @returns {number} The updated current offset\n *\n * @private\n */\nconst closeElements = function( elementsToClose, currentOffset ) {\n\t// Sort, so we close all elements in the right order.\n\telementsToClose.sort( ( a, b ) => a.sourceCodeLocation.endTag.endOffset - b.sourceCodeLocation.endTag.endOffset );\n\n\telementsToClose.forEach( elementToClose => {\n\t\tconst endTag = elementToClose.sourceCodeLocation.endTag;\n\t\t// Set the end position as seen in the text.\n\t\telementToClose.textEndIndex = endTag.startOffset - currentOffset;\n\t\t/*\n\t\t Add the end tag length of the to be closed element to the total offset.\n\t\t */\n\t\tconst endTagLength = endTag.endOffset - endTag.startOffset;\n\t\tcurrentOffset += endTagLength;\n\t} );\n\n\treturn currentOffset;\n};\n\n/**\n * Adds the content length of the given element (the part between the tags) to the current offset\n * and adds the content to the element as a parameter.\n *\n * @param {module:parsedPaper/structure.FormattingElement} element The element of which to add the content length.\n * @param {number} currentOffset The current offset to which to add the length to.\n *\n * @returns {number} The updated current offset\n */\nconst handleIgnoredContent = function( element, currentOffset ) {\n\t// Has 0 length in text, so end = start.\n\telement.textEndIndex = element.textStartIndex;\n\n\t// Update current offset.\n\tconst end = element.sourceCodeLocation.endTag ? element.sourceCodeLocation.endTag.startOffset : element.sourceCodeLocation.endOffset;\n\tconst start = element.sourceCodeLocation.startTag ? element.sourceCodeLocation.startTag.endOffset : element.sourceCodeLocation.startOffset;\n\n\tcurrentOffset += end - start;\n\n\treturn currentOffset;\n};\n\n\n/**\n * Sets the start and end text positions of a comment.\n *\n * @param {module:parsedPaper/structure.FormattingElement}\telement\t\t\tThe formatting element to assign start and end text positions to.\n * @param {int}\t\t\t\t\t\t\t\t\t\t\t\tcurrentOffset\tA sum of all characters in the source code that don't get rendered\n * \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t(e.g., tags, comments).\n *\n * @returns {number} The length of the comment.\n *\n * @private\n */\nconst computeCommentStartEndTextIndices = function( element, currentOffset ) {\n\telement.textStartIndex = element.sourceCodeLocation.startOffset - currentOffset;\n\telement.textEndIndex = element.textStartIndex;\n\n\treturn element.sourceCodeLocation.endOffset - element.sourceCodeLocation.startOffset;\n};\n\n/**\n * Sets the start and end text positions of one formatting element.\n *\n * @param {module:parsedPaper/structure.FormattingElement}\telement\t\t\tThe formatting element to assign start and end text positions to.\n * @param {int}\t\t\t\t\t\t\t\t\t\t\t\tcurrentOffset\tA sum of all characters in the source code that don't get rendered\n * \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t(e.g., tags, comments).\n *\n * @returns {int} The updated currentOffset.\n *\n * @private\n */\nconst computeElementStartTextIndex = function( element, currentOffset ) {\n\tconst startTag = element.sourceCodeLocation.startTag;\n\n\t// For example: \"<strong>\".length\n\tconst startTagLength = startTag.endOffset - startTag.startOffset;\n\n\tcurrentOffset += startTagLength;\n\n\t// Set start position of element in heading's / paragraph's text.\n\telement.textStartIndex = startTag.endOffset - currentOffset;\n\n\t/*\n\t Elements that have no end tags (e.g., void element like <img/> or self-closing elements) can be closed immediately.\n\t The text length of those elements will be automatically 0.\n\t */\n\tif ( ! element.sourceCodeLocation.endTag ) {\n\t\telement.textEndIndex = element.textStartIndex;\n\t}\n\n\treturn currentOffset;\n};\n\n/**\n * Sets the start and end position of the text in formatting elements of the given node.\n *\n * @param {module:parsedPaper/structure.LeafNode} node The node containing a TextContainer\n *\n * @returns {void}\n *\n * @private\n */\nconst calculateTextIndices = function( node ) {\n\tif ( ! node.textContainer.formatting || node.textContainer.formatting.length === 0 ) {\n\t\treturn;\n\t}\n\n\tconst openElements = [];\n\n\t/*\n\t Keeps track of the current total size of the start and end tags (and the ignored content)\n\t These should not be counted towards the start and end position of the elements in the text.\n\t */\n\tlet currentOffset = node.sourceCodeLocation.startTag ? node.sourceCodeLocation.startTag.endOffset : node.sourceCodeLocation.startOffset;\n\n\tnode.textContainer.formatting.forEach( element => {\n\t\t// Close elements that can be closed and remove them from the list of open elements.\n\t\tconst elementsToClose = elementsThatCanBeClosed( element, openElements );\n\t\tcurrentOffset = closeElements( elementsToClose, currentOffset );\n\t\tpullAll( openElements, elementsToClose );\n\n\t\t// Comments are self-closing formatting elements that are completely ignored in rendering.\n\t\tif ( element.type === \"#comment\" ) {\n\t\t\tcurrentOffset += computeCommentStartEndTextIndices( element, currentOffset );\n\t\t\treturn;\n\t\t}\n\n\t\tcurrentOffset = computeElementStartTextIndex( element, currentOffset );\n\n\t\t// If there is an endTag, the element should be closed in one of the next iterations of the loop.\n\t\tif ( element.sourceCodeLocation.endTag ) {\n\t\t\topenElements.push( element );\n\t\t}\n\n\t\t/*\n\t\t If this element is an ignored element its contents are not in the text,\n\t\t so its content should be added to the respective formatting element instead,\n\t\t and the current offset should be updated.\n\t\t */\n\t\tif ( ignoredHtmlElements.includes( element.type ) ) {\n\t\t\tcurrentOffset = handleIgnoredContent( element, currentOffset );\n\t\t}\n\t} );\n\t// Close all remaining elements.\n\tcloseElements( openElements, currentOffset );\n};\n\nexport default calculateTextIndices;\n"],"mappings":"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","ignoreList":[]}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Gets the content of an element (the part _between_ the opening and closing tag) from the HTML source code.
|
|
3
|
+
*
|
|
4
|
+
* @param {module:parsedPaper/structure.Node|module:parsedPaper/structure.FormattingElement} element The element to parse the contents of
|
|
5
|
+
* @param {string} html The source code to parse the contents from
|
|
6
|
+
*
|
|
7
|
+
* @returns {string} The element's contents.
|
|
8
|
+
*
|
|
9
|
+
* @private
|
|
10
|
+
*/
|
|
11
|
+
const getElementContent = function (element, html) {
|
|
12
|
+
const location = element.location;
|
|
13
|
+
if (location) {
|
|
14
|
+
const start = location.startTag ? location.startTag.endOffset : location.startOffset;
|
|
15
|
+
const end = location.endTag ? location.endTag.startOffset : location.endOffset;
|
|
16
|
+
return html.slice(start, end);
|
|
17
|
+
}
|
|
18
|
+
return "";
|
|
19
|
+
};
|
|
20
|
+
export default getElementContent;
|
|
21
|
+
//# sourceMappingURL=getElementContent.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getElementContent.js","names":["getElementContent","element","html","location","start","startTag","endOffset","startOffset","end","endTag","slice"],"sources":["../../../../../src/parsedPaper/build/tree/cleanup/getElementContent.js"],"sourcesContent":["/**\n * Gets the content of an element (the part _between_ the opening and closing tag) from the HTML source code.\n *\n * @param {module:parsedPaper/structure.Node|module:parsedPaper/structure.FormattingElement} element The element to parse the contents of\n * @param {string} html The source code to parse the contents from\n *\n * @returns {string} The element's contents.\n *\n * @private\n */\nconst getElementContent = function( element, html ) {\n\tconst location = element.location;\n\tif ( location ) {\n\t\tconst start = location.startTag ? location.startTag.endOffset : location.startOffset;\n\t\tconst end = location.endTag ? location.endTag.startOffset : location.endOffset;\n\t\treturn html.slice( start, end );\n\t}\n\treturn \"\";\n};\n\nexport default getElementContent;\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMA,iBAAiB,GAAG,SAAAA,CAAUC,OAAO,EAAEC,IAAI,EAAG;EACnD,MAAMC,QAAQ,GAAGF,OAAO,CAACE,QAAQ;EACjC,IAAKA,QAAQ,EAAG;IACf,MAAMC,KAAK,GAAGD,QAAQ,CAACE,QAAQ,GAAGF,QAAQ,CAACE,QAAQ,CAACC,SAAS,GAAGH,QAAQ,CAACI,WAAW;IACpF,MAAMC,GAAG,GAAGL,QAAQ,CAACM,MAAM,GAAGN,QAAQ,CAACM,MAAM,CAACF,WAAW,GAAGJ,QAAQ,CAACG,SAAS;IAC9E,OAAOJ,IAAI,CAACQ,KAAK,CAAEN,KAAK,EAAEI,GAAI,CAAC;EAChC;EACA,OAAO,EAAE;AACV,CAAC;AAED,eAAeR,iBAAiB","ignoreList":[]}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { LeafNode } from "../../../structure/tree";
|
|
2
|
+
import calculateTextIndices from "./calculateTextIndices";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Cleans up a node in the tree.
|
|
6
|
+
*
|
|
7
|
+
* @param {module:parsedPaper/structure.Node} node The node that needs to be cleaned.
|
|
8
|
+
*
|
|
9
|
+
* @returns {module:parsedPaper/structure.Node} The cleaned up node.
|
|
10
|
+
*
|
|
11
|
+
* @private
|
|
12
|
+
*/
|
|
13
|
+
const cleanUpNode = function (node) {
|
|
14
|
+
// Clean up formatting elements in headings and paragraphs.
|
|
15
|
+
if (node instanceof LeafNode) {
|
|
16
|
+
// Start and end position in leaf node's (header's or paragraph's) text without formatting.
|
|
17
|
+
calculateTextIndices(node);
|
|
18
|
+
}
|
|
19
|
+
return node;
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Cleans up the given tree after parsing of the HTML source code
|
|
24
|
+
* by setting the start and end index of each formatting element in a leaf node's text.
|
|
25
|
+
*
|
|
26
|
+
* @param {module:parsedPaper/structure.Node} tree The tree structure to be cleaned.
|
|
27
|
+
*
|
|
28
|
+
* @returns {module:parsedPaper/structure.Node} The cleaned up tree.
|
|
29
|
+
*
|
|
30
|
+
* @private
|
|
31
|
+
*/
|
|
32
|
+
const cleanUpTree = function (tree) {
|
|
33
|
+
tree.map(node => cleanUpNode(node));
|
|
34
|
+
return tree;
|
|
35
|
+
};
|
|
36
|
+
export default cleanUpTree;
|
|
37
|
+
//# sourceMappingURL=postParsing.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"postParsing.js","names":["LeafNode","calculateTextIndices","cleanUpNode","node","cleanUpTree","tree","map"],"sources":["../../../../../src/parsedPaper/build/tree/cleanup/postParsing.js"],"sourcesContent":["import { LeafNode } from \"../../../structure/tree\";\nimport calculateTextIndices from \"./calculateTextIndices\";\n\n/**\n * Cleans up a node in the tree.\n *\n * @param {module:parsedPaper/structure.Node} node The node that needs to be cleaned.\n *\n * @returns {module:parsedPaper/structure.Node} The cleaned up node.\n *\n * @private\n */\nconst cleanUpNode = function( node ) {\n\t// Clean up formatting elements in headings and paragraphs.\n\tif ( node instanceof LeafNode ) {\n\t\t// Start and end position in leaf node's (header's or paragraph's) text without formatting.\n\t\tcalculateTextIndices( node );\n\t}\n\treturn node;\n};\n\n/**\n * Cleans up the given tree after parsing of the HTML source code\n * by setting the start and end index of each formatting element in a leaf node's text.\n *\n * @param {module:parsedPaper/structure.Node} tree The tree structure to be cleaned.\n *\n * @returns {module:parsedPaper/structure.Node} The cleaned up tree.\n *\n * @private\n */\nconst cleanUpTree = function( tree ) {\n\ttree.map( node => cleanUpNode( node ) );\n\treturn tree;\n};\n\nexport default cleanUpTree;\n"],"mappings":"AAAA,SAASA,QAAQ;AACjB,OAAOC,oBAAoB;;AAE3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,WAAW,GAAG,SAAAA,CAAUC,IAAI,EAAG;EACpC;EACA,IAAKA,IAAI,YAAYH,QAAQ,EAAG;IAC/B;IACAC,oBAAoB,CAAEE,IAAK,CAAC;EAC7B;EACA,OAAOA,IAAI;AACZ,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,WAAW,GAAG,SAAAA,CAAUC,IAAI,EAAG;EACpCA,IAAI,CAACC,GAAG,CAAEH,IAAI,IAAID,WAAW,CAAEC,IAAK,CAAE,CAAC;EACvC,OAAOE,IAAI;AACZ,CAAC;AAED,eAAeD,WAAW","ignoreList":[]}
|
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
import { FormattingElement, Heading, Paragraph, StructuredNode, List, ListItem } from "../../../structure/tree";
|
|
2
|
+
import LeafNode from "../../../structure/tree/nodes/LeafNode";
|
|
3
|
+
import { formattingElements, headings, ignoredHtmlElements } from "./htmlConstants";
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Converts a parse5 tree to a tree that can be analyzed.
|
|
7
|
+
*/
|
|
8
|
+
class HTMLTreeConverter {
|
|
9
|
+
/**
|
|
10
|
+
* Converts the parse5 tree to a Yoast tree.
|
|
11
|
+
*
|
|
12
|
+
* @param {Object} parse5Tree The parse5 tree to convert.
|
|
13
|
+
*
|
|
14
|
+
* @returns {module:parsedPaper/structure.Node} The converted tree.
|
|
15
|
+
*/
|
|
16
|
+
convert(parse5Tree) {
|
|
17
|
+
const root = new StructuredNode("root", null);
|
|
18
|
+
this._convert(parse5Tree, root);
|
|
19
|
+
return root;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Converts the tree from a parse5 implementation to a Yoast tree.
|
|
24
|
+
*
|
|
25
|
+
* @param {Object} parse5Tree The parse5 tree to convert.
|
|
26
|
+
* @param {module:parsedPaper/structure.Node} parent The tree in progress.
|
|
27
|
+
*
|
|
28
|
+
* @returns {void}
|
|
29
|
+
*
|
|
30
|
+
* @private
|
|
31
|
+
*/
|
|
32
|
+
_convert(parse5Tree, parent) {
|
|
33
|
+
if (ignoredHtmlElements.includes(parse5Tree.nodeName)) {
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
if (parse5Tree.childNodes) {
|
|
37
|
+
for (const node of parse5Tree.childNodes) {
|
|
38
|
+
const child = this._createChild(node, parent);
|
|
39
|
+
if (child) {
|
|
40
|
+
parent.addChild(child);
|
|
41
|
+
this._convert(node, child);
|
|
42
|
+
} else {
|
|
43
|
+
this._convert(node, parent);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Creates a new node for in the structured tree from the given parse 5 node.
|
|
51
|
+
* Returns `null` if no node should be added to the tree.
|
|
52
|
+
*
|
|
53
|
+
* @param {Object} parse5Node The parse5 node that should be parsed.
|
|
54
|
+
* @param {module:parsedPaper/structure.Node} parentNode The parent node.
|
|
55
|
+
*
|
|
56
|
+
* @returns {module:parsedPaper/structure.Node|null} The node that should be added to the tree, or `null` if no node should be added.
|
|
57
|
+
*
|
|
58
|
+
* @private
|
|
59
|
+
*/
|
|
60
|
+
_createChild(parse5Node, parentNode) {
|
|
61
|
+
let child = null;
|
|
62
|
+
const nodeType = parse5Node.nodeName;
|
|
63
|
+
if (ignoredHtmlElements.includes(nodeType)) {
|
|
64
|
+
const formatting = new FormattingElement(nodeType, parse5Node.sourceCodeLocation, this._parseAttributes(parse5Node.attrs));
|
|
65
|
+
this._addLeafNodeContent(formatting, this._addFormatting, parentNode, parse5Node.sourceCodeLocation);
|
|
66
|
+
} else if (nodeType === "p") {
|
|
67
|
+
// Paragraph.
|
|
68
|
+
child = new Paragraph(parse5Node.sourceCodeLocation);
|
|
69
|
+
} else if (headings.includes(nodeType)) {
|
|
70
|
+
// Heading.
|
|
71
|
+
child = new Heading(parseInt(nodeType[1], 10), parse5Node.sourceCodeLocation);
|
|
72
|
+
} else if (nodeType === "li") {
|
|
73
|
+
// List item.
|
|
74
|
+
child = new ListItem(parse5Node.sourceCodeLocation);
|
|
75
|
+
} else if (nodeType === "ol" || nodeType === "ul") {
|
|
76
|
+
// List node.
|
|
77
|
+
child = new List(nodeType === "ol", parse5Node.sourceCodeLocation);
|
|
78
|
+
} else if (nodeType === "#text") {
|
|
79
|
+
// Text (outside of an ignored element).
|
|
80
|
+
child = this._addLeafNodeContent(parse5Node.value, this._addText, parentNode, parse5Node.sourceCodeLocation);
|
|
81
|
+
} else if (formattingElements.includes(nodeType)) {
|
|
82
|
+
// Formatting element.
|
|
83
|
+
const formatting = new FormattingElement(nodeType, parse5Node.sourceCodeLocation, this._parseAttributes(parse5Node.attrs));
|
|
84
|
+
child = this._addLeafNodeContent(formatting, this._addFormatting, parentNode, parse5Node.sourceCodeLocation);
|
|
85
|
+
} else {
|
|
86
|
+
// Other element (`div`, `section`, `article`, etc.).
|
|
87
|
+
child = new StructuredNode(nodeType, parse5Node.sourceCodeLocation);
|
|
88
|
+
}
|
|
89
|
+
return child;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* Adds leaf node content (text or formatting) to the tree according to a predefined strategy:
|
|
94
|
+
*
|
|
95
|
+
* If the content has a leaf node (paragraph, heading, list item) parent or ancestor: add it to this leaf node.
|
|
96
|
+
* Else: wrap the content in an implicit paragraph, and add the content to it in such a way that runs
|
|
97
|
+
* of phrasing content make up one implicit paragraph.
|
|
98
|
+
*
|
|
99
|
+
* @param {string|module:parsedPaper/structure.FormattingElement} contentToAdd The content to add.
|
|
100
|
+
* @param {function} add A function that adds the content to the specified leaf node.
|
|
101
|
+
* @param {module:parsedPaper/structure.Node} parent The parent to which to try to add the content.
|
|
102
|
+
* @param {Object} location The location of the content as parsed by parse5.
|
|
103
|
+
*
|
|
104
|
+
* @returns {null|module:parsedPaper/structure.Paragraph|null} The implicit paragraph, if one was created.
|
|
105
|
+
*
|
|
106
|
+
* @private
|
|
107
|
+
*/
|
|
108
|
+
_addLeafNodeContent(contentToAdd, add, parent, location) {
|
|
109
|
+
if (parent instanceof LeafNode) {
|
|
110
|
+
add(parent, contentToAdd);
|
|
111
|
+
return null;
|
|
112
|
+
}
|
|
113
|
+
const previousChild = this._previousChild(parent);
|
|
114
|
+
const leafNodeAncestor = this._leafNodeAncestor(parent);
|
|
115
|
+
if (leafNodeAncestor instanceof Paragraph) {
|
|
116
|
+
add(leafNodeAncestor, contentToAdd);
|
|
117
|
+
return null;
|
|
118
|
+
} else if (previousChild && previousChild instanceof Paragraph && previousChild.isImplicit) {
|
|
119
|
+
add(previousChild, contentToAdd);
|
|
120
|
+
return null;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
// Don't create an implicit paragraph when the content is whitespace only.
|
|
124
|
+
if (/^\s*$/.exec(contentToAdd)) {
|
|
125
|
+
return null;
|
|
126
|
+
}
|
|
127
|
+
const child = new Paragraph(location, true);
|
|
128
|
+
add(child, contentToAdd);
|
|
129
|
+
return child;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* Add text to the parent leaf node.
|
|
134
|
+
*
|
|
135
|
+
* @param {module:parsedPaper/structure.LeafNode} parent The leaf node to which to add the text.
|
|
136
|
+
* @param {string} text The text to add to the node.
|
|
137
|
+
*
|
|
138
|
+
* @returns {void}
|
|
139
|
+
*
|
|
140
|
+
* @private
|
|
141
|
+
*/
|
|
142
|
+
_addText(parent, text) {
|
|
143
|
+
parent.appendText(text);
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* Add a formatting element to the parent leaf node.
|
|
148
|
+
*
|
|
149
|
+
* @param {module:parsedPaper/structure.LeafNode} parent The leaf node to which to add the formatting.
|
|
150
|
+
* @param {module:parsedPaper/structure.FormattingElement} formatting The formatting element to add.
|
|
151
|
+
*
|
|
152
|
+
* @returns {void}
|
|
153
|
+
*
|
|
154
|
+
* @private
|
|
155
|
+
*/
|
|
156
|
+
_addFormatting(parent, formatting) {
|
|
157
|
+
parent.addFormatting(formatting);
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
/**
|
|
161
|
+
* Parses the HTML element attributes from parse5's format to a plain JS object.
|
|
162
|
+
*
|
|
163
|
+
* @example
|
|
164
|
+
*
|
|
165
|
+
* const attributes = _parseAttributes( { name: "id", value: "an-id" } ) // becomes { id: "an-id" }.
|
|
166
|
+
*
|
|
167
|
+
* @param {Array<{ name: string, value: string }>} parse5attributes The attributes as parsed by parse5.
|
|
168
|
+
*
|
|
169
|
+
* @returns {Object} The parsed attributes.
|
|
170
|
+
*
|
|
171
|
+
* @private
|
|
172
|
+
*/
|
|
173
|
+
_parseAttributes(parse5attributes) {
|
|
174
|
+
if (parse5attributes && parse5attributes.length > 0) {
|
|
175
|
+
return parse5attributes.reduce((attributes, attribute) => {
|
|
176
|
+
attributes[attribute.name] = attribute.value;
|
|
177
|
+
return attributes;
|
|
178
|
+
}, {});
|
|
179
|
+
}
|
|
180
|
+
return null;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
/**
|
|
184
|
+
* Returns the last child of the given parent.
|
|
185
|
+
*
|
|
186
|
+
* @param {module:parsedPaper/structure.StructuredNode} parent The parent.
|
|
187
|
+
*
|
|
188
|
+
* @returns {module:parsedPaper/structure.Node} The parent's last child.
|
|
189
|
+
*
|
|
190
|
+
* @private
|
|
191
|
+
*/
|
|
192
|
+
_previousChild(parent) {
|
|
193
|
+
if (parent.children) {
|
|
194
|
+
return parent.children[parent.children.length - 1];
|
|
195
|
+
}
|
|
196
|
+
return null;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
/**
|
|
200
|
+
* Try to find the leaf node ancestor of this node. Returns `null` if the node does not have one.
|
|
201
|
+
*
|
|
202
|
+
* @param {module:parsedPaper/structure.Node} element The node for which to find the leaf node ancestor.
|
|
203
|
+
*
|
|
204
|
+
* @returns {null|module:parsedPaper/structure.Node} The leaf node ancestor, if it has one, `null` if not.
|
|
205
|
+
*
|
|
206
|
+
* @private
|
|
207
|
+
*/
|
|
208
|
+
_leafNodeAncestor(element) {
|
|
209
|
+
const parent = element.parent;
|
|
210
|
+
if (!parent) {
|
|
211
|
+
return null;
|
|
212
|
+
}
|
|
213
|
+
if (element instanceof LeafNode) {
|
|
214
|
+
return parent;
|
|
215
|
+
}
|
|
216
|
+
return this._leafNodeAncestor(parent);
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
export default HTMLTreeConverter;
|
|
220
|
+
//# sourceMappingURL=HTMLTreeConverter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HTMLTreeConverter.js","names":["FormattingElement","Heading","Paragraph","StructuredNode","List","ListItem","LeafNode","formattingElements","headings","ignoredHtmlElements","HTMLTreeConverter","convert","parse5Tree","root","_convert","parent","includes","nodeName","childNodes","node","child","_createChild","addChild","parse5Node","parentNode","nodeType","formatting","sourceCodeLocation","_parseAttributes","attrs","_addLeafNodeContent","_addFormatting","parseInt","value","_addText","contentToAdd","add","location","previousChild","_previousChild","leafNodeAncestor","_leafNodeAncestor","isImplicit","exec","text","appendText","addFormatting","parse5attributes","length","reduce","attributes","attribute","name","children","element"],"sources":["../../../../../src/parsedPaper/build/tree/html/HTMLTreeConverter.js"],"sourcesContent":["import { FormattingElement, Heading, Paragraph, StructuredNode, List, ListItem } from \"../../../structure/tree\";\nimport LeafNode from \"../../../structure/tree/nodes/LeafNode\";\nimport { formattingElements, headings, ignoredHtmlElements } from \"./htmlConstants\";\n\n/**\n * Converts a parse5 tree to a tree that can be analyzed.\n */\nclass HTMLTreeConverter {\n\t/**\n\t * Converts the parse5 tree to a Yoast tree.\n\t *\n\t * @param {Object} parse5Tree The parse5 tree to convert.\n\t *\n\t * @returns {module:parsedPaper/structure.Node} The converted tree.\n\t */\n\tconvert( parse5Tree ) {\n\t\tconst root = new StructuredNode( \"root\", null );\n\t\tthis._convert( parse5Tree, root );\n\t\treturn root;\n\t}\n\n\t/**\n\t * Converts the tree from a parse5 implementation to a Yoast tree.\n\t *\n\t * @param {Object} parse5Tree The parse5 tree to convert.\n\t * @param {module:parsedPaper/structure.Node} parent The tree in progress.\n\t *\n\t * @returns {void}\n\t *\n\t * @private\n\t */\n\t_convert( parse5Tree, parent ) {\n\t\tif ( ignoredHtmlElements.includes( parse5Tree.nodeName ) ) {\n\t\t\treturn;\n\t\t}\n\t\tif ( parse5Tree.childNodes ) {\n\t\t\tfor ( const node of parse5Tree.childNodes ) {\n\t\t\t\tconst child = this._createChild( node, parent );\n\n\t\t\t\tif ( child ) {\n\t\t\t\t\tparent.addChild( child );\n\t\t\t\t\tthis._convert( node, child );\n\t\t\t\t} else {\n\t\t\t\t\tthis._convert( node, parent );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Creates a new node for in the structured tree from the given parse 5 node.\n\t * Returns `null` if no node should be added to the tree.\n\t *\n\t * @param {Object} parse5Node The parse5 node that should be parsed.\n\t * @param {module:parsedPaper/structure.Node} parentNode The parent node.\n\t *\n\t * @returns {module:parsedPaper/structure.Node|null} The node that should be added to the tree, or `null` if no node should be added.\n\t *\n\t * @private\n\t */\n\t_createChild( parse5Node, parentNode ) {\n\t\tlet child = null;\n\n\t\tconst nodeType = parse5Node.nodeName;\n\n\t\tif ( ignoredHtmlElements.includes( nodeType ) ) {\n\t\t\tconst formatting = new FormattingElement( nodeType, parse5Node.sourceCodeLocation, this._parseAttributes( parse5Node.attrs ) );\n\t\t\tthis._addLeafNodeContent( formatting, this._addFormatting, parentNode, parse5Node.sourceCodeLocation );\n\t\t} else if ( nodeType === \"p\" ) {\n\t\t\t// Paragraph.\n\t\t\tchild = new Paragraph( parse5Node.sourceCodeLocation );\n\t\t} else if ( headings.includes( nodeType ) ) {\n\t\t\t// Heading.\n\t\t\tchild = new Heading( parseInt( nodeType[ 1 ], 10 ), parse5Node.sourceCodeLocation );\n\t\t} else if ( nodeType === \"li\" ) {\n\t\t\t// List item.\n\t\t\tchild = new ListItem( parse5Node.sourceCodeLocation );\n\t\t} else if ( nodeType === \"ol\" || nodeType === \"ul\" ) {\n\t\t\t// List node.\n\t\t\tchild = new List( nodeType === \"ol\", parse5Node.sourceCodeLocation );\n\t\t} else if ( nodeType === \"#text\" ) {\n\t\t\t// Text (outside of an ignored element).\n\t\t\tchild = this._addLeafNodeContent( parse5Node.value, this._addText, parentNode, parse5Node.sourceCodeLocation );\n\t\t} else if ( formattingElements.includes( nodeType ) ) {\n\t\t\t// Formatting element.\n\t\t\tconst formatting = new FormattingElement( nodeType, parse5Node.sourceCodeLocation, this._parseAttributes( parse5Node.attrs ) );\n\t\t\tchild = this._addLeafNodeContent( formatting, this._addFormatting, parentNode, parse5Node.sourceCodeLocation );\n\t\t} else {\n\t\t\t// Other element (`div`, `section`, `article`, etc.).\n\t\t\tchild = new StructuredNode( nodeType, parse5Node.sourceCodeLocation );\n\t\t}\n\n\t\treturn child;\n\t}\n\n\t/**\n\t * Adds leaf node content (text or formatting) to the tree according to a predefined strategy:\n\t *\n\t * If the content has a leaf node (paragraph, heading, list item) parent or ancestor: add it to this leaf node.\n\t * Else: wrap the content in an implicit paragraph, and add the content to it in such a way that runs\n\t * of phrasing content make up one implicit paragraph.\n\t *\n\t * @param {string|module:parsedPaper/structure.FormattingElement} contentToAdd The content to add.\n\t * @param {function} add A function that adds the content to the specified leaf node.\n\t * @param {module:parsedPaper/structure.Node} parent The parent to which to try to add the content.\n\t * @param {Object} location The location of the content as parsed by parse5.\n\t *\n\t * @returns {null|module:parsedPaper/structure.Paragraph|null} The implicit paragraph, if one was created.\n\t *\n\t * @private\n\t */\n\t_addLeafNodeContent( contentToAdd, add, parent, location ) {\n\t\tif ( parent instanceof LeafNode ) {\n\t\t\tadd( parent, contentToAdd );\n\t\t\treturn null;\n\t\t}\n\n\t\tconst previousChild = this._previousChild( parent );\n\t\tconst leafNodeAncestor = this._leafNodeAncestor( parent );\n\n\t\tif ( leafNodeAncestor instanceof Paragraph ) {\n\t\t\tadd( leafNodeAncestor, contentToAdd );\n\t\t\treturn null;\n\t\t} else if ( previousChild && previousChild instanceof Paragraph && previousChild.isImplicit ) {\n\t\t\tadd( previousChild, contentToAdd );\n\t\t\treturn null;\n\t\t}\n\n\t\t// Don't create an implicit paragraph when the content is whitespace only.\n\t\tif ( /^\\s*$/.exec( contentToAdd ) ) {\n\t\t\treturn null;\n\t\t}\n\n\t\tconst child = new Paragraph( location, true );\n\t\tadd( child, contentToAdd );\n\t\treturn child;\n\t}\n\n\t/**\n\t * Add text to the parent leaf node.\n\t *\n\t * @param {module:parsedPaper/structure.LeafNode} parent The leaf node to which to add the text.\n\t * @param {string} text The text to add to the node.\n\t *\n\t * @returns {void}\n\t *\n\t * @private\n\t */\n\t_addText( parent, text ) {\n\t\tparent.appendText( text );\n\t}\n\n\t/**\n\t * Add a formatting element to the parent leaf node.\n\t *\n\t * @param {module:parsedPaper/structure.LeafNode} parent The leaf node to which to add the formatting.\n\t * @param {module:parsedPaper/structure.FormattingElement} formatting The formatting element to add.\n\t *\n\t * @returns {void}\n\t *\n\t * @private\n\t */\n\t_addFormatting( parent, formatting ) {\n\t\tparent.addFormatting( formatting );\n\t}\n\n\t/**\n\t * Parses the HTML element attributes from parse5's format to a plain JS object.\n\t *\n\t * @example\n\t *\n\t * const attributes = _parseAttributes( { name: \"id\", value: \"an-id\" } ) // becomes { id: \"an-id\" }.\n\t *\n\t * @param {Array<{ name: string, value: string }>} parse5attributes The attributes as parsed by parse5.\n\t *\n\t * @returns {Object} The parsed attributes.\n\t *\n\t * @private\n\t */\n\t_parseAttributes( parse5attributes ) {\n\t\tif ( parse5attributes && parse5attributes.length > 0 ) {\n\t\t\treturn parse5attributes.reduce( ( attributes, attribute ) => {\n\t\t\t\tattributes[ attribute.name ] = attribute.value;\n\t\t\t\treturn attributes;\n\t\t\t}, {} );\n\t\t}\n\t\treturn null;\n\t}\n\n\t/**\n\t * Returns the last child of the given parent.\n\t *\n\t * @param {module:parsedPaper/structure.StructuredNode} parent The parent.\n\t *\n\t * @returns {module:parsedPaper/structure.Node} The parent's last child.\n\t *\n\t * @private\n\t */\n\t_previousChild( parent ) {\n\t\tif ( parent.children ) {\n\t\t\treturn parent.children[ parent.children.length - 1 ];\n\t\t}\n\t\treturn null;\n\t}\n\n\t/**\n\t * Try to find the leaf node ancestor of this node. Returns `null` if the node does not have one.\n\t *\n\t * @param {module:parsedPaper/structure.Node} element The node for which to find the leaf node ancestor.\n\t *\n\t * @returns {null|module:parsedPaper/structure.Node} The leaf node ancestor, if it has one, `null` if not.\n\t *\n\t * @private\n\t */\n\t_leafNodeAncestor( element ) {\n\t\tconst parent = element.parent;\n\n\t\tif ( ! parent ) {\n\t\t\treturn null;\n\t\t}\n\n\t\tif ( element instanceof LeafNode ) {\n\t\t\treturn parent;\n\t\t}\n\n\t\treturn this._leafNodeAncestor( parent );\n\t}\n}\n\nexport default HTMLTreeConverter;\n"],"mappings":"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","ignoreList":[]}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { parseFragment } from "parse5";
|
|
2
|
+
import HTMLTreeConverter from "./HTMLTreeConverter";
|
|
3
|
+
import cleanUpTree from "../cleanup/postParsing";
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Parses the given html-string to a tree, to be used in further analysis.
|
|
7
|
+
*
|
|
8
|
+
* @param {string} html The html-string that should be parsed.
|
|
9
|
+
*
|
|
10
|
+
* @returns {module:parsedPaper/structure.Node} The build tree.
|
|
11
|
+
*
|
|
12
|
+
* @memberOf module:parsedPaper/builder
|
|
13
|
+
*/
|
|
14
|
+
const buildTree = function (html) {
|
|
15
|
+
/*
|
|
16
|
+
* Parsing of a HTML article takes on average 19ms
|
|
17
|
+
* (based on the fullTexts in the specs (n=24), measured using `console.time`).
|
|
18
|
+
*/
|
|
19
|
+
const parse5Tree = parseFragment(html, {
|
|
20
|
+
sourceCodeLocationInfo: true
|
|
21
|
+
});
|
|
22
|
+
const htmlTreeConverter = new HTMLTreeConverter();
|
|
23
|
+
let tree = htmlTreeConverter.convert(parse5Tree);
|
|
24
|
+
|
|
25
|
+
// Cleanup takes < 2ms.
|
|
26
|
+
tree = cleanUpTree(tree);
|
|
27
|
+
return tree;
|
|
28
|
+
};
|
|
29
|
+
export default buildTree;
|
|
30
|
+
//# sourceMappingURL=buildTree.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"buildTree.js","names":["parseFragment","HTMLTreeConverter","cleanUpTree","buildTree","html","parse5Tree","sourceCodeLocationInfo","htmlTreeConverter","tree","convert"],"sources":["../../../../../src/parsedPaper/build/tree/html/buildTree.js"],"sourcesContent":["import { parseFragment } from \"parse5\";\n\nimport HTMLTreeConverter from \"./HTMLTreeConverter\";\nimport cleanUpTree from \"../cleanup/postParsing\";\n\n\n/**\n * Parses the given html-string to a tree, to be used in further analysis.\n *\n * @param {string} html The html-string that should be parsed.\n *\n * @returns {module:parsedPaper/structure.Node} The build tree.\n *\n * @memberOf module:parsedPaper/builder\n */\nconst buildTree = function( html ) {\n\t/*\n\t * Parsing of a HTML article takes on average 19ms\n\t * (based on the fullTexts in the specs (n=24), measured using `console.time`).\n\t */\n\tconst parse5Tree = parseFragment( html, { sourceCodeLocationInfo: true } );\n\n\tconst htmlTreeConverter = new HTMLTreeConverter();\n\tlet tree = htmlTreeConverter.convert( parse5Tree );\n\n\t// Cleanup takes < 2ms.\n\ttree = cleanUpTree( tree );\n\treturn tree;\n};\n\nexport default buildTree;\n"],"mappings":"AAAA,SAASA,aAAa,QAAQ,QAAQ;AAEtC,OAAOC,iBAAiB;AACxB,OAAOC,WAAW;;AAGlB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,SAAS,GAAG,SAAAA,CAAUC,IAAI,EAAG;EAClC;AACD;AACA;AACA;EACC,MAAMC,UAAU,GAAGL,aAAa,CAAEI,IAAI,EAAE;IAAEE,sBAAsB,EAAE;EAAK,CAAE,CAAC;EAE1E,MAAMC,iBAAiB,GAAG,IAAIN,iBAAiB,CAAC,CAAC;EACjD,IAAIO,IAAI,GAAGD,iBAAiB,CAACE,OAAO,CAAEJ,UAAW,CAAC;;EAElD;EACAG,IAAI,GAAGN,WAAW,CAAEM,IAAK,CAAC;EAC1B,OAAOA,IAAI;AACZ,CAAC;AAED,eAAeL,SAAS","ignoreList":[]}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* All HTML element tags that we treat as formatting / phrasing content.
|
|
3
|
+
* @type {string[]}
|
|
4
|
+
* @const
|
|
5
|
+
*
|
|
6
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Content_categories#Phrasing_content
|
|
7
|
+
*
|
|
8
|
+
* @memberOf module:parsedPaper/builder
|
|
9
|
+
*/
|
|
10
|
+
const formattingElements = ["a", "abbr", "audio", "b", "bdo", "button", "canvas", "cite", "command", "data", "datalist", "dfn", "del", "em", "embed", "i", "iframe", "img", "input", "kbd", "keygen", "label", "mark", "math", "meter", "noscript", "object", "output", "progress", "q", "ruby", "samp", "select", "small", "span", "strong", "sub", "sup", "svg", "textarea", "time", "var", "video", "wbr"];
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* All tags of the HTML element types that are ignored in our analysis.
|
|
14
|
+
* @type {string[]}
|
|
15
|
+
* @const
|
|
16
|
+
*
|
|
17
|
+
* @memberOf module:parsedPaper/builder
|
|
18
|
+
*/
|
|
19
|
+
const ignoredHtmlElements = ["script", "style", "pre", "#comment", "code", "br"];
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* All HTML heading element tags, from `h1` to `h6`.
|
|
23
|
+
* @type {string[]}
|
|
24
|
+
* @const
|
|
25
|
+
*
|
|
26
|
+
* @memberOf module:parsedPaper/builder
|
|
27
|
+
*/
|
|
28
|
+
const headings = ["h1", "h2", "h3", "h4", "h5", "h6"];
|
|
29
|
+
export { formattingElements, ignoredHtmlElements, headings };
|
|
30
|
+
//# sourceMappingURL=htmlConstants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"htmlConstants.js","names":["formattingElements","ignoredHtmlElements","headings"],"sources":["../../../../../src/parsedPaper/build/tree/html/htmlConstants.js"],"sourcesContent":["/**\n * All HTML element tags that we treat as formatting / phrasing content.\n * @type {string[]}\n * @const\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Content_categories#Phrasing_content\n *\n * @memberOf module:parsedPaper/builder\n */\nconst formattingElements = [ \"a\", \"abbr\", \"audio\", \"b\", \"bdo\", \"button\", \"canvas\", \"cite\", \"command\",\n\t\"data\", \"datalist\", \"dfn\", \"del\", \"em\", \"embed\", \"i\", \"iframe\", \"img\", \"input\", \"kbd\", \"keygen\", \"label\", \"mark\",\n\t\"math\", \"meter\", \"noscript\", \"object\", \"output\", \"progress\", \"q\", \"ruby\", \"samp\", \"select\", \"small\",\n\t\"span\", \"strong\", \"sub\", \"sup\", \"svg\", \"textarea\", \"time\", \"var\", \"video\", \"wbr\" ];\n\n/**\n * All tags of the HTML element types that are ignored in our analysis.\n * @type {string[]}\n * @const\n *\n * @memberOf module:parsedPaper/builder\n */\nconst ignoredHtmlElements = [ \"script\", \"style\", \"pre\", \"#comment\", \"code\", \"br\" ];\n\n/**\n * All HTML heading element tags, from `h1` to `h6`.\n * @type {string[]}\n * @const\n *\n * @memberOf module:parsedPaper/builder\n */\nconst headings = [ \"h1\", \"h2\", \"h3\", \"h4\", \"h5\", \"h6\" ];\n\nexport {\n\tformattingElements,\n\tignoredHtmlElements,\n\theadings,\n};\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMA,kBAAkB,GAAG,CAAE,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,EAAE,SAAS,EACnG,MAAM,EAAE,UAAU,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,EAChH,MAAM,EAAE,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,QAAQ,EAAE,UAAU,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,EACnG,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,CAAE;;AAEnF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,mBAAmB,GAAG,CAAE,QAAQ,EAAE,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,EAAE,IAAI,CAAE;;AAElF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,QAAQ,GAAG,CAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAE;AAEvD,SACCF,kBAAkB,EAClBC,mBAAmB,EACnBC,QAAQ","ignoreList":[]}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import TreeBuilder from "./TreeBuilder";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* This module contains the main logic to transform a formatted text (for now only HTML is supported)
|
|
5
|
+
* to a tree representation.
|
|
6
|
+
*
|
|
7
|
+
* This tree structure in turn can be used for further textual analysis.
|
|
8
|
+
*
|
|
9
|
+
* @module parsedPaper/builder
|
|
10
|
+
*
|
|
11
|
+
* @see module:parsedPaper/structure
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
export default TreeBuilder;
|
|
15
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":["TreeBuilder"],"sources":["../../../../src/parsedPaper/build/tree/index.js"],"sourcesContent":["import TreeBuilder from \"./TreeBuilder\";\n\n/**\n * This module contains the main logic to transform a formatted text (for now only HTML is supported)\n * to a tree representation.\n *\n * This tree structure in turn can be used for further textual analysis.\n *\n * @module parsedPaper/builder\n *\n * @see module:parsedPaper/structure\n */\n\nexport default TreeBuilder;\n"],"mappings":"AAAA,OAAOA,WAAW;;AAElB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,eAAeA,WAAW","ignoreList":[]}
|