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,191 @@
|
|
|
1
|
+
import { memoize, uniq } from "lodash";
|
|
2
|
+
import getWords from "../word/getWords";
|
|
3
|
+
import { normalizeSingle } from "../sanitize/quotes";
|
|
4
|
+
import ProminentWord from "../../values/ProminentWord";
|
|
5
|
+
const specialCharacters = /[1234567890‘’“”"'.…?!:;,¿¡«»&*@#±^%$|~=+§`[\](){}⟨⟩<>/\\–\-\u2014\u00d7\s]/g;
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Returns only those prominent words that occur more than a certain number of times and do not consist of special characters.
|
|
9
|
+
*
|
|
10
|
+
* @param {ProminentWord[]} prominentWords A list of prominent words.
|
|
11
|
+
* @param {int} [minimalNumberOfOccurrences] A minimal number of occurrences that is needed for a relevant prominentWord, default 2.
|
|
12
|
+
*
|
|
13
|
+
* @returns {ProminentWord[]} Only relevant words.
|
|
14
|
+
*/
|
|
15
|
+
function filterProminentWords(prominentWords, minimalNumberOfOccurrences = 2) {
|
|
16
|
+
prominentWords = prominentWords.filter(function (word) {
|
|
17
|
+
return word.getOccurrences() >= minimalNumberOfOccurrences && word.getWord().replace(specialCharacters, "") !== "";
|
|
18
|
+
});
|
|
19
|
+
return prominentWords;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Sorts prominent words based on their number of occurrences and length.
|
|
24
|
+
*
|
|
25
|
+
* @param {ProminentWord[]} prominentWords The prominent words to sort.
|
|
26
|
+
*
|
|
27
|
+
* @returns {void}
|
|
28
|
+
*/
|
|
29
|
+
function sortProminentWords(prominentWords) {
|
|
30
|
+
prominentWords.sort(function (wordA, wordB) {
|
|
31
|
+
const difference = wordB.getOccurrences() - wordA.getOccurrences();
|
|
32
|
+
// The word with the highest number of occurrences comes first.
|
|
33
|
+
if (difference !== 0) {
|
|
34
|
+
return difference;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
// In case of a tie on occurrence number, the alphabetically first word comes first.
|
|
38
|
+
return wordA.getStem().localeCompare(wordB.getStem());
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Collapses prominent words that have the same stem.
|
|
44
|
+
*
|
|
45
|
+
* @param {ProminentWord[]} prominentWords All prominentWords.
|
|
46
|
+
*
|
|
47
|
+
* @returns {ProminentWord[]} The original array with collapsed duplicates.
|
|
48
|
+
*/
|
|
49
|
+
function collapseProminentWordsOnStem(prominentWords) {
|
|
50
|
+
if (prominentWords.length === 0) {
|
|
51
|
+
return [];
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
// Sort the input array by stem
|
|
55
|
+
prominentWords.sort(function (wordA, wordB) {
|
|
56
|
+
return wordA.getStem().localeCompare(wordB.getStem());
|
|
57
|
+
});
|
|
58
|
+
const collapsedProminentWords = [];
|
|
59
|
+
let previousWord = new ProminentWord(prominentWords[0].getWord(), prominentWords[0].getStem(), prominentWords[0].getOccurrences());
|
|
60
|
+
for (let i = 1; i < prominentWords.length; i++) {
|
|
61
|
+
const currentWord = new ProminentWord(prominentWords[i].getWord(), prominentWords[i].getStem(), prominentWords[i].getOccurrences());
|
|
62
|
+
|
|
63
|
+
/*
|
|
64
|
+
* Compare the stem of the current word in the loop with the previously available stem.
|
|
65
|
+
* If they are equal, the word should be collapsed.
|
|
66
|
+
* When collapsing, the numbers of occurrences get summed.
|
|
67
|
+
* If the stem happens to equal the real word that occurred in the text, we can be sure it's ok to display it
|
|
68
|
+
* to the customer. So, the stem reassigns the word.
|
|
69
|
+
*/
|
|
70
|
+
if (currentWord.getStem() === previousWord.getStem()) {
|
|
71
|
+
previousWord.setOccurrences(previousWord.getOccurrences() + currentWord.getOccurrences());
|
|
72
|
+
if (currentWord.getWord() === previousWord.getStem() || currentWord.getWord().toLocaleLowerCase() === previousWord.getStem()) {
|
|
73
|
+
previousWord.setWord(currentWord.getWord());
|
|
74
|
+
}
|
|
75
|
+
} else {
|
|
76
|
+
collapsedProminentWords.push(previousWord);
|
|
77
|
+
previousWord = currentWord;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
collapsedProminentWords.push(previousWord);
|
|
81
|
+
return collapsedProminentWords;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* Retrieves a list of all abbreviations from the text. Returns an empty array if the input text is empty.
|
|
86
|
+
*
|
|
87
|
+
* @param {string} text A text.
|
|
88
|
+
*
|
|
89
|
+
* @returns {string[]} A list of abbreviations from the list.
|
|
90
|
+
*/
|
|
91
|
+
function retrieveAbbreviations(text) {
|
|
92
|
+
const words = getWords(normalizeSingle(text));
|
|
93
|
+
const abbreviations = [];
|
|
94
|
+
words.forEach(function (word) {
|
|
95
|
+
if (word.length > 1 && word.length < 5 && word === word.toLocaleUpperCase()) {
|
|
96
|
+
abbreviations.push(word.toLocaleLowerCase());
|
|
97
|
+
}
|
|
98
|
+
});
|
|
99
|
+
return uniq(abbreviations);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* Computes prominent words from an array of words. In order to do so, checks whether the word is included in the list of
|
|
104
|
+
* function words and determines the number of occurrences for every word. Then checks if any two words have the same stem
|
|
105
|
+
* and if so collapses over them.
|
|
106
|
+
*
|
|
107
|
+
* @param {string[]} words The words to determine relevance for.
|
|
108
|
+
* @param {string[]} abbreviations Abbreviations that should not be stemmed.
|
|
109
|
+
* @param {Function} stemmer The available stemmer.
|
|
110
|
+
* @param {Array} functionWords The available function words list.
|
|
111
|
+
*
|
|
112
|
+
* @returns {ProminentWord[]} All prominent words sorted and filtered for this text.
|
|
113
|
+
*/
|
|
114
|
+
function computeProminentWords(words, abbreviations, stemmer, functionWords) {
|
|
115
|
+
if (words.length === 0) {
|
|
116
|
+
return [];
|
|
117
|
+
}
|
|
118
|
+
const uniqueContentWords = uniq(words.filter(word => !functionWords.includes(word.trim())));
|
|
119
|
+
const prominentWords = [];
|
|
120
|
+
uniqueContentWords.forEach(function (word) {
|
|
121
|
+
if (abbreviations.includes(word)) {
|
|
122
|
+
prominentWords.push(new ProminentWord(word.toLocaleUpperCase(), word, words.filter(element => element === word).length));
|
|
123
|
+
} else {
|
|
124
|
+
prominentWords.push(new ProminentWord(word, stemmer(word), words.filter(element => element === word).length));
|
|
125
|
+
}
|
|
126
|
+
});
|
|
127
|
+
return collapseProminentWordsOnStem(prominentWords);
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* Caches prominent words depending on text words.
|
|
132
|
+
* Only the words and abbreviations are used as the cache key as the stemmer and function words
|
|
133
|
+
* are config and shouldn't change in the scope of one request.
|
|
134
|
+
*
|
|
135
|
+
* @param {string[]} words The words to determine relevance for.
|
|
136
|
+
* @param {string[]} abbreviations Abbreviations that should not be stemmed.
|
|
137
|
+
* @param {Function} stemmer The available stemmer.
|
|
138
|
+
* @param {Array} functionWords The available function words list.
|
|
139
|
+
*
|
|
140
|
+
* @returns {function} The function that collects prominent words for a given set of text words, language and morphologyData.
|
|
141
|
+
*/
|
|
142
|
+
const computeProminentWordsMemoized = memoize((words, abbreviations, stemmer, functionWords) => {
|
|
143
|
+
return computeProminentWords(words, abbreviations, stemmer, functionWords);
|
|
144
|
+
}, (words, abbreviations) => {
|
|
145
|
+
return words.join(",") + "," + abbreviations.join(",");
|
|
146
|
+
});
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* Gets prominent words from the paper text.
|
|
150
|
+
*
|
|
151
|
+
* @param {string} text The text to retrieve the prominent words from.
|
|
152
|
+
* @param {string[]} abbreviations The abbreviations that occur in the text and attributes of the paper.
|
|
153
|
+
* @param {Function} stemmer The available stemmer.
|
|
154
|
+
* @param {Array} functionWords The available function words list.
|
|
155
|
+
* @param {function} getWordsCustomHelper The custom helper to get words.
|
|
156
|
+
*
|
|
157
|
+
* @returns {ProminentWord[]} All prominent words sorted and filtered for this text.
|
|
158
|
+
*/
|
|
159
|
+
function getProminentWords(text, abbreviations, stemmer, functionWords, getWordsCustomHelper) {
|
|
160
|
+
if (text === "") {
|
|
161
|
+
return [];
|
|
162
|
+
}
|
|
163
|
+
const words = getWordsCustomHelper ? getWordsCustomHelper(normalizeSingle(text).toLocaleLowerCase()) : getWords(normalizeSingle(text).toLocaleLowerCase());
|
|
164
|
+
return computeProminentWordsMemoized(words, abbreviations, stemmer, functionWords);
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
/**
|
|
168
|
+
* Gets prominent words from keyphrase and synonyms, metadescription, title, and subheadings.
|
|
169
|
+
*
|
|
170
|
+
* @param {string[]} attributes The array with attributes to process.
|
|
171
|
+
* @param {string[]} abbreviations The abbreviations that occur in the text and attributes of the paper.
|
|
172
|
+
* @param {Function} stemmer The available stemmer.
|
|
173
|
+
* @param {Array} functionWords The available function words list.
|
|
174
|
+
* @param {function} getWordsCustomHelper The custom helper to get words.
|
|
175
|
+
*
|
|
176
|
+
* @returns {ProminentWord[]} Prominent words from the paper attributes.
|
|
177
|
+
*/
|
|
178
|
+
function getProminentWordsFromPaperAttributes(attributes, abbreviations, stemmer, functionWords, getWordsCustomHelper) {
|
|
179
|
+
const wordsFromAttributes = getWordsCustomHelper ? getWordsCustomHelper(attributes.join(" ").toLocaleLowerCase()) : getWords(attributes.join(" ").toLocaleLowerCase());
|
|
180
|
+
return computeProminentWords(wordsFromAttributes, abbreviations, stemmer, functionWords);
|
|
181
|
+
}
|
|
182
|
+
export { getProminentWords, getProminentWordsFromPaperAttributes, filterProminentWords, sortProminentWords, collapseProminentWordsOnStem, retrieveAbbreviations };
|
|
183
|
+
export default {
|
|
184
|
+
getProminentWords,
|
|
185
|
+
getProminentWordsFromPaperAttributes,
|
|
186
|
+
filterProminentWords,
|
|
187
|
+
sortProminentWords,
|
|
188
|
+
collapseProminentWordsOnStem,
|
|
189
|
+
retrieveAbbreviations
|
|
190
|
+
};
|
|
191
|
+
//# sourceMappingURL=determineProminentWords.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"determineProminentWords.js","names":["memoize","uniq","getWords","normalizeSingle","ProminentWord","specialCharacters","filterProminentWords","prominentWords","minimalNumberOfOccurrences","filter","word","getOccurrences","getWord","replace","sortProminentWords","sort","wordA","wordB","difference","getStem","localeCompare","collapseProminentWordsOnStem","length","collapsedProminentWords","previousWord","i","currentWord","setOccurrences","toLocaleLowerCase","setWord","push","retrieveAbbreviations","text","words","abbreviations","forEach","toLocaleUpperCase","computeProminentWords","stemmer","functionWords","uniqueContentWords","includes","trim","element","computeProminentWordsMemoized","join","getProminentWords","getWordsCustomHelper","getProminentWordsFromPaperAttributes","attributes","wordsFromAttributes"],"sources":["../../../../src/languageProcessing/helpers/prominentWords/determineProminentWords.js"],"sourcesContent":["import { memoize, uniq } from \"lodash\";\n\nimport getWords from \"../word/getWords\";\nimport { normalizeSingle } from \"../sanitize/quotes\";\nimport ProminentWord from \"../../values/ProminentWord\";\n\nconst specialCharacters = /[1234567890‘’“”\"'.…?!:;,¿¡«»&*@#±^%$|~=+§`[\\](){}⟨⟩<>/\\\\–\\-\\u2014\\u00d7\\s]/g;\n\n/**\n * Returns only those prominent words that occur more than a certain number of times and do not consist of special characters.\n *\n * @param {ProminentWord[]} prominentWords A list of prominent words.\n * @param {int} [minimalNumberOfOccurrences] A minimal number of occurrences that is needed for a relevant prominentWord, default 2.\n *\n * @returns {ProminentWord[]} Only relevant words.\n */\nfunction filterProminentWords( prominentWords, minimalNumberOfOccurrences = 2 ) {\n\tprominentWords = prominentWords.filter( function( word ) {\n\t\treturn (\n\t\t\tword.getOccurrences() >= minimalNumberOfOccurrences &&\n\t\t\tword.getWord().replace( specialCharacters, \"\" ) !== \"\"\n\t\t);\n\t} );\n\treturn prominentWords;\n}\n\n/**\n * Sorts prominent words based on their number of occurrences and length.\n *\n * @param {ProminentWord[]} prominentWords The prominent words to sort.\n *\n * @returns {void}\n */\nfunction sortProminentWords( prominentWords ) {\n\tprominentWords.sort( function( wordA, wordB ) {\n\t\tconst difference = wordB.getOccurrences() - wordA.getOccurrences();\n\t\t// The word with the highest number of occurrences comes first.\n\t\tif ( difference !== 0 ) {\n\t\t\treturn difference;\n\t\t}\n\n\t\t// In case of a tie on occurrence number, the alphabetically first word comes first.\n\t\treturn wordA.getStem().localeCompare( wordB.getStem() );\n\t} );\n}\n\n/**\n * Collapses prominent words that have the same stem.\n *\n * @param {ProminentWord[]} prominentWords All prominentWords.\n *\n * @returns {ProminentWord[]} The original array with collapsed duplicates.\n */\nfunction collapseProminentWordsOnStem( prominentWords ) {\n\tif ( prominentWords.length === 0 ) {\n\t\treturn [];\n\t}\n\n\t// Sort the input array by stem\n\tprominentWords.sort( function( wordA, wordB ) {\n\t\treturn wordA.getStem().localeCompare( wordB.getStem() );\n\t} );\n\n\tconst collapsedProminentWords = [];\n\tlet previousWord = new ProminentWord(\n\t\tprominentWords[ 0 ].getWord(),\n\t\tprominentWords[ 0 ].getStem(),\n\t\tprominentWords[ 0 ].getOccurrences()\n\t);\n\n\tfor ( let i = 1; i < prominentWords.length; i++ ) {\n\t\tconst currentWord = new ProminentWord(\n\t\t\tprominentWords[ i ].getWord(),\n\t\t\tprominentWords[ i ].getStem(),\n\t\t\tprominentWords[ i ].getOccurrences()\n\t\t);\n\n\t\t/*\n\t\t * Compare the stem of the current word in the loop with the previously available stem.\n\t\t * If they are equal, the word should be collapsed.\n\t\t * When collapsing, the numbers of occurrences get summed.\n\t\t * If the stem happens to equal the real word that occurred in the text, we can be sure it's ok to display it\n\t\t * to the customer. So, the stem reassigns the word.\n\t\t */\n\t\tif ( currentWord.getStem() === previousWord.getStem() ) {\n\t\t\tpreviousWord.setOccurrences( previousWord.getOccurrences() + currentWord.getOccurrences() );\n\n\t\t\tif ( currentWord.getWord() === previousWord.getStem() || currentWord.getWord().toLocaleLowerCase() === previousWord.getStem() ) {\n\t\t\t\tpreviousWord.setWord( currentWord.getWord() );\n\t\t\t}\n\t\t} else {\n\t\t\tcollapsedProminentWords.push( previousWord );\n\t\t\tpreviousWord = currentWord;\n\t\t}\n\t}\n\n\tcollapsedProminentWords.push( previousWord );\n\n\treturn collapsedProminentWords;\n}\n\n/**\n * Retrieves a list of all abbreviations from the text. Returns an empty array if the input text is empty.\n *\n * @param {string} text A text.\n *\n * @returns {string[]} A list of abbreviations from the list.\n */\nfunction retrieveAbbreviations( text ) {\n\tconst words = getWords( normalizeSingle( text ) );\n\tconst abbreviations = [];\n\n\twords.forEach( function( word ) {\n\t\tif ( word.length > 1 && word.length < 5 && word === word.toLocaleUpperCase() ) {\n\t\t\tabbreviations.push( word.toLocaleLowerCase() );\n\t\t}\n\t} );\n\n\treturn uniq( abbreviations );\n}\n\n/**\n * Computes prominent words from an array of words. In order to do so, checks whether the word is included in the list of\n * function words and determines the number of occurrences for every word. Then checks if any two words have the same stem\n * and if so collapses over them.\n *\n * @param {string[]} words The words to determine relevance for.\n * @param {string[]} abbreviations Abbreviations that should not be stemmed.\n * @param {Function} stemmer The available stemmer.\n * @param {Array} functionWords The available function words list.\n *\n * @returns {ProminentWord[]} All prominent words sorted and filtered for this text.\n */\nfunction computeProminentWords( words, abbreviations, stemmer, functionWords ) {\n\tif ( words.length === 0 ) {\n\t\treturn [];\n\t}\n\n\tconst uniqueContentWords = uniq( words.filter( word => ! functionWords.includes( word.trim() ) ) );\n\tconst prominentWords = [];\n\n\tuniqueContentWords.forEach( function( word ) {\n\t\tif ( abbreviations.includes( word ) ) {\n\t\t\tprominentWords.push( new ProminentWord(\n\t\t\t\tword.toLocaleUpperCase(),\n\t\t\t\tword,\n\t\t\t\twords.filter( element => element === word ).length\n\t\t\t) );\n\t\t} else {\n\t\t\tprominentWords.push( new ProminentWord(\n\t\t\t\tword,\n\t\t\t\tstemmer( word ),\n\t\t\t\twords.filter( element => element === word ).length\n\t\t\t) );\n\t\t}\n\t} );\n\n\treturn collapseProminentWordsOnStem( prominentWords );\n}\n\n/**\n * Caches prominent words depending on text words.\n * Only the words and abbreviations are used as the cache key as the stemmer and function words\n * are config and shouldn't change in the scope of one request.\n *\n * @param {string[]} words The words to determine relevance for.\n * @param {string[]} abbreviations Abbreviations that should not be stemmed.\n * @param {Function} stemmer The available stemmer.\n * @param {Array} functionWords The available function words list.\n *\n * @returns {function} The function that collects prominent words for a given set of text words, language and morphologyData.\n */\nconst computeProminentWordsMemoized = memoize( ( words, abbreviations, stemmer, functionWords ) => {\n\treturn computeProminentWords( words, abbreviations, stemmer, functionWords );\n}, ( words, abbreviations ) => {\n\treturn words.join( \",\" ) + \",\" + abbreviations.join( \",\" );\n} );\n\n\n/**\n * Gets prominent words from the paper text.\n *\n * @param {string} text The text to retrieve the prominent words from.\n * @param {string[]} abbreviations The abbreviations that occur in the text and attributes of the paper.\n * @param {Function} stemmer The available stemmer.\n * @param {Array} functionWords The available function words list.\n * @param {function} getWordsCustomHelper The custom helper to get words.\n *\n * @returns {ProminentWord[]} All prominent words sorted and filtered for this text.\n */\nfunction getProminentWords( text, abbreviations, stemmer, functionWords, getWordsCustomHelper ) {\n\tif ( text === \"\" ) {\n\t\treturn [];\n\t}\n\n\tconst words = getWordsCustomHelper\n\t\t? getWordsCustomHelper( normalizeSingle( text ).toLocaleLowerCase() )\n\t\t: getWords( normalizeSingle( text ).toLocaleLowerCase() );\n\n\treturn computeProminentWordsMemoized( words, abbreviations, stemmer, functionWords );\n}\n\n/**\n * Gets prominent words from keyphrase and synonyms, metadescription, title, and subheadings.\n *\n * @param {string[]} attributes The array with attributes to process.\n * @param {string[]} abbreviations The abbreviations that occur in the text and attributes of the paper.\n * @param {Function} stemmer The available stemmer.\n * @param {Array} functionWords The available function words list.\n * @param {function} getWordsCustomHelper The custom helper to get words.\n *\n * @returns {ProminentWord[]} Prominent words from the paper attributes.\n */\nfunction getProminentWordsFromPaperAttributes( attributes, abbreviations, stemmer, functionWords, getWordsCustomHelper ) {\n\tconst wordsFromAttributes = getWordsCustomHelper\n\t\t? getWordsCustomHelper( attributes.join( \" \" ).toLocaleLowerCase() )\n\t\t: getWords( attributes.join( \" \" ).toLocaleLowerCase() );\n\n\treturn computeProminentWords( wordsFromAttributes, abbreviations, stemmer, functionWords );\n}\n\nexport {\n\tgetProminentWords,\n\tgetProminentWordsFromPaperAttributes,\n\tfilterProminentWords,\n\tsortProminentWords,\n\tcollapseProminentWordsOnStem,\n\tretrieveAbbreviations,\n};\n\nexport default {\n\tgetProminentWords,\n\tgetProminentWordsFromPaperAttributes,\n\tfilterProminentWords,\n\tsortProminentWords,\n\tcollapseProminentWordsOnStem,\n\tretrieveAbbreviations,\n};\n"],"mappings":"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","ignoreList":[]}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/** @module stringProcessing/createRegexFromArray */
|
|
2
|
+
|
|
3
|
+
import { map } from "lodash";
|
|
4
|
+
import addWordBoundary from "../word/addWordboundary.js";
|
|
5
|
+
import replaceDiacritics from "../transliterate/replaceDiacritics";
|
|
6
|
+
import sanitizeString from "../sanitize/sanitizeString";
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Creates a regex of combined strings from the input array.
|
|
10
|
+
*
|
|
11
|
+
* @param {string[]} array The array with strings
|
|
12
|
+
* @param {boolean} [disableWordBoundary=false] Boolean indicating whether or not to disable word boundaries.
|
|
13
|
+
* @param {string} [extraBoundary=""] A string that is used as extra boundary for the regex.
|
|
14
|
+
* @param {boolean} [doReplaceDiacritics=false] If set to true, it replaces diacritics. Defaults to false.
|
|
15
|
+
*
|
|
16
|
+
* @returns {RegExp} regex The regex created from the array.
|
|
17
|
+
*/
|
|
18
|
+
export default function (array, disableWordBoundary = false, extraBoundary = "", doReplaceDiacritics = false) {
|
|
19
|
+
array = map(array, function (string) {
|
|
20
|
+
if (doReplaceDiacritics) {
|
|
21
|
+
string = replaceDiacritics(string);
|
|
22
|
+
}
|
|
23
|
+
string = sanitizeString(string);
|
|
24
|
+
if (disableWordBoundary) {
|
|
25
|
+
return string;
|
|
26
|
+
}
|
|
27
|
+
return addWordBoundary(string, true, extraBoundary);
|
|
28
|
+
});
|
|
29
|
+
const regexString = "(" + array.join(")|(") + ")";
|
|
30
|
+
return new RegExp(regexString, "ig");
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=createRegexFromArray.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createRegexFromArray.js","names":["map","addWordBoundary","replaceDiacritics","sanitizeString","array","disableWordBoundary","extraBoundary","doReplaceDiacritics","string","regexString","join","RegExp"],"sources":["../../../../src/languageProcessing/helpers/regex/createRegexFromArray.js"],"sourcesContent":["/** @module stringProcessing/createRegexFromArray */\n\nimport { map } from \"lodash\";\nimport addWordBoundary from \"../word/addWordboundary.js\";\nimport replaceDiacritics from \"../transliterate/replaceDiacritics\";\nimport sanitizeString from \"../sanitize/sanitizeString\";\n\n/**\n * Creates a regex of combined strings from the input array.\n *\n * @param {string[]} array The array with strings\n * @param {boolean} [disableWordBoundary=false] Boolean indicating whether or not to disable word boundaries.\n * @param {string} [extraBoundary=\"\"] A string that is used as extra boundary for the regex.\n * @param {boolean} [doReplaceDiacritics=false] If set to true, it replaces diacritics. Defaults to false.\n *\n * @returns {RegExp} regex The regex created from the array.\n */\nexport default function( array, disableWordBoundary = false, extraBoundary = \"\", doReplaceDiacritics = false ) {\n\tarray = map( array, function( string ) {\n\t\tif ( doReplaceDiacritics ) {\n\t\t\tstring = replaceDiacritics( string );\n\t\t}\n\n\t\tstring = sanitizeString( string );\n\n\t\tif ( disableWordBoundary ) {\n\t\t\treturn string;\n\t\t}\n\t\treturn addWordBoundary( string, true, extraBoundary );\n\t} );\n\n\tconst regexString = \"(\" + array.join( \")|(\" ) + \")\";\n\n\treturn new RegExp( regexString, \"ig\" );\n}\n"],"mappings":"AAAA;;AAEA,SAASA,GAAG,QAAQ,QAAQ;AAC5B,OAAOC,eAAe;AACtB,OAAOC,iBAAiB;AACxB,OAAOC,cAAc;;AAErB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,UAAUC,KAAK,EAAEC,mBAAmB,GAAG,KAAK,EAAEC,aAAa,GAAG,EAAE,EAAEC,mBAAmB,GAAG,KAAK,EAAG;EAC9GH,KAAK,GAAGJ,GAAG,CAAEI,KAAK,EAAE,UAAUI,MAAM,EAAG;IACtC,IAAKD,mBAAmB,EAAG;MAC1BC,MAAM,GAAGN,iBAAiB,CAAEM,MAAO,CAAC;IACrC;IAEAA,MAAM,GAAGL,cAAc,CAAEK,MAAO,CAAC;IAEjC,IAAKH,mBAAmB,EAAG;MAC1B,OAAOG,MAAM;IACd;IACA,OAAOP,eAAe,CAAEO,MAAM,EAAE,IAAI,EAAEF,aAAc,CAAC;EACtD,CAAE,CAAC;EAEH,MAAMG,WAAW,GAAG,GAAG,GAAGL,KAAK,CAACM,IAAI,CAAE,KAAM,CAAC,GAAG,GAAG;EAEnD,OAAO,IAAIC,MAAM,CAAEF,WAAW,EAAE,IAAK,CAAC;AACvC","ignoreList":[]}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/** @module stringProcessing/createRegexFromDoubleArray */
|
|
2
|
+
|
|
3
|
+
import addWordBoundary from "../word/addWordboundary.js";
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Creates a regex string of combined strings from the input array.
|
|
7
|
+
*
|
|
8
|
+
* @param {array} array The array containing the various parts of a transition word combination.
|
|
9
|
+
*
|
|
10
|
+
* @returns {array} The array with replaced entries.
|
|
11
|
+
*/
|
|
12
|
+
const wordCombinationToRegexString = function (array) {
|
|
13
|
+
array = array.map(function (word) {
|
|
14
|
+
return addWordBoundary(word);
|
|
15
|
+
});
|
|
16
|
+
return array.join("(.*?)");
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Creates a regex of combined strings from the input array, containing arrays with two entries.
|
|
21
|
+
*
|
|
22
|
+
* @param {array} array The array containing arrays.
|
|
23
|
+
*
|
|
24
|
+
* @returns {RegExp} The regex created from the array.
|
|
25
|
+
*/
|
|
26
|
+
export default function (array) {
|
|
27
|
+
array = array.map(function (wordCombination) {
|
|
28
|
+
return wordCombinationToRegexString(wordCombination);
|
|
29
|
+
});
|
|
30
|
+
const regexString = "(" + array.join(")|(") + ")";
|
|
31
|
+
return new RegExp(regexString, "ig");
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=createRegexFromDoubleArray.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createRegexFromDoubleArray.js","names":["addWordBoundary","wordCombinationToRegexString","array","map","word","join","wordCombination","regexString","RegExp"],"sources":["../../../../src/languageProcessing/helpers/regex/createRegexFromDoubleArray.js"],"sourcesContent":["/** @module stringProcessing/createRegexFromDoubleArray */\n\nimport addWordBoundary from \"../word/addWordboundary.js\";\n\n/**\n * Creates a regex string of combined strings from the input array.\n *\n * @param {array} array The array containing the various parts of a transition word combination.\n *\n * @returns {array} The array with replaced entries.\n */\nconst wordCombinationToRegexString = function( array ) {\n\tarray = array.map( function( word ) {\n\t\treturn addWordBoundary( word );\n\t} );\n\treturn array.join( \"(.*?)\" );\n};\n\n/**\n * Creates a regex of combined strings from the input array, containing arrays with two entries.\n *\n * @param {array} array The array containing arrays.\n *\n * @returns {RegExp} The regex created from the array.\n */\nexport default function( array ) {\n\tarray = array.map( function( wordCombination ) {\n\t\treturn wordCombinationToRegexString( wordCombination );\n\t} );\n\n\tconst regexString = \"(\" + array.join( \")|(\" ) + \")\";\n\n\treturn new RegExp( regexString, \"ig\" );\n}\n"],"mappings":"AAAA;;AAEA,OAAOA,eAAe;;AAEtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,4BAA4B,GAAG,SAAAA,CAAUC,KAAK,EAAG;EACtDA,KAAK,GAAGA,KAAK,CAACC,GAAG,CAAE,UAAUC,IAAI,EAAG;IACnC,OAAOJ,eAAe,CAAEI,IAAK,CAAC;EAC/B,CAAE,CAAC;EACH,OAAOF,KAAK,CAACG,IAAI,CAAE,OAAQ,CAAC;AAC7B,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,UAAUH,KAAK,EAAG;EAChCA,KAAK,GAAGA,KAAK,CAACC,GAAG,CAAE,UAAUG,eAAe,EAAG;IAC9C,OAAOL,4BAA4B,CAAEK,eAAgB,CAAC;EACvD,CAAE,CAAC;EAEH,MAAMC,WAAW,GAAG,GAAG,GAAGL,KAAK,CAACG,IAAI,CAAE,KAAM,CAAC,GAAG,GAAG;EAEnD,OAAO,IAAIG,MAAM,CAAED,WAAW,EAAE,IAAK,CAAC;AACvC","ignoreList":[]}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/** @module stringProcessing/stringToRegex */
|
|
2
|
+
import { escapeRegExp, isUndefined, memoize } from "lodash";
|
|
3
|
+
import sanitizeString from "../sanitize/sanitizeString";
|
|
4
|
+
import replaceDiacritics from "../transliterate/replaceDiacritics.js";
|
|
5
|
+
import addWordBoundary from "../word/addWordboundary.js";
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Creates a regex from a string so it can be matched everywhere in the same way.
|
|
9
|
+
*
|
|
10
|
+
* @param {string} string The string to make a regex from.
|
|
11
|
+
* @param {string} [extraBoundary=""] A string that is used as extra boundary for the regex.
|
|
12
|
+
* @param {boolean} [doReplaceDiacritics=true] If set to false, it doesn't replace diacritics. Defaults to true.
|
|
13
|
+
*
|
|
14
|
+
* @returns {RegExp} regex The regex made from the keyword
|
|
15
|
+
*/
|
|
16
|
+
export default memoize(function (string, extraBoundary, doReplaceDiacritics) {
|
|
17
|
+
if (isUndefined(extraBoundary)) {
|
|
18
|
+
extraBoundary = "";
|
|
19
|
+
}
|
|
20
|
+
if (isUndefined(doReplaceDiacritics) || doReplaceDiacritics === true) {
|
|
21
|
+
string = replaceDiacritics(string);
|
|
22
|
+
}
|
|
23
|
+
string = sanitizeString(string);
|
|
24
|
+
string = escapeRegExp(string);
|
|
25
|
+
string = addWordBoundary(string, false, extraBoundary);
|
|
26
|
+
return new RegExp(string, "ig");
|
|
27
|
+
});
|
|
28
|
+
//# sourceMappingURL=createWordRegex.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createWordRegex.js","names":["escapeRegExp","isUndefined","memoize","sanitizeString","replaceDiacritics","addWordBoundary","string","extraBoundary","doReplaceDiacritics","RegExp"],"sources":["../../../../src/languageProcessing/helpers/regex/createWordRegex.js"],"sourcesContent":["/** @module stringProcessing/stringToRegex */\nimport { escapeRegExp, isUndefined, memoize } from \"lodash\";\nimport sanitizeString from \"../sanitize/sanitizeString\";\nimport replaceDiacritics from \"../transliterate/replaceDiacritics.js\";\nimport addWordBoundary from \"../word/addWordboundary.js\";\n\n/**\n * Creates a regex from a string so it can be matched everywhere in the same way.\n *\n * @param {string} string The string to make a regex from.\n * @param {string} [extraBoundary=\"\"] A string that is used as extra boundary for the regex.\n * @param {boolean} [doReplaceDiacritics=true] If set to false, it doesn't replace diacritics. Defaults to true.\n *\n * @returns {RegExp} regex The regex made from the keyword\n */\nexport default memoize( function( string, extraBoundary, doReplaceDiacritics ) {\n\tif ( isUndefined( extraBoundary ) ) {\n\t\textraBoundary = \"\";\n\t}\n\n\tif ( isUndefined( doReplaceDiacritics ) || doReplaceDiacritics === true ) {\n\t\tstring = replaceDiacritics( string );\n\t}\n\n\tstring = sanitizeString( string );\n\tstring = escapeRegExp( string );\n\tstring = addWordBoundary( string, false, extraBoundary );\n\n\treturn new RegExp( string, \"ig\" );\n} );\n"],"mappings":"AAAA;AACA,SAASA,YAAY,EAAEC,WAAW,EAAEC,OAAO,QAAQ,QAAQ;AAC3D,OAAOC,cAAc;AACrB,OAAOC,iBAAiB;AACxB,OAAOC,eAAe;;AAEtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAeH,OAAO,CAAE,UAAUI,MAAM,EAAEC,aAAa,EAAEC,mBAAmB,EAAG;EAC9E,IAAKP,WAAW,CAAEM,aAAc,CAAC,EAAG;IACnCA,aAAa,GAAG,EAAE;EACnB;EAEA,IAAKN,WAAW,CAAEO,mBAAoB,CAAC,IAAIA,mBAAmB,KAAK,IAAI,EAAG;IACzEF,MAAM,GAAGF,iBAAiB,CAAEE,MAAO,CAAC;EACrC;EAEAA,MAAM,GAAGH,cAAc,CAAEG,MAAO,CAAC;EACjCA,MAAM,GAAGN,YAAY,CAAEM,MAAO,CAAC;EAC/BA,MAAM,GAAGD,eAAe,CAAEC,MAAM,EAAE,KAAK,EAAEC,aAAc,CAAC;EAExD,OAAO,IAAIE,MAAM,CAAEH,MAAM,EAAE,IAAK,CAAC;AAClC,CAAE,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/** @module stringProcessing/matchStringWithRegex */
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Checks a string with a regex, return all matches found with that regex.
|
|
5
|
+
*
|
|
6
|
+
* @param {String} text The text to match.
|
|
7
|
+
* @param {object} regex A compiled regular expression.
|
|
8
|
+
*
|
|
9
|
+
* @returns {Array} Array with matches, empty array if no matches found.
|
|
10
|
+
*/
|
|
11
|
+
export default function (text, regex) {
|
|
12
|
+
let matches = text.match(regex);
|
|
13
|
+
if (matches === null) {
|
|
14
|
+
matches = [];
|
|
15
|
+
}
|
|
16
|
+
return matches;
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=matchStringWithRegex.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"matchStringWithRegex.js","names":["text","regex","matches","match"],"sources":["../../../../src/languageProcessing/helpers/regex/matchStringWithRegex.js"],"sourcesContent":["/** @module stringProcessing/matchStringWithRegex */\n\n/**\n * Checks a string with a regex, return all matches found with that regex.\n *\n * @param {String} \t\ttext The text to match.\n * @param {object} \t\tregex \t\tA compiled regular expression.\n *\n * @returns {Array} Array with matches, empty array if no matches found.\n */\nexport default function( text, regex ) {\n\tlet matches = text.match( regex );\n\n\tif ( matches === null ) {\n\t\tmatches = [];\n\t}\n\n\treturn matches;\n}\n"],"mappings":"AAAA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,UAAUA,IAAI,EAAEC,KAAK,EAAG;EACtC,IAAIC,OAAO,GAAGF,IAAI,CAACG,KAAK,CAAEF,KAAM,CAAC;EAEjC,IAAKC,OAAO,KAAK,IAAI,EAAG;IACvBA,OAAO,GAAG,EAAE;EACb;EAEA,OAAOA,OAAO;AACf","ignoreList":[]}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Checks whether a given regex matches a given word and if so, performs the replacement.
|
|
3
|
+
*
|
|
4
|
+
* @param {string} word The word that may need to be modified.
|
|
5
|
+
* @param {string[]} regexAndReplacement A regex and the required replacement.
|
|
6
|
+
*
|
|
7
|
+
* @returns {?string} The modified stem or undefined if no match was found.
|
|
8
|
+
*/
|
|
9
|
+
export default function searchAndReplaceWithOneRegex(word, regexAndReplacement) {
|
|
10
|
+
if (word.search(new RegExp(regexAndReplacement[0])) !== -1) {
|
|
11
|
+
word = word.replace(new RegExp(regexAndReplacement[0]), regexAndReplacement[1]);
|
|
12
|
+
return word;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=searchAndReplaceWithOneRegex.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"searchAndReplaceWithOneRegex.js","names":["searchAndReplaceWithOneRegex","word","regexAndReplacement","search","RegExp","replace"],"sources":["../../../../src/languageProcessing/helpers/regex/searchAndReplaceWithOneRegex.js"],"sourcesContent":["/**\n * Checks whether a given regex matches a given word and if so, performs the replacement.\n *\n * @param {string} word \t\t\t\t\tThe word that may need to be modified.\n * @param {string[]} regexAndReplacement A regex and the required replacement.\n *\n * @returns {?string} The modified stem or undefined if no match was found.\n */\nexport default function searchAndReplaceWithOneRegex( word, regexAndReplacement ) {\n\tif ( word.search( new RegExp( regexAndReplacement[ 0 ] ) ) !== -1 ) {\n\t\tword = word.replace( new RegExp( regexAndReplacement[ 0 ] ), regexAndReplacement[ 1 ] );\n\t\treturn word;\n\t}\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAASA,4BAA4BA,CAAEC,IAAI,EAAEC,mBAAmB,EAAG;EACjF,IAAKD,IAAI,CAACE,MAAM,CAAE,IAAIC,MAAM,CAAEF,mBAAmB,CAAE,CAAC,CAAG,CAAE,CAAC,KAAK,CAAC,CAAC,EAAG;IACnED,IAAI,GAAGA,IAAI,CAACI,OAAO,CAAE,IAAID,MAAM,CAAEF,mBAAmB,CAAE,CAAC,CAAG,CAAC,EAAEA,mBAAmB,CAAE,CAAC,CAAG,CAAC;IACvF,OAAOD,IAAI;EACZ;AACD","ignoreList":[]}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Returns an array with double quotes.
|
|
3
|
+
*
|
|
4
|
+
* Japanese-specific quotes:
|
|
5
|
+
* U300c - left corner bracket.
|
|
6
|
+
* U300d - right corner bracket.
|
|
7
|
+
* U300e - left white corner bracket.
|
|
8
|
+
* U300f - right white corner bracket.
|
|
9
|
+
*
|
|
10
|
+
* @returns {string[]} The array with double quotes..
|
|
11
|
+
*/
|
|
12
|
+
export default ["“", "”", "〝", "〞", "〟", "‟", "„", "\"", "\u300c", "\u300d", "\u300e", "\u300f"];
|
|
13
|
+
//# sourceMappingURL=doubleQuotes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"doubleQuotes.js","names":[],"sources":["../../../../src/languageProcessing/helpers/sanitize/doubleQuotes.js"],"sourcesContent":["/**\n * Returns an array with double quotes.\n *\n * Japanese-specific quotes:\n * U300c - left corner bracket.\n * U300d - right corner bracket.\n * U300e - left white corner bracket.\n * U300f - right white corner bracket.\n *\n * @returns {string[]} The array with double quotes..\n */\nexport default [ \"“\", \"”\", \"〝\", \"〞\", \"〟\", \"‟\", \"„\", \"\\\"\", \"\\u300c\", \"\\u300d\", \"\\u300e\", \"\\u300f\" ];\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,CAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,CAAE","ignoreList":[]}
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Creates a regex to filter shortcodes from HTML.
|
|
3
|
+
* @param {string[]} shortcodeTags The tags of the shortcodes to filter.
|
|
4
|
+
* @returns {RegExp} The regex to recognize the shortcodes.
|
|
5
|
+
*/
|
|
6
|
+
export const createShortcodeTagsRegex = shortcodeTags => {
|
|
7
|
+
const shortcodeTagsRegexString = `\\[\\/?(${shortcodeTags.join("|")})[^\\]]*\\]`;
|
|
8
|
+
return new RegExp(shortcodeTagsRegexString, "g");
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Filters shortcodes from HTML string.
|
|
13
|
+
* @param {string} html The HTML to filter.
|
|
14
|
+
* @param {string[]} shortcodeTags The tags of the shortcodes to filter.
|
|
15
|
+
* @returns {string} The filtered HTML.
|
|
16
|
+
*/
|
|
17
|
+
export const filterShortcodesFromHTML = (html, shortcodeTags) => {
|
|
18
|
+
if (!shortcodeTags || shortcodeTags.length === 0) {
|
|
19
|
+
return html;
|
|
20
|
+
}
|
|
21
|
+
const shortcodeTagsRegex = createShortcodeTagsRegex(shortcodeTags);
|
|
22
|
+
return html.replace(shortcodeTagsRegex, "");
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Checks if a token is part of an opening shortcode.
|
|
27
|
+
* @param {Token[]} tokens The tokens to check.
|
|
28
|
+
* @param {number} index The index of the current token.
|
|
29
|
+
* @returns {boolean} Whether the token is part of an opening shortcode.
|
|
30
|
+
*/
|
|
31
|
+
const tokenIsPartOfOpeningShortcode = (tokens, index) => {
|
|
32
|
+
return tokens[index - 1] && tokens[index - 1].text === "[";
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Checks if a token is part of a closing shortcode.
|
|
37
|
+
* @param {Token[]} tokens The tokens to check.
|
|
38
|
+
* @param {number} index The index of the current token.
|
|
39
|
+
* @returns {boolean} Whether the token is part of a closing shortcode.
|
|
40
|
+
*/
|
|
41
|
+
const tokenIsPartOfClosingShortcode = (tokens, index) => {
|
|
42
|
+
return tokens[index - 1] && tokens[index - 1].text === "/" && tokens[index - 2] && tokens[index - 2].text === "[";
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Checks if a token is part of a shortcode.
|
|
47
|
+
* @param {Token[]} tokens The tokens to check.
|
|
48
|
+
* @param {number} index The index of the current token.
|
|
49
|
+
* @param {string[]} shortcodeTags An array of active shortcode tags.
|
|
50
|
+
* @param {boolean} encounteredClosingBracket Whether a closing bracket has been encountered (while looping backwards through the tokens).
|
|
51
|
+
* @returns {boolean} Whether the token is part of a shortcode.
|
|
52
|
+
*/
|
|
53
|
+
const tokenIsShortcode = (tokens, index, shortcodeTags, encounteredClosingBracket) => {
|
|
54
|
+
return encounteredClosingBracket && shortcodeTags.includes(tokens[index].text) && (tokenIsPartOfOpeningShortcode(tokens, index) || tokenIsPartOfClosingShortcode(tokens, index));
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Filters shortcodes from a sentence.
|
|
59
|
+
* @param {Sentence} sentence The sentence to filter.
|
|
60
|
+
* @param {string[]} shortcodeTags The tags of the shortcodes to filter.
|
|
61
|
+
* @param {RegExp} shortcodeTagsRegex The regex to filter the shortcodes.
|
|
62
|
+
* @returns {void}
|
|
63
|
+
*
|
|
64
|
+
*/
|
|
65
|
+
const filterShortcodesFromSentence = (sentence, shortcodeTags, shortcodeTagsRegex) => {
|
|
66
|
+
const tokens = sentence.tokens;
|
|
67
|
+
let encounteredClosingBracket = false;
|
|
68
|
+
// traverse through tokens backwards
|
|
69
|
+
for (let i = tokens.length - 1; i >= 0; i--) {
|
|
70
|
+
if (tokens[i].text === "]") {
|
|
71
|
+
encounteredClosingBracket = true;
|
|
72
|
+
}
|
|
73
|
+
if (tokenIsShortcode(tokens, i, shortcodeTags, encounteredClosingBracket)) {
|
|
74
|
+
while (tokens[i].text !== "]") {
|
|
75
|
+
tokens.splice(i, 1);
|
|
76
|
+
}
|
|
77
|
+
tokens.splice(i, 1);
|
|
78
|
+
encounteredClosingBracket = false;
|
|
79
|
+
while (tokens[i - 1] && "[/".includes(tokens[i - 1].text)) {
|
|
80
|
+
tokens.splice(i - 1, 1);
|
|
81
|
+
i--;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
sentence.tokens = tokens;
|
|
86
|
+
sentence.text = sentence.text.replace(shortcodeTagsRegex, "");
|
|
87
|
+
};
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* A recursive function that filters shortcodes from sentences.
|
|
91
|
+
* @param {Node} tree The tree to filter.
|
|
92
|
+
* @param {string[]} shortcodeTags The tags of the shortcodes to filter.
|
|
93
|
+
* @param {RegExp} shortcodeTagsRegex The regex to filter the shortcodes.
|
|
94
|
+
* @returns {void}
|
|
95
|
+
*/
|
|
96
|
+
const filterShortcodesFromSentences = (tree, shortcodeTags, shortcodeTagsRegex) => {
|
|
97
|
+
if (tree.sentences) {
|
|
98
|
+
tree.sentences.forEach(sentence => {
|
|
99
|
+
filterShortcodesFromSentence(sentence, shortcodeTags, shortcodeTagsRegex);
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
if (tree.childNodes) {
|
|
103
|
+
tree.childNodes.forEach(childNode => {
|
|
104
|
+
filterShortcodesFromSentences(childNode, shortcodeTags, shortcodeTagsRegex);
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
};
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* Filters shortcodes from the tree.
|
|
111
|
+
* @param {Node} tree The tree to filter.
|
|
112
|
+
* @param {string[]} shortcodeTags The tags of the shortcodes to filter.
|
|
113
|
+
* @returns {void}
|
|
114
|
+
*/
|
|
115
|
+
const filterShortcodesFromTree = (tree, shortcodeTags) => {
|
|
116
|
+
if (!shortcodeTags || shortcodeTags.length === 0) {
|
|
117
|
+
return;
|
|
118
|
+
}
|
|
119
|
+
const shortcodeTagsRegex = createShortcodeTagsRegex(shortcodeTags);
|
|
120
|
+
filterShortcodesFromSentences(tree, shortcodeTags, shortcodeTagsRegex);
|
|
121
|
+
};
|
|
122
|
+
export default filterShortcodesFromTree;
|
|
123
|
+
//# sourceMappingURL=filterShortcodesFromTree.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"filterShortcodesFromTree.js","names":["createShortcodeTagsRegex","shortcodeTags","shortcodeTagsRegexString","join","RegExp","filterShortcodesFromHTML","html","length","shortcodeTagsRegex","replace","tokenIsPartOfOpeningShortcode","tokens","index","text","tokenIsPartOfClosingShortcode","tokenIsShortcode","encounteredClosingBracket","includes","filterShortcodesFromSentence","sentence","i","splice","filterShortcodesFromSentences","tree","sentences","forEach","childNodes","childNode","filterShortcodesFromTree"],"sources":["../../../../src/languageProcessing/helpers/sanitize/filterShortcodesFromTree.js"],"sourcesContent":["\n/**\n * Creates a regex to filter shortcodes from HTML.\n * @param {string[]} shortcodeTags The tags of the shortcodes to filter.\n * @returns {RegExp} The regex to recognize the shortcodes.\n */\nexport const createShortcodeTagsRegex = shortcodeTags => {\n\tconst shortcodeTagsRegexString = `\\\\[\\\\/?(${ shortcodeTags.join( \"|\" ) })[^\\\\]]*\\\\]`;\n\treturn new RegExp( shortcodeTagsRegexString, \"g\" );\n};\n\n/**\n * Filters shortcodes from HTML string.\n * @param {string} html The HTML to filter.\n * @param {string[]} shortcodeTags The tags of the shortcodes to filter.\n * @returns {string} The filtered HTML.\n */\nexport const filterShortcodesFromHTML = ( html, shortcodeTags ) => {\n\tif ( ! shortcodeTags || shortcodeTags.length === 0 ) {\n\t\treturn html;\n\t}\n\tconst shortcodeTagsRegex = createShortcodeTagsRegex( shortcodeTags );\n\treturn html.replace( shortcodeTagsRegex, \"\" );\n};\n\n/**\n * Checks if a token is part of an opening shortcode.\n * @param {Token[]} tokens The tokens to check.\n * @param {number} index The index of the current token.\n * @returns {boolean} Whether the token is part of an opening shortcode.\n */\nconst tokenIsPartOfOpeningShortcode = ( tokens, index ) => {\n\treturn tokens[ index - 1 ] && tokens[ index - 1 ].text === \"[\";\n};\n\n/**\n * Checks if a token is part of a closing shortcode.\n * @param {Token[]} tokens The tokens to check.\n * @param {number} index The index of the current token.\n * @returns {boolean} Whether the token is part of a closing shortcode.\n */\nconst tokenIsPartOfClosingShortcode = ( tokens, index ) => {\n\treturn tokens[ index - 1 ] && tokens[ index - 1 ].text === \"/\" && tokens[ index - 2 ] && tokens[ index - 2 ].text === \"[\";\n};\n\n/**\n * Checks if a token is part of a shortcode.\n * @param {Token[]} tokens The tokens to check.\n * @param {number} index The index of the current token.\n * @param {string[]} shortcodeTags An array of active shortcode tags.\n * @param {boolean} encounteredClosingBracket Whether a closing bracket has been encountered (while looping backwards through the tokens).\n * @returns {boolean} Whether the token is part of a shortcode.\n */\nconst tokenIsShortcode = ( tokens, index, shortcodeTags, encounteredClosingBracket ) => {\n\treturn encounteredClosingBracket && shortcodeTags.includes( tokens[ index ].text ) &&\n\t\t( tokenIsPartOfOpeningShortcode( tokens, index ) || tokenIsPartOfClosingShortcode( tokens, index ) );\n};\n\n/**\n * Filters shortcodes from a sentence.\n * @param {Sentence} sentence The sentence to filter.\n * @param {string[]} shortcodeTags The tags of the shortcodes to filter.\n * @param {RegExp} shortcodeTagsRegex The regex to filter the shortcodes.\n * @returns {void}\n *\n */\nconst filterShortcodesFromSentence = ( sentence, shortcodeTags, shortcodeTagsRegex ) => {\n\tconst tokens = sentence.tokens;\n\n\tlet encounteredClosingBracket = false;\n\t// traverse through tokens backwards\n\tfor ( let i = tokens.length - 1; i >= 0; i-- ) {\n\t\tif ( tokens[ i ].text === \"]\" ) {\n\t\t\tencounteredClosingBracket = true;\n\t\t}\n\n\t\tif ( tokenIsShortcode( tokens, i, shortcodeTags, encounteredClosingBracket ) ) {\n\t\t\twhile ( tokens[ i ].text !== \"]\" ) {\n\t\t\t\ttokens.splice( i, 1 );\n\t\t\t}\n\t\t\ttokens.splice( i, 1 );\n\t\t\tencounteredClosingBracket = false;\n\n\t\t\twhile ( tokens[ i - 1 ] && \"[/\".includes( tokens[ i - 1 ].text ) ) {\n\t\t\t\ttokens.splice( i - 1, 1 );\n\t\t\t\ti--;\n\t\t\t}\n\t\t}\n\t}\n\tsentence.tokens = tokens;\n\n\tsentence.text = sentence.text.replace( shortcodeTagsRegex, \"\" );\n};\n\n/**\n * A recursive function that filters shortcodes from sentences.\n * @param {Node} tree The tree to filter.\n * @param {string[]} shortcodeTags The tags of the shortcodes to filter.\n * @param {RegExp} shortcodeTagsRegex The regex to filter the shortcodes.\n * @returns {void}\n */\nconst filterShortcodesFromSentences = ( tree, shortcodeTags, shortcodeTagsRegex ) => {\n\tif ( tree.sentences ) {\n\t\ttree.sentences.forEach( sentence => {\n\t\t\tfilterShortcodesFromSentence( sentence, shortcodeTags, shortcodeTagsRegex );\n\t\t} );\n\t}\n\n\tif ( tree.childNodes ) {\n\t\ttree.childNodes.forEach( childNode => {\n\t\t\tfilterShortcodesFromSentences( childNode, shortcodeTags, shortcodeTagsRegex );\n\t\t} );\n\t}\n};\n\n/**\n * Filters shortcodes from the tree.\n * @param {Node} tree The tree to filter.\n * @param {string[]} shortcodeTags The tags of the shortcodes to filter.\n * @returns {void}\n */\nconst filterShortcodesFromTree = ( tree, shortcodeTags ) => {\n\tif ( ! shortcodeTags || shortcodeTags.length === 0 ) {\n\t\treturn;\n\t}\n\tconst shortcodeTagsRegex = createShortcodeTagsRegex( shortcodeTags );\n\n\tfilterShortcodesFromSentences( tree, shortcodeTags, shortcodeTagsRegex );\n};\n\nexport default filterShortcodesFromTree;\n"],"mappings":"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","ignoreList":[]}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Removes list-related html tags in a text to be used for the keyphrase distribution assessment.
|
|
3
|
+
* That way, lists with single words don't result in a skewed keyphrase distribution result.
|
|
4
|
+
*
|
|
5
|
+
* @param {string} text The text in which to remove the list structures.
|
|
6
|
+
*
|
|
7
|
+
* @returns {string} The text with all list structures removed.
|
|
8
|
+
*/
|
|
9
|
+
export function mergeListItems(text) {
|
|
10
|
+
const listTags = /<\/?(o|ul)(?:[^>]+)?>/g;
|
|
11
|
+
const listItemTags = /\s?<\/?li(?:[^>]+)?>\s?/g;
|
|
12
|
+
|
|
13
|
+
/*
|
|
14
|
+
* Steps:
|
|
15
|
+
* 1) Remove all ul and ol tags.
|
|
16
|
+
* 2) Replace all li tags with spaces to avoid list items being stuck together.
|
|
17
|
+
* 3) Replace multiple instances of whitespace with a single instance.
|
|
18
|
+
*/
|
|
19
|
+
text = text.replace(listTags, "");
|
|
20
|
+
text = text.replace(listItemTags, " ");
|
|
21
|
+
text = text.replace(/\s+/g, " ");
|
|
22
|
+
return text;
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=mergeListItems.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mergeListItems.js","names":["mergeListItems","text","listTags","listItemTags","replace"],"sources":["../../../../src/languageProcessing/helpers/sanitize/mergeListItems.js"],"sourcesContent":["/**\n * Removes list-related html tags in a text to be used for the keyphrase distribution assessment.\n * That way, lists with single words don't result in a skewed keyphrase distribution result.\n *\n * @param {string} text The text in which to remove the list structures.\n *\n * @returns {string} The text with all list structures removed.\n */\nexport function mergeListItems( text ) {\n\tconst listTags = /<\\/?(o|ul)(?:[^>]+)?>/g;\n\tconst listItemTags = /\\s?<\\/?li(?:[^>]+)?>\\s?/g;\n\n\t/*\n\t * Steps:\n\t * 1) Remove all ul and ol tags.\n\t * 2) Replace all li tags with spaces to avoid list items being stuck together.\n\t * 3) Replace multiple instances of whitespace with a single instance.\n\t */\n\ttext = text.replace( listTags, \"\" );\n\ttext = text.replace( listItemTags, \" \" );\n\ttext = text.replace( /\\s+/g, \" \" );\n\n\treturn text;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASA,cAAcA,CAAEC,IAAI,EAAG;EACtC,MAAMC,QAAQ,GAAG,wBAAwB;EACzC,MAAMC,YAAY,GAAG,0BAA0B;;EAE/C;AACD;AACA;AACA;AACA;AACA;EACCF,IAAI,GAAGA,IAAI,CAACG,OAAO,CAAEF,QAAQ,EAAE,EAAG,CAAC;EACnCD,IAAI,GAAGA,IAAI,CAACG,OAAO,CAAED,YAAY,EAAE,GAAI,CAAC;EACxCF,IAAI,GAAGA,IAAI,CAACG,OAAO,CAAE,MAAM,EAAE,GAAI,CAAC;EAElC,OAAOH,IAAI;AACZ","ignoreList":[]}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/** @module stringProcessing/parseSynonyms */
|
|
2
|
+
|
|
3
|
+
import stripSpaces from "./stripSpaces.js";
|
|
4
|
+
import removePunctuationExceptQuotes from "./removePunctuationExceptQuotes.js";
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Parses synonyms from a comma-separated string into an array.
|
|
8
|
+
*
|
|
9
|
+
* @param {String} synonyms The text to match
|
|
10
|
+
*
|
|
11
|
+
* @returns {Array} An array with all synonyms.
|
|
12
|
+
*/
|
|
13
|
+
export default function (synonyms) {
|
|
14
|
+
let synonymsSplit = synonyms.split(",");
|
|
15
|
+
synonymsSplit = synonymsSplit.map(synonym => removePunctuationExceptQuotes(stripSpaces(synonym))).filter(synonym => synonym);
|
|
16
|
+
return synonymsSplit;
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=parseSynonyms.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parseSynonyms.js","names":["stripSpaces","removePunctuationExceptQuotes","synonyms","synonymsSplit","split","map","synonym","filter"],"sources":["../../../../src/languageProcessing/helpers/sanitize/parseSynonyms.js"],"sourcesContent":["/** @module stringProcessing/parseSynonyms */\n\nimport stripSpaces from \"./stripSpaces.js\";\nimport removePunctuationExceptQuotes from \"./removePunctuationExceptQuotes.js\";\n\n/**\n * Parses synonyms from a comma-separated string into an array.\n *\n * @param {String} synonyms The text to match\n *\n * @returns {Array} An array with all synonyms.\n */\nexport default function( synonyms ) {\n\tlet synonymsSplit = synonyms.split( \",\" );\n\n\tsynonymsSplit = synonymsSplit.map( synonym =>\n\t\tremovePunctuationExceptQuotes( stripSpaces( synonym ) ) ).filter( synonym => synonym );\n\n\treturn synonymsSplit;\n}\n"],"mappings":"AAAA;;AAEA,OAAOA,WAAW;AAClB,OAAOC,6BAA6B;;AAEpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,UAAUC,QAAQ,EAAG;EACnC,IAAIC,aAAa,GAAGD,QAAQ,CAACE,KAAK,CAAE,GAAI,CAAC;EAEzCD,aAAa,GAAGA,aAAa,CAACE,GAAG,CAAEC,OAAO,IACzCL,6BAA6B,CAAED,WAAW,CAAEM,OAAQ,CAAE,CAAE,CAAC,CAACC,MAAM,CAAED,OAAO,IAAIA,OAAQ,CAAC;EAEvF,OAAOH,aAAa;AACrB","ignoreList":[]}
|