axyseo 2.0.0-alpha.2 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1255) hide show
  1. package/build/config/diacritics.js +1 -7
  2. package/build/config/diacritics.js.map +1 -1
  3. package/build/config/getTransliterations.js +6 -14
  4. package/build/config/getTransliterations.js.map +1 -1
  5. package/build/config/transliterationsWPstyle.js +5 -12
  6. package/build/config/transliterationsWPstyle.js.map +1 -1
  7. package/build/config/wordBoundaries.js +1 -7
  8. package/build/config/wordBoundaries.js.map +1 -1
  9. package/build/config/wordBoundariesWithoutPunctuation.js +2 -8
  10. package/build/config/wordBoundariesWithoutPunctuation.js.map +1 -1
  11. package/build/const/analysis.js +32 -11
  12. package/build/const/analysis.js.map +1 -1
  13. package/build/errors/invalidType.js +1 -8
  14. package/build/errors/invalidType.js.map +1 -1
  15. package/build/errors/missingArgument.js +1 -8
  16. package/build/errors/missingArgument.js.map +1 -1
  17. package/build/helpers/createMeasurementElement.js +1 -8
  18. package/build/helpers/createMeasurementElement.js.map +1 -1
  19. package/build/helpers/domManipulation.js +3 -8
  20. package/build/helpers/domManipulation.js.map +1 -1
  21. package/build/helpers/errors.js +5 -10
  22. package/build/helpers/errors.js.map +1 -1
  23. package/build/helpers/factory.js +7 -13
  24. package/build/helpers/factory.js.map +1 -1
  25. package/build/helpers/formatNumber.js +1 -7
  26. package/build/helpers/formatNumber.js.map +1 -1
  27. package/build/helpers/formatString.js +4 -9
  28. package/build/helpers/formatString.js.map +1 -1
  29. package/build/helpers/getLanguagesWithWordComplexity.js +1 -7
  30. package/build/helpers/getLanguagesWithWordComplexity.js.map +1 -1
  31. package/build/helpers/getLanguagesWithWordFormSupport.js +1 -7
  32. package/build/helpers/getLanguagesWithWordFormSupport.js.map +1 -1
  33. package/build/helpers/getWordComplexityConfig.js +9 -15
  34. package/build/helpers/getWordComplexityConfig.js.map +1 -1
  35. package/build/helpers/getWordComplexityHelper.js +9 -15
  36. package/build/helpers/getWordComplexityHelper.js.map +1 -1
  37. package/build/helpers/htmlEntities.js +6 -11
  38. package/build/helpers/htmlEntities.js.map +1 -1
  39. package/build/helpers/includesAny.js +3 -8
  40. package/build/helpers/includesAny.js.map +1 -1
  41. package/build/helpers/index.js +30 -72
  42. package/build/helpers/index.js.map +1 -1
  43. package/build/helpers/shortlinker/Shortlinker.js +1 -8
  44. package/build/helpers/shortlinker/Shortlinker.js.map +1 -1
  45. package/build/helpers/shortlinker/index.js +1 -16
  46. package/build/helpers/shortlinker/index.js.map +1 -1
  47. package/build/helpers/shortlinker/singleton.js +5 -13
  48. package/build/helpers/shortlinker/singleton.js.map +1 -1
  49. package/build/helpers/types.js +2 -9
  50. package/build/helpers/types.js.map +1 -1
  51. package/build/index.js +25 -87
  52. package/build/index.js.map +1 -1
  53. package/build/languageProcessing/AbstractResearcher.js +88 -95
  54. package/build/languageProcessing/AbstractResearcher.js.map +1 -1
  55. package/build/languageProcessing/helpers/highlighting/getMarkingsInSentence.js +3 -10
  56. package/build/languageProcessing/helpers/highlighting/getMarkingsInSentence.js.map +1 -1
  57. package/build/languageProcessing/helpers/html/getFieldsToMark.js +6 -11
  58. package/build/languageProcessing/helpers/html/getFieldsToMark.js.map +1 -1
  59. package/build/languageProcessing/helpers/html/getSubheadingTexts.js +3 -8
  60. package/build/languageProcessing/helpers/html/getSubheadingTexts.js.map +1 -1
  61. package/build/languageProcessing/helpers/html/getSubheadings.js +2 -12
  62. package/build/languageProcessing/helpers/html/getSubheadings.js.map +1 -1
  63. package/build/languageProcessing/helpers/html/html.js +9 -17
  64. package/build/languageProcessing/helpers/html/html.js.map +1 -1
  65. package/build/languageProcessing/helpers/html/htmlParser.js +3 -10
  66. package/build/languageProcessing/helpers/html/htmlParser.js.map +1 -1
  67. package/build/languageProcessing/helpers/html/matchParagraphs.js +7 -12
  68. package/build/languageProcessing/helpers/html/matchParagraphs.js.map +1 -1
  69. package/build/languageProcessing/helpers/html/normalizeHTML.js +4 -10
  70. package/build/languageProcessing/helpers/html/normalizeHTML.js.map +1 -1
  71. package/build/languageProcessing/helpers/image/getAltAttribute.js +3 -9
  72. package/build/languageProcessing/helpers/image/getAltAttribute.js.map +1 -1
  73. package/build/languageProcessing/helpers/image/getImagesInTree.js +1 -7
  74. package/build/languageProcessing/helpers/image/getImagesInTree.js.map +1 -1
  75. package/build/languageProcessing/helpers/image/imageInText.js +5 -12
  76. package/build/languageProcessing/helpers/image/imageInText.js.map +1 -1
  77. package/build/languageProcessing/helpers/index.js +5 -40
  78. package/build/languageProcessing/helpers/index.js.map +1 -1
  79. package/build/languageProcessing/helpers/language/getLanguage.js +1 -7
  80. package/build/languageProcessing/helpers/language/getLanguage.js.map +1 -1
  81. package/build/languageProcessing/helpers/link/checkNofollow.js +3 -10
  82. package/build/languageProcessing/helpers/link/checkNofollow.js.map +1 -1
  83. package/build/languageProcessing/helpers/link/getAnchorsFromText.js +1 -7
  84. package/build/languageProcessing/helpers/link/getAnchorsFromText.js.map +1 -1
  85. package/build/languageProcessing/helpers/link/getLinkType.js +7 -13
  86. package/build/languageProcessing/helpers/link/getLinkType.js.map +1 -1
  87. package/build/languageProcessing/helpers/match/findKeywordFormsInString.js +10 -17
  88. package/build/languageProcessing/helpers/match/findKeywordFormsInString.js.map +1 -1
  89. package/build/languageProcessing/helpers/match/isDoubleQuoted.js +4 -10
  90. package/build/languageProcessing/helpers/match/isDoubleQuoted.js.map +1 -1
  91. package/build/languageProcessing/helpers/match/matchTextWithArray.js +6 -12
  92. package/build/languageProcessing/helpers/match/matchTextWithArray.js.map +1 -1
  93. package/build/languageProcessing/helpers/match/matchTextWithTransliteration.js +16 -22
  94. package/build/languageProcessing/helpers/match/matchTextWithTransliteration.js.map +1 -1
  95. package/build/languageProcessing/helpers/match/matchTextWithWord.js +17 -23
  96. package/build/languageProcessing/helpers/match/matchTextWithWord.js.map +1 -1
  97. package/build/languageProcessing/helpers/match/matchWordFormsWithSentence.js +7 -15
  98. package/build/languageProcessing/helpers/match/matchWordFormsWithSentence.js.map +1 -1
  99. package/build/languageProcessing/helpers/match/processExactMatchRequest.js +3 -9
  100. package/build/languageProcessing/helpers/match/processExactMatchRequest.js.map +1 -1
  101. package/build/languageProcessing/helpers/morphology/baseStemmer.js +1 -7
  102. package/build/languageProcessing/helpers/morphology/baseStemmer.js.map +1 -1
  103. package/build/languageProcessing/helpers/morphology/buildFormRule.js +1 -7
  104. package/build/languageProcessing/helpers/morphology/buildFormRule.js.map +1 -1
  105. package/build/languageProcessing/helpers/morphology/buildTopicStems.js +13 -23
  106. package/build/languageProcessing/helpers/morphology/buildTopicStems.js.map +1 -1
  107. package/build/languageProcessing/helpers/morphology/createRulesFromArrays.js +2 -9
  108. package/build/languageProcessing/helpers/morphology/createRulesFromArrays.js.map +1 -1
  109. package/build/languageProcessing/helpers/morphology/exceptionListHelpers.js +5 -13
  110. package/build/languageProcessing/helpers/morphology/exceptionListHelpers.js.map +1 -1
  111. package/build/languageProcessing/helpers/morphology/findMatchingEndingInArray.js +1 -7
  112. package/build/languageProcessing/helpers/morphology/findMatchingEndingInArray.js.map +1 -1
  113. package/build/languageProcessing/helpers/morphology/flattenSortLength.js +3 -8
  114. package/build/languageProcessing/helpers/morphology/flattenSortLength.js.map +1 -1
  115. package/build/languageProcessing/helpers/morphology/getAllWordsFromPaper.js +12 -18
  116. package/build/languageProcessing/helpers/morphology/getAllWordsFromPaper.js.map +1 -1
  117. package/build/languageProcessing/helpers/morphology/regexHelpers.js +3 -11
  118. package/build/languageProcessing/helpers/morphology/regexHelpers.js.map +1 -1
  119. package/build/languageProcessing/helpers/morphology/stemHelpers.js +2 -9
  120. package/build/languageProcessing/helpers/morphology/stemHelpers.js.map +1 -1
  121. package/build/languageProcessing/helpers/morphology/stemPrefixedFunctionWords.js +1 -7
  122. package/build/languageProcessing/helpers/morphology/stemPrefixedFunctionWords.js.map +1 -1
  123. package/build/languageProcessing/helpers/passiveVoice/periphrastic/directPrecedenceException.js +5 -11
  124. package/build/languageProcessing/helpers/passiveVoice/periphrastic/directPrecedenceException.js.map +1 -1
  125. package/build/languageProcessing/helpers/passiveVoice/periphrastic/freeAuxiliaryParticipleOrder/getClausesSplitOnStopWords.js +9 -15
  126. package/build/languageProcessing/helpers/passiveVoice/periphrastic/freeAuxiliaryParticipleOrder/getClausesSplitOnStopWords.js.map +1 -1
  127. package/build/languageProcessing/helpers/passiveVoice/periphrastic/freeAuxiliaryParticipleOrder/nonDirectParticiplePrecedenceException.js +9 -15
  128. package/build/languageProcessing/helpers/passiveVoice/periphrastic/freeAuxiliaryParticipleOrder/nonDirectParticiplePrecedenceException.js.map +1 -1
  129. package/build/languageProcessing/helpers/passiveVoice/periphrastic/getClauses.js +28 -34
  130. package/build/languageProcessing/helpers/passiveVoice/periphrastic/getClauses.js.map +1 -1
  131. package/build/languageProcessing/helpers/passiveVoice/periphrastic/getIndicesWithRegex.js +1 -7
  132. package/build/languageProcessing/helpers/passiveVoice/periphrastic/getIndicesWithRegex.js.map +1 -1
  133. package/build/languageProcessing/helpers/passiveVoice/periphrastic/matchRegularParticiples.js +3 -8
  134. package/build/languageProcessing/helpers/passiveVoice/periphrastic/matchRegularParticiples.js.map +1 -1
  135. package/build/languageProcessing/helpers/passiveVoice/periphrastic/precedenceException.js +5 -11
  136. package/build/languageProcessing/helpers/passiveVoice/periphrastic/precedenceException.js.map +1 -1
  137. package/build/languageProcessing/helpers/prominentWords/determineProminentWords.js +16 -28
  138. package/build/languageProcessing/helpers/prominentWords/determineProminentWords.js.map +1 -1
  139. package/build/languageProcessing/helpers/regex/createRegexFromArray.js +10 -16
  140. package/build/languageProcessing/helpers/regex/createRegexFromArray.js.map +1 -1
  141. package/build/languageProcessing/helpers/regex/createRegexFromDoubleArray.js +4 -10
  142. package/build/languageProcessing/helpers/regex/createRegexFromDoubleArray.js.map +1 -1
  143. package/build/languageProcessing/helpers/regex/createWordRegex.js +12 -18
  144. package/build/languageProcessing/helpers/regex/createWordRegex.js.map +1 -1
  145. package/build/languageProcessing/helpers/regex/matchStringWithRegex.js +1 -7
  146. package/build/languageProcessing/helpers/regex/matchStringWithRegex.js.map +1 -1
  147. package/build/languageProcessing/helpers/regex/searchAndReplaceWithOneRegex.js +1 -7
  148. package/build/languageProcessing/helpers/regex/searchAndReplaceWithOneRegex.js.map +1 -1
  149. package/build/languageProcessing/helpers/sanitize/doubleQuotes.js +1 -7
  150. package/build/languageProcessing/helpers/sanitize/doubleQuotes.js.map +1 -1
  151. package/build/languageProcessing/helpers/sanitize/filterShortcodesFromTree.js +3 -11
  152. package/build/languageProcessing/helpers/sanitize/filterShortcodesFromTree.js.map +1 -1
  153. package/build/languageProcessing/helpers/sanitize/mergeListItems.js +1 -7
  154. package/build/languageProcessing/helpers/sanitize/mergeListItems.js.map +1 -1
  155. package/build/languageProcessing/helpers/sanitize/parseSynonyms.js +5 -11
  156. package/build/languageProcessing/helpers/sanitize/parseSynonyms.js.map +1 -1
  157. package/build/languageProcessing/helpers/sanitize/quotes.js +4 -12
  158. package/build/languageProcessing/helpers/sanitize/quotes.js.map +1 -1
  159. package/build/languageProcessing/helpers/sanitize/removeEmailAddresses.js +1 -7
  160. package/build/languageProcessing/helpers/sanitize/removeEmailAddresses.js.map +1 -1
  161. package/build/languageProcessing/helpers/sanitize/removePunctuation.js +7 -13
  162. package/build/languageProcessing/helpers/sanitize/removePunctuation.js.map +1 -1
  163. package/build/languageProcessing/helpers/sanitize/removePunctuationExceptQuotes.js +1 -7
  164. package/build/languageProcessing/helpers/sanitize/removePunctuationExceptQuotes.js.map +1 -1
  165. package/build/languageProcessing/helpers/sanitize/removeSentenceTerminators.js +1 -7
  166. package/build/languageProcessing/helpers/sanitize/removeSentenceTerminators.js.map +1 -1
  167. package/build/languageProcessing/helpers/sanitize/removeURLs.js +1 -7
  168. package/build/languageProcessing/helpers/sanitize/removeURLs.js.map +1 -1
  169. package/build/languageProcessing/helpers/sanitize/sanitizeLineBreakTag.js +1 -7
  170. package/build/languageProcessing/helpers/sanitize/sanitizeLineBreakTag.js.map +1 -1
  171. package/build/languageProcessing/helpers/sanitize/sanitizeString.js +5 -10
  172. package/build/languageProcessing/helpers/sanitize/sanitizeString.js.map +1 -1
  173. package/build/languageProcessing/helpers/sanitize/stripHTMLTags.js +7 -16
  174. package/build/languageProcessing/helpers/sanitize/stripHTMLTags.js.map +1 -1
  175. package/build/languageProcessing/helpers/sanitize/stripNonTextTags.js +4 -10
  176. package/build/languageProcessing/helpers/sanitize/stripNonTextTags.js.map +1 -1
  177. package/build/languageProcessing/helpers/sanitize/stripNumbers.js +4 -10
  178. package/build/languageProcessing/helpers/sanitize/stripNumbers.js.map +1 -1
  179. package/build/languageProcessing/helpers/sanitize/stripSpaces.js +1 -7
  180. package/build/languageProcessing/helpers/sanitize/stripSpaces.js.map +1 -1
  181. package/build/languageProcessing/helpers/sanitize/stripWordBoundaries.js +2 -10
  182. package/build/languageProcessing/helpers/sanitize/stripWordBoundaries.js.map +1 -1
  183. package/build/languageProcessing/helpers/sanitize/unifyWhitespace.js +2 -11
  184. package/build/languageProcessing/helpers/sanitize/unifyWhitespace.js.map +1 -1
  185. package/build/languageProcessing/helpers/sentence/SentenceTokenizer.js +22 -29
  186. package/build/languageProcessing/helpers/sentence/SentenceTokenizer.js.map +1 -1
  187. package/build/languageProcessing/helpers/sentence/countSentences.js +4 -10
  188. package/build/languageProcessing/helpers/sentence/countSentences.js.map +1 -1
  189. package/build/languageProcessing/helpers/sentence/getSentences.js +13 -20
  190. package/build/languageProcessing/helpers/sentence/getSentences.js.map +1 -1
  191. package/build/languageProcessing/helpers/sentence/getSentencesFromTree.js +2 -9
  192. package/build/languageProcessing/helpers/sentence/getSentencesFromTree.js.map +1 -1
  193. package/build/languageProcessing/helpers/sentence/memoizedSentenceTokenizer.js +4 -10
  194. package/build/languageProcessing/helpers/sentence/memoizedSentenceTokenizer.js.map +1 -1
  195. package/build/languageProcessing/helpers/sentence/sentencesLength.js +7 -13
  196. package/build/languageProcessing/helpers/sentence/sentencesLength.js.map +1 -1
  197. package/build/languageProcessing/helpers/syllables/DeviationFragment.js +5 -11
  198. package/build/languageProcessing/helpers/syllables/DeviationFragment.js.map +1 -1
  199. package/build/languageProcessing/helpers/syllables/countSyllables.js +23 -30
  200. package/build/languageProcessing/helpers/syllables/countSyllables.js.map +1 -1
  201. package/build/languageProcessing/helpers/syllables/syllableCountIterator.js +7 -14
  202. package/build/languageProcessing/helpers/syllables/syllableCountIterator.js.map +1 -1
  203. package/build/languageProcessing/helpers/syllables/syllableCountStep.js +5 -12
  204. package/build/languageProcessing/helpers/syllables/syllableCountStep.js.map +1 -1
  205. package/build/languageProcessing/helpers/transform/transformWordsWithHyphens.js +1 -7
  206. package/build/languageProcessing/helpers/transform/transformWordsWithHyphens.js.map +1 -1
  207. package/build/languageProcessing/helpers/transliterate/replaceDiacritics.js +4 -10
  208. package/build/languageProcessing/helpers/transliterate/replaceDiacritics.js.map +1 -1
  209. package/build/languageProcessing/helpers/transliterate/specialCharacterMappings.js +12 -23
  210. package/build/languageProcessing/helpers/transliterate/specialCharacterMappings.js.map +1 -1
  211. package/build/languageProcessing/helpers/transliterate/transliterate.js +3 -9
  212. package/build/languageProcessing/helpers/transliterate/transliterate.js.map +1 -1
  213. package/build/languageProcessing/helpers/transliterate/transliterateWPstyle.js +3 -9
  214. package/build/languageProcessing/helpers/transliterate/transliterateWPstyle.js.map +1 -1
  215. package/build/languageProcessing/helpers/url/parseSlug.js +1 -7
  216. package/build/languageProcessing/helpers/url/parseSlug.js.map +1 -1
  217. package/build/languageProcessing/helpers/url/url.js +7 -13
  218. package/build/languageProcessing/helpers/url/url.js.map +1 -1
  219. package/build/languageProcessing/helpers/word/addWordboundary.js +1 -7
  220. package/build/languageProcessing/helpers/word/addWordboundary.js.map +1 -1
  221. package/build/languageProcessing/helpers/word/areWordsInSentence.js +4 -10
  222. package/build/languageProcessing/helpers/word/areWordsInSentence.js.map +1 -1
  223. package/build/languageProcessing/helpers/word/countMetaDescriptionLength.js +1 -7
  224. package/build/languageProcessing/helpers/word/countMetaDescriptionLength.js.map +1 -1
  225. package/build/languageProcessing/helpers/word/countWords.js +4 -10
  226. package/build/languageProcessing/helpers/word/countWords.js.map +1 -1
  227. package/build/languageProcessing/helpers/word/createPunctuationTokens.js +5 -10
  228. package/build/languageProcessing/helpers/word/createPunctuationTokens.js.map +1 -1
  229. package/build/languageProcessing/helpers/word/filterWordsFromArray.js +4 -9
  230. package/build/languageProcessing/helpers/word/filterWordsFromArray.js.map +1 -1
  231. package/build/languageProcessing/helpers/word/followsIndex.js +5 -10
  232. package/build/languageProcessing/helpers/word/followsIndex.js.map +1 -1
  233. package/build/languageProcessing/helpers/word/getAllWordsFromTree.js +7 -13
  234. package/build/languageProcessing/helpers/word/getAllWordsFromTree.js.map +1 -1
  235. package/build/languageProcessing/helpers/word/getWords.js +9 -19
  236. package/build/languageProcessing/helpers/word/getWords.js.map +1 -1
  237. package/build/languageProcessing/helpers/word/includesIndex.js +5 -10
  238. package/build/languageProcessing/helpers/word/includesIndex.js.map +1 -1
  239. package/build/languageProcessing/helpers/word/indices.js +14 -25
  240. package/build/languageProcessing/helpers/word/indices.js.map +1 -1
  241. package/build/languageProcessing/helpers/word/markWordsInSentences.js +23 -35
  242. package/build/languageProcessing/helpers/word/markWordsInSentences.js.map +1 -1
  243. package/build/languageProcessing/helpers/word/matchWordInSentence.js +8 -15
  244. package/build/languageProcessing/helpers/word/matchWordInSentence.js.map +1 -1
  245. package/build/languageProcessing/helpers/word/splitIntoTokens.js +3 -9
  246. package/build/languageProcessing/helpers/word/splitIntoTokens.js.map +1 -1
  247. package/build/languageProcessing/index.js +41 -282
  248. package/build/languageProcessing/index.js.map +1 -1
  249. package/build/languageProcessing/languages/_default/Researcher.js +5 -13
  250. package/build/languageProcessing/languages/_default/Researcher.js.map +1 -1
  251. package/build/languageProcessing/languages/_default/helpers/getStemmer.js +3 -9
  252. package/build/languageProcessing/languages/_default/helpers/getStemmer.js.map +1 -1
  253. package/build/languageProcessing/languages/ar/Researcher.js +19 -27
  254. package/build/languageProcessing/languages/ar/Researcher.js.map +1 -1
  255. package/build/languageProcessing/languages/ar/config/firstWordExceptions.js +1 -7
  256. package/build/languageProcessing/languages/ar/config/firstWordExceptions.js.map +1 -1
  257. package/build/languageProcessing/languages/ar/config/functionWords.js +7 -13
  258. package/build/languageProcessing/languages/ar/config/functionWords.js.map +1 -1
  259. package/build/languageProcessing/languages/ar/config/internal/passiveVerbsWithLongVowel.js +1 -7
  260. package/build/languageProcessing/languages/ar/config/internal/passiveVerbsWithLongVowel.js.map +1 -1
  261. package/build/languageProcessing/languages/ar/config/prefixedFunctionWords.js +2 -8
  262. package/build/languageProcessing/languages/ar/config/prefixedFunctionWords.js.map +1 -1
  263. package/build/languageProcessing/languages/ar/config/transitionWords.js +4 -10
  264. package/build/languageProcessing/languages/ar/config/transitionWords.js.map +1 -1
  265. package/build/languageProcessing/languages/ar/config/twoPartTransitionWords.js +2 -7
  266. package/build/languageProcessing/languages/ar/config/twoPartTransitionWords.js.map +1 -1
  267. package/build/languageProcessing/languages/ar/helpers/createBasicWordForms.js +6 -11
  268. package/build/languageProcessing/languages/ar/helpers/createBasicWordForms.js.map +1 -1
  269. package/build/languageProcessing/languages/ar/helpers/getStemmer.js +8 -14
  270. package/build/languageProcessing/languages/ar/helpers/getStemmer.js.map +1 -1
  271. package/build/languageProcessing/languages/ar/helpers/internal/stem.js +1 -7
  272. package/build/languageProcessing/languages/ar/helpers/internal/stem.js.map +1 -1
  273. package/build/languageProcessing/languages/ar/helpers/isPassiveSentence.js +5 -12
  274. package/build/languageProcessing/languages/ar/helpers/isPassiveSentence.js.map +1 -1
  275. package/build/languageProcessing/languages/ca/Researcher.js +11 -19
  276. package/build/languageProcessing/languages/ca/Researcher.js.map +1 -1
  277. package/build/languageProcessing/languages/ca/config/sentenceLength.js +1 -7
  278. package/build/languageProcessing/languages/ca/config/sentenceLength.js.map +1 -1
  279. package/build/languageProcessing/languages/ca/config/transitionWords.js +4 -10
  280. package/build/languageProcessing/languages/ca/config/transitionWords.js.map +1 -1
  281. package/build/languageProcessing/languages/ca/config/twoPartTransitionWords.js +2 -7
  282. package/build/languageProcessing/languages/ca/config/twoPartTransitionWords.js.map +1 -1
  283. package/build/languageProcessing/languages/ca/helpers/getStemmer.js +3 -9
  284. package/build/languageProcessing/languages/ca/helpers/getStemmer.js.map +1 -1
  285. package/build/languageProcessing/languages/cs/Researcher.js +17 -25
  286. package/build/languageProcessing/languages/cs/Researcher.js.map +1 -1
  287. package/build/languageProcessing/languages/cs/config/firstWordExceptions.js +1 -7
  288. package/build/languageProcessing/languages/cs/config/firstWordExceptions.js.map +1 -1
  289. package/build/languageProcessing/languages/cs/config/functionWords.js +4 -10
  290. package/build/languageProcessing/languages/cs/config/functionWords.js.map +1 -1
  291. package/build/languageProcessing/languages/cs/config/internal/passiveVoiceAuxiliaries.js +2 -8
  292. package/build/languageProcessing/languages/cs/config/internal/passiveVoiceAuxiliaries.js.map +1 -1
  293. package/build/languageProcessing/languages/cs/config/internal/passiveVoiceEndings.js +2 -8
  294. package/build/languageProcessing/languages/cs/config/internal/passiveVoiceEndings.js.map +1 -1
  295. package/build/languageProcessing/languages/cs/config/stopWords.js +1 -7
  296. package/build/languageProcessing/languages/cs/config/stopWords.js.map +1 -1
  297. package/build/languageProcessing/languages/cs/config/transitionWords.js +4 -10
  298. package/build/languageProcessing/languages/cs/config/transitionWords.js.map +1 -1
  299. package/build/languageProcessing/languages/cs/config/twoPartTransitionWords.js +2 -7
  300. package/build/languageProcessing/languages/cs/config/twoPartTransitionWords.js.map +1 -1
  301. package/build/languageProcessing/languages/cs/helpers/getClauses.js +9 -16
  302. package/build/languageProcessing/languages/cs/helpers/getClauses.js.map +1 -1
  303. package/build/languageProcessing/languages/cs/helpers/getStemmer.js +8 -14
  304. package/build/languageProcessing/languages/cs/helpers/getStemmer.js.map +1 -1
  305. package/build/languageProcessing/languages/cs/helpers/internal/getParticiples.js +6 -12
  306. package/build/languageProcessing/languages/cs/helpers/internal/getParticiples.js.map +1 -1
  307. package/build/languageProcessing/languages/cs/helpers/internal/stem.js +1 -7
  308. package/build/languageProcessing/languages/cs/helpers/internal/stem.js.map +1 -1
  309. package/build/languageProcessing/languages/cs/values/Clause.js +5 -12
  310. package/build/languageProcessing/languages/cs/values/Clause.js.map +1 -1
  311. package/build/languageProcessing/languages/de/Researcher.js +27 -35
  312. package/build/languageProcessing/languages/de/Researcher.js.map +1 -1
  313. package/build/languageProcessing/languages/de/config/firstWordExceptions.js +1 -7
  314. package/build/languageProcessing/languages/de/config/firstWordExceptions.js.map +1 -1
  315. package/build/languageProcessing/languages/de/config/functionWords.js +11 -19
  316. package/build/languageProcessing/languages/de/config/functionWords.js.map +1 -1
  317. package/build/languageProcessing/languages/de/config/internal/exceptionsParticiplesActive.js +1 -7
  318. package/build/languageProcessing/languages/de/config/internal/exceptionsParticiplesActive.js.map +1 -1
  319. package/build/languageProcessing/languages/de/config/internal/passiveVoiceAuxiliaries.js +4 -10
  320. package/build/languageProcessing/languages/de/config/internal/passiveVoiceAuxiliaries.js.map +1 -1
  321. package/build/languageProcessing/languages/de/config/internal/passiveVoiceIrregulars.js +1 -7
  322. package/build/languageProcessing/languages/de/config/internal/passiveVoiceIrregulars.js.map +1 -1
  323. package/build/languageProcessing/languages/de/config/internal/passiveVoiceRegex.js +1 -7
  324. package/build/languageProcessing/languages/de/config/internal/passiveVoiceRegex.js.map +1 -1
  325. package/build/languageProcessing/languages/de/config/keyphraseLength.js +1 -7
  326. package/build/languageProcessing/languages/de/config/keyphraseLength.js.map +1 -1
  327. package/build/languageProcessing/languages/de/config/stopWords.js +1 -7
  328. package/build/languageProcessing/languages/de/config/stopWords.js.map +1 -1
  329. package/build/languageProcessing/languages/de/config/transitionWords.js +4 -10
  330. package/build/languageProcessing/languages/de/config/transitionWords.js.map +1 -1
  331. package/build/languageProcessing/languages/de/config/twoPartTransitionWords.js +2 -7
  332. package/build/languageProcessing/languages/de/config/twoPartTransitionWords.js.map +1 -1
  333. package/build/languageProcessing/languages/de/config/wordComplexity.js +1 -7
  334. package/build/languageProcessing/languages/de/config/wordComplexity.js.map +1 -1
  335. package/build/languageProcessing/languages/de/helpers/calculateFleschReadingScore.js +3 -9
  336. package/build/languageProcessing/languages/de/helpers/calculateFleschReadingScore.js.map +1 -1
  337. package/build/languageProcessing/languages/de/helpers/checkIfWordIsComplex.js +1 -7
  338. package/build/languageProcessing/languages/de/helpers/checkIfWordIsComplex.js.map +1 -1
  339. package/build/languageProcessing/languages/de/helpers/checkIfWordIsFunction.js +3 -8
  340. package/build/languageProcessing/languages/de/helpers/checkIfWordIsFunction.js.map +1 -1
  341. package/build/languageProcessing/languages/de/helpers/getClauses.js +9 -16
  342. package/build/languageProcessing/languages/de/helpers/getClauses.js.map +1 -1
  343. package/build/languageProcessing/languages/de/helpers/getStemmer.js +8 -14
  344. package/build/languageProcessing/languages/de/helpers/getStemmer.js.map +1 -1
  345. package/build/languageProcessing/languages/de/helpers/internal/SentenceTokenizer.js +4 -11
  346. package/build/languageProcessing/languages/de/helpers/internal/SentenceTokenizer.js.map +1 -1
  347. package/build/languageProcessing/languages/de/helpers/internal/detectAndStemRegularParticiple.js +4 -10
  348. package/build/languageProcessing/languages/de/helpers/internal/detectAndStemRegularParticiple.js.map +1 -1
  349. package/build/languageProcessing/languages/de/helpers/internal/determineStem.js +10 -16
  350. package/build/languageProcessing/languages/de/helpers/internal/determineStem.js.map +1 -1
  351. package/build/languageProcessing/languages/de/helpers/internal/getParticiples.js +9 -16
  352. package/build/languageProcessing/languages/de/helpers/internal/getParticiples.js.map +1 -1
  353. package/build/languageProcessing/languages/de/helpers/internal/stem.js +1 -7
  354. package/build/languageProcessing/languages/de/helpers/internal/stem.js.map +1 -1
  355. package/build/languageProcessing/languages/de/helpers/memoizedSentenceTokenizer.js +4 -10
  356. package/build/languageProcessing/languages/de/helpers/memoizedSentenceTokenizer.js.map +1 -1
  357. package/build/languageProcessing/languages/de/values/Clause.js +11 -18
  358. package/build/languageProcessing/languages/de/values/Clause.js.map +1 -1
  359. package/build/languageProcessing/languages/el/Researcher.js +18 -26
  360. package/build/languageProcessing/languages/el/Researcher.js.map +1 -1
  361. package/build/languageProcessing/languages/el/config/firstWordExceptions.js +1 -7
  362. package/build/languageProcessing/languages/el/config/firstWordExceptions.js.map +1 -1
  363. package/build/languageProcessing/languages/el/config/functionWords.js +4 -10
  364. package/build/languageProcessing/languages/el/config/functionWords.js.map +1 -1
  365. package/build/languageProcessing/languages/el/config/internal/auxiliaries.js +1 -7
  366. package/build/languageProcessing/languages/el/config/internal/auxiliaries.js.map +1 -1
  367. package/build/languageProcessing/languages/el/config/internal/morphologicalPassiveSuffixes.js +1 -7
  368. package/build/languageProcessing/languages/el/config/internal/morphologicalPassiveSuffixes.js.map +1 -1
  369. package/build/languageProcessing/languages/el/config/internal/nonPassiveVerbStems.js +1 -7
  370. package/build/languageProcessing/languages/el/config/internal/nonPassiveVerbStems.js.map +1 -1
  371. package/build/languageProcessing/languages/el/config/stopWords.js +1 -7
  372. package/build/languageProcessing/languages/el/config/stopWords.js.map +1 -1
  373. package/build/languageProcessing/languages/el/config/transitionWords.js +4 -10
  374. package/build/languageProcessing/languages/el/config/transitionWords.js.map +1 -1
  375. package/build/languageProcessing/languages/el/config/twoPartTransitionWords.js +2 -7
  376. package/build/languageProcessing/languages/el/config/twoPartTransitionWords.js.map +1 -1
  377. package/build/languageProcessing/languages/el/helpers/getClauses.js +9 -16
  378. package/build/languageProcessing/languages/el/helpers/getClauses.js.map +1 -1
  379. package/build/languageProcessing/languages/el/helpers/getStemmer.js +7 -14
  380. package/build/languageProcessing/languages/el/helpers/getStemmer.js.map +1 -1
  381. package/build/languageProcessing/languages/el/helpers/internal/getParticiples.js +3 -9
  382. package/build/languageProcessing/languages/el/helpers/internal/getParticiples.js.map +1 -1
  383. package/build/languageProcessing/languages/el/helpers/internal/stem.js +4 -13
  384. package/build/languageProcessing/languages/el/helpers/internal/stem.js.map +1 -1
  385. package/build/languageProcessing/languages/el/helpers/isPassiveSentence.js +7 -14
  386. package/build/languageProcessing/languages/el/helpers/isPassiveSentence.js.map +1 -1
  387. package/build/languageProcessing/languages/el/values/Clause.js +6 -12
  388. package/build/languageProcessing/languages/el/values/Clause.js.map +1 -1
  389. package/build/languageProcessing/languages/en/Researcher.js +21 -29
  390. package/build/languageProcessing/languages/en/Researcher.js.map +1 -1
  391. package/build/languageProcessing/languages/en/config/abbreviations.js +2 -8
  392. package/build/languageProcessing/languages/en/config/abbreviations.js.map +1 -1
  393. package/build/languageProcessing/languages/en/config/firstWordExceptions.js +1 -7
  394. package/build/languageProcessing/languages/en/config/firstWordExceptions.js.map +1 -1
  395. package/build/languageProcessing/languages/en/config/functionWords.js +11 -18
  396. package/build/languageProcessing/languages/en/config/functionWords.js.map +1 -1
  397. package/build/languageProcessing/languages/en/config/internal/passiveVoiceAuxiliaries.js +6 -12
  398. package/build/languageProcessing/languages/en/config/internal/passiveVoiceAuxiliaries.js.map +1 -1
  399. package/build/languageProcessing/languages/en/config/internal/passiveVoiceIrregulars.js +1 -7
  400. package/build/languageProcessing/languages/en/config/internal/passiveVoiceIrregulars.js.map +1 -1
  401. package/build/languageProcessing/languages/en/config/internal/passiveVoiceNonVerbEndingEd.js +1 -7
  402. package/build/languageProcessing/languages/en/config/internal/passiveVoiceNonVerbEndingEd.js.map +1 -1
  403. package/build/languageProcessing/languages/en/config/regularParticiplesRegex.js +1 -7
  404. package/build/languageProcessing/languages/en/config/regularParticiplesRegex.js.map +1 -1
  405. package/build/languageProcessing/languages/en/config/stopWords.js +1 -7
  406. package/build/languageProcessing/languages/en/config/stopWords.js.map +1 -1
  407. package/build/languageProcessing/languages/en/config/transitionWords.js +4 -10
  408. package/build/languageProcessing/languages/en/config/transitionWords.js.map +1 -1
  409. package/build/languageProcessing/languages/en/config/twoPartTransitionWords.js +2 -7
  410. package/build/languageProcessing/languages/en/config/twoPartTransitionWords.js.map +1 -1
  411. package/build/languageProcessing/languages/en/config/wordComplexity.js +1 -7
  412. package/build/languageProcessing/languages/en/config/wordComplexity.js.map +1 -1
  413. package/build/languageProcessing/languages/en/helpers/calculateFleschReadingScore.js +3 -9
  414. package/build/languageProcessing/languages/en/helpers/calculateFleschReadingScore.js.map +1 -1
  415. package/build/languageProcessing/languages/en/helpers/checkIfWordIsComplex.js +4 -10
  416. package/build/languageProcessing/languages/en/helpers/checkIfWordIsComplex.js.map +1 -1
  417. package/build/languageProcessing/languages/en/helpers/getClauses.js +15 -22
  418. package/build/languageProcessing/languages/en/helpers/getClauses.js.map +1 -1
  419. package/build/languageProcessing/languages/en/helpers/getStemmer.js +8 -14
  420. package/build/languageProcessing/languages/en/helpers/getStemmer.js.map +1 -1
  421. package/build/languageProcessing/languages/en/helpers/internal/determineStem.js +21 -32
  422. package/build/languageProcessing/languages/en/helpers/internal/determineStem.js.map +1 -1
  423. package/build/languageProcessing/languages/en/helpers/internal/getAdjectiveStem.js +6 -13
  424. package/build/languageProcessing/languages/en/helpers/internal/getAdjectiveStem.js.map +1 -1
  425. package/build/languageProcessing/languages/en/helpers/internal/getParticiples.js +8 -14
  426. package/build/languageProcessing/languages/en/helpers/internal/getParticiples.js.map +1 -1
  427. package/build/languageProcessing/languages/en/helpers/internal/getVerbStem.js +6 -16
  428. package/build/languageProcessing/languages/en/helpers/internal/getVerbStem.js.map +1 -1
  429. package/build/languageProcessing/languages/en/values/Clause.js +10 -17
  430. package/build/languageProcessing/languages/en/values/Clause.js.map +1 -1
  431. package/build/languageProcessing/languages/es/Researcher.js +23 -31
  432. package/build/languageProcessing/languages/es/Researcher.js.map +1 -1
  433. package/build/languageProcessing/languages/es/config/firstWordExceptions.js +1 -7
  434. package/build/languageProcessing/languages/es/config/firstWordExceptions.js.map +1 -1
  435. package/build/languageProcessing/languages/es/config/functionWords.js +11 -17
  436. package/build/languageProcessing/languages/es/config/functionWords.js.map +1 -1
  437. package/build/languageProcessing/languages/es/config/internal/passiveVoiceAuxiliaries.js +1 -7
  438. package/build/languageProcessing/languages/es/config/internal/passiveVoiceAuxiliaries.js.map +1 -1
  439. package/build/languageProcessing/languages/es/config/internal/passiveVoiceParticiples.js +1 -7
  440. package/build/languageProcessing/languages/es/config/internal/passiveVoiceParticiples.js.map +1 -1
  441. package/build/languageProcessing/languages/es/config/sentenceLength.js +1 -7
  442. package/build/languageProcessing/languages/es/config/sentenceLength.js.map +1 -1
  443. package/build/languageProcessing/languages/es/config/stopWords.js +1 -7
  444. package/build/languageProcessing/languages/es/config/stopWords.js.map +1 -1
  445. package/build/languageProcessing/languages/es/config/transitionWords.js +4 -10
  446. package/build/languageProcessing/languages/es/config/transitionWords.js.map +1 -1
  447. package/build/languageProcessing/languages/es/config/twoPartTransitionWords.js +2 -7
  448. package/build/languageProcessing/languages/es/config/twoPartTransitionWords.js.map +1 -1
  449. package/build/languageProcessing/languages/es/config/wordComplexity.js +1 -7
  450. package/build/languageProcessing/languages/es/config/wordComplexity.js.map +1 -1
  451. package/build/languageProcessing/languages/es/helpers/calculateFleschReadingScore.js +3 -9
  452. package/build/languageProcessing/languages/es/helpers/calculateFleschReadingScore.js.map +1 -1
  453. package/build/languageProcessing/languages/es/helpers/checkIfWordIsComplex.js +1 -7
  454. package/build/languageProcessing/languages/es/helpers/checkIfWordIsComplex.js.map +1 -1
  455. package/build/languageProcessing/languages/es/helpers/getClauses.js +10 -17
  456. package/build/languageProcessing/languages/es/helpers/getClauses.js.map +1 -1
  457. package/build/languageProcessing/languages/es/helpers/getStemmer.js +8 -14
  458. package/build/languageProcessing/languages/es/helpers/getStemmer.js.map +1 -1
  459. package/build/languageProcessing/languages/es/helpers/internal/checkVerbStemModifications.js +7 -13
  460. package/build/languageProcessing/languages/es/helpers/internal/checkVerbStemModifications.js.map +1 -1
  461. package/build/languageProcessing/languages/es/helpers/internal/getParticiples.js +6 -12
  462. package/build/languageProcessing/languages/es/helpers/internal/getParticiples.js.map +1 -1
  463. package/build/languageProcessing/languages/es/helpers/internal/stem.js +5 -13
  464. package/build/languageProcessing/languages/es/helpers/internal/stem.js.map +1 -1
  465. package/build/languageProcessing/languages/es/values/Clause.js +7 -14
  466. package/build/languageProcessing/languages/es/values/Clause.js.map +1 -1
  467. package/build/languageProcessing/languages/fa/Researcher.js +19 -27
  468. package/build/languageProcessing/languages/fa/Researcher.js.map +1 -1
  469. package/build/languageProcessing/languages/fa/config/firstWordExceptions.js +1 -7
  470. package/build/languageProcessing/languages/fa/config/firstWordExceptions.js.map +1 -1
  471. package/build/languageProcessing/languages/fa/config/functionWords.js +4 -10
  472. package/build/languageProcessing/languages/fa/config/functionWords.js.map +1 -1
  473. package/build/languageProcessing/languages/fa/config/internal/participles.js +1 -7
  474. package/build/languageProcessing/languages/fa/config/internal/participles.js.map +1 -1
  475. package/build/languageProcessing/languages/fa/config/sentenceLength.js +1 -7
  476. package/build/languageProcessing/languages/fa/config/sentenceLength.js.map +1 -1
  477. package/build/languageProcessing/languages/fa/config/transitionWords.js +4 -10
  478. package/build/languageProcessing/languages/fa/config/transitionWords.js.map +1 -1
  479. package/build/languageProcessing/languages/fa/config/twoPartTransitionWords.js +2 -7
  480. package/build/languageProcessing/languages/fa/config/twoPartTransitionWords.js.map +1 -1
  481. package/build/languageProcessing/languages/fa/helpers/createBasicWordForms.js +3 -9
  482. package/build/languageProcessing/languages/fa/helpers/createBasicWordForms.js.map +1 -1
  483. package/build/languageProcessing/languages/fa/helpers/getStemmer.js +3 -9
  484. package/build/languageProcessing/languages/fa/helpers/getStemmer.js.map +1 -1
  485. package/build/languageProcessing/languages/fa/helpers/isPassiveSentence.js +6 -12
  486. package/build/languageProcessing/languages/fa/helpers/isPassiveSentence.js.map +1 -1
  487. package/build/languageProcessing/languages/fr/Researcher.js +21 -29
  488. package/build/languageProcessing/languages/fr/Researcher.js.map +1 -1
  489. package/build/languageProcessing/languages/fr/config/firstWordExceptions.js +1 -7
  490. package/build/languageProcessing/languages/fr/config/firstWordExceptions.js.map +1 -1
  491. package/build/languageProcessing/languages/fr/config/functionWords.js +11 -17
  492. package/build/languageProcessing/languages/fr/config/functionWords.js.map +1 -1
  493. package/build/languageProcessing/languages/fr/config/internal/exceptionsParticiplesActive.js +4 -9
  494. package/build/languageProcessing/languages/fr/config/internal/exceptionsParticiplesActive.js.map +1 -1
  495. package/build/languageProcessing/languages/fr/config/internal/passiveVoiceAuxiliaries.js +1 -7
  496. package/build/languageProcessing/languages/fr/config/internal/passiveVoiceAuxiliaries.js.map +1 -1
  497. package/build/languageProcessing/languages/fr/config/internal/passiveVoiceIrregulars.js +4 -9
  498. package/build/languageProcessing/languages/fr/config/internal/passiveVoiceIrregulars.js.map +1 -1
  499. package/build/languageProcessing/languages/fr/config/stopWords.js +1 -7
  500. package/build/languageProcessing/languages/fr/config/stopWords.js.map +1 -1
  501. package/build/languageProcessing/languages/fr/config/transitionWords.js +4 -10
  502. package/build/languageProcessing/languages/fr/config/transitionWords.js.map +1 -1
  503. package/build/languageProcessing/languages/fr/config/twoPartTransitionWords.js +2 -7
  504. package/build/languageProcessing/languages/fr/config/twoPartTransitionWords.js.map +1 -1
  505. package/build/languageProcessing/languages/fr/config/wordComplexity.js +1 -7
  506. package/build/languageProcessing/languages/fr/config/wordComplexity.js.map +1 -1
  507. package/build/languageProcessing/languages/fr/helpers/calculateFleschReadingScore.js +3 -9
  508. package/build/languageProcessing/languages/fr/helpers/calculateFleschReadingScore.js.map +1 -1
  509. package/build/languageProcessing/languages/fr/helpers/checkIfWordIsComplex.js +3 -9
  510. package/build/languageProcessing/languages/fr/helpers/checkIfWordIsComplex.js.map +1 -1
  511. package/build/languageProcessing/languages/fr/helpers/getClauses.js +10 -17
  512. package/build/languageProcessing/languages/fr/helpers/getClauses.js.map +1 -1
  513. package/build/languageProcessing/languages/fr/helpers/getStemmer.js +8 -14
  514. package/build/languageProcessing/languages/fr/helpers/getStemmer.js.map +1 -1
  515. package/build/languageProcessing/languages/fr/helpers/internal/getParticiples.js +11 -16
  516. package/build/languageProcessing/languages/fr/helpers/internal/getParticiples.js.map +1 -1
  517. package/build/languageProcessing/languages/fr/helpers/internal/stem.js +3 -10
  518. package/build/languageProcessing/languages/fr/helpers/internal/stem.js.map +1 -1
  519. package/build/languageProcessing/languages/fr/values/Clause.js +14 -20
  520. package/build/languageProcessing/languages/fr/values/Clause.js.map +1 -1
  521. package/build/languageProcessing/languages/he/Researcher.js +21 -29
  522. package/build/languageProcessing/languages/he/Researcher.js.map +1 -1
  523. package/build/languageProcessing/languages/he/config/firstWordExceptions.js +1 -7
  524. package/build/languageProcessing/languages/he/config/firstWordExceptions.js.map +1 -1
  525. package/build/languageProcessing/languages/he/config/functionWords.js +4 -11
  526. package/build/languageProcessing/languages/he/config/functionWords.js.map +1 -1
  527. package/build/languageProcessing/languages/he/config/internal/regularRootsHufal.js +1 -7
  528. package/build/languageProcessing/languages/he/config/internal/regularRootsHufal.js.map +1 -1
  529. package/build/languageProcessing/languages/he/config/internal/regularRootsNifal.js +1 -7
  530. package/build/languageProcessing/languages/he/config/internal/regularRootsNifal.js.map +1 -1
  531. package/build/languageProcessing/languages/he/config/internal/regularRootsPual.js +1 -7
  532. package/build/languageProcessing/languages/he/config/internal/regularRootsPual.js.map +1 -1
  533. package/build/languageProcessing/languages/he/config/passiveVoice/regularRootsHufal.js +1 -7
  534. package/build/languageProcessing/languages/he/config/passiveVoice/regularRootsHufal.js.map +1 -1
  535. package/build/languageProcessing/languages/he/config/passiveVoice/regularRootsNifal.js +1 -7
  536. package/build/languageProcessing/languages/he/config/passiveVoice/regularRootsNifal.js.map +1 -1
  537. package/build/languageProcessing/languages/he/config/passiveVoice/regularRootsPual.js +1 -7
  538. package/build/languageProcessing/languages/he/config/passiveVoice/regularRootsPual.js.map +1 -1
  539. package/build/languageProcessing/languages/he/config/prefixedFunctionWords.js +2 -8
  540. package/build/languageProcessing/languages/he/config/prefixedFunctionWords.js.map +1 -1
  541. package/build/languageProcessing/languages/he/config/sentenceLength.js +1 -7
  542. package/build/languageProcessing/languages/he/config/sentenceLength.js.map +1 -1
  543. package/build/languageProcessing/languages/he/config/transitionWords.js +4 -10
  544. package/build/languageProcessing/languages/he/config/transitionWords.js.map +1 -1
  545. package/build/languageProcessing/languages/he/config/twoPartTransitionWords.js +2 -7
  546. package/build/languageProcessing/languages/he/config/twoPartTransitionWords.js.map +1 -1
  547. package/build/languageProcessing/languages/he/helpers/createBasicWordForms.js +6 -11
  548. package/build/languageProcessing/languages/he/helpers/createBasicWordForms.js.map +1 -1
  549. package/build/languageProcessing/languages/he/helpers/getStemmer.js +8 -14
  550. package/build/languageProcessing/languages/he/helpers/getStemmer.js.map +1 -1
  551. package/build/languageProcessing/languages/he/helpers/internal/stem.js +1 -7
  552. package/build/languageProcessing/languages/he/helpers/internal/stem.js.map +1 -1
  553. package/build/languageProcessing/languages/he/helpers/isPassiveSentence.js +10 -16
  554. package/build/languageProcessing/languages/he/helpers/isPassiveSentence.js.map +1 -1
  555. package/build/languageProcessing/languages/he/helpers/stem.js +1 -7
  556. package/build/languageProcessing/languages/he/helpers/stem.js.map +1 -1
  557. package/build/languageProcessing/languages/hu/Researcher.js +19 -27
  558. package/build/languageProcessing/languages/hu/Researcher.js.map +1 -1
  559. package/build/languageProcessing/languages/hu/config/firstWordExceptions.js +1 -7
  560. package/build/languageProcessing/languages/hu/config/firstWordExceptions.js.map +1 -1
  561. package/build/languageProcessing/languages/hu/config/functionWords.js +4 -10
  562. package/build/languageProcessing/languages/hu/config/functionWords.js.map +1 -1
  563. package/build/languageProcessing/languages/hu/config/internal/auxiliaries.js +1 -7
  564. package/build/languageProcessing/languages/hu/config/internal/auxiliaries.js.map +1 -1
  565. package/build/languageProcessing/languages/hu/config/internal/morphologicalPassiveAffixes.js +3 -9
  566. package/build/languageProcessing/languages/hu/config/internal/morphologicalPassiveAffixes.js.map +1 -1
  567. package/build/languageProcessing/languages/hu/config/internal/nonPassivesInVaAndVe.js +2 -7
  568. package/build/languageProcessing/languages/hu/config/internal/nonPassivesInVaAndVe.js.map +1 -1
  569. package/build/languageProcessing/languages/hu/config/internal/odikVerbs.js +1 -7
  570. package/build/languageProcessing/languages/hu/config/internal/odikVerbs.js.map +1 -1
  571. package/build/languageProcessing/languages/hu/config/internal/participles.js +2 -7
  572. package/build/languageProcessing/languages/hu/config/internal/participles.js.map +1 -1
  573. package/build/languageProcessing/languages/hu/config/stopWords.js +2 -7
  574. package/build/languageProcessing/languages/hu/config/stopWords.js.map +1 -1
  575. package/build/languageProcessing/languages/hu/config/transitionWords.js +4 -10
  576. package/build/languageProcessing/languages/hu/config/transitionWords.js.map +1 -1
  577. package/build/languageProcessing/languages/hu/config/twoPartTransitionWords.js +2 -7
  578. package/build/languageProcessing/languages/hu/config/twoPartTransitionWords.js.map +1 -1
  579. package/build/languageProcessing/languages/hu/helpers/getClauses.js +9 -16
  580. package/build/languageProcessing/languages/hu/helpers/getClauses.js.map +1 -1
  581. package/build/languageProcessing/languages/hu/helpers/getStemmer.js +8 -14
  582. package/build/languageProcessing/languages/hu/helpers/getStemmer.js.map +1 -1
  583. package/build/languageProcessing/languages/hu/helpers/internal/getParticiples.js +6 -12
  584. package/build/languageProcessing/languages/hu/helpers/internal/getParticiples.js.map +1 -1
  585. package/build/languageProcessing/languages/hu/helpers/internal/stem.js +1 -7
  586. package/build/languageProcessing/languages/hu/helpers/internal/stem.js.map +1 -1
  587. package/build/languageProcessing/languages/hu/helpers/isPassiveSentence.js +9 -15
  588. package/build/languageProcessing/languages/hu/helpers/isPassiveSentence.js.map +1 -1
  589. package/build/languageProcessing/languages/hu/values/Clause.js +8 -14
  590. package/build/languageProcessing/languages/hu/values/Clause.js.map +1 -1
  591. package/build/languageProcessing/languages/id/Researcher.js +17 -25
  592. package/build/languageProcessing/languages/id/Researcher.js.map +1 -1
  593. package/build/languageProcessing/languages/id/config/firstWordExceptions.js +1 -7
  594. package/build/languageProcessing/languages/id/config/firstWordExceptions.js.map +1 -1
  595. package/build/languageProcessing/languages/id/config/functionWords.js +8 -16
  596. package/build/languageProcessing/languages/id/config/functionWords.js.map +1 -1
  597. package/build/languageProcessing/languages/id/config/internal/nonPassiveVerbsStartingDi.js +1 -7
  598. package/build/languageProcessing/languages/id/config/internal/nonPassiveVerbsStartingDi.js.map +1 -1
  599. package/build/languageProcessing/languages/id/config/transitionWords.js +4 -10
  600. package/build/languageProcessing/languages/id/config/transitionWords.js.map +1 -1
  601. package/build/languageProcessing/languages/id/config/twoPartTransitionWords.js +2 -7
  602. package/build/languageProcessing/languages/id/config/twoPartTransitionWords.js.map +1 -1
  603. package/build/languageProcessing/languages/id/helpers/getStemmer.js +8 -14
  604. package/build/languageProcessing/languages/id/helpers/getStemmer.js.map +1 -1
  605. package/build/languageProcessing/languages/id/helpers/internal/stem.js +29 -34
  606. package/build/languageProcessing/languages/id/helpers/internal/stem.js.map +1 -1
  607. package/build/languageProcessing/languages/id/helpers/internal/stemHelpers.js +5 -13
  608. package/build/languageProcessing/languages/id/helpers/internal/stemHelpers.js.map +1 -1
  609. package/build/languageProcessing/languages/id/helpers/isPassiveSentence.js +5 -12
  610. package/build/languageProcessing/languages/id/helpers/isPassiveSentence.js.map +1 -1
  611. package/build/languageProcessing/languages/id/helpers/splitIntoTokensCustom.js +3 -9
  612. package/build/languageProcessing/languages/id/helpers/splitIntoTokensCustom.js.map +1 -1
  613. package/build/languageProcessing/languages/it/Researcher.js +23 -31
  614. package/build/languageProcessing/languages/it/Researcher.js.map +1 -1
  615. package/build/languageProcessing/languages/it/config/firstWordExceptions.js +1 -7
  616. package/build/languageProcessing/languages/it/config/firstWordExceptions.js.map +1 -1
  617. package/build/languageProcessing/languages/it/config/functionWords.js +11 -17
  618. package/build/languageProcessing/languages/it/config/functionWords.js.map +1 -1
  619. package/build/languageProcessing/languages/it/config/internal/passiveVoiceAuxiliaries.js +1 -7
  620. package/build/languageProcessing/languages/it/config/internal/passiveVoiceAuxiliaries.js.map +1 -1
  621. package/build/languageProcessing/languages/it/config/internal/passiveVoiceParticiples.js +1 -7
  622. package/build/languageProcessing/languages/it/config/internal/passiveVoiceParticiples.js.map +1 -1
  623. package/build/languageProcessing/languages/it/config/sentenceLength.js +1 -7
  624. package/build/languageProcessing/languages/it/config/sentenceLength.js.map +1 -1
  625. package/build/languageProcessing/languages/it/config/stopWords.js +1 -7
  626. package/build/languageProcessing/languages/it/config/stopWords.js.map +1 -1
  627. package/build/languageProcessing/languages/it/config/transitionWords.js +4 -10
  628. package/build/languageProcessing/languages/it/config/transitionWords.js.map +1 -1
  629. package/build/languageProcessing/languages/it/config/twoPartTransitionWords.js +1 -7
  630. package/build/languageProcessing/languages/it/config/twoPartTransitionWords.js.map +1 -1
  631. package/build/languageProcessing/languages/it/helpers/calculateFleschReadingScore.js +3 -9
  632. package/build/languageProcessing/languages/it/helpers/calculateFleschReadingScore.js.map +1 -1
  633. package/build/languageProcessing/languages/it/helpers/getClauses.js +10 -17
  634. package/build/languageProcessing/languages/it/helpers/getClauses.js.map +1 -1
  635. package/build/languageProcessing/languages/it/helpers/getStemmer.js +8 -14
  636. package/build/languageProcessing/languages/it/helpers/getStemmer.js.map +1 -1
  637. package/build/languageProcessing/languages/it/helpers/internal/getParticiples.js +6 -12
  638. package/build/languageProcessing/languages/it/helpers/internal/getParticiples.js.map +1 -1
  639. package/build/languageProcessing/languages/it/helpers/internal/stem.js +3 -9
  640. package/build/languageProcessing/languages/it/helpers/internal/stem.js.map +1 -1
  641. package/build/languageProcessing/languages/it/values/Clause.js +7 -14
  642. package/build/languageProcessing/languages/it/values/Clause.js.map +1 -1
  643. package/build/languageProcessing/languages/ja/Researcher.js +51 -59
  644. package/build/languageProcessing/languages/ja/Researcher.js.map +1 -1
  645. package/build/languageProcessing/languages/ja/config/assessmentApplicabilityCharacterCount.js +1 -7
  646. package/build/languageProcessing/languages/ja/config/assessmentApplicabilityCharacterCount.js.map +1 -1
  647. package/build/languageProcessing/languages/ja/config/firstWordExceptions.js +1 -7
  648. package/build/languageProcessing/languages/ja/config/firstWordExceptions.js.map +1 -1
  649. package/build/languageProcessing/languages/ja/config/functionWords.js +1 -7
  650. package/build/languageProcessing/languages/ja/config/functionWords.js.map +1 -1
  651. package/build/languageProcessing/languages/ja/config/keyphraseLength.js +1 -7
  652. package/build/languageProcessing/languages/ja/config/keyphraseLength.js.map +1 -1
  653. package/build/languageProcessing/languages/ja/config/metaDescriptionLength.js +1 -7
  654. package/build/languageProcessing/languages/ja/config/metaDescriptionLength.js.map +1 -1
  655. package/build/languageProcessing/languages/ja/config/paragraphLength.js +1 -7
  656. package/build/languageProcessing/languages/ja/config/paragraphLength.js.map +1 -1
  657. package/build/languageProcessing/languages/ja/config/sentenceLength.js +1 -7
  658. package/build/languageProcessing/languages/ja/config/sentenceLength.js.map +1 -1
  659. package/build/languageProcessing/languages/ja/config/subheadingsTooLong.js +1 -7
  660. package/build/languageProcessing/languages/ja/config/subheadingsTooLong.js.map +1 -1
  661. package/build/languageProcessing/languages/ja/config/textLength.js +1 -7
  662. package/build/languageProcessing/languages/ja/config/textLength.js.map +1 -1
  663. package/build/languageProcessing/languages/ja/config/topicLength.js +1 -7
  664. package/build/languageProcessing/languages/ja/config/topicLength.js.map +1 -1
  665. package/build/languageProcessing/languages/ja/config/transitionWords.js +2 -7
  666. package/build/languageProcessing/languages/ja/config/transitionWords.js.map +1 -1
  667. package/build/languageProcessing/languages/ja/customResearches/findKeyphraseInSEOTitle.js +16 -22
  668. package/build/languageProcessing/languages/ja/customResearches/findKeyphraseInSEOTitle.js.map +1 -1
  669. package/build/languageProcessing/languages/ja/customResearches/getKeyphraseLength.js +5 -11
  670. package/build/languageProcessing/languages/ja/customResearches/getKeyphraseLength.js.map +1 -1
  671. package/build/languageProcessing/languages/ja/customResearches/getWordForms.js +11 -17
  672. package/build/languageProcessing/languages/ja/customResearches/getWordForms.js.map +1 -1
  673. package/build/languageProcessing/languages/ja/customResearches/textLength.js +3 -9
  674. package/build/languageProcessing/languages/ja/customResearches/textLength.js.map +1 -1
  675. package/build/languageProcessing/languages/ja/helpers/countCharacters.js +6 -12
  676. package/build/languageProcessing/languages/ja/helpers/countCharacters.js.map +1 -1
  677. package/build/languageProcessing/languages/ja/helpers/customGetStemmer.js +8 -14
  678. package/build/languageProcessing/languages/ja/helpers/customGetStemmer.js.map +1 -1
  679. package/build/languageProcessing/languages/ja/helpers/getContentWords.js +5 -11
  680. package/build/languageProcessing/languages/ja/helpers/getContentWords.js.map +1 -1
  681. package/build/languageProcessing/languages/ja/helpers/getWords.js +8 -15
  682. package/build/languageProcessing/languages/ja/helpers/getWords.js.map +1 -1
  683. package/build/languageProcessing/languages/ja/helpers/internal/SentenceTokenizer.js +6 -13
  684. package/build/languageProcessing/languages/ja/helpers/internal/SentenceTokenizer.js.map +1 -1
  685. package/build/languageProcessing/languages/ja/helpers/internal/createWordForms.js +4 -9
  686. package/build/languageProcessing/languages/ja/helpers/internal/createWordForms.js.map +1 -1
  687. package/build/languageProcessing/languages/ja/helpers/internal/determineStem.js +3 -9
  688. package/build/languageProcessing/languages/ja/helpers/internal/determineStem.js.map +1 -1
  689. package/build/languageProcessing/languages/ja/helpers/matchTextWithWord.js +7 -13
  690. package/build/languageProcessing/languages/ja/helpers/matchTextWithWord.js.map +1 -1
  691. package/build/languageProcessing/languages/ja/helpers/matchTransitionWords.js +3 -9
  692. package/build/languageProcessing/languages/ja/helpers/matchTransitionWords.js.map +1 -1
  693. package/build/languageProcessing/languages/ja/helpers/memoizedSentenceTokenizer.js +4 -10
  694. package/build/languageProcessing/languages/ja/helpers/memoizedSentenceTokenizer.js.map +1 -1
  695. package/build/languageProcessing/languages/ja/helpers/splitIntoTokensCustom.js +5 -11
  696. package/build/languageProcessing/languages/ja/helpers/splitIntoTokensCustom.js.map +1 -1
  697. package/build/languageProcessing/languages/ja/helpers/wordsCharacterCount.js +1 -7
  698. package/build/languageProcessing/languages/ja/helpers/wordsCharacterCount.js.map +1 -1
  699. package/build/languageProcessing/languages/nb/Researcher.js +17 -25
  700. package/build/languageProcessing/languages/nb/Researcher.js.map +1 -1
  701. package/build/languageProcessing/languages/nb/config/firstWordExceptions.js +1 -7
  702. package/build/languageProcessing/languages/nb/config/firstWordExceptions.js.map +1 -1
  703. package/build/languageProcessing/languages/nb/config/functionWords.js +5 -11
  704. package/build/languageProcessing/languages/nb/config/functionWords.js.map +1 -1
  705. package/build/languageProcessing/languages/nb/config/internal/participles.js +2 -7
  706. package/build/languageProcessing/languages/nb/config/internal/participles.js.map +1 -1
  707. package/build/languageProcessing/languages/nb/config/internal/passiveVoiceAuxiliaries.js +1 -7
  708. package/build/languageProcessing/languages/nb/config/internal/passiveVoiceAuxiliaries.js.map +1 -1
  709. package/build/languageProcessing/languages/nb/config/stopWords.js +1 -7
  710. package/build/languageProcessing/languages/nb/config/stopWords.js.map +1 -1
  711. package/build/languageProcessing/languages/nb/config/transitionWords.js +4 -10
  712. package/build/languageProcessing/languages/nb/config/transitionWords.js.map +1 -1
  713. package/build/languageProcessing/languages/nb/config/twoPartTransitionWords.js +2 -7
  714. package/build/languageProcessing/languages/nb/config/twoPartTransitionWords.js.map +1 -1
  715. package/build/languageProcessing/languages/nb/helpers/getClauses.js +11 -18
  716. package/build/languageProcessing/languages/nb/helpers/getClauses.js.map +1 -1
  717. package/build/languageProcessing/languages/nb/helpers/getStemmer.js +8 -14
  718. package/build/languageProcessing/languages/nb/helpers/getStemmer.js.map +1 -1
  719. package/build/languageProcessing/languages/nb/helpers/internal/getParticiples.js +8 -14
  720. package/build/languageProcessing/languages/nb/helpers/internal/getParticiples.js.map +1 -1
  721. package/build/languageProcessing/languages/nb/helpers/internal/stem.js +1 -7
  722. package/build/languageProcessing/languages/nb/helpers/internal/stem.js.map +1 -1
  723. package/build/languageProcessing/languages/nb/values/Clause.js +8 -14
  724. package/build/languageProcessing/languages/nb/values/Clause.js.map +1 -1
  725. package/build/languageProcessing/languages/nl/Researcher.js +23 -31
  726. package/build/languageProcessing/languages/nl/Researcher.js.map +1 -1
  727. package/build/languageProcessing/languages/nl/config/firstWordExceptions.js +1 -7
  728. package/build/languageProcessing/languages/nl/config/firstWordExceptions.js.map +1 -1
  729. package/build/languageProcessing/languages/nl/config/functionWords.js +10 -16
  730. package/build/languageProcessing/languages/nl/config/functionWords.js.map +1 -1
  731. package/build/languageProcessing/languages/nl/config/internal/nonParticiples.js +1 -7
  732. package/build/languageProcessing/languages/nl/config/internal/nonParticiples.js.map +1 -1
  733. package/build/languageProcessing/languages/nl/config/internal/passiveVoiceAuxiliaries.js +1 -7
  734. package/build/languageProcessing/languages/nl/config/internal/passiveVoiceAuxiliaries.js.map +1 -1
  735. package/build/languageProcessing/languages/nl/config/internal/passiveVoiceIrregulars.js +1 -7
  736. package/build/languageProcessing/languages/nl/config/internal/passiveVoiceIrregulars.js.map +1 -1
  737. package/build/languageProcessing/languages/nl/config/keyphraseLength.js +1 -7
  738. package/build/languageProcessing/languages/nl/config/keyphraseLength.js.map +1 -1
  739. package/build/languageProcessing/languages/nl/config/stopWords.js +1 -7
  740. package/build/languageProcessing/languages/nl/config/stopWords.js.map +1 -1
  741. package/build/languageProcessing/languages/nl/config/transitionWords.js +4 -10
  742. package/build/languageProcessing/languages/nl/config/transitionWords.js.map +1 -1
  743. package/build/languageProcessing/languages/nl/config/twoPartTransitionWords.js +1 -7
  744. package/build/languageProcessing/languages/nl/config/twoPartTransitionWords.js.map +1 -1
  745. package/build/languageProcessing/languages/nl/helpers/calculateFleschReadingScore.js +3 -9
  746. package/build/languageProcessing/languages/nl/helpers/calculateFleschReadingScore.js.map +1 -1
  747. package/build/languageProcessing/languages/nl/helpers/getClauses.js +9 -16
  748. package/build/languageProcessing/languages/nl/helpers/getClauses.js.map +1 -1
  749. package/build/languageProcessing/languages/nl/helpers/getStemmer.js +8 -14
  750. package/build/languageProcessing/languages/nl/helpers/getStemmer.js.map +1 -1
  751. package/build/languageProcessing/languages/nl/helpers/internal/checkExceptionsWithFullForms.js +7 -13
  752. package/build/languageProcessing/languages/nl/helpers/internal/checkExceptionsWithFullForms.js.map +1 -1
  753. package/build/languageProcessing/languages/nl/helpers/internal/detectAndStemRegularParticiple.js +8 -14
  754. package/build/languageProcessing/languages/nl/helpers/internal/detectAndStemRegularParticiple.js.map +1 -1
  755. package/build/languageProcessing/languages/nl/helpers/internal/detectAndStemSuffixes.js +10 -15
  756. package/build/languageProcessing/languages/nl/helpers/internal/detectAndStemSuffixes.js.map +1 -1
  757. package/build/languageProcessing/languages/nl/helpers/internal/determineStem.js +10 -16
  758. package/build/languageProcessing/languages/nl/helpers/internal/determineStem.js.map +1 -1
  759. package/build/languageProcessing/languages/nl/helpers/internal/getParticiples.js +7 -13
  760. package/build/languageProcessing/languages/nl/helpers/internal/getParticiples.js.map +1 -1
  761. package/build/languageProcessing/languages/nl/helpers/internal/getStemWordsWithTAndDEnding.js +7 -12
  762. package/build/languageProcessing/languages/nl/helpers/internal/getStemWordsWithTAndDEnding.js.map +1 -1
  763. package/build/languageProcessing/languages/nl/helpers/internal/stem.js +17 -23
  764. package/build/languageProcessing/languages/nl/helpers/internal/stem.js.map +1 -1
  765. package/build/languageProcessing/languages/nl/helpers/internal/stemModificationHelpers.js +4 -11
  766. package/build/languageProcessing/languages/nl/helpers/internal/stemModificationHelpers.js.map +1 -1
  767. package/build/languageProcessing/languages/nl/helpers/internal/stemTOrDFromEndOfWord.js +8 -14
  768. package/build/languageProcessing/languages/nl/helpers/internal/stemTOrDFromEndOfWord.js.map +1 -1
  769. package/build/languageProcessing/languages/nl/values/Clause.js +10 -16
  770. package/build/languageProcessing/languages/nl/values/Clause.js.map +1 -1
  771. package/build/languageProcessing/languages/pl/Researcher.js +19 -27
  772. package/build/languageProcessing/languages/pl/Researcher.js.map +1 -1
  773. package/build/languageProcessing/languages/pl/config/firstWordExceptions.js +1 -7
  774. package/build/languageProcessing/languages/pl/config/firstWordExceptions.js.map +1 -1
  775. package/build/languageProcessing/languages/pl/config/functionWords.js +9 -16
  776. package/build/languageProcessing/languages/pl/config/functionWords.js.map +1 -1
  777. package/build/languageProcessing/languages/pl/config/internal/auxiliaries.js +1 -7
  778. package/build/languageProcessing/languages/pl/config/internal/auxiliaries.js.map +1 -1
  779. package/build/languageProcessing/languages/pl/config/internal/participles.js +1 -7
  780. package/build/languageProcessing/languages/pl/config/internal/participles.js.map +1 -1
  781. package/build/languageProcessing/languages/pl/config/sentenceLength.js +1 -7
  782. package/build/languageProcessing/languages/pl/config/sentenceLength.js.map +1 -1
  783. package/build/languageProcessing/languages/pl/config/stopWords.js +1 -7
  784. package/build/languageProcessing/languages/pl/config/stopWords.js.map +1 -1
  785. package/build/languageProcessing/languages/pl/config/transitionWords.js +4 -10
  786. package/build/languageProcessing/languages/pl/config/transitionWords.js.map +1 -1
  787. package/build/languageProcessing/languages/pl/config/twoPartTransitionWords.js +2 -7
  788. package/build/languageProcessing/languages/pl/config/twoPartTransitionWords.js.map +1 -1
  789. package/build/languageProcessing/languages/pl/helpers/getClauses.js +9 -16
  790. package/build/languageProcessing/languages/pl/helpers/getClauses.js.map +1 -1
  791. package/build/languageProcessing/languages/pl/helpers/getStemmer.js +8 -14
  792. package/build/languageProcessing/languages/pl/helpers/getStemmer.js.map +1 -1
  793. package/build/languageProcessing/languages/pl/helpers/internal/getParticiples.js +7 -13
  794. package/build/languageProcessing/languages/pl/helpers/internal/getParticiples.js.map +1 -1
  795. package/build/languageProcessing/languages/pl/helpers/internal/stem.js +1 -7
  796. package/build/languageProcessing/languages/pl/helpers/internal/stem.js.map +1 -1
  797. package/build/languageProcessing/languages/pl/values/Clause.js +8 -14
  798. package/build/languageProcessing/languages/pl/values/Clause.js.map +1 -1
  799. package/build/languageProcessing/languages/pt/Researcher.js +23 -31
  800. package/build/languageProcessing/languages/pt/Researcher.js.map +1 -1
  801. package/build/languageProcessing/languages/pt/config/firstWordExceptions.js +1 -7
  802. package/build/languageProcessing/languages/pt/config/firstWordExceptions.js.map +1 -1
  803. package/build/languageProcessing/languages/pt/config/functionWords.js +10 -16
  804. package/build/languageProcessing/languages/pt/config/functionWords.js.map +1 -1
  805. package/build/languageProcessing/languages/pt/config/internal/passiveVoiceAuxiliaries.js +1 -7
  806. package/build/languageProcessing/languages/pt/config/internal/passiveVoiceAuxiliaries.js.map +1 -1
  807. package/build/languageProcessing/languages/pt/config/internal/passiveVoiceParticiples.js +1 -7
  808. package/build/languageProcessing/languages/pt/config/internal/passiveVoiceParticiples.js.map +1 -1
  809. package/build/languageProcessing/languages/pt/config/sentenceLength.js +1 -7
  810. package/build/languageProcessing/languages/pt/config/sentenceLength.js.map +1 -1
  811. package/build/languageProcessing/languages/pt/config/stopWords.js +1 -7
  812. package/build/languageProcessing/languages/pt/config/stopWords.js.map +1 -1
  813. package/build/languageProcessing/languages/pt/config/transitionWords.js +4 -10
  814. package/build/languageProcessing/languages/pt/config/transitionWords.js.map +1 -1
  815. package/build/languageProcessing/languages/pt/config/twoPartTransitionWords.js +1 -7
  816. package/build/languageProcessing/languages/pt/config/twoPartTransitionWords.js.map +1 -1
  817. package/build/languageProcessing/languages/pt/helpers/calculateFleschReadingScore.js +3 -9
  818. package/build/languageProcessing/languages/pt/helpers/calculateFleschReadingScore.js.map +1 -1
  819. package/build/languageProcessing/languages/pt/helpers/getClauses.js +10 -17
  820. package/build/languageProcessing/languages/pt/helpers/getClauses.js.map +1 -1
  821. package/build/languageProcessing/languages/pt/helpers/getStemmer.js +8 -14
  822. package/build/languageProcessing/languages/pt/helpers/getStemmer.js.map +1 -1
  823. package/build/languageProcessing/languages/pt/helpers/internal/getParticiples.js +6 -12
  824. package/build/languageProcessing/languages/pt/helpers/internal/getParticiples.js.map +1 -1
  825. package/build/languageProcessing/languages/pt/helpers/internal/stem.js +3 -9
  826. package/build/languageProcessing/languages/pt/helpers/internal/stem.js.map +1 -1
  827. package/build/languageProcessing/languages/pt/values/Clause.js +7 -14
  828. package/build/languageProcessing/languages/pt/values/Clause.js.map +1 -1
  829. package/build/languageProcessing/languages/ru/Researcher.js +23 -31
  830. package/build/languageProcessing/languages/ru/Researcher.js.map +1 -1
  831. package/build/languageProcessing/languages/ru/config/firstWordExceptions.js +1 -7
  832. package/build/languageProcessing/languages/ru/config/firstWordExceptions.js.map +1 -1
  833. package/build/languageProcessing/languages/ru/config/fleschReadingEaseScores.js +1 -7
  834. package/build/languageProcessing/languages/ru/config/fleschReadingEaseScores.js.map +1 -1
  835. package/build/languageProcessing/languages/ru/config/functionWords.js +8 -14
  836. package/build/languageProcessing/languages/ru/config/functionWords.js.map +1 -1
  837. package/build/languageProcessing/languages/ru/config/internal/participlesShortenedList.js +2 -8
  838. package/build/languageProcessing/languages/ru/config/internal/participlesShortenedList.js.map +1 -1
  839. package/build/languageProcessing/languages/ru/config/internal/passiveVoiceParticiples.js +1 -7
  840. package/build/languageProcessing/languages/ru/config/internal/passiveVoiceParticiples.js.map +1 -1
  841. package/build/languageProcessing/languages/ru/config/sentenceLength.js +1 -7
  842. package/build/languageProcessing/languages/ru/config/sentenceLength.js.map +1 -1
  843. package/build/languageProcessing/languages/ru/config/transitionWords.js +4 -10
  844. package/build/languageProcessing/languages/ru/config/transitionWords.js.map +1 -1
  845. package/build/languageProcessing/languages/ru/config/twoPartTransitionWords.js +2 -7
  846. package/build/languageProcessing/languages/ru/config/twoPartTransitionWords.js.map +1 -1
  847. package/build/languageProcessing/languages/ru/helpers/calculateFleschReadingScore.js +3 -9
  848. package/build/languageProcessing/languages/ru/helpers/calculateFleschReadingScore.js.map +1 -1
  849. package/build/languageProcessing/languages/ru/helpers/getStemmer.js +8 -14
  850. package/build/languageProcessing/languages/ru/helpers/getStemmer.js.map +1 -1
  851. package/build/languageProcessing/languages/ru/helpers/internal/stem.js +1 -7
  852. package/build/languageProcessing/languages/ru/helpers/internal/stem.js.map +1 -1
  853. package/build/languageProcessing/languages/ru/helpers/isPassiveSentence.js +6 -12
  854. package/build/languageProcessing/languages/ru/helpers/isPassiveSentence.js.map +1 -1
  855. package/build/languageProcessing/languages/sk/Researcher.js +17 -25
  856. package/build/languageProcessing/languages/sk/Researcher.js.map +1 -1
  857. package/build/languageProcessing/languages/sk/config/firstWordExceptions.js +1 -7
  858. package/build/languageProcessing/languages/sk/config/firstWordExceptions.js.map +1 -1
  859. package/build/languageProcessing/languages/sk/config/functionWords.js +5 -11
  860. package/build/languageProcessing/languages/sk/config/functionWords.js.map +1 -1
  861. package/build/languageProcessing/languages/sk/config/internal/nonPassives.js +1 -7
  862. package/build/languageProcessing/languages/sk/config/internal/nonPassives.js.map +1 -1
  863. package/build/languageProcessing/languages/sk/config/internal/passiveVoiceAuxiliaries.js +2 -8
  864. package/build/languageProcessing/languages/sk/config/internal/passiveVoiceAuxiliaries.js.map +1 -1
  865. package/build/languageProcessing/languages/sk/config/stopWords.js +1 -7
  866. package/build/languageProcessing/languages/sk/config/stopWords.js.map +1 -1
  867. package/build/languageProcessing/languages/sk/config/transitionWords.js +4 -10
  868. package/build/languageProcessing/languages/sk/config/transitionWords.js.map +1 -1
  869. package/build/languageProcessing/languages/sk/config/twoPartTransitionWords.js +2 -7
  870. package/build/languageProcessing/languages/sk/config/twoPartTransitionWords.js.map +1 -1
  871. package/build/languageProcessing/languages/sk/helpers/getClauses.js +9 -16
  872. package/build/languageProcessing/languages/sk/helpers/getClauses.js.map +1 -1
  873. package/build/languageProcessing/languages/sk/helpers/getStemmer.js +8 -14
  874. package/build/languageProcessing/languages/sk/helpers/getStemmer.js.map +1 -1
  875. package/build/languageProcessing/languages/sk/helpers/internal/getParticiples.js +3 -9
  876. package/build/languageProcessing/languages/sk/helpers/internal/getParticiples.js.map +1 -1
  877. package/build/languageProcessing/languages/sk/helpers/internal/stem.js +1 -7
  878. package/build/languageProcessing/languages/sk/helpers/internal/stem.js.map +1 -1
  879. package/build/languageProcessing/languages/sk/values/Clause.js +8 -14
  880. package/build/languageProcessing/languages/sk/values/Clause.js.map +1 -1
  881. package/build/languageProcessing/languages/sv/Researcher.js +17 -25
  882. package/build/languageProcessing/languages/sv/Researcher.js.map +1 -1
  883. package/build/languageProcessing/languages/sv/config/firstWordExceptions.js +1 -7
  884. package/build/languageProcessing/languages/sv/config/firstWordExceptions.js.map +1 -1
  885. package/build/languageProcessing/languages/sv/config/functionWords.js +7 -13
  886. package/build/languageProcessing/languages/sv/config/functionWords.js.map +1 -1
  887. package/build/languageProcessing/languages/sv/config/internal/passiveVerbs.js +2 -7
  888. package/build/languageProcessing/languages/sv/config/internal/passiveVerbs.js.map +1 -1
  889. package/build/languageProcessing/languages/sv/config/keyphraseLength.js +1 -7
  890. package/build/languageProcessing/languages/sv/config/keyphraseLength.js.map +1 -1
  891. package/build/languageProcessing/languages/sv/config/transitionWords.js +4 -10
  892. package/build/languageProcessing/languages/sv/config/transitionWords.js.map +1 -1
  893. package/build/languageProcessing/languages/sv/config/twoPartTransitionWords.js +2 -7
  894. package/build/languageProcessing/languages/sv/config/twoPartTransitionWords.js.map +1 -1
  895. package/build/languageProcessing/languages/sv/helpers/getStemmer.js +8 -14
  896. package/build/languageProcessing/languages/sv/helpers/getStemmer.js.map +1 -1
  897. package/build/languageProcessing/languages/sv/helpers/internal/stem.js +1 -7
  898. package/build/languageProcessing/languages/sv/helpers/internal/stem.js.map +1 -1
  899. package/build/languageProcessing/languages/sv/helpers/isPassiveSentence.js +6 -12
  900. package/build/languageProcessing/languages/sv/helpers/isPassiveSentence.js.map +1 -1
  901. package/build/languageProcessing/languages/tr/Researcher.js +17 -25
  902. package/build/languageProcessing/languages/tr/Researcher.js.map +1 -1
  903. package/build/languageProcessing/languages/tr/config/firstWordExceptions.js +1 -7
  904. package/build/languageProcessing/languages/tr/config/firstWordExceptions.js.map +1 -1
  905. package/build/languageProcessing/languages/tr/config/functionWords.js +4 -10
  906. package/build/languageProcessing/languages/tr/config/functionWords.js.map +1 -1
  907. package/build/languageProcessing/languages/tr/config/internal/nonPassiveExceptions.js +3 -8
  908. package/build/languageProcessing/languages/tr/config/internal/nonPassiveExceptions.js.map +1 -1
  909. package/build/languageProcessing/languages/tr/config/internal/passiveEndings.js +1 -7
  910. package/build/languageProcessing/languages/tr/config/internal/passiveEndings.js.map +1 -1
  911. package/build/languageProcessing/languages/tr/config/sentenceLength.js +1 -7
  912. package/build/languageProcessing/languages/tr/config/sentenceLength.js.map +1 -1
  913. package/build/languageProcessing/languages/tr/config/transitionWords.js +4 -10
  914. package/build/languageProcessing/languages/tr/config/transitionWords.js.map +1 -1
  915. package/build/languageProcessing/languages/tr/config/twoPartTransitionWords.js +2 -7
  916. package/build/languageProcessing/languages/tr/config/twoPartTransitionWords.js.map +1 -1
  917. package/build/languageProcessing/languages/tr/helpers/getStemmer.js +8 -14
  918. package/build/languageProcessing/languages/tr/helpers/getStemmer.js.map +1 -1
  919. package/build/languageProcessing/languages/tr/helpers/internal/stem.js +3 -9
  920. package/build/languageProcessing/languages/tr/helpers/internal/stem.js.map +1 -1
  921. package/build/languageProcessing/languages/tr/helpers/isPassiveSentence.js +9 -15
  922. package/build/languageProcessing/languages/tr/helpers/isPassiveSentence.js.map +1 -1
  923. package/build/languageProcessing/researches/altTagCount.js +10 -16
  924. package/build/languageProcessing/researches/altTagCount.js.map +1 -1
  925. package/build/languageProcessing/researches/checkRelatedKeywords.js +72 -0
  926. package/build/languageProcessing/researches/checkRelatedKeywords.js.map +1 -0
  927. package/build/languageProcessing/researches/countSentencesFromText.js +9 -15
  928. package/build/languageProcessing/researches/countSentencesFromText.js.map +1 -1
  929. package/build/languageProcessing/researches/findKeyphraseInSEOTitle.js +19 -26
  930. package/build/languageProcessing/researches/findKeyphraseInSEOTitle.js.map +1 -1
  931. package/build/languageProcessing/researches/findKeywordInFirstParagraph.js +17 -23
  932. package/build/languageProcessing/researches/findKeywordInFirstParagraph.js.map +1 -1
  933. package/build/languageProcessing/researches/findTransitionWords.js +16 -23
  934. package/build/languageProcessing/researches/findTransitionWords.js.map +1 -1
  935. package/build/languageProcessing/researches/functionWordsInKeyphrase.js +10 -16
  936. package/build/languageProcessing/researches/functionWordsInKeyphrase.js.map +1 -1
  937. package/build/languageProcessing/researches/getAnchorsWithKeyphrase.js +21 -28
  938. package/build/languageProcessing/researches/getAnchorsWithKeyphrase.js.map +1 -1
  939. package/build/languageProcessing/researches/getFleschReadingScore.js +18 -25
  940. package/build/languageProcessing/researches/getFleschReadingScore.js.map +1 -1
  941. package/build/languageProcessing/researches/getKeywordDensity.js +7 -14
  942. package/build/languageProcessing/researches/getKeywordDensity.js.map +1 -1
  943. package/build/languageProcessing/researches/getLinkStatistics.js +7 -13
  944. package/build/languageProcessing/researches/getLinkStatistics.js.map +1 -1
  945. package/build/languageProcessing/researches/getLinks.js +7 -13
  946. package/build/languageProcessing/researches/getLinks.js.map +1 -1
  947. package/build/languageProcessing/researches/getLongCenterAlignedTexts.js +1 -7
  948. package/build/languageProcessing/researches/getLongCenterAlignedTexts.js.map +1 -1
  949. package/build/languageProcessing/researches/getParagraphLength.js +15 -21
  950. package/build/languageProcessing/researches/getParagraphLength.js.map +1 -1
  951. package/build/languageProcessing/researches/getParagraphs.js +4 -9
  952. package/build/languageProcessing/researches/getParagraphs.js.map +1 -1
  953. package/build/languageProcessing/researches/getPassiveVoiceResult.js +21 -30
  954. package/build/languageProcessing/researches/getPassiveVoiceResult.js.map +1 -1
  955. package/build/languageProcessing/researches/getProminentWordsForInsights.js +12 -18
  956. package/build/languageProcessing/researches/getProminentWordsForInsights.js.map +1 -1
  957. package/build/languageProcessing/researches/getProminentWordsForInternalLinking.js +20 -26
  958. package/build/languageProcessing/researches/getProminentWordsForInternalLinking.js.map +1 -1
  959. package/build/languageProcessing/researches/getSentenceBeginnings.js +30 -36
  960. package/build/languageProcessing/researches/getSentenceBeginnings.js.map +1 -1
  961. package/build/languageProcessing/researches/getSubheadingTextLengths.js +12 -18
  962. package/build/languageProcessing/researches/getSubheadingTextLengths.js.map +1 -1
  963. package/build/languageProcessing/researches/getWordForms.js +13 -19
  964. package/build/languageProcessing/researches/getWordForms.js.map +1 -1
  965. package/build/languageProcessing/researches/h1s.js +1 -7
  966. package/build/languageProcessing/researches/h1s.js.map +1 -1
  967. package/build/languageProcessing/researches/imageCount.js +4 -10
  968. package/build/languageProcessing/researches/imageCount.js.map +1 -1
  969. package/build/languageProcessing/researches/index.js +4 -27
  970. package/build/languageProcessing/researches/index.js.map +1 -1
  971. package/build/languageProcessing/researches/keyphraseDistribution.js +22 -32
  972. package/build/languageProcessing/researches/keyphraseDistribution.js.map +1 -1
  973. package/build/languageProcessing/researches/keyphraseLength.js +1 -7
  974. package/build/languageProcessing/researches/keyphraseLength.js.map +1 -1
  975. package/build/languageProcessing/researches/keywordCount.js +30 -39
  976. package/build/languageProcessing/researches/keywordCount.js.map +1 -1
  977. package/build/languageProcessing/researches/keywordCountInUrl.js +8 -16
  978. package/build/languageProcessing/researches/keywordCountInUrl.js.map +1 -1
  979. package/build/languageProcessing/researches/matchKeywordInSubheadings.js +15 -20
  980. package/build/languageProcessing/researches/matchKeywordInSubheadings.js.map +1 -1
  981. package/build/languageProcessing/researches/metaDescriptionKeyword.js +6 -12
  982. package/build/languageProcessing/researches/metaDescriptionKeyword.js.map +1 -1
  983. package/build/languageProcessing/researches/metaDescriptionLength.js +3 -9
  984. package/build/languageProcessing/researches/metaDescriptionLength.js.map +1 -1
  985. package/build/languageProcessing/researches/pageTitleWidth.js +1 -7
  986. package/build/languageProcessing/researches/pageTitleWidth.js.map +1 -1
  987. package/build/languageProcessing/researches/readingTime.js +7 -13
  988. package/build/languageProcessing/researches/readingTime.js.map +1 -1
  989. package/build/languageProcessing/researches/sentences.js +7 -13
  990. package/build/languageProcessing/researches/sentences.js.map +1 -1
  991. package/build/languageProcessing/researches/videoCount.js +1 -7
  992. package/build/languageProcessing/researches/videoCount.js.map +1 -1
  993. package/build/languageProcessing/researches/wordComplexity.js +15 -21
  994. package/build/languageProcessing/researches/wordComplexity.js.map +1 -1
  995. package/build/languageProcessing/researches/wordCountInText.js +10 -15
  996. package/build/languageProcessing/researches/wordCountInText.js.map +1 -1
  997. package/build/languageProcessing/values/Clause.js +1 -7
  998. package/build/languageProcessing/values/Clause.js.map +1 -1
  999. package/build/languageProcessing/values/ProminentWord.js +1 -7
  1000. package/build/languageProcessing/values/ProminentWord.js.map +1 -1
  1001. package/build/languageProcessing/values/Sentence.js +1 -7
  1002. package/build/languageProcessing/values/Sentence.js.map +1 -1
  1003. package/build/languageProcessing/values/index.js +4 -27
  1004. package/build/languageProcessing/values/index.js.map +1 -1
  1005. package/build/markers/addMark.js +1 -7
  1006. package/build/markers/addMark.js.map +1 -1
  1007. package/build/markers/addMarkSingleWord.js +7 -12
  1008. package/build/markers/addMarkSingleWord.js.map +1 -1
  1009. package/build/markers/index.js +3 -20
  1010. package/build/markers/index.js.map +1 -1
  1011. package/build/markers/removeDuplicateMarks.js +3 -8
  1012. package/build/markers/removeDuplicateMarks.js.map +1 -1
  1013. package/build/markers/removeMarks.js +1 -7
  1014. package/build/markers/removeMarks.js.map +1 -1
  1015. package/build/parse/build/build.js +17 -25
  1016. package/build/parse/build/build.js.map +1 -1
  1017. package/build/parse/build/index.js +7 -12
  1018. package/build/parse/build/index.js.map +1 -1
  1019. package/build/parse/build/private/adapt.js +15 -21
  1020. package/build/parse/build/private/adapt.js.map +1 -1
  1021. package/build/parse/build/private/adaptAttributes.js +3 -9
  1022. package/build/parse/build/private/adaptAttributes.js.map +1 -1
  1023. package/build/parse/build/private/alwaysFilterElements.js +9 -14
  1024. package/build/parse/build/private/alwaysFilterElements.js.map +1 -1
  1025. package/build/parse/build/private/combineIntoImplicitParagraphs.js +12 -18
  1026. package/build/parse/build/private/combineIntoImplicitParagraphs.js.map +1 -1
  1027. package/build/parse/build/private/filterBeforeTokenizing.js +5 -10
  1028. package/build/parse/build/private/filterBeforeTokenizing.js.map +1 -1
  1029. package/build/parse/build/private/filterHelpers.js +3 -11
  1030. package/build/parse/build/private/filterHelpers.js.map +1 -1
  1031. package/build/parse/build/private/filterTree.js +3 -8
  1032. package/build/parse/build/private/filterTree.js.map +1 -1
  1033. package/build/parse/build/private/getTextElementPositions.js +5 -10
  1034. package/build/parse/build/private/getTextElementPositions.js.map +1 -1
  1035. package/build/parse/build/private/helpers/parseClassAttribute.js +1 -7
  1036. package/build/parse/build/private/helpers/parseClassAttribute.js.map +1 -1
  1037. package/build/parse/build/private/isPhrasingContent.js +1 -7
  1038. package/build/parse/build/private/isPhrasingContent.js.map +1 -1
  1039. package/build/parse/build/private/parseBlocks.js +4 -11
  1040. package/build/parse/build/private/parseBlocks.js.map +1 -1
  1041. package/build/parse/build/private/tokenize.js +8 -14
  1042. package/build/parse/build/private/tokenize.js.map +1 -1
  1043. package/build/parse/language/LanguageProcessor.js +8 -15
  1044. package/build/parse/language/LanguageProcessor.js.map +1 -1
  1045. package/build/parse/structure/Heading.js +3 -9
  1046. package/build/parse/structure/Heading.js.map +1 -1
  1047. package/build/parse/structure/Node.js +8 -14
  1048. package/build/parse/structure/Node.js.map +1 -1
  1049. package/build/parse/structure/Paragraph.js +3 -9
  1050. package/build/parse/structure/Paragraph.js.map +1 -1
  1051. package/build/parse/structure/Sentence.js +1 -7
  1052. package/build/parse/structure/Sentence.js.map +1 -1
  1053. package/build/parse/structure/SourceCodeLocation.js +1 -7
  1054. package/build/parse/structure/SourceCodeLocation.js.map +1 -1
  1055. package/build/parse/structure/Text.js +3 -10
  1056. package/build/parse/structure/Text.js.map +1 -1
  1057. package/build/parse/structure/Token.js +3 -8
  1058. package/build/parse/structure/Token.js.map +1 -1
  1059. package/build/parse/structure/index.js +10 -33
  1060. package/build/parse/structure/index.js.map +1 -1
  1061. package/build/parse/traverse/findAllInTree.js +1 -7
  1062. package/build/parse/traverse/findAllInTree.js.map +1 -1
  1063. package/build/parse/traverse/index.js +8 -19
  1064. package/build/parse/traverse/index.js.map +1 -1
  1065. package/build/parse/traverse/innerText.js +3 -8
  1066. package/build/parse/traverse/innerText.js.map +1 -1
  1067. package/build/parsedPaper/ParsedPaper.js +1 -8
  1068. package/build/parsedPaper/ParsedPaper.js.map +1 -1
  1069. package/build/parsedPaper/assess/TreeAssessor.js +6 -12
  1070. package/build/parsedPaper/assess/TreeAssessor.js.map +1 -1
  1071. package/build/parsedPaper/assess/assessmentListFactories.js +1 -11
  1072. package/build/parsedPaper/assess/assessmentListFactories.js.map +1 -1
  1073. package/build/parsedPaper/assess/assessments/Assessment.js +15 -9
  1074. package/build/parsedPaper/assess/assessments/Assessment.js.map +1 -1
  1075. package/build/parsedPaper/assess/assessments/index.js +6 -13
  1076. package/build/parsedPaper/assess/assessments/index.js.map +1 -1
  1077. package/build/parsedPaper/assess/assessorFactories.js +16 -24
  1078. package/build/parsedPaper/assess/assessorFactories.js.map +1 -1
  1079. package/build/parsedPaper/assess/cornerstone/assessmentListFactories.js +1 -9
  1080. package/build/parsedPaper/assess/cornerstone/assessmentListFactories.js.map +1 -1
  1081. package/build/parsedPaper/assess/cornerstone/index.js +2 -10
  1082. package/build/parsedPaper/assess/cornerstone/index.js.map +1 -1
  1083. package/build/parsedPaper/assess/index.js +13 -29
  1084. package/build/parsedPaper/assess/index.js.map +1 -1
  1085. package/build/parsedPaper/build/PaperParser.js +5 -11
  1086. package/build/parsedPaper/build/PaperParser.js.map +1 -1
  1087. package/build/parsedPaper/build/linguisticParsing/Sentence.js +1 -7
  1088. package/build/parsedPaper/build/linguisticParsing/Sentence.js.map +1 -1
  1089. package/build/parsedPaper/build/linguisticParsing/SentenceTokenizer.js +16 -23
  1090. package/build/parsedPaper/build/linguisticParsing/SentenceTokenizer.js.map +1 -1
  1091. package/build/parsedPaper/build/linguisticParsing/parseText.js +3 -9
  1092. package/build/parsedPaper/build/linguisticParsing/parseText.js.map +1 -1
  1093. package/build/parsedPaper/build/tree/TreeBuilder.js +3 -9
  1094. package/build/parsedPaper/build/tree/TreeBuilder.js.map +1 -1
  1095. package/build/parsedPaper/build/tree/cleanup/calculateTextIndices.js +5 -10
  1096. package/build/parsedPaper/build/tree/cleanup/calculateTextIndices.js.map +1 -1
  1097. package/build/parsedPaper/build/tree/cleanup/getElementContent.js +1 -7
  1098. package/build/parsedPaper/build/tree/cleanup/getElementContent.js.map +1 -1
  1099. package/build/parsedPaper/build/tree/cleanup/postParsing.js +5 -11
  1100. package/build/parsedPaper/build/tree/cleanup/postParsing.js.map +1 -1
  1101. package/build/parsedPaper/build/tree/html/HTMLTreeConverter.js +21 -27
  1102. package/build/parsedPaper/build/tree/html/HTMLTreeConverter.js.map +1 -1
  1103. package/build/parsedPaper/build/tree/html/buildTree.js +7 -13
  1104. package/build/parsedPaper/build/tree/html/buildTree.js.map +1 -1
  1105. package/build/parsedPaper/build/tree/html/htmlConstants.js +4 -9
  1106. package/build/parsedPaper/build/tree/html/htmlConstants.js.map +1 -1
  1107. package/build/parsedPaper/build/tree/index.js +3 -8
  1108. package/build/parsedPaper/build/tree/index.js.map +1 -1
  1109. package/build/parsedPaper/build/tree/metadata/buildTree.js +12 -18
  1110. package/build/parsedPaper/build/tree/metadata/buildTree.js.map +1 -1
  1111. package/build/parsedPaper/research/TreeResearcher.js +4 -9
  1112. package/build/parsedPaper/research/TreeResearcher.js.map +1 -1
  1113. package/build/parsedPaper/research/index.js +10 -12
  1114. package/build/parsedPaper/research/index.js.map +1 -1
  1115. package/build/parsedPaper/research/researches/Headings.js +5 -11
  1116. package/build/parsedPaper/research/researches/Headings.js.map +1 -1
  1117. package/build/parsedPaper/research/researches/LinkStatistics.js +6 -12
  1118. package/build/parsedPaper/research/researches/LinkStatistics.js.map +1 -1
  1119. package/build/parsedPaper/research/researches/Research.js +5 -10
  1120. package/build/parsedPaper/research/researches/Research.js.map +1 -1
  1121. package/build/parsedPaper/research/researches/index.js +1 -13
  1122. package/build/parsedPaper/research/researches/index.js.map +1 -1
  1123. package/build/parsedPaper/structure/tree/FormattingElement.js +3 -9
  1124. package/build/parsedPaper/structure/tree/FormattingElement.js.map +1 -1
  1125. package/build/parsedPaper/structure/tree/SourceCodeLocation.js +1 -7
  1126. package/build/parsedPaper/structure/tree/SourceCodeLocation.js.map +1 -1
  1127. package/build/parsedPaper/structure/tree/TextContainer.js +5 -10
  1128. package/build/parsedPaper/structure/tree/TextContainer.js.map +1 -1
  1129. package/build/parsedPaper/structure/tree/index.js +9 -74
  1130. package/build/parsedPaper/structure/tree/index.js.map +1 -1
  1131. package/build/parsedPaper/structure/tree/nodes/Heading.js +3 -9
  1132. package/build/parsedPaper/structure/tree/nodes/Heading.js.map +1 -1
  1133. package/build/parsedPaper/structure/tree/nodes/LeafNode.js +5 -12
  1134. package/build/parsedPaper/structure/tree/nodes/LeafNode.js.map +1 -1
  1135. package/build/parsedPaper/structure/tree/nodes/List.js +5 -11
  1136. package/build/parsedPaper/structure/tree/nodes/List.js.map +1 -1
  1137. package/build/parsedPaper/structure/tree/nodes/ListItem.js +3 -10
  1138. package/build/parsedPaper/structure/tree/nodes/ListItem.js.map +1 -1
  1139. package/build/parsedPaper/structure/tree/nodes/MetadataMiscellaneous.js +3 -9
  1140. package/build/parsedPaper/structure/tree/nodes/MetadataMiscellaneous.js.map +1 -1
  1141. package/build/parsedPaper/structure/tree/nodes/MetadataText.js +3 -9
  1142. package/build/parsedPaper/structure/tree/nodes/MetadataText.js.map +1 -1
  1143. package/build/parsedPaper/structure/tree/nodes/Node.js +6 -12
  1144. package/build/parsedPaper/structure/tree/nodes/Node.js.map +1 -1
  1145. package/build/parsedPaper/structure/tree/nodes/Paragraph.js +3 -9
  1146. package/build/parsedPaper/structure/tree/nodes/Paragraph.js.map +1 -1
  1147. package/build/parsedPaper/structure/tree/nodes/StructuredNode.js +3 -10
  1148. package/build/parsedPaper/structure/tree/nodes/StructuredNode.js.map +1 -1
  1149. package/build/parsedPaper/structure/tree/nodes/index.js +10 -69
  1150. package/build/parsedPaper/structure/tree/nodes/index.js.map +1 -1
  1151. package/build/scoring/assessments/assessment.js +17 -15
  1152. package/build/scoring/assessments/assessment.js.map +1 -1
  1153. package/build/scoring/assessments/index.js +53 -56
  1154. package/build/scoring/assessments/index.js.map +1 -1
  1155. package/build/scoring/assessments/readability/ParagraphTooLongAssessment.js +30 -47
  1156. package/build/scoring/assessments/readability/ParagraphTooLongAssessment.js.map +1 -1
  1157. package/build/scoring/assessments/readability/RelatedKeywordsAssessment.js +98 -0
  1158. package/build/scoring/assessments/readability/RelatedKeywordsAssessment.js.map +1 -0
  1159. package/build/scoring/assessments/readability/SentenceBeginningsAssessment.js +22 -35
  1160. package/build/scoring/assessments/readability/SentenceBeginningsAssessment.js.map +1 -1
  1161. package/build/scoring/assessments/readability/SentenceLengthInTextAssessment.js +24 -39
  1162. package/build/scoring/assessments/readability/SentenceLengthInTextAssessment.js.map +1 -1
  1163. package/build/scoring/assessments/readability/TransitionWordsAssessment.js +29 -47
  1164. package/build/scoring/assessments/readability/TransitionWordsAssessment.js.map +1 -1
  1165. package/build/scoring/assessments/seo/FAQsAssessment.js +162 -0
  1166. package/build/scoring/assessments/seo/FAQsAssessment.js.map +1 -0
  1167. package/build/scoring/assessments/seo/ImageCountAssessment.js +17 -33
  1168. package/build/scoring/assessments/seo/ImageCountAssessment.js.map +1 -1
  1169. package/build/scoring/assessments/seo/InternalLinksAssessment.js +21 -35
  1170. package/build/scoring/assessments/seo/InternalLinksAssessment.js.map +1 -1
  1171. package/build/scoring/assessments/seo/IntroductionKeywordAssessment.js +20 -34
  1172. package/build/scoring/assessments/seo/IntroductionKeywordAssessment.js.map +1 -1
  1173. package/build/scoring/assessments/seo/KeyphraseAssessment.js +18 -32
  1174. package/build/scoring/assessments/seo/KeyphraseAssessment.js.map +1 -1
  1175. package/build/scoring/assessments/seo/KeyphraseLengthAssessment.js +21 -34
  1176. package/build/scoring/assessments/seo/KeyphraseLengthAssessment.js.map +1 -1
  1177. package/build/scoring/assessments/seo/KeywordDensityAssessment.js +26 -40
  1178. package/build/scoring/assessments/seo/KeywordDensityAssessment.js.map +1 -1
  1179. package/build/scoring/assessments/seo/MetaDescriptionKeywordAssessment.js +23 -42
  1180. package/build/scoring/assessments/seo/MetaDescriptionKeywordAssessment.js.map +1 -1
  1181. package/build/scoring/assessments/seo/MetaDescriptionLengthAssessment.js +19 -34
  1182. package/build/scoring/assessments/seo/MetaDescriptionLengthAssessment.js.map +1 -1
  1183. package/build/scoring/assessments/seo/MetaTitleKeywordAssessment.js +25 -41
  1184. package/build/scoring/assessments/seo/MetaTitleKeywordAssessment.js.map +1 -1
  1185. package/build/scoring/assessments/seo/NumberInMetaTitleAssessment.js +16 -30
  1186. package/build/scoring/assessments/seo/NumberInMetaTitleAssessment.js.map +1 -1
  1187. package/build/scoring/assessments/seo/OutboundLinksAssessment.js +21 -40
  1188. package/build/scoring/assessments/seo/OutboundLinksAssessment.js.map +1 -1
  1189. package/build/scoring/assessments/seo/PageTitleWidthAssessment.js +17 -31
  1190. package/build/scoring/assessments/seo/PageTitleWidthAssessment.js.map +1 -1
  1191. package/build/scoring/assessments/seo/SchemaAssessment.js +95 -0
  1192. package/build/scoring/assessments/seo/SchemaAssessment.js.map +1 -0
  1193. package/build/scoring/assessments/seo/SingleH1Assessment.js +20 -33
  1194. package/build/scoring/assessments/seo/SingleH1Assessment.js.map +1 -1
  1195. package/build/scoring/assessments/seo/SingleTitleAssessment.js +20 -33
  1196. package/build/scoring/assessments/seo/SingleTitleAssessment.js.map +1 -1
  1197. package/build/scoring/assessments/seo/SubHeadingsKeywordAssessment.js +18 -35
  1198. package/build/scoring/assessments/seo/SubHeadingsKeywordAssessment.js.map +1 -1
  1199. package/build/scoring/assessments/seo/TextImagesAssessment.js +20 -36
  1200. package/build/scoring/assessments/seo/TextImagesAssessment.js.map +1 -1
  1201. package/build/scoring/assessments/seo/TextLengthAssessment.js +21 -37
  1202. package/build/scoring/assessments/seo/TextLengthAssessment.js.map +1 -1
  1203. package/build/scoring/assessments/seo/UrlKeywordAssessment.js +20 -36
  1204. package/build/scoring/assessments/seo/UrlKeywordAssessment.js.map +1 -1
  1205. package/build/scoring/assessments/seo/UrlLengthAssessment.js +19 -33
  1206. package/build/scoring/assessments/seo/UrlLengthAssessment.js.map +1 -1
  1207. package/build/scoring/assessors/assessor.js +53 -33
  1208. package/build/scoring/assessors/assessor.js.map +1 -1
  1209. package/build/scoring/assessors/avadaAssessor.js +37 -17
  1210. package/build/scoring/assessors/avadaAssessor.js.map +1 -1
  1211. package/build/scoring/assessors/contentAssessor.js +16 -22
  1212. package/build/scoring/assessors/contentAssessor.js.map +1 -1
  1213. package/build/scoring/assessors/index.js +4 -34
  1214. package/build/scoring/assessors/index.js.map +1 -1
  1215. package/build/scoring/assessors/seoAssessor.js +27 -32
  1216. package/build/scoring/assessors/seoAssessor.js.map +1 -1
  1217. package/build/scoring/helpers/assessments/checkForTooLongSentences.js +3 -8
  1218. package/build/scoring/helpers/assessments/checkForTooLongSentences.js.map +1 -1
  1219. package/build/scoring/helpers/assessments/inRange.js +2 -10
  1220. package/build/scoring/helpers/assessments/inRange.js.map +1 -1
  1221. package/build/scoring/helpers/assessments/keyphraseLengthFactor.js +1 -7
  1222. package/build/scoring/helpers/assessments/keyphraseLengthFactor.js.map +1 -1
  1223. package/build/scoring/helpers/assessments/recommendedKeywordCount.js +5 -11
  1224. package/build/scoring/helpers/assessments/recommendedKeywordCount.js.map +1 -1
  1225. package/build/scoring/helpers/index.js +27 -18
  1226. package/build/scoring/helpers/index.js.map +1 -1
  1227. package/build/scoring/interpreters/index.js +2 -13
  1228. package/build/scoring/interpreters/index.js.map +1 -1
  1229. package/build/scoring/interpreters/scoreToRating.js +1 -7
  1230. package/build/scoring/interpreters/scoreToRating.js.map +1 -1
  1231. package/build/scoring/renderers/AssessorPresenter.js +12 -18
  1232. package/build/scoring/renderers/AssessorPresenter.js.map +1 -1
  1233. package/build/scoring/scoreAggregators/ReadabilityScoreAggregator.js +8 -14
  1234. package/build/scoring/scoreAggregators/ReadabilityScoreAggregator.js.map +1 -1
  1235. package/build/scoring/scoreAggregators/SEOScoreAggregator.js +3 -9
  1236. package/build/scoring/scoreAggregators/SEOScoreAggregator.js.map +1 -1
  1237. package/build/scoring/scoreAggregators/ScoreAggregator.js +1 -7
  1238. package/build/scoring/scoreAggregators/ScoreAggregator.js.map +1 -1
  1239. package/build/scoring/scoreAggregators/index.js +3 -27
  1240. package/build/scoring/scoreAggregators/index.js.map +1 -1
  1241. package/build/values/AssessmentResult.js +31 -57
  1242. package/build/values/AssessmentResult.js.map +1 -1
  1243. package/build/values/Mark.js +9 -15
  1244. package/build/values/Mark.js.map +1 -1
  1245. package/build/values/Paper.js +115 -16
  1246. package/build/values/Paper.js.map +1 -1
  1247. package/build/values/index.js +4 -27
  1248. package/build/values/index.js.map +1 -1
  1249. package/build/vendor/turkishStemmer.js +1 -7
  1250. package/build/vendor/turkishStemmer.js.map +1 -1
  1251. package/package.json +10 -2
  1252. package/build/bundledPlugins/index.js +0 -14
  1253. package/build/bundledPlugins/index.js.map +0 -1
  1254. package/build/bundledPlugins/previouslyUsedKeywords.js +0 -171
  1255. package/build/bundledPlugins/previouslyUsedKeywords.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"getProminentWordsForInternalLinking.js","names":["_lodash","require","_countWords","_interopRequireDefault","_determineProminentWords","_getSubheadings","_baseStemmer","_removeURLs","_removeEmailAddresses","e","__esModule","default","sanitizeText","text","removeURLs","removeEmailAddresses","getProminentWordsForInternalLinking","paper","researcher","functionWords","getConfig","customStemmer","getHelper","stemmer","getWordsCustomHelper","customCountLength","getText","metadescription","getDescription","title","getTitle","result","hasMetaDescription","hasTitle","prominentWords","countWords","subheadings","getSubheadingsTopLevel","map","subheading","attributes","getKeyword","getSynonyms","join","abbreviations","retrieveAbbreviations","concat","removedSubheadingText","removeSubheadingsTopLevel","prominentWordsFromText","getProminentWords","prominentWordsFromPaperAttributes","getProminentWordsFromPaperAttributes","forEach","relevantWord","setOccurrences","getOccurrences","collapsedWords","collapseProminentWordsOnStem","sortProminentWords","minimumNumberOfOccurrences","baseStemmer","take","filterProminentWords","_default","exports"],"sources":["../../../src/languageProcessing/researches/getProminentWordsForInternalLinking.js"],"sourcesContent":["import { take } from \"lodash\";\nimport countWords from \"../helpers/word/countWords\";\nimport {\n\tcollapseProminentWordsOnStem,\n\tfilterProminentWords,\n\tgetProminentWords,\n\tgetProminentWordsFromPaperAttributes,\n\tretrieveAbbreviations,\n\tsortProminentWords,\n} from \"../helpers/prominentWords/determineProminentWords\";\nimport { getSubheadingsTopLevel, removeSubheadingsTopLevel } from \"../helpers/html/getSubheadings\";\nimport baseStemmer from \"../helpers/morphology/baseStemmer\";\nimport removeURLs from \"../helpers/sanitize/removeURLs.js\";\nimport removeEmailAddresses from \"../helpers/sanitize/removeEmailAddresses\";\n\n/**\n * Removes URLs and email addresses from the text.\n *\n * @param {string}\ttext\tThe text to sanitize.\n *\n * @returns {string} The text without URLs and email addresses.\n */\nconst sanitizeText = function( text ) {\n\ttext = removeURLs( text );\n\treturn removeEmailAddresses( text );\n};\n\n/**\n * Retrieves the prominent words from the given paper.\n *\n * @param {Paper} paper The paper to determine the prominent words of.\n * @param {Researcher} researcher The researcher to use for analysis.\n *\n * @returns {Object} result A compound result object.\n * @returns {ProminentWord[]} result.prominentWords Prominent words for this paper, filtered and sorted.\n * @returns {boolean} result.hasMetaDescription Whether the metadescription is available in the input paper.\n * @returns {boolean} result.hasTitle Whether the title is available in the input paper.\n */\nfunction getProminentWordsForInternalLinking( paper, researcher ) {\n\tconst functionWords = researcher.getConfig( \"functionWords\" );\n\t// An optional custom helper to return custom function to return the stem of a word.\n\tconst customStemmer = researcher.getHelper( \"customGetStemmer\" );\n\tconst stemmer = customStemmer ? customStemmer( researcher ) : researcher.getHelper( \"getStemmer\" )( researcher );\n\t// An optional custom helper to get words from the text.\n\tconst getWordsCustomHelper = researcher.getHelper( \"getWordsCustomHelper\" );\n\t// An optional custom helper to count length to use instead of countWords.\n\tconst customCountLength = researcher.getHelper( \"customCountLength\" );\n\n\tconst text = sanitizeText( paper.getText() );\n\tconst metadescription = sanitizeText( paper.getDescription() );\n\tconst title = sanitizeText( paper.getTitle() );\n\n\tconst result = {};\n\tresult.hasMetaDescription = metadescription !== \"\";\n\tresult.hasTitle = title !== \"\";\n\tresult.prominentWords = [];\n\n\t/**\n\t * We only want to return suggestions (and spend time calculating prominent words) if the text is at least 100 words.\n\t * And when a customCountLength is available, we only want to return the suggestions if the text has at least 200 characters.\n \t */\n\tif ( customCountLength ) {\n\t\tif ( customCountLength( text ) < 200 ) {\n\t\t\treturn result;\n\t\t}\n\t} else if ( countWords( text ) < 100 ) {\n\t\treturn result;\n\t}\n\n\tconst subheadings = getSubheadingsTopLevel( text ).map( subheading => subheading[ 2 ] );\n\tconst attributes = [\n\t\tpaper.getKeyword(),\n\t\tpaper.getSynonyms(),\n\t\ttitle,\n\t\tmetadescription,\n\t\tsubheadings.join( \" \" ),\n\t];\n\n\t// If the language has a custom helper to get words from the text, we don't retrieve the abbreviation.\n\tconst abbreviations = getWordsCustomHelper ? [] : retrieveAbbreviations( text.concat( attributes.join( \" \" ) ) );\n\n\tconst removedSubheadingText = removeSubheadingsTopLevel( text );\n\tconst prominentWordsFromText = getProminentWords( removedSubheadingText, abbreviations, stemmer, functionWords, getWordsCustomHelper );\n\n\tconst prominentWordsFromPaperAttributes = getProminentWordsFromPaperAttributes(\n\t\tattributes, abbreviations, stemmer, functionWords, getWordsCustomHelper );\n\n\t/*\n\t * If a word is used in any of the attributes, its weight is automatically high.\n\t * To make sure the word survives weight filters and gets saved in the database, make the number of occurrences times-3.\n\t */\n\tprominentWordsFromPaperAttributes.forEach( relevantWord => relevantWord.setOccurrences( relevantWord.getOccurrences() * 3 ) );\n\n\tconst collapsedWords = collapseProminentWordsOnStem( prominentWordsFromPaperAttributes.concat( prominentWordsFromText ) );\n\tsortProminentWords( collapsedWords );\n\n\t/*\n\t * If morphology data are available for a language, the minimum number of occurrences to consider a word to be prominent is 4.\n\t * This minimum number was chosen in order to avoid premature suggestions of words from the paper attributes.\n\t * These get a times-3 boost and would therefore be prominent with just 1 occurrence.\n\t *\n\t * If morphology data are not available, and therefore word forms are not recognized, the minimum threshold is lowered to 2.\n\t */\n\tlet minimumNumberOfOccurrences = 4;\n\n\tif ( stemmer === baseStemmer ) {\n\t\tminimumNumberOfOccurrences = 2;\n\t}\n\n\t/*\n\t * Return the 100 top items from the collapsed and sorted list. The number is picked deliberately to prevent larger\n\t * articles from getting too long of lists.\n\t */\n\tresult.prominentWords = take( filterProminentWords( collapsedWords, minimumNumberOfOccurrences ), 100 );\n\n\treturn result;\n}\n\nexport default getProminentWordsForInternalLinking;\n"],"mappings":";;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,wBAAA,GAAAH,OAAA;AAQA,IAAAI,eAAA,GAAAJ,OAAA;AACA,IAAAK,YAAA,GAAAH,sBAAA,CAAAF,OAAA;AACA,IAAAM,WAAA,GAAAJ,sBAAA,CAAAF,OAAA;AACA,IAAAO,qBAAA,GAAAL,sBAAA,CAAAF,OAAA;AAA4E,SAAAE,uBAAAM,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAE5E;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMG,YAAY,GAAG,SAAAA,CAAUC,IAAI,EAAG;EACrCA,IAAI,GAAG,IAAAC,mBAAU,EAAED,IAAK,CAAC;EACzB,OAAO,IAAAE,6BAAoB,EAAEF,IAAK,CAAC;AACpC,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASG,mCAAmCA,CAAEC,KAAK,EAAEC,UAAU,EAAG;EACjE,MAAMC,aAAa,GAAGD,UAAU,CAACE,SAAS,CAAE,eAAgB,CAAC;EAC7D;EACA,MAAMC,aAAa,GAAGH,UAAU,CAACI,SAAS,CAAE,kBAAmB,CAAC;EAChE,MAAMC,OAAO,GAAGF,aAAa,GAAGA,aAAa,CAAEH,UAAW,CAAC,GAAGA,UAAU,CAACI,SAAS,CAAE,YAAa,CAAC,CAAEJ,UAAW,CAAC;EAChH;EACA,MAAMM,oBAAoB,GAAGN,UAAU,CAACI,SAAS,CAAE,sBAAuB,CAAC;EAC3E;EACA,MAAMG,iBAAiB,GAAGP,UAAU,CAACI,SAAS,CAAE,mBAAoB,CAAC;EAErE,MAAMT,IAAI,GAAGD,YAAY,CAAEK,KAA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Aa,EAAEK,oBAAqB,CAAC;EAEtI,MAAM2B,iCAAiC,GAAG,IAAAC,6DAAoC,EAC7EZ,UAAU,EAAEI,aAAa,EAAErB,OAAO,EAAEJ,aAAa,EAAEK,oBAAqB,CAAC;;EAE1E;AACD;AACA;AACA;EACC2B,iCAAiC,CAACE,OAAO,CAAEC,YAAY,IAAIA,YAAY,CAACC,cAAc,CAAED,YAAY,CAACE,cAAc,CAAC,CAAC,GAAG,CAAE,CAAE,CAAC;EAE7H,MAAMC,cAAc,GAAG,IAAAC,qDAA4B,EAAEP,iCAAiC,CAACL,MAAM,CAAEG,sBAAuB,CAAE,CAAC;EACzH,IAAAU,2CAAkB,EAAEF,cAAe,CAAC;;EAEpC;AACD;AACA;AACA;AACA;AACA;AACA;EACC,IAAIG,0BAA0B,GAAG,CAAC;EAElC,IAAKrC,OAAO,KAAKsC,oBAAW,EAAG;IAC9BD,0BAA0B,GAAG,CAAC;EAC/B;;EAEA;AACD;AACA;AACA;EACC7B,MAAM,CAACG,cAAc,GAAG,IAAA4B,YAAI,EAAE,IAAAC,6CAAoB,EAAEN,cAAc,EAAEG,0BAA2B,CAAC,EAAE,GAAI,CAAC;EAEvG,OAAO7B,MAAM;AACd;AAAC,IAAAiC,QAAA,GAAAC,OAAA,CAAAtD,OAAA,GAEcK,mCAAmC","ignoreList":[]}
1
+ {"version":3,"file":"getProminentWordsForInternalLinking.js","names":["take","countWords","collapseProminentWordsOnStem","filterProminentWords","getProminentWords","getProminentWordsFromPaperAttributes","retrieveAbbreviations","sortProminentWords","getSubheadingsTopLevel","removeSubheadingsTopLevel","baseStemmer","removeURLs","removeEmailAddresses","sanitizeText","text","getProminentWordsForInternalLinking","paper","researcher","functionWords","getConfig","customStemmer","getHelper","stemmer","getWordsCustomHelper","customCountLength","getText","metadescription","getDescription","title","getTitle","result","hasMetaDescription","hasTitle","prominentWords","subheadings","map","subheading","attributes","getKeyword","getSynonyms","join","abbreviations","concat","removedSubheadingText","prominentWordsFromText","prominentWordsFromPaperAttributes","forEach","relevantWord","setOccurrences","getOccurrences","collapsedWords","minimumNumberOfOccurrences"],"sources":["../../../src/languageProcessing/researches/getProminentWordsForInternalLinking.js"],"sourcesContent":["import { take } from \"lodash\";\nimport countWords from \"../helpers/word/countWords\";\nimport {\n\tcollapseProminentWordsOnStem,\n\tfilterProminentWords,\n\tgetProminentWords,\n\tgetProminentWordsFromPaperAttributes,\n\tretrieveAbbreviations,\n\tsortProminentWords,\n} from \"../helpers/prominentWords/determineProminentWords\";\nimport { getSubheadingsTopLevel, removeSubheadingsTopLevel } from \"../helpers/html/getSubheadings\";\nimport baseStemmer from \"../helpers/morphology/baseStemmer\";\nimport removeURLs from \"../helpers/sanitize/removeURLs.js\";\nimport removeEmailAddresses from \"../helpers/sanitize/removeEmailAddresses\";\n\n/**\n * Removes URLs and email addresses from the text.\n *\n * @param {string}\ttext\tThe text to sanitize.\n *\n * @returns {string} The text without URLs and email addresses.\n */\nconst sanitizeText = function( text ) {\n\ttext = removeURLs( text );\n\treturn removeEmailAddresses( text );\n};\n\n/**\n * Retrieves the prominent words from the given paper.\n *\n * @param {Paper} paper The paper to determine the prominent words of.\n * @param {Researcher} researcher The researcher to use for analysis.\n *\n * @returns {Object} result A compound result object.\n * @returns {ProminentWord[]} result.prominentWords Prominent words for this paper, filtered and sorted.\n * @returns {boolean} result.hasMetaDescription Whether the metadescription is available in the input paper.\n * @returns {boolean} result.hasTitle Whether the title is available in the input paper.\n */\nfunction getProminentWordsForInternalLinking( paper, researcher ) {\n\tconst functionWords = researcher.getConfig( \"functionWords\" );\n\t// An optional custom helper to return custom function to return the stem of a word.\n\tconst customStemmer = researcher.getHelper( \"customGetStemmer\" );\n\tconst stemmer = customStemmer ? customStemmer( researcher ) : researcher.getHelper( \"getStemmer\" )( researcher );\n\t// An optional custom helper to get words from the text.\n\tconst getWordsCustomHelper = researcher.getHelper( \"getWordsCustomHelper\" );\n\t// An optional custom helper to count length to use instead of countWords.\n\tconst customCountLength = researcher.getHelper( \"customCountLength\" );\n\n\tconst text = sanitizeText( paper.getText() );\n\tconst metadescription = sanitizeText( paper.getDescription() );\n\tconst title = sanitizeText( paper.getTitle() );\n\n\tconst result = {};\n\tresult.hasMetaDescription = metadescription !== \"\";\n\tresult.hasTitle = title !== \"\";\n\tresult.prominentWords = [];\n\n\t/**\n\t * We only want to return suggestions (and spend time calculating prominent words) if the text is at least 100 words.\n\t * And when a customCountLength is available, we only want to return the suggestions if the text has at least 200 characters.\n \t */\n\tif ( customCountLength ) {\n\t\tif ( customCountLength( text ) < 200 ) {\n\t\t\treturn result;\n\t\t}\n\t} else if ( countWords( text ) < 100 ) {\n\t\treturn result;\n\t}\n\n\tconst subheadings = getSubheadingsTopLevel( text ).map( subheading => subheading[ 2 ] );\n\tconst attributes = [\n\t\tpaper.getKeyword(),\n\t\tpaper.getSynonyms(),\n\t\ttitle,\n\t\tmetadescription,\n\t\tsubheadings.join( \" \" ),\n\t];\n\n\t// If the language has a custom helper to get words from the text, we don't retrieve the abbreviation.\n\tconst abbreviations = getWordsCustomHelper ? [] : retrieveAbbreviations( text.concat( attributes.join( \" \" ) ) );\n\n\tconst removedSubheadingText = removeSubheadingsTopLevel( text );\n\tconst prominentWordsFromText = getProminentWords( removedSubheadingText, abbreviations, stemmer, functionWords, getWordsCustomHelper );\n\n\tconst prominentWordsFromPaperAttributes = getProminentWordsFromPaperAttributes(\n\t\tattributes, abbreviations, stemmer, functionWords, getWordsCustomHelper );\n\n\t/*\n\t * If a word is used in any of the attributes, its weight is automatically high.\n\t * To make sure the word survives weight filters and gets saved in the database, make the number of occurrences times-3.\n\t */\n\tprominentWordsFromPaperAttributes.forEach( relevantWord => relevantWord.setOccurrences( relevantWord.getOccurrences() * 3 ) );\n\n\tconst collapsedWords = collapseProminentWordsOnStem( prominentWordsFromPaperAttributes.concat( prominentWordsFromText ) );\n\tsortProminentWords( collapsedWords );\n\n\t/*\n\t * If morphology data are available for a language, the minimum number of occurrences to consider a word to be prominent is 4.\n\t * This minimum number was chosen in order to avoid premature suggestions of words from the paper attributes.\n\t * These get a times-3 boost and would therefore be prominent with just 1 occurrence.\n\t *\n\t * If morphology data are not available, and therefore word forms are not recognized, the minimum threshold is lowered to 2.\n\t */\n\tlet minimumNumberOfOccurrences = 4;\n\n\tif ( stemmer === baseStemmer ) {\n\t\tminimumNumberOfOccurrences = 2;\n\t}\n\n\t/*\n\t * Return the 100 top items from the collapsed and sorted list. The number is picked deliberately to prevent larger\n\t * articles from getting too long of lists.\n\t */\n\tresult.prominentWords = take( filterProminentWords( collapsedWords, minimumNumberOfOccurrences ), 100 );\n\n\treturn result;\n}\n\nexport default getProminentWordsForInternalLinking;\n"],"mappings":"AAAA,SAASA,IAAI,QAAQ,QAAQ;AAC7B,OAAOC,UAAU;AACjB,SACCC,4BAA4B,EAC5BC,oBAAoB,EACpBC,iBAAiB,EACjBC,oCAAoC,EACpCC,qBAAqB,EACrBC,kBAAkB;AAEnB,SAASC,sBAAsB,EAAEC,yBAAyB;AAC1D,OAAOC,WAAW;AAClB,OAAOC,UAAU;AACjB,OAAOC,oBAAoB;;AAE3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,YAAY,GAAG,SAAAA,CAAUC,IAAI,EAAG;EACrCA,IAAI,GAAGH,UAAU,CAAEG,IAAK,CAAC;EACzB,OAAOF,oBAAoB,CAAEE,IAAK,CAAC;AACpC,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASC,mCAAmCA,CAAEC,KAAK,EAAEC,UAAU,EAAG;EACjE,MAAMC,aAAa,GAAGD,UAAU,CAACE,SAAS,CAAE,eAAgB,CAAC;EAC7D;EACA,MAAMC,aAAa,GAAGH,UAAU,CAACI,SAAS,CAAE,kBAAmB,CAAC;EAChE,MAAMC,OAAO,GAAGF,aAAa,GAAGA,aAAa,CAAEH,UAAW,CAAC,GAAGA,UAAU,CAACI,SAAS,CAAE,YAAa,CAAC,CAAEJ,UAAW,CAAC;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,CAAC;EAEhH,MAAMG,qBAAqB,GAAGlC,yBAAyB,CAAEK,IAAK,CAAC;EAC/D,MAAM8B,sBAAsB,GAAGxC,iBAAiB,CAAEuC,qBAAqB,EAAEF,aAAa,EAAEnB,OAAO,EAAEJ,aAAa,EAAEK,oBAAqB,CAAC;EAEtI,MAAMsB,iCAAiC,GAAGxC,oCAAoC,CAC7EgC,UAAU,EAAEI,aAAa,EAAEnB,OAAO,EAAEJ,aAAa,EAAEK,oBAAqB,CAAC;;EAE1E;AACD;AACA;AACA;EACCsB,iCAAiC,CAACC,OAAO,CAAEC,YAAY,IAAIA,YAAY,CAACC,cAAc,CAAED,YAAY,CAACE,cAAc,CAAC,CAAC,GAAG,CAAE,CAAE,CAAC;EAE7H,MAAMC,cAAc,GAAGhD,4BAA4B,CAAE2C,iCAAiC,CAACH,MAAM,CAAEE,sBAAuB,CAAE,CAAC;EACzHrC,kBAAkB,CAAE2C,cAAe,CAAC;;EAEpC;AACD;AACA;AACA;AACA;AACA;AACA;EACC,IAAIC,0BAA0B,GAAG,CAAC;EAElC,IAAK7B,OAAO,KAAKZ,WAAW,EAAG;IAC9ByC,0BAA0B,GAAG,CAAC;EAC/B;;EAEA;AACD;AACA;AACA;EACCrB,MAAM,CAACG,cAAc,GAAGjC,IAAI,CAAEG,oBAAoB,CAAE+C,cAAc,EAAEC,0BAA2B,CAAC,EAAE,GAAI,CAAC;EAEvG,OAAOrB,MAAM;AACd;AAEA,eAAef,mCAAmC","ignoreList":[]}
@@ -1,17 +1,12 @@
1
- "use strict";
1
+ import getWords from "../helpers/word/getWords.js";
2
+ import getSentences from "../helpers/sentence/getSentences";
3
+ import stripSpaces from "../helpers/sanitize/stripSpaces.js";
4
+ import { stripFullTags as stripTags } from "../helpers/sanitize/stripHTMLTags.js";
5
+ import { filter, forEach, isEmpty } from 'lodash';
6
+ import removeHtmlBlocks from "../helpers/html/htmlParser";
7
+ import { filterShortcodesFromHTML } from "../helpers";
8
+ import stripNonTextTags from "../helpers/sanitize/stripNonTextTags";
2
9
 
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = _default;
7
- var _getWords = _interopRequireDefault(require("../helpers/word/getWords.js"));
8
- var _getSentences = _interopRequireDefault(require("../helpers/sentence/getSentences"));
9
- var _stripSpaces = _interopRequireDefault(require("../helpers/sanitize/stripSpaces.js"));
10
- var _stripHTMLTags = require("../helpers/sanitize/stripHTMLTags.js");
11
- var _lodash = require("lodash");
12
- var _htmlParser = _interopRequireDefault(require("../helpers/html/htmlParser"));
13
- var _helpers = require("../helpers");
14
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
15
10
  /**
16
11
  * Compares the first word of each sentence with the first word of the following sentence.
17
12
  *
@@ -20,7 +15,7 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
20
15
  * @returns {boolean} Returns true if sentence beginnings match.
21
16
  */
22
17
  const startsWithSameWord = function (currentSentenceBeginning, nextSentenceBeginning) {
23
- return !(0, _lodash.isEmpty)(currentSentenceBeginning) && currentSentenceBeginning === nextSentenceBeginning;
18
+ return !isEmpty(currentSentenceBeginning) && currentSentenceBeginning === nextSentenceBeginning;
24
19
  };
25
20
 
26
21
  /**
@@ -34,7 +29,7 @@ const compareFirstWords = function (sentenceBeginnings, sentences) {
34
29
  const consecutiveFirstWords = [];
35
30
  let foundSentences = [];
36
31
  let sameBeginnings = 1;
37
- (0, _lodash.forEach)(sentenceBeginnings, function (beginning, i) {
32
+ forEach(sentenceBeginnings, function (beginning, i) {
38
33
  const currentSentenceBeginning = beginning;
39
34
  const nextSentenceBeginning = sentenceBeginnings[i + 1];
40
35
  foundSentences.push(sentences[i]);
@@ -65,17 +60,18 @@ const compareFirstWords = function (sentenceBeginnings, sentences) {
65
60
  * @returns {string} The first word of the sentence.
66
61
  */
67
62
  function getSentenceBeginning(sentence, firstWordExceptions, secondWordExceptions, getWordsCustomHelper) {
68
- const stripped = (0, _stripHTMLTags.stripFullTags)((0, _stripSpaces.default)(sentence));
69
- const words = getWordsCustomHelper ? getWordsCustomHelper(stripped) : (0, _getWords.default)(stripped);
63
+ const stripped = stripTags(stripSpaces(sentence));
64
+ let words = getWordsCustomHelper ? getWordsCustomHelper(stripped) : getWords(stripped);
65
+ words = words.filter(word => /^\p{L}/u.test(word));
70
66
  if (words.length === 0) {
71
- return "";
67
+ return '';
72
68
  }
73
69
  let firstWord = words[0].toLocaleLowerCase();
74
70
  if (firstWordExceptions.indexOf(firstWord) > -1 && words.length > 1) {
75
- firstWord = firstWord + " " + words[1];
71
+ firstWord = firstWord + ' ' + words[1];
76
72
  if (secondWordExceptions) {
77
73
  if (secondWordExceptions.includes(words[1])) {
78
- firstWord = firstWord + " " + words[2];
74
+ firstWord = firstWord + ' ' + words[2];
79
75
  }
80
76
  }
81
77
  }
@@ -90,33 +86,31 @@ function getSentenceBeginning(sentence, firstWordExceptions, secondWordException
90
86
  *
91
87
  * @returns {Object} The object containing the first word of each sentence and the corresponding counts.
92
88
  */
93
- function _default(paper, researcher) {
94
- const firstWordExceptions = researcher.getConfig("firstWordExceptions");
95
- const secondWordExceptions = researcher.getConfig("secondWordExceptions");
96
- const getWordsCustomHelper = researcher.getHelper("getWordsCustomHelper");
97
- const memoizedTokenizer = researcher.getHelper("memoizedTokenizer");
89
+ export default function (paper, researcher) {
90
+ const firstWordExceptions = researcher.getConfig('firstWordExceptions');
91
+ const secondWordExceptions = researcher.getConfig('secondWordExceptions');
92
+ const getWordsCustomHelper = researcher.getHelper('getWordsCustomHelper');
93
+ const memoizedTokenizer = researcher.getHelper('memoizedTokenizer');
98
94
  let text = paper.getText();
99
- text = (0, _htmlParser.default)(text);
100
- text = (0, _helpers.filterShortcodesFromHTML)(text, paper._attributes && paper._attributes.shortcodes);
95
+ text = removeHtmlBlocks(text);
96
+ text = stripNonTextTags(text);
97
+ text = filterShortcodesFromHTML(text, paper._attributes && paper._attributes.shortcodes);
101
98
 
102
99
  // Remove any HTML whitespace padding and replace it with a single whitespace.
103
- text = text.replace(/[\s\n]+/g, " ");
100
+ text = text.replace(/[\s\n]+/g, ' ');
104
101
 
105
102
  // Exclude text inside tables.
106
- text = text.replace(/<figure class='wp-block-table'>.*<\/figure>/sg, "");
107
-
108
- // Exclude text inside list items.
109
- text = text.replace(/<li(?:[^>]+)?>(.*?)<\/li>/ig, "");
110
- let sentences = (0, _getSentences.default)(text, memoizedTokenizer);
103
+ text = text.replace(/<figure class='wp-block-table'>.*<\/figure>/gs, '');
104
+ let sentences = getSentences(text, memoizedTokenizer);
111
105
  let sentenceBeginnings = sentences.map(function (sentence) {
112
106
  return getSentenceBeginning(sentence, firstWordExceptions, secondWordExceptions, getWordsCustomHelper);
113
107
  });
114
108
  sentences = sentences.filter(function (sentence) {
115
- const stripped = (0, _stripSpaces.default)(sentence);
116
- const words = getWordsCustomHelper ? getWordsCustomHelper(stripped) : (0, _getWords.default)(stripped);
109
+ const stripped = stripSpaces(sentence);
110
+ const words = getWordsCustomHelper ? getWordsCustomHelper(stripped) : getWords(stripped);
117
111
  return words.length > 0;
118
112
  });
119
- sentenceBeginnings = (0, _lodash.filter)(sentenceBeginnings);
113
+ sentenceBeginnings = filter(sentenceBeginnings);
120
114
  return compareFirstWords(sentenceBeginnings, sentences);
121
115
  }
122
116
  //# sourceMappingURL=getSentenceBeginnings.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"getSentenceBeginnings.js","names":["_getWords","_interopRequireDefault","require","_getSentences","_stripSpaces","_stripHTMLTags","_lodash","_htmlParser","_helpers","e","__esModule","default","startsWithSameWord","currentSentenceBeginning","nextSentenceBeginning","isEmpty","compareFirstWords","sentenceBeginnings","sentences","consecutiveFirstWords","foundSentences","sameBeginnings","forEach","beginning","i","push","word","count","getSentenceBeginning","sentence","firstWordExceptions","secondWordExceptions","getWordsCustomHelper","stripped","stripTags","stripSpaces","words","getWords","length","firstWord","toLocaleLowerCase","indexOf","includes","_default","paper","researcher","getConfig","getHelper","memoizedTokenizer","text","getText","removeHtmlBlocks","filterShortcodesFromHTML","_attributes","shortcodes","replace","getSentences","map","filter"],"sources":["../../../src/languageProcessing/researches/getSentenceBeginnings.js"],"sourcesContent":["import getWords from \"../helpers/word/getWords.js\";\nimport getSentences from \"../helpers/sentence/getSentences\";\nimport stripSpaces from \"../helpers/sanitize/stripSpaces.js\";\nimport { stripFullTags as stripTags } from \"../helpers/sanitize/stripHTMLTags.js\";\n\nimport { filter, forEach, isEmpty } from \"lodash\";\nimport removeHtmlBlocks from \"../helpers/html/htmlParser\";\nimport { filterShortcodesFromHTML } from \"../helpers\";\n\n/**\n * Compares the first word of each sentence with the first word of the following sentence.\n *\n * @param {string} currentSentenceBeginning The first word of the current sentence.\n * @param {string} nextSentenceBeginning The first word of the next sentence.\n * @returns {boolean} Returns true if sentence beginnings match.\n */\nconst startsWithSameWord = function( currentSentenceBeginning, nextSentenceBeginning ) {\n\treturn ! isEmpty( currentSentenceBeginning ) && currentSentenceBeginning === nextSentenceBeginning;\n};\n\n/**\n * Counts the number of similar sentence beginnings.\n *\n * @param {Array} sentenceBeginnings The array containing the first word of each sentence.\n * @param {Array} sentences The array containing all sentences.\n * @returns {Array} The array containing the objects containing the first words and the corresponding counts.\n */\nconst compareFirstWords = function( sentenceBeginnings, sentences ) {\n\tconst consecutiveFirstWords = [];\n\tlet foundSentences = [];\n\tlet sameBeginnings = 1;\n\n\tforEach( sentenceBeginnings, function( beginning, i ) {\n\t\tconst currentSentenceBeginning = beginning;\n\t\tconst nextSentenceBeginning = sentenceBeginnings[ i + 1 ];\n\t\tfoundSentences.push( sentences[ i ] );\n\n\t\tif ( startsWithSameWord( currentSentenceBeginning, nextSentenceBeginning ) ) {\n\t\t\tsameBeginnings++;\n\t\t} else {\n\t\t\tconsecutiveFirstWords.push( { word: currentSentenceBeginning, count: sameBeginnings, sentences: foundSentences } );\n\t\t\tsameBeginnings = 1;\n\t\t\tfoundSentences = [];\n\t\t}\n\t} );\n\n\treturn consecutiveFirstWords;\n};\n\n/**\n * Retrieves the first word from the sentence. If the first or second word is on an exception list of words that should not be considered as sentence\n * beginnings, the following word is also retrieved.\n *\n * @param {string} sentence The sentence to retrieve the first word from.\n * @param {Array} firstWordExceptions First word exceptions to match against.\n * @param {Array} secondWordExceptions Second word exceptions to match against.\n * @param {function}\tgetWordsCustomHelper The language-specific helper function to retrieve words from text.\n *\n * @returns {string} The first word of the sentence.\n */\nfunction getSentenceBeginning( sentence, firstWordExceptions, secondWordExceptions, getWordsCustomHelper ) {\n\tconst stripped = stripTags( stripSpaces( sentence ) );\n\tconst words = getWordsCustomHelper ? getWordsCustomHelper( stripped ) : getWords( stripped );\n\n\tif ( words.length === 0 ) {\n\t\treturn \"\";\n\t}\n\n\tlet firstWord = words[ 0 ].toLocaleLowerCase();\n\n\tif ( firstWordExceptions.indexOf( firstWord ) > -1 && words.length > 1 ) {\n\t\tfirstWord = firstWord + \" \" + words[ 1 ];\n\t\tif ( secondWordExceptions ) {\n\t\t\tif ( secondWordExceptions.includes( words[ 1 ] ) ) {\n\t\t\t\tfirstWord = firstWord + \" \" + words[ 2 ];\n\t\t\t}\n\t\t}\n\t}\n\n\treturn firstWord;\n}\n\n/**\n * Gets the first word of each sentence from the text, and returns an object containing the first word of each sentence and the corresponding counts.\n *\n * @param {Paper} paper The Paper object to get the text from.\n * @param {Researcher} researcher The researcher this research is a part of.\n *\n * @returns {Object} The object containing the first word of each sentence and the corresponding counts.\n */\nexport default function( paper, researcher ) {\n\tconst firstWordExceptions = researcher.getConfig( \"firstWordExceptions\" );\n\tconst secondWordExceptions = researcher.getConfig( \"secondWordExceptions\" );\n\tconst getWordsCustomHelper = researcher.getHelper( \"getWordsCustomHelper\" );\n\tconst memoizedTokenizer = researcher.getHelper( \"memoizedTokenizer\" );\n\n\tlet text = paper.getText();\n\ttext = removeHtmlBlocks( text );\n\ttext = filterShortcodesFromHTML( text, paper._attributes && paper._attributes.shortcodes );\n\n\t// Remove any HTML whitespace padding and replace it with a single whitespace.\n\ttext = text.replace( /[\\s\\n]+/g, \" \" );\n\n\t// Exclude text inside tables.\n\ttext = text.replace( /<figure class='wp-block-table'>.*<\\/figure>/sg, \"\" );\n\n\t// Exclude text inside list items.\n\ttext = text.replace( /<li(?:[^>]+)?>(.*?)<\\/li>/ig, \"\" );\n\n\tlet sentences = getSentences( text, memoizedTokenizer );\n\n\tlet sentenceBeginnings = sentences.map( function( sentence ) {\n\t\treturn getSentenceBeginning( sentence, firstWordExceptions, secondWordExceptions, getWordsCustomHelper );\n\t} );\n\n\tsentences = sentences.filter( function( sentence ) {\n\t\tconst stripped = stripSpaces( sentence );\n\t\tconst words = getWordsCustomHelper ? getWordsCustomHelper( stripped ) : getWords( stripped );\n\t\treturn words.length > 0;\n\t} );\n\tsentenceBeginnings = filter( sentenceBeginnings );\n\n\treturn compareFirstWords( sentenceBeginnings, sentences );\n}\n"],"mappings":";;;;;;AAAA,IAAAA,SAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,aAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,YAAA,GAAAH,sBAAA,CAAAC,OAAA;AACA,IAAAG,cAAA,GAAAH,OAAA;AAEA,IAAAI,OAAA,GAAAJ,OAAA;AACA,IAAAK,WAAA,GAAAN,sBAAA,CAAAC,OAAA;AACA,IAAAM,QAAA,GAAAN,OAAA;AAAsD,SAAAD,uBAAAQ,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAEtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMG,kBAAkB,GAAG,SAAAA,CAAUC,wBAAwB,EAAEC,qBAAqB,EAAG;EACtF,OAAO,CAAE,IAAAC,eAAO,EAAEF,wBAAyB,CAAC,IAAIA,wBAAwB,KAAKC,qBAAqB;AACnG,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAME,iBAAiB,GAAG,SAAAA,CAAUC,kBAAkB,EAAEC,SAAS,EAAG;EACnE,MAAMC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vD,IAAI/B,kBAAkB,GAAGC,SAAS,CAACuC,GAAG,CAAE,UAAU5B,QAAQ,EAAG;IAC5D,OAAOD,oBAAoB,CAAEC,QAAQ,EAAEC,mBAAmB,EAAEC,oBAAoB,EAAEC,oBAAqB,CAAC;EACzG,CAAE,CAAC;EAEHd,SAAS,GAAGA,SAAS,CAACwC,MAAM,CAAE,UAAU7B,QAAQ,EAAG;IAClD,MAAMI,QAAQ,GAAG,IAAAE,oBAAW,EAAEN,QAAS,CAAC;IACxC,MAAMO,KAAK,GAAGJ,oBAAoB,GAAGA,oBAAoB,CAAEC,QAAS,CAAC,GAAG,IAAAI,iBAAQ,EAAEJ,QAAS,CAAC;IAC5F,OAAOG,KAAK,CAACE,MAAM,GAAG,CAAC;EACxB,CAAE,CAAC;EACHrB,kBAAkB,GAAG,IAAAyC,cAAM,EAAEzC,kBAAmB,CAAC;EAEjD,OAAOD,iBAAiB,CAAEC,kBAAkB,EAAEC,SAAU,CAAC;AAC1D","ignoreList":[]}
1
+ {"version":3,"file":"getSentenceBeginnings.js","names":["getWords","getSentences","stripSpaces","stripFullTags","stripTags","filter","forEach","isEmpty","removeHtmlBlocks","filterShortcodesFromHTML","stripNonTextTags","startsWithSameWord","currentSentenceBeginning","nextSentenceBeginning","compareFirstWords","sentenceBeginnings","sentences","consecutiveFirstWords","foundSentences","sameBeginnings","beginning","i","push","word","count","getSentenceBeginning","sentence","firstWordExceptions","secondWordExceptions","getWordsCustomHelper","stripped","words","test","length","firstWord","toLocaleLowerCase","indexOf","includes","paper","researcher","getConfig","getHelper","memoizedTokenizer","text","getText","_attributes","shortcodes","replace","map"],"sources":["../../../src/languageProcessing/researches/getSentenceBeginnings.js"],"sourcesContent":["import getWords from '../helpers/word/getWords.js';\nimport getSentences from '../helpers/sentence/getSentences';\nimport stripSpaces from '../helpers/sanitize/stripSpaces.js';\nimport {stripFullTags as stripTags} from '../helpers/sanitize/stripHTMLTags.js';\n\nimport {filter, forEach, isEmpty} from 'lodash';\nimport removeHtmlBlocks from '../helpers/html/htmlParser';\nimport {filterShortcodesFromHTML} from '../helpers';\nimport stripNonTextTags from '@axyseo/languageProcessing/helpers/sanitize/stripNonTextTags';\n\n/**\n * Compares the first word of each sentence with the first word of the following sentence.\n *\n * @param {string} currentSentenceBeginning The first word of the current sentence.\n * @param {string} nextSentenceBeginning The first word of the next sentence.\n * @returns {boolean} Returns true if sentence beginnings match.\n */\nconst startsWithSameWord = function(currentSentenceBeginning, nextSentenceBeginning) {\n return !isEmpty(currentSentenceBeginning) && currentSentenceBeginning === nextSentenceBeginning;\n};\n\n/**\n * Counts the number of similar sentence beginnings.\n *\n * @param {Array} sentenceBeginnings The array containing the first word of each sentence.\n * @param {Array} sentences The array containing all sentences.\n * @returns {Array} The array containing the objects containing the first words and the corresponding counts.\n */\nconst compareFirstWords = function(sentenceBeginnings, sentences) {\n const consecutiveFirstWords = [];\n let foundSentences = [];\n let sameBeginnings = 1;\n\n forEach(sentenceBeginnings, function(beginning, i) {\n const currentSentenceBeginning = beginning;\n const nextSentenceBeginning = sentenceBeginnings[i + 1];\n foundSentences.push(sentences[i]);\n\n if (startsWithSameWord(currentSentenceBeginning, nextSentenceBeginning)) {\n sameBeginnings++;\n } else {\n consecutiveFirstWords.push({\n word: currentSentenceBeginning,\n count: sameBeginnings,\n sentences: foundSentences\n });\n sameBeginnings = 1;\n foundSentences = [];\n }\n });\n\n return consecutiveFirstWords;\n};\n\n/**\n * Retrieves the first word from the sentence. If the first or second word is on an exception list of words that should not be considered as sentence\n * beginnings, the following word is also retrieved.\n *\n * @param {string} sentence The sentence to retrieve the first word from.\n * @param {Array} firstWordExceptions First word exceptions to match against.\n * @param {Array} secondWordExceptions Second word exceptions to match against.\n * @param {function}\tgetWordsCustomHelper The language-specific helper function to retrieve words from text.\n *\n * @returns {string} The first word of the sentence.\n */\nfunction getSentenceBeginning(\n sentence,\n firstWordExceptions,\n secondWordExceptions,\n getWordsCustomHelper\n) {\n const stripped = stripTags(stripSpaces(sentence));\n let words = getWordsCustomHelper ? getWordsCustomHelper(stripped) : getWords(stripped);\n\n words = words.filter(word => /^\\p{L}/u.test(word));\n\n if (words.length === 0) {\n return '';\n }\n\n let firstWord = words[0].toLocaleLowerCase();\n\n if (firstWordExceptions.indexOf(firstWord) > -1 && words.length > 1) {\n firstWord = firstWord + ' ' + words[1];\n if (secondWordExceptions) {\n if (secondWordExceptions.includes(words[1])) {\n firstWord = firstWord + ' ' + words[2];\n }\n }\n }\n\n return firstWord;\n}\n\n/**\n * Gets the first word of each sentence from the text, and returns an object containing the first word of each sentence and the corresponding counts.\n *\n * @param {Paper} paper The Paper object to get the text from.\n * @param {Researcher} researcher The researcher this research is a part of.\n *\n * @returns {Object} The object containing the first word of each sentence and the corresponding counts.\n */\nexport default function(paper, researcher) {\n const firstWordExceptions = researcher.getConfig('firstWordExceptions');\n const secondWordExceptions = researcher.getConfig('secondWordExceptions');\n const getWordsCustomHelper = researcher.getHelper('getWordsCustomHelper');\n const memoizedTokenizer = researcher.getHelper('memoizedTokenizer');\n\n let text = paper.getText();\n text = removeHtmlBlocks(text);\n text = stripNonTextTags(text);\n text = filterShortcodesFromHTML(text, paper._attributes && paper._attributes.shortcodes);\n\n // Remove any HTML whitespace padding and replace it with a single whitespace.\n text = text.replace(/[\\s\\n]+/g, ' ');\n\n // Exclude text inside tables.\n text = text.replace(/<figure class='wp-block-table'>.*<\\/figure>/gs, '');\n\n let sentences = getSentences(text, memoizedTokenizer);\n\n let sentenceBeginnings = sentences.map(function(sentence) {\n return getSentenceBeginning(\n sentence,\n firstWordExceptions,\n secondWordExceptions,\n getWordsCustomHelper\n );\n });\n\n sentences = sentences.filter(function(sentence) {\n const stripped = stripSpaces(sentence);\n const words = getWordsCustomHelper ? getWordsCustomHelper(stripped) : getWords(stripped);\n return words.length > 0;\n });\n sentenceBeginnings = filter(sentenceBeginnings);\n\n return compareFirstWords(sentenceBeginnings, sentences);\n}\n"],"mappings":"AAAA,OAAOA,QAAQ;AACf,OAAOC,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AAmB,CAAC;EAEnE,IAAIE,IAAI,GAAGL,KAAK,CAACM,OAAO,CAAC,CAAC;EAC1BD,IAAI,GAAGnC,gBAAgB,CAACmC,IAAI,CAAC;EAC7BA,IAAI,GAAGjC,gBAAgB,CAACiC,IAAI,CAAC;EAC7BA,IAAI,GAAGlC,wBAAwB,CAACkC,IAAI,EAAEL,KAAK,CAACO,WAAW,IAAIP,KAAK,CAACO,WAAW,CAACC,UAAU,CAAC;;EAExF;EACAH,IAAI,GAAGA,IAAI,CAACI,OAAO,CAAC,UAAU,EAAE,GAAG,CAAC;;EAEpC;EACAJ,IAAI,GAAGA,IAAI,CAACI,OAAO,CAAC,+CAA+C,EAAE,EAAE,CAAC;EAExE,IAAI/B,SAAS,GAAGf,YAAY,CAAC0C,IAAI,EAAED,iBAAiB,CAAC;EAErD,IAAI3B,kBAAkB,GAAGC,SAAS,CAACgC,GAAG,CAAC,UAAStB,QAAQ,EAAE;IACxD,OAAOD,oBAAoB,CACzBC,QAAQ,EACRC,mBAAmB,EACnBC,oBAAoB,EACpBC,oBACF,CAAC;EACH,CAAC,CAAC;EAEFb,SAAS,GAAGA,SAAS,CAACX,MAAM,CAAC,UAASqB,QAAQ,EAAE;IAC9C,MAAMI,QAAQ,GAAG5B,WAAW,CAACwB,QAAQ,CAAC;IACtC,MAAMK,KAAK,GAAGF,oBAAoB,GAAGA,oBAAoB,CAACC,QAAQ,CAAC,GAAG9B,QAAQ,CAAC8B,QAAQ,CAAC;IACxF,OAAOC,KAAK,CAACE,MAAM,GAAG,CAAC;EACzB,CAAC,CAAC;EACFlB,kBAAkB,GAAGV,MAAM,CAACU,kBAAkB,CAAC;EAE/C,OAAOD,iBAAiB,CAACC,kBAAkB,EAAEC,SAAS,CAAC;AACzD","ignoreList":[]}
@@ -1,15 +1,9 @@
1
- "use strict";
1
+ import getSubheadingTexts from "../helpers/html/getSubheadingTexts";
2
+ import countWords from "../helpers/word/countWords";
3
+ import { forEach } from "lodash";
4
+ import removeHtmlBlocks from "../helpers/html/htmlParser";
5
+ import { filterShortcodesFromHTML } from "../helpers";
2
6
 
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = _default;
7
- var _getSubheadingTexts = _interopRequireDefault(require("../helpers/html/getSubheadingTexts"));
8
- var _countWords = _interopRequireDefault(require("../helpers/word/countWords"));
9
- var _lodash = require("lodash");
10
- var _htmlParser = _interopRequireDefault(require("../helpers/html/htmlParser"));
11
- var _helpers = require("../helpers");
12
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
13
7
  /**
14
8
  * Gets the subheadings from the text and returns the length of these subheading in an array.
15
9
  *
@@ -18,20 +12,20 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
18
12
  *
19
13
  * @returns {Object} The object containing the array of found subheadings and the length of the text before the first subheading.
20
14
  */
21
- function _default(paper, researcher) {
15
+ export default function (paper, researcher) {
22
16
  let text = paper.getText();
23
- text = (0, _htmlParser.default)(text);
24
- text = (0, _helpers.filterShortcodesFromHTML)(text, paper._attributes && paper._attributes.shortcodes);
25
- const matches = (0, _getSubheadingTexts.default)(text);
17
+ text = removeHtmlBlocks(text);
18
+ text = filterShortcodesFromHTML(text, paper._attributes && paper._attributes.shortcodes);
19
+ const matches = getSubheadingTexts(text);
26
20
 
27
21
  // An optional custom helper to count length to use instead of countWords.
28
22
  const customCountLength = researcher.getHelper("customCountLength");
29
23
  const foundSubheadings = [];
30
- (0, _lodash.forEach)(matches, function (match) {
24
+ forEach(matches, function (match) {
31
25
  foundSubheadings.push({
32
26
  subheading: match.subheading,
33
27
  text: match.text,
34
- countLength: customCountLength ? customCountLength(match.text) : (0, _countWords.default)(match.text),
28
+ countLength: customCountLength ? customCountLength(match.text) : countWords(match.text),
35
29
  index: match.index
36
30
  });
37
31
  });
@@ -42,7 +36,7 @@ function _default(paper, researcher) {
42
36
  const firstSubheading = foundSubheadings[0];
43
37
  // Retrieve text preceding first subheading.
44
38
  textBeforeFirstSubheading = text.slice(0, firstSubheading.index);
45
- textBeforeFirstSubheadingLength = customCountLength ? customCountLength(textBeforeFirstSubheading) : (0, _countWords.default)(textBeforeFirstSubheading);
39
+ textBeforeFirstSubheadingLength = customCountLength ? customCountLength(textBeforeFirstSubheading) : countWords(textBeforeFirstSubheading);
46
40
  }
47
41
 
48
42
  // Check if there is a text before the first subheading.
@@ -1 +1 @@
1
- {"version":3,"file":"getSubheadingTextLengths.js","names":["_getSubheadingTexts","_interopRequireDefault","require","_countWords","_lodash","_htmlParser","_helpers","e","__esModule","default","_default","paper","researcher","text","getText","removeHtmlBlocks","filterShortcodesFromHTML","_attributes","shortcodes","matches","getSubheadingTexts","customCountLength","getHelper","foundSubheadings","forEach","match","push","subheading","countLength","countWords","index","textBeforeFirstSubheadingLength","textBeforeFirstSubheading","length","firstSubheading","slice","unshift"],"sources":["../../../src/languageProcessing/researches/getSubheadingTextLengths.js"],"sourcesContent":["import getSubheadingTexts from \"../helpers/html/getSubheadingTexts\";\nimport countWords from \"../helpers/word/countWords\";\nimport { forEach } from \"lodash\";\nimport removeHtmlBlocks from \"../helpers/html/htmlParser\";\nimport { filterShortcodesFromHTML } from \"../helpers\";\n\n/**\n * Gets the subheadings from the text and returns the length of these subheading in an array.\n *\n * @param {Paper} paper The Paper object to get the text from.\n * @param {Researcher} researcher The researcher to use for analysis.\n *\n * @returns {Object} The object containing the array of found subheadings and the length of the text before the first subheading.\n */\nexport default function( paper, researcher ) {\n\tlet text = paper.getText();\n\ttext = removeHtmlBlocks( text );\n\ttext = filterShortcodesFromHTML( text, paper._attributes && paper._attributes.shortcodes );\n\tconst matches = getSubheadingTexts( text );\n\n\t// An optional custom helper to count length to use instead of countWords.\n\tconst customCountLength = researcher.getHelper( \"customCountLength\" );\n\n\tconst foundSubheadings = [];\n\n\tforEach( matches, function( match ) {\n\t\tfoundSubheadings.push( {\n\t\t\tsubheading: match.subheading,\n\t\t\ttext: match.text,\n\t\t\tcountLength: customCountLength ? customCountLength( match.text ) : countWords( match.text ),\n\t\t\tindex: match.index,\n\t\t} );\n\t} );\n\n\tlet textBeforeFirstSubheadingLength = 0;\n\tlet textBeforeFirstSubheading = \"\";\n\tif ( foundSubheadings.length > 0 ) {\n\t\t// Find first subheading.\n\t\tconst firstSubheading = foundSubheadings[ 0 ];\n\t\t// Retrieve text preceding first subheading.\n\t\ttextBeforeFirstSubheading = text.slice( 0, firstSubheading.index );\n\t\ttextBeforeFirstSubheadingLength = customCountLength\n\t\t\t? customCountLength( textBeforeFirstSubheading )\n\t\t\t: countWords( textBeforeFirstSubheading );\n\t}\n\n\t// Check if there is a text before the first subheading.\n\tif ( textBeforeFirstSubheadingLength > 0 && textBeforeFirstSubheading !== \"\" ) {\n\t\t// Also add the text before the first subheading to the array.\n\t\tfoundSubheadings.unshift( {\n\t\t\t// Assign an empty string for the subheading for text that comes before the first subheading.\n\t\t\tsubheading: \"\",\n\t\t\ttext: textBeforeFirstSubheading,\n\t\t\tcountLength: textBeforeFirstSubheadingLength,\n\t\t} );\n\t}\n\n\treturn foundSubheadings;\n}\n"],"mappings":";;;;;;AAAA,IAAAA,mBAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,WAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,OAAA,GAAAF,OAAA;AACA,IAAAG,WAAA,GAAAJ,sBAAA,CAAAC,OAAA;AACA,IAAAI,QAAA,GAAAJ,OAAA;AAAsD,SAAAD,uBAAAM,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAEtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACe,SAAAG,SAAUC,KAAK,EAAEC,UAAU,EAAG;EAC5C,IAAIC,IAAI,GAAGF,KAAK,CAACG,OAAO,CAAC,CAAC;EAC1BD,IAAI,GAAG,IAAAE,mBAAgB,EAAEF,IAAK,CAAC;EAC/BA,IAAI,GAAG,IAAAG,iCAAwB,EAAEH,IAAI,EAAE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AAgB;AACxB","ignoreList":[]}
1
+ {"version":3,"file":"getSubheadingTextLengths.js","names":["getSubheadingTexts","countWords","forEach","removeHtmlBlocks","filterShortcodesFromHTML","paper","researcher","text","getText","_attributes","shortcodes","matches","customCountLength","getHelper","foundSubheadings","match","push","subheading","countLength","index","textBeforeFirstSubheadingLength","textBeforeFirstSubheading","length","firstSubheading","slice","unshift"],"sources":["../../../src/languageProcessing/researches/getSubheadingTextLengths.js"],"sourcesContent":["import getSubheadingTexts from \"../helpers/html/getSubheadingTexts\";\nimport countWords from \"../helpers/word/countWords\";\nimport { forEach } from \"lodash\";\nimport removeHtmlBlocks from \"../helpers/html/htmlParser\";\nimport { filterShortcodesFromHTML } from \"../helpers\";\n\n/**\n * Gets the subheadings from the text and returns the length of these subheading in an array.\n *\n * @param {Paper} paper The Paper object to get the text from.\n * @param {Researcher} researcher The researcher to use for analysis.\n *\n * @returns {Object} The object containing the array of found subheadings and the length of the text before the first subheading.\n */\nexport default function( paper, researcher ) {\n\tlet text = paper.getText();\n\ttext = removeHtmlBlocks( text );\n\ttext = filterShortcodesFromHTML( text, paper._attributes && paper._attributes.shortcodes );\n\tconst matches = getSubheadingTexts( text );\n\n\t// An optional custom helper to count length to use instead of countWords.\n\tconst customCountLength = researcher.getHelper( \"customCountLength\" );\n\n\tconst foundSubheadings = [];\n\n\tforEach( matches, function( match ) {\n\t\tfoundSubheadings.push( {\n\t\t\tsubheading: match.subheading,\n\t\t\ttext: match.text,\n\t\t\tcountLength: customCountLength ? customCountLength( match.text ) : countWords( match.text ),\n\t\t\tindex: match.index,\n\t\t} );\n\t} );\n\n\tlet textBeforeFirstSubheadingLength = 0;\n\tlet textBeforeFirstSubheading = \"\";\n\tif ( foundSubheadings.length > 0 ) {\n\t\t// Find first subheading.\n\t\tconst firstSubheading = foundSubheadings[ 0 ];\n\t\t// Retrieve text preceding first subheading.\n\t\ttextBeforeFirstSubheading = text.slice( 0, firstSubheading.index );\n\t\ttextBeforeFirstSubheadingLength = customCountLength\n\t\t\t? customCountLength( textBeforeFirstSubheading )\n\t\t\t: countWords( textBeforeFirstSubheading );\n\t}\n\n\t// Check if there is a text before the first subheading.\n\tif ( textBeforeFirstSubheadingLength > 0 && textBeforeFirstSubheading !== \"\" ) {\n\t\t// Also add the text before the first subheading to the array.\n\t\tfoundSubheadings.unshift( {\n\t\t\t// Assign an empty string for the subheading for text that comes before the first subheading.\n\t\t\tsubheading: \"\",\n\t\t\ttext: textBeforeFirstSubheading,\n\t\t\tcountLength: textBeforeFirstSubheadingLength,\n\t\t} );\n\t}\n\n\treturn foundSubheadings;\n}\n"],"mappings":"AAAA,OAAOA,kBAAkB;AACzB,OAAOC,UAAU;AACjB,SAASC,OAAO,QAAQ,QAAQ;AAChC,OAAOC,gBAAgB;AACvB,SAASC,wBAAwB;;AAEjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,UAAUC,KAAK,EAAEC,UAAU,EAAG;EAC5C,IAAIC,IAAI,GAAGF,KAAK,CAACG,OAAO,CAAC,CAAC;EAC1BD,IAAI,GAAGJ,gBAAgB,CAAEI,IAAK,CAAC;EAC/BA,IAAI,GAAGH,wBAAwB,CAAEG,IAAI,EAAEF,KAAK,CAACI,WAAW,IAAIJ,KAAK,CAACI,WAAW,CAACC,UAAW,CAAC;EAC1F,MAAMC,OAAO,GAAGX,kBAAkB,CAAEO,IAAK,CAAC;;EAE1C;EACA,MAAMK,iBAAiB,GAAGN,UAAU,CAACO,SAAS,CAAE,mBAAoB,CAAC;EAErE,MAAMC,gBAAgB,GAAG,EAAE;EAE3BZ,OAAO,CAAES,OAAO,EAAE,UAAUI,KAAK,EAAG;IACnCD,gBAAgB,CAACE,IAAI,CAAE;MACtBC,UAAU,EAAEF,KAAK,CAACE,UAAU;MAC5BV,IAAI,EAAEQ,KAAK,CAACR,IAAI;MAChBW,WAAW,EAAEN,iBAAiB,GAAGA,iBAAiB,CAAEG,KAAK,CAACR,IAAK,CAAC,GAAGN,UAAU,CAAEc,KAAK,CAACR,IAAK,CAAC;MAC3FY,KAAK,EAAEJ,KAAK,CAACI;IACd,CAAE,CAAC;EACJ,CAAE,CAAC;EAEH,IAAIC,+BAA+B,GAAG,CAAC;EACvC,IAAIC,yBAAyB,GAAG,EAAE;EAClC,IAAKP,gBAAgB,CAACQ,MAAM,GAAG,CAAC,EAAG;IAClC;IACA,MAAMC,eAAe,GAAIT,gBAAgB,CAAE,CAAC,CAAE;IAC9C;IACAO,yBAAyB,GAAGd,IAAI,CAACiB,KAAK,CAAE,CAAC,EAAED,eAAe,CAACJ,KAAM,CAAC;IAClEC,+BAA+B,GAAGR,iBAAiB,GAChDA,iBAAiB,CAAES,yBAA0B,CAAC,GAC9CpB,UAAU,CAAEoB,yBAA0B,CAAC;EAC3C;;EAEA;EACA,IAAKD,+BAA+B,GAAG,CAAC,IAAIC,yBAAyB,KAAK,EAAE,EAAG;IAC9E;IACAP,gBAAgB,CAACW,OAAO,CAAE;MACzB;MACAR,UAAU,EAAE,EAAE;MACdV,IAAI,EAAEc,yBAAyB;MAC/BH,WAAW,EAAEE;IACd,CAAE,CAAC;EACJ;EAEA,OAAON,gBAAgB;AACxB","ignoreList":[]}
@@ -1,15 +1,9 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = _default;
7
- var _quotes = require("../helpers/sanitize/quotes");
8
- var _buildTopicStems = require("../helpers/morphology/buildTopicStems");
9
- var _lodash = require("lodash");
10
- var _getAllWordsFromPaper = _interopRequireDefault(require("../helpers/morphology/getAllWordsFromPaper"));
11
- var _parseSynonyms = _interopRequireDefault(require("../helpers/sanitize/parseSynonyms"));
12
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
1
+ import { normalizeSingle } from "../helpers/sanitize/quotes";
2
+ import { collectStems, StemOriginalPair } from "../helpers/morphology/buildTopicStems";
3
+ import { escapeRegExp, flattenDeep } from "lodash";
4
+ import getAllWordsFromPaper from "../helpers/morphology/getAllWordsFromPaper";
5
+ import parseSynonyms from "../helpers/sanitize/parseSynonyms";
6
+
13
7
  /**
14
8
  * A stem with accompanying forms.
15
9
  *
@@ -47,7 +41,7 @@ function Result(keyphraseForms = [], synonymsForms = []) {
47
41
  */
48
42
  function replaceStemWithForms(stemOriginalPair, paperWordsGroupedByStems, createBasicWordForms) {
49
43
  const matchingStemFormPair = paperWordsGroupedByStems.find(element => element.stem === stemOriginalPair.stem);
50
- const originalSanitized = (0, _quotes.normalizeSingle)((0, _lodash.escapeRegExp)(stemOriginalPair.original));
44
+ const originalSanitized = normalizeSingle(escapeRegExp(stemOriginalPair.original));
51
45
  const forms = matchingStemFormPair ? [originalSanitized, ...matchingStemFormPair.forms] : [originalSanitized];
52
46
 
53
47
  // Add extra forms for languages for which we have basic word form support.
@@ -73,7 +67,7 @@ function replaceStemWithForms(stemOriginalPair, paperWordsGroupedByStems, create
73
67
  function extractStems(keyphrase, synonyms) {
74
68
  const keyphraseStemsOnly = keyphrase.stemOriginalPairs.length === 0 ? [] : keyphrase.getStems();
75
69
  const synonymsStemsOnly = synonyms.length === 0 ? [] : synonyms.map(topicPhrase => topicPhrase.getStems());
76
- return [...keyphraseStemsOnly, ...(0, _lodash.flattenDeep)(synonymsStemsOnly)];
70
+ return [...keyphraseStemsOnly, ...flattenDeep(synonymsStemsOnly)];
77
71
  }
78
72
 
79
73
  /**
@@ -114,7 +108,7 @@ function constructTopicPhraseResult(topicPhrase, paperWordsGroupedByStems, creat
114
108
  * found in the text or created forms.
115
109
  */
116
110
  function getWordForms(keyphrase, synonyms, allWordsFromPaper, functionWords, stemmer, createBasicWordForms, areHyphensWordBoundaries) {
117
- const topicPhrases = (0, _buildTopicStems.collectStems)(keyphrase, synonyms, stemmer, functionWords, areHyphensWordBoundaries);
111
+ const topicPhrases = collectStems(keyphrase, synonyms, stemmer, functionWords, areHyphensWordBoundaries);
118
112
  const keyphraseStemmed = topicPhrases.keyphraseStems;
119
113
  const synonymsStemmed = topicPhrases.synonymsStems;
120
114
 
@@ -139,7 +133,7 @@ function getWordForms(keyphrase, synonyms, allWordsFromPaper, functionWords, ste
139
133
  const paperWords = [...new Set(allWordsFromPaper.filter(word => !functionWords.includes(word)))];
140
134
 
141
135
  // Add stems to words from the paper, filter out all forms that aren't in the keyphrase or synonyms and order alphabetically.
142
- const paperWordsWithStems = paperWords.map(word => new _buildTopicStems.StemOriginalPair(stemmer(word), word)).filter(stemOriginalPair => topicStemsFlat.includes(stemOriginalPair.stem)).sort((a, b) => a.stem.localeCompare(b.stem));
136
+ const paperWordsWithStems = paperWords.map(word => new StemOriginalPair(stemmer(word), word)).filter(stemOriginalPair => topicStemsFlat.includes(stemOriginalPair.stem)).sort((a, b) => a.stem.localeCompare(b.stem));
143
137
 
144
138
  // Group word-stem pairs from the paper by stems.
145
139
  const paperWordsGroupedByStems = paperWordsWithStems.reduce(function (accumulator, stemOriginalPair) {
@@ -163,7 +157,7 @@ function getWordForms(keyphrase, synonyms, allWordsFromPaper, functionWords, ste
163
157
  * @returns {Object} Object with an array of keyphrase forms and an array of arrays of synonyms forms, based on the forms
164
158
  * found in the text or created forms.
165
159
  */
166
- function _default(paper, researcher) {
160
+ export default function (paper, researcher) {
167
161
  const functionWords = researcher.getConfig("functionWords");
168
162
  const stemmer = researcher.getHelper("getStemmer")(researcher);
169
163
  const createBasicWordForms = researcher.getHelper("createBasicWordForms");
@@ -175,9 +169,9 @@ function _default(paper, researcher) {
175
169
  * This is why we don't split words on hyphens in Indonesian and we consider 'buku-buku' as one word rather than two.
176
170
  */
177
171
  const areHyphensWordBoundaries = researcher.getConfig("areHyphensWordBoundaries");
178
- const allWordsFromPaper = (0, _getAllWordsFromPaper.default)(paper, areHyphensWordBoundaries).map(word => word.toLocaleLowerCase(language));
172
+ const allWordsFromPaper = getAllWordsFromPaper(paper, areHyphensWordBoundaries).map(word => word.toLocaleLowerCase(language));
179
173
  const keyphrase = paper.getKeyword().toLocaleLowerCase(language).trim();
180
- const synonyms = (0, _parseSynonyms.default)(paper.getSynonyms().toLocaleLowerCase(language).trim());
174
+ const synonyms = parseSynonyms(paper.getSynonyms().toLocaleLowerCase(language).trim());
181
175
  return getWordForms(keyphrase, synonyms, allWordsFromPaper, functionWords, stemmer, createBasicWordForms, areHyphensWordBoundaries);
182
176
  }
183
177
  //# sourceMappingURL=getWordForms.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"getWordForms.js","names":["_quotes","require","_buildTopicStems","_lodash","_getAllWordsFromPaper","_interopRequireDefault","_parseSynonyms","e","__esModule","default","StemWithForms","stem","forms","Result","keyphraseForms","synonymsForms","replaceStemWithForms","stemOriginalPair","paperWordsGroupedByStems","createBasicWordForms","matchingStemFormPair","find","element","originalSanitized","normalizeSingle","escapeRegExp","original","push","Set","extractStems","keyphrase","synonyms","keyphraseStemsOnly","stemOriginalPairs","length","getStems","synonymsStemsOnly","map","topicPhrase","flattenDeep","constructTopicPhraseResult","exactMatch","getWordForms","allWordsFromPaper","functionWords","stemmer","areHyphensWordBoundaries","topicPhrases","collectStems","keyphraseStemmed","keyphraseStems","synonymsStemmed","synonymsStems","allTopicPhrases","every","synonym","topicStemsFlat","paperWords","filter","word","includes","paperWordsWithStems","StemOriginalPair","sort","a","b","localeCompare","reduce","accumulator","lastItem","_default","paper","researcher","getConfig","getHelper","language","getAllWordsFromPaper","toLocaleLowerCase","getKeyword","trim","parseSynonyms","getSynonyms"],"sources":["../../../src/languageProcessing/researches/getWordForms.js"],"sourcesContent":["import { normalizeSingle } from \"../helpers/sanitize/quotes\";\nimport { collectStems, StemOriginalPair } from \"../helpers/morphology/buildTopicStems\";\n\nimport { escapeRegExp, flattenDeep } from \"lodash\";\nimport getAllWordsFromPaper from \"../helpers/morphology/getAllWordsFromPaper\";\nimport parseSynonyms from \"../helpers/sanitize/parseSynonyms\";\n\n/**\n * A stem with accompanying forms.\n *\n * @param {string} stem The word stem.\n * @param {string[]} forms The word forms for the stem.\n *\n * @constructor\n */\nfunction StemWithForms( stem, forms ) {\n\tthis.stem = stem;\n\tthis.forms = forms;\n}\n\n/**\n * A result for all topic forms.\n *\n * @param {Array[]} keyphraseForms All keyphrase forms.\n * @param {Array[]} synonymsForms All synonym forms.\n * @constructor\n */\nfunction Result( keyphraseForms = [], synonymsForms = [] ) {\n\tthis.keyphraseForms = keyphraseForms;\n\tthis.synonymsForms = synonymsForms;\n}\n\n/**\n * Takes a stem-original pair and returns the accompanying forms for the stem that were found in the paper. Additionally\n * adds a sanitized version of the original word and (for specific languages) creates basic word forms.\n *\n * @param {StemOriginalPair} stemOriginalPair The stem-original pair for which to get forms.\n * @param {StemWithForms[]} paperWordsGroupedByStems All word forms in the paper grouped by stem.\n * @param {Function|null} createBasicWordForms A function to create basic word forms (if available).\n *\n * @returns {string[]} All forms found in the paper for the given stem, plus a sanitized version of the original word.\n */\nfunction replaceStemWithForms( stemOriginalPair, paperWordsGroupedByStems, createBasicWordForms ) {\n\tconst matchingStemFormPair = paperWordsGroupedByStems.find( element => element.stem === stemOriginalPair.stem );\n\tconst originalSanitized = normalizeSingle( escapeRegExp( stemOriginalPair.original ) );\n\n\tconst forms = matchingStemFormPair\n\t\t? [ originalSanitized, ...matchingStemFormPair.forms ]\n\t\t: [ originalSanitized ];\n\n\t// Add extra forms for languages for which we have basic word form support.\n\tif ( createBasicWordForms ) {\n\t\tforms.push( ...createBasicWordForms( stemOriginalPair.original ) );\n\t}\n\n\t/*\n\t * Return original and found or created forms.\n\t * Only return original if no matching forms were found in the text and no forms could be created.\n\t */\n\treturn [ ... new Set( forms ) ];\n}\n\n/**\n * Extracts the stems from all keyphrase and synonym stems.\n *\n * @param {TopicPhrase} keyphrase A topic phrase.\n * @param {TopicPhrase[]} synonyms An array of topic phrases.\n *\n * @returns {string[]} All word stems of they keyphrase and synonyms.\n */\nfunction extractStems( keyphrase, synonyms ) {\n\tconst keyphraseStemsOnly = keyphrase.stemOriginalPairs.length === 0\n\t\t? []\n\t\t: keyphrase.getStems();\n\n\tconst synonymsStemsOnly = synonyms.length === 0\n\t\t? []\n\t\t: synonyms.map( topicPhrase => topicPhrase.getStems() );\n\n\treturn ( [ ...keyphraseStemsOnly, ...flattenDeep( synonymsStemsOnly ) ] );\n}\n\n/**\n * Constructs the result with forms for a topic phrase (i.e., a keyphrase or a synonym).\n *\n * @param {TopicPhrase} topicPhrase The topic phrase for which to construct the result.\n * @param {StemWithForms[]} paperWordsGroupedByStems All word forms in the paper grouped by stem.\n * @param {Function|null} createBasicWordForms A function to create basic word forms (if available).\n *\n * @returns {Array.<string[]>} The word forms for a given topic phrase, grouped by original topic phrase word.\n */\nfunction constructTopicPhraseResult( topicPhrase, paperWordsGroupedByStems, createBasicWordForms ) {\n\t// Empty result for an empty topic phrase.\n\tif ( topicPhrase.stemOriginalPairs.length === 0 ) {\n\t\treturn [];\n\t}\n\n\tif ( topicPhrase.exactMatch ) {\n\t\treturn [ [ topicPhrase.stemOriginalPairs[ 0 ].stem ] ];\n\t}\n\n\treturn topicPhrase.stemOriginalPairs.map( function( stemOriginalPair ) {\n\t\treturn replaceStemWithForms( stemOriginalPair, paperWordsGroupedByStems, createBasicWordForms );\n\t} );\n}\n\n/**\n * Gets all matching word forms for the keyphrase and synonyms. Stems are either collected from\n * the paper or, for specific languages, directly created.\n *\n * @param {string} keyphrase \tThe keyphrase.\n * @param {string[]} synonyms \tThe synonyms.\n * @param {string[]} allWordsFromPaper \tAll words found in the paper.\n * @param {string[]} functionWords \tThe function words for a given language (if available).\n * @param {Function|null} stemmer \tA stemmer (if available).\n * @param {Function|null} createBasicWordForms \tA function to create basic word forms (if available).\n * @param {boolean} \t\tareHyphensWordBoundaries\tWhether hyphens should be treated as word boundaries.\n\n * @returns {Object} Object with an array of keyphrase forms and an array of arrays of synonyms forms, based on the forms\n * found in the text or created forms.\n */\nfunction getWordForms( keyphrase, synonyms, allWordsFromPaper, functionWords, stemmer, createBasicWordForms, areHyphensWordBoundaries ) {\n\tconst topicPhrases = collectStems( keyphrase, synonyms, stemmer, functionWords, areHyphensWordBoundaries );\n\tconst keyphraseStemmed = topicPhrases.keyphraseStems;\n\tconst synonymsStemmed = topicPhrases.synonymsStems;\n\n\t// Return an empty result when no keyphrase and synonyms have been set.\n\tif ( keyphraseStemmed.stemOriginalPairs.length === 0 && synonymsStemmed.length === 0 ) {\n\t\treturn new Result();\n\t}\n\n\t// Return exact match if all topic phrases contain exact match. Forms don't need to be built in that case.\n\tconst allTopicPhrases = [ keyphraseStemmed, ...synonymsStemmed ];\n\n\tif ( allTopicPhrases.every( topicPhrase => topicPhrase.exactMatch === true ) ) {\n\t\treturn new Result(\n\t\t\t[ [ keyphraseStemmed.stemOriginalPairs[ 0 ].stem ] ],\n\t\t\tsynonymsStemmed.map( synonym => [ [ synonym.stemOriginalPairs[ 0 ].stem ] ]\n\t\t\t)\n\t\t);\n\t}\n\n\t// Get all stems from the keyphrase and synonyms.\n\tconst topicStemsFlat = [ ... new Set( extractStems( keyphraseStemmed, synonymsStemmed ) ) ];\n\n\t/*\n\t * Get all words from the paper text, title, meta description and slug.\n\t * Filter duplicates and function words.\n\t */\n\tconst paperWords = [ ... new Set( allWordsFromPaper.filter( word => ! functionWords.includes( word ) ) ) ];\n\n\t// Add stems to words from the paper, filter out all forms that aren't in the keyphrase or synonyms and order alphabetically.\n\tconst paperWordsWithStems = paperWords\n\t\t.map( word => new StemOriginalPair( stemmer( word ), word ) )\n\t\t.filter( stemOriginalPair => topicStemsFlat.includes( stemOriginalPair.stem ) )\n\t\t.sort( ( a, b ) => a.stem.localeCompare( b.stem ) );\n\n\t// Group word-stem pairs from the paper by stems.\n\tconst paperWordsGroupedByStems = paperWordsWithStems.reduce( function( accumulator, stemOriginalPair ) {\n\t\tconst lastItem = accumulator[ accumulator.length - 1 ];\n\n\t\tif ( accumulator.length === 0 || lastItem.stem !== stemOriginalPair.stem ) {\n\t\t\taccumulator.push( new StemWithForms( stemOriginalPair.stem, [ stemOriginalPair.original ] ) );\n\t\t} else {\n\t\t\tlastItem.forms.push( stemOriginalPair.original );\n\t\t}\n\n\t\treturn accumulator;\n\t}, [] );\n\n\treturn new Result(\n\t\tconstructTopicPhraseResult( keyphraseStemmed, paperWordsGroupedByStems, createBasicWordForms ),\n\t\tsynonymsStemmed.map( synonym => constructTopicPhraseResult( synonym, paperWordsGroupedByStems, createBasicWordForms ) )\n\t);\n}\n\n/**\n * Gets all matching word forms for the keyphrase and synonyms.\n *\n * @param {Paper} paper \tThe paper.\n * @param {Researcher} researcher \tThe researcher.\n *\n * @returns {Object} Object with an array of keyphrase forms and an array of arrays of synonyms forms, based on the forms\n * found in the text or created forms.\n */\nexport default function( paper, researcher ) {\n\tconst functionWords = researcher.getConfig( \"functionWords\" );\n\tconst stemmer = researcher.getHelper( \"getStemmer\" )( researcher );\n\tconst createBasicWordForms = researcher.getHelper( \"createBasicWordForms\" );\n\tconst language = researcher.getConfig( \"language\" );\n\t/*\n\t * Whether we want to split words on hyphens depends on the language.\n\t * In all languages apart from Indonesian, we consider hyphens as word boundaries. But in Indonesian, hyphens are used\n\t * to form plural forms of nouns, e.g. 'buku' is the singular form for 'book' and 'buku-buku' is the plural form.\n\t * This is why we don't split words on hyphens in Indonesian and we consider 'buku-buku' as one word rather than two.\n\t */\n\tconst areHyphensWordBoundaries = researcher.getConfig( \"areHyphensWordBoundaries\" );\n\n\tconst allWordsFromPaper = getAllWordsFromPaper( paper, areHyphensWordBoundaries ).map( word => word.toLocaleLowerCase( language ) );\n\tconst keyphrase = paper.getKeyword().toLocaleLowerCase( language ).trim();\n\tconst synonyms = parseSynonyms( paper.getSynonyms().toLocaleLowerCase( language ).trim() );\n\n\treturn getWordForms( keyphrase, synonyms, allWordsFromPaper, functionWords, stemmer, createBasicWordForms, areHyphensWordBoundaries );\n}\n"],"mappings":";;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,gBAAA,GAAAD,OAAA;AAEA,IAAAE,OAAA,GAAAF,OAAA;AACA,IAAAG,qBAAA,GAAAC,sBAAA,CAAAJ,OAAA;AACA,IAAAK,cAAA,G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,UAAU,CAACE,SAAS,CAAE,sBAAuB,CAAC;EAC3E,MAAMC,QAAQ,GAAGH,UAAU,CAACC,SAAS,CAAE,UAAW,CAAC;EACnD;AACD;AACA;AACA;AACA;AACA;EACC,MAAM3B,wBAAwB,GAAG0B,UAAU,CAACC,SAAS,CAAE,0BAA2B,CAAC;EAEnF,MAAM9B,iBAAiB,GAAG,IAAAiC,6BAAoB,EAAEL,KAAK,EAAEzB,wBAAyB,CAAC,CAACT,GAAG,CAAEsB,IAAI,IAAIA,IAAI,CAACkB,iBAAiB,CAAEF,QAAS,CAAE,CAAC;EACnI,MAAM7C,SAAS,GAAGyC,KAAK,CAACO,UAAU,CAAC,CAAC,CAACD,iBAAiB,CAAEF,QAAS,CAAC,CAACI,IAAI,CAAC,CAAC;EACzE,MAAMhD,QAAQ,GAAG,IAAAiD,sBAAa,EAAET,KAAK,CAACU,WAAW,CAAC,CAAC,CAACJ,iBAAiB,CAAEF,QAAS,CAAC,CAACI,IAAI,CAAC,CAAE,CAAC;EAE1F,OAAOrC,YAAY,CAAEZ,SAAS,EAAEC,QAAQ,EAAEY,iBAAiB,EAAEC,aAAa,EAAEC,OAAO,EAAE1B,oBAAoB,EAAE2B,wBAAyB,CAAC;AACtI","ignoreList":[]}
1
+ {"version":3,"file":"getWordForms.js","names":["normalizeSingle","collectStems","StemOriginalPair","escapeRegExp","flattenDeep","getAllWordsFromPaper","parseSynonyms","StemWithForms","stem","forms","Result","keyphraseForms","synonymsForms","replaceStemWithForms","stemOriginalPair","paperWordsGroupedByStems","createBasicWordForms","matchingStemFormPair","find","element","originalSanitized","original","push","Set","extractStems","keyphrase","synonyms","keyphraseStemsOnly","stemOriginalPairs","length","getStems","synonymsStemsOnly","map","topicPhrase","constructTopicPhraseResult","exactMatch","getWordForms","allWordsFromPaper","functionWords","stemmer","areHyphensWordBoundaries","topicPhrases","keyphraseStemmed","keyphraseStems","synonymsStemmed","synonymsStems","allTopicPhrases","every","synonym","topicStemsFlat","paperWords","filter","word","includes","paperWordsWithStems","sort","a","b","localeCompare","reduce","accumulator","lastItem","paper","researcher","getConfig","getHelper","language","toLocaleLowerCase","getKeyword","trim","getSynonyms"],"sources":["../../../src/languageProcessing/researches/getWordForms.js"],"sourcesContent":["import { normalizeSingle } from \"../helpers/sanitize/quotes\";\nimport { collectStems, StemOriginalPair } from \"../helpers/morphology/buildTopicStems\";\n\nimport { escapeRegExp, flattenDeep } from \"lodash\";\nimport getAllWordsFromPaper from \"../helpers/morphology/getAllWordsFromPaper\";\nimport parseSynonyms from \"../helpers/sanitize/parseSynonyms\";\n\n/**\n * A stem with accompanying forms.\n *\n * @param {string} stem The word stem.\n * @param {string[]} forms The word forms for the stem.\n *\n * @constructor\n */\nfunction StemWithForms( stem, forms ) {\n\tthis.stem = stem;\n\tthis.forms = forms;\n}\n\n/**\n * A result for all topic forms.\n *\n * @param {Array[]} keyphraseForms All keyphrase forms.\n * @param {Array[]} synonymsForms All synonym forms.\n * @constructor\n */\nfunction Result( keyphraseForms = [], synonymsForms = [] ) {\n\tthis.keyphraseForms = keyphraseForms;\n\tthis.synonymsForms = synonymsForms;\n}\n\n/**\n * Takes a stem-original pair and returns the accompanying forms for the stem that were found in the paper. Additionally\n * adds a sanitized version of the original word and (for specific languages) creates basic word forms.\n *\n * @param {StemOriginalPair} stemOriginalPair The stem-original pair for which to get forms.\n * @param {StemWithForms[]} paperWordsGroupedByStems All word forms in the paper grouped by stem.\n * @param {Function|null} createBasicWordForms A function to create basic word forms (if available).\n *\n * @returns {string[]} All forms found in the paper for the given stem, plus a sanitized version of the original word.\n */\nfunction replaceStemWithForms( stemOriginalPair, paperWordsGroupedByStems, createBasicWordForms ) {\n\tconst matchingStemFormPair = paperWordsGroupedByStems.find( element => element.stem === stemOriginalPair.stem );\n\tconst originalSanitized = normalizeSingle( escapeRegExp( stemOriginalPair.original ) );\n\n\tconst forms = matchingStemFormPair\n\t\t? [ originalSanitized, ...matchingStemFormPair.forms ]\n\t\t: [ originalSanitized ];\n\n\t// Add extra forms for languages for which we have basic word form support.\n\tif ( createBasicWordForms ) {\n\t\tforms.push( ...createBasicWordForms( stemOriginalPair.original ) );\n\t}\n\n\t/*\n\t * Return original and found or created forms.\n\t * Only return original if no matching forms were found in the text and no forms could be created.\n\t */\n\treturn [ ... new Set( forms ) ];\n}\n\n/**\n * Extracts the stems from all keyphrase and synonym stems.\n *\n * @param {TopicPhrase} keyphrase A topic phrase.\n * @param {TopicPhrase[]} synonyms An array of topic phrases.\n *\n * @returns {string[]} All word stems of they keyphrase and synonyms.\n */\nfunction extractStems( keyphrase, synonyms ) {\n\tconst keyphraseStemsOnly = keyphrase.stemOriginalPairs.length === 0\n\t\t? []\n\t\t: keyphrase.getStems();\n\n\tconst synonymsStemsOnly = synonyms.length === 0\n\t\t? []\n\t\t: synonyms.map( topicPhrase => topicPhrase.getStems() );\n\n\treturn ( [ ...keyphraseStemsOnly, ...flattenDeep( synonymsStemsOnly ) ] );\n}\n\n/**\n * Constructs the result with forms for a topic phrase (i.e., a keyphrase or a synonym).\n *\n * @param {TopicPhrase} topicPhrase The topic phrase for which to construct the result.\n * @param {StemWithForms[]} paperWordsGroupedByStems All word forms in the paper grouped by stem.\n * @param {Function|null} createBasicWordForms A function to create basic word forms (if available).\n *\n * @returns {Array.<string[]>} The word forms for a given topic phrase, grouped by original topic phrase word.\n */\nfunction constructTopicPhraseResult( topicPhrase, paperWordsGroupedByStems, createBasicWordForms ) {\n\t// Empty result for an empty topic phrase.\n\tif ( topicPhrase.stemOriginalPairs.length === 0 ) {\n\t\treturn [];\n\t}\n\n\tif ( topicPhrase.exactMatch ) {\n\t\treturn [ [ topicPhrase.stemOriginalPairs[ 0 ].stem ] ];\n\t}\n\n\treturn topicPhrase.stemOriginalPairs.map( function( stemOriginalPair ) {\n\t\treturn replaceStemWithForms( stemOriginalPair, paperWordsGroupedByStems, createBasicWordForms );\n\t} );\n}\n\n/**\n * Gets all matching word forms for the keyphrase and synonyms. Stems are either collected from\n * the paper or, for specific languages, directly created.\n *\n * @param {string} keyphrase \tThe keyphrase.\n * @param {string[]} synonyms \tThe synonyms.\n * @param {string[]} allWordsFromPaper \tAll words found in the paper.\n * @param {string[]} functionWords \tThe function words for a given language (if available).\n * @param {Function|null} stemmer \tA stemmer (if available).\n * @param {Function|null} createBasicWordForms \tA function to create basic word forms (if available).\n * @param {boolean} \t\tareHyphensWordBoundaries\tWhether hyphens should be treated as word boundaries.\n\n * @returns {Object} Object with an array of keyphrase forms and an array of arrays of synonyms forms, based on the forms\n * found in the text or created forms.\n */\nfunction getWordForms( keyphrase, synonyms, allWordsFromPaper, functionWords, stemmer, createBasicWordForms, areHyphensWordBoundaries ) {\n\tconst topicPhrases = collectStems( keyphrase, synonyms, stemmer, functionWords, areHyphensWordBoundaries );\n\tconst keyphraseStemmed = topicPhrases.keyphraseStems;\n\tconst synonymsStemmed = topicPhrases.synonymsStems;\n\n\t// Return an empty result when no keyphrase and synonyms have been set.\n\tif ( keyphraseStemmed.stemOriginalPairs.length === 0 && synonymsStemmed.length === 0 ) {\n\t\treturn new Result();\n\t}\n\n\t// Return exact match if all topic phrases contain exact match. Forms don't need to be built in that case.\n\tconst allTopicPhrases = [ keyphraseStemmed, ...synonymsStemmed ];\n\n\tif ( allTopicPhrases.every( topicPhrase => topicPhrase.exactMatch === true ) ) {\n\t\treturn new Result(\n\t\t\t[ [ keyphraseStemmed.stemOriginalPairs[ 0 ].stem ] ],\n\t\t\tsynonymsStemmed.map( synonym => [ [ synonym.stemOriginalPairs[ 0 ].stem ] ]\n\t\t\t)\n\t\t);\n\t}\n\n\t// Get all stems from the keyphrase and synonyms.\n\tconst topicStemsFlat = [ ... new Set( extractStems( keyphraseStemmed, synonymsStemmed ) ) ];\n\n\t/*\n\t * Get all words from the paper text, title, meta description and slug.\n\t * Filter duplicates and function words.\n\t */\n\tconst paperWords = [ ... new Set( allWordsFromPaper.filter( word => ! functionWords.includes( word ) ) ) ];\n\n\t// Add stems to words from the paper, filter out all forms that aren't in the keyphrase or synonyms and order alphabetically.\n\tconst paperWordsWithStems = paperWords\n\t\t.map( word => new StemOriginalPair( stemmer( word ), word ) )\n\t\t.filter( stemOriginalPair => topicStemsFlat.includes( stemOriginalPair.stem ) )\n\t\t.sort( ( a, b ) => a.stem.localeCompare( b.stem ) );\n\n\t// Group word-stem pairs from the paper by stems.\n\tconst paperWordsGroupedByStems = paperWordsWithStems.reduce( function( accumulator, stemOriginalPair ) {\n\t\tconst lastItem = accumulator[ accumulator.length - 1 ];\n\n\t\tif ( accumulator.length === 0 || lastItem.stem !== stemOriginalPair.stem ) {\n\t\t\taccumulator.push( new StemWithForms( stemOriginalPair.stem, [ stemOriginalPair.original ] ) );\n\t\t} else {\n\t\t\tlastItem.forms.push( stemOriginalPair.original );\n\t\t}\n\n\t\treturn accumulator;\n\t}, [] );\n\n\treturn new Result(\n\t\tconstructTopicPhraseResult( keyphraseStemmed, paperWordsGroupedByStems, createBasicWordForms ),\n\t\tsynonymsStemmed.map( synonym => constructTopicPhraseResult( synonym, paperWordsGroupedByStems, createBasicWordForms ) )\n\t);\n}\n\n/**\n * Gets all matching word forms for the keyphrase and synonyms.\n *\n * @param {Paper} paper \tThe paper.\n * @param {Researcher} researcher \tThe researcher.\n *\n * @returns {Object} Object with an array of keyphrase forms and an array of arrays of synonyms forms, based on the forms\n * found in the text or created forms.\n */\nexport default function( paper, researcher ) {\n\tconst functionWords = researcher.getConfig( \"functionWords\" );\n\tconst stemmer = researcher.getHelper( \"getStemmer\" )( researcher );\n\tconst createBasicWordForms = researcher.getHelper( \"createBasicWordForms\" );\n\tconst language = researcher.getConfig( \"language\" );\n\t/*\n\t * Whether we want to split words on hyphens depends on the language.\n\t * In all languages apart from Indonesian, we consider hyphens as word boundaries. But in Indonesian, hyphens are used\n\t * to form plural forms of nouns, e.g. 'buku' is the singular form for 'book' and 'buku-buku' is the plural form.\n\t * This is why we don't split words on hyphens in Indonesian and we consider 'buku-buku' as one word rather than two.\n\t */\n\tconst areHyphensWordBoundaries = researcher.getConfig( \"areHyphensWordBoundaries\" );\n\n\tconst allWordsFromPaper = getAllWordsFromPaper( paper, areHyphensWordBoundaries ).map( word => word.toLocaleLowerCase( language ) );\n\tconst keyphrase = paper.getKeyword().toLocaleLowerCase( language ).trim();\n\tconst synonyms = parseSynonyms( paper.getSynonyms().toLocaleLowerCase( language ).trim() );\n\n\treturn getWordForms( keyphrase, synonyms, allWordsFromPaper, functionWords, stemmer, createBasicWordForms, areHyphensWordBoundaries );\n}\n"],"mappings":"AAAA,SAASA,eAAe;AACxB,SAASC,YAAY,EAAEC,gBAAgB;AAEvC,SAASC,YAAY,EAAEC,WAAW,QAAQ,QAAQ;AAClD,OAAOC,oBAAoB;AAC3B,OAAOC,aAAa;;AAEpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASC,aAAaA,CAAEC,IAAI,EAAEC,KAAK,EAAG;EACrC,IAAI,CAACD,IAAI,GAAGA,IAAI;EAChB,IAAI,CAACC,KAAK,GAAGA,KAAK;AACnB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASC,MAAMA,CAAEC,cAAc,GAAG,EAAE,EAAEC,aAAa,GAAG,EAAE,EAAG;EAC1D,IAAI,CAACD,cAAc,GAAGA,cAAc;EACpC,IAAI,CAACC,aAAa,GAAGA,aAAa;AACnC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASC,oBAAoBA,CAAEC,gBAAgB,EAAEC,wBAAwB,EAAEC,oBAAoB,EAAG;EACjG,MAAMC,oBAAoB,GAAGF,wBAAwB,CAACG,IAAI,CAAEC,OAAO,IAAIA,OAAO,CAACX,IAAI,KAAKM,gBAAgB,CAACN,IAAK,CAAC;EAC/G,MAAMY,iBAAiB,GAAGpB,eAAe,CAAEG,YAAY,CAAEW,gBAAgB,CAACO,QAAS,CAAE,CAAC;EAEtF,MAAMZ,KAAK,GAAGQ,oBAAoB,GAC/B,CAAEG,iBAAiB,EAAE,GAAGH,oBAAo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;AACF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,UAAU8C,KAAK,EAAEC,UAAU,EAAG;EAC5C,MAAMzB,aAAa,GAAGyB,UAAU,CAACC,SAAS,CAAE,eAAgB,CAAC;EAC7D,MAAMzB,OAAO,GAAGwB,UAAU,CAACE,SAAS,CAAE,YAAa,CAAC,CAAEF,UAAW,CAAC;EAClE,MAAM/C,oBAAoB,GAAG+C,UAAU,CAACE,SAAS,CAAE,sBAAuB,CAAC;EAC3E,MAAMC,QAAQ,GAAGH,UAAU,CAACC,SAAS,CAAE,UAAW,CAAC;EACnD;AACD;AACA;AACA;AACA;AACA;EACC,MAAMxB,wBAAwB,GAAGuB,UAAU,CAACC,SAAS,CAAE,0BAA2B,CAAC;EAEnF,MAAM3B,iBAAiB,GAAGhC,oBAAoB,CAAEyD,KAAK,EAAEtB,wBAAyB,CAAC,CAACR,GAAG,CAAEoB,IAAI,IAAIA,IAAI,CAACe,iBAAiB,CAAED,QAAS,CAAE,CAAC;EACnI,MAAMzC,SAAS,GAAGqC,KAAK,CAACM,UAAU,CAAC,CAAC,CAACD,iBAAiB,CAAED,QAAS,CAAC,CAACG,IAAI,CAAC,CAAC;EACzE,MAAM3C,QAAQ,GAAGpB,aAAa,CAAEwD,KAAK,CAACQ,WAAW,CAAC,CAAC,CAACH,iBAAiB,CAAED,QAAS,CAAC,CAACG,IAAI,CAAC,CAAE,CAAC;EAE1F,OAAOjC,YAAY,CAAEX,SAAS,EAAEC,QAAQ,EAAEW,iBAAiB,EAAEC,aAAa,EAAEC,OAAO,EAAEvB,oBAAoB,EAAEwB,wBAAyB,CAAC;AACtI","ignoreList":[]}
@@ -1,9 +1,3 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = _default;
7
1
  /**
8
2
  * Gets all H1s in a text, including their content and their position information.
9
3
  *
@@ -11,7 +5,7 @@ exports.default = _default;
11
5
  *
12
6
  * @returns {number | null} An array with all H1s, their content and position.
13
7
  */
14
- function _default(paper) {
8
+ export default function (paper) {
15
9
  return paper.getH1Count();
16
10
  }
17
11
  //# sourceMappingURL=h1s.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"h1s.js","names":["_default","paper","getH1Count"],"sources":["../../../src/languageProcessing/researches/h1s.js"],"sourcesContent":["/**\n * Gets all H1s in a text, including their content and their position information.\n *\n * @param {Paper} paper The paper for which to get the H1s.\n *\n * @returns {number | null} An array with all H1s, their content and position.\n */\nexport default function(paper) {\n return paper.getH1Count();\n}\n"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACe,SAAAA,SAASC,KAAK,EAAE;EAC7B,OAAOA,KAAK,CAACC,UAAU,CAAC,CAAC;AAC3B","ignoreList":[]}
1
+ {"version":3,"file":"h1s.js","names":["paper","getH1Count"],"sources":["../../../src/languageProcessing/researches/h1s.js"],"sourcesContent":["/**\n * Gets all H1s in a text, including their content and their position information.\n *\n * @param {Paper} paper The paper for which to get the H1s.\n *\n * @returns {number | null} An array with all H1s, their content and position.\n */\nexport default function(paper) {\n return paper.getH1Count();\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,UAASA,KAAK,EAAE;EAC7B,OAAOA,KAAK,CAACC,UAAU,CAAC,CAAC;AAC3B","ignoreList":[]}
@@ -1,13 +1,7 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = imageCount;
7
- var _getImagesInTree = _interopRequireDefault(require("../helpers/image/getImagesInTree"));
8
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
9
1
  /** @module researches/imageInText */
10
2
 
3
+ import getImagesInTree from "../helpers/image/getImagesInTree";
4
+
11
5
  /**
12
6
  * Checks the amount of images in the text.
13
7
  *
@@ -15,8 +9,8 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
15
9
  *
16
10
  * @returns {number} The amount of found images.
17
11
  */
18
- function imageCount(paper) {
19
- const images = (0, _getImagesInTree.default)(paper);
12
+ export default function imageCount(paper) {
13
+ const images = getImagesInTree(paper);
20
14
  return images.length;
21
15
  }
22
16
  //# sourceMappingURL=imageCount.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"imageCount.js","names":["_getImagesInTree","_interopRequireDefault","require","e","__esModule","default","imageCount","paper","images","getImagesInTree","length"],"sources":["../../../src/languageProcessing/researches/imageCount.js"],"sourcesContent":["/** @module researches/imageInText */\n\nimport getImagesInTree from \"../helpers/image/getImagesInTree\";\n\n/**\n * Checks the amount of images in the text.\n *\n * @param {Paper} paper The paper to check for images.\n *\n * @returns {number} The amount of found images.\n */\nexport default function imageCount( paper ) {\n\tconst images = getImagesInTree( paper );\n\n\treturn images.length;\n}\n"],"mappings":";;;;;;AAEA,IAAAA,gBAAA,GAAAC,sBAAA,CAAAC,OAAA;AAA+D,SAAAD,uBAAAE,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAF/D;;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACe,SAASG,UAAUA,CAAEC,KAAK,EAAG;EAC3C,MAAMC,MAAM,GAAG,IAAAC,wBAAe,EAAEF,KAAM,CAAC;EAEvC,OAAOC,MAAM,CAACE,MAAM;AACrB","ignoreList":[]}
1
+ {"version":3,"file":"imageCount.js","names":["getImagesInTree","imageCount","paper","images","length"],"sources":["../../../src/languageProcessing/researches/imageCount.js"],"sourcesContent":["/** @module researches/imageInText */\n\nimport getImagesInTree from \"../helpers/image/getImagesInTree\";\n\n/**\n * Checks the amount of images in the text.\n *\n * @param {Paper} paper The paper to check for images.\n *\n * @returns {number} The amount of found images.\n */\nexport default function imageCount( paper ) {\n\tconst images = getImagesInTree( paper );\n\n\treturn images.length;\n}\n"],"mappings":"AAAA;;AAEA,OAAOA,eAAe;;AAEtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAASC,UAAUA,CAAEC,KAAK,EAAG;EAC3C,MAAMC,MAAM,GAAGH,eAAe,CAAEE,KAAM,CAAC;EAEvC,OAAOC,MAAM,CAACC,MAAM;AACrB","ignoreList":[]}
@@ -1,28 +1,5 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- Object.defineProperty(exports, "getLongCenterAlignedTexts", {
7
- enumerable: true,
8
- get: function () {
9
- return _getLongCenterAlignedTexts.default;
10
- }
11
- });
12
- Object.defineProperty(exports, "keyphraseDistribution", {
13
- enumerable: true,
14
- get: function () {
15
- return _keyphraseDistribution.default;
16
- }
17
- });
18
- Object.defineProperty(exports, "wordComplexity", {
19
- enumerable: true,
20
- get: function () {
21
- return _wordComplexity.default;
22
- }
23
- });
24
- var _getLongCenterAlignedTexts = _interopRequireDefault(require("./getLongCenterAlignedTexts"));
25
- var _wordComplexity = _interopRequireDefault(require("./wordComplexity"));
26
- var _keyphraseDistribution = _interopRequireDefault(require("./keyphraseDistribution"));
27
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
1
+ import getLongCenterAlignedTexts from "./getLongCenterAlignedTexts";
2
+ import wordComplexity from "./wordComplexity";
3
+ import keyphraseDistribution from "./keyphraseDistribution";
4
+ export { getLongCenterAlignedTexts, keyphraseDistribution, wordComplexity };
28
5
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["_getLongCenterAlignedTexts","_interopRequireDefault","require","_wordComplexity","_keyphraseDistribution","e","__esModule","default"],"sources":["../../../src/languageProcessing/researches/index.js"],"sourcesContent":["import getLongCenterAlignedTexts from './getLongCenterAlignedTexts';\nimport wordComplexity from './wordComplexity';\nimport keyphraseDistribution from './keyphraseDistribution';\n\nexport {getLongCenterAlignedTexts, keyphraseDistribution, wordComplexity};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,0BAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,eAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,sBAAA,GAAAH,sBAAA,CAAAC,OAAA;AAA4D,SAAAD,uBAAAI,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["getLongCenterAlignedTexts","wordComplexity","keyphraseDistribution"],"sources":["../../../src/languageProcessing/researches/index.js"],"sourcesContent":["import getLongCenterAlignedTexts from './getLongCenterAlignedTexts';\nimport wordComplexity from './wordComplexity';\nimport keyphraseDistribution from './keyphraseDistribution';\n\nexport {getLongCenterAlignedTexts, keyphraseDistribution, wordComplexity};\n"],"mappings":"AAAA,OAAOA,yBAAyB;AAChC,OAAOC,cAAc;AACrB,OAAOC,qBAAqB;AAE5B,SAAQF,yBAAyB,EAAEE,qBAAqB,EAAED,cAAc","ignoreList":[]}