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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"specialCharacterMappings.js","names":["_lodash","require","_getWords","_interopRequireDefault","e","__esModule","default","getIndicesOfWords","text","indices","words","getWords","startSearchFrom","forEach","word","currentIndex","indexOf","push","length","getIndicesOfCharacter","characterToFind","i","arraysDifference","bigArray","subarray","filter","element","includes","arraysOverlap","firstArray","secondArray","combinations","collection","acc","xs","array","x","l","concat","slice","replaceCharactersByIndex","substitute","modifiedTextSplitByLetter","split","index","splice","join","replaceTurkishIs","indicesOfAllIs","sort","indicesOfIsInWordBeginnings","results","combinationsDottedI","oneCombinationDottedI","isEqual","indicesNotDottedI","combinationsDotlessI","oneCombinationDotlessI","indicesSmalli","combinationsDottedi","oneCombinationDottedi","oneCombinationDotlessi","textAlternations","result","toDottedI","toDotlessI","toDottedi","toDotlessi","replaceTurkishIsMemoized","exports","memoize"],"sources":["../../../../src/languageProcessing/helpers/transliterate/specialCharacterMappings.js"],"sourcesContent":["import { filter, includes, isEqual, memoize } from \"lodash\";\nimport getWords from \"../word/getWords\";\n\n/**\n * Gets positions of the first character of a word in the input text.\n *\n * @param {string} text The original text, for which the indices of word beginnings need to be determined.\n *\n * @returns {Array} indices The array of indices in the text at which words start.\n */\nfunction getIndicesOfWords( text ) {\n\tconst indices = [];\n\tconst words = getWords( text );\n\tlet startSearchFrom = 0;\n\n\twords.forEach( function( word ) {\n\t\tconst currentIndex = text.indexOf( word, startSearchFrom );\n\t\tindices.push( currentIndex );\n\t\tstartSearchFrom = currentIndex + word.length;\n\t} );\n\n\treturn indices;\n}\n\n\n/**\n * Gets indices of a specific character in the input text.\n *\n * @param {string} text The original text, for which the indices of specific characters have to be determined.\n * @param {string} characterToFind The character that needs to be found in the text.\n *\n * @returns {Array} indices The array of indices in the text at which the characterToFind occurs.\n */\nfunction getIndicesOfCharacter( text, characterToFind ) {\n\tconst indices = [];\n\n\tif ( text.indexOf( characterToFind ) > -1 ) {\n\t\tfor ( let i = 0; i < text.length; i++ ) {\n\t\t\tif ( text[ i ] === characterToFind ) {\n\t\t\t\tindices.push( i );\n\t\t\t}\n\t\t}\n\t}\n\n\treturn indices;\n}\n\n/**\n * Compares two arrays of which the second array is the sub-array of the first array.\n * Returns the array of elements of the first array which are not in the second array.\n *\n * @param {Array} bigArray The array with all elements.\n * @param {Array} subarray The array with some elements from the bigArray.\n *\n * @returns {Array} difference An array of all elements of bigArray which are not in subarray.\n */\nfunction arraysDifference( bigArray, subarray ) {\n\treturn filter( bigArray, function( element ) {\n\t\treturn ( ! includes( subarray, element ) );\n\t} );\n}\n\n/**\n * Compares two arrays and returns the array of elements that occur in both arrays.\n *\n * @param {Array} firstArray The first array with elements to compare.\n * @param {Array} secondArray The second array with elements to compare.\n *\n * @returns {Array} overlap An array of all elements of firstArray which are also in secondArray.\n */\nfunction arraysOverlap( firstArray, secondArray ) {\n\treturn filter( firstArray, function( element ) {\n\t\treturn ( includes( secondArray, element ) );\n\t} );\n}\n\n\n/**\n * Generates all possible combinations of the elements of an array (treated as unique).\n * https://gist.github.com/jpillora/4435759\n *\n * @param {Array} collection The array with elements that should be combined.\n *\n * @returns {Array} result An array of all possible combinations of elements of the original array.\n */\nfunction combinations( collection ) {\n\t/**\n\t * A recursive function that iterates through all elements of an array to produce its combinations.\n\t *\n\t * @param {Array} xs The array to start accumulating with.\n\t * @param {Array} array The array with elements that should be combined.\n\t *\n\t * @returns {Array} result An array of all possible combinations of elements of the original array.\n\t */\n\tfunction acc( xs, array ) {\n\t\tconst x = xs[ 0 ];\n\n\t\tif ( typeof x === \"undefined\" ) {\n\t\t\treturn array;\n\t\t}\n\n\t\tfor ( let i = 0, l = array.length; i < l; ++i ) {\n\t\t\tarray.push( array[ i ].concat( x ) );\n\t\t}\n\t\treturn acc( xs.slice( 1 ), array );\n\t}\n\treturn acc( collection, [ [ ] ] ).slice( 1 ).concat( [ [] ] );\n}\n\n\n/**\n * Replaces characters on specified indices in the input text.\n *\n * @param {string} text The original text, for which the characters have to be substituted.\n * @param {Array} indices The array of indices that have to be substituted.\n * @param {string} substitute The character that is used to substitute in the text.\n *\n * @returns {string} result The string of the original text with the characters on specified indices are substituted with the substitute character.\n */\nfunction replaceCharactersByIndex( text, indices, substitute ) {\n\tconst modifiedTextSplitByLetter = text.split( \"\" );\n\n\tindices.forEach( function( index ) {\n\t\tmodifiedTextSplitByLetter.splice( index, 1, substitute );\n\t} );\n\n\treturn modifiedTextSplitByLetter.join( \"\" );\n}\n\n/**\n * Generates upper and lower case for Turkish strings that contain characters İ or ı, which appear to not be processed correctly by regexes.\n *\n * @param {string} text The text to build possible upper and lower case alternatives.\n *\n * @returns {Array} An array of strings that contains all possible upper and lower case alternatives of the original string\n */\nfunction replaceTurkishIs( text ) {\n\t// Get indices of all occurrences of İ, I, i, or ı.\n\tconst indicesOfAllIs = getIndicesOfCharacter( text, \"İ\" ).concat(\n\t\tgetIndicesOfCharacter( text, \"I\" ),\n\t\tgetIndicesOfCharacter( text, \"i\" ),\n\t\tgetIndicesOfCharacter( text, \"ı\" )\n\t);\n\tindicesOfAllIs.sort();\n\n\t// If there are no Is return the text\n\tif ( indicesOfAllIs.length === 0 ) {\n\t\treturn [ text ];\n\t}\n\tconst indicesOfIsInWordBeginnings = arraysOverlap( getIndicesOfWords( text ), indicesOfAllIs );\n\n\tconst results = [];\n\n\t// First round of creating combinations: assign which indices will be replaced by İ\n\tconst combinationsDottedI = combinations( indicesOfIsInWordBeginnings );\n\n\tcombinationsDottedI.forEach( function( oneCombinationDottedI ) {\n\t\t// If the combination is full array, just add it to results immediately without going through the rest of iterations.\n\t\tif ( isEqual( oneCombinationDottedI, indicesOfIsInWordBeginnings ) ) {\n\t\t\tresults.push( [ oneCombinationDottedI, [], [], [] ] );\n\t\t} else {\n\t\t\tconst indicesNotDottedI = arraysDifference( indicesOfIsInWordBeginnings, oneCombinationDottedI );\n\n\t\t\t// Second round of creating combinations: assign which indices will be replaced by I\n\t\t\tconst combinationsDotlessI = combinations( indicesNotDottedI );\n\t\t\tcombinationsDotlessI.forEach( function( oneCombinationDotlessI ) {\n\t\t\t\t// If the combination is full array, just add it to results immediately without going through the rest of iterations.\n\t\t\t\tif ( isEqual( oneCombinationDotlessI, indicesNotDottedI ) ) {\n\t\t\t\t\tresults.push( [ oneCombinationDottedI, oneCombinationDotlessI, [], [] ] );\n\t\t\t\t} else {\n\t\t\t\t\tconst indicesSmalli = arraysDifference( indicesNotDottedI, oneCombinationDotlessI );\n\n\t\t\t\t\t// Third round of creating combinations: assign which indices will be replaced by i\n\t\t\t\t\tconst combinationsDottedi = combinations( indicesSmalli );\n\n\t\t\t\t\tcombinationsDottedi.forEach( function( oneCombinationDottedi ) {\n\t\t\t\t\t\t// If the combination is full array, just add it to results immediately without going through the rest of iterations.\n\t\t\t\t\t\tif ( isEqual( oneCombinationDottedi, indicesSmalli ) ) {\n\t\t\t\t\t\t\tresults.push( [ oneCombinationDottedI, oneCombinationDotlessI, oneCombinationDottedi, [] ] );\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tconst oneCombinationDotlessi = arraysDifference( indicesSmalli, oneCombinationDottedi );\n\n\t\t\t\t\t\t\tresults.push( [ oneCombinationDottedI, oneCombinationDotlessI, oneCombinationDottedi, oneCombinationDotlessi ] );\n\t\t\t\t\t\t}\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\t} );\n\n\tconst textAlternations = [];\n\n\tresults.forEach( function( result ) {\n\t\tconst toDottedI = replaceCharactersByIndex( text, result[ 0 ], \"İ\" );\n\t\tconst toDotlessI = replaceCharactersByIndex( toDottedI, result[ 1 ], \"I\" );\n\t\tconst toDottedi = replaceCharactersByIndex( toDotlessI, result[ 2 ], \"i\" );\n\t\tconst toDotlessi = replaceCharactersByIndex( toDottedi, result[ 3 ], \"ı\" );\n\t\ttextAlternations.push( toDotlessi );\n\t} );\n\n\treturn textAlternations;\n}\n\nconst replaceTurkishIsMemoized = memoize( replaceTurkishIs );\n\nexport {\n\tgetIndicesOfWords,\n\tgetIndicesOfCharacter,\n\tarraysDifference,\n\tarraysOverlap,\n\tcombinations,\n\treplaceTurkishIs,\n\treplaceTurkishIsMemoized,\n};\n"],"mappings":";;;;;;;;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,SAAA,GAAAC,sBAAA,CAAAF,OAAA;AAAwC,SAAAE,uBAAAC,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAExC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASG,iBAAiBA,CAAEC,IAAI,EAAG;EAClC,MAAMC,OAAO,GAAG,EAAE;EAClB,MAAMC,KAAK,GAAG,IAAAC,iBAAQ,EAAEH,IAAK,CAAC;EAC9B,IAAII,eAAe,GAAG,CAAC;EAEv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IAAAE,eAAO,EAAEvB,gBAAiB,CAAC","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"specialCharacterMappings.js","names":["filter","includes","isEqual","memoize","getWords","getIndicesOfWords","text","indices","words","startSearchFrom","forEach","word","currentIndex","indexOf","push","length","getIndicesOfCharacter","characterToFind","i","arraysDifference","bigArray","subarray","element","arraysOverlap","firstArray","secondArray","combinations","collection","acc","xs","array","x","l","concat","slice","replaceCharactersByIndex","substitute","modifiedTextSplitByLetter","split","index","splice","join","replaceTurkishIs","indicesOfAllIs","sort","indicesOfIsInWordBeginnings","results","combinationsDottedI","oneCombinationDottedI","indicesNotDottedI","combinationsDotlessI","oneCombinationDotlessI","indicesSmalli","combinationsDottedi","oneCombinationDottedi","oneCombinationDotlessi","textAlternations","result","toDottedI","toDotlessI","toDottedi","toDotlessi","replaceTurkishIsMemoized"],"sources":["../../../../src/languageProcessing/helpers/transliterate/specialCharacterMappings.js"],"sourcesContent":["import { filter, includes, isEqual, memoize } from \"lodash\";\nimport getWords from \"../word/getWords\";\n\n/**\n * Gets positions of the first character of a word in the input text.\n *\n * @param {string} text The original text, for which the indices of word beginnings need to be determined.\n *\n * @returns {Array} indices The array of indices in the text at which words start.\n */\nfunction getIndicesOfWords( text ) {\n\tconst indices = [];\n\tconst words = getWords( text );\n\tlet startSearchFrom = 0;\n\n\twords.forEach( function( word ) {\n\t\tconst currentIndex = text.indexOf( word, startSearchFrom );\n\t\tindices.push( currentIndex );\n\t\tstartSearchFrom = currentIndex + word.length;\n\t} );\n\n\treturn indices;\n}\n\n\n/**\n * Gets indices of a specific character in the input text.\n *\n * @param {string} text The original text, for which the indices of specific characters have to be determined.\n * @param {string} characterToFind The character that needs to be found in the text.\n *\n * @returns {Array} indices The array of indices in the text at which the characterToFind occurs.\n */\nfunction getIndicesOfCharacter( text, characterToFind ) {\n\tconst indices = [];\n\n\tif ( text.indexOf( characterToFind ) > -1 ) {\n\t\tfor ( let i = 0; i < text.length; i++ ) {\n\t\t\tif ( text[ i ] === characterToFind ) {\n\t\t\t\tindices.push( i );\n\t\t\t}\n\t\t}\n\t}\n\n\treturn indices;\n}\n\n/**\n * Compares two arrays of which the second array is the sub-array of the first array.\n * Returns the array of elements of the first array which are not in the second array.\n *\n * @param {Array} bigArray The array with all elements.\n * @param {Array} subarray The array with some elements from the bigArray.\n *\n * @returns {Array} difference An array of all elements of bigArray which are not in subarray.\n */\nfunction arraysDifference( bigArray, subarray ) {\n\treturn filter( bigArray, function( element ) {\n\t\treturn ( ! includes( subarray, element ) );\n\t} );\n}\n\n/**\n * Compares two arrays and returns the array of elements that occur in both arrays.\n *\n * @param {Array} firstArray The first array with elements to compare.\n * @param {Array} secondArray The second array with elements to compare.\n *\n * @returns {Array} overlap An array of all elements of firstArray which are also in secondArray.\n */\nfunction arraysOverlap( firstArray, secondArray ) {\n\treturn filter( firstArray, function( element ) {\n\t\treturn ( includes( secondArray, element ) );\n\t} );\n}\n\n\n/**\n * Generates all possible combinations of the elements of an array (treated as unique).\n * https://gist.github.com/jpillora/4435759\n *\n * @param {Array} collection The array with elements that should be combined.\n *\n * @returns {Array} result An array of all possible combinations of elements of the original array.\n */\nfunction combinations( collection ) {\n\t/**\n\t * A recursive function that iterates through all elements of an array to produce its combinations.\n\t *\n\t * @param {Array} xs The array to start accumulating with.\n\t * @param {Array} array The array with elements that should be combined.\n\t *\n\t * @returns {Array} result An array of all possible combinations of elements of the original array.\n\t */\n\tfunction acc( xs, array ) {\n\t\tconst x = xs[ 0 ];\n\n\t\tif ( typeof x === \"undefined\" ) {\n\t\t\treturn array;\n\t\t}\n\n\t\tfor ( let i = 0, l = array.length; i < l; ++i ) {\n\t\t\tarray.push( array[ i ].concat( x ) );\n\t\t}\n\t\treturn acc( xs.slice( 1 ), array );\n\t}\n\treturn acc( collection, [ [ ] ] ).slice( 1 ).concat( [ [] ] );\n}\n\n\n/**\n * Replaces characters on specified indices in the input text.\n *\n * @param {string} text The original text, for which the characters have to be substituted.\n * @param {Array} indices The array of indices that have to be substituted.\n * @param {string} substitute The character that is used to substitute in the text.\n *\n * @returns {string} result The string of the original text with the characters on specified indices are substituted with the substitute character.\n */\nfunction replaceCharactersByIndex( text, indices, substitute ) {\n\tconst modifiedTextSplitByLetter = text.split( \"\" );\n\n\tindices.forEach( function( index ) {\n\t\tmodifiedTextSplitByLetter.splice( index, 1, substitute );\n\t} );\n\n\treturn modifiedTextSplitByLetter.join( \"\" );\n}\n\n/**\n * Generates upper and lower case for Turkish strings that contain characters İ or ı, which appear to not be processed correctly by regexes.\n *\n * @param {string} text The text to build possible upper and lower case alternatives.\n *\n * @returns {Array} An array of strings that contains all possible upper and lower case alternatives of the original string\n */\nfunction replaceTurkishIs( text ) {\n\t// Get indices of all occurrences of İ, I, i, or ı.\n\tconst indicesOfAllIs = getIndicesOfCharacter( text, \"İ\" ).concat(\n\t\tgetIndicesOfCharacter( text, \"I\" ),\n\t\tgetIndicesOfCharacter( text, \"i\" ),\n\t\tgetIndicesOfCharacter( text, \"ı\" )\n\t);\n\tindicesOfAllIs.sort();\n\n\t// If there are no Is return the text\n\tif ( indicesOfAllIs.length === 0 ) {\n\t\treturn [ text ];\n\t}\n\tconst indicesOfIsInWordBeginnings = arraysOverlap( getIndicesOfWords( text ), indicesOfAllIs );\n\n\tconst results = [];\n\n\t// First round of creating combinations: assign which indices will be replaced by İ\n\tconst combinationsDottedI = combinations( indicesOfIsInWordBeginnings );\n\n\tcombinationsDottedI.forEach( function( oneCombinationDottedI ) {\n\t\t// If the combination is full array, just add it to results immediately without going through the rest of iterations.\n\t\tif ( isEqual( oneCombinationDottedI, indicesOfIsInWordBeginnings ) ) {\n\t\t\tresults.push( [ oneCombinationDottedI, [], [], [] ] );\n\t\t} else {\n\t\t\tconst indicesNotDottedI = arraysDifference( indicesOfIsInWordBeginnings, oneCombinationDottedI );\n\n\t\t\t// Second round of creating combinations: assign which indices will be replaced by I\n\t\t\tconst combinationsDotlessI = combinations( indicesNotDottedI );\n\t\t\tcombinationsDotlessI.forEach( function( oneCombinationDotlessI ) {\n\t\t\t\t// If the combination is full array, just add it to results immediately without going through the rest of iterations.\n\t\t\t\tif ( isEqual( oneCombinationDotlessI, indicesNotDottedI ) ) {\n\t\t\t\t\tresults.push( [ oneCombinationDottedI, oneCombinationDotlessI, [], [] ] );\n\t\t\t\t} else {\n\t\t\t\t\tconst indicesSmalli = arraysDifference( indicesNotDottedI, oneCombinationDotlessI );\n\n\t\t\t\t\t// Third round of creating combinations: assign which indices will be replaced by i\n\t\t\t\t\tconst combinationsDottedi = combinations( indicesSmalli );\n\n\t\t\t\t\tcombinationsDottedi.forEach( function( oneCombinationDottedi ) {\n\t\t\t\t\t\t// If the combination is full array, just add it to results immediately without going through the rest of iterations.\n\t\t\t\t\t\tif ( isEqual( oneCombinationDottedi, indicesSmalli ) ) {\n\t\t\t\t\t\t\tresults.push( [ oneCombinationDottedI, oneCombinationDotlessI, oneCombinationDottedi, [] ] );\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tconst oneCombinationDotlessi = arraysDifference( indicesSmalli, oneCombinationDottedi );\n\n\t\t\t\t\t\t\tresults.push( [ oneCombinationDottedI, oneCombinationDotlessI, oneCombinationDottedi, oneCombinationDotlessi ] );\n\t\t\t\t\t\t}\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\t} );\n\n\tconst textAlternations = [];\n\n\tresults.forEach( function( result ) {\n\t\tconst toDottedI = replaceCharactersByIndex( text, result[ 0 ], \"İ\" );\n\t\tconst toDotlessI = replaceCharactersByIndex( toDottedI, result[ 1 ], \"I\" );\n\t\tconst toDottedi = replaceCharactersByIndex( toDotlessI, result[ 2 ], \"i\" );\n\t\tconst toDotlessi = replaceCharactersByIndex( toDottedi, result[ 3 ], \"ı\" );\n\t\ttextAlternations.push( toDotlessi );\n\t} );\n\n\treturn textAlternations;\n}\n\nconst replaceTurkishIsMemoized = memoize( replaceTurkishIs );\n\nexport {\n\tgetIndicesOfWords,\n\tgetIndicesOfCharacter,\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MG,SAAS,GAAGzB,wBAAwB,CAAEwB,UAAU,EAAEF,MAAM,CAAE,CAAC,CAAE,EAAE,GAAI,CAAC;IAC1E,MAAMI,UAAU,GAAG1B,wBAAwB,CAAEyB,SAAS,EAAEH,MAAM,CAAE,CAAC,CAAE,EAAE,GAAI,CAAC;IAC1ED,gBAAgB,CAAC1C,IAAI,CAAE+C,UAAW,CAAC;EACpC,CAAE,CAAC;EAEH,OAAOL,gBAAgB;AACxB;AAEA,MAAMM,wBAAwB,GAAG3D,OAAO,CAAEuC,gBAAiB,CAAC;AAE5D,SACCrC,iBAAiB,EACjBW,qBAAqB,EACrBG,gBAAgB,EAChBI,aAAa,EACbG,YAAY,EACZgB,gBAAgB,EAChBoB,wBAAwB","ignoreList":[]}
|
|
@@ -1,11 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
import transliterationsMap from "../../../config/getTransliterations.js";
|
|
2
2
|
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = _default;
|
|
7
|
-
var _getTransliterations = _interopRequireDefault(require("../../../config/getTransliterations.js"));
|
|
8
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
9
3
|
/**
|
|
10
4
|
* Replaces all special characters from the text based on the transliterations map.
|
|
11
5
|
*
|
|
@@ -14,8 +8,8 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
|
|
|
14
8
|
*
|
|
15
9
|
* @returns {string} The text with all special characters replaced.
|
|
16
10
|
*/
|
|
17
|
-
function
|
|
18
|
-
const map = (
|
|
11
|
+
export default function (text, locale) {
|
|
12
|
+
const map = transliterationsMap(locale);
|
|
19
13
|
for (let i = 0; i < map.length; i++) {
|
|
20
14
|
text = text.replace(map[i].letter, map[i].alternative);
|
|
21
15
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transliterate.js","names":["
|
|
1
|
+
{"version":3,"file":"transliterate.js","names":["transliterationsMap","text","locale","map","i","length","replace","letter","alternative"],"sources":["../../../../src/languageProcessing/helpers/transliterate/transliterate.js"],"sourcesContent":["import transliterationsMap from \"../../../config/getTransliterations.js\";\n\n/**\n * Replaces all special characters from the text based on the transliterations map.\n *\n * @param {string} text The text to remove special characters from.\n * @param {string} locale The locale.\n *\n * @returns {string} The text with all special characters replaced.\n */\nexport default function( text, locale ) {\n\tconst map = transliterationsMap( locale );\n\tfor ( let i = 0; i < map.length; i++ ) {\n\t\ttext = text.replace(\n\t\t\tmap[ i ].letter,\n\t\t\tmap[ i ].alternative\n\t\t);\n\t}\n\treturn text;\n}\n"],"mappings":"AAAA,OAAOA,mBAAmB;;AAE1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,UAAUC,IAAI,EAAEC,MAAM,EAAG;EACvC,MAAMC,GAAG,GAAGH,mBAAmB,CAAEE,MAAO,CAAC;EACzC,KAAM,IAAIE,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAGD,GAAG,CAACE,MAAM,EAAED,CAAC,EAAE,EAAG;IACtCH,IAAI,GAAGA,IAAI,CAACK,OAAO,CAClBH,GAAG,CAAEC,CAAC,CAAE,CAACG,MAAM,EACfJ,GAAG,CAAEC,CAAC,CAAE,CAACI,WACV,CAAC;EACF;EACA,OAAOP,IAAI;AACZ","ignoreList":[]}
|
|
@@ -1,11 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
import transliterationsMap from "../../../config/transliterationsWPstyle.js";
|
|
2
2
|
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = _default;
|
|
7
|
-
var _transliterationsWPstyle = _interopRequireDefault(require("../../../config/transliterationsWPstyle.js"));
|
|
8
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
9
3
|
/**
|
|
10
4
|
* Replaces all special characters from the text based on the transliterations map specific for WP
|
|
11
5
|
* (and different from the one used by YoastSEO.js).
|
|
@@ -15,8 +9,8 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
|
|
|
15
9
|
*
|
|
16
10
|
* @returns {string} The text with all special characters replaced.
|
|
17
11
|
*/
|
|
18
|
-
function
|
|
19
|
-
const map = (
|
|
12
|
+
export default function (text, locale) {
|
|
13
|
+
const map = transliterationsMap(locale);
|
|
20
14
|
for (let i = map.length - 1; i >= 0; i--) {
|
|
21
15
|
text = text.replace(map[i].letter, map[i].alternative);
|
|
22
16
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transliterateWPstyle.js","names":["
|
|
1
|
+
{"version":3,"file":"transliterateWPstyle.js","names":["transliterationsMap","text","locale","map","i","length","replace","letter","alternative"],"sources":["../../../../src/languageProcessing/helpers/transliterate/transliterateWPstyle.js"],"sourcesContent":["import transliterationsMap from \"../../../config/transliterationsWPstyle.js\";\n\n/**\n * Replaces all special characters from the text based on the transliterations map specific for WP\n * (and different from the one used by YoastSEO.js).\n *\n * @param {string} text The text to remove special characters from.\n * @param {string} locale The locale.\n *\n * @returns {string} The text with all special characters replaced.\n */\nexport default function( text, locale ) {\n\tconst map = transliterationsMap( locale );\n\tfor ( let i = map.length - 1; i >= 0; i-- ) {\n\t\ttext = text.replace(\n\t\t\tmap[ i ].letter,\n\t\t\tmap[ i ].alternative\n\t\t);\n\t}\n\treturn text;\n}\n"],"mappings":"AAAA,OAAOA,mBAAmB;;AAE1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,UAAUC,IAAI,EAAEC,MAAM,EAAG;EACvC,MAAMC,GAAG,GAAGH,mBAAmB,CAAEE,MAAO,CAAC;EACzC,KAAM,IAAIE,CAAC,GAAGD,GAAG,CAACE,MAAM,GAAG,CAAC,EAAED,CAAC,IAAI,CAAC,EAAEA,CAAC,EAAE,EAAG;IAC3CH,IAAI,GAAGA,IAAI,CAACK,OAAO,CAClBH,GAAG,CAAEC,CAAC,CAAE,CAACG,MAAM,EACfJ,GAAG,CAAEC,CAAC,CAAE,CAACI,WACV,CAAC;EACF;EACA,OAAOP,IAAI;AACZ","ignoreList":[]}
|
|
@@ -1,9 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = _default;
|
|
7
1
|
/**
|
|
8
2
|
* Parses the slug by transforming hyphens and underscores into white space.
|
|
9
3
|
*
|
|
@@ -11,7 +5,7 @@ exports.default = _default;
|
|
|
11
5
|
*
|
|
12
6
|
* @returns {string} The parsed slug.
|
|
13
7
|
*/
|
|
14
|
-
function
|
|
8
|
+
export default function (slug) {
|
|
15
9
|
return slug.replace(/[-_]/ig, " ");
|
|
16
10
|
}
|
|
17
11
|
//# sourceMappingURL=parseSlug.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parseSlug.js","names":["
|
|
1
|
+
{"version":3,"file":"parseSlug.js","names":["slug","replace"],"sources":["../../../../src/languageProcessing/helpers/url/parseSlug.js"],"sourcesContent":["/**\n * Parses the slug by transforming hyphens and underscores into white space.\n *\n * @param {string} slug The slug to parse\n *\n * @returns {string} The parsed slug.\n */\nexport default function( slug ) {\n\treturn slug.replace( /[-_]/ig, \" \" );\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,UAAUA,IAAI,EAAG;EAC/B,OAAOA,IAAI,CAACC,OAAO,CAAE,QAAQ,EAAE,GAAI,CAAC;AACrC","ignoreList":[]}
|
|
@@ -1,12 +1,6 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
var _url = _interopRequireDefault(require("url"));
|
|
8
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
9
1
|
const urlFromAnchorRegex = /href=(["'])([^"']+)\1/i;
|
|
2
|
+
import urlMethods from "url";
|
|
3
|
+
|
|
10
4
|
/**
|
|
11
5
|
* Removes a hash from a URL, assumes a well formed URL.
|
|
12
6
|
*
|
|
@@ -80,7 +74,7 @@ function areEqual(urlA, urlB) {
|
|
|
80
74
|
* @returns {string} The domain name of the URL.
|
|
81
75
|
*/
|
|
82
76
|
function getHostname(url) {
|
|
83
|
-
url =
|
|
77
|
+
url = urlMethods.parse(url);
|
|
84
78
|
return url.hostname;
|
|
85
79
|
}
|
|
86
80
|
|
|
@@ -93,7 +87,7 @@ function getHostname(url) {
|
|
|
93
87
|
* @returns {string|null} The protocol of the URL or null if no protocol is present.
|
|
94
88
|
*/
|
|
95
89
|
function getProtocol(url) {
|
|
96
|
-
return
|
|
90
|
+
return urlMethods.parse(url).protocol;
|
|
97
91
|
}
|
|
98
92
|
|
|
99
93
|
/**
|
|
@@ -105,7 +99,7 @@ function getProtocol(url) {
|
|
|
105
99
|
* @returns {boolean} Whether or not the anchor URL is internal.
|
|
106
100
|
*/
|
|
107
101
|
function isInternalLink(anchorUrl, siteUrlOrDomain) {
|
|
108
|
-
const parsedAnchorUrl =
|
|
102
|
+
const parsedAnchorUrl = urlMethods.parse(anchorUrl, false, true);
|
|
109
103
|
const anchorUrlHostName = parsedAnchorUrl.hostname;
|
|
110
104
|
|
|
111
105
|
// Check if the anchor URL starts with a single slash.
|
|
@@ -129,7 +123,7 @@ function isInternalLink(anchorUrl, siteUrlOrDomain) {
|
|
|
129
123
|
}
|
|
130
124
|
|
|
131
125
|
// If the siteUrlOrDomain variable is a URL and it shares the hostname with the anchor URL, it's an internal link.
|
|
132
|
-
const parsedSiteUrlOrDomain =
|
|
126
|
+
const parsedSiteUrlOrDomain = urlMethods.parse(siteUrlOrDomain);
|
|
133
127
|
const siteUrlOrDomainHostName = parsedSiteUrlOrDomain.hostname;
|
|
134
128
|
return anchorUrlHostName === siteUrlOrDomainHostName;
|
|
135
129
|
}
|
|
@@ -158,7 +152,7 @@ function protocolIsHttpScheme(protocol) {
|
|
|
158
152
|
function isRelativeFragmentURL(url) {
|
|
159
153
|
return url.indexOf("#") === 0;
|
|
160
154
|
}
|
|
161
|
-
|
|
155
|
+
export default {
|
|
162
156
|
removeHash: removeHash,
|
|
163
157
|
removeQueryArgs: removeQueryArgs,
|
|
164
158
|
removeTrailingSlash: removeTrailingSlash,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"url.js","names":["
|
|
1
|
+
{"version":3,"file":"url.js","names":["urlFromAnchorRegex","urlMethods","removeHash","url","split","removeQueryArgs","removeTrailingSlash","replace","addTrailingSlash","getFromAnchorTag","anchorTag","urlMatch","exec","areEqual","urlA","urlB","getHostname","parse","hostname","getProtocol","protocol","isInternalLink","anchorUrl","siteUrlOrDomain","parsedAnchorUrl","anchorUrlHostName","indexOf","parsedSiteUrlOrDomain","siteUrlOrDomainHostName","protocolIsHttpScheme","isRelativeFragmentURL"],"sources":["../../../../src/languageProcessing/helpers/url/url.js"],"sourcesContent":["const urlFromAnchorRegex = /href=([\"'])([^\"']+)\\1/i;\nimport urlMethods from \"url\";\n\n/**\n * Removes a hash from a URL, assumes a well formed URL.\n *\n * @param {string} url The URL to remove a hash from.\n * @returns {string} The URL without the hash.\n */\nfunction removeHash( url ) {\n\treturn url.split( \"#\" )[ 0 ];\n}\n\n/**\n * Removes all query args from a URL, assumes a well formed URL.\n *\n * @param {string} url The URL to remove the query args from.\n * @returns {string} The URL without the query args.\n */\nfunction removeQueryArgs( url ) {\n\treturn url.split( \"?\" )[ 0 ];\n}\n\n/**\n * Removes the trailing slash of a URL.\n *\n * @param {string} url The URL to remove the trailing slash from.\n * @returns {string} A URL without a trailing slash.\n */\nfunction removeTrailingSlash( url ) {\n\treturn url.replace( /\\/$/, \"\" );\n}\n\n/**\n * Adds a trailing slash to a URL if it is not present.\n *\n * @param {string} url The URL to add a trailing slash to.\n * @returns {string} A URL with a trailing slash.\n */\nfunction addTrailingSlash( url ) {\n\treturn removeTrailingSlash( url ) + \"/\";\n}\n\n/**\n * Retrieves the URL from an anchor tag.\n *\n * @param {string} anchorTag An anchor tag.\n * @returns {string} The URL in the anchor tag.\n */\nfunction getFromAnchorTag( anchorTag ) {\n\tconst urlMatch = urlFromAnchorRegex.exec( anchorTag );\n\n\treturn ( urlMatch === null ) ? \"\" : urlMatch[ 2 ];\n}\n\n/**\n * Returns whether or not the given URLs are equal.\n *\n * @param {string} urlA The first URL to compare.\n * @param {string} urlB The second URL to compare.\n *\n * @returns {boolean} Whether or not the given URLs are equal.\n */\nfunction areEqual( urlA, urlB ) {\n\t// Make sure we are comparing URLs without query arguments and hashes.\n\turlA = removeQueryArgs( removeHash( urlA ) );\n\turlB = removeQueryArgs( removeHash( urlB ) );\n\n\treturn addTrailingSlash( urlA ) === addTrailingSlash( urlB );\n}\n\n/**\n * Returns the domain name of a URL.\n *\n * @param {string} url The URL to retrieve the domain name of.\n * @returns {string} The domain name of the URL.\n */\nfunction getHostname( url ) {\n\turl = urlMethods.parse( url );\n\n\treturn url.hostname;\n}\n\n/**\n * Returns the protocol of a URL.\n *\n * Note that the colon (http:) is also part of the protocol, conform to node's url.parse api.\n *\n * @param {string} url The URL to retrieve the protocol of.\n * @returns {string|null} The protocol of the URL or null if no protocol is present.\n */\nfunction getProtocol( url ) {\n\treturn urlMethods.parse( url ).protocol;\n}\n\n/**\n * Determine whether an anchor URL is internal.\n *\n * @param {string} anchorUrl \t\tThe anchor URL to test.\n * @param {string} siteUrlOrDomain The current site's URL or domain.\n *\n * @returns {boolean} Whether or not the anchor URL is internal.\n */\nfunction isInternalLink( anchorUrl, siteUrlOrDomain ) {\n\tconst parsedAnchorUrl = urlMethods.parse( anchorUrl, false, true );\n\tconst anchorUrlHostName = parsedAnchorUrl.hostname;\n\n\t// Check if the anchor URL starts with a single slash.\n\tif ( anchorUrl.indexOf( \"//\" ) === -1 && anchorUrl.indexOf( \"/\" ) === 0 ) {\n\t\treturn true;\n\t}\n\n\t// Check if the anchor URL starts with a # indicating a fragment.\n\tif ( anchorUrl.indexOf( \"#\" ) === 0 ) {\n\t\treturn false;\n\t}\n\n\t// No host of the anchor URL indicates an internal link.\n\tif ( ! anchorUrlHostName ) {\n\t\treturn true;\n\t}\n\n\t// If the siteUrlOrDomain variable is a domain, it would be idential to the anchor URL's hostname in case of an internal link.\n\tif ( anchorUrlHostName === siteUrlOrDomain ) {\n\t\treturn true;\n\t}\n\n\t// If the siteUrlOrDomain variable is a URL and it shares the hostname with the anchor URL, it's an internal link.\n\tconst parsedSiteUrlOrDomain = urlMethods.parse( siteUrlOrDomain );\n\tconst siteUrlOrDomainHostName = parsedSiteUrlOrDomain.hostname;\n\treturn anchorUrlHostName === siteUrlOrDomainHostName;\n}\n\n/**\n * Checks whether the protocol is either HTTP: or HTTPS:.\n *\n * @param {string} protocol The protocol to test.\n *\n * @returns {boolean} Whether the protocol is http(s):.\n */\nfunction protocolIsHttpScheme( protocol ) {\n\tif ( ! protocol ) {\n\t\treturn false;\n\t}\n\n\treturn ( protocol === \"http:\" || protocol === \"https:\" );\n}\n\n/**\n * Determines whether the link is a relative fragment URL.\n *\n * @param {string} url The URL to test.\n *\n * @returns {boolean} Whether the link is a relative fragment URL.\n */\nfunction isRelativeFragmentURL( url ) {\n\treturn url.indexOf( \"#\" ) === 0;\n}\n\nexport default {\n\tremoveHash: removeHash,\n\tremoveQueryArgs: removeQueryArgs,\n\tremoveTrailingSlash: removeTrailingSlash,\n\taddTrailingSlash: addTrailingSlash,\n\tgetFromAnchorTag: getFromAnchorTag,\n\tareEqual: areEqual,\n\tgetHostname: getHostname,\n\tgetProtocol: getProtocol,\n\tisInternalLink: isInternalLink,\n\tprotocolIsHttpScheme: protocolIsHttpScheme,\n\tisRelativeFragmentURL: isRelativeFragmentURL,\n};\n"],"mappings":"AAAA,MAAMA,kBAAkB,GAAG,wBAAwB;AACnD,OAAOC,UAAU,MAAM,KAAK;;AAE5B;AACA;AACA;AACA;AACA;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,GAAG,CAACuB,OAAO,CAAE,GAAI,CAAC,KAAK,CAAC;AAChC;AAEA,eAAe;EACdxB,UAAU,EAAEA,UAAU;EACtBG,eAAe,EAAEA,eAAe;EAChCC,mBAAmB,EAAEA,mBAAmB;EACxCE,gBAAgB,EAAEA,gBAAgB;EAClCC,gBAAgB,EAAEA,gBAAgB;EAClCI,QAAQ,EAAEA,QAAQ;EAClBG,WAAW,EAAEA,WAAW;EACxBG,WAAW,EAAEA,WAAW;EACxBE,cAAc,EAAEA,cAAc;EAC9BQ,oBAAoB,EAAEA,oBAAoB;EAC1CC,qBAAqB,EAAEA;AACxB,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
|
/**
|
|
8
2
|
* Returns a string that can be used in a regex to match a matchString with word boundaries.
|
|
9
3
|
*
|
|
@@ -15,7 +9,7 @@ exports.default = _default;
|
|
|
15
9
|
*
|
|
16
10
|
* @returns {string} A regex string that matches the matchString with word boundaries.
|
|
17
11
|
*/
|
|
18
|
-
function
|
|
12
|
+
export default function (matchString, positiveLookAhead = false, extraWordBoundary = "", language = "") {
|
|
19
13
|
let wordBoundary, wordBoundaryEnd;
|
|
20
14
|
if (language === "id") {
|
|
21
15
|
wordBoundary = "[ \\u00a0\\n\\r\\t.,()”“〝〞〟‟„\"+;!¡?¿:/»«‹›" + extraWordBoundary + "<>";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"addWordboundary.js","names":["
|
|
1
|
+
{"version":3,"file":"addWordboundary.js","names":["matchString","positiveLookAhead","extraWordBoundary","language","wordBoundary","wordBoundaryEnd","wordBoundaryStart"],"sources":["../../../../src/languageProcessing/helpers/word/addWordboundary.js"],"sourcesContent":["/**\n * Returns a string that can be used in a regex to match a matchString with word boundaries.\n *\n * @param {string} matchString The string to generate a regex string for.\n * @param {boolean} [positiveLookAhead=false] Boolean indicating whether or not to include a positive look ahead\n * for the word boundaries at the end.\n * @param {string} [extraWordBoundary=\"\"] Extra characters to match a word boundary on.\n * @param {string} [language=\"\"] The language used to determine the word boundary.\n *\n * @returns {string} A regex string that matches the matchString with word boundaries.\n */\nexport default function( matchString, positiveLookAhead = false, extraWordBoundary = \"\", language = \"\" ) {\n\tlet wordBoundary, wordBoundaryEnd;\n\n\tif ( language === \"id\" ) {\n\t\twordBoundary = \"[ \\\\u00a0\\\\n\\\\r\\\\t.,()”“〝〞〟‟„\\\"+;!¡?¿:/»«‹›\" + extraWordBoundary + \"<>\";\n\t} else {\n\t\t/*\n\t\t * \\u00a0 - no-break space\n\t\t * \\u2014 - em dash\n * \\u06d4 - Urdu full stop\n * \\u061f - Arabic question mark\n * \\u060C - Arabic comma\n * \\u061B - Arabic semicolon\n */\n\t\twordBoundary = \"[ \\\\u00a0\\\\u2014\\\\u06d4\\\\u061f\\\\u060C\\\\u061B\\\\n\\\\r\\\\t.,()”“〝〞〟‟„\\\"+\\\\-;!¡?¿:/»«‹›\" + extraWordBoundary + \"<>\";\n\t}\n\n\tconst wordBoundaryStart = \"(^|\" + wordBoundary + \"'‘’‛`])\";\n\tif ( positiveLookAhead ) {\n\t\twordBoundaryEnd = \"($|((?=\" + wordBoundary + \"]))|((['‘’‛`])(\" + wordBoundary + \"])))\";\n\t} else {\n\t\twordBoundaryEnd = \"($|(\" + wordBoundary + \"])|((['‘’‛`])(\" + wordBoundary + \"])))\";\n\t}\n\n\treturn wordBoundaryStart + matchString + wordBoundaryEnd;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,UAAUA,WAAW,EAAEC,iBAAiB,GAAG,KAAK,EAAEC,iBAAiB,GAAG,EAAE,EAAEC,QAAQ,GAAG,EAAE,EAAG;EACxG,IAAIC,YAAY,EAAEC,eAAe;EAEjC,IAAKF,QAAQ,KAAK,IAAI,EAAG;IACxBC,YAAY,GAAG,6CAA6C,GAAGF,iBAAiB,GAAG,IAAI;EACxF,CAAC,MAAM;IACN;AACF;AACA;AACA;AACA;AACA;AACA;AACA;IACEE,YAAY,GAAG,mFAAmF,GAAGF,iBAAiB,GAAG,IAAI;EAC9H;EAEA,MAAMI,iBAAiB,GAAG,KAAK,GAAGF,YAAY,GAAG,SAAS;EAC1D,IAAKH,iBAAiB,EAAG;IACxBI,eAAe,GAAG,SAAS,GAAGD,YAAY,GAAG,iBAAiB,GAAGA,YAAY,GAAG,MAAM;EACvF,CAAC,MAAM;IACNC,eAAe,GAAG,MAAM,GAAGD,YAAY,GAAG,gBAAgB,GAAGA,YAAY,GAAG,MAAM;EACnF;EAEA,OAAOE,iBAAiB,GAAGN,WAAW,GAAGK,eAAe;AACzD","ignoreList":[]}
|
|
@@ -1,12 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
import { filter } from "lodash";
|
|
2
|
+
import getWords from "./getWords.js";
|
|
2
3
|
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = areWordsInSentence;
|
|
7
|
-
var _lodash = require("lodash");
|
|
8
|
-
var _getWords = _interopRequireDefault(require("./getWords.js"));
|
|
9
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
10
4
|
/**
|
|
11
5
|
* Checks if one or more words of a list occur in a sentence.
|
|
12
6
|
*
|
|
@@ -14,8 +8,8 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
|
|
|
14
8
|
* @param {string} sentence The sentence to match against.
|
|
15
9
|
* @returns {Boolean} Whether the sentence contains the word.
|
|
16
10
|
*/
|
|
17
|
-
function areWordsInSentence(words, sentence) {
|
|
18
|
-
const matches =
|
|
11
|
+
export default function areWordsInSentence(words, sentence) {
|
|
12
|
+
const matches = filter(getWords(sentence), function (word) {
|
|
19
13
|
return words.includes(word.toLocaleLowerCase());
|
|
20
14
|
});
|
|
21
15
|
return matches.length !== 0;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"areWordsInSentence.js","names":["
|
|
1
|
+
{"version":3,"file":"areWordsInSentence.js","names":["filter","getWords","areWordsInSentence","words","sentence","matches","word","includes","toLocaleLowerCase","length"],"sources":["../../../../src/languageProcessing/helpers/word/areWordsInSentence.js"],"sourcesContent":["import { filter } from \"lodash\";\nimport getWords from \"./getWords.js\";\n\n/**\n * Checks if one or more words of a list occur in a sentence.\n *\n * @param {Array} words The list of words.\n * @param {string} sentence The sentence to match against.\n * @returns {Boolean} Whether the sentence contains the word.\n */\nexport default function areWordsInSentence( words, sentence ) {\n\tconst matches = filter( getWords( sentence ), function( word ) {\n\t\treturn words.includes( word.toLocaleLowerCase() );\n\t} );\n\treturn matches.length !== 0;\n}\n"],"mappings":"AAAA,SAASA,MAAM,QAAQ,QAAQ;AAC/B,OAAOC,QAAQ;;AAEf;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAASC,kBAAkBA,CAAEC,KAAK,EAAEC,QAAQ,EAAG;EAC7D,MAAMC,OAAO,GAAGL,MAAM,CAAEC,QAAQ,CAAEG,QAAS,CAAC,EAAE,UAAUE,IAAI,EAAG;IAC9D,OAAOH,KAAK,CAACI,QAAQ,CAAED,IAAI,CAACE,iBAAiB,CAAC,CAAE,CAAC;EAClD,CAAE,CAAC;EACH,OAAOH,OAAO,CAACI,MAAM,KAAK,CAAC;AAC5B","ignoreList":[]}
|
|
@@ -1,9 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = _default;
|
|
7
1
|
/**
|
|
8
2
|
* Check the length of the description.
|
|
9
3
|
*
|
|
@@ -12,7 +6,7 @@ exports.default = _default;
|
|
|
12
6
|
*
|
|
13
7
|
* @returns {number} The length of the description.
|
|
14
8
|
*/
|
|
15
|
-
function
|
|
9
|
+
export default function (date, description) {
|
|
16
10
|
let descriptionLength = description.length;
|
|
17
11
|
/* If the meta description is preceded by a date, two spaces and a hyphen (" - ") are added as well. Therefore,
|
|
18
12
|
three needs to be added to the total length. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"countMetaDescriptionLength.js","names":["
|
|
1
|
+
{"version":3,"file":"countMetaDescriptionLength.js","names":["date","description","descriptionLength","length"],"sources":["../../../../src/languageProcessing/helpers/word/countMetaDescriptionLength.js"],"sourcesContent":["/**\n * Check the length of the description.\n *\n * @param {string} date The date.\n * @param {string} description The meta description.\n *\n * @returns {number} The length of the description.\n */\nexport default function( date, description ) {\n\tlet descriptionLength = description.length;\n\t/* If the meta description is preceded by a date, two spaces and a hyphen (\" - \") are added as well. Therefore,\n\tthree needs to be added to the total length. */\n\tif ( date !== \"\" && descriptionLength > 0 ) {\n\t\tdescriptionLength += date.length + 3;\n\t}\n\n\treturn descriptionLength;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,UAAUA,IAAI,EAAEC,WAAW,EAAG;EAC5C,IAAIC,iBAAiB,GAAGD,WAAW,CAACE,MAAM;EAC1C;AACD;EACC,IAAKH,IAAI,KAAK,EAAE,IAAIE,iBAAiB,GAAG,CAAC,EAAG;IAC3CA,iBAAiB,IAAIF,IAAI,CAACG,MAAM,GAAG,CAAC;EACrC;EAEA,OAAOD,iBAAiB;AACzB","ignoreList":[]}
|
|
@@ -1,13 +1,7 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = _default;
|
|
7
|
-
var _getWords = _interopRequireDefault(require("./getWords.js"));
|
|
8
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
9
1
|
/** @module stringProcessing/countWords */
|
|
10
2
|
|
|
3
|
+
import getWords from "./getWords.js";
|
|
4
|
+
|
|
11
5
|
/**
|
|
12
6
|
* Calculates the word count of a certain text.
|
|
13
7
|
*
|
|
@@ -15,7 +9,7 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
|
|
|
15
9
|
*
|
|
16
10
|
* @returns {number} The word count of the given text.
|
|
17
11
|
*/
|
|
18
|
-
function
|
|
19
|
-
return (
|
|
12
|
+
export default function (text) {
|
|
13
|
+
return getWords(text).length;
|
|
20
14
|
}
|
|
21
15
|
//# sourceMappingURL=countWords.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"countWords.js","names":["
|
|
1
|
+
{"version":3,"file":"countWords.js","names":["getWords","text","length"],"sources":["../../../../src/languageProcessing/helpers/word/countWords.js"],"sourcesContent":["/** @module stringProcessing/countWords */\n\nimport getWords from \"./getWords.js\";\n\n/**\n * Calculates the word count of a certain text.\n *\n * @param {string} text The text to be counted.\n *\n * @returns {number} The word count of the given text.\n */\nexport default function( text ) {\n\treturn getWords( text ).length;\n}\n"],"mappings":"AAAA;;AAEA,OAAOA,QAAQ;;AAEf;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,UAAUC,IAAI,EAAG;EAC/B,OAAOD,QAAQ,CAAEC,IAAK,CAAC,CAACC,MAAM;AAC/B","ignoreList":[]}
|
|
@@ -1,11 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
import { punctuationRegexEnd, punctuationRegexStart } from "../sanitize/removePunctuation";
|
|
2
|
+
import { hashedHtmlEntitiesRegexEnd, hashedHtmlEntitiesRegexStart } from "../../../helpers/htmlEntities";
|
|
2
3
|
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
var _removePunctuation = require("../sanitize/removePunctuation");
|
|
8
|
-
var _htmlEntities = require("../../../helpers/htmlEntities");
|
|
9
4
|
/**
|
|
10
5
|
* Removes punctuation from the beginning and end of a word token, and creates separate tokens from them.
|
|
11
6
|
*
|
|
@@ -23,13 +18,13 @@ const createPunctuationTokens = rawTokens => {
|
|
|
23
18
|
|
|
24
19
|
// Add all punctuation marks that occur before the first letter of the token to the pretokens array.
|
|
25
20
|
// Also, prevent matching with a hashed HTML entity in the beginning of the token.
|
|
26
|
-
while (
|
|
21
|
+
while (punctuationRegexStart.test(token) && !hashedHtmlEntitiesRegexStart.test(token)) {
|
|
27
22
|
preTokens.push(token[0]);
|
|
28
23
|
token = token.slice(1);
|
|
29
24
|
}
|
|
30
25
|
// Add all punctuation marks that occur after the last letter of the token to the posttokens array.
|
|
31
26
|
// Also, prevent matching with a hashed HTML entity at the end of the token.
|
|
32
|
-
while (
|
|
27
|
+
while (punctuationRegexEnd.test(token) && !hashedHtmlEntitiesRegexEnd.test(token)) {
|
|
33
28
|
// Using unshift here because we are iterating from the end of the string to the beginning,
|
|
34
29
|
// and we want to keep the order of the punctuation marks.
|
|
35
30
|
// Therefore, we add them to the start of the array.
|
|
@@ -42,5 +37,5 @@ const createPunctuationTokens = rawTokens => {
|
|
|
42
37
|
});
|
|
43
38
|
return tokenTexts;
|
|
44
39
|
};
|
|
45
|
-
|
|
40
|
+
export default createPunctuationTokens;
|
|
46
41
|
//# sourceMappingURL=createPunctuationTokens.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createPunctuationTokens.js","names":["
|
|
1
|
+
{"version":3,"file":"createPunctuationTokens.js","names":["punctuationRegexEnd","punctuationRegexStart","hashedHtmlEntitiesRegexEnd","hashedHtmlEntitiesRegexStart","createPunctuationTokens","rawTokens","tokenTexts","forEach","token","preTokens","postTokens","test","push","slice","unshift","length","currentTokens","filter","x"],"sources":["../../../../src/languageProcessing/helpers/word/createPunctuationTokens.js"],"sourcesContent":["import { punctuationRegexEnd, punctuationRegexStart } from \"../sanitize/removePunctuation\";\nimport { hashedHtmlEntitiesRegexEnd, hashedHtmlEntitiesRegexStart } from \"../../../helpers/htmlEntities\";\n\n/**\n * Removes punctuation from the beginning and end of a word token, and creates separate tokens from them.\n *\n * @param {string[]} rawTokens\tThe tokens that may contain punctuation at the beginning and end of words.\n *\n * @returns {string[]} The tokens with the punctuation moved into separate tokens.\n */\nconst createPunctuationTokens = ( rawTokens ) => {\n\tconst tokenTexts = [];\n\trawTokens.forEach( token => {\n\t\t// Pretokens contains all that occurs before the first letter of the token.\n\t\tconst preTokens = [];\n\t\t// Posttokens contains all that occurs after the last letter of the token.\n\t\tconst postTokens = [];\n\n\t\t// Add all punctuation marks that occur before the first letter of the token to the pretokens array.\n\t\t// Also, prevent matching with a hashed HTML entity in the beginning of the token.\n\t\twhile ( punctuationRegexStart.test( token ) && ! hashedHtmlEntitiesRegexStart.test( token ) ) {\n\t\t\tpreTokens.push( token[ 0 ] );\n\t\t\ttoken = token.slice( 1 );\n\t\t}\n\t\t// Add all punctuation marks that occur after the last letter of the token to the posttokens array.\n\t\t// Also, prevent matching with a hashed HTML entity at the end of the token.\n\t\twhile ( punctuationRegexEnd.test( token ) && ! hashedHtmlEntitiesRegexEnd.test( token ) ) {\n\t\t\t// Using unshift here because we are iterating from the end of the string to the beginning,\n\t\t\t// and we want to keep the order of the punctuation marks.\n\t\t\t// Therefore, we add them to the start of the array.\n\t\t\tpostTokens.unshift( token[ token.length - 1 ] );\n\t\t\ttoken = token.slice( 0, -1 );\n\t\t}\n\n\t\tlet currentTokens = [ ...preTokens, token, ...postTokens ];\n\t\tcurrentTokens = currentTokens.filter( x => x !== \"\" );\n\t\ttokenTexts.push( ...currentTokens );\n\t} );\n\treturn tokenTexts;\n};\n\nexport default createPunctuationTokens;\n"],"mappings":"AAAA,SAASA,mBAAmB,EAAEC,qBAAqB;AACnD,SAASC,0BAA0B,EAAEC,4BAA4B;;AAEjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,uBAAuB,GAAKC,SAAS,IAAM;EAChD,MAAMC,UAAU,GAAG,EAAE;EACrBD,SAAS,CAACE,OAAO,CAAEC,KAAK,IAAI;IAC3B;IACA,MAAMC,SAAS,GAAG,EAAE;IACpB;IACA,MAAMC,UAAU,GAAG,EAAE;;IAErB;IACA;IACA,OAAQT,qBAAqB,CAACU,IAAI,CAAEH,KAAM,CAAC,IAAI,CAAEL,4BAA4B,CAACQ,IAAI,CAAEH,KAAM,CAAC,EAAG;MAC7FC,SAAS,CAACG,IAAI,CAAEJ,KAAK,CAAE,CAAC,CAAG,CAAC;MAC5BA,KAAK,GAAGA,KAAK,CAACK,KAAK,CAAE,CAAE,CAAC;IACzB;IACA;IACA;IACA,OAAQb,mBAAmB,CAACW,IAAI,CAAEH,KAAM,CAAC,IAAI,CAAEN,0BAA0B,CAACS,IAAI,CAAEH,KAAM,CAAC,EAAG;MACzF;MACA;MACA;MACAE,UAAU,CAACI,OAAO,CAAEN,KAAK,CAAEA,KAAK,CAACO,MAAM,GAAG,CAAC,CAAG,CAAC;MAC/CP,KAAK,GAAGA,KAAK,CAACK,KAAK,CAAE,CAAC,EAAE,CAAC,CAAE,CAAC;IAC7B;IAEA,IAAIG,aAAa,GAAG,CAAE,GAAGP,SAAS,EAAED,KAAK,EAAE,GAAGE,UAAU,CAAE;IAC1DM,aAAa,GAAGA,aAAa,CAACC,MAAM,CAAEC,CAAC,IAAIA,CAAC,KAAK,EAAG,CAAC;IACrDZ,UAAU,CAACM,IAAI,CAAE,GAAGI,aAAc,CAAC;EACpC,CAAE,CAAC;EACH,OAAOV,UAAU;AAClB,CAAC;AAED,eAAeF,uBAAuB","ignoreList":[]}
|
|
@@ -1,10 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
import { filter, includes } from "lodash";
|
|
2
2
|
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = filterWordsFromArray;
|
|
7
|
-
var _lodash = require("lodash");
|
|
8
3
|
/**
|
|
9
4
|
* Filters certain words from an array of words.
|
|
10
5
|
*
|
|
@@ -13,9 +8,9 @@ var _lodash = require("lodash");
|
|
|
13
8
|
*
|
|
14
9
|
* @returns {Array} The original array with the certain words filtered out.
|
|
15
10
|
*/
|
|
16
|
-
function filterWordsFromArray(array, words = []) {
|
|
17
|
-
return
|
|
18
|
-
return !
|
|
11
|
+
export default function filterWordsFromArray(array, words = []) {
|
|
12
|
+
return filter(array, function (word) {
|
|
13
|
+
return !includes(words, word.trim().toLocaleLowerCase());
|
|
19
14
|
});
|
|
20
15
|
}
|
|
21
16
|
//# sourceMappingURL=filterWordsFromArray.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"filterWordsFromArray.js","names":["
|
|
1
|
+
{"version":3,"file":"filterWordsFromArray.js","names":["filter","includes","filterWordsFromArray","array","words","word","trim","toLocaleLowerCase"],"sources":["../../../../src/languageProcessing/helpers/word/filterWordsFromArray.js"],"sourcesContent":["import { filter, includes } from \"lodash\";\n\n/**\n * Filters certain words from an array of words.\n *\n * @param {Array} array The words to check.\n * @param {Array} words The words to filter.\n *\n * @returns {Array} The original array with the certain words filtered out.\n */\nexport default function filterWordsFromArray( array, words = [] ) {\n\treturn filter( array, function( word ) {\n\t\treturn ( ! includes( words, word.trim().toLocaleLowerCase() ) );\n\t} );\n}\n"],"mappings":"AAAA,SAASA,MAAM,EAAEC,QAAQ,QAAQ,QAAQ;;AAEzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAASC,oBAAoBA,CAAEC,KAAK,EAAEC,KAAK,GAAG,EAAE,EAAG;EACjE,OAAOJ,MAAM,CAAEG,KAAK,EAAE,UAAUE,IAAI,EAAG;IACtC,OAAS,CAAEJ,QAAQ,CAAEG,KAAK,EAAEC,IAAI,CAACC,IAAI,CAAC,CAAC,CAACC,iBAAiB,CAAC,CAAE,CAAC;EAC9D,CAAE,CAAC;AACJ","ignoreList":[]}
|
|
@@ -1,10 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
import { isEmpty, forEach, includes } from "lodash";
|
|
2
2
|
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = _default;
|
|
7
|
-
var _lodash = require("lodash");
|
|
8
3
|
/**
|
|
9
4
|
* Checks whether a given word is followed by any word from a given list.
|
|
10
5
|
*
|
|
@@ -13,17 +8,17 @@ var _lodash = require("lodash");
|
|
|
13
8
|
*
|
|
14
9
|
* @returns {boolean} Returns true if the match is followed by a given word, otherwise returns false.
|
|
15
10
|
*/
|
|
16
|
-
function
|
|
17
|
-
if (
|
|
11
|
+
export default function (followingWords, match) {
|
|
12
|
+
if (isEmpty(followingWords)) {
|
|
18
13
|
return false;
|
|
19
14
|
}
|
|
20
15
|
|
|
21
16
|
// The followingWordIndices include the preceding space.
|
|
22
17
|
const wordAfterMatchIndex = match.index + match.match.length;
|
|
23
18
|
const followingWordsIndices = [];
|
|
24
|
-
|
|
19
|
+
forEach(followingWords, function (followingWord) {
|
|
25
20
|
followingWordsIndices.push(followingWord.index);
|
|
26
21
|
});
|
|
27
|
-
return
|
|
22
|
+
return includes(followingWordsIndices, wordAfterMatchIndex);
|
|
28
23
|
}
|
|
29
24
|
//# sourceMappingURL=followsIndex.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"followsIndex.js","names":["
|
|
1
|
+
{"version":3,"file":"followsIndex.js","names":["isEmpty","forEach","includes","followingWords","match","wordAfterMatchIndex","index","length","followingWordsIndices","followingWord","push"],"sources":["../../../../src/languageProcessing/helpers/word/followsIndex.js"],"sourcesContent":["import { isEmpty, forEach, includes } from \"lodash\";\n\n/**\n * Checks whether a given word is followed by any word from a given list.\n *\n * @param {Array} followingWords The array of objects with matches and indices.\n * @param {Object} match The object with the match and index to test the following words for.\n *\n * @returns {boolean} Returns true if the match is followed by a given word, otherwise returns false.\n */\nexport default function( followingWords, match ) {\n\tif ( isEmpty( followingWords ) ) {\n\t\treturn false;\n\t}\n\n\t// The followingWordIndices include the preceding space.\n\tconst wordAfterMatchIndex = match.index + match.match.length;\n\tconst followingWordsIndices = [];\n\n\tforEach( followingWords, function( followingWord ) {\n\t\tfollowingWordsIndices.push( followingWord.index );\n\t} );\n\n\treturn includes( followingWordsIndices, wordAfterMatchIndex );\n}\n"],"mappings":"AAAA,SAASA,OAAO,EAAEC,OAAO,EAAEC,QAAQ,QAAQ,QAAQ;;AAEnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,UAAUC,cAAc,EAAEC,KAAK,EAAG;EAChD,IAAKJ,OAAO,CAAEG,cAAe,CAAC,EAAG;IAChC,OAAO,KAAK;EACb;;EAEA;EACA,MAAME,mBAAmB,GAAGD,KAAK,CAACE,KAAK,GAAGF,KAAK,CAACA,KAAK,CAACG,MAAM;EAC5D,MAAMC,qBAAqB,GAAG,EAAE;EAEhCP,OAAO,CAAEE,cAAc,EAAE,UAAUM,aAAa,EAAG;IAClDD,qBAAqB,CAACE,IAAI,CAAED,aAAa,CAACH,KAAM,CAAC;EAClD,CAAE,CAAC;EAEH,OAAOJ,QAAQ,CAAEM,qBAAqB,EAAEH,mBAAoB,CAAC;AAC9D","ignoreList":[]}
|
|
@@ -1,13 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
import getSentencesFromTree from "../sentence/getSentencesFromTree";
|
|
2
|
+
import { flatMap } from "lodash";
|
|
3
|
+
import removePunctuation from "../sanitize/removePunctuation";
|
|
2
4
|
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = _default;
|
|
7
|
-
var _getSentencesFromTree = _interopRequireDefault(require("../sentence/getSentencesFromTree"));
|
|
8
|
-
var _lodash = require("lodash");
|
|
9
|
-
var _removePunctuation = _interopRequireDefault(require("../sanitize/removePunctuation"));
|
|
10
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
11
5
|
/**
|
|
12
6
|
* Gets the words from the tree, i.e. from the paragraph and heading nodes.
|
|
13
7
|
* These two node types are the nodes that should contain words for the analysis.
|
|
@@ -16,13 +10,13 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
|
|
|
16
10
|
*
|
|
17
11
|
* @returns {String[]} Array of words retrieved from the tree.
|
|
18
12
|
*/
|
|
19
|
-
function
|
|
20
|
-
const sentences = (
|
|
13
|
+
export default function (paper) {
|
|
14
|
+
const sentences = getSentencesFromTree(paper);
|
|
21
15
|
// Get all the tokens from each sentence.
|
|
22
16
|
const tokens = sentences.map(sentence => sentence.tokens);
|
|
23
|
-
let words =
|
|
17
|
+
let words = flatMap(tokens).map(token => token.text);
|
|
24
18
|
// Remove punctuation and spaces.
|
|
25
|
-
words = words.map(token => (
|
|
19
|
+
words = words.map(token => removePunctuation(token));
|
|
26
20
|
|
|
27
21
|
// Filter out empty tokens.
|
|
28
22
|
return words.filter(word => word.trim() !== "");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getAllWordsFromTree.js","names":["
|
|
1
|
+
{"version":3,"file":"getAllWordsFromTree.js","names":["getSentencesFromTree","flatMap","removePunctuation","paper","sentences","tokens","map","sentence","words","token","text","filter","word","trim"],"sources":["../../../../src/languageProcessing/helpers/word/getAllWordsFromTree.js"],"sourcesContent":["import getSentencesFromTree from \"../sentence/getSentencesFromTree\";\nimport { flatMap } from \"lodash\";\nimport removePunctuation from \"../sanitize/removePunctuation\";\n\n/**\n * Gets the words from the tree, i.e. from the paragraph and heading nodes.\n * These two node types are the nodes that should contain words for the analysis.\n *\n * @param {Paper} paper The paper to get the tree and words from.\n *\n * @returns {String[]} Array of words retrieved from the tree.\n */\nexport default function( paper ) {\n\tconst sentences = getSentencesFromTree( paper );\n\t// Get all the tokens from each sentence.\n\tconst tokens = sentences.map( sentence => sentence.tokens );\n\tlet words = flatMap( tokens ).map( token => token.text );\n\t// Remove punctuation and spaces.\n\twords = words.map( token => removePunctuation( token ) );\n\n\t// Filter out empty tokens.\n\treturn words.filter( word => word.trim() !== \"\" );\n}\n"],"mappings":"AAAA,OAAOA,oBAAoB;AAC3B,SAASC,OAAO,QAAQ,QAAQ;AAChC,OAAOC,iBAAiB;;AAExB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,UAAUC,KAAK,EAAG;EAChC,MAAMC,SAAS,GAAGJ,oBAAoB,CAAEG,KAAM,CAAC;EAC/C;EACA,MAAME,MAAM,GAAGD,SAAS,CAACE,GAAG,CAAEC,QAAQ,IAAIA,QAAQ,CAACF,MAAO,CAAC;EAC3D,IAAIG,KAAK,GAAGP,OAAO,CAAEI,MAAO,CAAC,CAACC,GAAG,CAAEG,KAAK,IAAIA,KAAK,CAACC,IAAK,CAAC;EACxD;EACAF,KAAK,GAAGA,KAAK,CAACF,GAAG,CAAEG,KAAK,IAAIP,iBAAiB,CAAEO,KAAM,CAAE,CAAC;;EAExD;EACA,OAAOD,KAAK,CAACG,MAAM,CAAEC,IAAI,IAAIA,IAAI,CAACC,IAAI,CAAC,CAAC,KAAK,EAAG,CAAC;AAClD","ignoreList":[]}
|