axyseo 2.0.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +228 -0
- package/build/bundledPlugins/index.js +14 -0
- package/build/bundledPlugins/index.js.map +1 -0
- package/build/bundledPlugins/previouslyUsedKeywords.js +171 -0
- package/build/bundledPlugins/previouslyUsedKeywords.js.map +1 -0
- package/build/config/diacritics.js +140 -0
- package/build/config/diacritics.js.map +1 -0
- package/build/config/getTransliterations.js +3572 -0
- package/build/config/getTransliterations.js.map +1 -0
- package/build/config/transliterationsWPstyle.js +1424 -0
- package/build/config/transliterationsWPstyle.js.map +1 -0
- package/build/config/wordBoundaries.js +26 -0
- package/build/config/wordBoundaries.js.map +1 -0
- package/build/config/wordBoundariesWithoutPunctuation.js +16 -0
- package/build/config/wordBoundariesWithoutPunctuation.js.map +1 -0
- package/build/const/analysis.js +20 -0
- package/build/const/analysis.js.map +1 -0
- package/build/errors/invalidType.js +22 -0
- package/build/errors/invalidType.js.map +1 -0
- package/build/errors/missingArgument.js +22 -0
- package/build/errors/missingArgument.js.map +1 -0
- package/build/helpers/createMeasurementElement.js +46 -0
- package/build/helpers/createMeasurementElement.js.map +1 -0
- package/build/helpers/domManipulation.js +66 -0
- package/build/helpers/domManipulation.js.map +1 -0
- package/build/helpers/errors.js +26 -0
- package/build/helpers/errors.js.map +1 -0
- package/build/helpers/factory.js +207 -0
- package/build/helpers/factory.js.map +1 -0
- package/build/helpers/formatNumber.js +18 -0
- package/build/helpers/formatNumber.js.map +1 -0
- package/build/helpers/formatString.js +38 -0
- package/build/helpers/formatString.js.map +1 -0
- package/build/helpers/getLanguagesWithWordComplexity.js +15 -0
- package/build/helpers/getLanguagesWithWordComplexity.js.map +1 -0
- package/build/helpers/getLanguagesWithWordFormSupport.js +16 -0
- package/build/helpers/getLanguagesWithWordFormSupport.js.map +1 -0
- package/build/helpers/getWordComplexityConfig.js +27 -0
- package/build/helpers/getWordComplexityConfig.js.map +1 -0
- package/build/helpers/getWordComplexityHelper.js +27 -0
- package/build/helpers/getWordComplexityHelper.js.map +1 -0
- package/build/helpers/htmlEntities.js +21 -0
- package/build/helpers/htmlEntities.js.map +1 -0
- package/build/helpers/includesAny.js +24 -0
- package/build/helpers/includesAny.js.map +1 -0
- package/build/helpers/index.js +179 -0
- package/build/helpers/index.js.map +1 -0
- package/build/helpers/shortlinker/Shortlinker.js +79 -0
- package/build/helpers/shortlinker/Shortlinker.js.map +1 -0
- package/build/helpers/shortlinker/index.js +17 -0
- package/build/helpers/shortlinker/index.js.map +1 -0
- package/build/helpers/shortlinker/singleton.js +76 -0
- package/build/helpers/shortlinker/singleton.js.map +1 -0
- package/build/helpers/types.js +37 -0
- package/build/helpers/types.js.map +1 -0
- package/build/index.js +103 -0
- package/build/index.js.map +1 -0
- package/build/languageProcessing/AbstractResearcher.js +348 -0
- package/build/languageProcessing/AbstractResearcher.js.map +1 -0
- package/build/languageProcessing/helpers/highlighting/getMarkingsInSentence.js +123 -0
- package/build/languageProcessing/helpers/highlighting/getMarkingsInSentence.js.map +1 -0
- package/build/languageProcessing/helpers/html/getFieldsToMark.js +37 -0
- package/build/languageProcessing/helpers/html/getFieldsToMark.js.map +1 -0
- package/build/languageProcessing/helpers/html/getSubheadingTexts.js +47 -0
- package/build/languageProcessing/helpers/html/getSubheadingTexts.js.map +1 -0
- package/build/languageProcessing/helpers/html/getSubheadings.js +92 -0
- package/build/languageProcessing/helpers/html/getSubheadings.js.map +1 -0
- package/build/languageProcessing/helpers/html/html.js +152 -0
- package/build/languageProcessing/helpers/html/html.js.map +1 -0
- package/build/languageProcessing/helpers/html/htmlParser.js +132 -0
- package/build/languageProcessing/helpers/html/htmlParser.js.map +1 -0
- package/build/languageProcessing/helpers/html/matchParagraphs.js +61 -0
- package/build/languageProcessing/helpers/html/matchParagraphs.js.map +1 -0
- package/build/languageProcessing/helpers/html/normalizeHTML.js +23 -0
- package/build/languageProcessing/helpers/html/normalizeHTML.js.map +1 -0
- package/build/languageProcessing/helpers/image/getAltAttribute.js +24 -0
- package/build/languageProcessing/helpers/image/getAltAttribute.js.map +1 -0
- package/build/languageProcessing/helpers/image/getImagesInTree.js +21 -0
- package/build/languageProcessing/helpers/image/getImagesInTree.js.map +1 -0
- package/build/languageProcessing/helpers/image/imageInText.js +26 -0
- package/build/languageProcessing/helpers/image/imageInText.js.map +1 -0
- package/build/languageProcessing/helpers/index.js +41 -0
- package/build/languageProcessing/helpers/index.js.map +1 -0
- package/build/languageProcessing/helpers/language/getLanguage.js +16 -0
- package/build/languageProcessing/helpers/language/getLanguage.js.map +1 -0
- package/build/languageProcessing/helpers/link/checkNofollow.js +42 -0
- package/build/languageProcessing/helpers/link/checkNofollow.js.map +1 -0
- package/build/languageProcessing/helpers/link/getAnchorsFromText.js +37 -0
- package/build/languageProcessing/helpers/link/getAnchorsFromText.js.map +1 -0
- package/build/languageProcessing/helpers/link/getLinkType.js +36 -0
- package/build/languageProcessing/helpers/link/getLinkType.js.map +1 -0
- package/build/languageProcessing/helpers/match/findKeywordFormsInString.js +101 -0
- package/build/languageProcessing/helpers/match/findKeywordFormsInString.js.map +1 -0
- package/build/languageProcessing/helpers/match/isDoubleQuoted.js +19 -0
- package/build/languageProcessing/helpers/match/isDoubleQuoted.js.map +1 -0
- package/build/languageProcessing/helpers/match/matchTextWithArray.js +41 -0
- package/build/languageProcessing/helpers/match/matchTextWithArray.js.map +1 -0
- package/build/languageProcessing/helpers/match/matchTextWithTransliteration.js +58 -0
- package/build/languageProcessing/helpers/match/matchTextWithTransliteration.js.map +1 -0
- package/build/languageProcessing/helpers/match/matchTextWithWord.js +47 -0
- package/build/languageProcessing/helpers/match/matchTextWithWord.js.map +1 -0
- package/build/languageProcessing/helpers/match/matchWordFormsWithSentence.js +162 -0
- package/build/languageProcessing/helpers/match/matchWordFormsWithSentence.js.map +1 -0
- package/build/languageProcessing/helpers/match/processExactMatchRequest.js +29 -0
- package/build/languageProcessing/helpers/match/processExactMatchRequest.js.map +1 -0
- package/build/languageProcessing/helpers/morphology/baseStemmer.js +18 -0
- package/build/languageProcessing/helpers/morphology/baseStemmer.js.map +1 -0
- package/build/languageProcessing/helpers/morphology/buildFormRule.js +26 -0
- package/build/languageProcessing/helpers/morphology/buildFormRule.js.map +1 -0
- package/build/languageProcessing/helpers/morphology/buildTopicStems.js +164 -0
- package/build/languageProcessing/helpers/morphology/buildTopicStems.js.map +1 -0
- package/build/languageProcessing/helpers/morphology/createRulesFromArrays.js +48 -0
- package/build/languageProcessing/helpers/morphology/createRulesFromArrays.js.map +1 -0
- package/build/languageProcessing/helpers/morphology/exceptionListHelpers.js +71 -0
- package/build/languageProcessing/helpers/morphology/exceptionListHelpers.js.map +1 -0
- package/build/languageProcessing/helpers/morphology/findMatchingEndingInArray.js +29 -0
- package/build/languageProcessing/helpers/morphology/findMatchingEndingInArray.js.map +1 -0
- package/build/languageProcessing/helpers/morphology/flattenSortLength.js +19 -0
- package/build/languageProcessing/helpers/morphology/flattenSortLength.js.map +1 -0
- package/build/languageProcessing/helpers/morphology/getAllWordsFromPaper.js +35 -0
- package/build/languageProcessing/helpers/morphology/getAllWordsFromPaper.js.map +1 -0
- package/build/languageProcessing/helpers/morphology/regexHelpers.js +53 -0
- package/build/languageProcessing/helpers/morphology/regexHelpers.js.map +1 -0
- package/build/languageProcessing/helpers/morphology/stemHelpers.js +46 -0
- package/build/languageProcessing/helpers/morphology/stemHelpers.js.map +1 -0
- package/build/languageProcessing/helpers/morphology/stemPrefixedFunctionWords.js +39 -0
- package/build/languageProcessing/helpers/morphology/stemPrefixedFunctionWords.js.map +1 -0
- package/build/languageProcessing/helpers/passiveVoice/periphrastic/directPrecedenceException.js +42 -0
- package/build/languageProcessing/helpers/passiveVoice/periphrastic/directPrecedenceException.js.map +1 -0
- package/build/languageProcessing/helpers/passiveVoice/periphrastic/freeAuxiliaryParticipleOrder/getClausesSplitOnStopWords.js +116 -0
- package/build/languageProcessing/helpers/passiveVoice/periphrastic/freeAuxiliaryParticipleOrder/getClausesSplitOnStopWords.js.map +1 -0
- package/build/languageProcessing/helpers/passiveVoice/periphrastic/freeAuxiliaryParticipleOrder/nonDirectParticiplePrecedenceException.js +45 -0
- package/build/languageProcessing/helpers/passiveVoice/periphrastic/freeAuxiliaryParticipleOrder/nonDirectParticiplePrecedenceException.js.map +1 -0
- package/build/languageProcessing/helpers/passiveVoice/periphrastic/getClauses.js +220 -0
- package/build/languageProcessing/helpers/passiveVoice/periphrastic/getClauses.js.map +1 -0
- package/build/languageProcessing/helpers/passiveVoice/periphrastic/getIndicesWithRegex.js +27 -0
- package/build/languageProcessing/helpers/passiveVoice/periphrastic/getIndicesWithRegex.js.map +1 -0
- package/build/languageProcessing/helpers/passiveVoice/periphrastic/matchRegularParticiples.js +28 -0
- package/build/languageProcessing/helpers/passiveVoice/periphrastic/matchRegularParticiples.js.map +1 -0
- package/build/languageProcessing/helpers/passiveVoice/periphrastic/precedenceException.js +46 -0
- package/build/languageProcessing/helpers/passiveVoice/periphrastic/precedenceException.js.map +1 -0
- package/build/languageProcessing/helpers/prominentWords/determineProminentWords.js +203 -0
- package/build/languageProcessing/helpers/prominentWords/determineProminentWords.js.map +1 -0
- package/build/languageProcessing/helpers/regex/createRegexFromArray.js +38 -0
- package/build/languageProcessing/helpers/regex/createRegexFromArray.js.map +1 -0
- package/build/languageProcessing/helpers/regex/createRegexFromDoubleArray.js +39 -0
- package/build/languageProcessing/helpers/regex/createRegexFromDoubleArray.js.map +1 -0
- package/build/languageProcessing/helpers/regex/createWordRegex.js +34 -0
- package/build/languageProcessing/helpers/regex/createWordRegex.js.map +1 -0
- package/build/languageProcessing/helpers/regex/matchStringWithRegex.js +24 -0
- package/build/languageProcessing/helpers/regex/matchStringWithRegex.js.map +1 -0
- package/build/languageProcessing/helpers/regex/searchAndReplaceWithOneRegex.js +21 -0
- package/build/languageProcessing/helpers/regex/searchAndReplaceWithOneRegex.js.map +1 -0
- package/build/languageProcessing/helpers/sanitize/doubleQuotes.js +19 -0
- package/build/languageProcessing/helpers/sanitize/doubleQuotes.js.map +1 -0
- package/build/languageProcessing/helpers/sanitize/filterShortcodesFromTree.js +131 -0
- package/build/languageProcessing/helpers/sanitize/filterShortcodesFromTree.js.map +1 -0
- package/build/languageProcessing/helpers/sanitize/mergeListItems.js +30 -0
- package/build/languageProcessing/helpers/sanitize/mergeListItems.js.map +1 -0
- package/build/languageProcessing/helpers/sanitize/parseSynonyms.js +24 -0
- package/build/languageProcessing/helpers/sanitize/parseSynonyms.js.map +1 -0
- package/build/languageProcessing/helpers/sanitize/quotes.js +47 -0
- package/build/languageProcessing/helpers/sanitize/quotes.js.map +1 -0
- package/build/languageProcessing/helpers/sanitize/removeEmailAddresses.js +19 -0
- package/build/languageProcessing/helpers/sanitize/removeEmailAddresses.js.map +1 -0
- package/build/languageProcessing/helpers/sanitize/removePunctuation.js +64 -0
- package/build/languageProcessing/helpers/sanitize/removePunctuation.js.map +1 -0
- package/build/languageProcessing/helpers/sanitize/removePunctuationExceptQuotes.js +24 -0
- package/build/languageProcessing/helpers/sanitize/removePunctuationExceptQuotes.js.map +1 -0
- package/build/languageProcessing/helpers/sanitize/removeSentenceTerminators.js +20 -0
- package/build/languageProcessing/helpers/sanitize/removeSentenceTerminators.js.map +1 -0
- package/build/languageProcessing/helpers/sanitize/removeURLs.js +19 -0
- package/build/languageProcessing/helpers/sanitize/removeURLs.js.map +1 -0
- package/build/languageProcessing/helpers/sanitize/sanitizeLineBreakTag.js +18 -0
- package/build/languageProcessing/helpers/sanitize/sanitizeLineBreakTag.js.map +1 -0
- package/build/languageProcessing/helpers/sanitize/sanitizeString.js +23 -0
- package/build/languageProcessing/helpers/sanitize/sanitizeString.js.map +1 -0
- package/build/languageProcessing/helpers/sanitize/stripHTMLTags.js +59 -0
- package/build/languageProcessing/helpers/sanitize/stripHTMLTags.js.map +1 -0
- package/build/languageProcessing/helpers/sanitize/stripNonTextTags.js +22 -0
- package/build/languageProcessing/helpers/sanitize/stripNonTextTags.js.map +1 -0
- package/build/languageProcessing/helpers/sanitize/stripNumbers.js +26 -0
- package/build/languageProcessing/helpers/sanitize/stripNumbers.js.map +1 -0
- package/build/languageProcessing/helpers/sanitize/stripSpaces.js +29 -0
- package/build/languageProcessing/helpers/sanitize/stripSpaces.js.map +1 -0
- package/build/languageProcessing/helpers/sanitize/stripWordBoundaries.js +65 -0
- package/build/languageProcessing/helpers/sanitize/stripWordBoundaries.js.map +1 -0
- package/build/languageProcessing/helpers/sanitize/unifyWhitespace.js +64 -0
- package/build/languageProcessing/helpers/sanitize/unifyWhitespace.js.map +1 -0
- package/build/languageProcessing/helpers/sentence/SentenceTokenizer.js +565 -0
- package/build/languageProcessing/helpers/sentence/SentenceTokenizer.js.map +1 -0
- package/build/languageProcessing/helpers/sentence/countSentences.js +27 -0
- package/build/languageProcessing/helpers/sentence/countSentences.js.map +1 -0
- package/build/languageProcessing/helpers/sentence/getSentences.js +71 -0
- package/build/languageProcessing/helpers/sentence/getSentences.js.map +1 -0
- package/build/languageProcessing/helpers/sentence/getSentencesFromTree.js +60 -0
- package/build/languageProcessing/helpers/sentence/getSentencesFromTree.js.map +1 -0
- package/build/languageProcessing/helpers/sentence/memoizedSentenceTokenizer.js +37 -0
- package/build/languageProcessing/helpers/sentence/memoizedSentenceTokenizer.js.map +1 -0
- package/build/languageProcessing/helpers/sentence/sentencesLength.js +37 -0
- package/build/languageProcessing/helpers/sentence/sentencesLength.js.map +1 -0
- package/build/languageProcessing/helpers/syllables/DeviationFragment.js +108 -0
- package/build/languageProcessing/helpers/syllables/DeviationFragment.js.map +1 -0
- package/build/languageProcessing/helpers/syllables/countSyllables.js +173 -0
- package/build/languageProcessing/helpers/syllables/countSyllables.js.map +1 -0
- package/build/languageProcessing/helpers/syllables/syllableCountIterator.js +63 -0
- package/build/languageProcessing/helpers/syllables/syllableCountIterator.js.map +1 -0
- package/build/languageProcessing/helpers/syllables/syllableCountStep.js +75 -0
- package/build/languageProcessing/helpers/syllables/syllableCountStep.js.map +1 -0
- package/build/languageProcessing/helpers/transform/transformWordsWithHyphens.js +24 -0
- package/build/languageProcessing/helpers/transform/transformWordsWithHyphens.js.map +1 -0
- package/build/languageProcessing/helpers/transliterate/replaceDiacritics.js +25 -0
- package/build/languageProcessing/helpers/transliterate/replaceDiacritics.js.map +1 -0
- package/build/languageProcessing/helpers/transliterate/specialCharacterMappings.js +194 -0
- package/build/languageProcessing/helpers/transliterate/specialCharacterMappings.js.map +1 -0
- package/build/languageProcessing/helpers/transliterate/transliterate.js +24 -0
- package/build/languageProcessing/helpers/transliterate/transliterate.js.map +1 -0
- package/build/languageProcessing/helpers/transliterate/transliterateWPstyle.js +25 -0
- package/build/languageProcessing/helpers/transliterate/transliterateWPstyle.js.map +1 -0
- package/build/languageProcessing/helpers/url/parseSlug.js +17 -0
- package/build/languageProcessing/helpers/url/parseSlug.js.map +1 -0
- package/build/languageProcessing/helpers/url/url.js +174 -0
- package/build/languageProcessing/helpers/url/url.js.map +1 -0
- package/build/languageProcessing/helpers/word/addWordboundary.js +41 -0
- package/build/languageProcessing/helpers/word/addWordboundary.js.map +1 -0
- package/build/languageProcessing/helpers/word/areWordsInSentence.js +23 -0
- package/build/languageProcessing/helpers/word/areWordsInSentence.js.map +1 -0
- package/build/languageProcessing/helpers/word/countMetaDescriptionLength.js +24 -0
- package/build/languageProcessing/helpers/word/countMetaDescriptionLength.js.map +1 -0
- package/build/languageProcessing/helpers/word/countWords.js +21 -0
- package/build/languageProcessing/helpers/word/countWords.js.map +1 -0
- package/build/languageProcessing/helpers/word/createPunctuationTokens.js +46 -0
- package/build/languageProcessing/helpers/word/createPunctuationTokens.js.map +1 -0
- package/build/languageProcessing/helpers/word/filterWordsFromArray.js +21 -0
- package/build/languageProcessing/helpers/word/filterWordsFromArray.js.map +1 -0
- package/build/languageProcessing/helpers/word/followsIndex.js +29 -0
- package/build/languageProcessing/helpers/word/followsIndex.js.map +1 -0
- package/build/languageProcessing/helpers/word/getAllWordsFromTree.js +30 -0
- package/build/languageProcessing/helpers/word/getAllWordsFromTree.js.map +1 -0
- package/build/languageProcessing/helpers/word/getWords.js +47 -0
- package/build/languageProcessing/helpers/word/getWords.js.map +1 -0
- package/build/languageProcessing/helpers/word/includesIndex.js +34 -0
- package/build/languageProcessing/helpers/word/includesIndex.js.map +1 -0
- package/build/languageProcessing/helpers/word/indices.js +141 -0
- package/build/languageProcessing/helpers/word/indices.js.map +1 -0
- package/build/languageProcessing/helpers/word/markWordsInSentences.js +189 -0
- package/build/languageProcessing/helpers/word/markWordsInSentences.js.map +1 -0
- package/build/languageProcessing/helpers/word/matchWordInSentence.js +63 -0
- package/build/languageProcessing/helpers/word/matchWordInSentence.js.map +1 -0
- package/build/languageProcessing/helpers/word/splitIntoTokens.js +52 -0
- package/build/languageProcessing/helpers/word/splitIntoTokens.js.map +1 -0
- package/build/languageProcessing/index.js +283 -0
- package/build/languageProcessing/index.js.map +1 -0
- package/build/languageProcessing/languages/_default/Researcher.js +43 -0
- package/build/languageProcessing/languages/_default/Researcher.js.map +1 -0
- package/build/languageProcessing/languages/_default/helpers/getStemmer.js +20 -0
- package/build/languageProcessing/languages/_default/helpers/getStemmer.js.map +1 -0
- package/build/languageProcessing/languages/ar/Researcher.js +54 -0
- package/build/languageProcessing/languages/ar/Researcher.js.map +1 -0
- package/build/languageProcessing/languages/ar/config/firstWordExceptions.js +18 -0
- package/build/languageProcessing/languages/ar/config/firstWordExceptions.js.map +1 -0
- package/build/languageProcessing/languages/ar/config/functionWords.js +80 -0
- package/build/languageProcessing/languages/ar/config/functionWords.js.map +1 -0
- package/build/languageProcessing/languages/ar/config/internal/passiveVerbsWithLongVowel.js +13 -0
- package/build/languageProcessing/languages/ar/config/internal/passiveVerbsWithLongVowel.js.map +1 -0
- package/build/languageProcessing/languages/ar/config/prefixedFunctionWords.js +11 -0
- package/build/languageProcessing/languages/ar/config/prefixedFunctionWords.js.map +1 -0
- package/build/languageProcessing/languages/ar/config/transitionWords.js +13 -0
- package/build/languageProcessing/languages/ar/config/transitionWords.js.map +1 -0
- package/build/languageProcessing/languages/ar/config/twoPartTransitionWords.js +13 -0
- package/build/languageProcessing/languages/ar/config/twoPartTransitionWords.js.map +1 -0
- package/build/languageProcessing/languages/ar/helpers/createBasicWordForms.js +38 -0
- package/build/languageProcessing/languages/ar/helpers/createBasicWordForms.js.map +1 -0
- package/build/languageProcessing/languages/ar/helpers/getStemmer.js +28 -0
- package/build/languageProcessing/languages/ar/helpers/getStemmer.js.map +1 -0
- package/build/languageProcessing/languages/ar/helpers/internal/stem.js +635 -0
- package/build/languageProcessing/languages/ar/helpers/internal/stem.js.map +1 -0
- package/build/languageProcessing/languages/ar/helpers/isPassiveSentence.js +41 -0
- package/build/languageProcessing/languages/ar/helpers/isPassiveSentence.js.map +1 -0
- package/build/languageProcessing/languages/ca/Researcher.js +52 -0
- package/build/languageProcessing/languages/ca/Researcher.js.map +1 -0
- package/build/languageProcessing/languages/ca/config/sentenceLength.js +10 -0
- package/build/languageProcessing/languages/ca/config/sentenceLength.js.map +1 -0
- package/build/languageProcessing/languages/ca/config/transitionWords.js +13 -0
- package/build/languageProcessing/languages/ca/config/transitionWords.js.map +1 -0
- package/build/languageProcessing/languages/ca/config/twoPartTransitionWords.js +13 -0
- package/build/languageProcessing/languages/ca/config/twoPartTransitionWords.js.map +1 -0
- package/build/languageProcessing/languages/ca/helpers/getStemmer.js +20 -0
- package/build/languageProcessing/languages/ca/helpers/getStemmer.js.map +1 -0
- package/build/languageProcessing/languages/cs/Researcher.js +52 -0
- package/build/languageProcessing/languages/cs/Researcher.js.map +1 -0
- package/build/languageProcessing/languages/cs/config/firstWordExceptions.js +20 -0
- package/build/languageProcessing/languages/cs/config/firstWordExceptions.js.map +1 -0
- package/build/languageProcessing/languages/cs/config/functionWords.js +50 -0
- package/build/languageProcessing/languages/cs/config/functionWords.js.map +1 -0
- package/build/languageProcessing/languages/cs/config/internal/passiveVoiceAuxiliaries.js +10 -0
- package/build/languageProcessing/languages/cs/config/internal/passiveVoiceAuxiliaries.js.map +1 -0
- package/build/languageProcessing/languages/cs/config/internal/passiveVoiceEndings.js +14 -0
- package/build/languageProcessing/languages/cs/config/internal/passiveVoiceEndings.js.map +1 -0
- package/build/languageProcessing/languages/cs/config/stopWords.js +12 -0
- package/build/languageProcessing/languages/cs/config/stopWords.js.map +1 -0
- package/build/languageProcessing/languages/cs/config/transitionWords.js +13 -0
- package/build/languageProcessing/languages/cs/config/transitionWords.js.map +1 -0
- package/build/languageProcessing/languages/cs/config/twoPartTransitionWords.js +13 -0
- package/build/languageProcessing/languages/cs/config/twoPartTransitionWords.js.map +1 -0
- package/build/languageProcessing/languages/cs/helpers/getClauses.js +35 -0
- package/build/languageProcessing/languages/cs/helpers/getClauses.js.map +1 -0
- package/build/languageProcessing/languages/cs/helpers/getStemmer.js +28 -0
- package/build/languageProcessing/languages/cs/helpers/getStemmer.js.map +1 -0
- package/build/languageProcessing/languages/cs/helpers/internal/getParticiples.js +24 -0
- package/build/languageProcessing/languages/cs/helpers/internal/getParticiples.js.map +1 -0
- package/build/languageProcessing/languages/cs/helpers/internal/stem.js +341 -0
- package/build/languageProcessing/languages/cs/helpers/internal/stem.js.map +1 -0
- package/build/languageProcessing/languages/cs/values/Clause.js +45 -0
- package/build/languageProcessing/languages/cs/values/Clause.js.map +1 -0
- package/build/languageProcessing/languages/de/Researcher.js +61 -0
- package/build/languageProcessing/languages/de/Researcher.js.map +1 -0
- package/build/languageProcessing/languages/de/config/firstWordExceptions.js +20 -0
- package/build/languageProcessing/languages/de/config/firstWordExceptions.js.map +1 -0
- package/build/languageProcessing/languages/de/config/functionWords.js +103 -0
- package/build/languageProcessing/languages/de/config/functionWords.js.map +1 -0
- package/build/languageProcessing/languages/de/config/internal/exceptionsParticiplesActive.js +13 -0
- package/build/languageProcessing/languages/de/config/internal/exceptionsParticiplesActive.js.map +1 -0
- package/build/languageProcessing/languages/de/config/internal/passiveVoiceAuxiliaries.js +29 -0
- package/build/languageProcessing/languages/de/config/internal/passiveVoiceAuxiliaries.js.map +1 -0
- package/build/languageProcessing/languages/de/config/internal/passiveVoiceIrregulars.js +15 -0
- package/build/languageProcessing/languages/de/config/internal/passiveVoiceIrregulars.js.map +1 -0
- package/build/languageProcessing/languages/de/config/internal/passiveVoiceRegex.js +78 -0
- package/build/languageProcessing/languages/de/config/internal/passiveVoiceRegex.js.map +1 -0
- package/build/languageProcessing/languages/de/config/keyphraseLength.js +17 -0
- package/build/languageProcessing/languages/de/config/keyphraseLength.js.map +1 -0
- package/build/languageProcessing/languages/de/config/stopWords.js +12 -0
- package/build/languageProcessing/languages/de/config/stopWords.js.map +1 -0
- package/build/languageProcessing/languages/de/config/syllables.json +460 -0
- package/build/languageProcessing/languages/de/config/transitionWords.js +13 -0
- package/build/languageProcessing/languages/de/config/transitionWords.js.map +1 -0
- package/build/languageProcessing/languages/de/config/twoPartTransitionWords.js +13 -0
- package/build/languageProcessing/languages/de/config/twoPartTransitionWords.js.map +1 -0
- package/build/languageProcessing/languages/de/config/wordComplexity.js +11 -0
- package/build/languageProcessing/languages/de/config/wordComplexity.js.map +1 -0
- package/build/languageProcessing/languages/de/helpers/calculateFleschReadingScore.js +23 -0
- package/build/languageProcessing/languages/de/helpers/calculateFleschReadingScore.js.map +1 -0
- package/build/languageProcessing/languages/de/helpers/checkIfWordIsComplex.js +47 -0
- package/build/languageProcessing/languages/de/helpers/checkIfWordIsComplex.js.map +1 -0
- package/build/languageProcessing/languages/de/helpers/checkIfWordIsFunction.js +20 -0
- package/build/languageProcessing/languages/de/helpers/checkIfWordIsFunction.js.map +1 -0
- package/build/languageProcessing/languages/de/helpers/getClauses.js +34 -0
- package/build/languageProcessing/languages/de/helpers/getClauses.js.map +1 -0
- package/build/languageProcessing/languages/de/helpers/getStemmer.js +28 -0
- package/build/languageProcessing/languages/de/helpers/getStemmer.js.map +1 -0
- package/build/languageProcessing/languages/de/helpers/internal/SentenceTokenizer.js +38 -0
- package/build/languageProcessing/languages/de/helpers/internal/SentenceTokenizer.js.map +1 -0
- package/build/languageProcessing/languages/de/helpers/internal/detectAndStemRegularParticiple.js +118 -0
- package/build/languageProcessing/languages/de/helpers/internal/detectAndStemRegularParticiple.js.map +1 -0
- package/build/languageProcessing/languages/de/helpers/internal/determineStem.js +113 -0
- package/build/languageProcessing/languages/de/helpers/internal/determineStem.js.map +1 -0
- package/build/languageProcessing/languages/de/helpers/internal/getParticiples.js +39 -0
- package/build/languageProcessing/languages/de/helpers/internal/getParticiples.js.map +1 -0
- package/build/languageProcessing/languages/de/helpers/internal/stem.js +222 -0
- package/build/languageProcessing/languages/de/helpers/internal/stem.js.map +1 -0
- package/build/languageProcessing/languages/de/helpers/memoizedSentenceTokenizer.js +37 -0
- package/build/languageProcessing/languages/de/helpers/memoizedSentenceTokenizer.js.map +1 -0
- package/build/languageProcessing/languages/de/values/Clause.js +91 -0
- package/build/languageProcessing/languages/de/values/Clause.js.map +1 -0
- package/build/languageProcessing/languages/el/Researcher.js +55 -0
- package/build/languageProcessing/languages/el/Researcher.js.map +1 -0
- package/build/languageProcessing/languages/el/config/firstWordExceptions.js +33 -0
- package/build/languageProcessing/languages/el/config/firstWordExceptions.js.map +1 -0
- package/build/languageProcessing/languages/el/config/functionWords.js +47 -0
- package/build/languageProcessing/languages/el/config/functionWords.js.map +1 -0
- package/build/languageProcessing/languages/el/config/internal/auxiliaries.js +12 -0
- package/build/languageProcessing/languages/el/config/internal/auxiliaries.js.map +1 -0
- package/build/languageProcessing/languages/el/config/internal/morphologicalPassiveSuffixes.js +8 -0
- package/build/languageProcessing/languages/el/config/internal/morphologicalPassiveSuffixes.js.map +1 -0
- package/build/languageProcessing/languages/el/config/internal/nonPassiveVerbStems.js +22 -0
- package/build/languageProcessing/languages/el/config/internal/nonPassiveVerbStems.js.map +1 -0
- package/build/languageProcessing/languages/el/config/stopWords.js +13 -0
- package/build/languageProcessing/languages/el/config/stopWords.js.map +1 -0
- package/build/languageProcessing/languages/el/config/transitionWords.js +18 -0
- package/build/languageProcessing/languages/el/config/transitionWords.js.map +1 -0
- package/build/languageProcessing/languages/el/config/twoPartTransitionWords.js +13 -0
- package/build/languageProcessing/languages/el/config/twoPartTransitionWords.js.map +1 -0
- package/build/languageProcessing/languages/el/helpers/getClauses.js +34 -0
- package/build/languageProcessing/languages/el/helpers/getClauses.js.map +1 -0
- package/build/languageProcessing/languages/el/helpers/getStemmer.js +29 -0
- package/build/languageProcessing/languages/el/helpers/getStemmer.js.map +1 -0
- package/build/languageProcessing/languages/el/helpers/internal/getParticiples.js +24 -0
- package/build/languageProcessing/languages/el/helpers/internal/getParticiples.js.map +1 -0
- package/build/languageProcessing/languages/el/helpers/internal/stem.js +347 -0
- package/build/languageProcessing/languages/el/helpers/internal/stem.js.map +1 -0
- package/build/languageProcessing/languages/el/helpers/isPassiveSentence.js +43 -0
- package/build/languageProcessing/languages/el/helpers/isPassiveSentence.js.map +1 -0
- package/build/languageProcessing/languages/el/values/Clause.js +46 -0
- package/build/languageProcessing/languages/el/values/Clause.js.map +1 -0
- package/build/languageProcessing/languages/en/Researcher.js +55 -0
- package/build/languageProcessing/languages/en/Researcher.js.map +1 -0
- package/build/languageProcessing/languages/en/config/abbreviations.js +16 -0
- package/build/languageProcessing/languages/en/config/abbreviations.js.map +1 -0
- package/build/languageProcessing/languages/en/config/firstWordExceptions.js +20 -0
- package/build/languageProcessing/languages/en/config/firstWordExceptions.js.map +1 -0
- package/build/languageProcessing/languages/en/config/functionWords.js +110 -0
- package/build/languageProcessing/languages/en/config/functionWords.js.map +1 -0
- package/build/languageProcessing/languages/en/config/internal/passiveVoiceAuxiliaries.js +15 -0
- package/build/languageProcessing/languages/en/config/internal/passiveVoiceAuxiliaries.js.map +1 -0
- package/build/languageProcessing/languages/en/config/internal/passiveVoiceIrregulars.js +15 -0
- package/build/languageProcessing/languages/en/config/internal/passiveVoiceIrregulars.js.map +1 -0
- package/build/languageProcessing/languages/en/config/internal/passiveVoiceNonVerbEndingEd.js +13 -0
- package/build/languageProcessing/languages/en/config/internal/passiveVoiceNonVerbEndingEd.js.map +1 -0
- package/build/languageProcessing/languages/en/config/regularParticiplesRegex.js +12 -0
- package/build/languageProcessing/languages/en/config/regularParticiplesRegex.js.map +1 -0
- package/build/languageProcessing/languages/en/config/stopWords.js +12 -0
- package/build/languageProcessing/languages/en/config/stopWords.js.map +1 -0
- package/build/languageProcessing/languages/en/config/syllables.json +86 -0
- package/build/languageProcessing/languages/en/config/transitionWords.js +13 -0
- package/build/languageProcessing/languages/en/config/transitionWords.js.map +1 -0
- package/build/languageProcessing/languages/en/config/twoPartTransitionWords.js +13 -0
- package/build/languageProcessing/languages/en/config/twoPartTransitionWords.js.map +1 -0
- package/build/languageProcessing/languages/en/config/wordComplexity.js +12 -0
- package/build/languageProcessing/languages/en/config/wordComplexity.js.map +1 -0
- package/build/languageProcessing/languages/en/helpers/calculateFleschReadingScore.js +23 -0
- package/build/languageProcessing/languages/en/helpers/calculateFleschReadingScore.js.map +1 -0
- package/build/languageProcessing/languages/en/helpers/checkIfWordIsComplex.js +49 -0
- package/build/languageProcessing/languages/en/helpers/checkIfWordIsComplex.js.map +1 -0
- package/build/languageProcessing/languages/en/helpers/getClauses.js +58 -0
- package/build/languageProcessing/languages/en/helpers/getClauses.js.map +1 -0
- package/build/languageProcessing/languages/en/helpers/getStemmer.js +28 -0
- package/build/languageProcessing/languages/en/helpers/getStemmer.js.map +1 -0
- package/build/languageProcessing/languages/en/helpers/internal/determineStem.js +161 -0
- package/build/languageProcessing/languages/en/helpers/internal/determineStem.js.map +1 -0
- package/build/languageProcessing/languages/en/helpers/internal/getAdjectiveStem.js +149 -0
- package/build/languageProcessing/languages/en/helpers/internal/getAdjectiveStem.js.map +1 -0
- package/build/languageProcessing/languages/en/helpers/internal/getParticiples.js +33 -0
- package/build/languageProcessing/languages/en/helpers/internal/getParticiples.js.map +1 -0
- package/build/languageProcessing/languages/en/helpers/internal/getVerbStem.js +228 -0
- package/build/languageProcessing/languages/en/helpers/internal/getVerbStem.js.map +1 -0
- package/build/languageProcessing/languages/en/values/Clause.js +68 -0
- package/build/languageProcessing/languages/en/values/Clause.js.map +1 -0
- package/build/languageProcessing/languages/es/Researcher.js +57 -0
- package/build/languageProcessing/languages/es/Researcher.js.map +1 -0
- package/build/languageProcessing/languages/es/config/firstWordExceptions.js +20 -0
- package/build/languageProcessing/languages/es/config/firstWordExceptions.js.map +1 -0
- package/build/languageProcessing/languages/es/config/functionWords.js +111 -0
- package/build/languageProcessing/languages/es/config/functionWords.js.map +1 -0
- package/build/languageProcessing/languages/es/config/internal/passiveVoiceAuxiliaries.js +12 -0
- package/build/languageProcessing/languages/es/config/internal/passiveVoiceAuxiliaries.js.map +1 -0
- package/build/languageProcessing/languages/es/config/internal/passiveVoiceParticiples.js +13 -0
- package/build/languageProcessing/languages/es/config/internal/passiveVoiceParticiples.js.map +1 -0
- package/build/languageProcessing/languages/es/config/sentenceLength.js +10 -0
- package/build/languageProcessing/languages/es/config/sentenceLength.js.map +1 -0
- package/build/languageProcessing/languages/es/config/stopWords.js +12 -0
- package/build/languageProcessing/languages/es/config/stopWords.js.map +1 -0
- package/build/languageProcessing/languages/es/config/syllables.json +176 -0
- package/build/languageProcessing/languages/es/config/transitionWords.js +13 -0
- package/build/languageProcessing/languages/es/config/transitionWords.js.map +1 -0
- package/build/languageProcessing/languages/es/config/twoPartTransitionWords.js +13 -0
- package/build/languageProcessing/languages/es/config/twoPartTransitionWords.js.map +1 -0
- package/build/languageProcessing/languages/es/config/wordComplexity.js +11 -0
- package/build/languageProcessing/languages/es/config/wordComplexity.js.map +1 -0
- package/build/languageProcessing/languages/es/helpers/calculateFleschReadingScore.js +23 -0
- package/build/languageProcessing/languages/es/helpers/calculateFleschReadingScore.js.map +1 -0
- package/build/languageProcessing/languages/es/helpers/checkIfWordIsComplex.js +59 -0
- package/build/languageProcessing/languages/es/helpers/checkIfWordIsComplex.js.map +1 -0
- package/build/languageProcessing/languages/es/helpers/getClauses.js +38 -0
- package/build/languageProcessing/languages/es/helpers/getClauses.js.map +1 -0
- package/build/languageProcessing/languages/es/helpers/getStemmer.js +28 -0
- package/build/languageProcessing/languages/es/helpers/getStemmer.js.map +1 -0
- package/build/languageProcessing/languages/es/helpers/internal/checkVerbStemModifications.js +40 -0
- package/build/languageProcessing/languages/es/helpers/internal/checkVerbStemModifications.js.map +1 -0
- package/build/languageProcessing/languages/es/helpers/internal/getParticiples.js +43 -0
- package/build/languageProcessing/languages/es/helpers/internal/getParticiples.js.map +1 -0
- package/build/languageProcessing/languages/es/helpers/internal/stem.js +574 -0
- package/build/languageProcessing/languages/es/helpers/internal/stem.js.map +1 -0
- package/build/languageProcessing/languages/es/values/Clause.js +49 -0
- package/build/languageProcessing/languages/es/values/Clause.js.map +1 -0
- package/build/languageProcessing/languages/fa/Researcher.js +56 -0
- package/build/languageProcessing/languages/fa/Researcher.js.map +1 -0
- package/build/languageProcessing/languages/fa/config/firstWordExceptions.js +18 -0
- package/build/languageProcessing/languages/fa/config/firstWordExceptions.js.map +1 -0
- package/build/languageProcessing/languages/fa/config/functionWords.js +41 -0
- package/build/languageProcessing/languages/fa/config/functionWords.js.map +1 -0
- package/build/languageProcessing/languages/fa/config/internal/participles.js +14 -0
- package/build/languageProcessing/languages/fa/config/internal/participles.js.map +1 -0
- package/build/languageProcessing/languages/fa/config/sentenceLength.js +10 -0
- package/build/languageProcessing/languages/fa/config/sentenceLength.js.map +1 -0
- package/build/languageProcessing/languages/fa/config/transitionWords.js +18 -0
- package/build/languageProcessing/languages/fa/config/transitionWords.js.map +1 -0
- package/build/languageProcessing/languages/fa/config/twoPartTransitionWords.js +13 -0
- package/build/languageProcessing/languages/fa/config/twoPartTransitionWords.js.map +1 -0
- package/build/languageProcessing/languages/fa/helpers/createBasicWordForms.js +99 -0
- package/build/languageProcessing/languages/fa/helpers/createBasicWordForms.js.map +1 -0
- package/build/languageProcessing/languages/fa/helpers/getStemmer.js +22 -0
- package/build/languageProcessing/languages/fa/helpers/getStemmer.js.map +1 -0
- package/build/languageProcessing/languages/fa/helpers/isPassiveSentence.js +22 -0
- package/build/languageProcessing/languages/fa/helpers/isPassiveSentence.js.map +1 -0
- package/build/languageProcessing/languages/fr/Researcher.js +55 -0
- package/build/languageProcessing/languages/fr/Researcher.js.map +1 -0
- package/build/languageProcessing/languages/fr/config/firstWordExceptions.js +20 -0
- package/build/languageProcessing/languages/fr/config/firstWordExceptions.js.map +1 -0
- package/build/languageProcessing/languages/fr/config/functionWords.js +144 -0
- package/build/languageProcessing/languages/fr/config/functionWords.js.map +1 -0
- package/build/languageProcessing/languages/fr/config/internal/exceptionsParticiplesActive.js +22 -0
- package/build/languageProcessing/languages/fr/config/internal/exceptionsParticiplesActive.js.map +1 -0
- package/build/languageProcessing/languages/fr/config/internal/passiveVoiceAuxiliaries.js +12 -0
- package/build/languageProcessing/languages/fr/config/internal/passiveVoiceAuxiliaries.js.map +1 -0
- package/build/languageProcessing/languages/fr/config/internal/passiveVoiceIrregulars.js +27 -0
- package/build/languageProcessing/languages/fr/config/internal/passiveVoiceIrregulars.js.map +1 -0
- package/build/languageProcessing/languages/fr/config/stopWords.js +12 -0
- package/build/languageProcessing/languages/fr/config/stopWords.js.map +1 -0
- package/build/languageProcessing/languages/fr/config/syllables.json +1426 -0
- package/build/languageProcessing/languages/fr/config/transitionWords.js +13 -0
- package/build/languageProcessing/languages/fr/config/transitionWords.js.map +1 -0
- package/build/languageProcessing/languages/fr/config/twoPartTransitionWords.js +13 -0
- package/build/languageProcessing/languages/fr/config/twoPartTransitionWords.js.map +1 -0
- package/build/languageProcessing/languages/fr/config/wordComplexity.js +11 -0
- package/build/languageProcessing/languages/fr/config/wordComplexity.js.map +1 -0
- package/build/languageProcessing/languages/fr/helpers/calculateFleschReadingScore.js +23 -0
- package/build/languageProcessing/languages/fr/helpers/calculateFleschReadingScore.js.map +1 -0
- package/build/languageProcessing/languages/fr/helpers/checkIfWordIsComplex.js +72 -0
- package/build/languageProcessing/languages/fr/helpers/checkIfWordIsComplex.js.map +1 -0
- package/build/languageProcessing/languages/fr/helpers/getClauses.js +42 -0
- package/build/languageProcessing/languages/fr/helpers/getClauses.js.map +1 -0
- package/build/languageProcessing/languages/fr/helpers/getStemmer.js +28 -0
- package/build/languageProcessing/languages/fr/helpers/getStemmer.js.map +1 -0
- package/build/languageProcessing/languages/fr/helpers/internal/getParticiples.js +71 -0
- package/build/languageProcessing/languages/fr/helpers/internal/getParticiples.js.map +1 -0
- package/build/languageProcessing/languages/fr/helpers/internal/stem.js +544 -0
- package/build/languageProcessing/languages/fr/helpers/internal/stem.js.map +1 -0
- package/build/languageProcessing/languages/fr/values/Clause.js +90 -0
- package/build/languageProcessing/languages/fr/values/Clause.js.map +1 -0
- package/build/languageProcessing/languages/he/Researcher.js +59 -0
- package/build/languageProcessing/languages/he/Researcher.js.map +1 -0
- package/build/languageProcessing/languages/he/config/firstWordExceptions.js +18 -0
- package/build/languageProcessing/languages/he/config/firstWordExceptions.js.map +1 -0
- package/build/languageProcessing/languages/he/config/functionWords.js +504 -0
- package/build/languageProcessing/languages/he/config/functionWords.js.map +1 -0
- package/build/languageProcessing/languages/he/config/internal/regularRootsHufal.js +13 -0
- package/build/languageProcessing/languages/he/config/internal/regularRootsHufal.js.map +1 -0
- package/build/languageProcessing/languages/he/config/internal/regularRootsNifal.js +13 -0
- package/build/languageProcessing/languages/he/config/internal/regularRootsNifal.js.map +1 -0
- package/build/languageProcessing/languages/he/config/internal/regularRootsPual.js +13 -0
- package/build/languageProcessing/languages/he/config/internal/regularRootsPual.js.map +1 -0
- package/build/languageProcessing/languages/he/config/passiveVoice/regularRootsHufal.js +15 -0
- package/build/languageProcessing/languages/he/config/passiveVoice/regularRootsHufal.js.map +1 -0
- package/build/languageProcessing/languages/he/config/passiveVoice/regularRootsNifal.js +15 -0
- package/build/languageProcessing/languages/he/config/passiveVoice/regularRootsNifal.js.map +1 -0
- package/build/languageProcessing/languages/he/config/passiveVoice/regularRootsPual.js +15 -0
- package/build/languageProcessing/languages/he/config/passiveVoice/regularRootsPual.js.map +1 -0
- package/build/languageProcessing/languages/he/config/prefixedFunctionWords.js +9 -0
- package/build/languageProcessing/languages/he/config/prefixedFunctionWords.js.map +1 -0
- package/build/languageProcessing/languages/he/config/sentenceLength.js +10 -0
- package/build/languageProcessing/languages/he/config/sentenceLength.js.map +1 -0
- package/build/languageProcessing/languages/he/config/transitionWords.js +13 -0
- package/build/languageProcessing/languages/he/config/transitionWords.js.map +1 -0
- package/build/languageProcessing/languages/he/config/twoPartTransitionWords.js +13 -0
- package/build/languageProcessing/languages/he/config/twoPartTransitionWords.js.map +1 -0
- package/build/languageProcessing/languages/he/helpers/createBasicWordForms.js +40 -0
- package/build/languageProcessing/languages/he/helpers/createBasicWordForms.js.map +1 -0
- package/build/languageProcessing/languages/he/helpers/getStemmer.js +28 -0
- package/build/languageProcessing/languages/he/helpers/getStemmer.js.map +1 -0
- package/build/languageProcessing/languages/he/helpers/internal/stem.js +59 -0
- package/build/languageProcessing/languages/he/helpers/internal/stem.js.map +1 -0
- package/build/languageProcessing/languages/he/helpers/isPassiveSentence.js +122 -0
- package/build/languageProcessing/languages/he/helpers/isPassiveSentence.js.map +1 -0
- package/build/languageProcessing/languages/he/helpers/stem.js +59 -0
- package/build/languageProcessing/languages/he/helpers/stem.js.map +1 -0
- package/build/languageProcessing/languages/hu/Researcher.js +57 -0
- package/build/languageProcessing/languages/hu/Researcher.js.map +1 -0
- package/build/languageProcessing/languages/hu/config/firstWordExceptions.js +32 -0
- package/build/languageProcessing/languages/hu/config/firstWordExceptions.js.map +1 -0
- package/build/languageProcessing/languages/hu/config/functionWords.js +52 -0
- package/build/languageProcessing/languages/hu/config/functionWords.js.map +1 -0
- package/build/languageProcessing/languages/hu/config/internal/auxiliaries.js +20 -0
- package/build/languageProcessing/languages/hu/config/internal/auxiliaries.js.map +1 -0
- package/build/languageProcessing/languages/hu/config/internal/morphologicalPassiveAffixes.js +12 -0
- package/build/languageProcessing/languages/hu/config/internal/morphologicalPassiveAffixes.js.map +1 -0
- package/build/languageProcessing/languages/hu/config/internal/nonPassivesInVaAndVe.js +25 -0
- package/build/languageProcessing/languages/hu/config/internal/nonPassivesInVaAndVe.js.map +1 -0
- package/build/languageProcessing/languages/hu/config/internal/odikVerbs.js +25 -0
- package/build/languageProcessing/languages/hu/config/internal/odikVerbs.js.map +1 -0
- package/build/languageProcessing/languages/hu/config/internal/participles.js +25 -0
- package/build/languageProcessing/languages/hu/config/internal/participles.js.map +1 -0
- package/build/languageProcessing/languages/hu/config/stopWords.js +29 -0
- package/build/languageProcessing/languages/hu/config/stopWords.js.map +1 -0
- package/build/languageProcessing/languages/hu/config/transitionWords.js +13 -0
- package/build/languageProcessing/languages/hu/config/transitionWords.js.map +1 -0
- package/build/languageProcessing/languages/hu/config/twoPartTransitionWords.js +13 -0
- package/build/languageProcessing/languages/hu/config/twoPartTransitionWords.js.map +1 -0
- package/build/languageProcessing/languages/hu/helpers/getClauses.js +34 -0
- package/build/languageProcessing/languages/hu/helpers/getClauses.js.map +1 -0
- package/build/languageProcessing/languages/hu/helpers/getStemmer.js +28 -0
- package/build/languageProcessing/languages/hu/helpers/getStemmer.js.map +1 -0
- package/build/languageProcessing/languages/hu/helpers/internal/getParticiples.js +25 -0
- package/build/languageProcessing/languages/hu/helpers/internal/getParticiples.js.map +1 -0
- package/build/languageProcessing/languages/hu/helpers/internal/stem.js +390 -0
- package/build/languageProcessing/languages/hu/helpers/internal/stem.js.map +1 -0
- package/build/languageProcessing/languages/hu/helpers/isPassiveSentence.js +53 -0
- package/build/languageProcessing/languages/hu/helpers/isPassiveSentence.js.map +1 -0
- package/build/languageProcessing/languages/hu/values/Clause.js +47 -0
- package/build/languageProcessing/languages/hu/values/Clause.js.map +1 -0
- package/build/languageProcessing/languages/id/Researcher.js +55 -0
- package/build/languageProcessing/languages/id/Researcher.js.map +1 -0
- package/build/languageProcessing/languages/id/config/firstWordExceptions.js +18 -0
- package/build/languageProcessing/languages/id/config/firstWordExceptions.js.map +1 -0
- package/build/languageProcessing/languages/id/config/functionWords.js +109 -0
- package/build/languageProcessing/languages/id/config/functionWords.js.map +1 -0
- package/build/languageProcessing/languages/id/config/internal/nonPassiveVerbsStartingDi.js +13 -0
- package/build/languageProcessing/languages/id/config/internal/nonPassiveVerbsStartingDi.js.map +1 -0
- package/build/languageProcessing/languages/id/config/transitionWords.js +30 -0
- package/build/languageProcessing/languages/id/config/transitionWords.js.map +1 -0
- package/build/languageProcessing/languages/id/config/twoPartTransitionWords.js +14 -0
- package/build/languageProcessing/languages/id/config/twoPartTransitionWords.js.map +1 -0
- package/build/languageProcessing/languages/id/helpers/getStemmer.js +28 -0
- package/build/languageProcessing/languages/id/helpers/getStemmer.js.map +1 -0
- package/build/languageProcessing/languages/id/helpers/internal/stem.js +394 -0
- package/build/languageProcessing/languages/id/helpers/internal/stem.js.map +1 -0
- package/build/languageProcessing/languages/id/helpers/internal/stemHelpers.js +86 -0
- package/build/languageProcessing/languages/id/helpers/internal/stemHelpers.js.map +1 -0
- package/build/languageProcessing/languages/id/helpers/isPassiveSentence.js +47 -0
- package/build/languageProcessing/languages/id/helpers/isPassiveSentence.js.map +1 -0
- package/build/languageProcessing/languages/id/helpers/splitIntoTokensCustom.js +53 -0
- package/build/languageProcessing/languages/id/helpers/splitIntoTokensCustom.js.map +1 -0
- package/build/languageProcessing/languages/it/Researcher.js +57 -0
- package/build/languageProcessing/languages/it/Researcher.js.map +1 -0
- package/build/languageProcessing/languages/it/config/firstWordExceptions.js +20 -0
- package/build/languageProcessing/languages/it/config/firstWordExceptions.js.map +1 -0
- package/build/languageProcessing/languages/it/config/functionWords.js +141 -0
- package/build/languageProcessing/languages/it/config/functionWords.js.map +1 -0
- package/build/languageProcessing/languages/it/config/internal/passiveVoiceAuxiliaries.js +12 -0
- package/build/languageProcessing/languages/it/config/internal/passiveVoiceAuxiliaries.js.map +1 -0
- package/build/languageProcessing/languages/it/config/internal/passiveVoiceParticiples.js +13 -0
- package/build/languageProcessing/languages/it/config/internal/passiveVoiceParticiples.js.map +1 -0
- package/build/languageProcessing/languages/it/config/sentenceLength.js +10 -0
- package/build/languageProcessing/languages/it/config/sentenceLength.js.map +1 -0
- package/build/languageProcessing/languages/it/config/stopWords.js +12 -0
- package/build/languageProcessing/languages/it/config/stopWords.js.map +1 -0
- package/build/languageProcessing/languages/it/config/syllables.json +573 -0
- package/build/languageProcessing/languages/it/config/transitionWords.js +13 -0
- package/build/languageProcessing/languages/it/config/transitionWords.js.map +1 -0
- package/build/languageProcessing/languages/it/config/twoPartTransitionWords.js +12 -0
- package/build/languageProcessing/languages/it/config/twoPartTransitionWords.js.map +1 -0
- package/build/languageProcessing/languages/it/helpers/calculateFleschReadingScore.js +23 -0
- package/build/languageProcessing/languages/it/helpers/calculateFleschReadingScore.js.map +1 -0
- package/build/languageProcessing/languages/it/helpers/getClauses.js +40 -0
- package/build/languageProcessing/languages/it/helpers/getClauses.js.map +1 -0
- package/build/languageProcessing/languages/it/helpers/getStemmer.js +28 -0
- package/build/languageProcessing/languages/it/helpers/getStemmer.js.map +1 -0
- package/build/languageProcessing/languages/it/helpers/internal/getParticiples.js +42 -0
- package/build/languageProcessing/languages/it/helpers/internal/getParticiples.js.map +1 -0
- package/build/languageProcessing/languages/it/helpers/internal/stem.js +408 -0
- package/build/languageProcessing/languages/it/helpers/internal/stem.js.map +1 -0
- package/build/languageProcessing/languages/it/values/Clause.js +51 -0
- package/build/languageProcessing/languages/it/values/Clause.js.map +1 -0
- package/build/languageProcessing/languages/ja/Researcher.js +94 -0
- package/build/languageProcessing/languages/ja/Researcher.js.map +1 -0
- package/build/languageProcessing/languages/ja/config/assessmentApplicabilityCharacterCount.js +11 -0
- package/build/languageProcessing/languages/ja/config/assessmentApplicabilityCharacterCount.js.map +1 -0
- package/build/languageProcessing/languages/ja/config/firstWordExceptions.js +14 -0
- package/build/languageProcessing/languages/ja/config/firstWordExceptions.js.map +1 -0
- package/build/languageProcessing/languages/ja/config/functionWords.js +8 -0
- package/build/languageProcessing/languages/ja/config/functionWords.js.map +1 -0
- package/build/languageProcessing/languages/ja/config/keyphraseLength.js +23 -0
- package/build/languageProcessing/languages/ja/config/keyphraseLength.js.map +1 -0
- package/build/languageProcessing/languages/ja/config/metaDescriptionLength.js +11 -0
- package/build/languageProcessing/languages/ja/config/metaDescriptionLength.js.map +1 -0
- package/build/languageProcessing/languages/ja/config/paragraphLength.js +17 -0
- package/build/languageProcessing/languages/ja/config/paragraphLength.js.map +1 -0
- package/build/languageProcessing/languages/ja/config/sentenceLength.js +11 -0
- package/build/languageProcessing/languages/ja/config/sentenceLength.js.map +1 -0
- package/build/languageProcessing/languages/ja/config/subheadingsTooLong.js +25 -0
- package/build/languageProcessing/languages/ja/config/subheadingsTooLong.js.map +1 -0
- package/build/languageProcessing/languages/ja/config/textLength.js +54 -0
- package/build/languageProcessing/languages/ja/config/textLength.js.map +1 -0
- package/build/languageProcessing/languages/ja/config/topicLength.js +12 -0
- package/build/languageProcessing/languages/ja/config/topicLength.js.map +1 -0
- package/build/languageProcessing/languages/ja/config/transitionWords.js +9 -0
- package/build/languageProcessing/languages/ja/config/transitionWords.js.map +1 -0
- package/build/languageProcessing/languages/ja/customResearches/findKeyphraseInSEOTitle.js +102 -0
- package/build/languageProcessing/languages/ja/customResearches/findKeyphraseInSEOTitle.js.map +1 -0
- package/build/languageProcessing/languages/ja/customResearches/getKeyphraseLength.js +25 -0
- package/build/languageProcessing/languages/ja/customResearches/getKeyphraseLength.js.map +1 -0
- package/build/languageProcessing/languages/ja/customResearches/getWordForms.js +57 -0
- package/build/languageProcessing/languages/ja/customResearches/getWordForms.js.map +1 -0
- package/build/languageProcessing/languages/ja/customResearches/textLength.js +31 -0
- package/build/languageProcessing/languages/ja/customResearches/textLength.js.map +1 -0
- package/build/languageProcessing/languages/ja/helpers/countCharacters.js +27 -0
- package/build/languageProcessing/languages/ja/helpers/countCharacters.js.map +1 -0
- package/build/languageProcessing/languages/ja/helpers/customGetStemmer.js +28 -0
- package/build/languageProcessing/languages/ja/helpers/customGetStemmer.js.map +1 -0
- package/build/languageProcessing/languages/ja/helpers/getContentWords.js +27 -0
- package/build/languageProcessing/languages/ja/helpers/getContentWords.js.map +1 -0
- package/build/languageProcessing/languages/ja/helpers/getWords.js +38 -0
- package/build/languageProcessing/languages/ja/helpers/getWords.js.map +1 -0
- package/build/languageProcessing/languages/ja/helpers/internal/SentenceTokenizer.js +99 -0
- package/build/languageProcessing/languages/ja/helpers/internal/SentenceTokenizer.js.map +1 -0
- package/build/languageProcessing/languages/ja/helpers/internal/createWordForms.js +70 -0
- package/build/languageProcessing/languages/ja/helpers/internal/createWordForms.js.map +1 -0
- package/build/languageProcessing/languages/ja/helpers/internal/determineStem.js +23 -0
- package/build/languageProcessing/languages/ja/helpers/internal/determineStem.js.map +1 -0
- package/build/languageProcessing/languages/ja/helpers/matchTextWithWord.js +58 -0
- package/build/languageProcessing/languages/ja/helpers/matchTextWithWord.js.map +1 -0
- package/build/languageProcessing/languages/ja/helpers/matchTransitionWords.js +29 -0
- package/build/languageProcessing/languages/ja/helpers/matchTransitionWords.js.map +1 -0
- package/build/languageProcessing/languages/ja/helpers/memoizedSentenceTokenizer.js +37 -0
- package/build/languageProcessing/languages/ja/helpers/memoizedSentenceTokenizer.js.map +1 -0
- package/build/languageProcessing/languages/ja/helpers/splitIntoTokensCustom.js +27 -0
- package/build/languageProcessing/languages/ja/helpers/splitIntoTokensCustom.js.map +1 -0
- package/build/languageProcessing/languages/ja/helpers/wordsCharacterCount.js +19 -0
- package/build/languageProcessing/languages/ja/helpers/wordsCharacterCount.js.map +1 -0
- package/build/languageProcessing/languages/nb/Researcher.js +54 -0
- package/build/languageProcessing/languages/nb/Researcher.js.map +1 -0
- package/build/languageProcessing/languages/nb/config/firstWordExceptions.js +18 -0
- package/build/languageProcessing/languages/nb/config/firstWordExceptions.js.map +1 -0
- package/build/languageProcessing/languages/nb/config/functionWords.js +54 -0
- package/build/languageProcessing/languages/nb/config/functionWords.js.map +1 -0
- package/build/languageProcessing/languages/nb/config/internal/participles.js +12 -0
- package/build/languageProcessing/languages/nb/config/internal/participles.js.map +1 -0
- package/build/languageProcessing/languages/nb/config/internal/passiveVoiceAuxiliaries.js +12 -0
- package/build/languageProcessing/languages/nb/config/internal/passiveVoiceAuxiliaries.js.map +1 -0
- package/build/languageProcessing/languages/nb/config/stopWords.js +13 -0
- package/build/languageProcessing/languages/nb/config/stopWords.js.map +1 -0
- package/build/languageProcessing/languages/nb/config/transitionWords.js +13 -0
- package/build/languageProcessing/languages/nb/config/transitionWords.js.map +1 -0
- package/build/languageProcessing/languages/nb/config/twoPartTransitionWords.js +13 -0
- package/build/languageProcessing/languages/nb/config/twoPartTransitionWords.js.map +1 -0
- package/build/languageProcessing/languages/nb/helpers/getClauses.js +37 -0
- package/build/languageProcessing/languages/nb/helpers/getClauses.js.map +1 -0
- package/build/languageProcessing/languages/nb/helpers/getStemmer.js +28 -0
- package/build/languageProcessing/languages/nb/helpers/getStemmer.js.map +1 -0
- package/build/languageProcessing/languages/nb/helpers/internal/getParticiples.js +31 -0
- package/build/languageProcessing/languages/nb/helpers/internal/getParticiples.js.map +1 -0
- package/build/languageProcessing/languages/nb/helpers/internal/stem.js +135 -0
- package/build/languageProcessing/languages/nb/helpers/internal/stem.js.map +1 -0
- package/build/languageProcessing/languages/nb/values/Clause.js +49 -0
- package/build/languageProcessing/languages/nb/values/Clause.js.map +1 -0
- package/build/languageProcessing/languages/nl/Researcher.js +57 -0
- package/build/languageProcessing/languages/nl/Researcher.js.map +1 -0
- package/build/languageProcessing/languages/nl/config/firstWordExceptions.js +20 -0
- package/build/languageProcessing/languages/nl/config/firstWordExceptions.js.map +1 -0
- package/build/languageProcessing/languages/nl/config/functionWords.js +102 -0
- package/build/languageProcessing/languages/nl/config/functionWords.js.map +1 -0
- package/build/languageProcessing/languages/nl/config/internal/nonParticiples.js +12 -0
- package/build/languageProcessing/languages/nl/config/internal/nonParticiples.js.map +1 -0
- package/build/languageProcessing/languages/nl/config/internal/passiveVoiceAuxiliaries.js +12 -0
- package/build/languageProcessing/languages/nl/config/internal/passiveVoiceAuxiliaries.js.map +1 -0
- package/build/languageProcessing/languages/nl/config/internal/passiveVoiceIrregulars.js +13 -0
- package/build/languageProcessing/languages/nl/config/internal/passiveVoiceIrregulars.js.map +1 -0
- package/build/languageProcessing/languages/nl/config/keyphraseLength.js +17 -0
- package/build/languageProcessing/languages/nl/config/keyphraseLength.js.map +1 -0
- package/build/languageProcessing/languages/nl/config/stopWords.js +12 -0
- package/build/languageProcessing/languages/nl/config/stopWords.js.map +1 -0
- package/build/languageProcessing/languages/nl/config/syllables.json +343 -0
- package/build/languageProcessing/languages/nl/config/transitionWords.js +11 -0
- package/build/languageProcessing/languages/nl/config/transitionWords.js.map +1 -0
- package/build/languageProcessing/languages/nl/config/twoPartTransitionWords.js +12 -0
- package/build/languageProcessing/languages/nl/config/twoPartTransitionWords.js.map +1 -0
- package/build/languageProcessing/languages/nl/helpers/calculateFleschReadingScore.js +23 -0
- package/build/languageProcessing/languages/nl/helpers/calculateFleschReadingScore.js.map +1 -0
- package/build/languageProcessing/languages/nl/helpers/getClauses.js +34 -0
- package/build/languageProcessing/languages/nl/helpers/getClauses.js.map +1 -0
- package/build/languageProcessing/languages/nl/helpers/getStemmer.js +28 -0
- package/build/languageProcessing/languages/nl/helpers/getStemmer.js.map +1 -0
- package/build/languageProcessing/languages/nl/helpers/internal/checkExceptionsWithFullForms.js +124 -0
- package/build/languageProcessing/languages/nl/helpers/internal/checkExceptionsWithFullForms.js.map +1 -0
- package/build/languageProcessing/languages/nl/helpers/internal/detectAndStemRegularParticiple.js +260 -0
- package/build/languageProcessing/languages/nl/helpers/internal/detectAndStemRegularParticiple.js.map +1 -0
- package/build/languageProcessing/languages/nl/helpers/internal/detectAndStemSuffixes.js +157 -0
- package/build/languageProcessing/languages/nl/helpers/internal/detectAndStemSuffixes.js.map +1 -0
- package/build/languageProcessing/languages/nl/helpers/internal/determineStem.js +120 -0
- package/build/languageProcessing/languages/nl/helpers/internal/determineStem.js.map +1 -0
- package/build/languageProcessing/languages/nl/helpers/internal/getParticiples.js +27 -0
- package/build/languageProcessing/languages/nl/helpers/internal/getParticiples.js.map +1 -0
- package/build/languageProcessing/languages/nl/helpers/internal/getStemWordsWithTAndDEnding.js +152 -0
- package/build/languageProcessing/languages/nl/helpers/internal/getStemWordsWithTAndDEnding.js.map +1 -0
- package/build/languageProcessing/languages/nl/helpers/internal/stem.js +131 -0
- package/build/languageProcessing/languages/nl/helpers/internal/stem.js.map +1 -0
- package/build/languageProcessing/languages/nl/helpers/internal/stemModificationHelpers.js +94 -0
- package/build/languageProcessing/languages/nl/helpers/internal/stemModificationHelpers.js.map +1 -0
- package/build/languageProcessing/languages/nl/helpers/internal/stemTOrDFromEndOfWord.js +59 -0
- package/build/languageProcessing/languages/nl/helpers/internal/stemTOrDFromEndOfWord.js.map +1 -0
- package/build/languageProcessing/languages/nl/values/Clause.js +63 -0
- package/build/languageProcessing/languages/nl/values/Clause.js.map +1 -0
- package/build/languageProcessing/languages/pl/Researcher.js +56 -0
- package/build/languageProcessing/languages/pl/Researcher.js.map +1 -0
- package/build/languageProcessing/languages/pl/config/firstWordExceptions.js +16 -0
- package/build/languageProcessing/languages/pl/config/firstWordExceptions.js.map +1 -0
- package/build/languageProcessing/languages/pl/config/functionWords.js +78 -0
- package/build/languageProcessing/languages/pl/config/functionWords.js.map +1 -0
- package/build/languageProcessing/languages/pl/config/internal/auxiliaries.js +12 -0
- package/build/languageProcessing/languages/pl/config/internal/auxiliaries.js.map +1 -0
- package/build/languageProcessing/languages/pl/config/internal/participles.js +13 -0
- package/build/languageProcessing/languages/pl/config/internal/participles.js.map +1 -0
- package/build/languageProcessing/languages/pl/config/sentenceLength.js +17 -0
- package/build/languageProcessing/languages/pl/config/sentenceLength.js.map +1 -0
- package/build/languageProcessing/languages/pl/config/stopWords.js +12 -0
- package/build/languageProcessing/languages/pl/config/stopWords.js.map +1 -0
- package/build/languageProcessing/languages/pl/config/transitionWords.js +13 -0
- package/build/languageProcessing/languages/pl/config/transitionWords.js.map +1 -0
- package/build/languageProcessing/languages/pl/config/twoPartTransitionWords.js +13 -0
- package/build/languageProcessing/languages/pl/config/twoPartTransitionWords.js.map +1 -0
- package/build/languageProcessing/languages/pl/helpers/getClauses.js +34 -0
- package/build/languageProcessing/languages/pl/helpers/getClauses.js.map +1 -0
- package/build/languageProcessing/languages/pl/helpers/getStemmer.js +28 -0
- package/build/languageProcessing/languages/pl/helpers/getStemmer.js.map +1 -0
- package/build/languageProcessing/languages/pl/helpers/internal/getParticiples.js +25 -0
- package/build/languageProcessing/languages/pl/helpers/internal/getParticiples.js.map +1 -0
- package/build/languageProcessing/languages/pl/helpers/internal/stem.js +158 -0
- package/build/languageProcessing/languages/pl/helpers/internal/stem.js.map +1 -0
- package/build/languageProcessing/languages/pl/values/Clause.js +51 -0
- package/build/languageProcessing/languages/pl/values/Clause.js.map +1 -0
- package/build/languageProcessing/languages/pt/Researcher.js +57 -0
- package/build/languageProcessing/languages/pt/Researcher.js.map +1 -0
- package/build/languageProcessing/languages/pt/config/firstWordExceptions.js +20 -0
- package/build/languageProcessing/languages/pt/config/firstWordExceptions.js.map +1 -0
- package/build/languageProcessing/languages/pt/config/functionWords.js +98 -0
- package/build/languageProcessing/languages/pt/config/functionWords.js.map +1 -0
- package/build/languageProcessing/languages/pt/config/internal/passiveVoiceAuxiliaries.js +12 -0
- package/build/languageProcessing/languages/pt/config/internal/passiveVoiceAuxiliaries.js.map +1 -0
- package/build/languageProcessing/languages/pt/config/internal/passiveVoiceParticiples.js +13 -0
- package/build/languageProcessing/languages/pt/config/internal/passiveVoiceParticiples.js.map +1 -0
- package/build/languageProcessing/languages/pt/config/sentenceLength.js +10 -0
- package/build/languageProcessing/languages/pt/config/sentenceLength.js.map +1 -0
- package/build/languageProcessing/languages/pt/config/stopWords.js +12 -0
- package/build/languageProcessing/languages/pt/config/stopWords.js.map +1 -0
- package/build/languageProcessing/languages/pt/config/syllables.json +38 -0
- package/build/languageProcessing/languages/pt/config/transitionWords.js +11 -0
- package/build/languageProcessing/languages/pt/config/transitionWords.js.map +1 -0
- package/build/languageProcessing/languages/pt/config/twoPartTransitionWords.js +12 -0
- package/build/languageProcessing/languages/pt/config/twoPartTransitionWords.js.map +1 -0
- package/build/languageProcessing/languages/pt/helpers/calculateFleschReadingScore.js +23 -0
- package/build/languageProcessing/languages/pt/helpers/calculateFleschReadingScore.js.map +1 -0
- package/build/languageProcessing/languages/pt/helpers/getClauses.js +38 -0
- package/build/languageProcessing/languages/pt/helpers/getClauses.js.map +1 -0
- package/build/languageProcessing/languages/pt/helpers/getStemmer.js +28 -0
- package/build/languageProcessing/languages/pt/helpers/getStemmer.js.map +1 -0
- package/build/languageProcessing/languages/pt/helpers/internal/getParticiples.js +43 -0
- package/build/languageProcessing/languages/pt/helpers/internal/getParticiples.js.map +1 -0
- package/build/languageProcessing/languages/pt/helpers/internal/stem.js +283 -0
- package/build/languageProcessing/languages/pt/helpers/internal/stem.js.map +1 -0
- package/build/languageProcessing/languages/pt/values/Clause.js +50 -0
- package/build/languageProcessing/languages/pt/values/Clause.js.map +1 -0
- package/build/languageProcessing/languages/ru/Researcher.js +57 -0
- package/build/languageProcessing/languages/ru/Researcher.js.map +1 -0
- package/build/languageProcessing/languages/ru/config/firstWordExceptions.js +16 -0
- package/build/languageProcessing/languages/ru/config/firstWordExceptions.js.map +1 -0
- package/build/languageProcessing/languages/ru/config/fleschReadingEaseScores.js +27 -0
- package/build/languageProcessing/languages/ru/config/fleschReadingEaseScores.js.map +1 -0
- package/build/languageProcessing/languages/ru/config/functionWords.js +91 -0
- package/build/languageProcessing/languages/ru/config/functionWords.js.map +1 -0
- package/build/languageProcessing/languages/ru/config/internal/participlesShortenedList.js +27 -0
- package/build/languageProcessing/languages/ru/config/internal/participlesShortenedList.js.map +1 -0
- package/build/languageProcessing/languages/ru/config/internal/passiveVoiceParticiples.js +24 -0
- package/build/languageProcessing/languages/ru/config/internal/passiveVoiceParticiples.js.map +1 -0
- package/build/languageProcessing/languages/ru/config/sentenceLength.js +10 -0
- package/build/languageProcessing/languages/ru/config/sentenceLength.js.map +1 -0
- package/build/languageProcessing/languages/ru/config/syllables.json +19 -0
- package/build/languageProcessing/languages/ru/config/transitionWords.js +13 -0
- package/build/languageProcessing/languages/ru/config/transitionWords.js.map +1 -0
- package/build/languageProcessing/languages/ru/config/twoPartTransitionWords.js +13 -0
- package/build/languageProcessing/languages/ru/config/twoPartTransitionWords.js.map +1 -0
- package/build/languageProcessing/languages/ru/helpers/calculateFleschReadingScore.js +23 -0
- package/build/languageProcessing/languages/ru/helpers/calculateFleschReadingScore.js.map +1 -0
- package/build/languageProcessing/languages/ru/helpers/getStemmer.js +28 -0
- package/build/languageProcessing/languages/ru/helpers/getStemmer.js.map +1 -0
- package/build/languageProcessing/languages/ru/helpers/internal/stem.js +271 -0
- package/build/languageProcessing/languages/ru/helpers/internal/stem.js.map +1 -0
- package/build/languageProcessing/languages/ru/helpers/isPassiveSentence.js +22 -0
- package/build/languageProcessing/languages/ru/helpers/isPassiveSentence.js.map +1 -0
- package/build/languageProcessing/languages/sk/Researcher.js +55 -0
- package/build/languageProcessing/languages/sk/Researcher.js.map +1 -0
- package/build/languageProcessing/languages/sk/config/firstWordExceptions.js +18 -0
- package/build/languageProcessing/languages/sk/config/firstWordExceptions.js.map +1 -0
- package/build/languageProcessing/languages/sk/config/functionWords.js +18 -0
- package/build/languageProcessing/languages/sk/config/functionWords.js.map +1 -0
- package/build/languageProcessing/languages/sk/config/internal/nonPassives.js +14 -0
- package/build/languageProcessing/languages/sk/config/internal/nonPassives.js.map +1 -0
- package/build/languageProcessing/languages/sk/config/internal/passiveVoiceAuxiliaries.js +10 -0
- package/build/languageProcessing/languages/sk/config/internal/passiveVoiceAuxiliaries.js.map +1 -0
- package/build/languageProcessing/languages/sk/config/stopWords.js +13 -0
- package/build/languageProcessing/languages/sk/config/stopWords.js.map +1 -0
- package/build/languageProcessing/languages/sk/config/transitionWords.js +13 -0
- package/build/languageProcessing/languages/sk/config/transitionWords.js.map +1 -0
- package/build/languageProcessing/languages/sk/config/twoPartTransitionWords.js +13 -0
- package/build/languageProcessing/languages/sk/config/twoPartTransitionWords.js.map +1 -0
- package/build/languageProcessing/languages/sk/helpers/getClauses.js +35 -0
- package/build/languageProcessing/languages/sk/helpers/getClauses.js.map +1 -0
- package/build/languageProcessing/languages/sk/helpers/getStemmer.js +28 -0
- package/build/languageProcessing/languages/sk/helpers/getStemmer.js.map +1 -0
- package/build/languageProcessing/languages/sk/helpers/internal/getParticiples.js +24 -0
- package/build/languageProcessing/languages/sk/helpers/internal/getParticiples.js.map +1 -0
- package/build/languageProcessing/languages/sk/helpers/internal/stem.js +322 -0
- package/build/languageProcessing/languages/sk/helpers/internal/stem.js.map +1 -0
- package/build/languageProcessing/languages/sk/values/Clause.js +47 -0
- package/build/languageProcessing/languages/sk/values/Clause.js.map +1 -0
- package/build/languageProcessing/languages/sv/Researcher.js +54 -0
- package/build/languageProcessing/languages/sv/Researcher.js.map +1 -0
- package/build/languageProcessing/languages/sv/config/firstWordExceptions.js +21 -0
- package/build/languageProcessing/languages/sv/config/firstWordExceptions.js.map +1 -0
- package/build/languageProcessing/languages/sv/config/functionWords.js +74 -0
- package/build/languageProcessing/languages/sv/config/functionWords.js.map +1 -0
- package/build/languageProcessing/languages/sv/config/internal/passiveVerbs.js +12 -0
- package/build/languageProcessing/languages/sv/config/internal/passiveVerbs.js.map +1 -0
- package/build/languageProcessing/languages/sv/config/keyphraseLength.js +17 -0
- package/build/languageProcessing/languages/sv/config/keyphraseLength.js.map +1 -0
- package/build/languageProcessing/languages/sv/config/transitionWords.js +13 -0
- package/build/languageProcessing/languages/sv/config/transitionWords.js.map +1 -0
- package/build/languageProcessing/languages/sv/config/twoPartTransitionWords.js +13 -0
- package/build/languageProcessing/languages/sv/config/twoPartTransitionWords.js.map +1 -0
- package/build/languageProcessing/languages/sv/helpers/getStemmer.js +28 -0
- package/build/languageProcessing/languages/sv/helpers/getStemmer.js.map +1 -0
- package/build/languageProcessing/languages/sv/helpers/internal/stem.js +159 -0
- package/build/languageProcessing/languages/sv/helpers/internal/stem.js.map +1 -0
- package/build/languageProcessing/languages/sv/helpers/isPassiveSentence.js +22 -0
- package/build/languageProcessing/languages/sv/helpers/isPassiveSentence.js.map +1 -0
- package/build/languageProcessing/languages/tr/Researcher.js +52 -0
- package/build/languageProcessing/languages/tr/Researcher.js.map +1 -0
- package/build/languageProcessing/languages/tr/config/firstWordExceptions.js +18 -0
- package/build/languageProcessing/languages/tr/config/firstWordExceptions.js.map +1 -0
- package/build/languageProcessing/languages/tr/config/functionWords.js +51 -0
- package/build/languageProcessing/languages/tr/config/functionWords.js.map +1 -0
- package/build/languageProcessing/languages/tr/config/internal/nonPassiveExceptions.js +13 -0
- package/build/languageProcessing/languages/tr/config/internal/nonPassiveExceptions.js.map +1 -0
- package/build/languageProcessing/languages/tr/config/internal/passiveEndings.js +13 -0
- package/build/languageProcessing/languages/tr/config/internal/passiveEndings.js.map +1 -0
- package/build/languageProcessing/languages/tr/config/sentenceLength.js +14 -0
- package/build/languageProcessing/languages/tr/config/sentenceLength.js.map +1 -0
- package/build/languageProcessing/languages/tr/config/transitionWords.js +13 -0
- package/build/languageProcessing/languages/tr/config/transitionWords.js.map +1 -0
- package/build/languageProcessing/languages/tr/config/twoPartTransitionWords.js +13 -0
- package/build/languageProcessing/languages/tr/config/twoPartTransitionWords.js.map +1 -0
- package/build/languageProcessing/languages/tr/helpers/getStemmer.js +28 -0
- package/build/languageProcessing/languages/tr/helpers/getStemmer.js.map +1 -0
- package/build/languageProcessing/languages/tr/helpers/internal/stem.js +25 -0
- package/build/languageProcessing/languages/tr/helpers/internal/stem.js.map +1 -0
- package/build/languageProcessing/languages/tr/helpers/isPassiveSentence.js +46 -0
- package/build/languageProcessing/languages/tr/helpers/isPassiveSentence.js.map +1 -0
- package/build/languageProcessing/researches/altTagCount.js +72 -0
- package/build/languageProcessing/researches/altTagCount.js.map +1 -0
- package/build/languageProcessing/researches/countSentencesFromText.js +26 -0
- package/build/languageProcessing/researches/countSentencesFromText.js.map +1 -0
- package/build/languageProcessing/researches/findKeyphraseInSEOTitle.js +257 -0
- package/build/languageProcessing/researches/findKeyphraseInSEOTitle.js.map +1 -0
- package/build/languageProcessing/researches/findKeywordInFirstParagraph.js +80 -0
- package/build/languageProcessing/researches/findKeywordInFirstParagraph.js.map +1 -0
- package/build/languageProcessing/researches/findTransitionWords.js +119 -0
- package/build/languageProcessing/researches/findTransitionWords.js.map +1 -0
- package/build/languageProcessing/researches/functionWordsInKeyphrase.js +48 -0
- package/build/languageProcessing/researches/functionWordsInKeyphrase.js.map +1 -0
- package/build/languageProcessing/researches/getAnchorsWithKeyphrase.js +222 -0
- package/build/languageProcessing/researches/getAnchorsWithKeyphrase.js.map +1 -0
- package/build/languageProcessing/researches/getFleschReadingScore.js +152 -0
- package/build/languageProcessing/researches/getFleschReadingScore.js.map +1 -0
- package/build/languageProcessing/researches/getKeywordDensity.js +49 -0
- package/build/languageProcessing/researches/getKeywordDensity.js.map +1 -0
- package/build/languageProcessing/researches/getLinkStatistics.js +56 -0
- package/build/languageProcessing/researches/getLinkStatistics.js.map +1 -0
- package/build/languageProcessing/researches/getLinks.js +23 -0
- package/build/languageProcessing/researches/getLinks.js.map +1 -0
- package/build/languageProcessing/researches/getLongCenterAlignedTexts.js +42 -0
- package/build/languageProcessing/researches/getLongCenterAlignedTexts.js.map +1 -0
- package/build/languageProcessing/researches/getParagraphLength.js +49 -0
- package/build/languageProcessing/researches/getParagraphLength.js.map +1 -0
- package/build/languageProcessing/researches/getParagraphs.js +23 -0
- package/build/languageProcessing/researches/getParagraphs.js.map +1 -0
- package/build/languageProcessing/researches/getPassiveVoiceResult.js +127 -0
- package/build/languageProcessing/researches/getPassiveVoiceResult.js.map +1 -0
- package/build/languageProcessing/researches/getProminentWordsForInsights.js +45 -0
- package/build/languageProcessing/researches/getProminentWordsForInsights.js.map +1 -0
- package/build/languageProcessing/researches/getProminentWordsForInternalLinking.js +103 -0
- package/build/languageProcessing/researches/getProminentWordsForInternalLinking.js.map +1 -0
- package/build/languageProcessing/researches/getSentenceBeginnings.js +122 -0
- package/build/languageProcessing/researches/getSentenceBeginnings.js.map +1 -0
- package/build/languageProcessing/researches/getSubheadingTextLengths.js +60 -0
- package/build/languageProcessing/researches/getSubheadingTextLengths.js.map +1 -0
- package/build/languageProcessing/researches/getWordForms.js +183 -0
- package/build/languageProcessing/researches/getWordForms.js.map +1 -0
- package/build/languageProcessing/researches/h1s.js +17 -0
- package/build/languageProcessing/researches/h1s.js.map +1 -0
- package/build/languageProcessing/researches/imageCount.js +22 -0
- package/build/languageProcessing/researches/imageCount.js.map +1 -0
- package/build/languageProcessing/researches/index.js +28 -0
- package/build/languageProcessing/researches/index.js.map +1 -0
- package/build/languageProcessing/researches/keyphraseDistribution.js +233 -0
- package/build/languageProcessing/researches/keyphraseDistribution.js.map +1 -0
- package/build/languageProcessing/researches/keyphraseLength.js +23 -0
- package/build/languageProcessing/researches/keyphraseLength.js.map +1 -0
- package/build/languageProcessing/researches/keywordCount.js +135 -0
- package/build/languageProcessing/researches/keywordCount.js.map +1 -0
- package/build/languageProcessing/researches/keywordCountInUrl.js +58 -0
- package/build/languageProcessing/researches/keywordCountInUrl.js.map +1 -0
- package/build/languageProcessing/researches/matchKeywordInSubheadings.js +68 -0
- package/build/languageProcessing/researches/matchKeywordInSubheadings.js.map +1 -0
- package/build/languageProcessing/researches/metaDescriptionKeyword.js +78 -0
- package/build/languageProcessing/researches/metaDescriptionKeyword.js.map +1 -0
- package/build/languageProcessing/researches/metaDescriptionLength.js +19 -0
- package/build/languageProcessing/researches/metaDescriptionLength.js.map +1 -0
- package/build/languageProcessing/researches/pageTitleWidth.js +18 -0
- package/build/languageProcessing/researches/pageTitleWidth.js.map +1 -0
- package/build/languageProcessing/researches/readingTime.js +84 -0
- package/build/languageProcessing/researches/readingTime.js.map +1 -0
- package/build/languageProcessing/researches/sentences.js +26 -0
- package/build/languageProcessing/researches/sentences.js.map +1 -0
- package/build/languageProcessing/researches/videoCount.js +39 -0
- package/build/languageProcessing/researches/videoCount.js.map +1 -0
- package/build/languageProcessing/researches/wordComplexity.js +128 -0
- package/build/languageProcessing/researches/wordComplexity.js.map +1 -0
- package/build/languageProcessing/researches/wordCountInText.js +36 -0
- package/build/languageProcessing/researches/wordCountInText.js.map +1 -0
- package/build/languageProcessing/values/Clause.js +113 -0
- package/build/languageProcessing/values/Clause.js.map +1 -0
- package/build/languageProcessing/values/ProminentWord.js +101 -0
- package/build/languageProcessing/values/ProminentWord.js.map +1 -0
- package/build/languageProcessing/values/Sentence.js +116 -0
- package/build/languageProcessing/values/Sentence.js.map +1 -0
- package/build/languageProcessing/values/index.js +28 -0
- package/build/languageProcessing/values/index.js.map +1 -0
- package/build/markers/addMark.js +16 -0
- package/build/markers/addMark.js.map +1 -0
- package/build/markers/addMarkSingleWord.js +37 -0
- package/build/markers/addMarkSingleWord.js.map +1 -0
- package/build/markers/index.js +21 -0
- package/build/markers/index.js.map +1 -0
- package/build/markers/removeDuplicateMarks.js +31 -0
- package/build/markers/removeDuplicateMarks.js.map +1 -0
- package/build/markers/removeMarks.js +16 -0
- package/build/markers/removeMarks.js.map +1 -0
- package/build/parse/build/build.js +62 -0
- package/build/parse/build/build.js.map +1 -0
- package/build/parse/build/index.js +14 -0
- package/build/parse/build/index.js.map +1 -0
- package/build/parse/build/private/adapt.js +111 -0
- package/build/parse/build/private/adapt.js.map +1 -0
- package/build/parse/build/private/adaptAttributes.js +41 -0
- package/build/parse/build/private/adaptAttributes.js.map +1 -0
- package/build/parse/build/private/alwaysFilterElements.js +32 -0
- package/build/parse/build/private/alwaysFilterElements.js.map +1 -0
- package/build/parse/build/private/combineIntoImplicitParagraphs.js +129 -0
- package/build/parse/build/private/combineIntoImplicitParagraphs.js.map +1 -0
- package/build/parse/build/private/filterBeforeTokenizing.js +37 -0
- package/build/parse/build/private/filterBeforeTokenizing.js.map +1 -0
- package/build/parse/build/private/filterHelpers.js +52 -0
- package/build/parse/build/private/filterHelpers.js.map +1 -0
- package/build/parse/build/private/filterTree.js +47 -0
- package/build/parse/build/private/filterTree.js.map +1 -0
- package/build/parse/build/private/getTextElementPositions.js +184 -0
- package/build/parse/build/private/getTextElementPositions.js.map +1 -0
- package/build/parse/build/private/helpers/parseClassAttribute.js +15 -0
- package/build/parse/build/private/helpers/parseClassAttribute.js.map +1 -0
- package/build/parse/build/private/isPhrasingContent.js +30 -0
- package/build/parse/build/private/isPhrasingContent.js.map +1 -0
- package/build/parse/build/private/parseBlocks.js +151 -0
- package/build/parse/build/private/parseBlocks.js.map +1 -0
- package/build/parse/build/private/tokenize.js +78 -0
- package/build/parse/build/private/tokenize.js.map +1 -0
- package/build/parse/language/LanguageProcessor.js +77 -0
- package/build/parse/language/LanguageProcessor.js.map +1 -0
- package/build/parse/structure/Heading.js +32 -0
- package/build/parse/structure/Heading.js.map +1 -0
- package/build/parse/structure/Node.js +75 -0
- package/build/parse/structure/Node.js.map +1 -0
- package/build/parse/structure/Paragraph.js +53 -0
- package/build/parse/structure/Paragraph.js.map +1 -0
- package/build/parse/structure/Sentence.js +36 -0
- package/build/parse/structure/Sentence.js.map +1 -0
- package/build/parse/structure/SourceCodeLocation.js +46 -0
- package/build/parse/structure/SourceCodeLocation.js.map +1 -0
- package/build/parse/structure/Text.js +33 -0
- package/build/parse/structure/Text.js.map +1 -0
- package/build/parse/structure/Token.js +29 -0
- package/build/parse/structure/Token.js.map +1 -0
- package/build/parse/structure/index.js +35 -0
- package/build/parse/structure/index.js.map +1 -0
- package/build/parse/traverse/findAllInTree.js +62 -0
- package/build/parse/traverse/findAllInTree.js.map +1 -0
- package/build/parse/traverse/index.js +21 -0
- package/build/parse/traverse/index.js.map +1 -0
- package/build/parse/traverse/innerText.js +30 -0
- package/build/parse/traverse/innerText.js.map +1 -0
- package/build/parsedPaper/ParsedPaper.js +100 -0
- package/build/parsedPaper/ParsedPaper.js.map +1 -0
- package/build/parsedPaper/assess/TreeAssessor.js +181 -0
- package/build/parsedPaper/assess/TreeAssessor.js.map +1 -0
- package/build/parsedPaper/assess/assessmentListFactories.js +77 -0
- package/build/parsedPaper/assess/assessmentListFactories.js.map +1 -0
- package/build/parsedPaper/assess/assessments/Assessment.js +86 -0
- package/build/parsedPaper/assess/assessments/Assessment.js.map +1 -0
- package/build/parsedPaper/assess/assessments/index.js +14 -0
- package/build/parsedPaper/assess/assessments/index.js.map +1 -0
- package/build/parsedPaper/assess/assessorFactories.js +104 -0
- package/build/parsedPaper/assess/assessorFactories.js.map +1 -0
- package/build/parsedPaper/assess/cornerstone/assessmentListFactories.js +51 -0
- package/build/parsedPaper/assess/cornerstone/assessmentListFactories.js.map +1 -0
- package/build/parsedPaper/assess/cornerstone/index.js +11 -0
- package/build/parsedPaper/assess/cornerstone/index.js.map +1 -0
- package/build/parsedPaper/assess/index.js +31 -0
- package/build/parsedPaper/assess/index.js.map +1 -0
- package/build/parsedPaper/build/PaperParser.js +103 -0
- package/build/parsedPaper/build/PaperParser.js.map +1 -0
- package/build/parsedPaper/build/linguisticParsing/Sentence.js +95 -0
- package/build/parsedPaper/build/linguisticParsing/Sentence.js.map +1 -0
- package/build/parsedPaper/build/linguisticParsing/SentenceTokenizer.js +294 -0
- package/build/parsedPaper/build/linguisticParsing/SentenceTokenizer.js.map +1 -0
- package/build/parsedPaper/build/linguisticParsing/parseText.js +26 -0
- package/build/parsedPaper/build/linguisticParsing/parseText.js.map +1 -0
- package/build/parsedPaper/build/tree/TreeBuilder.js +82 -0
- package/build/parsedPaper/build/tree/TreeBuilder.js.map +1 -0
- package/build/parsedPaper/build/tree/cleanup/calculateTextIndices.js +183 -0
- package/build/parsedPaper/build/tree/cleanup/calculateTextIndices.js.map +1 -0
- package/build/parsedPaper/build/tree/cleanup/getElementContent.js +27 -0
- package/build/parsedPaper/build/tree/cleanup/getElementContent.js.map +1 -0
- package/build/parsedPaper/build/tree/cleanup/postParsing.js +43 -0
- package/build/parsedPaper/build/tree/cleanup/postParsing.js.map +1 -0
- package/build/parsedPaper/build/tree/html/HTMLTreeConverter.js +226 -0
- package/build/parsedPaper/build/tree/html/HTMLTreeConverter.js.map +1 -0
- package/build/parsedPaper/build/tree/html/buildTree.js +36 -0
- package/build/parsedPaper/build/tree/html/buildTree.js.map +1 -0
- package/build/parsedPaper/build/tree/html/htmlConstants.js +35 -0
- package/build/parsedPaper/build/tree/html/htmlConstants.js.map +1 -0
- package/build/parsedPaper/build/tree/index.js +20 -0
- package/build/parsedPaper/build/tree/index.js.map +1 -0
- package/build/parsedPaper/build/tree/metadata/buildTree.js +36 -0
- package/build/parsedPaper/build/tree/metadata/buildTree.js.map +1 -0
- package/build/parsedPaper/research/TreeResearcher.js +136 -0
- package/build/parsedPaper/research/TreeResearcher.js.map +1 -0
- package/build/parsedPaper/research/index.js +14 -0
- package/build/parsedPaper/research/index.js.map +1 -0
- package/build/parsedPaper/research/researches/Headings.js +26 -0
- package/build/parsedPaper/research/researches/Headings.js.map +1 -0
- package/build/parsedPaper/research/researches/LinkStatistics.js +129 -0
- package/build/parsedPaper/research/researches/LinkStatistics.js.map +1 -0
- package/build/parsedPaper/research/researches/Research.js +58 -0
- package/build/parsedPaper/research/researches/Research.js.map +1 -0
- package/build/parsedPaper/research/researches/index.js +14 -0
- package/build/parsedPaper/research/researches/index.js.map +1 -0
- package/build/parsedPaper/structure/tree/FormattingElement.js +73 -0
- package/build/parsedPaper/structure/tree/FormattingElement.js.map +1 -0
- package/build/parsedPaper/structure/tree/SourceCodeLocation.js +48 -0
- package/build/parsedPaper/structure/tree/SourceCodeLocation.js.map +1 -0
- package/build/parsedPaper/structure/tree/TextContainer.js +89 -0
- package/build/parsedPaper/structure/tree/TextContainer.js.map +1 -0
- package/build/parsedPaper/structure/tree/index.js +76 -0
- package/build/parsedPaper/structure/tree/index.js.map +1 -0
- package/build/parsedPaper/structure/tree/nodes/Heading.js +33 -0
- package/build/parsedPaper/structure/tree/nodes/Heading.js.map +1 -0
- package/build/parsedPaper/structure/tree/nodes/LeafNode.js +82 -0
- package/build/parsedPaper/structure/tree/nodes/LeafNode.js.map +1 -0
- package/build/parsedPaper/structure/tree/nodes/List.js +54 -0
- package/build/parsedPaper/structure/tree/nodes/List.js.map +1 -0
- package/build/parsedPaper/structure/tree/nodes/ListItem.js +34 -0
- package/build/parsedPaper/structure/tree/nodes/ListItem.js.map +1 -0
- package/build/parsedPaper/structure/tree/nodes/MetadataMiscellaneous.js +51 -0
- package/build/parsedPaper/structure/tree/nodes/MetadataMiscellaneous.js.map +1 -0
- package/build/parsedPaper/structure/tree/nodes/MetadataText.js +31 -0
- package/build/parsedPaper/structure/tree/nodes/MetadataText.js.map +1 -0
- package/build/parsedPaper/structure/tree/nodes/Node.js +159 -0
- package/build/parsedPaper/structure/tree/nodes/Node.js.map +1 -0
- package/build/parsedPaper/structure/tree/nodes/Paragraph.js +29 -0
- package/build/parsedPaper/structure/tree/nodes/Paragraph.js.map +1 -0
- package/build/parsedPaper/structure/tree/nodes/StructuredNode.js +60 -0
- package/build/parsedPaper/structure/tree/nodes/StructuredNode.js.map +1 -0
- package/build/parsedPaper/structure/tree/nodes/index.js +70 -0
- package/build/parsedPaper/structure/tree/nodes/index.js.map +1 -0
- package/build/scoring/assessments/assessment.js +68 -0
- package/build/scoring/assessments/assessment.js.map +1 -0
- package/build/scoring/assessments/index.js +64 -0
- package/build/scoring/assessments/index.js.map +1 -0
- package/build/scoring/assessments/readability/ParagraphTooLongAssessment.js +162 -0
- package/build/scoring/assessments/readability/ParagraphTooLongAssessment.js.map +1 -0
- package/build/scoring/assessments/readability/SentenceBeginningsAssessment.js +131 -0
- package/build/scoring/assessments/readability/SentenceBeginningsAssessment.js.map +1 -0
- package/build/scoring/assessments/readability/SentenceLengthInTextAssessment.js +173 -0
- package/build/scoring/assessments/readability/SentenceLengthInTextAssessment.js.map +1 -0
- package/build/scoring/assessments/readability/TransitionWordsAssessment.js +159 -0
- package/build/scoring/assessments/readability/TransitionWordsAssessment.js.map +1 -0
- package/build/scoring/assessments/seo/ImageCountAssessment.js +107 -0
- package/build/scoring/assessments/seo/ImageCountAssessment.js.map +1 -0
- package/build/scoring/assessments/seo/InternalLinksAssessment.js +108 -0
- package/build/scoring/assessments/seo/InternalLinksAssessment.js.map +1 -0
- package/build/scoring/assessments/seo/IntroductionKeywordAssessment.js +105 -0
- package/build/scoring/assessments/seo/IntroductionKeywordAssessment.js.map +1 -0
- package/build/scoring/assessments/seo/KeyphraseAssessment.js +100 -0
- package/build/scoring/assessments/seo/KeyphraseAssessment.js.map +1 -0
- package/build/scoring/assessments/seo/KeyphraseLengthAssessment.js +105 -0
- package/build/scoring/assessments/seo/KeyphraseLengthAssessment.js.map +1 -0
- package/build/scoring/assessments/seo/KeywordDensityAssessment.js +111 -0
- package/build/scoring/assessments/seo/KeywordDensityAssessment.js.map +1 -0
- package/build/scoring/assessments/seo/MetaDescriptionKeywordAssessment.js +114 -0
- package/build/scoring/assessments/seo/MetaDescriptionKeywordAssessment.js.map +1 -0
- package/build/scoring/assessments/seo/MetaDescriptionLengthAssessment.js +107 -0
- package/build/scoring/assessments/seo/MetaDescriptionLengthAssessment.js.map +1 -0
- package/build/scoring/assessments/seo/MetaTitleKeywordAssessment.js +111 -0
- package/build/scoring/assessments/seo/MetaTitleKeywordAssessment.js.map +1 -0
- package/build/scoring/assessments/seo/NumberInMetaTitleAssessment.js +103 -0
- package/build/scoring/assessments/seo/NumberInMetaTitleAssessment.js.map +1 -0
- package/build/scoring/assessments/seo/OutboundLinksAssessment.js +110 -0
- package/build/scoring/assessments/seo/OutboundLinksAssessment.js.map +1 -0
- package/build/scoring/assessments/seo/PageTitleWidthAssessment.js +101 -0
- package/build/scoring/assessments/seo/PageTitleWidthAssessment.js.map +1 -0
- package/build/scoring/assessments/seo/SingleH1Assessment.js +110 -0
- package/build/scoring/assessments/seo/SingleH1Assessment.js.map +1 -0
- package/build/scoring/assessments/seo/SingleTitleAssessment.js +103 -0
- package/build/scoring/assessments/seo/SingleTitleAssessment.js.map +1 -0
- package/build/scoring/assessments/seo/SubHeadingsKeywordAssessment.js +103 -0
- package/build/scoring/assessments/seo/SubHeadingsKeywordAssessment.js.map +1 -0
- package/build/scoring/assessments/seo/TextImagesAssessment.js +138 -0
- package/build/scoring/assessments/seo/TextImagesAssessment.js.map +1 -0
- package/build/scoring/assessments/seo/TextLengthAssessment.js +100 -0
- package/build/scoring/assessments/seo/TextLengthAssessment.js.map +1 -0
- package/build/scoring/assessments/seo/UrlKeywordAssessment.js +102 -0
- package/build/scoring/assessments/seo/UrlKeywordAssessment.js.map +1 -0
- package/build/scoring/assessments/seo/UrlLengthAssessment.js +102 -0
- package/build/scoring/assessments/seo/UrlLengthAssessment.js.map +1 -0
- package/build/scoring/assessors/assessor.js +248 -0
- package/build/scoring/assessors/assessor.js.map +1 -0
- package/build/scoring/assessors/avadaAssessor.js +65 -0
- package/build/scoring/assessors/avadaAssessor.js.map +1 -0
- package/build/scoring/assessors/contentAssessor.js +149 -0
- package/build/scoring/assessors/contentAssessor.js.map +1 -0
- package/build/scoring/assessors/index.js +35 -0
- package/build/scoring/assessors/index.js.map +1 -0
- package/build/scoring/assessors/seoAssessor.js +44 -0
- package/build/scoring/assessors/seoAssessor.js.map +1 -0
- package/build/scoring/helpers/assessments/checkForTooLongSentences.js +19 -0
- package/build/scoring/helpers/assessments/checkForTooLongSentences.js.map +1 -0
- package/build/scoring/helpers/assessments/inRange.js +51 -0
- package/build/scoring/helpers/assessments/inRange.js.map +1 -0
- package/build/scoring/helpers/assessments/keyphraseLengthFactor.js +17 -0
- package/build/scoring/helpers/assessments/keyphraseLengthFactor.js.map +1 -0
- package/build/scoring/helpers/assessments/recommendedKeywordCount.js +47 -0
- package/build/scoring/helpers/assessments/recommendedKeywordCount.js.map +1 -0
- package/build/scoring/helpers/index.js +92 -0
- package/build/scoring/helpers/index.js.map +1 -0
- package/build/scoring/interpreters/index.js +14 -0
- package/build/scoring/interpreters/index.js.map +1 -0
- package/build/scoring/interpreters/scoreToRating.js +32 -0
- package/build/scoring/interpreters/scoreToRating.js.map +1 -0
- package/build/scoring/renderers/AssessorPresenter.js +348 -0
- package/build/scoring/renderers/AssessorPresenter.js.map +1 -0
- package/build/scoring/scoreAggregators/ReadabilityScoreAggregator.js +203 -0
- package/build/scoring/scoreAggregators/ReadabilityScoreAggregator.js.map +1 -0
- package/build/scoring/scoreAggregators/SEOScoreAggregator.js +60 -0
- package/build/scoring/scoreAggregators/SEOScoreAggregator.js.map +1 -0
- package/build/scoring/scoreAggregators/ScoreAggregator.js +30 -0
- package/build/scoring/scoreAggregators/ScoreAggregator.js.map +1 -0
- package/build/scoring/scoreAggregators/index.js +28 -0
- package/build/scoring/scoreAggregators/index.js.map +1 -0
- package/build/values/AssessmentResult.js +485 -0
- package/build/values/AssessmentResult.js.map +1 -0
- package/build/values/Mark.js +273 -0
- package/build/values/Mark.js.map +1 -0
- package/build/values/Paper.js +425 -0
- package/build/values/Paper.js.map +1 -0
- package/build/values/index.js +28 -0
- package/build/values/index.js.map +1 -0
- package/build/vendor/turkishStemmer.js +2817 -0
- package/build/vendor/turkishStemmer.js.map +1 -0
- package/package.json +42 -0
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.tokenizeKeyphraseFormsForExactMatching = exports.default = void 0;
|
|
7
|
+
var _matchTextWithTransliteration = _interopRequireDefault(require("./matchTextWithTransliteration"));
|
|
8
|
+
var _splitIntoTokens = _interopRequireDefault(require("../word/splitIntoTokens"));
|
|
9
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
10
|
+
/**
|
|
11
|
+
* Tokenizes the word form of the keyphrase for exact matching. This function gets the word form and tokenizes it.
|
|
12
|
+
* This function assumes that if a keyphrase needs to be matched exactly, there will be only one word form.
|
|
13
|
+
* This is the result of how the focus keyphrase is processed in buildTopicStems.js in the buildStems function.
|
|
14
|
+
*
|
|
15
|
+
* @param {(string[])} wordForms The word forms to tokenize.
|
|
16
|
+
* @param {function} customSplitIntoTokensHelper A custom helper to split sentences into tokens.
|
|
17
|
+
*
|
|
18
|
+
* @returns {string[]} The tokenized word forms.
|
|
19
|
+
*/
|
|
20
|
+
const tokenizeKeyphraseFormsForExactMatching = (wordForms, customSplitIntoTokensHelper) => {
|
|
21
|
+
// Tokenize word form of the keyphrase.
|
|
22
|
+
const wordFormText = wordForms[0];
|
|
23
|
+
return customSplitIntoTokensHelper ? customSplitIntoTokensHelper(wordFormText) : (0, _splitIntoTokens.default)(wordFormText);
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Gets the exact matches of the keyphrase.
|
|
28
|
+
* Exact matching happens when the user puts the keyphrase in double quotes.
|
|
29
|
+
*
|
|
30
|
+
* @param {Sentence} sentence The sentence to match the word forms with.
|
|
31
|
+
* @param {string[]} wordForms The word forms to match.
|
|
32
|
+
* @param {string} locale The locale used in the analysis.
|
|
33
|
+
* @param {function} customSplitIntoTokensHelper A custom helper to split sentences into tokens.
|
|
34
|
+
*
|
|
35
|
+
* @returns {{count: number, matches: Token[]}} Object containing the number of the exact matches and the matched tokens.
|
|
36
|
+
*/
|
|
37
|
+
exports.tokenizeKeyphraseFormsForExactMatching = tokenizeKeyphraseFormsForExactMatching;
|
|
38
|
+
const findExactMatchKeyphraseInSentence = (sentence, wordForms, locale, customSplitIntoTokensHelper) => {
|
|
39
|
+
const result = {
|
|
40
|
+
count: 0,
|
|
41
|
+
matches: []
|
|
42
|
+
};
|
|
43
|
+
// Tokenize word forms of the keyphrase.
|
|
44
|
+
const keyphraseTokens = tokenizeKeyphraseFormsForExactMatching(wordForms, customSplitIntoTokensHelper);
|
|
45
|
+
const sentenceTokens = sentence.tokens;
|
|
46
|
+
|
|
47
|
+
// Initialize the index of the word token of the keyphrase.
|
|
48
|
+
let indexOfWordInKeyphrase = 0;
|
|
49
|
+
// Initialize the index of the word token of the sentence.
|
|
50
|
+
let indexOfWordInSentence = 0;
|
|
51
|
+
let currentMatch = [];
|
|
52
|
+
|
|
53
|
+
// Check if the tokenized word forms occur in the same order in the sentence tokens.
|
|
54
|
+
while (indexOfWordInSentence < sentenceTokens.length) {
|
|
55
|
+
// If the current sentence token matches the current word token of the keyphrase, add it to the current match.
|
|
56
|
+
const sentenceTokenText = sentenceTokens[indexOfWordInSentence].text;
|
|
57
|
+
const keyphraseTokenText = keyphraseTokens[indexOfWordInKeyphrase];
|
|
58
|
+
const foundMatches = (0, _matchTextWithTransliteration.default)(sentenceTokenText.toLowerCase(), keyphraseTokenText.toLowerCase(), locale);
|
|
59
|
+
if (foundMatches.length > 0) {
|
|
60
|
+
currentMatch.push(sentenceTokens[indexOfWordInSentence]);
|
|
61
|
+
indexOfWordInKeyphrase++;
|
|
62
|
+
} else {
|
|
63
|
+
indexOfWordInKeyphrase = 0;
|
|
64
|
+
currentMatch = [];
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/*
|
|
68
|
+
* If the current match has the same length as the keyphrase tokens, the keyphrase forms have been matched.
|
|
69
|
+
* Add the current match to the matches array and reset the index of the word in keyphrase and the current match.
|
|
70
|
+
*/
|
|
71
|
+
if (currentMatch.length === keyphraseTokens.length) {
|
|
72
|
+
result.matches.push(...currentMatch);
|
|
73
|
+
result.count++;
|
|
74
|
+
indexOfWordInKeyphrase = 0;
|
|
75
|
+
currentMatch = [];
|
|
76
|
+
}
|
|
77
|
+
indexOfWordInSentence++;
|
|
78
|
+
}
|
|
79
|
+
return result;
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* Matches a word form of the keyphrase with the tokens from the sentence.
|
|
84
|
+
*
|
|
85
|
+
* With this approach, we transliterate the word form of the keyphrase before matching it with the sentence tokens.
|
|
86
|
+
* However, we don't do the transliteration step for the sentence tokens.
|
|
87
|
+
* As a result, for example, the word form "acción" from the keyphrase will match the word "accion" in the sentence.
|
|
88
|
+
* But, the word form "accion" from the keyphrase will NOT match the word "acción" in the sentence.
|
|
89
|
+
*
|
|
90
|
+
* @param {Token[]} tokens The array of tokens to check.
|
|
91
|
+
* @param {string} wordForm The word form of the keyphrase.
|
|
92
|
+
* @param {string} locale The locale used in the analysis.
|
|
93
|
+
*
|
|
94
|
+
* @returns {Token[]} The array of the matched tokens.
|
|
95
|
+
*/
|
|
96
|
+
const matchWordFormInTokens = (tokens, wordForm, locale) => {
|
|
97
|
+
let matches = [];
|
|
98
|
+
tokens.forEach(token => {
|
|
99
|
+
const occurrence = (0, _matchTextWithTransliteration.default)(token.text, wordForm, locale);
|
|
100
|
+
if (occurrence.length > 0) {
|
|
101
|
+
matches = matches.concat(token);
|
|
102
|
+
}
|
|
103
|
+
});
|
|
104
|
+
return matches;
|
|
105
|
+
};
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* Finds keyphrase forms in a sentence.
|
|
109
|
+
*
|
|
110
|
+
* @param {Sentence|string} sentence The sentence to check.
|
|
111
|
+
* @param {string[]} wordForms The word forms of the keyphrase to check.
|
|
112
|
+
* @param {string} locale The locale used in the analysis.
|
|
113
|
+
* @param {function} matchWordCustomHelper Custom function to match a word form with sentence.
|
|
114
|
+
*
|
|
115
|
+
* @returns {{count: number, matches: (Token|string)[]}} Object containing the number of the matches and the matched tokens.
|
|
116
|
+
*/
|
|
117
|
+
const matchWordFormsInSentence = (sentence, wordForms, locale, matchWordCustomHelper) => {
|
|
118
|
+
const result = {
|
|
119
|
+
count: 0,
|
|
120
|
+
matches: []
|
|
121
|
+
};
|
|
122
|
+
wordForms.forEach(wordForm => {
|
|
123
|
+
let occurrences = [];
|
|
124
|
+
if (matchWordCustomHelper) {
|
|
125
|
+
occurrences = matchWordCustomHelper(sentence, wordForm);
|
|
126
|
+
} else {
|
|
127
|
+
const tokens = sentence.tokens.slice();
|
|
128
|
+
occurrences = matchWordFormInTokens(tokens, wordForm, locale);
|
|
129
|
+
}
|
|
130
|
+
result.count += occurrences.length;
|
|
131
|
+
result.matches = result.matches.concat(occurrences);
|
|
132
|
+
});
|
|
133
|
+
return result;
|
|
134
|
+
};
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* Matches the word forms of a keyphrase with a sentence object from the html parser.
|
|
138
|
+
*
|
|
139
|
+
* @param {Sentence|string} sentence The sentence to match against the word forms of a keyphrase.
|
|
140
|
+
* @param {string[]} wordForms The array of word forms of the keyphrase.
|
|
141
|
+
* E.g. If the keyphrase is "key word", then (if Premium is activated) this will be [ "key", "keys" ] OR [ "word", "words" ]
|
|
142
|
+
* The forms are retrieved higher up (among others in keywordCount.js) with researcher.getResearch( "morphology" ).
|
|
143
|
+
* @param {string} locale The locale used for transliteration.
|
|
144
|
+
* @param {function} matchWordCustomHelper Custom function to match a word form with sentence.
|
|
145
|
+
* @param {boolean} useExactMatching Whether to match the keyphrase forms exactly or not.
|
|
146
|
+
* Exact match is used when the keyphrase is enclosed in double quotes.
|
|
147
|
+
* @param {function} customSplitIntoTokensHelper A custom helper to split sentences into tokens.
|
|
148
|
+
*
|
|
149
|
+
* @returns {{count: number, matches: (Token|string)[]}} Object containing the number of the matches and the matched tokens.
|
|
150
|
+
*/
|
|
151
|
+
const matchWordFormsWithSentence = (sentence, wordForms, locale, matchWordCustomHelper, useExactMatching = false, customSplitIntoTokensHelper) => {
|
|
152
|
+
/*
|
|
153
|
+
* Only use `findExactMatchKeyphraseInSentence` when the custom helper is not available.
|
|
154
|
+
* When the custom helper is available, the step for the exact matching happens in the helper.
|
|
155
|
+
*/
|
|
156
|
+
if (useExactMatching && !matchWordCustomHelper) {
|
|
157
|
+
return findExactMatchKeyphraseInSentence(sentence, wordForms, locale, customSplitIntoTokensHelper);
|
|
158
|
+
}
|
|
159
|
+
return matchWordFormsInSentence(sentence, wordForms, locale, matchWordCustomHelper);
|
|
160
|
+
};
|
|
161
|
+
var _default = exports.default = matchWordFormsWithSentence;
|
|
162
|
+
//# sourceMappingURL=matchWordFormsWithSentence.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"matchWordFormsWithSentence.js","names":["_matchTextWithTransliteration","_interopRequireDefault","require","_splitIntoTokens","e","__esModule","default","tokenizeKeyphraseFormsForExactMatching","wordForms","customSplitIntoTokensHelper","wordFormText","splitIntoTokens","exports","findExactMatchKeyphraseInSentence","sentence","locale","result","count","matches","keyphraseTokens","sentenceTokens","tokens","indexOfWordInKeyphrase","indexOfWordInSentence","currentMatch","length","sentenceTokenText","text","keyphraseTokenText","foundMatches","matchTextWithTransliteration","toLowerCase","push","matchWordFormInTokens","wordForm","forEach","token","occurrence","concat","matchWordFormsInSentence","matchWordCustomHelper","occurrences","slice","matchWordFormsWithSentence","useExactMatching","_default"],"sources":["../../../../src/languageProcessing/helpers/match/matchWordFormsWithSentence.js"],"sourcesContent":["import matchTextWithTransliteration from \"./matchTextWithTransliteration\";\nimport splitIntoTokens from \"../word/splitIntoTokens\";\n\n/**\n * Tokenizes the word form of the keyphrase for exact matching. This function gets the word form and tokenizes it.\n * This function assumes that if a keyphrase needs to be matched exactly, there will be only one word form.\n * This is the result of how the focus keyphrase is processed in buildTopicStems.js in the buildStems function.\n *\n * @param {(string[])} wordForms \t\t\t\t\tThe word forms to tokenize.\n * @param {function}\tcustomSplitIntoTokensHelper\tA custom helper to split sentences into tokens.\n *\n * @returns {string[]} The tokenized word forms.\n */\nexport const tokenizeKeyphraseFormsForExactMatching = ( wordForms, customSplitIntoTokensHelper ) => {\n\t// Tokenize word form of the keyphrase.\n\tconst wordFormText = wordForms[ 0 ];\n\n\treturn customSplitIntoTokensHelper ? customSplitIntoTokensHelper( wordFormText ) : splitIntoTokens( wordFormText );\n};\n\n/**\n * Gets the exact matches of the keyphrase.\n * Exact matching happens when the user puts the keyphrase in double quotes.\n *\n * @param {Sentence}\tsentence\t\t\t\t\tThe sentence to match the word forms with.\n * @param {string[]}\twordForms\t\t\t\t\tThe word forms to match.\n * @param {string}\t\tlocale\t\t\t\t\t\tThe locale used in the analysis.\n * @param {function}\tcustomSplitIntoTokensHelper\tA custom helper to split sentences into tokens.\n *\n * @returns {{count: number, matches: Token[]}} Object containing the number of the exact matches and the matched tokens.\n */\nconst findExactMatchKeyphraseInSentence = ( sentence, wordForms, locale, customSplitIntoTokensHelper ) => {\n\tconst result = {\n\t\tcount: 0,\n\t\tmatches: [],\n\t};\n\t// Tokenize word forms of the keyphrase.\n\tconst keyphraseTokens = tokenizeKeyphraseFormsForExactMatching( wordForms, customSplitIntoTokensHelper );\n\n\tconst sentenceTokens = sentence.tokens;\n\n\t// Initialize the index of the word token of the keyphrase.\n\tlet indexOfWordInKeyphrase = 0;\n\t// Initialize the index of the word token of the sentence.\n\tlet indexOfWordInSentence = 0;\n\tlet currentMatch = [];\n\n\t// Check if the tokenized word forms occur in the same order in the sentence tokens.\n\twhile ( indexOfWordInSentence < sentenceTokens.length ) {\n\t\t// If the current sentence token matches the current word token of the keyphrase, add it to the current match.\n\t\tconst sentenceTokenText = sentenceTokens[ indexOfWordInSentence ].text;\n\t\tconst keyphraseTokenText = keyphraseTokens[ indexOfWordInKeyphrase ];\n\n\t\tconst foundMatches = matchTextWithTransliteration( sentenceTokenText.toLowerCase(), keyphraseTokenText.toLowerCase(), locale );\n\n\t\tif ( foundMatches.length > 0 ) {\n\t\t\tcurrentMatch.push( sentenceTokens[ indexOfWordInSentence ] );\n\t\t\tindexOfWordInKeyphrase++;\n\t\t} else {\n\t\t\tindexOfWordInKeyphrase = 0;\n\t\t\tcurrentMatch = [];\n\t\t}\n\n\t\t/*\n\t\t * If the current match has the same length as the keyphrase tokens, the keyphrase forms have been matched.\n\t\t * Add the current match to the matches array and reset the index of the word in keyphrase and the current match.\n\t\t */\n\t\tif ( currentMatch.length === keyphraseTokens.length ) {\n\t\t\tresult.matches.push( ...currentMatch );\n\t\t\tresult.count++;\n\t\t\tindexOfWordInKeyphrase = 0;\n\t\t\tcurrentMatch = [];\n\t\t}\n\n\t\tindexOfWordInSentence++;\n\t}\n\treturn result;\n};\n\n/**\n * Matches a word form of the keyphrase with the tokens from the sentence.\n *\n * With this approach, we transliterate the word form of the keyphrase before matching it with the sentence tokens.\n * However, we don't do the transliteration step for the sentence tokens.\n * As a result, for example, the word form \"acción\" from the keyphrase will match the word \"accion\" in the sentence.\n * But, the word form \"accion\" from the keyphrase will NOT match the word \"acción\" in the sentence.\n *\n * @param {Token[]}\ttokens\t\tThe array of tokens to check.\n * @param {string}\twordForm\tThe word form of the keyphrase.\n * @param {string}\tlocale\t\tThe locale used in the analysis.\n *\n * @returns {Token[]}\tThe array of the matched tokens.\n */\nconst matchWordFormInTokens = ( tokens, wordForm, locale ) => {\n\tlet matches = [];\n\n\ttokens.forEach( token => {\n\t\tconst occurrence = matchTextWithTransliteration( token.text, wordForm, locale );\n\t\tif ( occurrence.length > 0 ) {\n\t\t\tmatches = matches.concat( token );\n\t\t}\n\t} );\n\n\treturn matches;\n};\n\n/**\n * Finds keyphrase forms in a sentence.\n *\n * @param {Sentence|string}\tsentence\t\t\t\tThe sentence to check.\n * @param {string[]}\t\twordForms\t\t\t\tThe word forms of the keyphrase to check.\n * @param {string}\t\t\tlocale\t\t\t\t\tThe locale used in the analysis.\n * @param {function}\t\tmatchWordCustomHelper\tCustom function to match a word form with sentence.\n *\n * @returns {{count: number, matches: (Token|string)[]}} Object containing the number of the matches and the matched tokens.\n */\nconst matchWordFormsInSentence = ( sentence, wordForms, locale, matchWordCustomHelper ) => {\n\tconst result = {\n\t\tcount: 0,\n\t\tmatches: [],\n\t};\n\n\twordForms.forEach( wordForm => {\n\t\tlet occurrences = [];\n\t\tif ( matchWordCustomHelper ) {\n\t\t\toccurrences = matchWordCustomHelper( sentence, wordForm );\n\t\t} else {\n\t\t\tconst tokens = sentence.tokens.slice();\n\t\t\toccurrences = matchWordFormInTokens( tokens, wordForm, locale );\n\t\t}\n\t\tresult.count += occurrences.length;\n\t\tresult.matches = result.matches.concat( occurrences );\n\t} );\n\n\treturn result;\n};\n\n/**\n * Matches the word forms of a keyphrase with a sentence object from the html parser.\n *\n * @param {Sentence|string}\tsentence\t\t\t\t\tThe sentence to match against the word forms of a keyphrase.\n * @param {string[]}\t\twordForms\t\t\t\t\tThe array of word forms of the keyphrase.\n * E.g. If the keyphrase is \"key word\", then (if Premium is activated) this will be [ \"key\", \"keys\" ] OR [ \"word\", \"words\" ]\n * The forms are retrieved higher up (among others in keywordCount.js) with researcher.getResearch( \"morphology\" ).\n * @param {string}\t\t\tlocale\t\t\t\t\t\tThe locale used for transliteration.\n * @param {function}\t\tmatchWordCustomHelper\t\tCustom function to match a word form with sentence.\n * @param {boolean}\t\t\tuseExactMatching\t\t\tWhether to match the keyphrase forms exactly or not.\n * \t\t\t\t\t\t\t\t\t\t\t\t\t\tExact match is used when the keyphrase is enclosed in double quotes.\n * @param {function}\t\tcustomSplitIntoTokensHelper\tA custom helper to split sentences into tokens.\n *\n * @returns {{count: number, matches: (Token|string)[]}} Object containing the number of the matches and the matched tokens.\n */\nconst matchWordFormsWithSentence = ( sentence, wordForms, locale, matchWordCustomHelper, useExactMatching = false, customSplitIntoTokensHelper ) => {\n\t/*\n\t * Only use `findExactMatchKeyphraseInSentence` when the custom helper is not available.\n\t * When the custom helper is available, the step for the exact matching happens in the helper.\n\t */\n\tif ( useExactMatching && ! matchWordCustomHelper ) {\n\t\treturn findExactMatchKeyphraseInSentence( sentence, wordForms, locale, customSplitIntoTokensHelper );\n\t}\n\treturn matchWordFormsInSentence( sentence, wordForms, locale, matchWordCustomHelper );\n};\n\nexport default matchWordFormsWithSentence;\n"],"mappings":";;;;;;AAAA,IAAAA,6BAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,gBAAA,GAAAF,sBAAA,CAAAC,OAAA;AAAsD,SAAAD,uBAAAG,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAEtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMG,sCAAsC,GAAGA,CAAEC,SAAS,EAAEC,2BAA2B,KAAM;EACnG;EACA,MAAMC,YAAY,GAAGF,SAAS,CAAE,CAAC,CAAE;EAEnC,OAAOC,2BAA2B,GAAGA,2BAA2B,CAAEC,YAAa,CAAC,GAAG,IAAAC,wBAAe,EAAED,YAAa,CAAC;AACnH,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAVAE,OAAA,CAAAL,sCAAA,GAAAA,sCAAA;AAWA,MAAMM,iCAAiC,GAAGA,CAAEC,QAAQ,EAAEN,SAAS,EAAEO,MAAM,EAAEN,2BAA2B,KAAM;EACzG,MAAMO,MAAM,GAAG;IACdC,KAAK,EAAE,CAAC;IACRC,OAAO,EAAE;EACV,CAAC;EACD;EACA,MAAMC,eAAe,GAAGZ,sCAAsC,CAAEC,SAAS,EAAEC,2BAA4B,CAAC;EAExG,MAAMW,cAAc,GAAGN,QAAQ,CAACO,MAAM;;EAEtC;EACA,IAAIC,sBAAsB,GAAG,CAAC;EAC9B;EACA,IAAIC,qBAAqB,GAAG,CAAC;EAC7B,IAAIC,YAAY,GAAG,EAAE;;EAErB;EACA,OAAQD,qBAAqB,GAAGH,cAAc,CAACK,MAAM,EAAG;IACvD;IACA,MAAMC,iBAAiB,GAAGN,cAAc,CAAEG,qBAAqB,CAAE,CAACI,IAAI;IACtE,MAAMC,kBAAkB,GAAGT,eAAe,CAAEG,sBAAsB,CAAE;IAEpE,MAAMO,YAAY,GAAG,IAAAC,qCAA4B,EAAEJ,iBAAiB,CAACK,WAAW,CAAC,CAAC,EAAEH,kBAAkB,CAACG,WAAW,CAAC,CAAC,EAAEhB,MAAO,CAAC;IAE9H,IAAKc,YAAY,CAACJ,MAAM,GAAG,CAAC,EAAG;MAC9BD,YAAY,CAACQ,IAAI,CAAEZ,cAAc,CAAEG,qBAAqB,CAAG,CAAC;MAC5DD,sBAAsB,EAAE;IACzB,CAAC,MAAM;MACNA,sBAAsB,GAAG,CAAC;MAC1BE,YAAY,GAAG,EAAE;IAClB;;IAEA;AACF;AACA;AACA;IACE,IAAKA,YAAY,CAACC,MAAM,KAAKN,eAAe,CAACM,MAAM,EAAG;MACrDT,MAAM,CAACE,OAAO,CAACc,IAAI,CAAE,GAAGR,YAAa,CAAC;MACtCR,MAAM,CAACC,KAAK,EAAE;MACdK,sBAAsB,GAAG,CAAC;MAC1BE,YAAY,GAAG,EAAE;IAClB;IAEAD,qBAAqB,EAAE;EACxB;EACA,OAAOP,MAAM;AACd,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMiB,qBAAqB,GAAGA,CAAEZ,MAAM,EAAEa,QAAQ,EAAEnB,MAAM,KAAM;EAC7D,IAAIG,OAAO,GAAG,EAAE;EAEhBG,MAAM,CAACc,OAAO,CAAEC,KAAK,IAAI;IACxB,MAAMC,UAAU,GAAG,IAAAP,qCAA4B,EAAEM,KAAK,CAACT,IAAI,EAAEO,QAAQ,EAAEnB,MAAO,CAAC;IAC/E,IAAKsB,UAAU,CAACZ,MAAM,GAAG,CAAC,EAAG;MAC5BP,OAAO,GAAGA,OAAO,CAACoB,MAAM,CAAEF,KAAM,CAAC;IAClC;EACD,CAAE,CAAC;EAEH,OAAOlB,OAAO;AACf,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMqB,wBAAwB,GAAGA,CAAEzB,QAAQ,EAAEN,SAAS,EAAEO,MAAM,EAAEyB,qBAAqB,KAAM;EAC1F,MAAMxB,MAAM,GAAG;IACdC,KAAK,EAAE,CAAC;IACRC,OAAO,EAAE;EACV,CAAC;EAEDV,SAAS,CAAC2B,OAAO,CAAED,QAAQ,IAAI;IAC9B,IAAIO,WAAW,GAAG,EAAE;IACpB,IAAKD,qBAAqB,EAAG;MAC5BC,WAAW,GAAGD,qBAAqB,CAAE1B,QAAQ,EAAEoB,QAAS,CAAC;IAC1D,CAAC,MAAM;MACN,MAAMb,MAAM,GAAGP,QAAQ,CAACO,MAAM,CAACqB,KAAK,CAAC,CAAC;MACtCD,WAAW,GAAGR,qBAAqB,CAAEZ,MAAM,EAAEa,QAAQ,EAAEnB,MAAO,CAAC;IAChE;IACAC,MAAM,CAACC,KAAK,IAAIwB,WAAW,CAAChB,MAAM;IAClCT,MAAM,CAACE,OAAO,GAAGF,MAAM,CAACE,OAAO,CAACoB,MAAM,CAAEG,WAAY,CAAC;EACtD,CAAE,CAAC;EAEH,OAAOzB,MAAM;AACd,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM2B,0BAA0B,GAAGA,CAAE7B,QAAQ,EAAEN,SAAS,EAAEO,MAAM,EAAEyB,qBAAqB,EAAEI,gBAAgB,GAAG,KAAK,EAAEnC,2BAA2B,KAAM;EACnJ;AACD;AACA;AACA;EACC,IAAKmC,gBAAgB,IAAI,CAAEJ,qBAAqB,EAAG;IAClD,OAAO3B,iCAAiC,CAAEC,QAAQ,EAAEN,SAAS,EAAEO,MAAM,EAAEN,2BAA4B,CAAC;EACrG;EACA,OAAO8B,wBAAwB,CAAEzB,QAAQ,EAAEN,SAAS,EAAEO,MAAM,EAAEyB,qBAAsB,CAAC;AACtF,CAAC;AAAC,IAAAK,QAAA,GAAAjC,OAAA,CAAAN,OAAA,GAEaqC,0BAA0B","ignoreList":[]}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = processExactMatchRequest;
|
|
7
|
+
var _isDoubleQuoted = _interopRequireDefault(require("./isDoubleQuoted"));
|
|
8
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
9
|
+
/**
|
|
10
|
+
* Checks if exact match functionality is requested by enclosing the keyphrase in double quotation marks.
|
|
11
|
+
*
|
|
12
|
+
* @param {string} keyphrase The keyphrase to check. This must be the keyphrase accessed directly from the Paper.
|
|
13
|
+
*
|
|
14
|
+
* @returns {Object} Whether the exact match functionality is requested and the keyword stripped from double quotes.
|
|
15
|
+
*/
|
|
16
|
+
function processExactMatchRequest(keyphrase) {
|
|
17
|
+
const exactMatchRequest = {
|
|
18
|
+
exactMatchRequested: false,
|
|
19
|
+
keyphrase: keyphrase
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
// Check if only exact match processing is requested by the user. If so, strip the quotation marks from the keyphrase.
|
|
23
|
+
if ((0, _isDoubleQuoted.default)(keyphrase)) {
|
|
24
|
+
exactMatchRequest.keyphrase = keyphrase.substring(1, keyphrase.length - 1);
|
|
25
|
+
exactMatchRequest.exactMatchRequested = true;
|
|
26
|
+
}
|
|
27
|
+
return exactMatchRequest;
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=processExactMatchRequest.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"processExactMatchRequest.js","names":["_isDoubleQuoted","_interopRequireDefault","require","e","__esModule","default","processExactMatchRequest","keyphrase","exactMatchRequest","exactMatchRequested","isDoubleQuoted","substring","length"],"sources":["../../../../src/languageProcessing/helpers/match/processExactMatchRequest.js"],"sourcesContent":["import isDoubleQuoted from \"./isDoubleQuoted\";\n\n/**\n * Checks if exact match functionality is requested by enclosing the keyphrase in double quotation marks.\n *\n * @param {string} keyphrase The keyphrase to check. This must be the keyphrase accessed directly from the Paper.\n *\n * @returns {Object} Whether the exact match functionality is requested and the keyword stripped from double quotes.\n */\nexport default function processExactMatchRequest( keyphrase ) {\n\tconst exactMatchRequest = { exactMatchRequested: false, keyphrase: keyphrase };\n\n\t// Check if only exact match processing is requested by the user. If so, strip the quotation marks from the keyphrase.\n\tif ( isDoubleQuoted( keyphrase ) ) {\n\t\texactMatchRequest.keyphrase = keyphrase.substring( 1, keyphrase.length - 1 );\n\t\texactMatchRequest.exactMatchRequested = true;\n\t}\n\n\treturn exactMatchRequest;\n}\n"],"mappings":";;;;;;AAAA,IAAAA,eAAA,GAAAC,sBAAA,CAAAC,OAAA;AAA8C,SAAAD,uBAAAE,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAE9C;AACA;AACA;AACA;AACA;AACA;AACA;AACe,SAASG,wBAAwBA,CAAEC,SAAS,EAAG;EAC7D,MAAMC,iBAAiB,GAAG;IAAEC,mBAAmB,EAAE,KAAK;IAAEF,SAAS,EAAEA;EAAU,CAAC;;EAE9E;EACA,IAAK,IAAAG,uBAAc,EAAEH,SAAU,CAAC,EAAG;IAClCC,iBAAiB,CAACD,SAAS,GAAGA,SAAS,CAACI,SAAS,CAAE,CAAC,EAAEJ,SAAS,CAACK,MAAM,GAAG,CAAE,CAAC;IAC5EJ,iBAAiB,CAACC,mBAAmB,GAAG,IAAI;EAC7C;EAEA,OAAOD,iBAAiB;AACzB","ignoreList":[]}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = baseStemmer;
|
|
7
|
+
/**
|
|
8
|
+
* Base stemmer that does not stem.
|
|
9
|
+
* This is exported to allow for comparing if a stemmer is the base stemmer.
|
|
10
|
+
*
|
|
11
|
+
* @param {string} word The word to stem.
|
|
12
|
+
*
|
|
13
|
+
* @returns {string} The stemmed word.
|
|
14
|
+
*/
|
|
15
|
+
function baseStemmer(word) {
|
|
16
|
+
return word;
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=baseStemmer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"baseStemmer.js","names":["baseStemmer","word"],"sources":["../../../../src/languageProcessing/helpers/morphology/baseStemmer.js"],"sourcesContent":["/**\n * Base stemmer that does not stem.\n * This is exported to allow for comparing if a stemmer is the base stemmer.\n *\n * @param {string} word The word to stem.\n *\n * @returns {string} The stemmed word.\n */\nexport default function baseStemmer( word ) {\n\treturn word;\n}\n"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACe,SAASA,WAAWA,CAAEC,IAAI,EAAG;EAC3C,OAAOA,IAAI;AACZ","ignoreList":[]}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = buildFormRule;
|
|
7
|
+
/**
|
|
8
|
+
* Checks if the input word qualifies for the input regex and if so builds a required form.
|
|
9
|
+
* This function is used for other more specific functions.
|
|
10
|
+
*
|
|
11
|
+
* @param {string} word The word to build forms for.
|
|
12
|
+
* @param {Array} regexes The regex-based array of rules to compare the word against.
|
|
13
|
+
*
|
|
14
|
+
* @returns {string} The newly built form of the word.
|
|
15
|
+
*/
|
|
16
|
+
function buildFormRule(word, regexes) {
|
|
17
|
+
if (regexes.includes(null)) {
|
|
18
|
+
return word;
|
|
19
|
+
}
|
|
20
|
+
for (let i = 0; i < regexes.length; i++) {
|
|
21
|
+
if (regexes[i].reg.test(word) === true) {
|
|
22
|
+
return word.replace(regexes[i].reg, regexes[i].repl);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=buildFormRule.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"buildFormRule.js","names":["buildFormRule","word","regexes","includes","i","length","reg","test","replace","repl"],"sources":["../../../../src/languageProcessing/helpers/morphology/buildFormRule.js"],"sourcesContent":["/**\n * Checks if the input word qualifies for the input regex and if so builds a required form.\n * This function is used for other more specific functions.\n *\n * @param {string} word The word to build forms for.\n * @param {Array} regexes The regex-based array of rules to compare the word against.\n *\n * @returns {string} The newly built form of the word.\n */\nexport default function buildFormRule( word, regexes ) {\n\tif ( regexes.includes( null ) ) {\n\t\treturn word;\n\t}\n\tfor ( let i = 0; i < regexes.length; i++ ) {\n\t\tif ( regexes[ i ].reg.test( word ) === true ) {\n\t\t\treturn word.replace( regexes[ i ].reg, regexes[ i ].repl );\n\t\t}\n\t}\n}\n"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACe,SAASA,aAAaA,CAAEC,IAAI,EAAEC,OAAO,EAAG;EACtD,IAAKA,OAAO,CAACC,QAAQ,CAAE,IAAK,CAAC,EAAG;IAC/B,OAAOF,IAAI;EACZ;EACA,KAAM,IAAIG,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAGF,OAAO,CAACG,MAAM,EAAED,CAAC,EAAE,EAAG;IAC1C,IAAKF,OAAO,CAAEE,CAAC,CAAE,CAACE,GAAG,CAACC,IAAI,CAAEN,IAAK,CAAC,KAAK,IAAI,EAAG;MAC7C,OAAOA,IAAI,CAACO,OAAO,CAAEN,OAAO,CAAEE,CAAC,CAAE,CAACE,GAAG,EAAEJ,OAAO,CAAEE,CAAC,CAAE,CAACK,IAAK,CAAC;IAC3D;EACD;AACD","ignoreList":[]}
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.StemOriginalPair = StemOriginalPair;
|
|
7
|
+
exports.buildStems = exports.TopicPhrase = void 0;
|
|
8
|
+
exports.collectStems = collectStems;
|
|
9
|
+
exports.primeLanguageSpecificData = void 0;
|
|
10
|
+
var _getWords = _interopRequireDefault(require("../word/getWords.js"));
|
|
11
|
+
var _quotes = require("../sanitize/quotes");
|
|
12
|
+
var _wordBoundariesWithoutPunctuation = require("../../../config/wordBoundariesWithoutPunctuation");
|
|
13
|
+
var _lodash = require("lodash");
|
|
14
|
+
var _isDoubleQuoted = _interopRequireDefault(require("../match/isDoubleQuoted"));
|
|
15
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
16
|
+
/**
|
|
17
|
+
* A TopicPhrase (i.e., a keyphrase or synonym) with stem-original pairs for the words in the topic phrase.
|
|
18
|
+
*/
|
|
19
|
+
class TopicPhrase {
|
|
20
|
+
/**
|
|
21
|
+
* Constructs a new TopicPhrase.
|
|
22
|
+
*
|
|
23
|
+
* @param {StemOriginalPair[]} stemOriginalPairs The stem-original pairs for the words in the topic phrase.
|
|
24
|
+
* @param {boolean} exactMatch Whether the topic phrase is an exact match.
|
|
25
|
+
*
|
|
26
|
+
* @constructor
|
|
27
|
+
*/
|
|
28
|
+
constructor(stemOriginalPairs = [], exactMatch = false) {
|
|
29
|
+
this.stemOriginalPairs = stemOriginalPairs;
|
|
30
|
+
this.exactMatch = exactMatch;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Returns all stems in the topic phrase.
|
|
35
|
+
*
|
|
36
|
+
* @returns {string[]|[]} The stems in the topic phrase or empty array if the topic phrase is exact match.
|
|
37
|
+
*/
|
|
38
|
+
getStems() {
|
|
39
|
+
// An exact match keyphrase doesn't have stems.
|
|
40
|
+
if (this.exactMatch) {
|
|
41
|
+
return [];
|
|
42
|
+
}
|
|
43
|
+
return this.stemOriginalPairs.map(stemOriginalPair => stemOriginalPair.stem);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* A stem-original pair ƒor a word in a topic phrase.
|
|
49
|
+
*
|
|
50
|
+
* @param {string} stem The stem of the topic phrase word.
|
|
51
|
+
* @param {string} original The original word form the topic phrase (unsanitized)
|
|
52
|
+
*
|
|
53
|
+
* @constructor
|
|
54
|
+
*/
|
|
55
|
+
exports.TopicPhrase = TopicPhrase;
|
|
56
|
+
function StemOriginalPair(stem, original) {
|
|
57
|
+
this.stem = stem;
|
|
58
|
+
this.original = original;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Analyzes the focus keyword string or one synonym phrase.
|
|
63
|
+
* Checks if morphology is requested or if the user wants to match the exact string.
|
|
64
|
+
* If morphology is required, the module finds a stem for all words (if no function words list is available), or
|
|
65
|
+
* for all content words (i.e., excluding prepositions, articles, conjunctions, if the function words list is available).
|
|
66
|
+
*
|
|
67
|
+
* @param {string} keyphrase The keyphrase of the paper (or a synonym phrase) to get stem for.
|
|
68
|
+
* @param {function} stemmer The language-specific stemmer.
|
|
69
|
+
* @param {string[]} functionWords The language-specific function words.
|
|
70
|
+
* @param {boolean} areHyphensWordBoundaries Whether hyphens should be treated as word boundaries.
|
|
71
|
+
*
|
|
72
|
+
* @returns {TopicPhrase} Object with an array of StemOriginalPairs of all (content) words in the keyphrase or synonym
|
|
73
|
+
* phrase and information about whether the keyphrase/synonym should be matched exactly.
|
|
74
|
+
*/
|
|
75
|
+
const buildStems = function (keyphrase, stemmer, functionWords, areHyphensWordBoundaries) {
|
|
76
|
+
if ((0, _lodash.isUndefined)(keyphrase) || keyphrase === "") {
|
|
77
|
+
return new TopicPhrase();
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
// If the keyphrase is embedded in double quotation marks, return the keyphrase itself, without the outermost quotation marks.
|
|
81
|
+
if ((0, _isDoubleQuoted.default)(keyphrase)) {
|
|
82
|
+
keyphrase = keyphrase.substring(1, keyphrase.length - 1);
|
|
83
|
+
return new TopicPhrase([new StemOriginalPair((0, _lodash.escapeRegExp)(keyphrase), keyphrase)], true);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
/*
|
|
87
|
+
* If hyphens should be treated as word boundaries, pass a custom word boundary regex string that includes whitespaces,
|
|
88
|
+
* hyphens (u002d), and en-dashes (u2013). Otherwise, pass a regex that includes only whitespaces and en-dashes.
|
|
89
|
+
*/
|
|
90
|
+
let keyphraseWords = areHyphensWordBoundaries ? (0, _getWords.default)(keyphrase, _wordBoundariesWithoutPunctuation.WORD_BOUNDARY_WITH_HYPHEN) : (0, _getWords.default)(keyphrase, _wordBoundariesWithoutPunctuation.WORD_BOUNDARY_WITHOUT_HYPHEN);
|
|
91
|
+
|
|
92
|
+
// Filter function words from the keyphrase. Don't filter if the keyphrase only consists of function words.
|
|
93
|
+
const wordsWithoutFunctionWords = keyphraseWords.filter(word => !functionWords.includes(word));
|
|
94
|
+
if (wordsWithoutFunctionWords.length > 0) {
|
|
95
|
+
keyphraseWords = wordsWithoutFunctionWords;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
// Return a stem-original pair with a stem.
|
|
99
|
+
const stemOriginalPairs = keyphraseWords.map(word => {
|
|
100
|
+
return new StemOriginalPair(stemmer((0, _quotes.normalizeSingle)((0, _lodash.escapeRegExp)(word))), word);
|
|
101
|
+
});
|
|
102
|
+
return new TopicPhrase(stemOriginalPairs);
|
|
103
|
+
};
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* Builds stems of words of the keyphrase and of each synonym phrase.
|
|
107
|
+
*
|
|
108
|
+
* @param {string} keyphrase The paper's keyphrase.
|
|
109
|
+
* @param {string[]} synonyms The paper's synonyms.
|
|
110
|
+
* @param {function} stemmer The language-specific stemmer (if available).
|
|
111
|
+
* @param {string[]} functionWords The language-specific function words.
|
|
112
|
+
* @param {boolean} areHyphensWordBoundaries Whether hyphens should be treated as word boundaries.
|
|
113
|
+
*
|
|
114
|
+
* @returns {Object} Object with an array of stems of words in the keyphrase and an array of arrays of stems of words in the synonyms.
|
|
115
|
+
*/
|
|
116
|
+
exports.buildStems = buildStems;
|
|
117
|
+
const collectKeyphraseAndSynonymsStems = function (keyphrase, synonyms, stemmer, functionWords, areHyphensWordBoundaries) {
|
|
118
|
+
const keyphraseStems = buildStems(keyphrase, stemmer, functionWords, areHyphensWordBoundaries);
|
|
119
|
+
const synonymsStems = synonyms.map(synonym => buildStems(synonym, stemmer, functionWords, areHyphensWordBoundaries));
|
|
120
|
+
return {
|
|
121
|
+
keyphraseStems,
|
|
122
|
+
synonymsStems
|
|
123
|
+
};
|
|
124
|
+
};
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* Caches stems depending on the currently available stemmer and functionWords and (separately) keyphrase and synonyms.
|
|
128
|
+
* In this way, if the stemmer and functionWords remain the same in multiple calls of this function, the function
|
|
129
|
+
* that collects actual stems only needs to check if the keyphrase and synonyms also remain the
|
|
130
|
+
* same to return the cached result. The joining of keyphrase and synonyms for this function is needed,
|
|
131
|
+
* because by default memoize caches by the first key only, which in the current case would mean that the function would
|
|
132
|
+
* return the cached forms if the keyphrase has not changed (without checking if synonyms were changed).
|
|
133
|
+
*
|
|
134
|
+
* @param {function} stemmer The language-specific stemmer (if available).
|
|
135
|
+
* @param {string[]} functionWords The language-specific function words.
|
|
136
|
+
* @param {boolean} areHyphensWordBoundaries Whether hyphens should be treated as word boundaries.
|
|
137
|
+
*
|
|
138
|
+
* @returns {function} The function that collects the stems for a given set of keyphrase, synonyms, stemmer and functionWords.
|
|
139
|
+
*/
|
|
140
|
+
const primeLanguageSpecificData = exports.primeLanguageSpecificData = (0, _lodash.memoize)((stemmer, functionWords, areHyphensWordBoundaries) => {
|
|
141
|
+
return (0, _lodash.memoize)((keyphrase, synonyms) => {
|
|
142
|
+
return collectKeyphraseAndSynonymsStems(keyphrase, synonyms, stemmer, functionWords, areHyphensWordBoundaries);
|
|
143
|
+
}, (keyphrase, synonyms) => {
|
|
144
|
+
return keyphrase + "," + synonyms.join(",");
|
|
145
|
+
});
|
|
146
|
+
});
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* Retrieves stems of words of the keyphrase and of each synonym phrase using the function that caches
|
|
150
|
+
* the results of previous calls of this function.
|
|
151
|
+
*
|
|
152
|
+
* @param {string} keyphrase The paper's keyphrase.
|
|
153
|
+
* @param {string[]} synonyms The paper's synonyms.
|
|
154
|
+
* @param {function} stemmer The language-specific stemmer (if available).
|
|
155
|
+
* @param {string[]} functionWords The language-specific function words.
|
|
156
|
+
* @param {boolean} areHyphensWordBoundaries Whether hyphens should be treated as word boundaries.
|
|
157
|
+
*
|
|
158
|
+
* @returns {Object} Object with an array of stems of words in the keyphrase and an array of arrays of stems of words in the synonyms.
|
|
159
|
+
*/
|
|
160
|
+
function collectStems(keyphrase, synonyms, stemmer, functionWords, areHyphensWordBoundaries) {
|
|
161
|
+
const collectStemsWithLanguageSpecificData = primeLanguageSpecificData(stemmer, functionWords, areHyphensWordBoundaries);
|
|
162
|
+
return collectStemsWithLanguageSpecificData(keyphrase, synonyms);
|
|
163
|
+
}
|
|
164
|
+
//# sourceMappingURL=buildTopicStems.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"buildTopicStems.js","names":["_getWords","_interopRequireDefault","require","_quotes","_wordBoundariesWithoutPunctuation","_lodash","_isDoubleQuoted","e","__esModule","default","TopicPhrase","constructor","stemOriginalPairs","exactMatch","getStems","map","stemOriginalPair","stem","exports","StemOriginalPair","original","buildStems","keyphrase","stemmer","functionWords","areHyphensWordBoundaries","isUndefined","isDoubleQuoted","substring","length","escapeRegExp","keyphraseWords","getWords","WORD_BOUNDARY_WITH_HYPHEN","WORD_BOUNDARY_WITHOUT_HYPHEN","wordsWithoutFunctionWords","filter","word","includes","normalizeSingle","collectKeyphraseAndSynonymsStems","synonyms","keyphraseStems","synonymsStems","synonym","primeLanguageSpecificData","memoize","join","collectStems","collectStemsWithLanguageSpecificData"],"sources":["../../../../src/languageProcessing/helpers/morphology/buildTopicStems.js"],"sourcesContent":["import getWords from \"../word/getWords.js\";\nimport { normalizeSingle } from \"../sanitize/quotes\";\nimport { WORD_BOUNDARY_WITH_HYPHEN, WORD_BOUNDARY_WITHOUT_HYPHEN } from \"../../../config/wordBoundariesWithoutPunctuation\";\n\nimport { isUndefined, escapeRegExp, memoize } from \"lodash\";\nimport isDoubleQuoted from \"../match/isDoubleQuoted\";\n\n/**\n * A TopicPhrase (i.e., a keyphrase or synonym) with stem-original pairs for the words in the topic phrase.\n */\nclass TopicPhrase {\n\t/**\n\t * Constructs a new TopicPhrase.\n\t *\n\t * @param {StemOriginalPair[]} stemOriginalPairs The stem-original pairs for the words in the topic phrase.\n\t * @param {boolean} exactMatch Whether the topic phrase is an exact match.\n\t *\n\t * @constructor\n\t */\n\tconstructor( stemOriginalPairs = [], exactMatch = false ) {\n\t\tthis.stemOriginalPairs = stemOriginalPairs;\n\t\tthis.exactMatch = exactMatch;\n\t}\n\n\t/**\n\t * Returns all stems in the topic phrase.\n\t *\n\t * @returns {string[]|[]} The stems in the topic phrase or empty array if the topic phrase is exact match.\n\t */\n\tgetStems() {\n\t\t// An exact match keyphrase doesn't have stems.\n\t\tif ( this.exactMatch ) {\n\t\t\treturn [];\n\t\t}\n\n\t\treturn this.stemOriginalPairs.map( stemOriginalPair => stemOriginalPair.stem );\n\t}\n}\n\n/**\n * A stem-original pair ƒor a word in a topic phrase.\n *\n * @param {string} stem The stem of the topic phrase word.\n * @param {string} original The original word form the topic phrase (unsanitized)\n *\n * @constructor\n */\nfunction StemOriginalPair( stem, original ) {\n\tthis.stem = stem;\n\tthis.original = original;\n}\n\n/**\n * Analyzes the focus keyword string or one synonym phrase.\n * Checks if morphology is requested or if the user wants to match the exact string.\n * If morphology is required, the module finds a stem for all words (if no function words list is available), or\n * for all content words (i.e., excluding prepositions, articles, conjunctions, if the function words list is available).\n *\n * @param {string} keyphrase \t\t\t\tThe keyphrase of the paper (or a synonym phrase) to get stem for.\n * @param {function} stemmer \t\t\t\tThe language-specific stemmer.\n * @param {string[]} functionWords \t\t\t\tThe language-specific function words.\n * @param {boolean}\t areHyphensWordBoundaries\tWhether hyphens should be treated as word boundaries.\n *\n * @returns {TopicPhrase} Object with an array of StemOriginalPairs of all (content) words in the keyphrase or synonym\n * phrase and information about whether the keyphrase/synonym should be matched exactly.\n */\nconst buildStems = function( keyphrase, stemmer, functionWords, areHyphensWordBoundaries ) {\n\tif ( isUndefined( keyphrase ) || keyphrase === \"\" ) {\n\t\treturn new TopicPhrase();\n\t}\n\n\t// If the keyphrase is embedded in double quotation marks, return the keyphrase itself, without the outermost quotation marks.\n\tif ( isDoubleQuoted( keyphrase ) ) {\n\t\tkeyphrase = keyphrase.substring( 1, keyphrase.length - 1 );\n\t\treturn new TopicPhrase(\n\t\t\t[ new StemOriginalPair( escapeRegExp( keyphrase ), keyphrase ) ],\n\t\t\ttrue\n\t\t);\n\t}\n\n\t/*\n\t * \tIf hyphens should be treated as word boundaries, pass a custom word boundary regex string that includes whitespaces,\n\t * hyphens (u002d), and en-dashes (u2013). Otherwise, pass a regex that includes only whitespaces and en-dashes.\n\t */\n\tlet keyphraseWords = areHyphensWordBoundaries ? getWords( keyphrase, WORD_BOUNDARY_WITH_HYPHEN )\n\t\t: getWords( keyphrase, WORD_BOUNDARY_WITHOUT_HYPHEN );\n\n\t// Filter function words from the keyphrase. Don't filter if the keyphrase only consists of function words.\n\tconst wordsWithoutFunctionWords = keyphraseWords.filter( ( word ) => ! functionWords.includes( word ) );\n\tif ( wordsWithoutFunctionWords.length > 0 ) {\n\t\tkeyphraseWords = wordsWithoutFunctionWords;\n\t}\n\n\t// Return a stem-original pair with a stem.\n\tconst stemOriginalPairs = keyphraseWords.map( word => {\n\t\treturn new StemOriginalPair( stemmer( normalizeSingle( escapeRegExp( word ) ) ), word );\n\t} );\n\n\treturn new TopicPhrase( stemOriginalPairs );\n};\n\n/**\n * Builds stems of words of the keyphrase and of each synonym phrase.\n *\n * @param {string} keyphrase \t\t\t\tThe paper's keyphrase.\n * @param {string[]} synonyms \t\t\t\tThe paper's synonyms.\n * @param {function} stemmer \t\t\t\tThe language-specific stemmer (if available).\n * @param {string[]} functionWords \t\t\t\tThe language-specific function words.\n * @param {boolean}\t areHyphensWordBoundaries\tWhether hyphens should be treated as word boundaries.\n *\n * @returns {Object} Object with an array of stems of words in the keyphrase and an array of arrays of stems of words in the synonyms.\n */\nconst collectKeyphraseAndSynonymsStems = function( keyphrase, synonyms, stemmer, functionWords, areHyphensWordBoundaries ) {\n\tconst keyphraseStems = buildStems( keyphrase, stemmer, functionWords, areHyphensWordBoundaries );\n\tconst synonymsStems = synonyms.map( synonym => buildStems( synonym, stemmer, functionWords, areHyphensWordBoundaries ) );\n\n\treturn {\n\t\tkeyphraseStems,\n\t\tsynonymsStems,\n\t};\n};\n\n/**\n * Caches stems depending on the currently available stemmer and functionWords and (separately) keyphrase and synonyms.\n * In this way, if the stemmer and functionWords remain the same in multiple calls of this function, the function\n * that collects actual stems only needs to check if the keyphrase and synonyms also remain the\n * same to return the cached result. The joining of keyphrase and synonyms for this function is needed,\n * because by default memoize caches by the first key only, which in the current case would mean that the function would\n * return the cached forms if the keyphrase has not changed (without checking if synonyms were changed).\n *\n * @param {function} stemmer \t\t\t\tThe language-specific stemmer (if available).\n * @param {string[]} functionWords \t\t\t\tThe language-specific function words.\n * @param {boolean}\t areHyphensWordBoundaries\tWhether hyphens should be treated as word boundaries.\n *\n * @returns {function} The function that collects the stems for a given set of keyphrase, synonyms, stemmer and functionWords.\n */\nconst primeLanguageSpecificData = memoize( ( stemmer, functionWords, areHyphensWordBoundaries ) => {\n\treturn memoize( ( keyphrase, synonyms ) => {\n\t\treturn collectKeyphraseAndSynonymsStems( keyphrase, synonyms, stemmer, functionWords, areHyphensWordBoundaries );\n\t}, ( keyphrase, synonyms ) => {\n\t\treturn keyphrase + \",\" + synonyms.join( \",\" );\n\t} );\n} );\n\n/**\n * Retrieves stems of words of the keyphrase and of each synonym phrase using the function that caches\n * the results of previous calls of this function.\n *\n * @param {string} keyphrase \t\t\tThe paper's keyphrase.\n * @param {string[]} synonyms \t\t\tThe paper's synonyms.\n * @param {function} stemmer \t\t\tThe language-specific stemmer (if available).\n * @param {string[]} functionWords \t\t\tThe language-specific function words.\n * @param {boolean}\t\tareHyphensWordBoundaries\tWhether hyphens should be treated as word boundaries.\n *\n * @returns {Object} Object with an array of stems of words in the keyphrase and an array of arrays of stems of words in the synonyms.\n */\nfunction collectStems( keyphrase, synonyms, stemmer, functionWords, areHyphensWordBoundaries ) {\n\tconst collectStemsWithLanguageSpecificData = primeLanguageSpecificData( stemmer, functionWords, areHyphensWordBoundaries );\n\n\treturn collectStemsWithLanguageSpecificData( keyphrase, synonyms );\n}\n\nexport {\n\tbuildStems,\n\tcollectStems,\n\tTopicPhrase,\n\tStemOriginalPair,\n\tprimeLanguageSpecificData,\n};\n"],"mappings":";;;;;;;;;AAAA,IAAAA,SAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AACA,IAAAE,iCAAA,GAAAF,OAAA;AAEA,IAAAG,OAAA,GAAAH,OAAA;AACA,IAAAI,eAAA,GAAAL,sBAAA,CAAAC,OAAA;AAAqD,SAAAD,uBAAAM,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAErD;AACA;AACA;AACA,MAAMG,WAAW,CAAC;EACjB;AACD;AACA;AACA;AACA;AACA;AACA;AACA;EACCC,WAAWA,CAAEC,iBAAiB,GAAG,EAAE,EAAEC,UAAU,GAAG,KAAK,EAAG;IACzD,IAAI,CAACD,iBAAiB,GAAGA,iBAAiB;IAC1C,IAAI,CAACC,UAAU,GAAGA,UAAU;EAC7B;;EAEA;AACD;AACA;AACA;AACA;EACCC,QAAQA,CAAA,EAAG;IACV;IACA,IAAK,IAAI,CAACD,UAAU,EAAG;MACtB,OAAO,EAAE;IACV;IAEA,OAAO,IAAI,CAACD,iBAAiB,CAACG,GAAG,CAAEC,gBAAgB,IAAIA,gBAAgB,CAACC,IAAK,CAAC;EAC/E;AACD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAPAC,OAAA,CAAAR,WAAA,GAAAA,WAAA;AAQA,SAASS,gBAAgBA,CAAEF,IAAI,EAAEG,QAAQ,EAAG;EAC3C,IAAI,CAACH,IAAI,GAAGA,IAAI;EAChB,IAAI,CAACG,QAAQ,GAAGA,QAAQ;AACzB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,UAAU,GAAG,SAAAA,CAAUC,SAAS,EAAEC,OAAO,EAAEC,aAAa,EAAEC,wBAAwB,EAAG;EAC1F,IAAK,IAAAC,mBAAW,EAAEJ,SAAU,CAAC,IAAIA,SAAS,KAAK,EAAE,EAAG;IACnD,OAAO,IAAIZ,WAAW,CAAC,CAAC;EACzB;;EAEA;EACA,IAAK,IAAAiB,uBAAc,EAAEL,SAAU,CAAC,EAAG;IAClCA,SAAS,GAAGA,SAAS,CAACM,SAAS,CAAE,CAAC,EAAEN,SAAS,CAACO,MAAM,GAAG,CAAE,CAAC;IAC1D,OAAO,IAAInB,WAAW,CACrB,CAAE,IAAIS,gBAAgB,CAAE,IAAAW,oBAAY,EAAER,SAAU,CAAC,EAAEA,SAAU,CAAC,CAAE,EAChE,IACD,CAAC;EACF;;EAEA;AACD;AACA;AACA;EACC,IAAIS,cAAc,GAAGN,wBAAwB,GAAG,IAAAO,iBAAQ,EAAEV,SAAS,EAAEW,2DAA0B,CAAC,GAC7F,IAAAD,iBAAQ,EAAEV,SAAS,EAAEY,8DAA6B,CAAC;;EAEtD;EACA,MAAMC,yBAAyB,GAAGJ,cAAc,CAACK,MAAM,CAAIC,IAAI,IAAM,CAAEb,aAAa,CAACc,QAAQ,CAAED,IAAK,CAAE,CAAC;EACvG,IAAKF,yBAAyB,CAACN,MAAM,GAAG,CAAC,EAAG;IAC3CE,cAAc,GAAGI,yBAAyB;EAC3C;;EAEA;EACA,MAAMvB,iBAAiB,GAAGmB,cAAc,CAAChB,GAAG,CAAEsB,IAAI,IAAI;IACrD,OAAO,IAAIlB,gBAAgB,CAAEI,OAAO,CAAE,IAAAgB,uBAAe,EAAE,IAAAT,oBAAY,EAAEO,IAAK,CAAE,CAAE,CAAC,EAAEA,IAAK,CAAC;EACxF,CAAE,CAAC;EAEH,OAAO,IAAI3B,WAAW,CAAEE,iBAAkB,CAAC;AAC5C,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAVAM,OAAA,CAAAG,UAAA,GAAAA,UAAA;AAWA,MAAMmB,gCAAgC,GAAG,SAAAA,CAAUlB,SAAS,EAAEmB,QAAQ,EAAElB,OAAO,EAAEC,aAAa,EAAEC,wBAAwB,EAAG;EAC1H,MAAMiB,cAAc,GAAGrB,UAAU,CAAEC,SAAS,EAAEC,OAAO,EAAEC,aAAa,EAAEC,wBAAyB,CAAC;EAChG,MAAMkB,aAAa,GAAGF,QAAQ,CAAC1B,GAAG,CAAE6B,OAAO,IAAIvB,UAAU,CAAEuB,OAAO,EAAErB,OAAO,EAAEC,aAAa,EAAEC,wBAAyB,CAAE,CAAC;EAExH,OAAO;IACNiB,cAAc;IACdC;EACD,CAAC;AACF,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAME,yBAAyB,GAAA3B,OAAA,CAAA2B,yBAAA,GAAG,IAAAC,eAAO,EAAE,CAAEvB,OAAO,EAAEC,aAAa,EAAEC,wBAAwB,KAAM;EAClG,OAAO,IAAAqB,eAAO,EAAE,CAAExB,SAAS,EAAEmB,QAAQ,KAAM;IAC1C,OAAOD,gCAAgC,CAAElB,SAAS,EAAEmB,QAAQ,EAAElB,OAAO,EAAEC,aAAa,EAAEC,wBAAyB,CAAC;EACjH,CAAC,EAAE,CAAEH,SAAS,EAAEmB,QAAQ,KAAM;IAC7B,OAAOnB,SAAS,GAAG,GAAG,GAAGmB,QAAQ,CAACM,IAAI,CAAE,GAAI,CAAC;EAC9C,CAAE,CAAC;AACJ,CAAE,CAAC;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASC,YAAYA,CAAE1B,SAAS,EAAEmB,QAAQ,EAAElB,OAAO,EAAEC,aAAa,EAAEC,wBAAwB,EAAG;EAC9F,MAAMwB,oCAAoC,GAAGJ,yBAAyB,CAAEtB,OAAO,EAAEC,aAAa,EAAEC,wBAAyB,CAAC;EAE1H,OAAOwB,oCAAoC,CAAE3B,SAAS,EAAEmB,QAAS,CAAC;AACnE","ignoreList":[]}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = exports.createSingleRuleFromArray = exports.createRulesFromArrays = void 0;
|
|
7
|
+
/**
|
|
8
|
+
* Creates an object with a regex and a replacement pair to be processed.
|
|
9
|
+
*
|
|
10
|
+
* @param {Array} rule A pair or triplet of strings of which the first one is the regex to match
|
|
11
|
+
* and the second (and the third) is the replacement.
|
|
12
|
+
* @param {string} [flags=i] The regex flags to use.
|
|
13
|
+
*
|
|
14
|
+
* @returns {{ reg: RegExp, repl: string }|{ reg: RegExp, repl1: string, repl2: string }|null} Object to be used in the regex-based rules.
|
|
15
|
+
*/
|
|
16
|
+
const createSingleRuleFromArray = function (rule, flags = "i") {
|
|
17
|
+
if (rule.length === 2) {
|
|
18
|
+
return {
|
|
19
|
+
reg: new RegExp(rule[0], flags),
|
|
20
|
+
repl: rule[1]
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
if (rule.length === 3) {
|
|
24
|
+
return {
|
|
25
|
+
reg: new RegExp(rule[0], flags),
|
|
26
|
+
repl1: rule[1],
|
|
27
|
+
repl2: rule[2]
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
return null;
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Creates an array of objects with a regex and a replacement pair to be processed.
|
|
35
|
+
*
|
|
36
|
+
* @param {Array} rules An array with pairs or triplets of strings of which the first one is the regex to match
|
|
37
|
+
* and the second (and the third) is the replacement.
|
|
38
|
+
* @param {string} [flags=i] The regex flags to use.
|
|
39
|
+
*
|
|
40
|
+
* @returns {Array} Array of objects to be used in the regex-based rules.
|
|
41
|
+
*/
|
|
42
|
+
exports.createSingleRuleFromArray = createSingleRuleFromArray;
|
|
43
|
+
const createRulesFromArrays = function (rules, flags = "i") {
|
|
44
|
+
return rules.map(rule => createSingleRuleFromArray(rule, flags));
|
|
45
|
+
};
|
|
46
|
+
exports.createRulesFromArrays = createRulesFromArrays;
|
|
47
|
+
var _default = exports.default = createRulesFromArrays;
|
|
48
|
+
//# sourceMappingURL=createRulesFromArrays.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createRulesFromArrays.js","names":["createSingleRuleFromArray","rule","flags","length","reg","RegExp","repl","repl1","repl2","exports","createRulesFromArrays","rules","map","_default","default"],"sources":["../../../../src/languageProcessing/helpers/morphology/createRulesFromArrays.js"],"sourcesContent":["/**\n * Creates an object with a regex and a replacement pair to be processed.\n *\n * @param {Array} rule A pair or triplet of strings of which the first one is the regex to match\n * and the second (and the third) is the replacement.\n * @param {string} [flags=i] The regex flags to use.\n *\n * @returns {{ reg: RegExp, repl: string }|{ reg: RegExp, repl1: string, repl2: string }|null} Object to be used in the regex-based rules.\n */\nconst createSingleRuleFromArray = function( rule, flags = \"i\" ) {\n\tif ( rule.length === 2 ) {\n\t\treturn {\n\t\t\treg: new RegExp( rule[ 0 ], flags ),\n\t\t\trepl: rule[ 1 ],\n\t\t};\n\t}\n\tif ( rule.length === 3 ) {\n\t\treturn {\n\t\t\treg: new RegExp( rule[ 0 ], flags ),\n\t\t\trepl1: rule[ 1 ],\n\t\t\trepl2: rule[ 2 ],\n\t\t};\n\t}\n\treturn null;\n};\n\n/**\n * Creates an array of objects with a regex and a replacement pair to be processed.\n *\n * @param {Array} rules An array with pairs or triplets of strings of which the first one is the regex to match\n * and the second (and the third) is the replacement.\n * @param {string} [flags=i] The regex flags to use.\n *\n * @returns {Array} Array of objects to be used in the regex-based rules.\n */\nconst createRulesFromArrays = function( rules, flags = \"i\" ) {\n\treturn rules.map( rule => createSingleRuleFromArray( rule, flags ) );\n};\n\nexport {\n\tcreateSingleRuleFromArray,\n\tcreateRulesFromArrays,\n};\n\nexport default createRulesFromArrays;\n"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMA,yBAAyB,GAAG,SAAAA,CAAUC,IAAI,EAAEC,KAAK,GAAG,GAAG,EAAG;EAC/D,IAAKD,IAAI,CAACE,MAAM,KAAK,CAAC,EAAG;IACxB,OAAO;MACNC,GAAG,EAAE,IAAIC,MAAM,CAAEJ,IAAI,CAAE,CAAC,CAAE,EAAEC,KAAM,CAAC;MACnCI,IAAI,EAAEL,IAAI,CAAE,CAAC;IACd,CAAC;EACF;EACA,IAAKA,IAAI,CAACE,MAAM,KAAK,CAAC,EAAG;IACxB,OAAO;MACNC,GAAG,EAAE,IAAIC,MAAM,CAAEJ,IAAI,CAAE,CAAC,CAAE,EAAEC,KAAM,CAAC;MACnCK,KAAK,EAAEN,IAAI,CAAE,CAAC,CAAE;MAChBO,KAAK,EAAEP,IAAI,CAAE,CAAC;IACf,CAAC;EACF;EACA,OAAO,IAAI;AACZ,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AARAQ,OAAA,CAAAT,yBAAA,GAAAA,yBAAA;AASA,MAAMU,qBAAqB,GAAG,SAAAA,CAAUC,KAAK,EAAET,KAAK,GAAG,GAAG,EAAG;EAC5D,OAAOS,KAAK,CAACC,GAAG,CAAEX,IAAI,IAAID,yBAAyB,CAAEC,IAAI,EAAEC,KAAM,CAAE,CAAC;AACrE,CAAC;AAACO,OAAA,CAAAC,qBAAA,GAAAA,qBAAA;AAAA,IAAAG,QAAA,GAAAJ,OAAA,CAAAK,OAAA,GAOaJ,qBAAqB","ignoreList":[]}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.checkExceptionListWithTwoStems = checkExceptionListWithTwoStems;
|
|
7
|
+
exports.checkIfWordEndingIsOnExceptionList = checkIfWordEndingIsOnExceptionList;
|
|
8
|
+
exports.checkIfWordIsOnListThatCanHavePrefix = checkIfWordIsOnListThatCanHavePrefix;
|
|
9
|
+
var _flattenSortLength = _interopRequireDefault(require("./flattenSortLength"));
|
|
10
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
11
|
+
/**
|
|
12
|
+
* Checks whether the word ends in one of the words in an exception list that is a simple array.
|
|
13
|
+
*
|
|
14
|
+
* @param {string} word The word to check.
|
|
15
|
+
* @param {string[]} exceptionList The list of exceptions.
|
|
16
|
+
*
|
|
17
|
+
* @returns {boolean} Whether the checked word ends in one of the words in the exception list.
|
|
18
|
+
*/
|
|
19
|
+
function checkIfWordEndingIsOnExceptionList(word, exceptionList) {
|
|
20
|
+
for (let i = 0; i < exceptionList.length; i++) {
|
|
21
|
+
if (word.endsWith(exceptionList[i])) {
|
|
22
|
+
return true;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
return false;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Checks whether a word is on the list of words that can have a prefix or not. Before checking the list, checks whether the word has a prefix
|
|
30
|
+
* and if it does, removes it.
|
|
31
|
+
*
|
|
32
|
+
* @param {string} word The word to check.
|
|
33
|
+
* @param {string[]} exceptionList The list of exceptions.
|
|
34
|
+
* @param {Object} prefixesObject An Object that contains the arrays of prefixes.
|
|
35
|
+
*
|
|
36
|
+
* @returns {boolean} Whether the word was found on the exception list or not.
|
|
37
|
+
*/
|
|
38
|
+
function checkIfWordIsOnListThatCanHavePrefix(word, exceptionList, prefixesObject) {
|
|
39
|
+
const prefixes = (0, _flattenSortLength.default)(prefixesObject);
|
|
40
|
+
|
|
41
|
+
// Check whether the inputted word starts with one of the prefixes
|
|
42
|
+
const foundPrefix = prefixes.find(prefix => word.startsWith(prefix));
|
|
43
|
+
let stemmedWordWithoutPrefix = "";
|
|
44
|
+
if (typeof foundPrefix === "string") {
|
|
45
|
+
stemmedWordWithoutPrefix = word.slice(foundPrefix.length);
|
|
46
|
+
// At least 3 characters left after prefix deletion so that e.g. "be" is not treated as a prefix if found in the word "berg".
|
|
47
|
+
if (stemmedWordWithoutPrefix.length > 2) {
|
|
48
|
+
word = stemmedWordWithoutPrefix;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
return exceptionList.includes(word);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Checks whether the word ends in one of the words in an exception list with two stems.
|
|
56
|
+
*
|
|
57
|
+
* @param {Array} exceptionListWithTwoStems The exception list with two stems.
|
|
58
|
+
* @param {string} word The word to check.
|
|
59
|
+
*
|
|
60
|
+
* @returns {string} The stem.
|
|
61
|
+
*/
|
|
62
|
+
function checkExceptionListWithTwoStems(exceptionListWithTwoStems, word) {
|
|
63
|
+
for (const stemSet of exceptionListWithTwoStems) {
|
|
64
|
+
const foundStem = stemSet.find(stemWord => word.endsWith(stemWord));
|
|
65
|
+
if (foundStem) {
|
|
66
|
+
const precedingLexicalMaterial = word.slice(0, word.length - foundStem.length);
|
|
67
|
+
return precedingLexicalMaterial + stemSet[0];
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
//# sourceMappingURL=exceptionListHelpers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"exceptionListHelpers.js","names":["_flattenSortLength","_interopRequireDefault","require","e","__esModule","default","checkIfWordEndingIsOnExceptionList","word","exceptionList","i","length","endsWith","checkIfWordIsOnListThatCanHavePrefix","prefixesObject","prefixes","flattenSortLength","foundPrefix","find","prefix","startsWith","stemmedWordWithoutPrefix","slice","includes","checkExceptionListWithTwoStems","exceptionListWithTwoStems","stemSet","foundStem","stemWord","precedingLexicalMaterial"],"sources":["../../../../src/languageProcessing/helpers/morphology/exceptionListHelpers.js"],"sourcesContent":["import flattenSortLength from \"./flattenSortLength\";\n\n/**\n * Checks whether the word ends in one of the words in an exception list that is a simple array.\n *\n * @param {string}\t word The word to check.\n * @param {string[]}\texceptionList\tThe list of exceptions.\n *\n * @returns {boolean}\tWhether the checked word ends in one of the words in the exception list.\n */\nexport function checkIfWordEndingIsOnExceptionList( word, exceptionList ) {\n\tfor ( let i = 0; i < exceptionList.length; i++ ) {\n\t\tif ( word.endsWith( exceptionList[ i ] ) ) {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n}\n\n/**\n * Checks whether a word is on the list of words that can have a prefix or not. Before checking the list, checks whether the word has a prefix\n * and if it does, removes it.\n *\n * @param {string}\t \tword\t\t\t\t\tThe word to check.\n * @param {string[]}\texceptionList\t\t\tThe list of exceptions.\n * @param {Object}\t\tprefixesObject\t An Object that contains the arrays of prefixes.\n *\n * @returns {boolean}\tWhether the word was found on the exception list or not.\n */\nexport function checkIfWordIsOnListThatCanHavePrefix( word, exceptionList, prefixesObject ) {\n\tconst prefixes = flattenSortLength( prefixesObject );\n\n\t// Check whether the inputted word starts with one of the prefixes\n\tconst foundPrefix = prefixes.find( prefix => word.startsWith( prefix ) );\n\tlet stemmedWordWithoutPrefix = \"\";\n\n\tif ( typeof( foundPrefix ) === \"string\" ) {\n\t\tstemmedWordWithoutPrefix = word.slice( foundPrefix.length );\n\t\t// At least 3 characters left after prefix deletion so that e.g. \"be\" is not treated as a prefix if found in the word \"berg\".\n\t\tif ( stemmedWordWithoutPrefix.length > 2 ) {\n\t\t\tword = stemmedWordWithoutPrefix;\n\t\t}\n\t}\n\n\treturn exceptionList.includes( word );\n}\n\n/**\n * Checks whether the word ends in one of the words in an exception list with two stems.\n *\n * @param {Array} exceptionListWithTwoStems The exception list with two stems.\n * @param {string} word\tThe word to check.\n *\n * @returns {string} The stem.\n */\nexport function checkExceptionListWithTwoStems( exceptionListWithTwoStems, word ) {\n\tfor ( const stemSet of exceptionListWithTwoStems ) {\n\t\tconst foundStem = stemSet.find( stemWord => word.endsWith( stemWord ) );\n\t\tif ( foundStem ) {\n\t\t\tconst precedingLexicalMaterial = word.slice( 0, word.length - foundStem.length );\n\n\t\t\treturn precedingLexicalMaterial + stemSet[ 0 ];\n\t\t}\n\t}\n}\n"],"mappings":";;;;;;;;AAAA,IAAAA,kBAAA,GAAAC,sBAAA,CAAAC,OAAA;AAAoD,SAAAD,uBAAAE,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAEpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASG,kCAAkCA,CAAEC,IAAI,EAAEC,aAAa,EAAG;EACzE,KAAM,IAAIC,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAGD,aAAa,CAACE,MAAM,EAAED,CAAC,EAAE,EAAG;IAChD,IAAKF,IAAI,CAACI,QAAQ,CAAEH,aAAa,CAAEC,CAAC,CAAG,CAAC,EAAG;MAC1C,OAAO,IAAI;IACZ;EACD;EACA,OAAO,KAAK;AACb;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASG,oCAAoCA,CAAEL,IAAI,EAAEC,aAAa,EAAEK,cAAc,EAAG;EAC3F,MAAMC,QAAQ,GAAG,IAAAC,0BAAiB,EAAEF,cAAe,CAAC;;EAEpD;EACA,MAAMG,WAAW,GAAGF,QAAQ,CAACG,IAAI,CAAEC,MAAM,IAAIX,IAAI,CAACY,UAAU,CAAED,MAAO,CAAE,CAAC;EACxE,IAAIE,wBAAwB,GAAG,EAAE;EAEjC,IAAK,OAAQJ,WAAa,KAAK,QAAQ,EAAG;IACzCI,wBAAwB,GAAGb,IAAI,CAACc,KAAK,CAAEL,WAAW,CAACN,MAAO,CAAC;IAC3D;IACA,IAAKU,wBAAwB,CAACV,MAAM,GAAG,CAAC,EAAG;MAC1CH,IAAI,GAAGa,wBAAwB;IAChC;EACD;EAEA,OAAOZ,aAAa,CAACc,QAAQ,CAAEf,IAAK,CAAC;AACtC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASgB,8BAA8BA,CAAEC,yBAAyB,EAAEjB,IAAI,EAAG;EACjF,KAAM,MAAMkB,OAAO,IAAID,yBAAyB,EAAG;IAClD,MAAME,SAAS,GAAID,OAAO,CAACR,IAAI,CAAEU,QAAQ,IAAIpB,IAAI,CAACI,QAAQ,CAAEgB,QAAS,CAAE,CAAC;IACxE,IAAKD,SAAS,EAAG;MAChB,MAAME,wBAAwB,GAAGrB,IAAI,CAACc,KAAK,CAAE,CAAC,EAAEd,IAAI,CAACG,MAAM,GAAGgB,SAAS,CAAChB,MAAO,CAAC;MAEhF,OAAOkB,wBAAwB,GAAGH,OAAO,CAAE,CAAC,CAAE;IAC/C;EACD;AACD","ignoreList":[]}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = findMatchingEndingInArray;
|
|
7
|
+
/**
|
|
8
|
+
* Loops through an array of word endings and returns the longest ending that was matched at the end of the string.
|
|
9
|
+
*
|
|
10
|
+
* @param {string} string The string to check.
|
|
11
|
+
* @param {string[]} endings The word endings to check.
|
|
12
|
+
* @returns {string} The longest matched ending.
|
|
13
|
+
*/
|
|
14
|
+
function findMatchingEndingInArray(string, endings) {
|
|
15
|
+
const matches = [];
|
|
16
|
+
for (const i in endings) {
|
|
17
|
+
if (string.endsWith(endings[i])) {
|
|
18
|
+
matches.push(endings[i]);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
const longest = matches.sort(function (a, b) {
|
|
22
|
+
return b.length - a.length;
|
|
23
|
+
})[0];
|
|
24
|
+
if (longest) {
|
|
25
|
+
return longest;
|
|
26
|
+
}
|
|
27
|
+
return "";
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=findMatchingEndingInArray.js.map
|