axyseo 2.0.0-alpha.0.0.4 → 2.0.0-alpha.0.0.6

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 (637) hide show
  1. package/package.json +5 -2
  2. package/.browserslistrc +0 -1
  3. package/.gitattributes +0 -1
  4. package/babel.config.js +0 -3
  5. package/eslint.config.mjs +0 -119
  6. package/src/bundledPlugins/index.js +0 -5
  7. package/src/bundledPlugins/previouslyUsedKeywords.js +0 -192
  8. package/src/config/diacritics.js +0 -106
  9. package/src/config/getTransliterations.js +0 -1447
  10. package/src/config/transliterationsWPstyle.js +0 -774
  11. package/src/config/wordBoundaries.js +0 -23
  12. package/src/config/wordBoundariesWithoutPunctuation.js +0 -9
  13. package/src/const/analysis.js +0 -41
  14. package/src/errors/invalidType.js +0 -14
  15. package/src/errors/missingArgument.js +0 -14
  16. package/src/helpers/createMeasurementElement.js +0 -40
  17. package/src/helpers/domManipulation.js +0 -65
  18. package/src/helpers/errors.js +0 -26
  19. package/src/helpers/factory.js +0 -219
  20. package/src/helpers/formatNumber.js +0 -12
  21. package/src/helpers/formatString.js +0 -33
  22. package/src/helpers/getLanguagesWithWordComplexity.js +0 -8
  23. package/src/helpers/getLanguagesWithWordFormSupport.js +0 -11
  24. package/src/helpers/getWordComplexityConfig.js +0 -20
  25. package/src/helpers/getWordComplexityHelper.js +0 -20
  26. package/src/helpers/htmlEntities.js +0 -41
  27. package/src/helpers/includesAny.js +0 -19
  28. package/src/helpers/index.js +0 -127
  29. package/src/helpers/shortlinker/Shortlinker.js +0 -75
  30. package/src/helpers/shortlinker/index.js +0 -1
  31. package/src/helpers/shortlinker/singleton.js +0 -68
  32. package/src/helpers/types.js +0 -34
  33. package/src/index.js +0 -60
  34. package/src/languageProcessing/AbstractResearcher.js +0 -366
  35. package/src/languageProcessing/helpers/highlighting/getMarkingsInSentence.js +0 -125
  36. package/src/languageProcessing/helpers/html/getFieldsToMark.js +0 -29
  37. package/src/languageProcessing/helpers/html/getSubheadingTexts.js +0 -47
  38. package/src/languageProcessing/helpers/html/getSubheadings.js +0 -95
  39. package/src/languageProcessing/helpers/html/html.js +0 -176
  40. package/src/languageProcessing/helpers/html/htmlParser.js +0 -145
  41. package/src/languageProcessing/helpers/html/matchParagraphs.js +0 -62
  42. package/src/languageProcessing/helpers/html/normalizeHTML.js +0 -16
  43. package/src/languageProcessing/helpers/image/getAltAttribute.js +0 -20
  44. package/src/languageProcessing/helpers/image/getImagesInTree.js +0 -16
  45. package/src/languageProcessing/helpers/image/imageInText.js +0 -19
  46. package/src/languageProcessing/helpers/index.js +0 -12
  47. package/src/languageProcessing/helpers/language/getLanguage.js +0 -9
  48. package/src/languageProcessing/helpers/link/checkNofollow.js +0 -38
  49. package/src/languageProcessing/helpers/link/getAnchorsFromText.js +0 -32
  50. package/src/languageProcessing/helpers/link/getLinkType.js +0 -32
  51. package/src/languageProcessing/helpers/match/findKeywordFormsInString.js +0 -101
  52. package/src/languageProcessing/helpers/match/isDoubleQuoted.js +0 -13
  53. package/src/languageProcessing/helpers/match/matchTextWithArray.js +0 -36
  54. package/src/languageProcessing/helpers/match/matchTextWithTransliteration.js +0 -58
  55. package/src/languageProcessing/helpers/match/matchTextWithWord.js +0 -45
  56. package/src/languageProcessing/helpers/match/matchWordFormsWithSentence.js +0 -164
  57. package/src/languageProcessing/helpers/match/processExactMatchRequest.js +0 -20
  58. package/src/languageProcessing/helpers/morphology/baseStemmer.js +0 -11
  59. package/src/languageProcessing/helpers/morphology/buildFormRule.js +0 -19
  60. package/src/languageProcessing/helpers/morphology/buildTopicStems.js +0 -169
  61. package/src/languageProcessing/helpers/morphology/createRulesFromArrays.js +0 -45
  62. package/src/languageProcessing/helpers/morphology/exceptionListHelpers.js +0 -65
  63. package/src/languageProcessing/helpers/morphology/findMatchingEndingInArray.js +0 -24
  64. package/src/languageProcessing/helpers/morphology/flattenSortLength.js +0 -14
  65. package/src/languageProcessing/helpers/morphology/getAllWordsFromPaper.js +0 -39
  66. package/src/languageProcessing/helpers/morphology/regexHelpers.js +0 -44
  67. package/src/languageProcessing/helpers/morphology/stemHelpers.js +0 -38
  68. package/src/languageProcessing/helpers/morphology/stemPrefixedFunctionWords.js +0 -31
  69. package/src/languageProcessing/helpers/passiveVoice/periphrastic/directPrecedenceException.js +0 -36
  70. package/src/languageProcessing/helpers/passiveVoice/periphrastic/freeAuxiliaryParticipleOrder/getClausesSplitOnStopWords.js +0 -113
  71. package/src/languageProcessing/helpers/passiveVoice/periphrastic/freeAuxiliaryParticipleOrder/nonDirectParticiplePrecedenceException.js +0 -45
  72. package/src/languageProcessing/helpers/passiveVoice/periphrastic/getClauses.js +0 -231
  73. package/src/languageProcessing/helpers/passiveVoice/periphrastic/getIndicesWithRegex.js +0 -20
  74. package/src/languageProcessing/helpers/passiveVoice/periphrastic/matchRegularParticiples.js +0 -23
  75. package/src/languageProcessing/helpers/passiveVoice/periphrastic/precedenceException.js +0 -40
  76. package/src/languageProcessing/helpers/prominentWords/determineProminentWords.js +0 -238
  77. package/src/languageProcessing/helpers/regex/createRegexFromArray.js +0 -35
  78. package/src/languageProcessing/helpers/regex/createRegexFromDoubleArray.js +0 -34
  79. package/src/languageProcessing/helpers/regex/createWordRegex.js +0 -30
  80. package/src/languageProcessing/helpers/regex/matchStringWithRegex.js +0 -19
  81. package/src/languageProcessing/helpers/regex/searchAndReplaceWithOneRegex.js +0 -14
  82. package/src/languageProcessing/helpers/sanitize/doubleQuotes.js +0 -12
  83. package/src/languageProcessing/helpers/sanitize/filterShortcodesFromTree.js +0 -131
  84. package/src/languageProcessing/helpers/sanitize/mergeListItems.js +0 -24
  85. package/src/languageProcessing/helpers/sanitize/parseSynonyms.js +0 -20
  86. package/src/languageProcessing/helpers/sanitize/quotes.js +0 -46
  87. package/src/languageProcessing/helpers/sanitize/removeEmailAddresses.js +0 -12
  88. package/src/languageProcessing/helpers/sanitize/removePunctuation.js +0 -64
  89. package/src/languageProcessing/helpers/sanitize/removePunctuationExceptQuotes.js +0 -18
  90. package/src/languageProcessing/helpers/sanitize/removeSentenceTerminators.js +0 -13
  91. package/src/languageProcessing/helpers/sanitize/removeURLs.js +0 -13
  92. package/src/languageProcessing/helpers/sanitize/sanitizeLineBreakTag.js +0 -11
  93. package/src/languageProcessing/helpers/sanitize/sanitizeString.js +0 -18
  94. package/src/languageProcessing/helpers/sanitize/stripHTMLTags.js +0 -57
  95. package/src/languageProcessing/helpers/sanitize/stripNonTextTags.js +0 -15
  96. package/src/languageProcessing/helpers/sanitize/stripNumbers.js +0 -21
  97. package/src/languageProcessing/helpers/sanitize/stripSpaces.js +0 -23
  98. package/src/languageProcessing/helpers/sanitize/stripWordBoundaries.js +0 -65
  99. package/src/languageProcessing/helpers/sanitize/unifyWhitespace.js +0 -61
  100. package/src/languageProcessing/helpers/sentence/SentenceTokenizer.js +0 -640
  101. package/src/languageProcessing/helpers/sentence/countSentences.js +0 -20
  102. package/src/languageProcessing/helpers/sentence/getSentences.js +0 -65
  103. package/src/languageProcessing/helpers/sentence/getSentencesFromTree.js +0 -55
  104. package/src/languageProcessing/helpers/sentence/memoizedSentenceTokenizer.js +0 -28
  105. package/src/languageProcessing/helpers/sentence/sentencesLength.js +0 -31
  106. package/src/languageProcessing/helpers/syllables/DeviationFragment.js +0 -112
  107. package/src/languageProcessing/helpers/syllables/countSyllables.js +0 -182
  108. package/src/languageProcessing/helpers/syllables/syllableCountIterator.js +0 -56
  109. package/src/languageProcessing/helpers/syllables/syllableCountStep.js +0 -68
  110. package/src/languageProcessing/helpers/transform/transformWordsWithHyphens.js +0 -17
  111. package/src/languageProcessing/helpers/transliterate/replaceDiacritics.js +0 -22
  112. package/src/languageProcessing/helpers/transliterate/specialCharacterMappings.js +0 -214
  113. package/src/languageProcessing/helpers/transliterate/transliterate.js +0 -20
  114. package/src/languageProcessing/helpers/transliterate/transliterateWPstyle.js +0 -21
  115. package/src/languageProcessing/helpers/url/parseSlug.js +0 -10
  116. package/src/languageProcessing/helpers/url/url.js +0 -172
  117. package/src/languageProcessing/helpers/word/addWordboundary.js +0 -37
  118. package/src/languageProcessing/helpers/word/areWordsInSentence.js +0 -16
  119. package/src/languageProcessing/helpers/word/countMetaDescriptionLength.js +0 -18
  120. package/src/languageProcessing/helpers/word/countWords.js +0 -14
  121. package/src/languageProcessing/helpers/word/createPunctuationTokens.js +0 -42
  122. package/src/languageProcessing/helpers/word/filterWordsFromArray.js +0 -15
  123. package/src/languageProcessing/helpers/word/followsIndex.js +0 -25
  124. package/src/languageProcessing/helpers/word/getAllWordsFromTree.js +0 -23
  125. package/src/languageProcessing/helpers/word/getWords.js +0 -43
  126. package/src/languageProcessing/helpers/word/includesIndex.js +0 -30
  127. package/src/languageProcessing/helpers/word/indices.js +0 -146
  128. package/src/languageProcessing/helpers/word/markWordsInSentences.js +0 -173
  129. package/src/languageProcessing/helpers/word/matchWordInSentence.js +0 -61
  130. package/src/languageProcessing/helpers/word/splitIntoTokens.js +0 -46
  131. package/src/languageProcessing/index.js +0 -91
  132. package/src/languageProcessing/languages/_default/Researcher.js +0 -34
  133. package/src/languageProcessing/languages/_default/helpers/getStemmer.js +0 -11
  134. package/src/languageProcessing/languages/ar/Researcher.js +0 -46
  135. package/src/languageProcessing/languages/ar/config/firstWordExceptions.js +0 -14
  136. package/src/languageProcessing/languages/ar/config/functionWords.js +0 -329
  137. package/src/languageProcessing/languages/ar/config/internal/passiveVerbsWithLongVowel.js +0 -570
  138. package/src/languageProcessing/languages/ar/config/prefixedFunctionWords.js +0 -5
  139. package/src/languageProcessing/languages/ar/config/transitionWords.js +0 -19
  140. package/src/languageProcessing/languages/ar/config/twoPartTransitionWords.js +0 -7
  141. package/src/languageProcessing/languages/ar/helpers/createBasicWordForms.js +0 -32
  142. package/src/languageProcessing/languages/ar/helpers/getStemmer.js +0 -22
  143. package/src/languageProcessing/languages/ar/helpers/internal/stem.js +0 -632
  144. package/src/languageProcessing/languages/ar/helpers/isPassiveSentence.js +0 -33
  145. package/src/languageProcessing/languages/ca/Researcher.js +0 -43
  146. package/src/languageProcessing/languages/ca/config/sentenceLength.js +0 -3
  147. package/src/languageProcessing/languages/ca/config/transitionWords.js +0 -31
  148. package/src/languageProcessing/languages/ca/config/twoPartTransitionWords.js +0 -7
  149. package/src/languageProcessing/languages/ca/helpers/getStemmer.js +0 -11
  150. package/src/languageProcessing/languages/cs/Researcher.js +0 -44
  151. package/src/languageProcessing/languages/cs/config/firstWordExceptions.js +0 -15
  152. package/src/languageProcessing/languages/cs/config/functionWords.js +0 -121
  153. package/src/languageProcessing/languages/cs/config/internal/passiveVoiceAuxiliaries.js +0 -38
  154. package/src/languageProcessing/languages/cs/config/internal/passiveVoiceEndings.js +0 -54
  155. package/src/languageProcessing/languages/cs/config/stopWords.js +0 -42
  156. package/src/languageProcessing/languages/cs/config/transitionWords.js +0 -26
  157. package/src/languageProcessing/languages/cs/config/twoPartTransitionWords.js +0 -8
  158. package/src/languageProcessing/languages/cs/helpers/getClauses.js +0 -26
  159. package/src/languageProcessing/languages/cs/helpers/getStemmer.js +0 -22
  160. package/src/languageProcessing/languages/cs/helpers/internal/getParticiples.js +0 -16
  161. package/src/languageProcessing/languages/cs/helpers/internal/stem.js +0 -499
  162. package/src/languageProcessing/languages/cs/values/Clause.js +0 -34
  163. package/src/languageProcessing/languages/de/Researcher.js +0 -52
  164. package/src/languageProcessing/languages/de/config/firstWordExceptions.js +0 -17
  165. package/src/languageProcessing/languages/de/config/functionWords.js +0 -303
  166. package/src/languageProcessing/languages/de/config/internal/exceptionsParticiplesActive.js +0 -2231
  167. package/src/languageProcessing/languages/de/config/internal/passiveVoiceAuxiliaries.js +0 -96
  168. package/src/languageProcessing/languages/de/config/internal/passiveVoiceIrregulars.js +0 -368
  169. package/src/languageProcessing/languages/de/config/internal/passiveVoiceRegex.js +0 -72
  170. package/src/languageProcessing/languages/de/config/keyphraseLength.js +0 -11
  171. package/src/languageProcessing/languages/de/config/stopWords.js +0 -67
  172. package/src/languageProcessing/languages/de/config/syllables.json +0 -460
  173. package/src/languageProcessing/languages/de/config/transitionWords.js +0 -31
  174. package/src/languageProcessing/languages/de/config/twoPartTransitionWords.js +0 -12
  175. package/src/languageProcessing/languages/de/config/wordComplexity.js +0 -4
  176. package/src/languageProcessing/languages/de/helpers/calculateFleschReadingScore.js +0 -18
  177. package/src/languageProcessing/languages/de/helpers/checkIfWordIsComplex.js +0 -40
  178. package/src/languageProcessing/languages/de/helpers/checkIfWordIsFunction.js +0 -15
  179. package/src/languageProcessing/languages/de/helpers/getClauses.js +0 -25
  180. package/src/languageProcessing/languages/de/helpers/getStemmer.js +0 -22
  181. package/src/languageProcessing/languages/de/helpers/internal/SentenceTokenizer.js +0 -31
  182. package/src/languageProcessing/languages/de/helpers/internal/detectAndStemRegularParticiple.js +0 -128
  183. package/src/languageProcessing/languages/de/helpers/internal/determineStem.js +0 -128
  184. package/src/languageProcessing/languages/de/helpers/internal/getParticiples.js +0 -40
  185. package/src/languageProcessing/languages/de/helpers/internal/stem.js +0 -215
  186. package/src/languageProcessing/languages/de/helpers/memoizedSentenceTokenizer.js +0 -28
  187. package/src/languageProcessing/languages/de/values/Clause.js +0 -85
  188. package/src/languageProcessing/languages/el/Researcher.js +0 -46
  189. package/src/languageProcessing/languages/el/config/firstWordExceptions.js +0 -47
  190. package/src/languageProcessing/languages/el/config/functionWords.js +0 -116
  191. package/src/languageProcessing/languages/el/config/internal/auxiliaries.js +0 -19
  192. package/src/languageProcessing/languages/el/config/internal/morphologicalPassiveSuffixes.js +0 -87
  193. package/src/languageProcessing/languages/el/config/internal/nonPassiveVerbStems.js +0 -138
  194. package/src/languageProcessing/languages/el/config/stopWords.js +0 -854
  195. package/src/languageProcessing/languages/el/config/transitionWords.js +0 -26
  196. package/src/languageProcessing/languages/el/config/twoPartTransitionWords.js +0 -10
  197. package/src/languageProcessing/languages/el/helpers/getClauses.js +0 -25
  198. package/src/languageProcessing/languages/el/helpers/getStemmer.js +0 -21
  199. package/src/languageProcessing/languages/el/helpers/internal/getParticiples.js +0 -20
  200. package/src/languageProcessing/languages/el/helpers/internal/stem.js +0 -368
  201. package/src/languageProcessing/languages/el/helpers/isPassiveSentence.js +0 -38
  202. package/src/languageProcessing/languages/el/values/Clause.js +0 -37
  203. package/src/languageProcessing/languages/en/Researcher.js +0 -46
  204. package/src/languageProcessing/languages/en/config/abbreviations.js +0 -55
  205. package/src/languageProcessing/languages/en/config/firstWordExceptions.js +0 -14
  206. package/src/languageProcessing/languages/en/config/functionWords.js +0 -186
  207. package/src/languageProcessing/languages/en/config/internal/passiveVoiceAuxiliaries.js +0 -44
  208. package/src/languageProcessing/languages/en/config/internal/passiveVoiceIrregulars.js +0 -354
  209. package/src/languageProcessing/languages/en/config/internal/passiveVoiceNonVerbEndingEd.js +0 -3047
  210. package/src/languageProcessing/languages/en/config/regularParticiplesRegex.js +0 -5
  211. package/src/languageProcessing/languages/en/config/stopWords.js +0 -52
  212. package/src/languageProcessing/languages/en/config/syllables.json +0 -86
  213. package/src/languageProcessing/languages/en/config/transitionWords.js +0 -48
  214. package/src/languageProcessing/languages/en/config/twoPartTransitionWords.js +0 -7
  215. package/src/languageProcessing/languages/en/config/wordComplexity.js +0 -5
  216. package/src/languageProcessing/languages/en/helpers/calculateFleschReadingScore.js +0 -18
  217. package/src/languageProcessing/languages/en/helpers/checkIfWordIsComplex.js +0 -43
  218. package/src/languageProcessing/languages/en/helpers/getClauses.js +0 -49
  219. package/src/languageProcessing/languages/en/helpers/getStemmer.js +0 -22
  220. package/src/languageProcessing/languages/en/helpers/internal/determineStem.js +0 -178
  221. package/src/languageProcessing/languages/en/helpers/internal/getAdjectiveStem.js +0 -162
  222. package/src/languageProcessing/languages/en/helpers/internal/getParticiples.js +0 -25
  223. package/src/languageProcessing/languages/en/helpers/internal/getVerbStem.js +0 -237
  224. package/src/languageProcessing/languages/en/values/Clause.js +0 -68
  225. package/src/languageProcessing/languages/es/Researcher.js +0 -48
  226. package/src/languageProcessing/languages/es/config/firstWordExceptions.js +0 -16
  227. package/src/languageProcessing/languages/es/config/functionWords.js +0 -321
  228. package/src/languageProcessing/languages/es/config/internal/passiveVoiceAuxiliaries.js +0 -60
  229. package/src/languageProcessing/languages/es/config/internal/passiveVoiceParticiples.js +0 -7327
  230. package/src/languageProcessing/languages/es/config/sentenceLength.js +0 -3
  231. package/src/languageProcessing/languages/es/config/stopWords.js +0 -33
  232. package/src/languageProcessing/languages/es/config/syllables.json +0 -176
  233. package/src/languageProcessing/languages/es/config/transitionWords.js +0 -40
  234. package/src/languageProcessing/languages/es/config/twoPartTransitionWords.js +0 -10
  235. package/src/languageProcessing/languages/es/config/wordComplexity.js +0 -4
  236. package/src/languageProcessing/languages/es/helpers/calculateFleschReadingScore.js +0 -18
  237. package/src/languageProcessing/languages/es/helpers/checkIfWordIsComplex.js +0 -56
  238. package/src/languageProcessing/languages/es/helpers/getClauses.js +0 -29
  239. package/src/languageProcessing/languages/es/helpers/getStemmer.js +0 -22
  240. package/src/languageProcessing/languages/es/helpers/internal/checkVerbStemModifications.js +0 -41
  241. package/src/languageProcessing/languages/es/helpers/internal/getParticiples.js +0 -35
  242. package/src/languageProcessing/languages/es/helpers/internal/stem.js +0 -793
  243. package/src/languageProcessing/languages/es/values/Clause.js +0 -47
  244. package/src/languageProcessing/languages/fa/Researcher.js +0 -47
  245. package/src/languageProcessing/languages/fa/config/firstWordExceptions.js +0 -12
  246. package/src/languageProcessing/languages/fa/config/functionWords.js +0 -122
  247. package/src/languageProcessing/languages/fa/config/internal/participles.js +0 -1429
  248. package/src/languageProcessing/languages/fa/config/sentenceLength.js +0 -3
  249. package/src/languageProcessing/languages/fa/config/transitionWords.js +0 -20
  250. package/src/languageProcessing/languages/fa/config/twoPartTransitionWords.js +0 -9
  251. package/src/languageProcessing/languages/fa/helpers/createBasicWordForms.js +0 -97
  252. package/src/languageProcessing/languages/fa/helpers/getStemmer.js +0 -13
  253. package/src/languageProcessing/languages/fa/helpers/isPassiveSentence.js +0 -14
  254. package/src/languageProcessing/languages/fr/Researcher.js +0 -46
  255. package/src/languageProcessing/languages/fr/config/firstWordExceptions.js +0 -16
  256. package/src/languageProcessing/languages/fr/config/functionWords.js +0 -281
  257. package/src/languageProcessing/languages/fr/config/internal/exceptionsParticiplesActive.js +0 -1510
  258. package/src/languageProcessing/languages/fr/config/internal/passiveVoiceAuxiliaries.js +0 -108
  259. package/src/languageProcessing/languages/fr/config/internal/passiveVoiceIrregulars.js +0 -565
  260. package/src/languageProcessing/languages/fr/config/stopWords.js +0 -119
  261. package/src/languageProcessing/languages/fr/config/syllables.json +0 -1426
  262. package/src/languageProcessing/languages/fr/config/transitionWords.js +0 -59
  263. package/src/languageProcessing/languages/fr/config/twoPartTransitionWords.js +0 -15
  264. package/src/languageProcessing/languages/fr/config/wordComplexity.js +0 -4
  265. package/src/languageProcessing/languages/fr/helpers/calculateFleschReadingScore.js +0 -18
  266. package/src/languageProcessing/languages/fr/helpers/checkIfWordIsComplex.js +0 -67
  267. package/src/languageProcessing/languages/fr/helpers/getClauses.js +0 -34
  268. package/src/languageProcessing/languages/fr/helpers/getStemmer.js +0 -22
  269. package/src/languageProcessing/languages/fr/helpers/internal/getParticiples.js +0 -72
  270. package/src/languageProcessing/languages/fr/helpers/internal/stem.js +0 -633
  271. package/src/languageProcessing/languages/fr/values/Clause.js +0 -96
  272. package/src/languageProcessing/languages/he/Researcher.js +0 -50
  273. package/src/languageProcessing/languages/he/config/firstWordExceptions.js +0 -13
  274. package/src/languageProcessing/languages/he/config/functionWords.js +0 -564
  275. package/src/languageProcessing/languages/he/config/internal/regularRootsHufal.js +0 -186
  276. package/src/languageProcessing/languages/he/config/internal/regularRootsNifal.js +0 -195
  277. package/src/languageProcessing/languages/he/config/internal/regularRootsPual.js +0 -168
  278. package/src/languageProcessing/languages/he/config/passiveVoice/regularRootsHufal.js +0 -188
  279. package/src/languageProcessing/languages/he/config/passiveVoice/regularRootsNifal.js +0 -197
  280. package/src/languageProcessing/languages/he/config/passiveVoice/regularRootsPual.js +0 -170
  281. package/src/languageProcessing/languages/he/config/prefixedFunctionWords.js +0 -2
  282. package/src/languageProcessing/languages/he/config/sentenceLength.js +0 -3
  283. package/src/languageProcessing/languages/he/config/transitionWords.js +0 -28
  284. package/src/languageProcessing/languages/he/config/twoPartTransitionWords.js +0 -8
  285. package/src/languageProcessing/languages/he/helpers/createBasicWordForms.js +0 -33
  286. package/src/languageProcessing/languages/he/helpers/getStemmer.js +0 -22
  287. package/src/languageProcessing/languages/he/helpers/internal/stem.js +0 -52
  288. package/src/languageProcessing/languages/he/helpers/isPassiveSentence.js +0 -96
  289. package/src/languageProcessing/languages/he/helpers/stem.js +0 -52
  290. package/src/languageProcessing/languages/hu/Researcher.js +0 -48
  291. package/src/languageProcessing/languages/hu/config/firstWordExceptions.js +0 -31
  292. package/src/languageProcessing/languages/hu/config/functionWords.js +0 -284
  293. package/src/languageProcessing/languages/hu/config/internal/auxiliaries.js +0 -97
  294. package/src/languageProcessing/languages/hu/config/internal/morphologicalPassiveAffixes.js +0 -125
  295. package/src/languageProcessing/languages/hu/config/internal/nonPassivesInVaAndVe.js +0 -265
  296. package/src/languageProcessing/languages/hu/config/internal/odikVerbs.js +0 -273
  297. package/src/languageProcessing/languages/hu/config/internal/participles.js +0 -412
  298. package/src/languageProcessing/languages/hu/config/stopWords.js +0 -213
  299. package/src/languageProcessing/languages/hu/config/transitionWords.js +0 -42
  300. package/src/languageProcessing/languages/hu/config/twoPartTransitionWords.js +0 -34
  301. package/src/languageProcessing/languages/hu/helpers/getClauses.js +0 -25
  302. package/src/languageProcessing/languages/hu/helpers/getStemmer.js +0 -22
  303. package/src/languageProcessing/languages/hu/helpers/internal/getParticiples.js +0 -21
  304. package/src/languageProcessing/languages/hu/helpers/internal/stem.js +0 -389
  305. package/src/languageProcessing/languages/hu/helpers/isPassiveSentence.js +0 -54
  306. package/src/languageProcessing/languages/hu/values/Clause.js +0 -41
  307. package/src/languageProcessing/languages/id/Researcher.js +0 -46
  308. package/src/languageProcessing/languages/id/config/firstWordExceptions.js +0 -13
  309. package/src/languageProcessing/languages/id/config/functionWords.js +0 -202
  310. package/src/languageProcessing/languages/id/config/internal/nonPassiveVerbsStartingDi.js +0 -215
  311. package/src/languageProcessing/languages/id/config/transitionWords.js +0 -62
  312. package/src/languageProcessing/languages/id/config/twoPartTransitionWords.js +0 -13
  313. package/src/languageProcessing/languages/id/helpers/getStemmer.js +0 -22
  314. package/src/languageProcessing/languages/id/helpers/internal/stem.js +0 -462
  315. package/src/languageProcessing/languages/id/helpers/internal/stemHelpers.js +0 -78
  316. package/src/languageProcessing/languages/id/helpers/isPassiveSentence.js +0 -39
  317. package/src/languageProcessing/languages/id/helpers/splitIntoTokensCustom.js +0 -47
  318. package/src/languageProcessing/languages/it/Researcher.js +0 -48
  319. package/src/languageProcessing/languages/it/config/firstWordExceptions.js +0 -17
  320. package/src/languageProcessing/languages/it/config/functionWords.js +0 -277
  321. package/src/languageProcessing/languages/it/config/internal/passiveVoiceAuxiliaries.js +0 -98
  322. package/src/languageProcessing/languages/it/config/internal/passiveVoiceParticiples.js +0 -7197
  323. package/src/languageProcessing/languages/it/config/sentenceLength.js +0 -3
  324. package/src/languageProcessing/languages/it/config/stopWords.js +0 -57
  325. package/src/languageProcessing/languages/it/config/syllables.json +0 -573
  326. package/src/languageProcessing/languages/it/config/transitionWords.js +0 -104
  327. package/src/languageProcessing/languages/it/config/twoPartTransitionWords.js +0 -9
  328. package/src/languageProcessing/languages/it/helpers/calculateFleschReadingScore.js +0 -15
  329. package/src/languageProcessing/languages/it/helpers/getClauses.js +0 -32
  330. package/src/languageProcessing/languages/it/helpers/getStemmer.js +0 -22
  331. package/src/languageProcessing/languages/it/helpers/internal/getParticiples.js +0 -34
  332. package/src/languageProcessing/languages/it/helpers/internal/stem.js +0 -436
  333. package/src/languageProcessing/languages/it/values/Clause.js +0 -47
  334. package/src/languageProcessing/languages/ja/Researcher.js +0 -86
  335. package/src/languageProcessing/languages/ja/config/assessmentApplicabilityCharacterCount.js +0 -4
  336. package/src/languageProcessing/languages/ja/config/firstWordExceptions.js +0 -8
  337. package/src/languageProcessing/languages/ja/config/functionWords.js +0 -563
  338. package/src/languageProcessing/languages/ja/config/keyphraseLength.js +0 -16
  339. package/src/languageProcessing/languages/ja/config/metaDescriptionLength.js +0 -4
  340. package/src/languageProcessing/languages/ja/config/paragraphLength.js +0 -10
  341. package/src/languageProcessing/languages/ja/config/sentenceLength.js +0 -4
  342. package/src/languageProcessing/languages/ja/config/subheadingsTooLong.js +0 -18
  343. package/src/languageProcessing/languages/ja/config/textLength.js +0 -47
  344. package/src/languageProcessing/languages/ja/config/topicLength.js +0 -5
  345. package/src/languageProcessing/languages/ja/config/transitionWords.js +0 -354
  346. package/src/languageProcessing/languages/ja/customResearches/findKeyphraseInSEOTitle.js +0 -98
  347. package/src/languageProcessing/languages/ja/customResearches/getKeyphraseLength.js +0 -19
  348. package/src/languageProcessing/languages/ja/customResearches/getWordForms.js +0 -50
  349. package/src/languageProcessing/languages/ja/customResearches/textLength.js +0 -24
  350. package/src/languageProcessing/languages/ja/helpers/countCharacters.js +0 -19
  351. package/src/languageProcessing/languages/ja/helpers/customGetStemmer.js +0 -21
  352. package/src/languageProcessing/languages/ja/helpers/getContentWords.js +0 -21
  353. package/src/languageProcessing/languages/ja/helpers/getWords.js +0 -31
  354. package/src/languageProcessing/languages/ja/helpers/internal/SentenceTokenizer.js +0 -102
  355. package/src/languageProcessing/languages/ja/helpers/internal/createWordForms.js +0 -68
  356. package/src/languageProcessing/languages/ja/helpers/internal/determineStem.js +0 -17
  357. package/src/languageProcessing/languages/ja/helpers/matchTextWithWord.js +0 -53
  358. package/src/languageProcessing/languages/ja/helpers/matchTransitionWords.js +0 -25
  359. package/src/languageProcessing/languages/ja/helpers/memoizedSentenceTokenizer.js +0 -28
  360. package/src/languageProcessing/languages/ja/helpers/splitIntoTokensCustom.js +0 -20
  361. package/src/languageProcessing/languages/ja/helpers/wordsCharacterCount.js +0 -13
  362. package/src/languageProcessing/languages/nb/Researcher.js +0 -45
  363. package/src/languageProcessing/languages/nb/config/firstWordExceptions.js +0 -12
  364. package/src/languageProcessing/languages/nb/config/functionWords.js +0 -106
  365. package/src/languageProcessing/languages/nb/config/internal/participles.js +0 -3127
  366. package/src/languageProcessing/languages/nb/config/internal/passiveVoiceAuxiliaries.js +0 -15
  367. package/src/languageProcessing/languages/nb/config/stopWords.js +0 -39
  368. package/src/languageProcessing/languages/nb/config/transitionWords.js +0 -21
  369. package/src/languageProcessing/languages/nb/config/twoPartTransitionWords.js +0 -10
  370. package/src/languageProcessing/languages/nb/helpers/getClauses.js +0 -28
  371. package/src/languageProcessing/languages/nb/helpers/getStemmer.js +0 -22
  372. package/src/languageProcessing/languages/nb/helpers/internal/getParticiples.js +0 -24
  373. package/src/languageProcessing/languages/nb/helpers/internal/stem.js +0 -133
  374. package/src/languageProcessing/languages/nb/values/Clause.js +0 -43
  375. package/src/languageProcessing/languages/nl/Researcher.js +0 -48
  376. package/src/languageProcessing/languages/nl/config/firstWordExceptions.js +0 -15
  377. package/src/languageProcessing/languages/nl/config/functionWords.js +0 -233
  378. package/src/languageProcessing/languages/nl/config/internal/nonParticiples.js +0 -2515
  379. package/src/languageProcessing/languages/nl/config/internal/passiveVoiceAuxiliaries.js +0 -13
  380. package/src/languageProcessing/languages/nl/config/internal/passiveVoiceIrregulars.js +0 -474
  381. package/src/languageProcessing/languages/nl/config/keyphraseLength.js +0 -10
  382. package/src/languageProcessing/languages/nl/config/stopWords.js +0 -35
  383. package/src/languageProcessing/languages/nl/config/syllables.json +0 -343
  384. package/src/languageProcessing/languages/nl/config/transitionWords.js +0 -22
  385. package/src/languageProcessing/languages/nl/config/twoPartTransitionWords.js +0 -8
  386. package/src/languageProcessing/languages/nl/helpers/calculateFleschReadingScore.js +0 -15
  387. package/src/languageProcessing/languages/nl/helpers/getClauses.js +0 -25
  388. package/src/languageProcessing/languages/nl/helpers/getStemmer.js +0 -22
  389. package/src/languageProcessing/languages/nl/helpers/internal/checkExceptionsWithFullForms.js +0 -128
  390. package/src/languageProcessing/languages/nl/helpers/internal/detectAndStemRegularParticiple.js +0 -324
  391. package/src/languageProcessing/languages/nl/helpers/internal/detectAndStemSuffixes.js +0 -164
  392. package/src/languageProcessing/languages/nl/helpers/internal/determineStem.js +0 -133
  393. package/src/languageProcessing/languages/nl/helpers/internal/getParticiples.js +0 -25
  394. package/src/languageProcessing/languages/nl/helpers/internal/getStemWordsWithTAndDEnding.js +0 -183
  395. package/src/languageProcessing/languages/nl/helpers/internal/stem.js +0 -146
  396. package/src/languageProcessing/languages/nl/helpers/internal/stemModificationHelpers.js +0 -109
  397. package/src/languageProcessing/languages/nl/helpers/internal/stemTOrDFromEndOfWord.js +0 -65
  398. package/src/languageProcessing/languages/nl/values/Clause.js +0 -62
  399. package/src/languageProcessing/languages/pl/Researcher.js +0 -47
  400. package/src/languageProcessing/languages/pl/config/firstWordExceptions.js +0 -12
  401. package/src/languageProcessing/languages/pl/config/functionWords.js +0 -421
  402. package/src/languageProcessing/languages/pl/config/internal/auxiliaries.js +0 -85
  403. package/src/languageProcessing/languages/pl/config/internal/participles.js +0 -26433
  404. package/src/languageProcessing/languages/pl/config/sentenceLength.js +0 -10
  405. package/src/languageProcessing/languages/pl/config/stopWords.js +0 -36
  406. package/src/languageProcessing/languages/pl/config/transitionWords.js +0 -42
  407. package/src/languageProcessing/languages/pl/config/twoPartTransitionWords.js +0 -8
  408. package/src/languageProcessing/languages/pl/helpers/getClauses.js +0 -25
  409. package/src/languageProcessing/languages/pl/helpers/getStemmer.js +0 -22
  410. package/src/languageProcessing/languages/pl/helpers/internal/getParticiples.js +0 -18
  411. package/src/languageProcessing/languages/pl/helpers/internal/stem.js +0 -161
  412. package/src/languageProcessing/languages/pl/values/Clause.js +0 -53
  413. package/src/languageProcessing/languages/pt/Researcher.js +0 -48
  414. package/src/languageProcessing/languages/pt/config/firstWordExceptions.js +0 -15
  415. package/src/languageProcessing/languages/pt/config/functionWords.js +0 -226
  416. package/src/languageProcessing/languages/pt/config/internal/passiveVoiceAuxiliaries.js +0 -66
  417. package/src/languageProcessing/languages/pt/config/internal/passiveVoiceParticiples.js +0 -4088
  418. package/src/languageProcessing/languages/pt/config/sentenceLength.js +0 -3
  419. package/src/languageProcessing/languages/pt/config/stopWords.js +0 -50
  420. package/src/languageProcessing/languages/pt/config/syllables.json +0 -38
  421. package/src/languageProcessing/languages/pt/config/transitionWords.js +0 -34
  422. package/src/languageProcessing/languages/pt/config/twoPartTransitionWords.js +0 -9
  423. package/src/languageProcessing/languages/pt/helpers/calculateFleschReadingScore.js +0 -15
  424. package/src/languageProcessing/languages/pt/helpers/getClauses.js +0 -29
  425. package/src/languageProcessing/languages/pt/helpers/getStemmer.js +0 -22
  426. package/src/languageProcessing/languages/pt/helpers/internal/getParticiples.js +0 -35
  427. package/src/languageProcessing/languages/pt/helpers/internal/stem.js +0 -319
  428. package/src/languageProcessing/languages/pt/values/Clause.js +0 -43
  429. package/src/languageProcessing/languages/ru/Researcher.js +0 -48
  430. package/src/languageProcessing/languages/ru/config/firstWordExceptions.js +0 -14
  431. package/src/languageProcessing/languages/ru/config/fleschReadingEaseScores.js +0 -20
  432. package/src/languageProcessing/languages/ru/config/functionWords.js +0 -519
  433. package/src/languageProcessing/languages/ru/config/internal/participlesShortenedList.js +0 -2914
  434. package/src/languageProcessing/languages/ru/config/internal/passiveVoiceParticiples.js +0 -6295
  435. package/src/languageProcessing/languages/ru/config/sentenceLength.js +0 -3
  436. package/src/languageProcessing/languages/ru/config/syllables.json +0 -19
  437. package/src/languageProcessing/languages/ru/config/transitionWords.js +0 -62
  438. package/src/languageProcessing/languages/ru/config/twoPartTransitionWords.js +0 -14
  439. package/src/languageProcessing/languages/ru/helpers/calculateFleschReadingScore.js +0 -16
  440. package/src/languageProcessing/languages/ru/helpers/getStemmer.js +0 -22
  441. package/src/languageProcessing/languages/ru/helpers/internal/stem.js +0 -288
  442. package/src/languageProcessing/languages/ru/helpers/isPassiveSentence.js +0 -14
  443. package/src/languageProcessing/languages/sk/Researcher.js +0 -46
  444. package/src/languageProcessing/languages/sk/config/firstWordExceptions.js +0 -14
  445. package/src/languageProcessing/languages/sk/config/functionWords.js +0 -855
  446. package/src/languageProcessing/languages/sk/config/internal/nonPassives.js +0 -1074
  447. package/src/languageProcessing/languages/sk/config/internal/passiveVoiceAuxiliaries.js +0 -22
  448. package/src/languageProcessing/languages/sk/config/stopWords.js +0 -34
  449. package/src/languageProcessing/languages/sk/config/transitionWords.js +0 -23
  450. package/src/languageProcessing/languages/sk/config/twoPartTransitionWords.js +0 -10
  451. package/src/languageProcessing/languages/sk/helpers/getClauses.js +0 -26
  452. package/src/languageProcessing/languages/sk/helpers/getStemmer.js +0 -22
  453. package/src/languageProcessing/languages/sk/helpers/internal/getParticiples.js +0 -16
  454. package/src/languageProcessing/languages/sk/helpers/internal/stem.js +0 -319
  455. package/src/languageProcessing/languages/sk/values/Clause.js +0 -39
  456. package/src/languageProcessing/languages/sv/Researcher.js +0 -45
  457. package/src/languageProcessing/languages/sv/config/firstWordExceptions.js +0 -15
  458. package/src/languageProcessing/languages/sv/config/functionWords.js +0 -176
  459. package/src/languageProcessing/languages/sv/config/internal/passiveVerbs.js +0 -10400
  460. package/src/languageProcessing/languages/sv/config/keyphraseLength.js +0 -11
  461. package/src/languageProcessing/languages/sv/config/transitionWords.js +0 -35
  462. package/src/languageProcessing/languages/sv/config/twoPartTransitionWords.js +0 -8
  463. package/src/languageProcessing/languages/sv/helpers/getStemmer.js +0 -22
  464. package/src/languageProcessing/languages/sv/helpers/internal/stem.js +0 -152
  465. package/src/languageProcessing/languages/sv/helpers/isPassiveSentence.js +0 -14
  466. package/src/languageProcessing/languages/tr/Researcher.js +0 -44
  467. package/src/languageProcessing/languages/tr/config/firstWordExceptions.js +0 -13
  468. package/src/languageProcessing/languages/tr/config/functionWords.js +0 -116
  469. package/src/languageProcessing/languages/tr/config/internal/nonPassiveExceptions.js +0 -574
  470. package/src/languageProcessing/languages/tr/config/internal/passiveEndings.js +0 -151
  471. package/src/languageProcessing/languages/tr/config/sentenceLength.js +0 -7
  472. package/src/languageProcessing/languages/tr/config/transitionWords.js +0 -42
  473. package/src/languageProcessing/languages/tr/config/twoPartTransitionWords.js +0 -7
  474. package/src/languageProcessing/languages/tr/helpers/getStemmer.js +0 -22
  475. package/src/languageProcessing/languages/tr/helpers/internal/stem.js +0 -20
  476. package/src/languageProcessing/languages/tr/helpers/isPassiveSentence.js +0 -43
  477. package/src/languageProcessing/researches/altTagCount.js +0 -70
  478. package/src/languageProcessing/researches/countSentencesFromText.js +0 -19
  479. package/src/languageProcessing/researches/findKeyphraseInSEOTitle.js +0 -257
  480. package/src/languageProcessing/researches/findKeywordInFirstParagraph.js +0 -86
  481. package/src/languageProcessing/researches/findTransitionWords.js +0 -123
  482. package/src/languageProcessing/researches/functionWordsInKeyphrase.js +0 -44
  483. package/src/languageProcessing/researches/getAnchorsWithKeyphrase.js +0 -227
  484. package/src/languageProcessing/researches/getFleschReadingScore.js +0 -150
  485. package/src/languageProcessing/researches/getKeywordDensity.js +0 -44
  486. package/src/languageProcessing/researches/getLinkStatistics.js +0 -54
  487. package/src/languageProcessing/researches/getLinks.js +0 -18
  488. package/src/languageProcessing/researches/getLongCenterAlignedTexts.js +0 -37
  489. package/src/languageProcessing/researches/getParagraphLength.js +0 -44
  490. package/src/languageProcessing/researches/getParagraphs.js +0 -18
  491. package/src/languageProcessing/researches/getPassiveVoiceResult.js +0 -129
  492. package/src/languageProcessing/researches/getProminentWordsForInsights.js +0 -48
  493. package/src/languageProcessing/researches/getProminentWordsForInternalLinking.js +0 -119
  494. package/src/languageProcessing/researches/getSentenceBeginnings.js +0 -124
  495. package/src/languageProcessing/researches/getSubheadingTextLengths.js +0 -59
  496. package/src/languageProcessing/researches/getWordForms.js +0 -204
  497. package/src/languageProcessing/researches/h1s.js +0 -10
  498. package/src/languageProcessing/researches/imageCount.js +0 -16
  499. package/src/languageProcessing/researches/index.js +0 -5
  500. package/src/languageProcessing/researches/keyphraseDistribution.js +0 -249
  501. package/src/languageProcessing/researches/keyphraseLength.js +0 -17
  502. package/src/languageProcessing/researches/keywordCount.js +0 -134
  503. package/src/languageProcessing/researches/keywordCountInUrl.js +0 -57
  504. package/src/languageProcessing/researches/matchKeywordInSubheadings.js +0 -62
  505. package/src/languageProcessing/researches/metaDescriptionKeyword.js +0 -85
  506. package/src/languageProcessing/researches/metaDescriptionLength.js +0 -12
  507. package/src/languageProcessing/researches/pageTitleWidth.js +0 -11
  508. package/src/languageProcessing/researches/readingTime.js +0 -82
  509. package/src/languageProcessing/researches/sentences.js +0 -20
  510. package/src/languageProcessing/researches/videoCount.js +0 -32
  511. package/src/languageProcessing/researches/wordComplexity.js +0 -129
  512. package/src/languageProcessing/researches/wordCountInText.js +0 -29
  513. package/src/languageProcessing/values/Clause.js +0 -108
  514. package/src/languageProcessing/values/ProminentWord.js +0 -95
  515. package/src/languageProcessing/values/Sentence.js +0 -111
  516. package/src/languageProcessing/values/index.js +0 -9
  517. package/src/markers/addMark.js +0 -9
  518. package/src/markers/addMarkSingleWord.js +0 -32
  519. package/src/markers/index.js +0 -7
  520. package/src/markers/removeDuplicateMarks.js +0 -27
  521. package/src/markers/removeMarks.js +0 -11
  522. package/src/parse/build/build.js +0 -52
  523. package/src/parse/build/index.js +0 -10
  524. package/src/parse/build/private/adapt.js +0 -113
  525. package/src/parse/build/private/adaptAttributes.js +0 -36
  526. package/src/parse/build/private/alwaysFilterElements.js +0 -75
  527. package/src/parse/build/private/combineIntoImplicitParagraphs.js +0 -130
  528. package/src/parse/build/private/filterBeforeTokenizing.js +0 -32
  529. package/src/parse/build/private/filterHelpers.js +0 -44
  530. package/src/parse/build/private/filterTree.js +0 -42
  531. package/src/parse/build/private/getTextElementPositions.js +0 -184
  532. package/src/parse/build/private/helpers/parseClassAttribute.js +0 -9
  533. package/src/parse/build/private/isPhrasingContent.js +0 -28
  534. package/src/parse/build/private/parseBlocks.js +0 -151
  535. package/src/parse/build/private/tokenize.js +0 -74
  536. package/src/parse/language/LanguageProcessor.js +0 -74
  537. package/src/parse/structure/Heading.js +0 -26
  538. package/src/parse/structure/Node.js +0 -69
  539. package/src/parse/structure/Paragraph.js +0 -48
  540. package/src/parse/structure/Sentence.js +0 -30
  541. package/src/parse/structure/SourceCodeLocation.js +0 -41
  542. package/src/parse/structure/Text.js +0 -27
  543. package/src/parse/structure/Token.js +0 -24
  544. package/src/parse/structure/index.js +0 -16
  545. package/src/parse/traverse/findAllInTree.js +0 -58
  546. package/src/parse/traverse/index.js +0 -12
  547. package/src/parse/traverse/innerText.js +0 -26
  548. package/src/parsedPaper/ParsedPaper.js +0 -92
  549. package/src/parsedPaper/assess/TreeAssessor.js +0 -184
  550. package/src/parsedPaper/assess/assessmentListFactories.js +0 -73
  551. package/src/parsedPaper/assess/assessments/Assessment.js +0 -79
  552. package/src/parsedPaper/assess/assessments/index.js +0 -6
  553. package/src/parsedPaper/assess/assessorFactories.js +0 -104
  554. package/src/parsedPaper/assess/cornerstone/assessmentListFactories.js +0 -47
  555. package/src/parsedPaper/assess/cornerstone/index.js +0 -5
  556. package/src/parsedPaper/assess/index.js +0 -20
  557. package/src/parsedPaper/build/PaperParser.js +0 -105
  558. package/src/parsedPaper/build/linguisticParsing/Sentence.js +0 -89
  559. package/src/parsedPaper/build/linguisticParsing/SentenceTokenizer.js +0 -323
  560. package/src/parsedPaper/build/linguisticParsing/parseText.js +0 -20
  561. package/src/parsedPaper/build/tree/TreeBuilder.js +0 -75
  562. package/src/parsedPaper/build/tree/cleanup/calculateTextIndices.js +0 -190
  563. package/src/parsedPaper/build/tree/cleanup/getElementContent.js +0 -21
  564. package/src/parsedPaper/build/tree/cleanup/postParsing.js +0 -37
  565. package/src/parsedPaper/build/tree/html/HTMLTreeConverter.js +0 -230
  566. package/src/parsedPaper/build/tree/html/buildTree.js +0 -31
  567. package/src/parsedPaper/build/tree/html/htmlConstants.js +0 -37
  568. package/src/parsedPaper/build/tree/index.js +0 -14
  569. package/src/parsedPaper/build/tree/metadata/buildTree.js +0 -32
  570. package/src/parsedPaper/research/TreeResearcher.js +0 -134
  571. package/src/parsedPaper/research/index.js +0 -13
  572. package/src/parsedPaper/research/researches/Headings.js +0 -20
  573. package/src/parsedPaper/research/researches/LinkStatistics.js +0 -128
  574. package/src/parsedPaper/research/researches/Research.js +0 -50
  575. package/src/parsedPaper/research/researches/index.js +0 -1
  576. package/src/parsedPaper/structure/tree/FormattingElement.js +0 -67
  577. package/src/parsedPaper/structure/tree/SourceCodeLocation.js +0 -31
  578. package/src/parsedPaper/structure/tree/TextContainer.js +0 -85
  579. package/src/parsedPaper/structure/tree/index.js +0 -22
  580. package/src/parsedPaper/structure/tree/nodes/Heading.js +0 -26
  581. package/src/parsedPaper/structure/tree/nodes/LeafNode.js +0 -75
  582. package/src/parsedPaper/structure/tree/nodes/List.js +0 -47
  583. package/src/parsedPaper/structure/tree/nodes/ListItem.js +0 -26
  584. package/src/parsedPaper/structure/tree/nodes/MetadataMiscellaneous.js +0 -46
  585. package/src/parsedPaper/structure/tree/nodes/MetadataText.js +0 -26
  586. package/src/parsedPaper/structure/tree/nodes/Node.js +0 -154
  587. package/src/parsedPaper/structure/tree/nodes/Paragraph.js +0 -24
  588. package/src/parsedPaper/structure/tree/nodes/StructuredNode.js +0 -52
  589. package/src/parsedPaper/structure/tree/nodes/index.js +0 -21
  590. package/src/scoring/assessments/assessment.js +0 -63
  591. package/src/scoring/assessments/index.js +0 -58
  592. package/src/scoring/assessments/readability/ParagraphTooLongAssessment.js +0 -173
  593. package/src/scoring/assessments/readability/SentenceBeginningsAssessment.js +0 -132
  594. package/src/scoring/assessments/readability/SentenceLengthInTextAssessment.js +0 -186
  595. package/src/scoring/assessments/readability/TransitionWordsAssessment.js +0 -168
  596. package/src/scoring/assessments/seo/ImageCountAssessment.js +0 -112
  597. package/src/scoring/assessments/seo/InternalLinksAssessment.js +0 -114
  598. package/src/scoring/assessments/seo/IntroductionKeywordAssessment.js +0 -110
  599. package/src/scoring/assessments/seo/KeyphraseAssessment.js +0 -104
  600. package/src/scoring/assessments/seo/KeyphraseLengthAssessment.js +0 -110
  601. package/src/scoring/assessments/seo/KeywordDensityAssessment.js +0 -116
  602. package/src/scoring/assessments/seo/MetaDescriptionKeywordAssessment.js +0 -114
  603. package/src/scoring/assessments/seo/MetaDescriptionLengthAssessment.js +0 -112
  604. package/src/scoring/assessments/seo/MetaTitleKeywordAssessment.js +0 -111
  605. package/src/scoring/assessments/seo/NumberInMetaTitleAssessment.js +0 -107
  606. package/src/scoring/assessments/seo/OutboundLinksAssessment.js +0 -111
  607. package/src/scoring/assessments/seo/PageTitleWidthAssessment.js +0 -104
  608. package/src/scoring/assessments/seo/SingleH1Assessment.js +0 -118
  609. package/src/scoring/assessments/seo/SingleTitleAssessment.js +0 -108
  610. package/src/scoring/assessments/seo/SubHeadingsKeywordAssessment.js +0 -107
  611. package/src/scoring/assessments/seo/TextImagesAssessment.js +0 -144
  612. package/src/scoring/assessments/seo/TextLengthAssessment.js +0 -100
  613. package/src/scoring/assessments/seo/UrlKeywordAssessment.js +0 -111
  614. package/src/scoring/assessments/seo/UrlLengthAssessment.js +0 -103
  615. package/src/scoring/assessors/assessor.js +0 -269
  616. package/src/scoring/assessors/avadaAssessor.js +0 -67
  617. package/src/scoring/assessors/contentAssessor.js +0 -159
  618. package/src/scoring/assessors/index.js +0 -4
  619. package/src/scoring/assessors/seoAssessor.js +0 -57
  620. package/src/scoring/helpers/assessments/checkForTooLongSentences.js +0 -13
  621. package/src/scoring/helpers/assessments/inRange.js +0 -49
  622. package/src/scoring/helpers/assessments/keyphraseLengthFactor.js +0 -10
  623. package/src/scoring/helpers/assessments/recommendedKeywordCount.js +0 -43
  624. package/src/scoring/helpers/index.js +0 -74
  625. package/src/scoring/interpreters/index.js +0 -5
  626. package/src/scoring/interpreters/scoreToRating.js +0 -31
  627. package/src/scoring/renderers/AssessorPresenter.js +0 -360
  628. package/src/scoring/scoreAggregators/ReadabilityScoreAggregator.js +0 -203
  629. package/src/scoring/scoreAggregators/SEOScoreAggregator.js +0 -54
  630. package/src/scoring/scoreAggregators/ScoreAggregator.js +0 -23
  631. package/src/scoring/scoreAggregators/index.js +0 -3
  632. package/src/values/AssessmentResult.js +0 -496
  633. package/src/values/Mark.js +0 -271
  634. package/src/values/Paper.js +0 -425
  635. package/src/values/index.js +0 -9
  636. package/src/vendor/turkishStemmer.js +0 -3435
  637. package/tsconfig.json +0 -15
@@ -1,30 +0,0 @@
1
- import { forEach, includes, isEmpty } from "lodash";
2
-
3
- /**
4
- * Checks whether a given word is directly preceded by a word from a list of words.
5
- *
6
- * @param {Array} precedingWords The array of objects with matches and indices.
7
- * @param {number} matchIndex The index of the word for which to check whether it's preceded by one of the other words.
8
- * @param {boolean} addSpace True if a space should be added.
9
- *
10
- * @returns {boolean} Returns true if the match is preceded by a given word, otherwise returns false.
11
- */
12
- export default function( precedingWords, matchIndex, addSpace = true ) {
13
- /*
14
- 1 if there is a space between the match and the preceding word
15
- (because the end word boundary is not included in the match).
16
- 0 if the preceding word is a contraction.
17
- */
18
- const space = addSpace ? 1 : 0;
19
-
20
- if ( isEmpty( precedingWords ) ) {
21
- return false;
22
- }
23
-
24
- const precedingWordsEndIndices = [];
25
- forEach( precedingWords, function( precedingWord ) {
26
- const precedingWordsEndIndex = precedingWord.index + precedingWord.match.length + space;
27
- precedingWordsEndIndices.push( precedingWordsEndIndex );
28
- } );
29
- return includes( precedingWordsEndIndices, matchIndex );
30
- }
@@ -1,146 +0,0 @@
1
- import { isUndefined, forEach } from "lodash";
2
- import stripSpaces from "../sanitize/stripSpaces.js";
3
- import { isWordInSentence as matchWordInSentence, characterInBoundary } from "./matchWordInSentence.js";
4
-
5
- /**
6
- * Returns the indices of a string in a text. If it is found multiple times, it will return multiple indices.
7
- *
8
- * @param {string} word The word to find in the text.
9
- * @param {string} text The text to check for the given word.
10
- *
11
- * @returns {Array} All indices found.
12
- */
13
- function getIndicesByWord( word, text ) {
14
- let startIndex = 0;
15
- const searchStringLength = word.length;
16
- let index;
17
- const indices = [];
18
- while ( ( index = text.indexOf( word, startIndex ) ) > -1 ) {
19
- // Check if the previous and next character are word boundaries to determine if a complete word was detected
20
- const isPreviousCharacterWordBoundary = characterInBoundary( text[ index - 1 ] ) || index === 0;
21
-
22
- const isNextCharacterWordBoundary = characterInBoundary( text[ index + searchStringLength ] ) ||
23
- ( text.length === index + searchStringLength );
24
-
25
- if ( isPreviousCharacterWordBoundary && isNextCharacterWordBoundary ) {
26
- indices.push(
27
- {
28
- index: index,
29
- match: word,
30
- }
31
- );
32
- }
33
- startIndex = index + searchStringLength;
34
- }
35
- return indices;
36
- }
37
-
38
- /**
39
- * Matches string with an array, returns the word and the index it was found on.
40
- *
41
- * @param {Array} words The array with strings to match.
42
- * @param {string} text The text to match the strings from the array to.
43
- *
44
- * @returns {Array} The array with words, containing the index of the match and the matched string.
45
- * Returns an empty array if none are found.
46
- */
47
- const getIndicesByWordList = function( words, text ) {
48
- let matchedWords = [];
49
-
50
- forEach( words, function( word ) {
51
- word = stripSpaces( word );
52
- if ( ! matchWordInSentence( word, text ) ) {
53
- return;
54
- }
55
- matchedWords = matchedWords.concat( getIndicesByWord( word, text ) );
56
- } );
57
- return matchedWords;
58
- };
59
-
60
- /**
61
- * Sorts the array on the index property of each entry.
62
- *
63
- * @param {Array} indices The array with indices.
64
- *
65
- * @returns {Array} The sorted array with indices.
66
- */
67
- const sortIndices = function( indices ) {
68
- return indices.sort( function( a, b ) {
69
- return ( a.index - b.index );
70
- } );
71
- };
72
-
73
- /**
74
- * Filters duplicate entries if the indices overlap.
75
- *
76
- * @param {Array} indices The array with indices to be filtered.
77
- *
78
- * @returns {Array} The filtered array.
79
- */
80
- const filterIndices = function( indices ) {
81
- indices = sortIndices( indices );
82
- const filtered = [];
83
- for ( let i = 0; i < indices.length; i++ ) {
84
- // If the next index is within the range of the current index and the length of the word, remove it
85
- // This makes sure we don't match combinations twice, like "even though" and "though".
86
- if ( ! isUndefined( indices[ i + 1 ] ) && indices[ i + 1 ].index < indices[ i ].index + indices[ i ].match.length ) {
87
- filtered.push( indices[ i ] );
88
-
89
- // Adds 1 to i, so we skip the next index that is overlapping with the current index.
90
- i++;
91
- continue;
92
- }
93
- filtered.push( indices[ i ] );
94
- }
95
- return filtered;
96
- };
97
-
98
- /**
99
- * Matches string with an array, returns the word and the index it was found on, and sorts the match instances based on
100
- * the index property of the match.
101
- *
102
- * @param {Array} words The array with strings to match.
103
- * @param {string} text The text to match the strings from the array to.
104
- *
105
- * @returns {Array} The array with words, containing the index of the match and the matched string.
106
- * Returns an empty array if none are found.
107
- */
108
- const getIndicesByWordListSorted = function( words, text ) {
109
- let matchedWords = [];
110
-
111
- forEach( words, function( word ) {
112
- word = stripSpaces( word );
113
- if ( ! matchWordInSentence( word, text ) ) {
114
- return matchedWords;
115
- }
116
- matchedWords = matchedWords.concat( getIndicesByWord( word, text ) );
117
- } );
118
-
119
- matchedWords = matchedWords.sort( function( a, b ) {
120
- if ( a.index < b.index ) {
121
- return -1;
122
- }
123
- if ( a.index > b.index ) {
124
- return 1;
125
- }
126
- return 0;
127
- } );
128
-
129
- return matchedWords;
130
- };
131
-
132
- export {
133
- getIndicesByWord,
134
- getIndicesByWordList,
135
- filterIndices,
136
- sortIndices,
137
- getIndicesByWordListSorted,
138
- };
139
-
140
- export default {
141
- getIndicesByWord,
142
- getIndicesByWordList,
143
- filterIndices,
144
- sortIndices,
145
- getIndicesByWordListSorted,
146
- };
@@ -1,173 +0,0 @@
1
- import matchWords from "../match/matchTextWithArray";
2
- import arrayToRegex from "../regex/createRegexFromArray";
3
- import addMark from "../../../markers/addMarkSingleWord";
4
- import Mark from "../../../values/Mark";
5
- import { escapeRegExp } from "lodash";
6
- import getAnchorsFromText from "../link/getAnchorsFromText";
7
- import { SINGLE_QUOTES_ARRAY, SINGLE_QUOTES_REGEX } from "../sanitize/quotes";
8
-
9
- // Regex to deconstruct an anchor into open tag, content and close tag.
10
- const anchorDeconstructionRegex = /(<a[\s]+[^>]+>)([^]*?)(<\/a>)/;
11
-
12
- /**
13
- * Deconstructs an anchor to the opening tag and the content. The content is the anchor text.
14
- * We don't return the closing tag since the value would always be the same, i.e. </a>.
15
- *
16
- * @param {string} anchor An anchor of the shape <a ...>...</a>.
17
- *
18
- * @returns {object} An object containing the opening tag and the content.
19
- */
20
- export const deConstructAnchor = function( anchor ) {
21
- // The const array mirrors the anchorDeconstructionRegex, using a comma to access the first element without a name.
22
- const [ , openTag, content ] = anchor.match( anchorDeconstructionRegex );
23
- return {
24
- openTag: openTag,
25
- content: content,
26
- };
27
- };
28
-
29
- /**
30
- * Reconstructs an anchor from an openTag, the content, and the closing tag.
31
- *
32
- * @param {string} openTag The opening tag of the anchor. Must be of the shape <a ...>.
33
- * @param {string} content The text of the anchor.
34
- *
35
- * @returns {string} An anchor.
36
- */
37
- export const reConstructAnchor = function( openTag, content ) {
38
- return `${openTag}${content}</a>`;
39
- };
40
-
41
-
42
- /**
43
- * Gets the anchors and marks the anchors' text if the words are found in it.
44
- *
45
- * @param {string} sentence The sentence to retrieve the anchors from.
46
- * @param {RegExp} wordsRegex The regex of the words.
47
- *
48
- * @returns {Object} The anchors and the marked anchors.
49
- */
50
- const getMarkedAnchors = function( sentence, wordsRegex ) {
51
- // Retrieve the anchors.
52
- const anchors = getAnchorsFromText( sentence );
53
- // For every anchor, apply the markings only to the anchor tag.
54
- const markedAnchors = anchors.map( anchor => {
55
- // Retrieve the open tag and the content/anchor text.
56
- const { openTag, content } = deConstructAnchor( anchor );
57
-
58
- // Apply the marking to the anchor text if there is a match.
59
- const markedAnchorText = content.replace( wordsRegex, ( x ) => addMark( x ) );
60
-
61
- // Create a new anchor tag with a (marked) anchor text.
62
- return reConstructAnchor( openTag, markedAnchorText );
63
- } );
64
-
65
- return { anchors, markedAnchors };
66
- };
67
-
68
- /**
69
- * Adds marks to a sentence and merges marks if those are only separated by a space
70
- * (e.g., if highlighting words "ballet" and "shoes" in a sentence "I have a lot of ballet shoes and other paraphernalia."
71
- * the marks will be put around "ballet shoes" together, not "`ballet` `shoes`".)
72
- *
73
- * @param {string} sentence The sentence to mark words in.
74
- * @param {[string]} wordsFoundInSentence The words to mark in the sentence.
75
- * @param {function} matchWordCustomHelper The language-specific helper function to match word in text.
76
- *
77
- * @returns {string} The sentence with marks.
78
- */
79
- export const collectMarkingsInSentence = function( sentence, wordsFoundInSentence, matchWordCustomHelper ) {
80
- const allWordsFound = [];
81
- wordsFoundInSentence.forEach( word => {
82
- // Check if the word in `wordsFoundInSentence` contains single quote(s).
83
- const matchedSingleQuotes = word.match( SINGLE_QUOTES_REGEX );
84
- if ( matchedSingleQuotes ) {
85
- /*
86
- * If yes, make all different combinations of the word with different types of single quotes in the array.
87
- * Later, a regex will be created for all words that were found in the sentence including their variations.
88
- *
89
- * For example:
90
- * `wordsFoundInSentence`: [ "red", "panda’s" ]
91
- * For the word "panda’s", we'll create the following variations:
92
- * "panda's", "panda‘s", "panda’s", "panda‛s", "panda`s", "panda‹s", "panda›s"
93
- * And those variations will be added to `allWordsFound`.
94
- */
95
- SINGLE_QUOTES_ARRAY.forEach( singleQuote => {
96
- matchedSingleQuotes.forEach( matchedSingleQuote => {
97
- allWordsFound.push( escapeRegExp( word.replace( new RegExp( matchedSingleQuote, "g" ), singleQuote ) ) );
98
- } );
99
- } );
100
- } else {
101
- allWordsFound.push( escapeRegExp( word ) );
102
- }
103
- } );
104
-
105
- // If a language has a custom helper to match words, we disable the word boundary when creating the regex.
106
- const wordsRegex = matchWordCustomHelper ? arrayToRegex( allWordsFound, true ) : arrayToRegex( allWordsFound );
107
-
108
- // Retrieve the anchors and mark the anchors' text if the words are found in the anchors' text.
109
- const { anchors, markedAnchors } = getMarkedAnchors( sentence, wordsRegex );
110
-
111
- let markup = sentence.replace( wordsRegex, function( x ) {
112
- return addMark( x );
113
- } );
114
-
115
- /**
116
- * In 'markup', we apply the markings also inside the anchor's attribute if there is a match, on top of
117
- * marking the anchor's text.
118
- * The step below is to replace the incorrectly marked anchors with the marked anchors that we want:
119
- * where the markings are only applied in the anchor's text.
120
- */
121
- if ( anchors.length > 0 ) {
122
- const markupAnchors = getAnchorsFromText( markup );
123
- for ( let i = 0; i < markupAnchors.length; i++ ) {
124
- markup = markup.replace( markupAnchors[ i ], markedAnchors[ i ] );
125
- }
126
- }
127
-
128
- /*
129
- * If two marks are separated by only a space, remove the closing tag of the first mark and the opening tag of the
130
- * second mark so that the two marks can be combined into one.
131
- */
132
- return ( markup.replace( new RegExp( "</yoastmark> <yoastmark class='yoast-text-mark'>", "ig" ), " " ) );
133
- };
134
-
135
- /**
136
- * Adds marks to a sentence.
137
- *
138
- * @param {string} sentence The sentence in which we want to apply highlighting.
139
- * @param {Array} wordsFoundInSentence The words to highlight in a sentence.
140
- * @param {function} matchWordCustomHelper The language-specific helper function to match word in text.
141
- * @returns {Mark[]} The array of Mark objects of each sentence.
142
- */
143
- export function markWordsInASentence( sentence, wordsFoundInSentence, matchWordCustomHelper ) {
144
- return [ new Mark( {
145
- original: sentence,
146
- marked: collectMarkingsInSentence( sentence, wordsFoundInSentence, matchWordCustomHelper ),
147
- } ) ];
148
- }
149
-
150
- /**
151
- * Adds marks to an array of sentences.
152
- *
153
- * @param {[string]} wordsToMark The words to mark.
154
- * @param {[string]} sentences The sentences in which to mark these words.
155
- * @param {string} locale The locale.
156
- * @param {function} matchWordCustomHelper The language-specific helper function to match word in text.
157
- *
158
- * @returns {[string]} The sentences with marks.
159
- */
160
- export function markWordsInSentences( wordsToMark, sentences, locale, matchWordCustomHelper ) {
161
- let wordsFoundInSentence = [];
162
- let markings = [];
163
-
164
- sentences.forEach( function( sentence ) {
165
- wordsFoundInSentence = matchWords( sentence, wordsToMark, locale, matchWordCustomHelper ).matches;
166
-
167
- if ( wordsFoundInSentence.length > 0 ) {
168
- markings = markings.concat( markWordsInASentence( sentence, wordsFoundInSentence, matchWordCustomHelper ) );
169
- }
170
- } );
171
-
172
- return markings;
173
- }
@@ -1,61 +0,0 @@
1
- import wordBoundariesFactory from "../../../config/wordBoundaries.js";
2
- const wordBoundaries = wordBoundariesFactory();
3
- import { escapeRegExp, includes } from "lodash";
4
- import addWordBoundary from "./addWordboundary.js";
5
-
6
- /**
7
- * Checks whether a character is present in the list of word boundaries.
8
- *
9
- * @param {string} character The character to look for.
10
- * @returns {boolean} Whether or not the character is present in the list of word boundaries.
11
- */
12
- const characterInBoundary = function( character ) {
13
- return includes( wordBoundaries, character );
14
- };
15
-
16
- /**
17
- * Checks whether a word is present in a sentence.
18
- *
19
- * @param {string} word The word to search for in the sentence.
20
- * @param {string} sentence The sentence to look through.
21
- * @returns {boolean} Whether or not the word is present in the sentence.
22
- */
23
- const isWordInSentence = function( word, sentence ) {
24
- // To ensure proper matching, make everything lowercase.
25
- word = word.toLocaleLowerCase();
26
- sentence = sentence.toLocaleLowerCase();
27
-
28
- // Escape regex in word, since we use regex characters like in abbreviations ("e.g.").
29
- const wordWithBoundaries = addWordBoundary( escapeRegExp( word ) );
30
- let occurrenceStart = sentence.search( new RegExp( wordWithBoundaries, "ig" ) );
31
- // Return false if no match has been found.
32
- if ( occurrenceStart === -1 ) {
33
- return false;
34
- }
35
- /*
36
- If there is a word boundary before the matched word, the regex includes this word boundary in the match.
37
- This means that occurrenceStart is the index of the word boundary before the match. Therefore 1 has to
38
- be added to occurrenceStart, except when there is no word boundary before the match (i.e. at the start
39
- of a sentence).
40
- */
41
- if ( occurrenceStart > 0 ) {
42
- occurrenceStart += 1;
43
- }
44
- const occurrenceEnd = occurrenceStart + word.length;
45
-
46
- // Check if the previous and next character are word boundaries to determine if a complete word was detected
47
- const previousCharacter = characterInBoundary( sentence[ occurrenceStart - 1 ] ) || occurrenceStart === 0;
48
- const nextCharacter = characterInBoundary( sentence[ occurrenceEnd ] ) || occurrenceEnd === sentence.length;
49
-
50
- return ( ( previousCharacter ) && ( nextCharacter ) );
51
- };
52
-
53
- export {
54
- characterInBoundary,
55
- isWordInSentence,
56
- };
57
-
58
- export default {
59
- characterInBoundary,
60
- isWordInSentence,
61
- };
@@ -1,46 +0,0 @@
1
- import createPunctuationTokens from "./createPunctuationTokens";
2
-
3
- /*
4
- * The following regex is used to split a text into tokens.
5
- * The regex matches word separators. A word separator is either a whitespace, a slash, a
6
- * tab, a non-breaking space, a hyphen, an en-dash or an em-dash.
7
- * Opening and closing square brackets are added to deal correctly with shortcodes downstream.
8
- * The regex is used to split a text into tokens.
9
- * Do not add punctuation marks to this regex, as they are handled separately inside `createPunctuationTokens()`.
10
- * The word separator explicitly only contains characters that split two words and not a word and a space.
11
- * - A space is a word separator because it separates two words if it occurs between them. For example: "foo bar"
12
- * - A tab is a word separator because it separates two words if it occurs between them. For example: "foo bar"
13
- * - A non-breaking space (u00A0) is a word separator because it separates two words if it occurs between them. For example: "foo\u00A0bar".
14
- * - An en-dash (u2013), an em-dash (u2014), and a hyphen (u002d) are word separators because they separate two words if they occur between them.
15
- * For example: "foo–bar".
16
- * Note that &nbsp; is added here as #nbsp; -- we transform the & to # to prevent parse5 from converting it to a space and messing up highlighting.
17
- */
18
- const WORD_SEPARATORS_REGEX = /([\s\t\u00A0\u2013\u2014\u002d[\]]|#nbsp;)/;
19
-
20
- /**
21
- * Tokenizes a text similarly to `getWords`, but in a way that's suitable for the HTML parser.
22
- * 1. It does not normalize whitespace.
23
- * This operation is too risky for the HTML parser because it may throw away characters and as a result, the token positions are corrupted.
24
- * 2. It does not remove punctuation marks but keeps them.
25
- *
26
- * This algorithm splits the text by word separators: tokens that are the border between two words.
27
- * This algorithm separates punctuation marks from words and keeps them as separate tokens.
28
- * It only splits them off if they appear at the start or the end of a word.
29
- *
30
- * @param {string} text The text to tokenize.
31
- *
32
- * @returns {string[]} An array of tokens.
33
- */
34
- const splitIntoTokens = ( text ) => {
35
- if ( ! text ) {
36
- return [];
37
- }
38
-
39
- // Split the sentence string into tokens. Those tokens are unrefined as they may contain punctuation.
40
- const rawTokens = text.split( WORD_SEPARATORS_REGEX ).filter( x => x !== "" );
41
-
42
- // Remove punctuation from the beginning and end of word tokens, and make them into separate tokens.
43
- return createPunctuationTokens( rawTokens );
44
- };
45
-
46
- export default splitIntoTokens;
@@ -1,91 +0,0 @@
1
- import replaceDiacritics from './helpers/transliterate/replaceDiacritics';
2
- import transliterate from './helpers/transliterate/transliterate';
3
- import createRegexFromArray from './helpers/regex/createRegexFromArray';
4
- import imageInText from './helpers/image/imageInText';
5
- import stripSpaces from './helpers/sanitize/stripSpaces';
6
- import baseStemmer from './helpers/morphology/baseStemmer';
7
- import getWords from './helpers/word/getWords';
8
- import AbstractResearcher from './AbstractResearcher';
9
- import flattenSortLength from './helpers/morphology/flattenSortLength';
10
- import indices from './helpers/word/indices';
11
- import buildFormRule from './helpers/morphology/buildFormRule';
12
- import createRulesFromArrays, {
13
- createSingleRuleFromArray
14
- } from './helpers/morphology/createRulesFromArrays';
15
- import matchRegularParticiples from './helpers/passiveVoice/periphrastic/matchRegularParticiples';
16
- import directPrecedenceException from './helpers/passiveVoice/periphrastic/directPrecedenceException';
17
- import precedenceException from './helpers/passiveVoice/periphrastic/precedenceException';
18
- import nonDirectPrecedenceException from './helpers/passiveVoice/periphrastic/freeAuxiliaryParticipleOrder/nonDirectParticiplePrecedenceException';
19
- import findMatchingEndingInArray from './helpers/morphology/findMatchingEndingInArray';
20
- import * as regexHelpers from './helpers/morphology/regexHelpers';
21
- import * as exceptionListHelpers from './helpers/morphology/exceptionListHelpers';
22
- import * as stemHelpers from './helpers/morphology/stemHelpers';
23
- import * as values from './values';
24
- import areWordsInSentence from './helpers/word/areWordsInSentence';
25
- import getClauses from './helpers/passiveVoice/periphrastic/getClauses';
26
- import getClausesSplitOnStopWords from './helpers/passiveVoice/periphrastic/freeAuxiliaryParticipleOrder/getClausesSplitOnStopWords';
27
- import {
28
- stripFullTags as stripHTMLTags,
29
- stripBlockTagsAtStartEnd
30
- } from './helpers/sanitize/stripHTMLTags';
31
- import sanitizeString from './helpers/sanitize/sanitizeString';
32
- import {unifyAllSpaces} from './helpers/sanitize/unifyWhitespace';
33
- import removePunctuation from './helpers/sanitize/removePunctuation';
34
- import normalizeHTML from './helpers/html/normalizeHTML';
35
- import countMetaDescriptionLength from './helpers/word/countMetaDescriptionLength';
36
- import getLanguage from './helpers/language/getLanguage';
37
- import getSentences from './helpers/sentence/getSentences';
38
- import {getFieldsToMark} from './helpers/html/getFieldsToMark';
39
- import {normalizeSingle} from './helpers/sanitize/quotes';
40
- import parseSynonyms from './helpers/sanitize/parseSynonyms';
41
- import {mergeListItems} from './helpers/sanitize/mergeListItems';
42
- import {findWordFormsInString} from './helpers/match/findKeywordFormsInString';
43
- import {collectMarkingsInSentence, markWordsInSentences} from './helpers/word/markWordsInSentences';
44
- import * as helpers from './helpers';
45
- import * as researches from './researches';
46
-
47
- export {
48
- AbstractResearcher,
49
- transliterate,
50
- replaceDiacritics,
51
- createRegexFromArray,
52
- imageInText,
53
- stripSpaces,
54
- baseStemmer,
55
- getWords,
56
- flattenSortLength,
57
- indices,
58
- buildFormRule,
59
- createRulesFromArrays,
60
- createSingleRuleFromArray,
61
- matchRegularParticiples,
62
- directPrecedenceException,
63
- precedenceException,
64
- nonDirectPrecedenceException,
65
- findMatchingEndingInArray,
66
- regexHelpers,
67
- exceptionListHelpers,
68
- stemHelpers,
69
- areWordsInSentence,
70
- values,
71
- getClauses,
72
- getClausesSplitOnStopWords,
73
- stripHTMLTags,
74
- stripBlockTagsAtStartEnd,
75
- countMetaDescriptionLength,
76
- sanitizeString,
77
- removePunctuation,
78
- getLanguage,
79
- getSentences,
80
- getFieldsToMark,
81
- unifyAllSpaces,
82
- normalizeHTML,
83
- collectMarkingsInSentence,
84
- normalizeSingle,
85
- parseSynonyms,
86
- mergeListItems,
87
- findWordFormsInString,
88
- markWordsInSentences,
89
- helpers,
90
- researches
91
- };
@@ -1,34 +0,0 @@
1
- import {languageProcessing} from '../../../index';
2
- const {AbstractResearcher} = languageProcessing;
3
-
4
- // All helpers
5
- import getStemmer from './helpers/getStemmer';
6
-
7
- /**
8
- * The researcher contains all the researches, helpers, data, and config.
9
- */
10
- export default class Researcher extends AbstractResearcher {
11
- /**
12
- * Constructor
13
- * @param {Paper} paper The Paper object that is needed within the researches.
14
- * @constructor
15
- */
16
- constructor(paper) {
17
- super(paper);
18
-
19
- // Deletes researches that are not available for languages that we haven't supported yet.
20
- delete this.defaultResearches.getFleschReadingScore;
21
- delete this.defaultResearches.getPassiveVoiceResult;
22
- delete this.defaultResearches.getSentenceBeginnings;
23
- delete this.defaultResearches.findTransitionWords;
24
- delete this.defaultResearches.functionWordsInKeyphrase;
25
-
26
- Object.assign(this.config, {
27
- functionWords: []
28
- });
29
-
30
- Object.assign(this.helpers, {
31
- getStemmer
32
- });
33
- }
34
- }
@@ -1,11 +0,0 @@
1
- import {languageProcessing} from '../../../index';
2
- const {baseStemmer} = languageProcessing;
3
-
4
- /**
5
- * Returns the stemmer for a researcher.
6
- *
7
- * @returns {Function} The stemmer.
8
- */
9
- export default function getStemmer() {
10
- return baseStemmer;
11
- }
@@ -1,46 +0,0 @@
1
- import {languageProcessing} from '../../../index';
2
- const {AbstractResearcher} = languageProcessing;
3
-
4
- // All config
5
- import firstWordExceptions from './config/firstWordExceptions';
6
- import {all as functionWords} from './config/functionWords';
7
- import transitionWords from './config/transitionWords';
8
- import twoPartTransitionWords from './config/twoPartTransitionWords';
9
- import {PREFIXED_FUNCTION_WORDS_REGEX} from './config/prefixedFunctionWords';
10
-
11
- // All helpers
12
- import {createBasicWordForms} from './helpers/createBasicWordForms';
13
- import getStemmer from './helpers/getStemmer';
14
- import isPassiveSentence from './helpers/isPassiveSentence';
15
-
16
- /**
17
- * The researcher contains all the researches, helpers, data, and config.
18
- */
19
- export default class Researcher extends AbstractResearcher {
20
- /**
21
- * Constructor
22
- * @param {Paper} paper The Paper object that is needed within the researches.
23
- * @constructor
24
- */
25
- constructor(paper) {
26
- super(paper);
27
-
28
- delete this.defaultResearches.getFleschReadingScore;
29
-
30
- Object.assign(this.config, {
31
- language: 'ar',
32
- passiveConstructionType: 'morphological',
33
- firstWordExceptions,
34
- functionWords,
35
- transitionWords,
36
- twoPartTransitionWords,
37
- prefixedFunctionWordsRegex: PREFIXED_FUNCTION_WORDS_REGEX
38
- });
39
-
40
- Object.assign(this.helpers, {
41
- createBasicWordForms,
42
- getStemmer,
43
- isPassiveSentence
44
- });
45
- }
46
- }
@@ -1,14 +0,0 @@
1
- /**
2
- * Returns an array with exceptions for the sentence beginning researcher.
3
- * @returns {Array} The array filled with exceptions.
4
- */
5
- export default [
6
- // Articles (those which are not prefixes):
7
- "قليل", "بعض", "واحد",
8
- // Numbers 1-10:
9
- "واحد", "إثنان", "ثلاثة", "أربعة", "خمسة", "ستة", "سبعة", "ثمانية", "تسعة", "عشرة",
10
- // Demonstrative pronouns:
11
- "هذا", "هذه", "ذلك", "تلك", "هذين", "هذان", "هتين", "هتان", "هؤلا", "أولائك", "هؤلاء",
12
- ];
13
-
14
-