axyseo 2.0.0-alpha.2 → 2.1.0
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/config/diacritics.js +1 -7
- package/build/config/diacritics.js.map +1 -1
- package/build/config/getTransliterations.js +6 -14
- package/build/config/getTransliterations.js.map +1 -1
- package/build/config/transliterationsWPstyle.js +5 -12
- package/build/config/transliterationsWPstyle.js.map +1 -1
- package/build/config/wordBoundaries.js +1 -7
- package/build/config/wordBoundaries.js.map +1 -1
- package/build/config/wordBoundariesWithoutPunctuation.js +2 -8
- package/build/config/wordBoundariesWithoutPunctuation.js.map +1 -1
- package/build/const/analysis.js +32 -11
- package/build/const/analysis.js.map +1 -1
- package/build/errors/invalidType.js +1 -8
- package/build/errors/invalidType.js.map +1 -1
- package/build/errors/missingArgument.js +1 -8
- package/build/errors/missingArgument.js.map +1 -1
- package/build/helpers/createMeasurementElement.js +1 -8
- package/build/helpers/createMeasurementElement.js.map +1 -1
- package/build/helpers/domManipulation.js +3 -8
- package/build/helpers/domManipulation.js.map +1 -1
- package/build/helpers/errors.js +5 -10
- package/build/helpers/errors.js.map +1 -1
- package/build/helpers/factory.js +7 -13
- package/build/helpers/factory.js.map +1 -1
- package/build/helpers/formatNumber.js +1 -7
- package/build/helpers/formatNumber.js.map +1 -1
- package/build/helpers/formatString.js +4 -9
- package/build/helpers/formatString.js.map +1 -1
- package/build/helpers/getLanguagesWithWordComplexity.js +1 -7
- package/build/helpers/getLanguagesWithWordComplexity.js.map +1 -1
- package/build/helpers/getLanguagesWithWordFormSupport.js +1 -7
- package/build/helpers/getLanguagesWithWordFormSupport.js.map +1 -1
- package/build/helpers/getWordComplexityConfig.js +9 -15
- package/build/helpers/getWordComplexityConfig.js.map +1 -1
- package/build/helpers/getWordComplexityHelper.js +9 -15
- package/build/helpers/getWordComplexityHelper.js.map +1 -1
- package/build/helpers/htmlEntities.js +6 -11
- package/build/helpers/htmlEntities.js.map +1 -1
- package/build/helpers/includesAny.js +3 -8
- package/build/helpers/includesAny.js.map +1 -1
- package/build/helpers/index.js +30 -72
- package/build/helpers/index.js.map +1 -1
- package/build/helpers/shortlinker/Shortlinker.js +1 -8
- package/build/helpers/shortlinker/Shortlinker.js.map +1 -1
- package/build/helpers/shortlinker/index.js +1 -16
- package/build/helpers/shortlinker/index.js.map +1 -1
- package/build/helpers/shortlinker/singleton.js +5 -13
- package/build/helpers/shortlinker/singleton.js.map +1 -1
- package/build/helpers/types.js +2 -9
- package/build/helpers/types.js.map +1 -1
- package/build/index.js +25 -87
- package/build/index.js.map +1 -1
- package/build/languageProcessing/AbstractResearcher.js +88 -95
- package/build/languageProcessing/AbstractResearcher.js.map +1 -1
- package/build/languageProcessing/helpers/highlighting/getMarkingsInSentence.js +3 -10
- package/build/languageProcessing/helpers/highlighting/getMarkingsInSentence.js.map +1 -1
- package/build/languageProcessing/helpers/html/getFieldsToMark.js +6 -11
- package/build/languageProcessing/helpers/html/getFieldsToMark.js.map +1 -1
- package/build/languageProcessing/helpers/html/getSubheadingTexts.js +3 -8
- package/build/languageProcessing/helpers/html/getSubheadingTexts.js.map +1 -1
- package/build/languageProcessing/helpers/html/getSubheadings.js +2 -12
- package/build/languageProcessing/helpers/html/getSubheadings.js.map +1 -1
- package/build/languageProcessing/helpers/html/html.js +9 -17
- package/build/languageProcessing/helpers/html/html.js.map +1 -1
- package/build/languageProcessing/helpers/html/htmlParser.js +3 -10
- package/build/languageProcessing/helpers/html/htmlParser.js.map +1 -1
- package/build/languageProcessing/helpers/html/matchParagraphs.js +7 -12
- package/build/languageProcessing/helpers/html/matchParagraphs.js.map +1 -1
- package/build/languageProcessing/helpers/html/normalizeHTML.js +4 -10
- package/build/languageProcessing/helpers/html/normalizeHTML.js.map +1 -1
- package/build/languageProcessing/helpers/image/getAltAttribute.js +3 -9
- package/build/languageProcessing/helpers/image/getAltAttribute.js.map +1 -1
- package/build/languageProcessing/helpers/image/getImagesInTree.js +1 -7
- package/build/languageProcessing/helpers/image/getImagesInTree.js.map +1 -1
- package/build/languageProcessing/helpers/image/imageInText.js +5 -12
- package/build/languageProcessing/helpers/image/imageInText.js.map +1 -1
- package/build/languageProcessing/helpers/index.js +5 -40
- package/build/languageProcessing/helpers/index.js.map +1 -1
- package/build/languageProcessing/helpers/language/getLanguage.js +1 -7
- package/build/languageProcessing/helpers/language/getLanguage.js.map +1 -1
- package/build/languageProcessing/helpers/link/checkNofollow.js +3 -10
- package/build/languageProcessing/helpers/link/checkNofollow.js.map +1 -1
- package/build/languageProcessing/helpers/link/getAnchorsFromText.js +1 -7
- package/build/languageProcessing/helpers/link/getAnchorsFromText.js.map +1 -1
- package/build/languageProcessing/helpers/link/getLinkType.js +7 -13
- package/build/languageProcessing/helpers/link/getLinkType.js.map +1 -1
- package/build/languageProcessing/helpers/match/findKeywordFormsInString.js +10 -17
- package/build/languageProcessing/helpers/match/findKeywordFormsInString.js.map +1 -1
- package/build/languageProcessing/helpers/match/isDoubleQuoted.js +4 -10
- package/build/languageProcessing/helpers/match/isDoubleQuoted.js.map +1 -1
- package/build/languageProcessing/helpers/match/matchTextWithArray.js +6 -12
- package/build/languageProcessing/helpers/match/matchTextWithArray.js.map +1 -1
- package/build/languageProcessing/helpers/match/matchTextWithTransliteration.js +16 -22
- package/build/languageProcessing/helpers/match/matchTextWithTransliteration.js.map +1 -1
- package/build/languageProcessing/helpers/match/matchTextWithWord.js +17 -23
- package/build/languageProcessing/helpers/match/matchTextWithWord.js.map +1 -1
- package/build/languageProcessing/helpers/match/matchWordFormsWithSentence.js +7 -15
- package/build/languageProcessing/helpers/match/matchWordFormsWithSentence.js.map +1 -1
- package/build/languageProcessing/helpers/match/processExactMatchRequest.js +3 -9
- package/build/languageProcessing/helpers/match/processExactMatchRequest.js.map +1 -1
- package/build/languageProcessing/helpers/morphology/baseStemmer.js +1 -7
- package/build/languageProcessing/helpers/morphology/baseStemmer.js.map +1 -1
- package/build/languageProcessing/helpers/morphology/buildFormRule.js +1 -7
- package/build/languageProcessing/helpers/morphology/buildFormRule.js.map +1 -1
- package/build/languageProcessing/helpers/morphology/buildTopicStems.js +13 -23
- package/build/languageProcessing/helpers/morphology/buildTopicStems.js.map +1 -1
- package/build/languageProcessing/helpers/morphology/createRulesFromArrays.js +2 -9
- package/build/languageProcessing/helpers/morphology/createRulesFromArrays.js.map +1 -1
- package/build/languageProcessing/helpers/morphology/exceptionListHelpers.js +5 -13
- package/build/languageProcessing/helpers/morphology/exceptionListHelpers.js.map +1 -1
- package/build/languageProcessing/helpers/morphology/findMatchingEndingInArray.js +1 -7
- package/build/languageProcessing/helpers/morphology/findMatchingEndingInArray.js.map +1 -1
- package/build/languageProcessing/helpers/morphology/flattenSortLength.js +3 -8
- package/build/languageProcessing/helpers/morphology/flattenSortLength.js.map +1 -1
- package/build/languageProcessing/helpers/morphology/getAllWordsFromPaper.js +12 -18
- package/build/languageProcessing/helpers/morphology/getAllWordsFromPaper.js.map +1 -1
- package/build/languageProcessing/helpers/morphology/regexHelpers.js +3 -11
- package/build/languageProcessing/helpers/morphology/regexHelpers.js.map +1 -1
- package/build/languageProcessing/helpers/morphology/stemHelpers.js +2 -9
- package/build/languageProcessing/helpers/morphology/stemHelpers.js.map +1 -1
- package/build/languageProcessing/helpers/morphology/stemPrefixedFunctionWords.js +1 -7
- package/build/languageProcessing/helpers/morphology/stemPrefixedFunctionWords.js.map +1 -1
- package/build/languageProcessing/helpers/passiveVoice/periphrastic/directPrecedenceException.js +5 -11
- package/build/languageProcessing/helpers/passiveVoice/periphrastic/directPrecedenceException.js.map +1 -1
- package/build/languageProcessing/helpers/passiveVoice/periphrastic/freeAuxiliaryParticipleOrder/getClausesSplitOnStopWords.js +9 -15
- package/build/languageProcessing/helpers/passiveVoice/periphrastic/freeAuxiliaryParticipleOrder/getClausesSplitOnStopWords.js.map +1 -1
- package/build/languageProcessing/helpers/passiveVoice/periphrastic/freeAuxiliaryParticipleOrder/nonDirectParticiplePrecedenceException.js +9 -15
- package/build/languageProcessing/helpers/passiveVoice/periphrastic/freeAuxiliaryParticipleOrder/nonDirectParticiplePrecedenceException.js.map +1 -1
- package/build/languageProcessing/helpers/passiveVoice/periphrastic/getClauses.js +28 -34
- package/build/languageProcessing/helpers/passiveVoice/periphrastic/getClauses.js.map +1 -1
- package/build/languageProcessing/helpers/passiveVoice/periphrastic/getIndicesWithRegex.js +1 -7
- package/build/languageProcessing/helpers/passiveVoice/periphrastic/getIndicesWithRegex.js.map +1 -1
- package/build/languageProcessing/helpers/passiveVoice/periphrastic/matchRegularParticiples.js +3 -8
- package/build/languageProcessing/helpers/passiveVoice/periphrastic/matchRegularParticiples.js.map +1 -1
- package/build/languageProcessing/helpers/passiveVoice/periphrastic/precedenceException.js +5 -11
- package/build/languageProcessing/helpers/passiveVoice/periphrastic/precedenceException.js.map +1 -1
- package/build/languageProcessing/helpers/prominentWords/determineProminentWords.js +16 -28
- package/build/languageProcessing/helpers/prominentWords/determineProminentWords.js.map +1 -1
- package/build/languageProcessing/helpers/regex/createRegexFromArray.js +10 -16
- package/build/languageProcessing/helpers/regex/createRegexFromArray.js.map +1 -1
- package/build/languageProcessing/helpers/regex/createRegexFromDoubleArray.js +4 -10
- package/build/languageProcessing/helpers/regex/createRegexFromDoubleArray.js.map +1 -1
- package/build/languageProcessing/helpers/regex/createWordRegex.js +12 -18
- package/build/languageProcessing/helpers/regex/createWordRegex.js.map +1 -1
- package/build/languageProcessing/helpers/regex/matchStringWithRegex.js +1 -7
- package/build/languageProcessing/helpers/regex/matchStringWithRegex.js.map +1 -1
- package/build/languageProcessing/helpers/regex/searchAndReplaceWithOneRegex.js +1 -7
- package/build/languageProcessing/helpers/regex/searchAndReplaceWithOneRegex.js.map +1 -1
- package/build/languageProcessing/helpers/sanitize/doubleQuotes.js +1 -7
- package/build/languageProcessing/helpers/sanitize/doubleQuotes.js.map +1 -1
- package/build/languageProcessing/helpers/sanitize/filterShortcodesFromTree.js +3 -11
- package/build/languageProcessing/helpers/sanitize/filterShortcodesFromTree.js.map +1 -1
- package/build/languageProcessing/helpers/sanitize/mergeListItems.js +1 -7
- package/build/languageProcessing/helpers/sanitize/mergeListItems.js.map +1 -1
- package/build/languageProcessing/helpers/sanitize/parseSynonyms.js +5 -11
- package/build/languageProcessing/helpers/sanitize/parseSynonyms.js.map +1 -1
- package/build/languageProcessing/helpers/sanitize/quotes.js +4 -12
- package/build/languageProcessing/helpers/sanitize/quotes.js.map +1 -1
- package/build/languageProcessing/helpers/sanitize/removeEmailAddresses.js +1 -7
- package/build/languageProcessing/helpers/sanitize/removeEmailAddresses.js.map +1 -1
- package/build/languageProcessing/helpers/sanitize/removePunctuation.js +7 -13
- package/build/languageProcessing/helpers/sanitize/removePunctuation.js.map +1 -1
- package/build/languageProcessing/helpers/sanitize/removePunctuationExceptQuotes.js +1 -7
- package/build/languageProcessing/helpers/sanitize/removePunctuationExceptQuotes.js.map +1 -1
- package/build/languageProcessing/helpers/sanitize/removeSentenceTerminators.js +1 -7
- package/build/languageProcessing/helpers/sanitize/removeSentenceTerminators.js.map +1 -1
- package/build/languageProcessing/helpers/sanitize/removeURLs.js +1 -7
- package/build/languageProcessing/helpers/sanitize/removeURLs.js.map +1 -1
- package/build/languageProcessing/helpers/sanitize/sanitizeLineBreakTag.js +1 -7
- package/build/languageProcessing/helpers/sanitize/sanitizeLineBreakTag.js.map +1 -1
- package/build/languageProcessing/helpers/sanitize/sanitizeString.js +5 -10
- package/build/languageProcessing/helpers/sanitize/sanitizeString.js.map +1 -1
- package/build/languageProcessing/helpers/sanitize/stripHTMLTags.js +7 -16
- package/build/languageProcessing/helpers/sanitize/stripHTMLTags.js.map +1 -1
- package/build/languageProcessing/helpers/sanitize/stripNonTextTags.js +4 -10
- package/build/languageProcessing/helpers/sanitize/stripNonTextTags.js.map +1 -1
- package/build/languageProcessing/helpers/sanitize/stripNumbers.js +4 -10
- package/build/languageProcessing/helpers/sanitize/stripNumbers.js.map +1 -1
- package/build/languageProcessing/helpers/sanitize/stripSpaces.js +1 -7
- package/build/languageProcessing/helpers/sanitize/stripSpaces.js.map +1 -1
- package/build/languageProcessing/helpers/sanitize/stripWordBoundaries.js +2 -10
- package/build/languageProcessing/helpers/sanitize/stripWordBoundaries.js.map +1 -1
- package/build/languageProcessing/helpers/sanitize/unifyWhitespace.js +2 -11
- package/build/languageProcessing/helpers/sanitize/unifyWhitespace.js.map +1 -1
- package/build/languageProcessing/helpers/sentence/SentenceTokenizer.js +22 -29
- package/build/languageProcessing/helpers/sentence/SentenceTokenizer.js.map +1 -1
- package/build/languageProcessing/helpers/sentence/countSentences.js +4 -10
- package/build/languageProcessing/helpers/sentence/countSentences.js.map +1 -1
- package/build/languageProcessing/helpers/sentence/getSentences.js +13 -20
- package/build/languageProcessing/helpers/sentence/getSentences.js.map +1 -1
- package/build/languageProcessing/helpers/sentence/getSentencesFromTree.js +2 -9
- package/build/languageProcessing/helpers/sentence/getSentencesFromTree.js.map +1 -1
- package/build/languageProcessing/helpers/sentence/memoizedSentenceTokenizer.js +4 -10
- package/build/languageProcessing/helpers/sentence/memoizedSentenceTokenizer.js.map +1 -1
- package/build/languageProcessing/helpers/sentence/sentencesLength.js +7 -13
- package/build/languageProcessing/helpers/sentence/sentencesLength.js.map +1 -1
- package/build/languageProcessing/helpers/syllables/DeviationFragment.js +5 -11
- package/build/languageProcessing/helpers/syllables/DeviationFragment.js.map +1 -1
- package/build/languageProcessing/helpers/syllables/countSyllables.js +23 -30
- package/build/languageProcessing/helpers/syllables/countSyllables.js.map +1 -1
- package/build/languageProcessing/helpers/syllables/syllableCountIterator.js +7 -14
- package/build/languageProcessing/helpers/syllables/syllableCountIterator.js.map +1 -1
- package/build/languageProcessing/helpers/syllables/syllableCountStep.js +5 -12
- package/build/languageProcessing/helpers/syllables/syllableCountStep.js.map +1 -1
- package/build/languageProcessing/helpers/transform/transformWordsWithHyphens.js +1 -7
- package/build/languageProcessing/helpers/transform/transformWordsWithHyphens.js.map +1 -1
- package/build/languageProcessing/helpers/transliterate/replaceDiacritics.js +4 -10
- package/build/languageProcessing/helpers/transliterate/replaceDiacritics.js.map +1 -1
- package/build/languageProcessing/helpers/transliterate/specialCharacterMappings.js +12 -23
- package/build/languageProcessing/helpers/transliterate/specialCharacterMappings.js.map +1 -1
- package/build/languageProcessing/helpers/transliterate/transliterate.js +3 -9
- package/build/languageProcessing/helpers/transliterate/transliterate.js.map +1 -1
- package/build/languageProcessing/helpers/transliterate/transliterateWPstyle.js +3 -9
- package/build/languageProcessing/helpers/transliterate/transliterateWPstyle.js.map +1 -1
- package/build/languageProcessing/helpers/url/parseSlug.js +1 -7
- package/build/languageProcessing/helpers/url/parseSlug.js.map +1 -1
- package/build/languageProcessing/helpers/url/url.js +7 -13
- package/build/languageProcessing/helpers/url/url.js.map +1 -1
- package/build/languageProcessing/helpers/word/addWordboundary.js +1 -7
- package/build/languageProcessing/helpers/word/addWordboundary.js.map +1 -1
- package/build/languageProcessing/helpers/word/areWordsInSentence.js +4 -10
- package/build/languageProcessing/helpers/word/areWordsInSentence.js.map +1 -1
- package/build/languageProcessing/helpers/word/countMetaDescriptionLength.js +1 -7
- package/build/languageProcessing/helpers/word/countMetaDescriptionLength.js.map +1 -1
- package/build/languageProcessing/helpers/word/countWords.js +4 -10
- package/build/languageProcessing/helpers/word/countWords.js.map +1 -1
- package/build/languageProcessing/helpers/word/createPunctuationTokens.js +5 -10
- package/build/languageProcessing/helpers/word/createPunctuationTokens.js.map +1 -1
- package/build/languageProcessing/helpers/word/filterWordsFromArray.js +4 -9
- package/build/languageProcessing/helpers/word/filterWordsFromArray.js.map +1 -1
- package/build/languageProcessing/helpers/word/followsIndex.js +5 -10
- package/build/languageProcessing/helpers/word/followsIndex.js.map +1 -1
- package/build/languageProcessing/helpers/word/getAllWordsFromTree.js +7 -13
- package/build/languageProcessing/helpers/word/getAllWordsFromTree.js.map +1 -1
- package/build/languageProcessing/helpers/word/getWords.js +9 -19
- package/build/languageProcessing/helpers/word/getWords.js.map +1 -1
- package/build/languageProcessing/helpers/word/includesIndex.js +5 -10
- package/build/languageProcessing/helpers/word/includesIndex.js.map +1 -1
- package/build/languageProcessing/helpers/word/indices.js +14 -25
- package/build/languageProcessing/helpers/word/indices.js.map +1 -1
- package/build/languageProcessing/helpers/word/markWordsInSentences.js +23 -35
- package/build/languageProcessing/helpers/word/markWordsInSentences.js.map +1 -1
- package/build/languageProcessing/helpers/word/matchWordInSentence.js +8 -15
- package/build/languageProcessing/helpers/word/matchWordInSentence.js.map +1 -1
- package/build/languageProcessing/helpers/word/splitIntoTokens.js +3 -9
- package/build/languageProcessing/helpers/word/splitIntoTokens.js.map +1 -1
- package/build/languageProcessing/index.js +41 -282
- package/build/languageProcessing/index.js.map +1 -1
- package/build/languageProcessing/languages/_default/Researcher.js +5 -13
- package/build/languageProcessing/languages/_default/Researcher.js.map +1 -1
- package/build/languageProcessing/languages/_default/helpers/getStemmer.js +3 -9
- package/build/languageProcessing/languages/_default/helpers/getStemmer.js.map +1 -1
- package/build/languageProcessing/languages/ar/Researcher.js +19 -27
- package/build/languageProcessing/languages/ar/Researcher.js.map +1 -1
- package/build/languageProcessing/languages/ar/config/firstWordExceptions.js +1 -7
- package/build/languageProcessing/languages/ar/config/firstWordExceptions.js.map +1 -1
- package/build/languageProcessing/languages/ar/config/functionWords.js +7 -13
- package/build/languageProcessing/languages/ar/config/functionWords.js.map +1 -1
- package/build/languageProcessing/languages/ar/config/internal/passiveVerbsWithLongVowel.js +1 -7
- package/build/languageProcessing/languages/ar/config/internal/passiveVerbsWithLongVowel.js.map +1 -1
- package/build/languageProcessing/languages/ar/config/prefixedFunctionWords.js +2 -8
- package/build/languageProcessing/languages/ar/config/prefixedFunctionWords.js.map +1 -1
- package/build/languageProcessing/languages/ar/config/transitionWords.js +4 -10
- package/build/languageProcessing/languages/ar/config/transitionWords.js.map +1 -1
- package/build/languageProcessing/languages/ar/config/twoPartTransitionWords.js +2 -7
- package/build/languageProcessing/languages/ar/config/twoPartTransitionWords.js.map +1 -1
- package/build/languageProcessing/languages/ar/helpers/createBasicWordForms.js +6 -11
- package/build/languageProcessing/languages/ar/helpers/createBasicWordForms.js.map +1 -1
- package/build/languageProcessing/languages/ar/helpers/getStemmer.js +8 -14
- package/build/languageProcessing/languages/ar/helpers/getStemmer.js.map +1 -1
- package/build/languageProcessing/languages/ar/helpers/internal/stem.js +1 -7
- package/build/languageProcessing/languages/ar/helpers/internal/stem.js.map +1 -1
- package/build/languageProcessing/languages/ar/helpers/isPassiveSentence.js +5 -12
- package/build/languageProcessing/languages/ar/helpers/isPassiveSentence.js.map +1 -1
- package/build/languageProcessing/languages/ca/Researcher.js +11 -19
- package/build/languageProcessing/languages/ca/Researcher.js.map +1 -1
- package/build/languageProcessing/languages/ca/config/sentenceLength.js +1 -7
- package/build/languageProcessing/languages/ca/config/sentenceLength.js.map +1 -1
- package/build/languageProcessing/languages/ca/config/transitionWords.js +4 -10
- package/build/languageProcessing/languages/ca/config/transitionWords.js.map +1 -1
- package/build/languageProcessing/languages/ca/config/twoPartTransitionWords.js +2 -7
- package/build/languageProcessing/languages/ca/config/twoPartTransitionWords.js.map +1 -1
- package/build/languageProcessing/languages/ca/helpers/getStemmer.js +3 -9
- package/build/languageProcessing/languages/ca/helpers/getStemmer.js.map +1 -1
- package/build/languageProcessing/languages/cs/Researcher.js +17 -25
- package/build/languageProcessing/languages/cs/Researcher.js.map +1 -1
- package/build/languageProcessing/languages/cs/config/firstWordExceptions.js +1 -7
- package/build/languageProcessing/languages/cs/config/firstWordExceptions.js.map +1 -1
- package/build/languageProcessing/languages/cs/config/functionWords.js +4 -10
- package/build/languageProcessing/languages/cs/config/functionWords.js.map +1 -1
- package/build/languageProcessing/languages/cs/config/internal/passiveVoiceAuxiliaries.js +2 -8
- package/build/languageProcessing/languages/cs/config/internal/passiveVoiceAuxiliaries.js.map +1 -1
- package/build/languageProcessing/languages/cs/config/internal/passiveVoiceEndings.js +2 -8
- package/build/languageProcessing/languages/cs/config/internal/passiveVoiceEndings.js.map +1 -1
- package/build/languageProcessing/languages/cs/config/stopWords.js +1 -7
- package/build/languageProcessing/languages/cs/config/stopWords.js.map +1 -1
- package/build/languageProcessing/languages/cs/config/transitionWords.js +4 -10
- package/build/languageProcessing/languages/cs/config/transitionWords.js.map +1 -1
- package/build/languageProcessing/languages/cs/config/twoPartTransitionWords.js +2 -7
- package/build/languageProcessing/languages/cs/config/twoPartTransitionWords.js.map +1 -1
- package/build/languageProcessing/languages/cs/helpers/getClauses.js +9 -16
- package/build/languageProcessing/languages/cs/helpers/getClauses.js.map +1 -1
- package/build/languageProcessing/languages/cs/helpers/getStemmer.js +8 -14
- package/build/languageProcessing/languages/cs/helpers/getStemmer.js.map +1 -1
- package/build/languageProcessing/languages/cs/helpers/internal/getParticiples.js +6 -12
- package/build/languageProcessing/languages/cs/helpers/internal/getParticiples.js.map +1 -1
- package/build/languageProcessing/languages/cs/helpers/internal/stem.js +1 -7
- package/build/languageProcessing/languages/cs/helpers/internal/stem.js.map +1 -1
- package/build/languageProcessing/languages/cs/values/Clause.js +5 -12
- package/build/languageProcessing/languages/cs/values/Clause.js.map +1 -1
- package/build/languageProcessing/languages/de/Researcher.js +27 -35
- package/build/languageProcessing/languages/de/Researcher.js.map +1 -1
- package/build/languageProcessing/languages/de/config/firstWordExceptions.js +1 -7
- package/build/languageProcessing/languages/de/config/firstWordExceptions.js.map +1 -1
- package/build/languageProcessing/languages/de/config/functionWords.js +11 -19
- package/build/languageProcessing/languages/de/config/functionWords.js.map +1 -1
- package/build/languageProcessing/languages/de/config/internal/exceptionsParticiplesActive.js +1 -7
- package/build/languageProcessing/languages/de/config/internal/exceptionsParticiplesActive.js.map +1 -1
- package/build/languageProcessing/languages/de/config/internal/passiveVoiceAuxiliaries.js +4 -10
- package/build/languageProcessing/languages/de/config/internal/passiveVoiceAuxiliaries.js.map +1 -1
- package/build/languageProcessing/languages/de/config/internal/passiveVoiceIrregulars.js +1 -7
- package/build/languageProcessing/languages/de/config/internal/passiveVoiceIrregulars.js.map +1 -1
- package/build/languageProcessing/languages/de/config/internal/passiveVoiceRegex.js +1 -7
- package/build/languageProcessing/languages/de/config/internal/passiveVoiceRegex.js.map +1 -1
- package/build/languageProcessing/languages/de/config/keyphraseLength.js +1 -7
- package/build/languageProcessing/languages/de/config/keyphraseLength.js.map +1 -1
- package/build/languageProcessing/languages/de/config/stopWords.js +1 -7
- package/build/languageProcessing/languages/de/config/stopWords.js.map +1 -1
- package/build/languageProcessing/languages/de/config/transitionWords.js +4 -10
- package/build/languageProcessing/languages/de/config/transitionWords.js.map +1 -1
- package/build/languageProcessing/languages/de/config/twoPartTransitionWords.js +2 -7
- package/build/languageProcessing/languages/de/config/twoPartTransitionWords.js.map +1 -1
- package/build/languageProcessing/languages/de/config/wordComplexity.js +1 -7
- package/build/languageProcessing/languages/de/config/wordComplexity.js.map +1 -1
- package/build/languageProcessing/languages/de/helpers/calculateFleschReadingScore.js +3 -9
- package/build/languageProcessing/languages/de/helpers/calculateFleschReadingScore.js.map +1 -1
- package/build/languageProcessing/languages/de/helpers/checkIfWordIsComplex.js +1 -7
- package/build/languageProcessing/languages/de/helpers/checkIfWordIsComplex.js.map +1 -1
- package/build/languageProcessing/languages/de/helpers/checkIfWordIsFunction.js +3 -8
- package/build/languageProcessing/languages/de/helpers/checkIfWordIsFunction.js.map +1 -1
- package/build/languageProcessing/languages/de/helpers/getClauses.js +9 -16
- package/build/languageProcessing/languages/de/helpers/getClauses.js.map +1 -1
- package/build/languageProcessing/languages/de/helpers/getStemmer.js +8 -14
- package/build/languageProcessing/languages/de/helpers/getStemmer.js.map +1 -1
- package/build/languageProcessing/languages/de/helpers/internal/SentenceTokenizer.js +4 -11
- package/build/languageProcessing/languages/de/helpers/internal/SentenceTokenizer.js.map +1 -1
- package/build/languageProcessing/languages/de/helpers/internal/detectAndStemRegularParticiple.js +4 -10
- package/build/languageProcessing/languages/de/helpers/internal/detectAndStemRegularParticiple.js.map +1 -1
- package/build/languageProcessing/languages/de/helpers/internal/determineStem.js +10 -16
- package/build/languageProcessing/languages/de/helpers/internal/determineStem.js.map +1 -1
- package/build/languageProcessing/languages/de/helpers/internal/getParticiples.js +9 -16
- package/build/languageProcessing/languages/de/helpers/internal/getParticiples.js.map +1 -1
- package/build/languageProcessing/languages/de/helpers/internal/stem.js +1 -7
- package/build/languageProcessing/languages/de/helpers/internal/stem.js.map +1 -1
- package/build/languageProcessing/languages/de/helpers/memoizedSentenceTokenizer.js +4 -10
- package/build/languageProcessing/languages/de/helpers/memoizedSentenceTokenizer.js.map +1 -1
- package/build/languageProcessing/languages/de/values/Clause.js +11 -18
- package/build/languageProcessing/languages/de/values/Clause.js.map +1 -1
- package/build/languageProcessing/languages/el/Researcher.js +18 -26
- package/build/languageProcessing/languages/el/Researcher.js.map +1 -1
- package/build/languageProcessing/languages/el/config/firstWordExceptions.js +1 -7
- package/build/languageProcessing/languages/el/config/firstWordExceptions.js.map +1 -1
- package/build/languageProcessing/languages/el/config/functionWords.js +4 -10
- package/build/languageProcessing/languages/el/config/functionWords.js.map +1 -1
- package/build/languageProcessing/languages/el/config/internal/auxiliaries.js +1 -7
- package/build/languageProcessing/languages/el/config/internal/auxiliaries.js.map +1 -1
- package/build/languageProcessing/languages/el/config/internal/morphologicalPassiveSuffixes.js +1 -7
- package/build/languageProcessing/languages/el/config/internal/morphologicalPassiveSuffixes.js.map +1 -1
- package/build/languageProcessing/languages/el/config/internal/nonPassiveVerbStems.js +1 -7
- package/build/languageProcessing/languages/el/config/internal/nonPassiveVerbStems.js.map +1 -1
- package/build/languageProcessing/languages/el/config/stopWords.js +1 -7
- package/build/languageProcessing/languages/el/config/stopWords.js.map +1 -1
- package/build/languageProcessing/languages/el/config/transitionWords.js +4 -10
- package/build/languageProcessing/languages/el/config/transitionWords.js.map +1 -1
- package/build/languageProcessing/languages/el/config/twoPartTransitionWords.js +2 -7
- package/build/languageProcessing/languages/el/config/twoPartTransitionWords.js.map +1 -1
- package/build/languageProcessing/languages/el/helpers/getClauses.js +9 -16
- package/build/languageProcessing/languages/el/helpers/getClauses.js.map +1 -1
- package/build/languageProcessing/languages/el/helpers/getStemmer.js +7 -14
- package/build/languageProcessing/languages/el/helpers/getStemmer.js.map +1 -1
- package/build/languageProcessing/languages/el/helpers/internal/getParticiples.js +3 -9
- package/build/languageProcessing/languages/el/helpers/internal/getParticiples.js.map +1 -1
- package/build/languageProcessing/languages/el/helpers/internal/stem.js +4 -13
- package/build/languageProcessing/languages/el/helpers/internal/stem.js.map +1 -1
- package/build/languageProcessing/languages/el/helpers/isPassiveSentence.js +7 -14
- package/build/languageProcessing/languages/el/helpers/isPassiveSentence.js.map +1 -1
- package/build/languageProcessing/languages/el/values/Clause.js +6 -12
- package/build/languageProcessing/languages/el/values/Clause.js.map +1 -1
- package/build/languageProcessing/languages/en/Researcher.js +21 -29
- package/build/languageProcessing/languages/en/Researcher.js.map +1 -1
- package/build/languageProcessing/languages/en/config/abbreviations.js +2 -8
- package/build/languageProcessing/languages/en/config/abbreviations.js.map +1 -1
- package/build/languageProcessing/languages/en/config/firstWordExceptions.js +1 -7
- package/build/languageProcessing/languages/en/config/firstWordExceptions.js.map +1 -1
- package/build/languageProcessing/languages/en/config/functionWords.js +11 -18
- package/build/languageProcessing/languages/en/config/functionWords.js.map +1 -1
- package/build/languageProcessing/languages/en/config/internal/passiveVoiceAuxiliaries.js +6 -12
- package/build/languageProcessing/languages/en/config/internal/passiveVoiceAuxiliaries.js.map +1 -1
- package/build/languageProcessing/languages/en/config/internal/passiveVoiceIrregulars.js +1 -7
- package/build/languageProcessing/languages/en/config/internal/passiveVoiceIrregulars.js.map +1 -1
- package/build/languageProcessing/languages/en/config/internal/passiveVoiceNonVerbEndingEd.js +1 -7
- package/build/languageProcessing/languages/en/config/internal/passiveVoiceNonVerbEndingEd.js.map +1 -1
- package/build/languageProcessing/languages/en/config/regularParticiplesRegex.js +1 -7
- package/build/languageProcessing/languages/en/config/regularParticiplesRegex.js.map +1 -1
- package/build/languageProcessing/languages/en/config/stopWords.js +1 -7
- package/build/languageProcessing/languages/en/config/stopWords.js.map +1 -1
- package/build/languageProcessing/languages/en/config/transitionWords.js +4 -10
- package/build/languageProcessing/languages/en/config/transitionWords.js.map +1 -1
- package/build/languageProcessing/languages/en/config/twoPartTransitionWords.js +2 -7
- package/build/languageProcessing/languages/en/config/twoPartTransitionWords.js.map +1 -1
- package/build/languageProcessing/languages/en/config/wordComplexity.js +1 -7
- package/build/languageProcessing/languages/en/config/wordComplexity.js.map +1 -1
- package/build/languageProcessing/languages/en/helpers/calculateFleschReadingScore.js +3 -9
- package/build/languageProcessing/languages/en/helpers/calculateFleschReadingScore.js.map +1 -1
- package/build/languageProcessing/languages/en/helpers/checkIfWordIsComplex.js +4 -10
- package/build/languageProcessing/languages/en/helpers/checkIfWordIsComplex.js.map +1 -1
- package/build/languageProcessing/languages/en/helpers/getClauses.js +15 -22
- package/build/languageProcessing/languages/en/helpers/getClauses.js.map +1 -1
- package/build/languageProcessing/languages/en/helpers/getStemmer.js +8 -14
- package/build/languageProcessing/languages/en/helpers/getStemmer.js.map +1 -1
- package/build/languageProcessing/languages/en/helpers/internal/determineStem.js +21 -32
- package/build/languageProcessing/languages/en/helpers/internal/determineStem.js.map +1 -1
- package/build/languageProcessing/languages/en/helpers/internal/getAdjectiveStem.js +6 -13
- package/build/languageProcessing/languages/en/helpers/internal/getAdjectiveStem.js.map +1 -1
- package/build/languageProcessing/languages/en/helpers/internal/getParticiples.js +8 -14
- package/build/languageProcessing/languages/en/helpers/internal/getParticiples.js.map +1 -1
- package/build/languageProcessing/languages/en/helpers/internal/getVerbStem.js +6 -16
- package/build/languageProcessing/languages/en/helpers/internal/getVerbStem.js.map +1 -1
- package/build/languageProcessing/languages/en/values/Clause.js +10 -17
- package/build/languageProcessing/languages/en/values/Clause.js.map +1 -1
- package/build/languageProcessing/languages/es/Researcher.js +23 -31
- package/build/languageProcessing/languages/es/Researcher.js.map +1 -1
- package/build/languageProcessing/languages/es/config/firstWordExceptions.js +1 -7
- package/build/languageProcessing/languages/es/config/firstWordExceptions.js.map +1 -1
- package/build/languageProcessing/languages/es/config/functionWords.js +11 -17
- package/build/languageProcessing/languages/es/config/functionWords.js.map +1 -1
- package/build/languageProcessing/languages/es/config/internal/passiveVoiceAuxiliaries.js +1 -7
- package/build/languageProcessing/languages/es/config/internal/passiveVoiceAuxiliaries.js.map +1 -1
- package/build/languageProcessing/languages/es/config/internal/passiveVoiceParticiples.js +1 -7
- package/build/languageProcessing/languages/es/config/internal/passiveVoiceParticiples.js.map +1 -1
- package/build/languageProcessing/languages/es/config/sentenceLength.js +1 -7
- package/build/languageProcessing/languages/es/config/sentenceLength.js.map +1 -1
- package/build/languageProcessing/languages/es/config/stopWords.js +1 -7
- package/build/languageProcessing/languages/es/config/stopWords.js.map +1 -1
- package/build/languageProcessing/languages/es/config/transitionWords.js +4 -10
- package/build/languageProcessing/languages/es/config/transitionWords.js.map +1 -1
- package/build/languageProcessing/languages/es/config/twoPartTransitionWords.js +2 -7
- package/build/languageProcessing/languages/es/config/twoPartTransitionWords.js.map +1 -1
- package/build/languageProcessing/languages/es/config/wordComplexity.js +1 -7
- package/build/languageProcessing/languages/es/config/wordComplexity.js.map +1 -1
- package/build/languageProcessing/languages/es/helpers/calculateFleschReadingScore.js +3 -9
- package/build/languageProcessing/languages/es/helpers/calculateFleschReadingScore.js.map +1 -1
- package/build/languageProcessing/languages/es/helpers/checkIfWordIsComplex.js +1 -7
- package/build/languageProcessing/languages/es/helpers/checkIfWordIsComplex.js.map +1 -1
- package/build/languageProcessing/languages/es/helpers/getClauses.js +10 -17
- package/build/languageProcessing/languages/es/helpers/getClauses.js.map +1 -1
- package/build/languageProcessing/languages/es/helpers/getStemmer.js +8 -14
- package/build/languageProcessing/languages/es/helpers/getStemmer.js.map +1 -1
- package/build/languageProcessing/languages/es/helpers/internal/checkVerbStemModifications.js +7 -13
- package/build/languageProcessing/languages/es/helpers/internal/checkVerbStemModifications.js.map +1 -1
- package/build/languageProcessing/languages/es/helpers/internal/getParticiples.js +6 -12
- package/build/languageProcessing/languages/es/helpers/internal/getParticiples.js.map +1 -1
- package/build/languageProcessing/languages/es/helpers/internal/stem.js +5 -13
- package/build/languageProcessing/languages/es/helpers/internal/stem.js.map +1 -1
- package/build/languageProcessing/languages/es/values/Clause.js +7 -14
- package/build/languageProcessing/languages/es/values/Clause.js.map +1 -1
- package/build/languageProcessing/languages/fa/Researcher.js +19 -27
- package/build/languageProcessing/languages/fa/Researcher.js.map +1 -1
- package/build/languageProcessing/languages/fa/config/firstWordExceptions.js +1 -7
- package/build/languageProcessing/languages/fa/config/firstWordExceptions.js.map +1 -1
- package/build/languageProcessing/languages/fa/config/functionWords.js +4 -10
- package/build/languageProcessing/languages/fa/config/functionWords.js.map +1 -1
- package/build/languageProcessing/languages/fa/config/internal/participles.js +1 -7
- package/build/languageProcessing/languages/fa/config/internal/participles.js.map +1 -1
- package/build/languageProcessing/languages/fa/config/sentenceLength.js +1 -7
- package/build/languageProcessing/languages/fa/config/sentenceLength.js.map +1 -1
- package/build/languageProcessing/languages/fa/config/transitionWords.js +4 -10
- package/build/languageProcessing/languages/fa/config/transitionWords.js.map +1 -1
- package/build/languageProcessing/languages/fa/config/twoPartTransitionWords.js +2 -7
- package/build/languageProcessing/languages/fa/config/twoPartTransitionWords.js.map +1 -1
- package/build/languageProcessing/languages/fa/helpers/createBasicWordForms.js +3 -9
- package/build/languageProcessing/languages/fa/helpers/createBasicWordForms.js.map +1 -1
- package/build/languageProcessing/languages/fa/helpers/getStemmer.js +3 -9
- package/build/languageProcessing/languages/fa/helpers/getStemmer.js.map +1 -1
- package/build/languageProcessing/languages/fa/helpers/isPassiveSentence.js +6 -12
- package/build/languageProcessing/languages/fa/helpers/isPassiveSentence.js.map +1 -1
- package/build/languageProcessing/languages/fr/Researcher.js +21 -29
- package/build/languageProcessing/languages/fr/Researcher.js.map +1 -1
- package/build/languageProcessing/languages/fr/config/firstWordExceptions.js +1 -7
- package/build/languageProcessing/languages/fr/config/firstWordExceptions.js.map +1 -1
- package/build/languageProcessing/languages/fr/config/functionWords.js +11 -17
- package/build/languageProcessing/languages/fr/config/functionWords.js.map +1 -1
- package/build/languageProcessing/languages/fr/config/internal/exceptionsParticiplesActive.js +4 -9
- package/build/languageProcessing/languages/fr/config/internal/exceptionsParticiplesActive.js.map +1 -1
- package/build/languageProcessing/languages/fr/config/internal/passiveVoiceAuxiliaries.js +1 -7
- package/build/languageProcessing/languages/fr/config/internal/passiveVoiceAuxiliaries.js.map +1 -1
- package/build/languageProcessing/languages/fr/config/internal/passiveVoiceIrregulars.js +4 -9
- package/build/languageProcessing/languages/fr/config/internal/passiveVoiceIrregulars.js.map +1 -1
- package/build/languageProcessing/languages/fr/config/stopWords.js +1 -7
- package/build/languageProcessing/languages/fr/config/stopWords.js.map +1 -1
- package/build/languageProcessing/languages/fr/config/transitionWords.js +4 -10
- package/build/languageProcessing/languages/fr/config/transitionWords.js.map +1 -1
- package/build/languageProcessing/languages/fr/config/twoPartTransitionWords.js +2 -7
- package/build/languageProcessing/languages/fr/config/twoPartTransitionWords.js.map +1 -1
- package/build/languageProcessing/languages/fr/config/wordComplexity.js +1 -7
- package/build/languageProcessing/languages/fr/config/wordComplexity.js.map +1 -1
- package/build/languageProcessing/languages/fr/helpers/calculateFleschReadingScore.js +3 -9
- package/build/languageProcessing/languages/fr/helpers/calculateFleschReadingScore.js.map +1 -1
- package/build/languageProcessing/languages/fr/helpers/checkIfWordIsComplex.js +3 -9
- package/build/languageProcessing/languages/fr/helpers/checkIfWordIsComplex.js.map +1 -1
- package/build/languageProcessing/languages/fr/helpers/getClauses.js +10 -17
- package/build/languageProcessing/languages/fr/helpers/getClauses.js.map +1 -1
- package/build/languageProcessing/languages/fr/helpers/getStemmer.js +8 -14
- package/build/languageProcessing/languages/fr/helpers/getStemmer.js.map +1 -1
- package/build/languageProcessing/languages/fr/helpers/internal/getParticiples.js +11 -16
- package/build/languageProcessing/languages/fr/helpers/internal/getParticiples.js.map +1 -1
- package/build/languageProcessing/languages/fr/helpers/internal/stem.js +3 -10
- package/build/languageProcessing/languages/fr/helpers/internal/stem.js.map +1 -1
- package/build/languageProcessing/languages/fr/values/Clause.js +14 -20
- package/build/languageProcessing/languages/fr/values/Clause.js.map +1 -1
- package/build/languageProcessing/languages/he/Researcher.js +21 -29
- package/build/languageProcessing/languages/he/Researcher.js.map +1 -1
- package/build/languageProcessing/languages/he/config/firstWordExceptions.js +1 -7
- package/build/languageProcessing/languages/he/config/firstWordExceptions.js.map +1 -1
- package/build/languageProcessing/languages/he/config/functionWords.js +4 -11
- package/build/languageProcessing/languages/he/config/functionWords.js.map +1 -1
- package/build/languageProcessing/languages/he/config/internal/regularRootsHufal.js +1 -7
- package/build/languageProcessing/languages/he/config/internal/regularRootsHufal.js.map +1 -1
- package/build/languageProcessing/languages/he/config/internal/regularRootsNifal.js +1 -7
- package/build/languageProcessing/languages/he/config/internal/regularRootsNifal.js.map +1 -1
- package/build/languageProcessing/languages/he/config/internal/regularRootsPual.js +1 -7
- package/build/languageProcessing/languages/he/config/internal/regularRootsPual.js.map +1 -1
- package/build/languageProcessing/languages/he/config/passiveVoice/regularRootsHufal.js +1 -7
- package/build/languageProcessing/languages/he/config/passiveVoice/regularRootsHufal.js.map +1 -1
- package/build/languageProcessing/languages/he/config/passiveVoice/regularRootsNifal.js +1 -7
- package/build/languageProcessing/languages/he/config/passiveVoice/regularRootsNifal.js.map +1 -1
- package/build/languageProcessing/languages/he/config/passiveVoice/regularRootsPual.js +1 -7
- package/build/languageProcessing/languages/he/config/passiveVoice/regularRootsPual.js.map +1 -1
- package/build/languageProcessing/languages/he/config/prefixedFunctionWords.js +2 -8
- package/build/languageProcessing/languages/he/config/prefixedFunctionWords.js.map +1 -1
- package/build/languageProcessing/languages/he/config/sentenceLength.js +1 -7
- package/build/languageProcessing/languages/he/config/sentenceLength.js.map +1 -1
- package/build/languageProcessing/languages/he/config/transitionWords.js +4 -10
- package/build/languageProcessing/languages/he/config/transitionWords.js.map +1 -1
- package/build/languageProcessing/languages/he/config/twoPartTransitionWords.js +2 -7
- package/build/languageProcessing/languages/he/config/twoPartTransitionWords.js.map +1 -1
- package/build/languageProcessing/languages/he/helpers/createBasicWordForms.js +6 -11
- package/build/languageProcessing/languages/he/helpers/createBasicWordForms.js.map +1 -1
- package/build/languageProcessing/languages/he/helpers/getStemmer.js +8 -14
- package/build/languageProcessing/languages/he/helpers/getStemmer.js.map +1 -1
- package/build/languageProcessing/languages/he/helpers/internal/stem.js +1 -7
- package/build/languageProcessing/languages/he/helpers/internal/stem.js.map +1 -1
- package/build/languageProcessing/languages/he/helpers/isPassiveSentence.js +10 -16
- package/build/languageProcessing/languages/he/helpers/isPassiveSentence.js.map +1 -1
- package/build/languageProcessing/languages/he/helpers/stem.js +1 -7
- package/build/languageProcessing/languages/he/helpers/stem.js.map +1 -1
- package/build/languageProcessing/languages/hu/Researcher.js +19 -27
- package/build/languageProcessing/languages/hu/Researcher.js.map +1 -1
- package/build/languageProcessing/languages/hu/config/firstWordExceptions.js +1 -7
- package/build/languageProcessing/languages/hu/config/firstWordExceptions.js.map +1 -1
- package/build/languageProcessing/languages/hu/config/functionWords.js +4 -10
- package/build/languageProcessing/languages/hu/config/functionWords.js.map +1 -1
- package/build/languageProcessing/languages/hu/config/internal/auxiliaries.js +1 -7
- package/build/languageProcessing/languages/hu/config/internal/auxiliaries.js.map +1 -1
- package/build/languageProcessing/languages/hu/config/internal/morphologicalPassiveAffixes.js +3 -9
- package/build/languageProcessing/languages/hu/config/internal/morphologicalPassiveAffixes.js.map +1 -1
- package/build/languageProcessing/languages/hu/config/internal/nonPassivesInVaAndVe.js +2 -7
- package/build/languageProcessing/languages/hu/config/internal/nonPassivesInVaAndVe.js.map +1 -1
- package/build/languageProcessing/languages/hu/config/internal/odikVerbs.js +1 -7
- package/build/languageProcessing/languages/hu/config/internal/odikVerbs.js.map +1 -1
- package/build/languageProcessing/languages/hu/config/internal/participles.js +2 -7
- package/build/languageProcessing/languages/hu/config/internal/participles.js.map +1 -1
- package/build/languageProcessing/languages/hu/config/stopWords.js +2 -7
- package/build/languageProcessing/languages/hu/config/stopWords.js.map +1 -1
- package/build/languageProcessing/languages/hu/config/transitionWords.js +4 -10
- package/build/languageProcessing/languages/hu/config/transitionWords.js.map +1 -1
- package/build/languageProcessing/languages/hu/config/twoPartTransitionWords.js +2 -7
- package/build/languageProcessing/languages/hu/config/twoPartTransitionWords.js.map +1 -1
- package/build/languageProcessing/languages/hu/helpers/getClauses.js +9 -16
- package/build/languageProcessing/languages/hu/helpers/getClauses.js.map +1 -1
- package/build/languageProcessing/languages/hu/helpers/getStemmer.js +8 -14
- package/build/languageProcessing/languages/hu/helpers/getStemmer.js.map +1 -1
- package/build/languageProcessing/languages/hu/helpers/internal/getParticiples.js +6 -12
- package/build/languageProcessing/languages/hu/helpers/internal/getParticiples.js.map +1 -1
- package/build/languageProcessing/languages/hu/helpers/internal/stem.js +1 -7
- package/build/languageProcessing/languages/hu/helpers/internal/stem.js.map +1 -1
- package/build/languageProcessing/languages/hu/helpers/isPassiveSentence.js +9 -15
- package/build/languageProcessing/languages/hu/helpers/isPassiveSentence.js.map +1 -1
- package/build/languageProcessing/languages/hu/values/Clause.js +8 -14
- package/build/languageProcessing/languages/hu/values/Clause.js.map +1 -1
- package/build/languageProcessing/languages/id/Researcher.js +17 -25
- package/build/languageProcessing/languages/id/Researcher.js.map +1 -1
- package/build/languageProcessing/languages/id/config/firstWordExceptions.js +1 -7
- package/build/languageProcessing/languages/id/config/firstWordExceptions.js.map +1 -1
- package/build/languageProcessing/languages/id/config/functionWords.js +8 -16
- package/build/languageProcessing/languages/id/config/functionWords.js.map +1 -1
- package/build/languageProcessing/languages/id/config/internal/nonPassiveVerbsStartingDi.js +1 -7
- package/build/languageProcessing/languages/id/config/internal/nonPassiveVerbsStartingDi.js.map +1 -1
- package/build/languageProcessing/languages/id/config/transitionWords.js +4 -10
- package/build/languageProcessing/languages/id/config/transitionWords.js.map +1 -1
- package/build/languageProcessing/languages/id/config/twoPartTransitionWords.js +2 -7
- package/build/languageProcessing/languages/id/config/twoPartTransitionWords.js.map +1 -1
- package/build/languageProcessing/languages/id/helpers/getStemmer.js +8 -14
- package/build/languageProcessing/languages/id/helpers/getStemmer.js.map +1 -1
- package/build/languageProcessing/languages/id/helpers/internal/stem.js +29 -34
- package/build/languageProcessing/languages/id/helpers/internal/stem.js.map +1 -1
- package/build/languageProcessing/languages/id/helpers/internal/stemHelpers.js +5 -13
- package/build/languageProcessing/languages/id/helpers/internal/stemHelpers.js.map +1 -1
- package/build/languageProcessing/languages/id/helpers/isPassiveSentence.js +5 -12
- package/build/languageProcessing/languages/id/helpers/isPassiveSentence.js.map +1 -1
- package/build/languageProcessing/languages/id/helpers/splitIntoTokensCustom.js +3 -9
- package/build/languageProcessing/languages/id/helpers/splitIntoTokensCustom.js.map +1 -1
- package/build/languageProcessing/languages/it/Researcher.js +23 -31
- package/build/languageProcessing/languages/it/Researcher.js.map +1 -1
- package/build/languageProcessing/languages/it/config/firstWordExceptions.js +1 -7
- package/build/languageProcessing/languages/it/config/firstWordExceptions.js.map +1 -1
- package/build/languageProcessing/languages/it/config/functionWords.js +11 -17
- package/build/languageProcessing/languages/it/config/functionWords.js.map +1 -1
- package/build/languageProcessing/languages/it/config/internal/passiveVoiceAuxiliaries.js +1 -7
- package/build/languageProcessing/languages/it/config/internal/passiveVoiceAuxiliaries.js.map +1 -1
- package/build/languageProcessing/languages/it/config/internal/passiveVoiceParticiples.js +1 -7
- package/build/languageProcessing/languages/it/config/internal/passiveVoiceParticiples.js.map +1 -1
- package/build/languageProcessing/languages/it/config/sentenceLength.js +1 -7
- package/build/languageProcessing/languages/it/config/sentenceLength.js.map +1 -1
- package/build/languageProcessing/languages/it/config/stopWords.js +1 -7
- package/build/languageProcessing/languages/it/config/stopWords.js.map +1 -1
- package/build/languageProcessing/languages/it/config/transitionWords.js +4 -10
- package/build/languageProcessing/languages/it/config/transitionWords.js.map +1 -1
- package/build/languageProcessing/languages/it/config/twoPartTransitionWords.js +1 -7
- package/build/languageProcessing/languages/it/config/twoPartTransitionWords.js.map +1 -1
- package/build/languageProcessing/languages/it/helpers/calculateFleschReadingScore.js +3 -9
- package/build/languageProcessing/languages/it/helpers/calculateFleschReadingScore.js.map +1 -1
- package/build/languageProcessing/languages/it/helpers/getClauses.js +10 -17
- package/build/languageProcessing/languages/it/helpers/getClauses.js.map +1 -1
- package/build/languageProcessing/languages/it/helpers/getStemmer.js +8 -14
- package/build/languageProcessing/languages/it/helpers/getStemmer.js.map +1 -1
- package/build/languageProcessing/languages/it/helpers/internal/getParticiples.js +6 -12
- package/build/languageProcessing/languages/it/helpers/internal/getParticiples.js.map +1 -1
- package/build/languageProcessing/languages/it/helpers/internal/stem.js +3 -9
- package/build/languageProcessing/languages/it/helpers/internal/stem.js.map +1 -1
- package/build/languageProcessing/languages/it/values/Clause.js +7 -14
- package/build/languageProcessing/languages/it/values/Clause.js.map +1 -1
- package/build/languageProcessing/languages/ja/Researcher.js +51 -59
- package/build/languageProcessing/languages/ja/Researcher.js.map +1 -1
- package/build/languageProcessing/languages/ja/config/assessmentApplicabilityCharacterCount.js +1 -7
- package/build/languageProcessing/languages/ja/config/assessmentApplicabilityCharacterCount.js.map +1 -1
- package/build/languageProcessing/languages/ja/config/firstWordExceptions.js +1 -7
- package/build/languageProcessing/languages/ja/config/firstWordExceptions.js.map +1 -1
- package/build/languageProcessing/languages/ja/config/functionWords.js +1 -7
- package/build/languageProcessing/languages/ja/config/functionWords.js.map +1 -1
- package/build/languageProcessing/languages/ja/config/keyphraseLength.js +1 -7
- package/build/languageProcessing/languages/ja/config/keyphraseLength.js.map +1 -1
- package/build/languageProcessing/languages/ja/config/metaDescriptionLength.js +1 -7
- package/build/languageProcessing/languages/ja/config/metaDescriptionLength.js.map +1 -1
- package/build/languageProcessing/languages/ja/config/paragraphLength.js +1 -7
- package/build/languageProcessing/languages/ja/config/paragraphLength.js.map +1 -1
- package/build/languageProcessing/languages/ja/config/sentenceLength.js +1 -7
- package/build/languageProcessing/languages/ja/config/sentenceLength.js.map +1 -1
- package/build/languageProcessing/languages/ja/config/subheadingsTooLong.js +1 -7
- package/build/languageProcessing/languages/ja/config/subheadingsTooLong.js.map +1 -1
- package/build/languageProcessing/languages/ja/config/textLength.js +1 -7
- package/build/languageProcessing/languages/ja/config/textLength.js.map +1 -1
- package/build/languageProcessing/languages/ja/config/topicLength.js +1 -7
- package/build/languageProcessing/languages/ja/config/topicLength.js.map +1 -1
- package/build/languageProcessing/languages/ja/config/transitionWords.js +2 -7
- package/build/languageProcessing/languages/ja/config/transitionWords.js.map +1 -1
- package/build/languageProcessing/languages/ja/customResearches/findKeyphraseInSEOTitle.js +16 -22
- package/build/languageProcessing/languages/ja/customResearches/findKeyphraseInSEOTitle.js.map +1 -1
- package/build/languageProcessing/languages/ja/customResearches/getKeyphraseLength.js +5 -11
- package/build/languageProcessing/languages/ja/customResearches/getKeyphraseLength.js.map +1 -1
- package/build/languageProcessing/languages/ja/customResearches/getWordForms.js +11 -17
- package/build/languageProcessing/languages/ja/customResearches/getWordForms.js.map +1 -1
- package/build/languageProcessing/languages/ja/customResearches/textLength.js +3 -9
- package/build/languageProcessing/languages/ja/customResearches/textLength.js.map +1 -1
- package/build/languageProcessing/languages/ja/helpers/countCharacters.js +6 -12
- package/build/languageProcessing/languages/ja/helpers/countCharacters.js.map +1 -1
- package/build/languageProcessing/languages/ja/helpers/customGetStemmer.js +8 -14
- package/build/languageProcessing/languages/ja/helpers/customGetStemmer.js.map +1 -1
- package/build/languageProcessing/languages/ja/helpers/getContentWords.js +5 -11
- package/build/languageProcessing/languages/ja/helpers/getContentWords.js.map +1 -1
- package/build/languageProcessing/languages/ja/helpers/getWords.js +8 -15
- package/build/languageProcessing/languages/ja/helpers/getWords.js.map +1 -1
- package/build/languageProcessing/languages/ja/helpers/internal/SentenceTokenizer.js +6 -13
- package/build/languageProcessing/languages/ja/helpers/internal/SentenceTokenizer.js.map +1 -1
- package/build/languageProcessing/languages/ja/helpers/internal/createWordForms.js +4 -9
- package/build/languageProcessing/languages/ja/helpers/internal/createWordForms.js.map +1 -1
- package/build/languageProcessing/languages/ja/helpers/internal/determineStem.js +3 -9
- package/build/languageProcessing/languages/ja/helpers/internal/determineStem.js.map +1 -1
- package/build/languageProcessing/languages/ja/helpers/matchTextWithWord.js +7 -13
- package/build/languageProcessing/languages/ja/helpers/matchTextWithWord.js.map +1 -1
- package/build/languageProcessing/languages/ja/helpers/matchTransitionWords.js +3 -9
- package/build/languageProcessing/languages/ja/helpers/matchTransitionWords.js.map +1 -1
- package/build/languageProcessing/languages/ja/helpers/memoizedSentenceTokenizer.js +4 -10
- package/build/languageProcessing/languages/ja/helpers/memoizedSentenceTokenizer.js.map +1 -1
- package/build/languageProcessing/languages/ja/helpers/splitIntoTokensCustom.js +5 -11
- package/build/languageProcessing/languages/ja/helpers/splitIntoTokensCustom.js.map +1 -1
- package/build/languageProcessing/languages/ja/helpers/wordsCharacterCount.js +1 -7
- package/build/languageProcessing/languages/ja/helpers/wordsCharacterCount.js.map +1 -1
- package/build/languageProcessing/languages/nb/Researcher.js +17 -25
- package/build/languageProcessing/languages/nb/Researcher.js.map +1 -1
- package/build/languageProcessing/languages/nb/config/firstWordExceptions.js +1 -7
- package/build/languageProcessing/languages/nb/config/firstWordExceptions.js.map +1 -1
- package/build/languageProcessing/languages/nb/config/functionWords.js +5 -11
- package/build/languageProcessing/languages/nb/config/functionWords.js.map +1 -1
- package/build/languageProcessing/languages/nb/config/internal/participles.js +2 -7
- package/build/languageProcessing/languages/nb/config/internal/participles.js.map +1 -1
- package/build/languageProcessing/languages/nb/config/internal/passiveVoiceAuxiliaries.js +1 -7
- package/build/languageProcessing/languages/nb/config/internal/passiveVoiceAuxiliaries.js.map +1 -1
- package/build/languageProcessing/languages/nb/config/stopWords.js +1 -7
- package/build/languageProcessing/languages/nb/config/stopWords.js.map +1 -1
- package/build/languageProcessing/languages/nb/config/transitionWords.js +4 -10
- package/build/languageProcessing/languages/nb/config/transitionWords.js.map +1 -1
- package/build/languageProcessing/languages/nb/config/twoPartTransitionWords.js +2 -7
- package/build/languageProcessing/languages/nb/config/twoPartTransitionWords.js.map +1 -1
- package/build/languageProcessing/languages/nb/helpers/getClauses.js +11 -18
- package/build/languageProcessing/languages/nb/helpers/getClauses.js.map +1 -1
- package/build/languageProcessing/languages/nb/helpers/getStemmer.js +8 -14
- package/build/languageProcessing/languages/nb/helpers/getStemmer.js.map +1 -1
- package/build/languageProcessing/languages/nb/helpers/internal/getParticiples.js +8 -14
- package/build/languageProcessing/languages/nb/helpers/internal/getParticiples.js.map +1 -1
- package/build/languageProcessing/languages/nb/helpers/internal/stem.js +1 -7
- package/build/languageProcessing/languages/nb/helpers/internal/stem.js.map +1 -1
- package/build/languageProcessing/languages/nb/values/Clause.js +8 -14
- package/build/languageProcessing/languages/nb/values/Clause.js.map +1 -1
- package/build/languageProcessing/languages/nl/Researcher.js +23 -31
- package/build/languageProcessing/languages/nl/Researcher.js.map +1 -1
- package/build/languageProcessing/languages/nl/config/firstWordExceptions.js +1 -7
- package/build/languageProcessing/languages/nl/config/firstWordExceptions.js.map +1 -1
- package/build/languageProcessing/languages/nl/config/functionWords.js +10 -16
- package/build/languageProcessing/languages/nl/config/functionWords.js.map +1 -1
- package/build/languageProcessing/languages/nl/config/internal/nonParticiples.js +1 -7
- package/build/languageProcessing/languages/nl/config/internal/nonParticiples.js.map +1 -1
- package/build/languageProcessing/languages/nl/config/internal/passiveVoiceAuxiliaries.js +1 -7
- package/build/languageProcessing/languages/nl/config/internal/passiveVoiceAuxiliaries.js.map +1 -1
- package/build/languageProcessing/languages/nl/config/internal/passiveVoiceIrregulars.js +1 -7
- package/build/languageProcessing/languages/nl/config/internal/passiveVoiceIrregulars.js.map +1 -1
- package/build/languageProcessing/languages/nl/config/keyphraseLength.js +1 -7
- package/build/languageProcessing/languages/nl/config/keyphraseLength.js.map +1 -1
- package/build/languageProcessing/languages/nl/config/stopWords.js +1 -7
- package/build/languageProcessing/languages/nl/config/stopWords.js.map +1 -1
- package/build/languageProcessing/languages/nl/config/transitionWords.js +4 -10
- package/build/languageProcessing/languages/nl/config/transitionWords.js.map +1 -1
- package/build/languageProcessing/languages/nl/config/twoPartTransitionWords.js +1 -7
- package/build/languageProcessing/languages/nl/config/twoPartTransitionWords.js.map +1 -1
- package/build/languageProcessing/languages/nl/helpers/calculateFleschReadingScore.js +3 -9
- package/build/languageProcessing/languages/nl/helpers/calculateFleschReadingScore.js.map +1 -1
- package/build/languageProcessing/languages/nl/helpers/getClauses.js +9 -16
- package/build/languageProcessing/languages/nl/helpers/getClauses.js.map +1 -1
- package/build/languageProcessing/languages/nl/helpers/getStemmer.js +8 -14
- package/build/languageProcessing/languages/nl/helpers/getStemmer.js.map +1 -1
- package/build/languageProcessing/languages/nl/helpers/internal/checkExceptionsWithFullForms.js +7 -13
- package/build/languageProcessing/languages/nl/helpers/internal/checkExceptionsWithFullForms.js.map +1 -1
- package/build/languageProcessing/languages/nl/helpers/internal/detectAndStemRegularParticiple.js +8 -14
- package/build/languageProcessing/languages/nl/helpers/internal/detectAndStemRegularParticiple.js.map +1 -1
- package/build/languageProcessing/languages/nl/helpers/internal/detectAndStemSuffixes.js +10 -15
- package/build/languageProcessing/languages/nl/helpers/internal/detectAndStemSuffixes.js.map +1 -1
- package/build/languageProcessing/languages/nl/helpers/internal/determineStem.js +10 -16
- package/build/languageProcessing/languages/nl/helpers/internal/determineStem.js.map +1 -1
- package/build/languageProcessing/languages/nl/helpers/internal/getParticiples.js +7 -13
- package/build/languageProcessing/languages/nl/helpers/internal/getParticiples.js.map +1 -1
- package/build/languageProcessing/languages/nl/helpers/internal/getStemWordsWithTAndDEnding.js +7 -12
- package/build/languageProcessing/languages/nl/helpers/internal/getStemWordsWithTAndDEnding.js.map +1 -1
- package/build/languageProcessing/languages/nl/helpers/internal/stem.js +17 -23
- package/build/languageProcessing/languages/nl/helpers/internal/stem.js.map +1 -1
- package/build/languageProcessing/languages/nl/helpers/internal/stemModificationHelpers.js +4 -11
- package/build/languageProcessing/languages/nl/helpers/internal/stemModificationHelpers.js.map +1 -1
- package/build/languageProcessing/languages/nl/helpers/internal/stemTOrDFromEndOfWord.js +8 -14
- package/build/languageProcessing/languages/nl/helpers/internal/stemTOrDFromEndOfWord.js.map +1 -1
- package/build/languageProcessing/languages/nl/values/Clause.js +10 -16
- package/build/languageProcessing/languages/nl/values/Clause.js.map +1 -1
- package/build/languageProcessing/languages/pl/Researcher.js +19 -27
- package/build/languageProcessing/languages/pl/Researcher.js.map +1 -1
- package/build/languageProcessing/languages/pl/config/firstWordExceptions.js +1 -7
- package/build/languageProcessing/languages/pl/config/firstWordExceptions.js.map +1 -1
- package/build/languageProcessing/languages/pl/config/functionWords.js +9 -16
- package/build/languageProcessing/languages/pl/config/functionWords.js.map +1 -1
- package/build/languageProcessing/languages/pl/config/internal/auxiliaries.js +1 -7
- package/build/languageProcessing/languages/pl/config/internal/auxiliaries.js.map +1 -1
- package/build/languageProcessing/languages/pl/config/internal/participles.js +1 -7
- package/build/languageProcessing/languages/pl/config/internal/participles.js.map +1 -1
- package/build/languageProcessing/languages/pl/config/sentenceLength.js +1 -7
- package/build/languageProcessing/languages/pl/config/sentenceLength.js.map +1 -1
- package/build/languageProcessing/languages/pl/config/stopWords.js +1 -7
- package/build/languageProcessing/languages/pl/config/stopWords.js.map +1 -1
- package/build/languageProcessing/languages/pl/config/transitionWords.js +4 -10
- package/build/languageProcessing/languages/pl/config/transitionWords.js.map +1 -1
- package/build/languageProcessing/languages/pl/config/twoPartTransitionWords.js +2 -7
- package/build/languageProcessing/languages/pl/config/twoPartTransitionWords.js.map +1 -1
- package/build/languageProcessing/languages/pl/helpers/getClauses.js +9 -16
- package/build/languageProcessing/languages/pl/helpers/getClauses.js.map +1 -1
- package/build/languageProcessing/languages/pl/helpers/getStemmer.js +8 -14
- package/build/languageProcessing/languages/pl/helpers/getStemmer.js.map +1 -1
- package/build/languageProcessing/languages/pl/helpers/internal/getParticiples.js +7 -13
- package/build/languageProcessing/languages/pl/helpers/internal/getParticiples.js.map +1 -1
- package/build/languageProcessing/languages/pl/helpers/internal/stem.js +1 -7
- package/build/languageProcessing/languages/pl/helpers/internal/stem.js.map +1 -1
- package/build/languageProcessing/languages/pl/values/Clause.js +8 -14
- package/build/languageProcessing/languages/pl/values/Clause.js.map +1 -1
- package/build/languageProcessing/languages/pt/Researcher.js +23 -31
- package/build/languageProcessing/languages/pt/Researcher.js.map +1 -1
- package/build/languageProcessing/languages/pt/config/firstWordExceptions.js +1 -7
- package/build/languageProcessing/languages/pt/config/firstWordExceptions.js.map +1 -1
- package/build/languageProcessing/languages/pt/config/functionWords.js +10 -16
- package/build/languageProcessing/languages/pt/config/functionWords.js.map +1 -1
- package/build/languageProcessing/languages/pt/config/internal/passiveVoiceAuxiliaries.js +1 -7
- package/build/languageProcessing/languages/pt/config/internal/passiveVoiceAuxiliaries.js.map +1 -1
- package/build/languageProcessing/languages/pt/config/internal/passiveVoiceParticiples.js +1 -7
- package/build/languageProcessing/languages/pt/config/internal/passiveVoiceParticiples.js.map +1 -1
- package/build/languageProcessing/languages/pt/config/sentenceLength.js +1 -7
- package/build/languageProcessing/languages/pt/config/sentenceLength.js.map +1 -1
- package/build/languageProcessing/languages/pt/config/stopWords.js +1 -7
- package/build/languageProcessing/languages/pt/config/stopWords.js.map +1 -1
- package/build/languageProcessing/languages/pt/config/transitionWords.js +4 -10
- package/build/languageProcessing/languages/pt/config/transitionWords.js.map +1 -1
- package/build/languageProcessing/languages/pt/config/twoPartTransitionWords.js +1 -7
- package/build/languageProcessing/languages/pt/config/twoPartTransitionWords.js.map +1 -1
- package/build/languageProcessing/languages/pt/helpers/calculateFleschReadingScore.js +3 -9
- package/build/languageProcessing/languages/pt/helpers/calculateFleschReadingScore.js.map +1 -1
- package/build/languageProcessing/languages/pt/helpers/getClauses.js +10 -17
- package/build/languageProcessing/languages/pt/helpers/getClauses.js.map +1 -1
- package/build/languageProcessing/languages/pt/helpers/getStemmer.js +8 -14
- package/build/languageProcessing/languages/pt/helpers/getStemmer.js.map +1 -1
- package/build/languageProcessing/languages/pt/helpers/internal/getParticiples.js +6 -12
- package/build/languageProcessing/languages/pt/helpers/internal/getParticiples.js.map +1 -1
- package/build/languageProcessing/languages/pt/helpers/internal/stem.js +3 -9
- package/build/languageProcessing/languages/pt/helpers/internal/stem.js.map +1 -1
- package/build/languageProcessing/languages/pt/values/Clause.js +7 -14
- package/build/languageProcessing/languages/pt/values/Clause.js.map +1 -1
- package/build/languageProcessing/languages/ru/Researcher.js +23 -31
- package/build/languageProcessing/languages/ru/Researcher.js.map +1 -1
- package/build/languageProcessing/languages/ru/config/firstWordExceptions.js +1 -7
- package/build/languageProcessing/languages/ru/config/firstWordExceptions.js.map +1 -1
- package/build/languageProcessing/languages/ru/config/fleschReadingEaseScores.js +1 -7
- package/build/languageProcessing/languages/ru/config/fleschReadingEaseScores.js.map +1 -1
- package/build/languageProcessing/languages/ru/config/functionWords.js +8 -14
- package/build/languageProcessing/languages/ru/config/functionWords.js.map +1 -1
- package/build/languageProcessing/languages/ru/config/internal/participlesShortenedList.js +2 -8
- package/build/languageProcessing/languages/ru/config/internal/participlesShortenedList.js.map +1 -1
- package/build/languageProcessing/languages/ru/config/internal/passiveVoiceParticiples.js +1 -7
- package/build/languageProcessing/languages/ru/config/internal/passiveVoiceParticiples.js.map +1 -1
- package/build/languageProcessing/languages/ru/config/sentenceLength.js +1 -7
- package/build/languageProcessing/languages/ru/config/sentenceLength.js.map +1 -1
- package/build/languageProcessing/languages/ru/config/transitionWords.js +4 -10
- package/build/languageProcessing/languages/ru/config/transitionWords.js.map +1 -1
- package/build/languageProcessing/languages/ru/config/twoPartTransitionWords.js +2 -7
- package/build/languageProcessing/languages/ru/config/twoPartTransitionWords.js.map +1 -1
- package/build/languageProcessing/languages/ru/helpers/calculateFleschReadingScore.js +3 -9
- package/build/languageProcessing/languages/ru/helpers/calculateFleschReadingScore.js.map +1 -1
- package/build/languageProcessing/languages/ru/helpers/getStemmer.js +8 -14
- package/build/languageProcessing/languages/ru/helpers/getStemmer.js.map +1 -1
- package/build/languageProcessing/languages/ru/helpers/internal/stem.js +1 -7
- package/build/languageProcessing/languages/ru/helpers/internal/stem.js.map +1 -1
- package/build/languageProcessing/languages/ru/helpers/isPassiveSentence.js +6 -12
- package/build/languageProcessing/languages/ru/helpers/isPassiveSentence.js.map +1 -1
- package/build/languageProcessing/languages/sk/Researcher.js +17 -25
- package/build/languageProcessing/languages/sk/Researcher.js.map +1 -1
- package/build/languageProcessing/languages/sk/config/firstWordExceptions.js +1 -7
- package/build/languageProcessing/languages/sk/config/firstWordExceptions.js.map +1 -1
- package/build/languageProcessing/languages/sk/config/functionWords.js +5 -11
- package/build/languageProcessing/languages/sk/config/functionWords.js.map +1 -1
- package/build/languageProcessing/languages/sk/config/internal/nonPassives.js +1 -7
- package/build/languageProcessing/languages/sk/config/internal/nonPassives.js.map +1 -1
- package/build/languageProcessing/languages/sk/config/internal/passiveVoiceAuxiliaries.js +2 -8
- package/build/languageProcessing/languages/sk/config/internal/passiveVoiceAuxiliaries.js.map +1 -1
- package/build/languageProcessing/languages/sk/config/stopWords.js +1 -7
- package/build/languageProcessing/languages/sk/config/stopWords.js.map +1 -1
- package/build/languageProcessing/languages/sk/config/transitionWords.js +4 -10
- package/build/languageProcessing/languages/sk/config/transitionWords.js.map +1 -1
- package/build/languageProcessing/languages/sk/config/twoPartTransitionWords.js +2 -7
- package/build/languageProcessing/languages/sk/config/twoPartTransitionWords.js.map +1 -1
- package/build/languageProcessing/languages/sk/helpers/getClauses.js +9 -16
- package/build/languageProcessing/languages/sk/helpers/getClauses.js.map +1 -1
- package/build/languageProcessing/languages/sk/helpers/getStemmer.js +8 -14
- package/build/languageProcessing/languages/sk/helpers/getStemmer.js.map +1 -1
- package/build/languageProcessing/languages/sk/helpers/internal/getParticiples.js +3 -9
- package/build/languageProcessing/languages/sk/helpers/internal/getParticiples.js.map +1 -1
- package/build/languageProcessing/languages/sk/helpers/internal/stem.js +1 -7
- package/build/languageProcessing/languages/sk/helpers/internal/stem.js.map +1 -1
- package/build/languageProcessing/languages/sk/values/Clause.js +8 -14
- package/build/languageProcessing/languages/sk/values/Clause.js.map +1 -1
- package/build/languageProcessing/languages/sv/Researcher.js +17 -25
- package/build/languageProcessing/languages/sv/Researcher.js.map +1 -1
- package/build/languageProcessing/languages/sv/config/firstWordExceptions.js +1 -7
- package/build/languageProcessing/languages/sv/config/firstWordExceptions.js.map +1 -1
- package/build/languageProcessing/languages/sv/config/functionWords.js +7 -13
- package/build/languageProcessing/languages/sv/config/functionWords.js.map +1 -1
- package/build/languageProcessing/languages/sv/config/internal/passiveVerbs.js +2 -7
- package/build/languageProcessing/languages/sv/config/internal/passiveVerbs.js.map +1 -1
- package/build/languageProcessing/languages/sv/config/keyphraseLength.js +1 -7
- package/build/languageProcessing/languages/sv/config/keyphraseLength.js.map +1 -1
- package/build/languageProcessing/languages/sv/config/transitionWords.js +4 -10
- package/build/languageProcessing/languages/sv/config/transitionWords.js.map +1 -1
- package/build/languageProcessing/languages/sv/config/twoPartTransitionWords.js +2 -7
- package/build/languageProcessing/languages/sv/config/twoPartTransitionWords.js.map +1 -1
- package/build/languageProcessing/languages/sv/helpers/getStemmer.js +8 -14
- package/build/languageProcessing/languages/sv/helpers/getStemmer.js.map +1 -1
- package/build/languageProcessing/languages/sv/helpers/internal/stem.js +1 -7
- package/build/languageProcessing/languages/sv/helpers/internal/stem.js.map +1 -1
- package/build/languageProcessing/languages/sv/helpers/isPassiveSentence.js +6 -12
- package/build/languageProcessing/languages/sv/helpers/isPassiveSentence.js.map +1 -1
- package/build/languageProcessing/languages/tr/Researcher.js +17 -25
- package/build/languageProcessing/languages/tr/Researcher.js.map +1 -1
- package/build/languageProcessing/languages/tr/config/firstWordExceptions.js +1 -7
- package/build/languageProcessing/languages/tr/config/firstWordExceptions.js.map +1 -1
- package/build/languageProcessing/languages/tr/config/functionWords.js +4 -10
- package/build/languageProcessing/languages/tr/config/functionWords.js.map +1 -1
- package/build/languageProcessing/languages/tr/config/internal/nonPassiveExceptions.js +3 -8
- package/build/languageProcessing/languages/tr/config/internal/nonPassiveExceptions.js.map +1 -1
- package/build/languageProcessing/languages/tr/config/internal/passiveEndings.js +1 -7
- package/build/languageProcessing/languages/tr/config/internal/passiveEndings.js.map +1 -1
- package/build/languageProcessing/languages/tr/config/sentenceLength.js +1 -7
- package/build/languageProcessing/languages/tr/config/sentenceLength.js.map +1 -1
- package/build/languageProcessing/languages/tr/config/transitionWords.js +4 -10
- package/build/languageProcessing/languages/tr/config/transitionWords.js.map +1 -1
- package/build/languageProcessing/languages/tr/config/twoPartTransitionWords.js +2 -7
- package/build/languageProcessing/languages/tr/config/twoPartTransitionWords.js.map +1 -1
- package/build/languageProcessing/languages/tr/helpers/getStemmer.js +8 -14
- package/build/languageProcessing/languages/tr/helpers/getStemmer.js.map +1 -1
- package/build/languageProcessing/languages/tr/helpers/internal/stem.js +3 -9
- package/build/languageProcessing/languages/tr/helpers/internal/stem.js.map +1 -1
- package/build/languageProcessing/languages/tr/helpers/isPassiveSentence.js +9 -15
- package/build/languageProcessing/languages/tr/helpers/isPassiveSentence.js.map +1 -1
- package/build/languageProcessing/researches/altTagCount.js +10 -16
- package/build/languageProcessing/researches/altTagCount.js.map +1 -1
- package/build/languageProcessing/researches/checkRelatedKeywords.js +72 -0
- package/build/languageProcessing/researches/checkRelatedKeywords.js.map +1 -0
- package/build/languageProcessing/researches/countSentencesFromText.js +9 -15
- package/build/languageProcessing/researches/countSentencesFromText.js.map +1 -1
- package/build/languageProcessing/researches/findKeyphraseInSEOTitle.js +19 -26
- package/build/languageProcessing/researches/findKeyphraseInSEOTitle.js.map +1 -1
- package/build/languageProcessing/researches/findKeywordInFirstParagraph.js +17 -23
- package/build/languageProcessing/researches/findKeywordInFirstParagraph.js.map +1 -1
- package/build/languageProcessing/researches/findTransitionWords.js +16 -23
- package/build/languageProcessing/researches/findTransitionWords.js.map +1 -1
- package/build/languageProcessing/researches/functionWordsInKeyphrase.js +10 -16
- package/build/languageProcessing/researches/functionWordsInKeyphrase.js.map +1 -1
- package/build/languageProcessing/researches/getAnchorsWithKeyphrase.js +21 -28
- package/build/languageProcessing/researches/getAnchorsWithKeyphrase.js.map +1 -1
- package/build/languageProcessing/researches/getFleschReadingScore.js +18 -25
- package/build/languageProcessing/researches/getFleschReadingScore.js.map +1 -1
- package/build/languageProcessing/researches/getKeywordDensity.js +7 -14
- package/build/languageProcessing/researches/getKeywordDensity.js.map +1 -1
- package/build/languageProcessing/researches/getLinkStatistics.js +7 -13
- package/build/languageProcessing/researches/getLinkStatistics.js.map +1 -1
- package/build/languageProcessing/researches/getLinks.js +7 -13
- package/build/languageProcessing/researches/getLinks.js.map +1 -1
- package/build/languageProcessing/researches/getLongCenterAlignedTexts.js +1 -7
- package/build/languageProcessing/researches/getLongCenterAlignedTexts.js.map +1 -1
- package/build/languageProcessing/researches/getParagraphLength.js +15 -21
- package/build/languageProcessing/researches/getParagraphLength.js.map +1 -1
- package/build/languageProcessing/researches/getParagraphs.js +4 -9
- package/build/languageProcessing/researches/getParagraphs.js.map +1 -1
- package/build/languageProcessing/researches/getPassiveVoiceResult.js +21 -30
- package/build/languageProcessing/researches/getPassiveVoiceResult.js.map +1 -1
- package/build/languageProcessing/researches/getProminentWordsForInsights.js +12 -18
- package/build/languageProcessing/researches/getProminentWordsForInsights.js.map +1 -1
- package/build/languageProcessing/researches/getProminentWordsForInternalLinking.js +20 -26
- package/build/languageProcessing/researches/getProminentWordsForInternalLinking.js.map +1 -1
- package/build/languageProcessing/researches/getSentenceBeginnings.js +30 -36
- package/build/languageProcessing/researches/getSentenceBeginnings.js.map +1 -1
- package/build/languageProcessing/researches/getSubheadingTextLengths.js +12 -18
- package/build/languageProcessing/researches/getSubheadingTextLengths.js.map +1 -1
- package/build/languageProcessing/researches/getWordForms.js +13 -19
- package/build/languageProcessing/researches/getWordForms.js.map +1 -1
- package/build/languageProcessing/researches/h1s.js +1 -7
- package/build/languageProcessing/researches/h1s.js.map +1 -1
- package/build/languageProcessing/researches/imageCount.js +4 -10
- package/build/languageProcessing/researches/imageCount.js.map +1 -1
- package/build/languageProcessing/researches/index.js +4 -27
- package/build/languageProcessing/researches/index.js.map +1 -1
- package/build/languageProcessing/researches/keyphraseDistribution.js +22 -32
- package/build/languageProcessing/researches/keyphraseDistribution.js.map +1 -1
- package/build/languageProcessing/researches/keyphraseLength.js +1 -7
- package/build/languageProcessing/researches/keyphraseLength.js.map +1 -1
- package/build/languageProcessing/researches/keywordCount.js +30 -39
- package/build/languageProcessing/researches/keywordCount.js.map +1 -1
- package/build/languageProcessing/researches/keywordCountInUrl.js +8 -16
- package/build/languageProcessing/researches/keywordCountInUrl.js.map +1 -1
- package/build/languageProcessing/researches/matchKeywordInSubheadings.js +15 -20
- package/build/languageProcessing/researches/matchKeywordInSubheadings.js.map +1 -1
- package/build/languageProcessing/researches/metaDescriptionKeyword.js +6 -12
- package/build/languageProcessing/researches/metaDescriptionKeyword.js.map +1 -1
- package/build/languageProcessing/researches/metaDescriptionLength.js +3 -9
- package/build/languageProcessing/researches/metaDescriptionLength.js.map +1 -1
- package/build/languageProcessing/researches/pageTitleWidth.js +1 -7
- package/build/languageProcessing/researches/pageTitleWidth.js.map +1 -1
- package/build/languageProcessing/researches/readingTime.js +7 -13
- package/build/languageProcessing/researches/readingTime.js.map +1 -1
- package/build/languageProcessing/researches/sentences.js +7 -13
- package/build/languageProcessing/researches/sentences.js.map +1 -1
- package/build/languageProcessing/researches/videoCount.js +1 -7
- package/build/languageProcessing/researches/videoCount.js.map +1 -1
- package/build/languageProcessing/researches/wordComplexity.js +15 -21
- package/build/languageProcessing/researches/wordComplexity.js.map +1 -1
- package/build/languageProcessing/researches/wordCountInText.js +10 -15
- package/build/languageProcessing/researches/wordCountInText.js.map +1 -1
- package/build/languageProcessing/values/Clause.js +1 -7
- package/build/languageProcessing/values/Clause.js.map +1 -1
- package/build/languageProcessing/values/ProminentWord.js +1 -7
- package/build/languageProcessing/values/ProminentWord.js.map +1 -1
- package/build/languageProcessing/values/Sentence.js +1 -7
- package/build/languageProcessing/values/Sentence.js.map +1 -1
- package/build/languageProcessing/values/index.js +4 -27
- package/build/languageProcessing/values/index.js.map +1 -1
- package/build/markers/addMark.js +1 -7
- package/build/markers/addMark.js.map +1 -1
- package/build/markers/addMarkSingleWord.js +7 -12
- package/build/markers/addMarkSingleWord.js.map +1 -1
- package/build/markers/index.js +3 -20
- package/build/markers/index.js.map +1 -1
- package/build/markers/removeDuplicateMarks.js +3 -8
- package/build/markers/removeDuplicateMarks.js.map +1 -1
- package/build/markers/removeMarks.js +1 -7
- package/build/markers/removeMarks.js.map +1 -1
- package/build/parse/build/build.js +17 -25
- package/build/parse/build/build.js.map +1 -1
- package/build/parse/build/index.js +7 -12
- package/build/parse/build/index.js.map +1 -1
- package/build/parse/build/private/adapt.js +15 -21
- package/build/parse/build/private/adapt.js.map +1 -1
- package/build/parse/build/private/adaptAttributes.js +3 -9
- package/build/parse/build/private/adaptAttributes.js.map +1 -1
- package/build/parse/build/private/alwaysFilterElements.js +9 -14
- package/build/parse/build/private/alwaysFilterElements.js.map +1 -1
- package/build/parse/build/private/combineIntoImplicitParagraphs.js +12 -18
- package/build/parse/build/private/combineIntoImplicitParagraphs.js.map +1 -1
- package/build/parse/build/private/filterBeforeTokenizing.js +5 -10
- package/build/parse/build/private/filterBeforeTokenizing.js.map +1 -1
- package/build/parse/build/private/filterHelpers.js +3 -11
- package/build/parse/build/private/filterHelpers.js.map +1 -1
- package/build/parse/build/private/filterTree.js +3 -8
- package/build/parse/build/private/filterTree.js.map +1 -1
- package/build/parse/build/private/getTextElementPositions.js +5 -10
- package/build/parse/build/private/getTextElementPositions.js.map +1 -1
- package/build/parse/build/private/helpers/parseClassAttribute.js +1 -7
- package/build/parse/build/private/helpers/parseClassAttribute.js.map +1 -1
- package/build/parse/build/private/isPhrasingContent.js +1 -7
- package/build/parse/build/private/isPhrasingContent.js.map +1 -1
- package/build/parse/build/private/parseBlocks.js +4 -11
- package/build/parse/build/private/parseBlocks.js.map +1 -1
- package/build/parse/build/private/tokenize.js +8 -14
- package/build/parse/build/private/tokenize.js.map +1 -1
- package/build/parse/language/LanguageProcessor.js +8 -15
- package/build/parse/language/LanguageProcessor.js.map +1 -1
- package/build/parse/structure/Heading.js +3 -9
- package/build/parse/structure/Heading.js.map +1 -1
- package/build/parse/structure/Node.js +8 -14
- package/build/parse/structure/Node.js.map +1 -1
- package/build/parse/structure/Paragraph.js +3 -9
- package/build/parse/structure/Paragraph.js.map +1 -1
- package/build/parse/structure/Sentence.js +1 -7
- package/build/parse/structure/Sentence.js.map +1 -1
- package/build/parse/structure/SourceCodeLocation.js +1 -7
- package/build/parse/structure/SourceCodeLocation.js.map +1 -1
- package/build/parse/structure/Text.js +3 -10
- package/build/parse/structure/Text.js.map +1 -1
- package/build/parse/structure/Token.js +3 -8
- package/build/parse/structure/Token.js.map +1 -1
- package/build/parse/structure/index.js +10 -33
- package/build/parse/structure/index.js.map +1 -1
- package/build/parse/traverse/findAllInTree.js +1 -7
- package/build/parse/traverse/findAllInTree.js.map +1 -1
- package/build/parse/traverse/index.js +8 -19
- package/build/parse/traverse/index.js.map +1 -1
- package/build/parse/traverse/innerText.js +3 -8
- package/build/parse/traverse/innerText.js.map +1 -1
- package/build/parsedPaper/ParsedPaper.js +1 -8
- package/build/parsedPaper/ParsedPaper.js.map +1 -1
- package/build/parsedPaper/assess/TreeAssessor.js +6 -12
- package/build/parsedPaper/assess/TreeAssessor.js.map +1 -1
- package/build/parsedPaper/assess/assessmentListFactories.js +1 -11
- package/build/parsedPaper/assess/assessmentListFactories.js.map +1 -1
- package/build/parsedPaper/assess/assessments/Assessment.js +15 -9
- package/build/parsedPaper/assess/assessments/Assessment.js.map +1 -1
- package/build/parsedPaper/assess/assessments/index.js +6 -13
- package/build/parsedPaper/assess/assessments/index.js.map +1 -1
- package/build/parsedPaper/assess/assessorFactories.js +16 -24
- package/build/parsedPaper/assess/assessorFactories.js.map +1 -1
- package/build/parsedPaper/assess/cornerstone/assessmentListFactories.js +1 -9
- package/build/parsedPaper/assess/cornerstone/assessmentListFactories.js.map +1 -1
- package/build/parsedPaper/assess/cornerstone/index.js +2 -10
- package/build/parsedPaper/assess/cornerstone/index.js.map +1 -1
- package/build/parsedPaper/assess/index.js +13 -29
- package/build/parsedPaper/assess/index.js.map +1 -1
- package/build/parsedPaper/build/PaperParser.js +5 -11
- package/build/parsedPaper/build/PaperParser.js.map +1 -1
- package/build/parsedPaper/build/linguisticParsing/Sentence.js +1 -7
- package/build/parsedPaper/build/linguisticParsing/Sentence.js.map +1 -1
- package/build/parsedPaper/build/linguisticParsing/SentenceTokenizer.js +16 -23
- package/build/parsedPaper/build/linguisticParsing/SentenceTokenizer.js.map +1 -1
- package/build/parsedPaper/build/linguisticParsing/parseText.js +3 -9
- package/build/parsedPaper/build/linguisticParsing/parseText.js.map +1 -1
- package/build/parsedPaper/build/tree/TreeBuilder.js +3 -9
- package/build/parsedPaper/build/tree/TreeBuilder.js.map +1 -1
- package/build/parsedPaper/build/tree/cleanup/calculateTextIndices.js +5 -10
- package/build/parsedPaper/build/tree/cleanup/calculateTextIndices.js.map +1 -1
- package/build/parsedPaper/build/tree/cleanup/getElementContent.js +1 -7
- package/build/parsedPaper/build/tree/cleanup/getElementContent.js.map +1 -1
- package/build/parsedPaper/build/tree/cleanup/postParsing.js +5 -11
- package/build/parsedPaper/build/tree/cleanup/postParsing.js.map +1 -1
- package/build/parsedPaper/build/tree/html/HTMLTreeConverter.js +21 -27
- package/build/parsedPaper/build/tree/html/HTMLTreeConverter.js.map +1 -1
- package/build/parsedPaper/build/tree/html/buildTree.js +7 -13
- package/build/parsedPaper/build/tree/html/buildTree.js.map +1 -1
- package/build/parsedPaper/build/tree/html/htmlConstants.js +4 -9
- package/build/parsedPaper/build/tree/html/htmlConstants.js.map +1 -1
- package/build/parsedPaper/build/tree/index.js +3 -8
- package/build/parsedPaper/build/tree/index.js.map +1 -1
- package/build/parsedPaper/build/tree/metadata/buildTree.js +12 -18
- package/build/parsedPaper/build/tree/metadata/buildTree.js.map +1 -1
- package/build/parsedPaper/research/TreeResearcher.js +4 -9
- package/build/parsedPaper/research/TreeResearcher.js.map +1 -1
- package/build/parsedPaper/research/index.js +10 -12
- package/build/parsedPaper/research/index.js.map +1 -1
- package/build/parsedPaper/research/researches/Headings.js +5 -11
- package/build/parsedPaper/research/researches/Headings.js.map +1 -1
- package/build/parsedPaper/research/researches/LinkStatistics.js +6 -12
- package/build/parsedPaper/research/researches/LinkStatistics.js.map +1 -1
- package/build/parsedPaper/research/researches/Research.js +5 -10
- package/build/parsedPaper/research/researches/Research.js.map +1 -1
- package/build/parsedPaper/research/researches/index.js +1 -13
- package/build/parsedPaper/research/researches/index.js.map +1 -1
- package/build/parsedPaper/structure/tree/FormattingElement.js +3 -9
- package/build/parsedPaper/structure/tree/FormattingElement.js.map +1 -1
- package/build/parsedPaper/structure/tree/SourceCodeLocation.js +1 -7
- package/build/parsedPaper/structure/tree/SourceCodeLocation.js.map +1 -1
- package/build/parsedPaper/structure/tree/TextContainer.js +5 -10
- package/build/parsedPaper/structure/tree/TextContainer.js.map +1 -1
- package/build/parsedPaper/structure/tree/index.js +9 -74
- package/build/parsedPaper/structure/tree/index.js.map +1 -1
- package/build/parsedPaper/structure/tree/nodes/Heading.js +3 -9
- package/build/parsedPaper/structure/tree/nodes/Heading.js.map +1 -1
- package/build/parsedPaper/structure/tree/nodes/LeafNode.js +5 -12
- package/build/parsedPaper/structure/tree/nodes/LeafNode.js.map +1 -1
- package/build/parsedPaper/structure/tree/nodes/List.js +5 -11
- package/build/parsedPaper/structure/tree/nodes/List.js.map +1 -1
- package/build/parsedPaper/structure/tree/nodes/ListItem.js +3 -10
- package/build/parsedPaper/structure/tree/nodes/ListItem.js.map +1 -1
- package/build/parsedPaper/structure/tree/nodes/MetadataMiscellaneous.js +3 -9
- package/build/parsedPaper/structure/tree/nodes/MetadataMiscellaneous.js.map +1 -1
- package/build/parsedPaper/structure/tree/nodes/MetadataText.js +3 -9
- package/build/parsedPaper/structure/tree/nodes/MetadataText.js.map +1 -1
- package/build/parsedPaper/structure/tree/nodes/Node.js +6 -12
- package/build/parsedPaper/structure/tree/nodes/Node.js.map +1 -1
- package/build/parsedPaper/structure/tree/nodes/Paragraph.js +3 -9
- package/build/parsedPaper/structure/tree/nodes/Paragraph.js.map +1 -1
- package/build/parsedPaper/structure/tree/nodes/StructuredNode.js +3 -10
- package/build/parsedPaper/structure/tree/nodes/StructuredNode.js.map +1 -1
- package/build/parsedPaper/structure/tree/nodes/index.js +10 -69
- package/build/parsedPaper/structure/tree/nodes/index.js.map +1 -1
- package/build/scoring/assessments/assessment.js +17 -15
- package/build/scoring/assessments/assessment.js.map +1 -1
- package/build/scoring/assessments/index.js +53 -56
- package/build/scoring/assessments/index.js.map +1 -1
- package/build/scoring/assessments/readability/ParagraphTooLongAssessment.js +30 -47
- package/build/scoring/assessments/readability/ParagraphTooLongAssessment.js.map +1 -1
- package/build/scoring/assessments/readability/RelatedKeywordsAssessment.js +98 -0
- package/build/scoring/assessments/readability/RelatedKeywordsAssessment.js.map +1 -0
- package/build/scoring/assessments/readability/SentenceBeginningsAssessment.js +22 -35
- package/build/scoring/assessments/readability/SentenceBeginningsAssessment.js.map +1 -1
- package/build/scoring/assessments/readability/SentenceLengthInTextAssessment.js +24 -39
- package/build/scoring/assessments/readability/SentenceLengthInTextAssessment.js.map +1 -1
- package/build/scoring/assessments/readability/TransitionWordsAssessment.js +29 -47
- package/build/scoring/assessments/readability/TransitionWordsAssessment.js.map +1 -1
- package/build/scoring/assessments/seo/FAQsAssessment.js +162 -0
- package/build/scoring/assessments/seo/FAQsAssessment.js.map +1 -0
- package/build/scoring/assessments/seo/ImageCountAssessment.js +17 -33
- package/build/scoring/assessments/seo/ImageCountAssessment.js.map +1 -1
- package/build/scoring/assessments/seo/InternalLinksAssessment.js +21 -35
- package/build/scoring/assessments/seo/InternalLinksAssessment.js.map +1 -1
- package/build/scoring/assessments/seo/IntroductionKeywordAssessment.js +20 -34
- package/build/scoring/assessments/seo/IntroductionKeywordAssessment.js.map +1 -1
- package/build/scoring/assessments/seo/KeyphraseAssessment.js +18 -32
- package/build/scoring/assessments/seo/KeyphraseAssessment.js.map +1 -1
- package/build/scoring/assessments/seo/KeyphraseLengthAssessment.js +21 -34
- package/build/scoring/assessments/seo/KeyphraseLengthAssessment.js.map +1 -1
- package/build/scoring/assessments/seo/KeywordDensityAssessment.js +26 -40
- package/build/scoring/assessments/seo/KeywordDensityAssessment.js.map +1 -1
- package/build/scoring/assessments/seo/MetaDescriptionKeywordAssessment.js +23 -42
- package/build/scoring/assessments/seo/MetaDescriptionKeywordAssessment.js.map +1 -1
- package/build/scoring/assessments/seo/MetaDescriptionLengthAssessment.js +19 -34
- package/build/scoring/assessments/seo/MetaDescriptionLengthAssessment.js.map +1 -1
- package/build/scoring/assessments/seo/MetaTitleKeywordAssessment.js +25 -41
- package/build/scoring/assessments/seo/MetaTitleKeywordAssessment.js.map +1 -1
- package/build/scoring/assessments/seo/NumberInMetaTitleAssessment.js +16 -30
- package/build/scoring/assessments/seo/NumberInMetaTitleAssessment.js.map +1 -1
- package/build/scoring/assessments/seo/OutboundLinksAssessment.js +21 -40
- package/build/scoring/assessments/seo/OutboundLinksAssessment.js.map +1 -1
- package/build/scoring/assessments/seo/PageTitleWidthAssessment.js +17 -31
- package/build/scoring/assessments/seo/PageTitleWidthAssessment.js.map +1 -1
- package/build/scoring/assessments/seo/SchemaAssessment.js +95 -0
- package/build/scoring/assessments/seo/SchemaAssessment.js.map +1 -0
- package/build/scoring/assessments/seo/SingleH1Assessment.js +20 -33
- package/build/scoring/assessments/seo/SingleH1Assessment.js.map +1 -1
- package/build/scoring/assessments/seo/SingleTitleAssessment.js +20 -33
- package/build/scoring/assessments/seo/SingleTitleAssessment.js.map +1 -1
- package/build/scoring/assessments/seo/SubHeadingsKeywordAssessment.js +18 -35
- package/build/scoring/assessments/seo/SubHeadingsKeywordAssessment.js.map +1 -1
- package/build/scoring/assessments/seo/TextImagesAssessment.js +20 -36
- package/build/scoring/assessments/seo/TextImagesAssessment.js.map +1 -1
- package/build/scoring/assessments/seo/TextLengthAssessment.js +21 -37
- package/build/scoring/assessments/seo/TextLengthAssessment.js.map +1 -1
- package/build/scoring/assessments/seo/UrlKeywordAssessment.js +20 -36
- package/build/scoring/assessments/seo/UrlKeywordAssessment.js.map +1 -1
- package/build/scoring/assessments/seo/UrlLengthAssessment.js +19 -33
- package/build/scoring/assessments/seo/UrlLengthAssessment.js.map +1 -1
- package/build/scoring/assessors/assessor.js +53 -33
- package/build/scoring/assessors/assessor.js.map +1 -1
- package/build/scoring/assessors/avadaAssessor.js +37 -17
- package/build/scoring/assessors/avadaAssessor.js.map +1 -1
- package/build/scoring/assessors/contentAssessor.js +16 -22
- package/build/scoring/assessors/contentAssessor.js.map +1 -1
- package/build/scoring/assessors/index.js +4 -34
- package/build/scoring/assessors/index.js.map +1 -1
- package/build/scoring/assessors/seoAssessor.js +27 -32
- package/build/scoring/assessors/seoAssessor.js.map +1 -1
- package/build/scoring/helpers/assessments/checkForTooLongSentences.js +3 -8
- package/build/scoring/helpers/assessments/checkForTooLongSentences.js.map +1 -1
- package/build/scoring/helpers/assessments/inRange.js +2 -10
- package/build/scoring/helpers/assessments/inRange.js.map +1 -1
- package/build/scoring/helpers/assessments/keyphraseLengthFactor.js +1 -7
- package/build/scoring/helpers/assessments/keyphraseLengthFactor.js.map +1 -1
- package/build/scoring/helpers/assessments/recommendedKeywordCount.js +5 -11
- package/build/scoring/helpers/assessments/recommendedKeywordCount.js.map +1 -1
- package/build/scoring/helpers/index.js +27 -18
- package/build/scoring/helpers/index.js.map +1 -1
- package/build/scoring/interpreters/index.js +2 -13
- package/build/scoring/interpreters/index.js.map +1 -1
- package/build/scoring/interpreters/scoreToRating.js +1 -7
- package/build/scoring/interpreters/scoreToRating.js.map +1 -1
- package/build/scoring/renderers/AssessorPresenter.js +12 -18
- package/build/scoring/renderers/AssessorPresenter.js.map +1 -1
- package/build/scoring/scoreAggregators/ReadabilityScoreAggregator.js +8 -14
- package/build/scoring/scoreAggregators/ReadabilityScoreAggregator.js.map +1 -1
- package/build/scoring/scoreAggregators/SEOScoreAggregator.js +3 -9
- package/build/scoring/scoreAggregators/SEOScoreAggregator.js.map +1 -1
- package/build/scoring/scoreAggregators/ScoreAggregator.js +1 -7
- package/build/scoring/scoreAggregators/ScoreAggregator.js.map +1 -1
- package/build/scoring/scoreAggregators/index.js +3 -27
- package/build/scoring/scoreAggregators/index.js.map +1 -1
- package/build/values/AssessmentResult.js +31 -57
- package/build/values/AssessmentResult.js.map +1 -1
- package/build/values/Mark.js +9 -15
- package/build/values/Mark.js.map +1 -1
- package/build/values/Paper.js +115 -16
- package/build/values/Paper.js.map +1 -1
- package/build/values/index.js +4 -27
- package/build/values/index.js.map +1 -1
- package/build/vendor/turkishStemmer.js +1 -7
- package/build/vendor/turkishStemmer.js.map +1 -1
- package/package.json +10 -2
- package/build/bundledPlugins/index.js +0 -14
- package/build/bundledPlugins/index.js.map +0 -1
- package/build/bundledPlugins/previouslyUsedKeywords.js +0 -171
- package/build/bundledPlugins/previouslyUsedKeywords.js.map +0 -1
|
@@ -1,20 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
});
|
|
6
|
-
exports.collapseProminentWordsOnStem = collapseProminentWordsOnStem;
|
|
7
|
-
exports.default = void 0;
|
|
8
|
-
exports.filterProminentWords = filterProminentWords;
|
|
9
|
-
exports.getProminentWords = getProminentWords;
|
|
10
|
-
exports.getProminentWordsFromPaperAttributes = getProminentWordsFromPaperAttributes;
|
|
11
|
-
exports.retrieveAbbreviations = retrieveAbbreviations;
|
|
12
|
-
exports.sortProminentWords = sortProminentWords;
|
|
13
|
-
var _lodash = require("lodash");
|
|
14
|
-
var _getWords = _interopRequireDefault(require("../word/getWords"));
|
|
15
|
-
var _quotes = require("../sanitize/quotes");
|
|
16
|
-
var _ProminentWord = _interopRequireDefault(require("../../values/ProminentWord"));
|
|
17
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
1
|
+
import { memoize, uniq } from "lodash";
|
|
2
|
+
import getWords from "../word/getWords";
|
|
3
|
+
import { normalizeSingle } from "../sanitize/quotes";
|
|
4
|
+
import ProminentWord from "../../values/ProminentWord";
|
|
18
5
|
const specialCharacters = /[1234567890‘’“”"'.…?!:;,¿¡«»&*@#±^%$|~=+§`[\](){}⟨⟩<>/\\–\-\u2014\u00d7\s]/g;
|
|
19
6
|
|
|
20
7
|
/**
|
|
@@ -69,9 +56,9 @@ function collapseProminentWordsOnStem(prominentWords) {
|
|
|
69
56
|
return wordA.getStem().localeCompare(wordB.getStem());
|
|
70
57
|
});
|
|
71
58
|
const collapsedProminentWords = [];
|
|
72
|
-
let previousWord = new
|
|
59
|
+
let previousWord = new ProminentWord(prominentWords[0].getWord(), prominentWords[0].getStem(), prominentWords[0].getOccurrences());
|
|
73
60
|
for (let i = 1; i < prominentWords.length; i++) {
|
|
74
|
-
const currentWord = new
|
|
61
|
+
const currentWord = new ProminentWord(prominentWords[i].getWord(), prominentWords[i].getStem(), prominentWords[i].getOccurrences());
|
|
75
62
|
|
|
76
63
|
/*
|
|
77
64
|
* Compare the stem of the current word in the loop with the previously available stem.
|
|
@@ -102,14 +89,14 @@ function collapseProminentWordsOnStem(prominentWords) {
|
|
|
102
89
|
* @returns {string[]} A list of abbreviations from the list.
|
|
103
90
|
*/
|
|
104
91
|
function retrieveAbbreviations(text) {
|
|
105
|
-
const words = (
|
|
92
|
+
const words = getWords(normalizeSingle(text));
|
|
106
93
|
const abbreviations = [];
|
|
107
94
|
words.forEach(function (word) {
|
|
108
95
|
if (word.length > 1 && word.length < 5 && word === word.toLocaleUpperCase()) {
|
|
109
96
|
abbreviations.push(word.toLocaleLowerCase());
|
|
110
97
|
}
|
|
111
98
|
});
|
|
112
|
-
return
|
|
99
|
+
return uniq(abbreviations);
|
|
113
100
|
}
|
|
114
101
|
|
|
115
102
|
/**
|
|
@@ -128,13 +115,13 @@ function computeProminentWords(words, abbreviations, stemmer, functionWords) {
|
|
|
128
115
|
if (words.length === 0) {
|
|
129
116
|
return [];
|
|
130
117
|
}
|
|
131
|
-
const uniqueContentWords =
|
|
118
|
+
const uniqueContentWords = uniq(words.filter(word => !functionWords.includes(word.trim())));
|
|
132
119
|
const prominentWords = [];
|
|
133
120
|
uniqueContentWords.forEach(function (word) {
|
|
134
121
|
if (abbreviations.includes(word)) {
|
|
135
|
-
prominentWords.push(new
|
|
122
|
+
prominentWords.push(new ProminentWord(word.toLocaleUpperCase(), word, words.filter(element => element === word).length));
|
|
136
123
|
} else {
|
|
137
|
-
prominentWords.push(new
|
|
124
|
+
prominentWords.push(new ProminentWord(word, stemmer(word), words.filter(element => element === word).length));
|
|
138
125
|
}
|
|
139
126
|
});
|
|
140
127
|
return collapseProminentWordsOnStem(prominentWords);
|
|
@@ -152,7 +139,7 @@ function computeProminentWords(words, abbreviations, stemmer, functionWords) {
|
|
|
152
139
|
*
|
|
153
140
|
* @returns {function} The function that collects prominent words for a given set of text words, language and morphologyData.
|
|
154
141
|
*/
|
|
155
|
-
const computeProminentWordsMemoized =
|
|
142
|
+
const computeProminentWordsMemoized = memoize((words, abbreviations, stemmer, functionWords) => {
|
|
156
143
|
return computeProminentWords(words, abbreviations, stemmer, functionWords);
|
|
157
144
|
}, (words, abbreviations) => {
|
|
158
145
|
return words.join(",") + "," + abbreviations.join(",");
|
|
@@ -173,7 +160,7 @@ function getProminentWords(text, abbreviations, stemmer, functionWords, getWords
|
|
|
173
160
|
if (text === "") {
|
|
174
161
|
return [];
|
|
175
162
|
}
|
|
176
|
-
const words = getWordsCustomHelper ? getWordsCustomHelper(
|
|
163
|
+
const words = getWordsCustomHelper ? getWordsCustomHelper(normalizeSingle(text).toLocaleLowerCase()) : getWords(normalizeSingle(text).toLocaleLowerCase());
|
|
177
164
|
return computeProminentWordsMemoized(words, abbreviations, stemmer, functionWords);
|
|
178
165
|
}
|
|
179
166
|
|
|
@@ -189,10 +176,11 @@ function getProminentWords(text, abbreviations, stemmer, functionWords, getWords
|
|
|
189
176
|
* @returns {ProminentWord[]} Prominent words from the paper attributes.
|
|
190
177
|
*/
|
|
191
178
|
function getProminentWordsFromPaperAttributes(attributes, abbreviations, stemmer, functionWords, getWordsCustomHelper) {
|
|
192
|
-
const wordsFromAttributes = getWordsCustomHelper ? getWordsCustomHelper(attributes.join(" ").toLocaleLowerCase()) : (
|
|
179
|
+
const wordsFromAttributes = getWordsCustomHelper ? getWordsCustomHelper(attributes.join(" ").toLocaleLowerCase()) : getWords(attributes.join(" ").toLocaleLowerCase());
|
|
193
180
|
return computeProminentWords(wordsFromAttributes, abbreviations, stemmer, functionWords);
|
|
194
181
|
}
|
|
195
|
-
|
|
182
|
+
export { getProminentWords, getProminentWordsFromPaperAttributes, filterProminentWords, sortProminentWords, collapseProminentWordsOnStem, retrieveAbbreviations };
|
|
183
|
+
export default {
|
|
196
184
|
getProminentWords,
|
|
197
185
|
getProminentWordsFromPaperAttributes,
|
|
198
186
|
filterProminentWords,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"determineProminentWords.js","names":["_lodash","require","_getWords","_interopRequireDefault","_quotes","_ProminentWord","e","__esModule","default","specialCharacters","filterProminentWords","prominentWords","minimalNumberOfOccurrences","filter","word","getOccurrences","getWord","replace","sortProminentWords","sort","wordA","wordB","difference","getStem","localeCompare","collapseProminentWordsOnStem","length","collapsedProminentWords","previousWord","ProminentWord","i","currentWord","setOccurrences","toLocaleLowerCase","setWord","push","retrieveAbbreviations","text","words","getWords","normalizeSingle","abbreviations","forEach","toLocaleUpperCase","uniq","computeProminentWords","stemmer","functionWords","uniqueContentWords","includes","trim","element","computeProminentWordsMemoized","memoize","join","getProminentWords","getWordsCustomHelper","getProminentWordsFromPaperAttributes","attributes","wordsFromAttributes","_default","exports"],"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":";;;;;;;;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AAEA,IAAAC,SAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AACA,IAAAI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,IAAAC,uBAAe,EAAEH,IAAK,CAAC,CAACJ,iBAAiB,CAAC,CAAE,CAAC;EAE1D,OAAOmB,6BAA6B,CAAEd,KAAK,EAAEG,aAAa,EAAEK,OAAO,EAAEC,aAAc,CAAC;AACrF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASU,oCAAoCA,CAAEC,UAAU,EAAEjB,aAAa,EAAEK,OAAO,EAAEC,aAAa,EAAES,oBAAoB,EAAG;EACxH,MAAMG,mBAAmB,GAAGH,oBAAoB,GAC7CA,oBAAoB,CAAEE,UAAU,CAACJ,IAAI,CAAE,GAAI,CAAC,CAACrB,iBAAiB,CAAC,CAAE,CAAC,GAClE,IAAAM,iBAAQ,EAAEmB,UAAU,CAACJ,IAAI,CAAE,GAAI,CAAC,CAACrB,iBAAiB,CAAC,CAAE,CAAC;EAEzD,OAAOY,qBAAqB,CAAEc,mBAAmB,EAAElB,aAAa,EAAEK,OAAO,EAAEC,aAAc,CAAC;AAC3F;AAAC,IAAAa,QAAA,GAAAC,OAAA,CAAArD,OAAA,GAWc;EACd+C,iBAAiB;EACjBE,oCAAoC;EACpC/C,oBAAoB;EACpBQ,kBAAkB;EAClBO,4BAA4B;EAC5BW;AACD,CAAC","ignoreList":[]}
|
|
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":"AAAA,SAASA,OAAO,EAAEC,IAAI,QAAQ,QAAQ;AAEtC,OAAOC,QAAQ;AACf,SAASC,eAAe;AACxB,OAAOC,aAA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ACA;AACA;AACA;AACA;AACA;AACA,SAASS,oCAAoCA,CAAEC,UAAU,EAAEf,aAAa,EAAEI,OAAO,EAAEC,aAAa,EAAEQ,oBAAoB,EAAG;EACxH,MAAMG,mBAAmB,GAAGH,oBAAoB,GAC7CA,oBAAoB,CAAEE,UAAU,CAACJ,IAAI,CAAE,GAAI,CAAC,CAACjB,iBAAiB,CAAC,CAAE,CAAC,GAClE1B,QAAQ,CAAE+C,UAAU,CAACJ,IAAI,CAAE,GAAI,CAAC,CAACjB,iBAAiB,CAAC,CAAE,CAAC;EAEzD,OAAOS,qBAAqB,CAAEa,mBAAmB,EAAEhB,aAAa,EAAEI,OAAO,EAAEC,aAAc,CAAC;AAC3F;AAEA,SACCO,iBAAiB,EACjBE,oCAAoC,EACpC1C,oBAAoB,EACpBQ,kBAAkB,EAClBO,4BAA4B,EAC5BU,qBAAqB;AAGtB,eAAe;EACde,iBAAiB;EACjBE,oCAAoC;EACpC1C,oBAAoB;EACpBQ,kBAAkB;EAClBO,4BAA4B;EAC5BU;AACD,CAAC","ignoreList":[]}
|
|
@@ -1,16 +1,10 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = _default;
|
|
7
|
-
var _lodash = require("lodash");
|
|
8
|
-
var _addWordboundary = _interopRequireDefault(require("../word/addWordboundary.js"));
|
|
9
|
-
var _replaceDiacritics = _interopRequireDefault(require("../transliterate/replaceDiacritics"));
|
|
10
|
-
var _sanitizeString = _interopRequireDefault(require("../sanitize/sanitizeString"));
|
|
11
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
12
1
|
/** @module stringProcessing/createRegexFromArray */
|
|
13
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
|
+
|
|
14
8
|
/**
|
|
15
9
|
* Creates a regex of combined strings from the input array.
|
|
16
10
|
*
|
|
@@ -21,16 +15,16 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
|
|
|
21
15
|
*
|
|
22
16
|
* @returns {RegExp} regex The regex created from the array.
|
|
23
17
|
*/
|
|
24
|
-
function
|
|
25
|
-
array =
|
|
18
|
+
export default function (array, disableWordBoundary = false, extraBoundary = "", doReplaceDiacritics = false) {
|
|
19
|
+
array = map(array, function (string) {
|
|
26
20
|
if (doReplaceDiacritics) {
|
|
27
|
-
string = (
|
|
21
|
+
string = replaceDiacritics(string);
|
|
28
22
|
}
|
|
29
|
-
string = (
|
|
23
|
+
string = sanitizeString(string);
|
|
30
24
|
if (disableWordBoundary) {
|
|
31
25
|
return string;
|
|
32
26
|
}
|
|
33
|
-
return (
|
|
27
|
+
return addWordBoundary(string, true, extraBoundary);
|
|
34
28
|
});
|
|
35
29
|
const regexString = "(" + array.join(")|(") + ")";
|
|
36
30
|
return new RegExp(regexString, "ig");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createRegexFromArray.js","names":["
|
|
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":[]}
|
|
@@ -1,13 +1,7 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = _default;
|
|
7
|
-
var _addWordboundary = _interopRequireDefault(require("../word/addWordboundary.js"));
|
|
8
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
9
1
|
/** @module stringProcessing/createRegexFromDoubleArray */
|
|
10
2
|
|
|
3
|
+
import addWordBoundary from "../word/addWordboundary.js";
|
|
4
|
+
|
|
11
5
|
/**
|
|
12
6
|
* Creates a regex string of combined strings from the input array.
|
|
13
7
|
*
|
|
@@ -17,7 +11,7 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
|
|
|
17
11
|
*/
|
|
18
12
|
const wordCombinationToRegexString = function (array) {
|
|
19
13
|
array = array.map(function (word) {
|
|
20
|
-
return (
|
|
14
|
+
return addWordBoundary(word);
|
|
21
15
|
});
|
|
22
16
|
return array.join("(.*?)");
|
|
23
17
|
};
|
|
@@ -29,7 +23,7 @@ const wordCombinationToRegexString = function (array) {
|
|
|
29
23
|
*
|
|
30
24
|
* @returns {RegExp} The regex created from the array.
|
|
31
25
|
*/
|
|
32
|
-
function
|
|
26
|
+
export default function (array) {
|
|
33
27
|
array = array.map(function (wordCombination) {
|
|
34
28
|
return wordCombinationToRegexString(wordCombination);
|
|
35
29
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createRegexFromDoubleArray.js","names":["
|
|
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":[]}
|
|
@@ -1,15 +1,9 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
var _lodash = require("lodash");
|
|
8
|
-
var _sanitizeString = _interopRequireDefault(require("../sanitize/sanitizeString"));
|
|
9
|
-
var _replaceDiacritics = _interopRequireDefault(require("../transliterate/replaceDiacritics.js"));
|
|
10
|
-
var _addWordboundary = _interopRequireDefault(require("../word/addWordboundary.js"));
|
|
11
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
12
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
|
+
|
|
13
7
|
/**
|
|
14
8
|
* Creates a regex from a string so it can be matched everywhere in the same way.
|
|
15
9
|
*
|
|
@@ -19,16 +13,16 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
|
|
|
19
13
|
*
|
|
20
14
|
* @returns {RegExp} regex The regex made from the keyword
|
|
21
15
|
*/
|
|
22
|
-
|
|
23
|
-
if (
|
|
16
|
+
export default memoize(function (string, extraBoundary, doReplaceDiacritics) {
|
|
17
|
+
if (isUndefined(extraBoundary)) {
|
|
24
18
|
extraBoundary = "";
|
|
25
19
|
}
|
|
26
|
-
if (
|
|
27
|
-
string = (
|
|
20
|
+
if (isUndefined(doReplaceDiacritics) || doReplaceDiacritics === true) {
|
|
21
|
+
string = replaceDiacritics(string);
|
|
28
22
|
}
|
|
29
|
-
string = (
|
|
30
|
-
string =
|
|
31
|
-
string = (
|
|
23
|
+
string = sanitizeString(string);
|
|
24
|
+
string = escapeRegExp(string);
|
|
25
|
+
string = addWordBoundary(string, false, extraBoundary);
|
|
32
26
|
return new RegExp(string, "ig");
|
|
33
27
|
});
|
|
34
28
|
//# sourceMappingURL=createWordRegex.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createWordRegex.js","names":["
|
|
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":[]}
|
|
@@ -1,9 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = _default;
|
|
7
1
|
/** @module stringProcessing/matchStringWithRegex */
|
|
8
2
|
|
|
9
3
|
/**
|
|
@@ -14,7 +8,7 @@ exports.default = _default;
|
|
|
14
8
|
*
|
|
15
9
|
* @returns {Array} Array with matches, empty array if no matches found.
|
|
16
10
|
*/
|
|
17
|
-
function
|
|
11
|
+
export default function (text, regex) {
|
|
18
12
|
let matches = text.match(regex);
|
|
19
13
|
if (matches === null) {
|
|
20
14
|
matches = [];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"matchStringWithRegex.js","names":["
|
|
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":[]}
|
|
@@ -1,9 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = searchAndReplaceWithOneRegex;
|
|
7
1
|
/**
|
|
8
2
|
* Checks whether a given regex matches a given word and if so, performs the replacement.
|
|
9
3
|
*
|
|
@@ -12,7 +6,7 @@ exports.default = searchAndReplaceWithOneRegex;
|
|
|
12
6
|
*
|
|
13
7
|
* @returns {?string} The modified stem or undefined if no match was found.
|
|
14
8
|
*/
|
|
15
|
-
function searchAndReplaceWithOneRegex(word, regexAndReplacement) {
|
|
9
|
+
export default function searchAndReplaceWithOneRegex(word, regexAndReplacement) {
|
|
16
10
|
if (word.search(new RegExp(regexAndReplacement[0])) !== -1) {
|
|
17
11
|
word = word.replace(new RegExp(regexAndReplacement[0]), regexAndReplacement[1]);
|
|
18
12
|
return word;
|
|
@@ -1 +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":"
|
|
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":[]}
|
|
@@ -1,9 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
1
|
/**
|
|
8
2
|
* Returns an array with double quotes.
|
|
9
3
|
*
|
|
@@ -15,5 +9,5 @@ exports.default = void 0;
|
|
|
15
9
|
*
|
|
16
10
|
* @returns {string[]} The array with double quotes..
|
|
17
11
|
*/
|
|
18
|
-
|
|
12
|
+
export default ["“", "”", "〝", "〞", "〟", "‟", "„", "\"", "\u300c", "\u300d", "\u300e", "\u300f"];
|
|
19
13
|
//# sourceMappingURL=doubleQuotes.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"doubleQuotes.js","names":[
|
|
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":[]}
|
|
@@ -1,15 +1,9 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.filterShortcodesFromHTML = exports.default = exports.createShortcodeTagsRegex = void 0;
|
|
7
1
|
/**
|
|
8
2
|
* Creates a regex to filter shortcodes from HTML.
|
|
9
3
|
* @param {string[]} shortcodeTags The tags of the shortcodes to filter.
|
|
10
4
|
* @returns {RegExp} The regex to recognize the shortcodes.
|
|
11
5
|
*/
|
|
12
|
-
const createShortcodeTagsRegex = shortcodeTags => {
|
|
6
|
+
export const createShortcodeTagsRegex = shortcodeTags => {
|
|
13
7
|
const shortcodeTagsRegexString = `\\[\\/?(${shortcodeTags.join("|")})[^\\]]*\\]`;
|
|
14
8
|
return new RegExp(shortcodeTagsRegexString, "g");
|
|
15
9
|
};
|
|
@@ -20,8 +14,7 @@ const createShortcodeTagsRegex = shortcodeTags => {
|
|
|
20
14
|
* @param {string[]} shortcodeTags The tags of the shortcodes to filter.
|
|
21
15
|
* @returns {string} The filtered HTML.
|
|
22
16
|
*/
|
|
23
|
-
|
|
24
|
-
const filterShortcodesFromHTML = (html, shortcodeTags) => {
|
|
17
|
+
export const filterShortcodesFromHTML = (html, shortcodeTags) => {
|
|
25
18
|
if (!shortcodeTags || shortcodeTags.length === 0) {
|
|
26
19
|
return html;
|
|
27
20
|
}
|
|
@@ -35,7 +28,6 @@ const filterShortcodesFromHTML = (html, shortcodeTags) => {
|
|
|
35
28
|
* @param {number} index The index of the current token.
|
|
36
29
|
* @returns {boolean} Whether the token is part of an opening shortcode.
|
|
37
30
|
*/
|
|
38
|
-
exports.filterShortcodesFromHTML = filterShortcodesFromHTML;
|
|
39
31
|
const tokenIsPartOfOpeningShortcode = (tokens, index) => {
|
|
40
32
|
return tokens[index - 1] && tokens[index - 1].text === "[";
|
|
41
33
|
};
|
|
@@ -127,5 +119,5 @@ const filterShortcodesFromTree = (tree, shortcodeTags) => {
|
|
|
127
119
|
const shortcodeTagsRegex = createShortcodeTagsRegex(shortcodeTags);
|
|
128
120
|
filterShortcodesFromSentences(tree, shortcodeTags, shortcodeTagsRegex);
|
|
129
121
|
};
|
|
130
|
-
|
|
122
|
+
export default filterShortcodesFromTree;
|
|
131
123
|
//# sourceMappingURL=filterShortcodesFromTree.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"filterShortcodesFromTree.js","names":["createShortcodeTagsRegex","shortcodeTags","shortcodeTagsRegexString","join","RegExp","
|
|
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":"AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMA,wBAAwB,GAAGC,aAAa,IAAI;EACxD,MAAMC,wBAAwB,GAAG,WAAYD,aAAa,CAACE,IAAI,CAAE,GAAI,CAAC,aAAc;EACpF,OAAO,IAAIC,MAAM,CAAEF,wBAAwB,EAAE,GAAI,CAAC;AACnD,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMG,wBAAwB,GAAGA,CAAEC,IAAI,EAAEL,aAAa,KAAM;EAClE,IAAK,CAAEA,aAAa,IAAIA,aAAa,CAACM,MAAM,KAAK,CAAC,EAAG;IACpD,OAAOD,IAAI;EACZ;EACA,MAAME,kBAAkB,GAAGR,wBAAwB,CAAEC,aAAc,CAAC;EACpE,OAAOK,IAAI,CAACG,OAAO,CAAED,kBAAkB,EAAE,EAAG,CAAC;AAC9C,CAAC;;AAED;AACA;A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IAC9E,CAAE,CAAC;EACJ;AACD,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA,MAAMoB,wBAAwB,GAAGA,CAAEL,IAAI,EAAEtB,aAAa,KAAM;EAC3D,IAAK,CAAEA,aAAa,IAAIA,aAAa,CAACM,MAAM,KAAK,CAAC,EAAG;IACpD;EACD;EACA,MAAMC,kBAAkB,GAAGR,wBAAwB,CAAEC,aAAc,CAAC;EAEpEqB,6BAA6B,CAAEC,IAAI,EAAEtB,aAAa,EAAEO,kBAAmB,CAAC;AACzE,CAAC;AAED,eAAeoB,wBAAwB","ignoreList":[]}
|
|
@@ -1,9 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.mergeListItems = mergeListItems;
|
|
7
1
|
/**
|
|
8
2
|
* Removes list-related html tags in a text to be used for the keyphrase distribution assessment.
|
|
9
3
|
* That way, lists with single words don't result in a skewed keyphrase distribution result.
|
|
@@ -12,7 +6,7 @@ exports.mergeListItems = mergeListItems;
|
|
|
12
6
|
*
|
|
13
7
|
* @returns {string} The text with all list structures removed.
|
|
14
8
|
*/
|
|
15
|
-
function mergeListItems(text) {
|
|
9
|
+
export function mergeListItems(text) {
|
|
16
10
|
const listTags = /<\/?(o|ul)(?:[^>]+)?>/g;
|
|
17
11
|
const listItemTags = /\s?<\/?li(?:[^>]+)?>\s?/g;
|
|
18
12
|
|
|
@@ -1 +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":"
|
|
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":[]}
|
|
@@ -1,14 +1,8 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = _default;
|
|
7
|
-
var _stripSpaces = _interopRequireDefault(require("./stripSpaces.js"));
|
|
8
|
-
var _removePunctuationExceptQuotes = _interopRequireDefault(require("./removePunctuationExceptQuotes.js"));
|
|
9
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
10
1
|
/** @module stringProcessing/parseSynonyms */
|
|
11
2
|
|
|
3
|
+
import stripSpaces from "./stripSpaces.js";
|
|
4
|
+
import removePunctuationExceptQuotes from "./removePunctuationExceptQuotes.js";
|
|
5
|
+
|
|
12
6
|
/**
|
|
13
7
|
* Parses synonyms from a comma-separated string into an array.
|
|
14
8
|
*
|
|
@@ -16,9 +10,9 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
|
|
|
16
10
|
*
|
|
17
11
|
* @returns {Array} An array with all synonyms.
|
|
18
12
|
*/
|
|
19
|
-
function
|
|
13
|
+
export default function (synonyms) {
|
|
20
14
|
let synonymsSplit = synonyms.split(",");
|
|
21
|
-
synonymsSplit = synonymsSplit.map(synonym => (
|
|
15
|
+
synonymsSplit = synonymsSplit.map(synonym => removePunctuationExceptQuotes(stripSpaces(synonym))).filter(synonym => synonym);
|
|
22
16
|
return synonymsSplit;
|
|
23
17
|
}
|
|
24
18
|
//# sourceMappingURL=parseSynonyms.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parseSynonyms.js","names":["
|
|
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":[]}
|