axyseo 2.0.0-alpha.0.0.6 → 2.0.0-alpha.0.0.9

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 (263) hide show
  1. package/build/languageProcessing/helpers/highlighting/getMarkingsInSentence.js +1 -1
  2. package/build/languageProcessing/helpers/highlighting/getMarkingsInSentence.js.map +1 -1
  3. package/build/languageProcessing/helpers/morphology/buildTopicStems.js +1 -1
  4. package/build/languageProcessing/helpers/morphology/buildTopicStems.js.map +1 -1
  5. package/build/languageProcessing/helpers/morphology/getAllWordsFromPaper.js +1 -1
  6. package/build/languageProcessing/helpers/morphology/getAllWordsFromPaper.js.map +1 -1
  7. package/build/languageProcessing/languages/_default/Researcher.js +1 -1
  8. package/build/languageProcessing/languages/_default/Researcher.js.map +1 -1
  9. package/build/languageProcessing/languages/_default/helpers/getStemmer.js +1 -1
  10. package/build/languageProcessing/languages/_default/helpers/getStemmer.js.map +1 -1
  11. package/build/languageProcessing/languages/ar/Researcher.js +1 -1
  12. package/build/languageProcessing/languages/ar/Researcher.js.map +1 -1
  13. package/build/languageProcessing/languages/ar/helpers/getStemmer.js +1 -1
  14. package/build/languageProcessing/languages/ar/helpers/getStemmer.js.map +1 -1
  15. package/build/languageProcessing/languages/ar/helpers/isPassiveSentence.js +1 -1
  16. package/build/languageProcessing/languages/ar/helpers/isPassiveSentence.js.map +1 -1
  17. package/build/languageProcessing/languages/ca/Researcher.js +1 -1
  18. package/build/languageProcessing/languages/ca/Researcher.js.map +1 -1
  19. package/build/languageProcessing/languages/ca/helpers/getStemmer.js +1 -1
  20. package/build/languageProcessing/languages/ca/helpers/getStemmer.js.map +1 -1
  21. package/build/languageProcessing/languages/cs/Researcher.js +1 -1
  22. package/build/languageProcessing/languages/cs/Researcher.js.map +1 -1
  23. package/build/languageProcessing/languages/cs/helpers/getClauses.js +1 -1
  24. package/build/languageProcessing/languages/cs/helpers/getClauses.js.map +1 -1
  25. package/build/languageProcessing/languages/cs/helpers/getStemmer.js +1 -1
  26. package/build/languageProcessing/languages/cs/helpers/getStemmer.js.map +1 -1
  27. package/build/languageProcessing/languages/cs/helpers/internal/getParticiples.js +1 -1
  28. package/build/languageProcessing/languages/cs/helpers/internal/getParticiples.js.map +1 -1
  29. package/build/languageProcessing/languages/cs/values/Clause.js +1 -1
  30. package/build/languageProcessing/languages/cs/values/Clause.js.map +1 -1
  31. package/build/languageProcessing/languages/de/Researcher.js +1 -1
  32. package/build/languageProcessing/languages/de/Researcher.js.map +1 -1
  33. package/build/languageProcessing/languages/de/helpers/calculateFleschReadingScore.js +1 -1
  34. package/build/languageProcessing/languages/de/helpers/calculateFleschReadingScore.js.map +1 -1
  35. package/build/languageProcessing/languages/de/helpers/getClauses.js +1 -1
  36. package/build/languageProcessing/languages/de/helpers/getClauses.js.map +1 -1
  37. package/build/languageProcessing/languages/de/helpers/getStemmer.js +1 -1
  38. package/build/languageProcessing/languages/de/helpers/getStemmer.js.map +1 -1
  39. package/build/languageProcessing/languages/de/helpers/internal/determineStem.js +1 -1
  40. package/build/languageProcessing/languages/de/helpers/internal/determineStem.js.map +1 -1
  41. package/build/languageProcessing/languages/de/helpers/internal/getParticiples.js +1 -1
  42. package/build/languageProcessing/languages/de/helpers/internal/getParticiples.js.map +1 -1
  43. package/build/languageProcessing/languages/de/values/Clause.js +1 -1
  44. package/build/languageProcessing/languages/de/values/Clause.js.map +1 -1
  45. package/build/languageProcessing/languages/el/Researcher.js +1 -1
  46. package/build/languageProcessing/languages/el/Researcher.js.map +1 -1
  47. package/build/languageProcessing/languages/el/helpers/getClauses.js +1 -1
  48. package/build/languageProcessing/languages/el/helpers/getClauses.js.map +1 -1
  49. package/build/languageProcessing/languages/el/helpers/getStemmer.js +1 -1
  50. package/build/languageProcessing/languages/el/helpers/getStemmer.js.map +1 -1
  51. package/build/languageProcessing/languages/el/helpers/internal/getParticiples.js +1 -1
  52. package/build/languageProcessing/languages/el/helpers/internal/getParticiples.js.map +1 -1
  53. package/build/languageProcessing/languages/el/helpers/isPassiveSentence.js +1 -1
  54. package/build/languageProcessing/languages/el/helpers/isPassiveSentence.js.map +1 -1
  55. package/build/languageProcessing/languages/el/values/Clause.js +1 -1
  56. package/build/languageProcessing/languages/el/values/Clause.js.map +1 -1
  57. package/build/languageProcessing/languages/en/Researcher.js +1 -1
  58. package/build/languageProcessing/languages/en/Researcher.js.map +1 -1
  59. package/build/languageProcessing/languages/en/helpers/calculateFleschReadingScore.js +1 -1
  60. package/build/languageProcessing/languages/en/helpers/calculateFleschReadingScore.js.map +1 -1
  61. package/build/languageProcessing/languages/en/helpers/getClauses.js +1 -1
  62. package/build/languageProcessing/languages/en/helpers/getClauses.js.map +1 -1
  63. package/build/languageProcessing/languages/en/helpers/getStemmer.js +1 -1
  64. package/build/languageProcessing/languages/en/helpers/getStemmer.js.map +1 -1
  65. package/build/languageProcessing/languages/en/helpers/internal/determineStem.js +1 -1
  66. package/build/languageProcessing/languages/en/helpers/internal/determineStem.js.map +1 -1
  67. package/build/languageProcessing/languages/en/helpers/internal/getAdjectiveStem.js +1 -1
  68. package/build/languageProcessing/languages/en/helpers/internal/getAdjectiveStem.js.map +1 -1
  69. package/build/languageProcessing/languages/en/helpers/internal/getParticiples.js +1 -1
  70. package/build/languageProcessing/languages/en/helpers/internal/getParticiples.js.map +1 -1
  71. package/build/languageProcessing/languages/en/helpers/internal/getVerbStem.js +1 -1
  72. package/build/languageProcessing/languages/en/helpers/internal/getVerbStem.js.map +1 -1
  73. package/build/languageProcessing/languages/en/values/Clause.js +1 -1
  74. package/build/languageProcessing/languages/en/values/Clause.js.map +1 -1
  75. package/build/languageProcessing/languages/es/Researcher.js +1 -1
  76. package/build/languageProcessing/languages/es/Researcher.js.map +1 -1
  77. package/build/languageProcessing/languages/es/helpers/calculateFleschReadingScore.js +1 -1
  78. package/build/languageProcessing/languages/es/helpers/calculateFleschReadingScore.js.map +1 -1
  79. package/build/languageProcessing/languages/es/helpers/getClauses.js +1 -1
  80. package/build/languageProcessing/languages/es/helpers/getClauses.js.map +1 -1
  81. package/build/languageProcessing/languages/es/helpers/getStemmer.js +1 -1
  82. package/build/languageProcessing/languages/es/helpers/getStemmer.js.map +1 -1
  83. package/build/languageProcessing/languages/es/helpers/internal/checkVerbStemModifications.js +3 -3
  84. package/build/languageProcessing/languages/es/helpers/internal/checkVerbStemModifications.js.map +1 -1
  85. package/build/languageProcessing/languages/es/helpers/internal/getParticiples.js +1 -1
  86. package/build/languageProcessing/languages/es/helpers/internal/getParticiples.js.map +1 -1
  87. package/build/languageProcessing/languages/es/helpers/internal/stem.js +1 -1
  88. package/build/languageProcessing/languages/es/helpers/internal/stem.js.map +1 -1
  89. package/build/languageProcessing/languages/es/values/Clause.js +1 -1
  90. package/build/languageProcessing/languages/es/values/Clause.js.map +1 -1
  91. package/build/languageProcessing/languages/fa/Researcher.js +1 -1
  92. package/build/languageProcessing/languages/fa/Researcher.js.map +1 -1
  93. package/build/languageProcessing/languages/fa/helpers/createBasicWordForms.js +1 -1
  94. package/build/languageProcessing/languages/fa/helpers/createBasicWordForms.js.map +1 -1
  95. package/build/languageProcessing/languages/fa/helpers/getStemmer.js +1 -1
  96. package/build/languageProcessing/languages/fa/helpers/getStemmer.js.map +1 -1
  97. package/build/languageProcessing/languages/fa/helpers/isPassiveSentence.js +1 -1
  98. package/build/languageProcessing/languages/fa/helpers/isPassiveSentence.js.map +1 -1
  99. package/build/languageProcessing/languages/fr/Researcher.js +1 -1
  100. package/build/languageProcessing/languages/fr/Researcher.js.map +1 -1
  101. package/build/languageProcessing/languages/fr/helpers/calculateFleschReadingScore.js +1 -1
  102. package/build/languageProcessing/languages/fr/helpers/calculateFleschReadingScore.js.map +1 -1
  103. package/build/languageProcessing/languages/fr/helpers/getClauses.js +1 -1
  104. package/build/languageProcessing/languages/fr/helpers/getClauses.js.map +1 -1
  105. package/build/languageProcessing/languages/fr/helpers/getStemmer.js +1 -1
  106. package/build/languageProcessing/languages/fr/helpers/getStemmer.js.map +1 -1
  107. package/build/languageProcessing/languages/fr/helpers/internal/getParticiples.js +1 -1
  108. package/build/languageProcessing/languages/fr/helpers/internal/getParticiples.js.map +1 -1
  109. package/build/languageProcessing/languages/fr/helpers/internal/stem.js +1 -1
  110. package/build/languageProcessing/languages/fr/helpers/internal/stem.js.map +1 -1
  111. package/build/languageProcessing/languages/fr/values/Clause.js +1 -1
  112. package/build/languageProcessing/languages/fr/values/Clause.js.map +1 -1
  113. package/build/languageProcessing/languages/he/Researcher.js +1 -1
  114. package/build/languageProcessing/languages/he/Researcher.js.map +1 -1
  115. package/build/languageProcessing/languages/he/helpers/getStemmer.js +1 -1
  116. package/build/languageProcessing/languages/he/helpers/getStemmer.js.map +1 -1
  117. package/build/languageProcessing/languages/he/helpers/isPassiveSentence.js +1 -1
  118. package/build/languageProcessing/languages/he/helpers/isPassiveSentence.js.map +1 -1
  119. package/build/languageProcessing/languages/hu/Researcher.js +1 -1
  120. package/build/languageProcessing/languages/hu/Researcher.js.map +1 -1
  121. package/build/languageProcessing/languages/hu/helpers/getClauses.js +1 -1
  122. package/build/languageProcessing/languages/hu/helpers/getClauses.js.map +1 -1
  123. package/build/languageProcessing/languages/hu/helpers/getStemmer.js +1 -1
  124. package/build/languageProcessing/languages/hu/helpers/getStemmer.js.map +1 -1
  125. package/build/languageProcessing/languages/hu/helpers/internal/getParticiples.js +1 -1
  126. package/build/languageProcessing/languages/hu/helpers/internal/getParticiples.js.map +1 -1
  127. package/build/languageProcessing/languages/hu/helpers/isPassiveSentence.js +1 -1
  128. package/build/languageProcessing/languages/hu/helpers/isPassiveSentence.js.map +1 -1
  129. package/build/languageProcessing/languages/hu/values/Clause.js +1 -1
  130. package/build/languageProcessing/languages/hu/values/Clause.js.map +1 -1
  131. package/build/languageProcessing/languages/id/Researcher.js +1 -1
  132. package/build/languageProcessing/languages/id/Researcher.js.map +1 -1
  133. package/build/languageProcessing/languages/id/helpers/getStemmer.js +1 -1
  134. package/build/languageProcessing/languages/id/helpers/getStemmer.js.map +1 -1
  135. package/build/languageProcessing/languages/id/helpers/internal/stem.js +1 -1
  136. package/build/languageProcessing/languages/id/helpers/internal/stem.js.map +1 -1
  137. package/build/languageProcessing/languages/id/helpers/internal/stemHelpers.js +1 -1
  138. package/build/languageProcessing/languages/id/helpers/internal/stemHelpers.js.map +1 -1
  139. package/build/languageProcessing/languages/id/helpers/isPassiveSentence.js +1 -1
  140. package/build/languageProcessing/languages/id/helpers/isPassiveSentence.js.map +1 -1
  141. package/build/languageProcessing/languages/it/Researcher.js +1 -1
  142. package/build/languageProcessing/languages/it/Researcher.js.map +1 -1
  143. package/build/languageProcessing/languages/it/helpers/getClauses.js +1 -1
  144. package/build/languageProcessing/languages/it/helpers/getClauses.js.map +1 -1
  145. package/build/languageProcessing/languages/it/helpers/getStemmer.js +1 -1
  146. package/build/languageProcessing/languages/it/helpers/getStemmer.js.map +1 -1
  147. package/build/languageProcessing/languages/it/helpers/internal/getParticiples.js +1 -1
  148. package/build/languageProcessing/languages/it/helpers/internal/getParticiples.js.map +1 -1
  149. package/build/languageProcessing/languages/it/helpers/internal/stem.js +1 -1
  150. package/build/languageProcessing/languages/it/helpers/internal/stem.js.map +1 -1
  151. package/build/languageProcessing/languages/it/values/Clause.js +1 -1
  152. package/build/languageProcessing/languages/it/values/Clause.js.map +1 -1
  153. package/build/languageProcessing/languages/ja/Researcher.js +1 -1
  154. package/build/languageProcessing/languages/ja/Researcher.js.map +1 -1
  155. package/build/languageProcessing/languages/ja/helpers/countCharacters.js +1 -1
  156. package/build/languageProcessing/languages/ja/helpers/countCharacters.js.map +1 -1
  157. package/build/languageProcessing/languages/ja/helpers/customGetStemmer.js +1 -1
  158. package/build/languageProcessing/languages/ja/helpers/customGetStemmer.js.map +1 -1
  159. package/build/languageProcessing/languages/ja/helpers/getWords.js +1 -1
  160. package/build/languageProcessing/languages/ja/helpers/getWords.js.map +1 -1
  161. package/build/languageProcessing/languages/nb/Researcher.js +1 -1
  162. package/build/languageProcessing/languages/nb/Researcher.js.map +1 -1
  163. package/build/languageProcessing/languages/nb/helpers/getClauses.js +1 -1
  164. package/build/languageProcessing/languages/nb/helpers/getClauses.js.map +1 -1
  165. package/build/languageProcessing/languages/nb/helpers/getStemmer.js +1 -1
  166. package/build/languageProcessing/languages/nb/helpers/getStemmer.js.map +1 -1
  167. package/build/languageProcessing/languages/nb/helpers/internal/getParticiples.js +1 -1
  168. package/build/languageProcessing/languages/nb/helpers/internal/getParticiples.js.map +1 -1
  169. package/build/languageProcessing/languages/nb/values/Clause.js +1 -1
  170. package/build/languageProcessing/languages/nb/values/Clause.js.map +1 -1
  171. package/build/languageProcessing/languages/nl/Researcher.js +1 -1
  172. package/build/languageProcessing/languages/nl/Researcher.js.map +1 -1
  173. package/build/languageProcessing/languages/nl/helpers/getClauses.js +1 -1
  174. package/build/languageProcessing/languages/nl/helpers/getClauses.js.map +1 -1
  175. package/build/languageProcessing/languages/nl/helpers/getStemmer.js +1 -1
  176. package/build/languageProcessing/languages/nl/helpers/getStemmer.js.map +1 -1
  177. package/build/languageProcessing/languages/nl/helpers/internal/checkExceptionsWithFullForms.js +1 -1
  178. package/build/languageProcessing/languages/nl/helpers/internal/checkExceptionsWithFullForms.js.map +1 -1
  179. package/build/languageProcessing/languages/nl/helpers/internal/detectAndStemRegularParticiple.js +1 -1
  180. package/build/languageProcessing/languages/nl/helpers/internal/detectAndStemRegularParticiple.js.map +1 -1
  181. package/build/languageProcessing/languages/nl/helpers/internal/determineStem.js +1 -1
  182. package/build/languageProcessing/languages/nl/helpers/internal/determineStem.js.map +1 -1
  183. package/build/languageProcessing/languages/nl/helpers/internal/getParticiples.js +1 -1
  184. package/build/languageProcessing/languages/nl/helpers/internal/getParticiples.js.map +1 -1
  185. package/build/languageProcessing/languages/nl/helpers/internal/getStemWordsWithTAndDEnding.js +1 -1
  186. package/build/languageProcessing/languages/nl/helpers/internal/getStemWordsWithTAndDEnding.js.map +1 -1
  187. package/build/languageProcessing/languages/nl/helpers/internal/stem.js +1 -1
  188. package/build/languageProcessing/languages/nl/helpers/internal/stem.js.map +1 -1
  189. package/build/languageProcessing/languages/nl/helpers/internal/stemModificationHelpers.js +1 -1
  190. package/build/languageProcessing/languages/nl/helpers/internal/stemModificationHelpers.js.map +1 -1
  191. package/build/languageProcessing/languages/nl/helpers/internal/stemTOrDFromEndOfWord.js +1 -1
  192. package/build/languageProcessing/languages/nl/helpers/internal/stemTOrDFromEndOfWord.js.map +1 -1
  193. package/build/languageProcessing/languages/nl/values/Clause.js +1 -1
  194. package/build/languageProcessing/languages/nl/values/Clause.js.map +1 -1
  195. package/build/languageProcessing/languages/pl/Researcher.js +1 -1
  196. package/build/languageProcessing/languages/pl/Researcher.js.map +1 -1
  197. package/build/languageProcessing/languages/pl/helpers/getClauses.js +1 -1
  198. package/build/languageProcessing/languages/pl/helpers/getClauses.js.map +1 -1
  199. package/build/languageProcessing/languages/pl/helpers/getStemmer.js +1 -1
  200. package/build/languageProcessing/languages/pl/helpers/getStemmer.js.map +1 -1
  201. package/build/languageProcessing/languages/pl/helpers/internal/getParticiples.js +1 -1
  202. package/build/languageProcessing/languages/pl/helpers/internal/getParticiples.js.map +1 -1
  203. package/build/languageProcessing/languages/pl/values/Clause.js +1 -1
  204. package/build/languageProcessing/languages/pl/values/Clause.js.map +1 -1
  205. package/build/languageProcessing/languages/pt/Researcher.js +1 -1
  206. package/build/languageProcessing/languages/pt/Researcher.js.map +1 -1
  207. package/build/languageProcessing/languages/pt/helpers/getClauses.js +1 -1
  208. package/build/languageProcessing/languages/pt/helpers/getClauses.js.map +1 -1
  209. package/build/languageProcessing/languages/pt/helpers/getStemmer.js +1 -1
  210. package/build/languageProcessing/languages/pt/helpers/getStemmer.js.map +1 -1
  211. package/build/languageProcessing/languages/pt/helpers/internal/getParticiples.js +1 -1
  212. package/build/languageProcessing/languages/pt/helpers/internal/getParticiples.js.map +1 -1
  213. package/build/languageProcessing/languages/pt/helpers/internal/stem.js +1 -1
  214. package/build/languageProcessing/languages/pt/helpers/internal/stem.js.map +1 -1
  215. package/build/languageProcessing/languages/pt/values/Clause.js +1 -1
  216. package/build/languageProcessing/languages/pt/values/Clause.js.map +1 -1
  217. package/build/languageProcessing/languages/ru/Researcher.js +1 -1
  218. package/build/languageProcessing/languages/ru/Researcher.js.map +1 -1
  219. package/build/languageProcessing/languages/ru/helpers/getStemmer.js +1 -1
  220. package/build/languageProcessing/languages/ru/helpers/getStemmer.js.map +1 -1
  221. package/build/languageProcessing/languages/ru/helpers/isPassiveSentence.js +1 -1
  222. package/build/languageProcessing/languages/ru/helpers/isPassiveSentence.js.map +1 -1
  223. package/build/languageProcessing/languages/sk/Researcher.js +1 -1
  224. package/build/languageProcessing/languages/sk/Researcher.js.map +1 -1
  225. package/build/languageProcessing/languages/sk/helpers/getClauses.js +1 -1
  226. package/build/languageProcessing/languages/sk/helpers/getClauses.js.map +1 -1
  227. package/build/languageProcessing/languages/sk/helpers/getStemmer.js +1 -1
  228. package/build/languageProcessing/languages/sk/helpers/getStemmer.js.map +1 -1
  229. package/build/languageProcessing/languages/sk/helpers/internal/getParticiples.js +1 -1
  230. package/build/languageProcessing/languages/sk/helpers/internal/getParticiples.js.map +1 -1
  231. package/build/languageProcessing/languages/sk/values/Clause.js +1 -1
  232. package/build/languageProcessing/languages/sk/values/Clause.js.map +1 -1
  233. package/build/languageProcessing/languages/sv/Researcher.js +1 -1
  234. package/build/languageProcessing/languages/sv/Researcher.js.map +1 -1
  235. package/build/languageProcessing/languages/sv/helpers/getStemmer.js +1 -1
  236. package/build/languageProcessing/languages/sv/helpers/getStemmer.js.map +1 -1
  237. package/build/languageProcessing/languages/sv/helpers/isPassiveSentence.js +1 -1
  238. package/build/languageProcessing/languages/sv/helpers/isPassiveSentence.js.map +1 -1
  239. package/build/languageProcessing/languages/tr/Researcher.js +1 -1
  240. package/build/languageProcessing/languages/tr/Researcher.js.map +1 -1
  241. package/build/languageProcessing/languages/tr/helpers/getStemmer.js +1 -1
  242. package/build/languageProcessing/languages/tr/helpers/getStemmer.js.map +1 -1
  243. package/build/languageProcessing/languages/tr/helpers/internal/stem.js +1 -1
  244. package/build/languageProcessing/languages/tr/helpers/internal/stem.js.map +1 -1
  245. package/build/languageProcessing/languages/tr/helpers/isPassiveSentence.js +1 -1
  246. package/build/languageProcessing/languages/tr/helpers/isPassiveSentence.js.map +1 -1
  247. package/build/parsedPaper/build/linguisticParsing/SentenceTokenizer.js +1 -1
  248. package/build/parsedPaper/build/linguisticParsing/SentenceTokenizer.js.map +1 -1
  249. package/build/parsedPaper/build/tree/metadata/buildTree.js +1 -1
  250. package/build/parsedPaper/build/tree/metadata/buildTree.js.map +1 -1
  251. package/build/scoring/assessments/assessment.js +1 -1
  252. package/build/scoring/assessments/assessment.js.map +1 -1
  253. package/build/scoring/assessments/index.js +5 -5
  254. package/build/scoring/assessments/index.js.map +1 -1
  255. package/build/scoring/assessments/readability/TransitionWordsAssessment.js +3 -3
  256. package/build/scoring/assessments/readability/TransitionWordsAssessment.js.map +1 -1
  257. package/build/scoring/assessments/seo/MetaDescriptionKeywordAssessment.js +1 -1
  258. package/build/scoring/assessments/seo/MetaDescriptionKeywordAssessment.js.map +1 -1
  259. package/build/scoring/assessments/seo/MetaTitleKeywordAssessment.js +1 -1
  260. package/build/scoring/assessments/seo/MetaTitleKeywordAssessment.js.map +1 -1
  261. package/build/scoring/helpers/assessments/recommendedKeywordCount.js +1 -1
  262. package/build/scoring/helpers/assessments/recommendedKeywordCount.js.map +1 -1
  263. package/package.json +3 -1
@@ -1 +1 @@
1
- {"version":3,"file":"Researcher.js","names":["_index","require","_firstWordExceptions","_interopRequireDefault","_functionWords","_stopWords","_transitionWords","_twoPartTransitionWords","_syllables","_sentenceLength","_getClauses","_getStemmer","_calculateFleschReadingScore","e","__esModule","default","AbstractResearcher","languageProcessing","Researcher","constructor","paper","Object","assign","config","language","passiveConstructionType","firstWordExceptions","functionWords","stopWords","transitionWords","twoPartTransitionWords","syllables","sentenceLength","helpers","getClauses","getStemmer","fleschReadingScore","exports"],"sources":["../../../../src/languageProcessing/languages/pt/Researcher.js"],"sourcesContent":["import {languageProcessing} from '../../../index';\nconst {AbstractResearcher} = languageProcessing;\n\n// All config\nimport firstWordExceptions from './config/firstWordExceptions';\nimport {all as functionWords} from './config/functionWords';\nimport stopWords from './config/stopWords';\nimport transitionWords from './config/transitionWords';\nimport twoPartTransitionWords from './config/twoPartTransitionWords';\nimport syllables from './config/syllables.json';\nimport sentenceLength from './config/sentenceLength';\n\n// All helpers\nimport getClauses from './helpers/getClauses';\nimport getStemmer from './helpers/getStemmer';\nimport fleschReadingScore from './helpers/calculateFleschReadingScore';\n\n/**\n * The researcher contains all the researches, helpers, data, and config.\n */\nexport default class Researcher extends AbstractResearcher {\n /**\n * Constructor\n * @param {Paper} paper The Paper object that is needed within the researches.\n * @constructor\n */\n constructor(paper) {\n super(paper);\n\n Object.assign(this.config, {\n language: 'pt',\n passiveConstructionType: 'periphrastic',\n firstWordExceptions,\n functionWords,\n stopWords,\n transitionWords,\n twoPartTransitionWords,\n syllables,\n sentenceLength\n });\n\n Object.assign(this.helpers, {\n getClauses,\n getStemmer,\n fleschReadingScore\n });\n }\n}\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAIA,IAAAC,oBAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,cAAA,GAAAH,OAAA;AACA,IAAAI,UAAA,GAAAF,sBAAA,CAAAF,OAAA;AACA,IAAAK,gBAAA,GAAAH,sBAAA,CAAAF,OAAA;AACA,IAAAM,uBAAA,GAAAJ,sBAAA,CAAAF,OAAA;AACA,IAAAO,UAAA,GAAAL,sBAAA,CAAAF,OAAA;AACA,IAAAQ,eAAA,GAAAN,sBAAA,CAAAF,OAAA;AAGA,IAAAS,WAAA,GAAAP,sBAAA,CAAAF,OAAA;AACA,IAAAU,WAAA,GAAAR,sBAAA,CAAAF,OAAA;AACA,IAAAW,4BAAA,GAAAT,sBAAA,CAAAF,OAAA;AAAuE,SAAAE,uBAAAU,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAdvE,MAAM;EAACG;AAAkB,CAAC,GAAGC,yBAAkB;;AAE/C;;AASA;;AAKA;AACA;AACA;AACe,MAAMC,UAAU,SAASF,kBAAkB,CAAC;EACzD;AACF;AACA;AACA;AACA;EACEG,WAAWA,CAACC,KAAK,EAAE;IACjB,KAAK,CAACA,KAAK,CAAC;IAEZC,MAAM,CAACC,MAAM,CAAC,IAAI,CAACC,MAAM,EAAE;MACzBC,QAAQ,EAAE,IAAI;MACdC,uBAAuB,EAAE,cAAc;MACvCC,mBAAmB,EAAnBA,4BAAmB;MACnBC,aAAa,EAAbA,kBAAa;MACbC,SAAS,EAATA,kBAAS;MACTC,eAAe,EAAfA,wBAAe;MACfC,sBAAsB,EAAtBA,+BAAsB;MACtBC,SAAS,EAATA,kBAAS;MACTC,cAAc,EAAdA;IACF,CAAC,CAAC;IAEFX,MAAM,CAACC,MAAM,CAAC,IAAI,CAACW,OAAO,EAAE;MAC1BC,UAAU,EAAVA,mBAAU;MACVC,UAAU,EAAVA,mBAAU;MACVC,kBAAkB,EAAlBA;IACF,CAAC,CAAC;EACJ;AACF;AAACC,OAAA,CAAAtB,OAAA,GAAAG,UAAA","ignoreList":[]}
1
+ {"version":3,"file":"Researcher.js","names":["_index","require","_firstWordExceptions","_interopRequireDefault","_functionWords","_stopWords","_transitionWords","_twoPartTransitionWords","_syllables","_sentenceLength","_getClauses","_getStemmer","_calculateFleschReadingScore","e","__esModule","default","AbstractResearcher","languageProcessing","Researcher","constructor","paper","Object","assign","config","language","passiveConstructionType","firstWordExceptions","functionWords","stopWords","transitionWords","twoPartTransitionWords","syllables","sentenceLength","helpers","getClauses","getStemmer","fleschReadingScore","exports"],"sources":["../../../../src/languageProcessing/languages/pt/Researcher.js"],"sourcesContent":["import {languageProcessing} from '@axyseo/index';\nconst {AbstractResearcher} = languageProcessing;\n\n// All config\nimport firstWordExceptions from './config/firstWordExceptions';\nimport {all as functionWords} from './config/functionWords';\nimport stopWords from './config/stopWords';\nimport transitionWords from './config/transitionWords';\nimport twoPartTransitionWords from './config/twoPartTransitionWords';\nimport syllables from './config/syllables.json';\nimport sentenceLength from './config/sentenceLength';\n\n// All helpers\nimport getClauses from './helpers/getClauses';\nimport getStemmer from './helpers/getStemmer';\nimport fleschReadingScore from './helpers/calculateFleschReadingScore';\n\n/**\n * The researcher contains all the researches, helpers, data, and config.\n */\nexport default class Researcher extends AbstractResearcher {\n /**\n * Constructor\n * @param {Paper} paper The Paper object that is needed within the researches.\n * @constructor\n */\n constructor(paper) {\n super(paper);\n\n Object.assign(this.config, {\n language: 'pt',\n passiveConstructionType: 'periphrastic',\n firstWordExceptions,\n functionWords,\n stopWords,\n transitionWords,\n twoPartTransitionWords,\n syllables,\n sentenceLength\n });\n\n Object.assign(this.helpers, {\n getClauses,\n getStemmer,\n fleschReadingScore\n });\n }\n}\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAIA,IAAAC,oBAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,cAAA,GAAAH,OAAA;AACA,IAAAI,UAAA,GAAAF,sBAAA,CAAAF,OAAA;AACA,IAAAK,gBAAA,GAAAH,sBAAA,CAAAF,OAAA;AACA,IAAAM,uBAAA,GAAAJ,sBAAA,CAAAF,OAAA;AACA,IAAAO,UAAA,GAAAL,sBAAA,CAAAF,OAAA;AACA,IAAAQ,eAAA,GAAAN,sBAAA,CAAAF,OAAA;AAGA,IAAAS,WAAA,GAAAP,sBAAA,CAAAF,OAAA;AACA,IAAAU,WAAA,GAAAR,sBAAA,CAAAF,OAAA;AACA,IAAAW,4BAAA,GAAAT,sBAAA,CAAAF,OAAA;AAAuE,SAAAE,uBAAAU,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAdvE,MAAM;EAACG;AAAkB,CAAC,GAAGC,yBAAkB;;AAE/C;;AASA;;AAKA;AACA;AACA;AACe,MAAMC,UAAU,SAASF,kBAAkB,CAAC;EACzD;AACF;AACA;AACA;AACA;EACEG,WAAWA,CAACC,KAAK,EAAE;IACjB,KAAK,CAACA,KAAK,CAAC;IAEZC,MAAM,CAACC,MAAM,CAAC,IAAI,CAACC,MAAM,EAAE;MACzBC,QAAQ,EAAE,IAAI;MACdC,uBAAuB,EAAE,cAAc;MACvCC,mBAAmB,EAAnBA,4BAAmB;MACnBC,aAAa,EAAbA,kBAAa;MACbC,SAAS,EAATA,kBAAS;MACTC,eAAe,EAAfA,wBAAe;MACfC,sBAAsB,EAAtBA,+BAAsB;MACtBC,SAAS,EAATA,kBAAS;MACTC,cAAc,EAAdA;IACF,CAAC,CAAC;IAEFX,MAAM,CAACC,MAAM,CAAC,IAAI,CAACW,OAAO,EAAE;MAC1BC,UAAU,EAAVA,mBAAU;MACVC,UAAU,EAAVA,mBAAU;MACVC,kBAAkB,EAAlBA;IACF,CAAC,CAAC;EACJ;AACF;AAACC,OAAA,CAAAtB,OAAA,GAAAG,UAAA","ignoreList":[]}
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = getPortugueseClauses;
7
- var _index = require("../../../index");
7
+ var _index = require("@axyseo/index");
8
8
  var _Clause = _interopRequireDefault(require("../values/Clause"));
9
9
  var _passiveVoiceAuxiliaries = _interopRequireDefault(require("../config/internal/passiveVoiceAuxiliaries.js"));
10
10
  var _stopWords = _interopRequireDefault(require("../config/stopWords.js"));
@@ -1 +1 @@
1
- {"version":3,"file":"getClauses.js","names":["_index","require","_Clause","_interopRequireDefault","_passiveVoiceAuxiliaries","_stopWords","e","__esModule","default","createRegexFromArray","getClauses","languageProcessing","followingAuxiliaryExceptionWords","options","Clause","PortugueseClause","stopwords","auxiliaries","regexes","auxiliaryRegex","stopCharacterRegex","followingAuxiliaryExceptionRegex","getPortugueseClauses","sentence"],"sources":["../../../../../src/languageProcessing/languages/pt/helpers/getClauses.js"],"sourcesContent":["import {languageProcessing} from '../../../index';\nconst {createRegexFromArray, getClauses} = languageProcessing;\n\nimport PortugueseClause from '../values/Clause';\nimport auxiliaries from '../config/internal/passiveVoiceAuxiliaries.js';\nimport stopwords from '../config/stopWords.js';\nconst followingAuxiliaryExceptionWords = ['o', 'a', 'os', 'as', 'um', 'ums', 'uma', 'umas'];\n\nconst options = {\n Clause: PortugueseClause,\n stopwords: stopwords,\n auxiliaries: auxiliaries,\n regexes: {\n auxiliaryRegex: createRegexFromArray(auxiliaries),\n stopCharacterRegex: /([:,])(?=[ \\n\\r\\t'\"+\\-»«‹›<>])/gi,\n followingAuxiliaryExceptionRegex: createRegexFromArray(followingAuxiliaryExceptionWords)\n }\n};\n\n/**\n * Gets the clauses from a sentence by determining sentence breakers.\n *\n * @param {string} sentence The sentence to split up into clauses.\n *\n * @returns {Array} The array with all clauses that have an auxiliary.\n */\nexport default function getPortugueseClauses(sentence) {\n return getClauses(sentence, options);\n}\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAGA,IAAAC,OAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,wBAAA,GAAAD,sBAAA,CAAAF,OAAA;AACA,IAAAI,UAAA,GAAAF,sBAAA,CAAAF,OAAA;AAA+C,SAAAE,uBAAAG,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAJ/C,MAAM;EAACG,oBAAoB;EAAEC;AAAU,CAAC,GAAGC,yBAAkB;AAK7D,MAAMC,gCAAgC,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,CAAC;AAE3F,MAAMC,OAAO,GAAG;EACdC,MAAM,EAAEC,eAAgB;EACxBC,SAAS,EAAEA,kBAAS;EACpBC,WAAW,EAAEA,gCAAW;EACxBC,OAAO,EAAE;IACPC,cAAc,EAAEV,oBAAoB,CAACQ,gCAAW,CAAC;IACjDG,kBAAkB,EAAE,kCAAkC;IACtDC,gCAAgC,EAAEZ,oBAAoB,CAACG,gCAAgC;EACzF;AACF,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACe,SAASU,oBAAoBA,CAACC,QAAQ,EAAE;EACrD,OAAOb,UAAU,CAACa,QAAQ,EAAEV,OAAO,CAAC;AACtC","ignoreList":[]}
1
+ {"version":3,"file":"getClauses.js","names":["_index","require","_Clause","_interopRequireDefault","_passiveVoiceAuxiliaries","_stopWords","e","__esModule","default","createRegexFromArray","getClauses","languageProcessing","followingAuxiliaryExceptionWords","options","Clause","PortugueseClause","stopwords","auxiliaries","regexes","auxiliaryRegex","stopCharacterRegex","followingAuxiliaryExceptionRegex","getPortugueseClauses","sentence"],"sources":["../../../../../src/languageProcessing/languages/pt/helpers/getClauses.js"],"sourcesContent":["import {languageProcessing} from '@axyseo/index';\nconst {createRegexFromArray, getClauses} = languageProcessing;\n\nimport PortugueseClause from '../values/Clause';\nimport auxiliaries from '../config/internal/passiveVoiceAuxiliaries.js';\nimport stopwords from '../config/stopWords.js';\nconst followingAuxiliaryExceptionWords = ['o', 'a', 'os', 'as', 'um', 'ums', 'uma', 'umas'];\n\nconst options = {\n Clause: PortugueseClause,\n stopwords: stopwords,\n auxiliaries: auxiliaries,\n regexes: {\n auxiliaryRegex: createRegexFromArray(auxiliaries),\n stopCharacterRegex: /([:,])(?=[ \\n\\r\\t'\"+\\-»«‹›<>])/gi,\n followingAuxiliaryExceptionRegex: createRegexFromArray(followingAuxiliaryExceptionWords)\n }\n};\n\n/**\n * Gets the clauses from a sentence by determining sentence breakers.\n *\n * @param {string} sentence The sentence to split up into clauses.\n *\n * @returns {Array} The array with all clauses that have an auxiliary.\n */\nexport default function getPortugueseClauses(sentence) {\n return getClauses(sentence, options);\n}\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAGA,IAAAC,OAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,wBAAA,GAAAD,sBAAA,CAAAF,OAAA;AACA,IAAAI,UAAA,GAAAF,sBAAA,CAAAF,OAAA;AAA+C,SAAAE,uBAAAG,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAJ/C,MAAM;EAACG,oBAAoB;EAAEC;AAAU,CAAC,GAAGC,yBAAkB;AAK7D,MAAMC,gCAAgC,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,CAAC;AAE3F,MAAMC,OAAO,GAAG;EACdC,MAAM,EAAEC,eAAgB;EACxBC,SAAS,EAAEA,kBAAS;EACpBC,WAAW,EAAEA,gCAAW;EACxBC,OAAO,EAAE;IACPC,cAAc,EAAEV,oBAAoB,CAACQ,gCAAW,CAAC;IACjDG,kBAAkB,EAAE,kCAAkC;IACtDC,gCAAgC,EAAEZ,oBAAoB,CAACG,gCAAgC;EACzF;AACF,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACe,SAASU,oBAAoBA,CAACC,QAAQ,EAAE;EACrD,OAAOb,UAAU,CAACa,QAAQ,EAAEV,OAAO,CAAC;AACtC","ignoreList":[]}
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.default = getStemmer;
7
7
  var _lodash = require("lodash");
8
- var _index = require("../../../index");
8
+ var _index = require("@axyseo/index");
9
9
  var _stem = _interopRequireDefault(require("./internal/stem"));
10
10
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
11
11
  const {
@@ -1 +1 @@
1
- {"version":3,"file":"getStemmer.js","names":["_lodash","require","_index","_stem","_interopRequireDefault","e","__esModule","default","baseStemmer","languageProcessing","getStemmer","researcher","morphologyData","get","getData","word","stem"],"sources":["../../../../../src/languageProcessing/languages/pt/helpers/getStemmer.js"],"sourcesContent":["import {get} from 'lodash';\nimport {languageProcessing} from '../../../index';\nconst {baseStemmer} = languageProcessing;\n\nimport stem from './internal/stem';\n\n/**\n * Returns the stemmer for a researcher.\n *\n * @param {Researcher} researcher The researcher.\n *\n * @returns {Function} The stemmer.\n */\nexport default function getStemmer(researcher) {\n const morphologyData = get(researcher.getData('morphology'), 'pt', false);\n\n if (morphologyData) {\n return word => stem(word, morphologyData);\n }\n\n return baseStemmer;\n}\n"],"mappings":";;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AAGA,IAAAE,KAAA,GAAAC,sBAAA,CAAAH,OAAA;AAAmC,SAAAG,uBAAAC,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAFnC,MAAM;EAACG;AAAW,CAAC,GAAGC,yBAAkB;AAIxC;AACA;AACA;AACA;AACA;AACA;AACA;AACe,SAASC,UAAUA,CAACC,UAAU,EAAE;EAC7C,MAAMC,cAAc,GAAG,IAAAC,WAAG,EAACF,UAAU,CAACG,OAAO,CAAC,YAAY,CAAC,EAAE,IAAI,EAAE,KAAK,CAAC;EAEzE,IAAIF,cAAc,EAAE;IAClB,OAAOG,IAAI,IAAI,IAAAC,aAAI,EAACD,IAAI,EAAEH,cAAc,CAAC;EAC3C;EAEA,OAAOJ,WAAW;AACpB","ignoreList":[]}
1
+ {"version":3,"file":"getStemmer.js","names":["_lodash","require","_index","_stem","_interopRequireDefault","e","__esModule","default","baseStemmer","languageProcessing","getStemmer","researcher","morphologyData","get","getData","word","stem"],"sources":["../../../../../src/languageProcessing/languages/pt/helpers/getStemmer.js"],"sourcesContent":["import {get} from 'lodash';\nimport {languageProcessing} from '@axyseo/index';\nconst {baseStemmer} = languageProcessing;\n\nimport stem from './internal/stem';\n\n/**\n * Returns the stemmer for a researcher.\n *\n * @param {Researcher} researcher The researcher.\n *\n * @returns {Function} The stemmer.\n */\nexport default function getStemmer(researcher) {\n const morphologyData = get(researcher.getData('morphology'), 'pt', false);\n\n if (morphologyData) {\n return word => stem(word, morphologyData);\n }\n\n return baseStemmer;\n}\n"],"mappings":";;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AAGA,IAAAE,KAAA,GAAAC,sBAAA,CAAAH,OAAA;AAAmC,SAAAG,uBAAAC,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAFnC,MAAM;EAACG;AAAW,CAAC,GAAGC,yBAAkB;AAIxC;AACA;AACA;AACA;AACA;AACA;AACA;AACe,SAASC,UAAUA,CAACC,UAAU,EAAE;EAC7C,MAAMC,cAAc,GAAG,IAAAC,WAAG,EAACF,UAAU,CAACG,OAAO,CAAC,YAAY,CAAC,EAAE,IAAI,EAAE,KAAK,CAAC;EAEzE,IAAIF,cAAc,EAAE;IAClB,OAAOG,IAAI,IAAI,IAAAC,aAAI,EAACD,IAAI,EAAEH,cAAc,CAAC;EAC3C;EAEA,OAAOJ,WAAW;AACpB","ignoreList":[]}
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = getParticiples;
7
- var _index = require("../../../index");
7
+ var _index = require("@axyseo/index");
8
8
  var _passiveVoiceParticiples = _interopRequireDefault(require("../../config/internal/passiveVoiceParticiples"));
9
9
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
10
10
  const {
@@ -1 +1 @@
1
- {"version":3,"file":"getParticiples.js","names":["_index","require","_passiveVoiceParticiples","_interopRequireDefault","e","__esModule","default","getWords","languageProcessing","isParticiple","word","participleSuffixes","some","suffix","length","endsWith","stem","slice","participleStems","includes","getParticiples","clauseText","words","filter"],"sources":["../../../../../../src/languageProcessing/languages/pt/helpers/internal/getParticiples.js"],"sourcesContent":["import {languageProcessing} from '../../../index';\nconst {getWords} = languageProcessing;\n\nimport participleStems from '../../config/internal/passiveVoiceParticiples';\n\n/**\n * Checks if a Portuguese word is a participle.\n * @param {string} word A Portuguese word.\n * @returns {boolean} Returns true if word is a Portuguese participle, and false otherwise.\n */\nfunction isParticiple(word) {\n const participleSuffixes = ['a', 'o', 'as', 'os'];\n // For each participle suffixes, check if the word ends in one of them.\n return participleSuffixes.some(suffix => {\n // Make sure only possible participles are targeted (minimum length being \"> 3\")\n if (word.length > 3 && word.endsWith(suffix)) {\n // If the word ends with one of the suffixes, retrieve the stem.\n const stem = word.slice(0, -suffix.length);\n // Check if the stem is in the list of participle stems: return true if it is, otherwise return false.\n return participleStems.includes(stem);\n }\n });\n}\n\n/**\n * Creates an array of participles for the participles found in a clause.\n *\n * @param {string} clauseText The clause to find participles in.\n *\n * @returns {Array} The list with participles.\n */\nexport default function getParticiples(clauseText) {\n const words = getWords(clauseText);\n return words.filter(word => isParticiple(word));\n}\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAGA,IAAAC,wBAAA,GAAAC,sBAAA,CAAAF,OAAA;AAA4E,SAAAE,uBAAAC,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAF5E,MAAM;EAACG;AAAQ,CAAC,GAAGC,yBAAkB;AAIrC;AACA;AACA;AACA;AACA;AACA,SAASC,YAAYA,CAACC,IAAI,EAAE;EAC1B,MAAMC,kBAAkB,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,IAAI,CAAC;EACjD;EACA,OAAOA,kBAAkB,CAACC,IAAI,CAACC,MAAM,IAAI;IACvC;IACA,IAAIH,IAAI,CAACI,MAAM,GAAG,CAAC,IAAIJ,IAAI,CAACK,QAAQ,CAACF,MAAM,CAAC,EAAE;MAC5C;MACA,MAAMG,IAAI,GAAGN,IAAI,CAACO,KAAK,CAAC,CAAC,EAAE,CAACJ,MAAM,CAACC,MAAM,CAAC;MAC1C;MACA,OAAOI,gCAAe,CAACC,QAAQ,CAACH,IAAI,CAAC;IACvC;EACF,CAAC,CAAC;AACJ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACe,SAASI,cAAcA,CAACC,UAAU,EAAE;EACjD,MAAMC,KAAK,GAAGf,QAAQ,CAACc,UAAU,CAAC;EAClC,OAAOC,KAAK,CAACC,MAAM,CAACb,IAAI,IAAID,YAAY,CAACC,IAAI,CAAC,CAAC;AACjD","ignoreList":[]}
1
+ {"version":3,"file":"getParticiples.js","names":["_index","require","_passiveVoiceParticiples","_interopRequireDefault","e","__esModule","default","getWords","languageProcessing","isParticiple","word","participleSuffixes","some","suffix","length","endsWith","stem","slice","participleStems","includes","getParticiples","clauseText","words","filter"],"sources":["../../../../../../src/languageProcessing/languages/pt/helpers/internal/getParticiples.js"],"sourcesContent":["import {languageProcessing} from '@axyseo/index';\nconst {getWords} = languageProcessing;\n\nimport participleStems from '../../config/internal/passiveVoiceParticiples';\n\n/**\n * Checks if a Portuguese word is a participle.\n * @param {string} word A Portuguese word.\n * @returns {boolean} Returns true if word is a Portuguese participle, and false otherwise.\n */\nfunction isParticiple(word) {\n const participleSuffixes = ['a', 'o', 'as', 'os'];\n // For each participle suffixes, check if the word ends in one of them.\n return participleSuffixes.some(suffix => {\n // Make sure only possible participles are targeted (minimum length being \"> 3\")\n if (word.length > 3 && word.endsWith(suffix)) {\n // If the word ends with one of the suffixes, retrieve the stem.\n const stem = word.slice(0, -suffix.length);\n // Check if the stem is in the list of participle stems: return true if it is, otherwise return false.\n return participleStems.includes(stem);\n }\n });\n}\n\n/**\n * Creates an array of participles for the participles found in a clause.\n *\n * @param {string} clauseText The clause to find participles in.\n *\n * @returns {Array} The list with participles.\n */\nexport default function getParticiples(clauseText) {\n const words = getWords(clauseText);\n return words.filter(word => isParticiple(word));\n}\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAGA,IAAAC,wBAAA,GAAAC,sBAAA,CAAAF,OAAA;AAA4E,SAAAE,uBAAAC,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAF5E,MAAM;EAACG;AAAQ,CAAC,GAAGC,yBAAkB;AAIrC;AACA;AACA;AACA;AACA;AACA,SAASC,YAAYA,CAACC,IAAI,EAAE;EAC1B,MAAMC,kBAAkB,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,IAAI,CAAC;EACjD;EACA,OAAOA,kBAAkB,CAACC,IAAI,CAACC,MAAM,IAAI;IACvC;IACA,IAAIH,IAAI,CAACI,MAAM,GAAG,CAAC,IAAIJ,IAAI,CAACK,QAAQ,CAACF,MAAM,CAAC,EAAE;MAC5C;MACA,MAAMG,IAAI,GAAGN,IAAI,CAACO,KAAK,CAAC,CAAC,EAAE,CAACJ,MAAM,CAACC,MAAM,CAAC;MAC1C;MACA,OAAOI,gCAAe,CAACC,QAAQ,CAACH,IAAI,CAAC;IACvC;EACF,CAAC,CAAC;AACJ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACe,SAASI,cAAcA,CAACC,UAAU,EAAE;EACjD,MAAMC,KAAK,GAAGf,QAAQ,CAACc,UAAU,CAAC;EAClC,OAAOC,KAAK,CAACC,MAAM,CAACb,IAAI,IAAID,YAAY,CAACC,IAAI,CAAC,CAAC;AACjD","ignoreList":[]}
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = stem;
7
- var _index = require("../../../index");
7
+ var _index = require("@axyseo/index");
8
8
  /* eslint-disable max-statements, complexity */
9
9
 
10
10
  /*
@@ -1 +1 @@
1
- {"version":3,"file":"stem.js","names":["_index","require","findMatchingEndingInArray","languageProcessing","isVowel","character","vowels","includes","nextVowelPosition","word","start","length","position","nextConsonantPosition","replaceCharacters","charactersToReplace","replacements","i","replace","stemStandardSuffixes","standardSuffixData","r1Text","r2Text","rvText","regions","r1","r2","rv","suffixGroup","standardGroups","foundSuffix","region","suffixes","slice","replacement","specialEnding","specialClass","wordEndingsToCheck","stemVerbSuffixes","verbSuffixes","verbSuffix","stemResidualSuffixes","residualSuffixData","foundSuffixUe","groupUe","foundSuffixIe","groupIe","foundSuffixE","groupESuffixes","endsWith","cCedilla","stem","morphologyData","toLowerCase","externalStemmer","nasalVowels","originals","nasalVowelsReplacement","wordAfterStep1","standardSuffixes","wordAfterStep2","ciToC","foundGeneralSuffix","generalSuffixes","residualSuffixes"],"sources":["../../../../../../src/languageProcessing/languages/pt/helpers/internal/stem.js"],"sourcesContent":["/* eslint-disable max-statements, complexity */\n\n/*\nCopyright (c) 2015, Luís Rodrigues\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n*/\n\nimport {languageProcessing} from '../../../index';\nconst {findMatchingEndingInArray} = languageProcessing;\n\n/**\n * Checks whether the character is a vowel.\n *\n * @param {string}\t character\tThe character to check.\n * @param {string[]} vowels The Portuguese vowels.\n *\n * @returns {boolean}\tWhether the character is a vowel.\n */\nconst isVowel = function(character, vowels) {\n return vowels.includes(character);\n};\n\n/**\n * Finds the first vowel in a string after the specified index and returns the index of the character following that vowel\n * (if found).\n *\n * @param {string}\t word\t The word to check.\n * @param {string[]} vowels The Portuguese vowels.\n * @param {number}\t start The index at which the search for a vowel should begin.\n *\n * @returns {number} The index of the character following the found vowel. If this is not found, the length of the word.\n */\nconst nextVowelPosition = function(word, vowels, start) {\n const length = word.length;\n\n for (let position = start; position < length; position++) {\n if (isVowel(word[position], vowels)) {\n return position;\n }\n }\n\n return length;\n};\n\n/**\n * Finds the first consonant in a string after the specified index and returns the index of the character following that\n * consonant (if found).\n *\n * @param {string}\t word\tThe word to check.\n * @param {string[]} vowels The Portuguese vowels.\n * @param {number}\t start\tThe index at which the search for a consonant should begin.\n *\n * @returns {number} The index of the character following the found consonant. If this is not found, the length of the word.\n */\nconst nextConsonantPosition = function(word, vowels, start) {\n const length = word.length;\n\n for (let position = start; position < length; position++) {\n if (!isVowel(word[position], vowels)) {\n return position;\n }\n }\n\n return length;\n};\n\n/**\n * Replaces characters with other characters if found in a word.\n *\n * @param {string}\t\tword\t\t\t\tThe word to check.\n * @param {string[]}\tcharactersToReplace\tThe characters to replace.\n * @param {string[]}\treplacements\t\tThe replacement characters.\n *\n * @returns {string}\tThe word with the replacement characters, or the original word if no characters to replace were found.\n */\nconst replaceCharacters = function(word, charactersToReplace, replacements) {\n for (let i = 0; i < charactersToReplace.length; i++) {\n word = word.replace(charactersToReplace[i], replacements[i]);\n }\n\n return word;\n};\n\n/**\n * Looks for the longest suffix in each group and removes it if it is found within the specified region (R1, R2 or RV).\n * Once a suffix is found and removed, stops searching further.\n *\n * For some of the suffix groups, replaces the suffix with another string after removing it (e.g. -logia is replaced with\n * -log).\n *\n * @param {string}\tword\t The word to check.\n * @param {Object} standardSuffixData The data for stemming standard suffixes.\n * @param {string}\tr1Text\t The text in the R1 region.\n * @param {string}\tr2Text\t The text in the R2 region.\n * @param {string}\trvText\t The text in the RV region.\n *\n * @returns {string} The stemmed word or the original word if no suffix was removed.\n */\nconst stemStandardSuffixes = function(word, standardSuffixData, r1Text, r2Text, rvText) {\n const regions = {\n r1: r1Text,\n r2: r2Text,\n rv: rvText\n };\n\n for (const suffixGroup of standardSuffixData.standardGroups) {\n const foundSuffix = findMatchingEndingInArray(\n regions[suffixGroup.region],\n suffixGroup.suffixes\n );\n\n if (foundSuffix) {\n return word.slice(0, -foundSuffix.length) + suffixGroup.replacement;\n }\n }\n\n const specialEnding = findMatchingEndingInArray(\n regions[standardSuffixData.specialClass.region],\n standardSuffixData.specialClass.suffixes\n );\n if (\n findMatchingEndingInArray(word, standardSuffixData.specialClass.wordEndingsToCheck) &&\n specialEnding\n ) {\n word = word.slice(0, -specialEnding.length) + standardSuffixData.specialClass.replacement;\n }\n\n return word;\n};\n\n/**\n * Stems verb suffixes.\n *\n * @param {string} word The original word.\n * @param {string[]} verbSuffixes The verb suffixes to check.\n * @param {string} rvText The text of the RV.\n *\n * @returns {string} The word with the verb suffixes removed (if applicable).\n */\nconst stemVerbSuffixes = function(word, verbSuffixes, rvText) {\n const verbSuffix = findMatchingEndingInArray(rvText, verbSuffixes);\n\n if (verbSuffix !== '') {\n word = word.slice(0, -verbSuffix.length);\n }\n\n return word;\n};\n\n/**\n * Stems residual suffixes.\n *\n * @param {string}\tword\t The word to check.\n * @param {Object} residualSuffixData The data used to stem residual suffixes.\n * @param {string}\trvText\t The text in the RV region.\n *\n * @returns {string} The word with a removed suffix, or the original input word if no suffix was removed.\n */\nconst stemResidualSuffixes = function(word, residualSuffixData, rvText) {\n const foundSuffixUe = findMatchingEndingInArray(rvText, residualSuffixData.groupUe.suffixes);\n const foundSuffixIe = findMatchingEndingInArray(rvText, residualSuffixData.groupIe.suffixes);\n const foundSuffixE = findMatchingEndingInArray(rvText, residualSuffixData.groupESuffixes);\n\n if (\n foundSuffixUe &&\n findMatchingEndingInArray(word, residualSuffixData.groupUe.wordEndingsToCheck)\n ) {\n word = word.slice(0, -foundSuffixUe.length);\n } else if (\n foundSuffixIe &&\n findMatchingEndingInArray(word, residualSuffixData.groupIe.wordEndingsToCheck)\n ) {\n word = word.slice(0, -foundSuffixIe.length);\n } else if (foundSuffixE) {\n word = word.slice(0, -foundSuffixE.length);\n } else if (word.endsWith(residualSuffixData.cCedilla[0])) {\n word = word.slice(0, -1) + residualSuffixData.cCedilla[1];\n }\n\n return word;\n};\n\n/**\n * Stems Portuguese words.\n *\n * @param {string} word The word to stem.\n * @param {Object} morphologyData The Portuguese morphology data.\n *\n * @returns {string} The stemmed word.\n */\nexport default function stem(word, morphologyData) {\n word.toLowerCase();\n const vowels = morphologyData.externalStemmer.vowels;\n\n // Nasal vowels should be treated as a vowel followed by a consonant.\n const nasalVowels = morphologyData.externalStemmer.nasalVowels.originals;\n const nasalVowelsReplacement = morphologyData.externalStemmer.nasalVowels.replacements;\n word = replaceCharacters(word, nasalVowels, nasalVowelsReplacement);\n\n const length = word.length;\n if (length < 2) {\n return word;\n }\n\n let r1 = length;\n let r2 = length;\n let rv = length;\n\n /*\n * R1 is the region after the first non-vowel following a vowel, or is the null region at the end of the word if\n * there is no such non-vowel.\n */\n for (let i = 0; i < length - 1 && r1 === length; i++) {\n if (isVowel(word[i], vowels) && !isVowel(word[i + 1], vowels)) {\n r1 = i + 2;\n }\n }\n\n /*\n * R2 is the region after the first non-vowel following a vowel in R1, or is the null region at the end of the\n * word if there is no such non-vowel.\n */\n for (let i = r1; i < length - 1 && r2 === length; i++) {\n if (isVowel(word[i], vowels) && !isVowel(word[i + 1], vowels)) {\n r2 = i + 2;\n }\n }\n\n /*\n * If the second letter is a consonant, RV is the region after the next following vowel. If the first two letters are\n * vowels, RV is the region after the next consonant, and otherwise (consonant-vowel case) RV is the region after the\n * third letter. But RV is the end of the word if these positions cannot be found.\n */\n if (length > 3) {\n if (!isVowel(word[1], vowels)) {\n rv = nextVowelPosition(word, vowels, 2) + 1;\n } else if (isVowel(word[0], vowels) && isVowel(word[1], vowels)) {\n rv = nextConsonantPosition(word, vowels, 2) + 1;\n } else {\n rv = 3;\n }\n }\n\n const r1Text = word.slice(r1);\n const r2Text = word.slice(r2);\n let rvText = word.slice(rv);\n\n // Go through the first step of removing suffixes.\n const wordAfterStep1 = stemStandardSuffixes(\n word,\n morphologyData.externalStemmer.standardSuffixes,\n r1Text,\n r2Text,\n rvText\n );\n\n // If no suffixes were removed in the first step, search for and remove verb suffixes.\n let wordAfterStep2 = '';\n\n if (word === wordAfterStep1) {\n wordAfterStep2 = stemVerbSuffixes(word, morphologyData.externalStemmer.verbSuffixes, rvText);\n }\n\n // If suffixes were removed in one of the previous steps, replace the word with the de-suffixed word and adjust RV text.\n if (word !== wordAfterStep1) {\n word = wordAfterStep1;\n rvText = word.slice(rv);\n } else if (word !== wordAfterStep2) {\n word = wordAfterStep2;\n rvText = word.slice(rv);\n }\n\n /*\n * If a suffix was removed in one of the two previous steps, remove -i if preceded by -c and in RV. If no suffix was\n * removed in one of the previous steps, remove -os, -a, -i, -o, -á, í, or ó if in RV.\n */\n if (wordAfterStep1 !== word || wordAfterStep2 !== word) {\n if (\n word.endsWith(morphologyData.externalStemmer.ciToC[0]) &&\n rvText.endsWith(morphologyData.externalStemmer.ciToC[1])\n ) {\n word = word.slice(0, -1);\n rvText = word.slice(rv);\n }\n } else {\n const foundGeneralSuffix = findMatchingEndingInArray(\n rvText,\n morphologyData.externalStemmer.generalSuffixes\n );\n if (foundGeneralSuffix !== '') {\n word = word.slice(0, -foundGeneralSuffix.length);\n rvText = word.slice(rv);\n }\n }\n\n // Stem residual suffixes, regardless of whether a suffix was removed in any of the previous steps or not.\n word = stemResidualSuffixes(word, morphologyData.externalStemmer.residualSuffixes, rvText);\n\n // Change the nasal vowel replacements back into the nasal vowels.\n word = replaceCharacters(word, nasalVowelsReplacement, nasalVowels);\n\n return word;\n}\n"],"mappings":";;;;;;AAuBA,IAAAA,MAAA,GAAAC,OAAA;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CAAC,CAAC,EAAE,CAAC6B,kBAAkB,CAACnD,MAAM,CAAC;MAChDY,MAAM,GAAGd,IAAI,CAACwB,KAAK,CAACN,EAAE,CAAC;IACzB;EACF;;EAEA;EACAlB,IAAI,GAAGgC,oBAAoB,CAAChC,IAAI,EAAE2C,cAAc,CAACE,eAAe,CAACU,gBAAgB,EAAEzC,MAAM,CAAC;;EAE1F;EACAd,IAAI,GAAGK,iBAAiB,CAACL,IAAI,EAAEgD,sBAAsB,EAAEF,WAAW,CAAC;EAEnE,OAAO9C,IAAI;AACb","ignoreList":[]}
1
+ {"version":3,"file":"stem.js","names":["_index","require","findMatchingEndingInArray","languageProcessing","isVowel","character","vowels","includes","nextVowelPosition","word","start","length","position","nextConsonantPosition","replaceCharacters","charactersToReplace","replacements","i","replace","stemStandardSuffixes","standardSuffixData","r1Text","r2Text","rvText","regions","r1","r2","rv","suffixGroup","standardGroups","foundSuffix","region","suffixes","slice","replacement","specialEnding","specialClass","wordEndingsToCheck","stemVerbSuffixes","verbSuffixes","verbSuffix","stemResidualSuffixes","residualSuffixData","foundSuffixUe","groupUe","foundSuffixIe","groupIe","foundSuffixE","groupESuffixes","endsWith","cCedilla","stem","morphologyData","toLowerCase","externalStemmer","nasalVowels","originals","nasalVowelsReplacement","wordAfterStep1","standardSuffixes","wordAfterStep2","ciToC","foundGeneralSuffix","generalSuffixes","residualSuffixes"],"sources":["../../../../../../src/languageProcessing/languages/pt/helpers/internal/stem.js"],"sourcesContent":["/* eslint-disable max-statements, complexity */\n\n/*\nCopyright (c) 2015, Luís Rodrigues\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n*/\n\nimport {languageProcessing} from '@axyseo/index';\nconst {findMatchingEndingInArray} = languageProcessing;\n\n/**\n * Checks whether the character is a vowel.\n *\n * @param {string}\t character\tThe character to check.\n * @param {string[]} vowels The Portuguese vowels.\n *\n * @returns {boolean}\tWhether the character is a vowel.\n */\nconst isVowel = function(character, vowels) {\n return vowels.includes(character);\n};\n\n/**\n * Finds the first vowel in a string after the specified index and returns the index of the character following that vowel\n * (if found).\n *\n * @param {string}\t word\t The word to check.\n * @param {string[]} vowels The Portuguese vowels.\n * @param {number}\t start The index at which the search for a vowel should begin.\n *\n * @returns {number} The index of the character following the found vowel. If this is not found, the length of the word.\n */\nconst nextVowelPosition = function(word, vowels, start) {\n const length = word.length;\n\n for (let position = start; position < length; position++) {\n if (isVowel(word[position], vowels)) {\n return position;\n }\n }\n\n return length;\n};\n\n/**\n * Finds the first consonant in a string after the specified index and returns the index of the character following that\n * consonant (if found).\n *\n * @param {string}\t word\tThe word to check.\n * @param {string[]} vowels The Portuguese vowels.\n * @param {number}\t start\tThe index at which the search for a consonant should begin.\n *\n * @returns {number} The index of the character following the found consonant. If this is not found, the length of the word.\n */\nconst nextConsonantPosition = function(word, vowels, start) {\n const length = word.length;\n\n for (let position = start; position < length; position++) {\n if (!isVowel(word[position], vowels)) {\n return position;\n }\n }\n\n return length;\n};\n\n/**\n * Replaces characters with other characters if found in a word.\n *\n * @param {string}\t\tword\t\t\t\tThe word to check.\n * @param {string[]}\tcharactersToReplace\tThe characters to replace.\n * @param {string[]}\treplacements\t\tThe replacement characters.\n *\n * @returns {string}\tThe word with the replacement characters, or the original word if no characters to replace were found.\n */\nconst replaceCharacters = function(word, charactersToReplace, replacements) {\n for (let i = 0; i < charactersToReplace.length; i++) {\n word = word.replace(charactersToReplace[i], replacements[i]);\n }\n\n return word;\n};\n\n/**\n * Looks for the longest suffix in each group and removes it if it is found within the specified region (R1, R2 or RV).\n * Once a suffix is found and removed, stops searching further.\n *\n * For some of the suffix groups, replaces the suffix with another string after removing it (e.g. -logia is replaced with\n * -log).\n *\n * @param {string}\tword\t The word to check.\n * @param {Object} standardSuffixData The data for stemming standard suffixes.\n * @param {string}\tr1Text\t The text in the R1 region.\n * @param {string}\tr2Text\t The text in the R2 region.\n * @param {string}\trvText\t The text in the RV region.\n *\n * @returns {string} The stemmed word or the original word if no suffix was removed.\n */\nconst stemStandardSuffixes = function(word, standardSuffixData, r1Text, r2Text, rvText) {\n const regions = {\n r1: r1Text,\n r2: r2Text,\n rv: rvText\n };\n\n for (const suffixGroup of standardSuffixData.standardGroups) {\n const foundSuffix = findMatchingEndingInArray(\n regions[suffixGroup.region],\n suffixGroup.suffixes\n );\n\n if (foundSuffix) {\n return word.slice(0, -foundSuffix.length) + suffixGroup.replacement;\n }\n }\n\n const specialEnding = findMatchingEndingInArray(\n regions[standardSuffixData.specialClass.region],\n standardSuffixData.specialClass.suffixes\n );\n if (\n findMatchingEndingInArray(word, standardSuffixData.specialClass.wordEndingsToCheck) &&\n specialEnding\n ) {\n word = word.slice(0, -specialEnding.length) + standardSuffixData.specialClass.replacement;\n }\n\n return word;\n};\n\n/**\n * Stems verb suffixes.\n *\n * @param {string} word The original word.\n * @param {string[]} verbSuffixes The verb suffixes to check.\n * @param {string} rvText The text of the RV.\n *\n * @returns {string} The word with the verb suffixes removed (if applicable).\n */\nconst stemVerbSuffixes = function(word, verbSuffixes, rvText) {\n const verbSuffix = findMatchingEndingInArray(rvText, verbSuffixes);\n\n if (verbSuffix !== '') {\n word = word.slice(0, -verbSuffix.length);\n }\n\n return word;\n};\n\n/**\n * Stems residual suffixes.\n *\n * @param {string}\tword\t The word to check.\n * @param {Object} residualSuffixData The data used to stem residual suffixes.\n * @param {string}\trvText\t The text in the RV region.\n *\n * @returns {string} The word with a removed suffix, or the original input word if no suffix was removed.\n */\nconst stemResidualSuffixes = function(word, residualSuffixData, rvText) {\n const foundSuffixUe = findMatchingEndingInArray(rvText, residualSuffixData.groupUe.suffixes);\n const foundSuffixIe = findMatchingEndingInArray(rvText, residualSuffixData.groupIe.suffixes);\n const foundSuffixE = findMatchingEndingInArray(rvText, residualSuffixData.groupESuffixes);\n\n if (\n foundSuffixUe &&\n findMatchingEndingInArray(word, residualSuffixData.groupUe.wordEndingsToCheck)\n ) {\n word = word.slice(0, -foundSuffixUe.length);\n } else if (\n foundSuffixIe &&\n findMatchingEndingInArray(word, residualSuffixData.groupIe.wordEndingsToCheck)\n ) {\n word = word.slice(0, -foundSuffixIe.length);\n } else if (foundSuffixE) {\n word = word.slice(0, -foundSuffixE.length);\n } else if (word.endsWith(residualSuffixData.cCedilla[0])) {\n word = word.slice(0, -1) + residualSuffixData.cCedilla[1];\n }\n\n return word;\n};\n\n/**\n * Stems Portuguese words.\n *\n * @param {string} word The word to stem.\n * @param {Object} morphologyData The Portuguese morphology data.\n *\n * @returns {string} The stemmed word.\n */\nexport default function stem(word, morphologyData) {\n word.toLowerCase();\n const vowels = morphologyData.externalStemmer.vowels;\n\n // Nasal vowels should be treated as a vowel followed by a consonant.\n const nasalVowels = morphologyData.externalStemmer.nasalVowels.originals;\n const nasalVowelsReplacement = morphologyData.externalStemmer.nasalVowels.replacements;\n word = replaceCharacters(word, nasalVowels, nasalVowelsReplacement);\n\n const length = word.length;\n if (length < 2) {\n return word;\n }\n\n let r1 = length;\n let r2 = length;\n let rv = length;\n\n /*\n * R1 is the region after the first non-vowel following a vowel, or is the null region at the end of the word if\n * there is no such non-vowel.\n */\n for (let i = 0; i < length - 1 && r1 === length; i++) {\n if (isVowel(word[i], vowels) && !isVowel(word[i + 1], vowels)) {\n r1 = i + 2;\n }\n }\n\n /*\n * R2 is the region after the first non-vowel following a vowel in R1, or is the null region at the end of the\n * word if there is no such non-vowel.\n */\n for (let i = r1; i < length - 1 && r2 === length; i++) {\n if (isVowel(word[i], vowels) && !isVowel(word[i + 1], vowels)) {\n r2 = i + 2;\n }\n }\n\n /*\n * If the second letter is a consonant, RV is the region after the next following vowel. If the first two letters are\n * vowels, RV is the region after the next consonant, and otherwise (consonant-vowel case) RV is the region after the\n * third letter. But RV is the end of the word if these positions cannot be found.\n */\n if (length > 3) {\n if (!isVowel(word[1], vowels)) {\n rv = nextVowelPosition(word, vowels, 2) + 1;\n } else if (isVowel(word[0], vowels) && isVowel(word[1], vowels)) {\n rv = nextConsonantPosition(word, vowels, 2) + 1;\n } else {\n rv = 3;\n }\n }\n\n const r1Text = word.slice(r1);\n const r2Text = word.slice(r2);\n let rvText = word.slice(rv);\n\n // Go through the first step of removing suffixes.\n const wordAfterStep1 = stemStandardSuffixes(\n word,\n morphologyData.externalStemmer.standardSuffixes,\n r1Text,\n r2Text,\n rvText\n );\n\n // If no suffixes were removed in the first step, search for and remove verb suffixes.\n let wordAfterStep2 = '';\n\n if (word === wordAfterStep1) {\n wordAfterStep2 = stemVerbSuffixes(word, morphologyData.externalStemmer.verbSuffixes, rvText);\n }\n\n // If suffixes were removed in one of the previous steps, replace the word with the de-suffixed word and adjust RV text.\n if (word !== wordAfterStep1) {\n word = wordAfterStep1;\n rvText = word.slice(rv);\n } else if (word !== wordAfterStep2) {\n word = wordAfterStep2;\n rvText = word.slice(rv);\n }\n\n /*\n * If a suffix was removed in one of the two previous steps, remove -i if preceded by -c and in RV. If no suffix was\n * removed in one of the previous steps, remove -os, -a, -i, -o, -á, í, or ó if in RV.\n */\n if (wordAfterStep1 !== word || wordAfterStep2 !== word) {\n if (\n word.endsWith(morphologyData.externalStemmer.ciToC[0]) &&\n rvText.endsWith(morphologyData.externalStemmer.ciToC[1])\n ) {\n word = word.slice(0, -1);\n rvText = word.slice(rv);\n }\n } else {\n const foundGeneralSuffix = findMatchingEndingInArray(\n rvText,\n morphologyData.externalStemmer.generalSuffixes\n );\n if (foundGeneralSuffix !== '') {\n word = word.slice(0, -foundGeneralSuffix.length);\n rvText = word.slice(rv);\n }\n }\n\n // Stem residual suffixes, regardless of whether a suffix was removed in any of the previous steps or not.\n word = stemResidualSuffixes(word, morphologyData.externalStemmer.residualSuffixes, rvText);\n\n // Change the nasal vowel replacements back into the nasal vowels.\n word = replaceCharacters(word, nasalVowelsReplacement, nasalVowels);\n\n return word;\n}\n"],"mappings":";;;;;;AAuBA,IAAAA,MAAA,GAAAC,OAAA;AAvBA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA,MAAM;EAACC;AAAyB,CAAC,GAAGC,yBAAkB;;AAEtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,OAAO,GAAG,SAAAA,CAASC,SAAS,EAAEC,MAAM,EAAE;EAC1C,OAAOA,MAAM,CAACC,QAAQ,CAACF,SAAS,CAAC;AACnC,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMG,iBAAiB,GAAG,SAAAA,CAASC,IAAI,EAAEH,MAAM,EAAEI,KAAK,EAAE;EACtD,MAAMC,MAAM,GAAGF,IAAI,CAACE,MAAM;EAE1B,KAAK,IAAIC,QAAQ,GAAGF,KAAK,EAAEE,QAAQ,GAAGD,MAAM,EAAEC,QAAQ,EAAE,EAAE;IACxD,IAAIR,OAAO,CAACK,IAAI,CAACG,QAAQ,CAAC,EAAEN,MAAM,CAAC,EAAE;MACnC,OAAOM,QAAQ;IACjB;EACF;EAEA,OAAOD,MAAM;AACf,CAAC;;AAED;AACA;AACA;AACA;AACA;AAC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c,CAACE,eAAe,CAACO,KAAK,CAAC,CAAC,CAAC,CAAC,IACtDtC,MAAM,CAAC0B,QAAQ,CAACG,cAAc,CAACE,eAAe,CAACO,KAAK,CAAC,CAAC,CAAC,CAAC,EACxD;MACApD,IAAI,GAAGA,IAAI,CAACwB,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;MACxBV,MAAM,GAAGd,IAAI,CAACwB,KAAK,CAACN,EAAE,CAAC;IACzB;EACF,CAAC,MAAM;IACL,MAAMmC,kBAAkB,GAAG5D,yBAAyB,CAClDqB,MAAM,EACN6B,cAAc,CAACE,eAAe,CAACS,eACjC,CAAC;IACD,IAAID,kBAAkB,KAAK,EAAE,EAAE;MAC7BrD,IAAI,GAAGA,IAAI,CAACwB,KAAK,CAAC,CAAC,EAAE,CAAC6B,kBAAkB,CAACnD,MAAM,CAAC;MAChDY,MAAM,GAAGd,IAAI,CAACwB,KAAK,CAACN,EAAE,CAAC;IACzB;EACF;;EAEA;EACAlB,IAAI,GAAGgC,oBAAoB,CAAChC,IAAI,EAAE2C,cAAc,CAACE,eAAe,CAACU,gBAAgB,EAAEzC,MAAM,CAAC;;EAE1F;EACAd,IAAI,GAAGK,iBAAiB,CAACL,IAAI,EAAEgD,sBAAsB,EAAEF,WAAW,CAAC;EAEnE,OAAO9C,IAAI;AACb","ignoreList":[]}
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
- var _index = require("../../../index");
7
+ var _index = require("@axyseo/index");
8
8
  var _functionWords = require("../config/functionWords");
9
9
  var _getParticiples = _interopRequireDefault(require("../helpers/internal/getParticiples"));
10
10
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
@@ -1 +1 @@
1
- {"version":3,"file":"Clause.js","names":["_index","require","_functionWords","_getParticiples","_interopRequireDefault","e","__esModule","default","directPrecedenceException","values","languageProcessing","Clause","PortugueseClause","constructor","clauseText","auxiliaries","_participles","getParticiples","getClauseText","checkParticiples","clause","foundParticiples","filter","participle","cannotDirectlyPrecedePassiveParticiple","setPassive","length","_default","exports"],"sources":["../../../../../src/languageProcessing/languages/pt/values/Clause.js"],"sourcesContent":["import {languageProcessing} from '../../../index';\nimport {cannotDirectlyPrecedePassiveParticiple} from '../config/functionWords';\nimport getParticiples from '../helpers/internal/getParticiples';\nconst {directPrecedenceException, values} = languageProcessing;\nconst {Clause} = values;\n\n/**\n * Creates a Clause object for the Portuguese language.\n */\nclass PortugueseClause extends Clause {\n /**\n * Constructor.\n *\n * @param {string} clauseText The text of the clause.\n * @param {Array} auxiliaries The auxiliaries.\n *\n * @constructor\n */\n constructor(clauseText, auxiliaries) {\n super(clauseText, auxiliaries);\n this._participles = getParticiples(this.getClauseText());\n this.checkParticiples();\n }\n\n /**\n * Checks if any exceptions are applicable to this participle that would result in the clause not being passive.\n * If no exceptions are found, the clause is passive.\n *\n * @returns {void}\n */\n checkParticiples() {\n const clause = this.getClauseText();\n\n const foundParticiples = this.getParticiples().filter(\n participle =>\n !directPrecedenceException(clause, participle, cannotDirectlyPrecedePassiveParticiple)\n );\n\n this.setPassive(foundParticiples.length > 0);\n }\n}\n\nexport default PortugueseClause;\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,cAAA,GAAAD,OAAA;AACA,IAAAE,eAAA,GAAAC,sBAAA,CAAAH,OAAA;AAAgE,SAAAG,uBAAAC,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAChE,MAAM;EAACG,yBAAyB;EAAEC;AAAM,CAAC,GAAGC,yBAAkB;AAC9D,MAAM;EAACC;AAAM,CAAC,GAAGF,MAAM;;AAEvB;AACA;AACA;AACA,MAAMG,gBAAgB,SAASD,MAAM,CAAC;EACpC;AACF;AACA;AACA;AACA;AACA;AACA;AACA;EACEE,WAAWA,CAACC,UAAU,EAAEC,WAAW,EAAE;IACnC,KAAK,CAACD,UAAU,EAAEC,WAAW,CAAC;IAC9B,IAAI,CAACC,YAAY,GAAG,IAAAC,uBAAc,EAAC,IAAI,CAACC,aAAa,CAAC,CAAC,CAAC;IACxD,IAAI,CAACC,gBAAgB,CAAC,CAAC;EACzB;;EAEA;AACF;AACA;AACA;AACA;AACA;EACEA,gBAAgBA,CAAA,EAAG;IACjB,MAAMC,MAAM,GAAG,IAAI,CAACF,aAAa,CAAC,CAAC;IAEnC,MAAMG,gBAAgB,GAAG,IAAI,CAACJ,cAAc,CAAC,CAAC,CAACK,MAAM,CACnDC,UAAU,IACR,CAACf,yBAAyB,CAACY,MAAM,EAAEG,UAAU,EAAEC,qDAAsC,CACzF,CAAC;IAED,IAAI,CAACC,UAAU,CAACJ,gBAAgB,CAACK,MAAM,GAAG,CAAC,CAAC;EAC9C;AACF;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAArB,OAAA,GAEcK,gBAAgB","ignoreList":[]}
1
+ {"version":3,"file":"Clause.js","names":["_index","require","_functionWords","_getParticiples","_interopRequireDefault","e","__esModule","default","directPrecedenceException","values","languageProcessing","Clause","PortugueseClause","constructor","clauseText","auxiliaries","_participles","getParticiples","getClauseText","checkParticiples","clause","foundParticiples","filter","participle","cannotDirectlyPrecedePassiveParticiple","setPassive","length","_default","exports"],"sources":["../../../../../src/languageProcessing/languages/pt/values/Clause.js"],"sourcesContent":["import {languageProcessing} from '@axyseo/index';\nimport {cannotDirectlyPrecedePassiveParticiple} from '../config/functionWords';\nimport getParticiples from '../helpers/internal/getParticiples';\nconst {directPrecedenceException, values} = languageProcessing;\nconst {Clause} = values;\n\n/**\n * Creates a Clause object for the Portuguese language.\n */\nclass PortugueseClause extends Clause {\n /**\n * Constructor.\n *\n * @param {string} clauseText The text of the clause.\n * @param {Array} auxiliaries The auxiliaries.\n *\n * @constructor\n */\n constructor(clauseText, auxiliaries) {\n super(clauseText, auxiliaries);\n this._participles = getParticiples(this.getClauseText());\n this.checkParticiples();\n }\n\n /**\n * Checks if any exceptions are applicable to this participle that would result in the clause not being passive.\n * If no exceptions are found, the clause is passive.\n *\n * @returns {void}\n */\n checkParticiples() {\n const clause = this.getClauseText();\n\n const foundParticiples = this.getParticiples().filter(\n participle =>\n !directPrecedenceException(clause, participle, cannotDirectlyPrecedePassiveParticiple)\n );\n\n this.setPassive(foundParticiples.length > 0);\n }\n}\n\nexport default PortugueseClause;\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,cAAA,GAAAD,OAAA;AACA,IAAAE,eAAA,GAAAC,sBAAA,CAAAH,OAAA;AAAgE,SAAAG,uBAAAC,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAChE,MAAM;EAACG,yBAAyB;EAAEC;AAAM,CAAC,GAAGC,yBAAkB;AAC9D,MAAM;EAACC;AAAM,CAAC,GAAGF,MAAM;;AAEvB;AACA;AACA;AACA,MAAMG,gBAAgB,SAASD,MAAM,CAAC;EACpC;AACF;AACA;AACA;AACA;AACA;AACA;AACA;EACEE,WAAWA,CAACC,UAAU,EAAEC,WAAW,EAAE;IACnC,KAAK,CAACD,UAAU,EAAEC,WAAW,CAAC;IAC9B,IAAI,CAACC,YAAY,GAAG,IAAAC,uBAAc,EAAC,IAAI,CAACC,aAAa,CAAC,CAAC,CAAC;IACxD,IAAI,CAACC,gBAAgB,CAAC,CAAC;EACzB;;EAEA;AACF;AACA;AACA;AACA;AACA;EACEA,gBAAgBA,CAAA,EAAG;IACjB,MAAMC,MAAM,GAAG,IAAI,CAACF,aAAa,CAAC,CAAC;IAEnC,MAAMG,gBAAgB,GAAG,IAAI,CAACJ,cAAc,CAAC,CAAC,CAACK,MAAM,CACnDC,UAAU,IACR,CAACf,yBAAyB,CAACY,MAAM,EAAEG,UAAU,EAAEC,qDAAsC,CACzF,CAAC;IAED,IAAI,CAACC,UAAU,CAACJ,gBAAgB,CAACK,MAAM,GAAG,CAAC,CAAC;EAC9C;AACF;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAArB,OAAA,GAEcK,gBAAgB","ignoreList":[]}
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
- var _index = require("../../../index");
7
+ var _index = require("@axyseo/index");
8
8
  var _firstWordExceptions = _interopRequireDefault(require("./config/firstWordExceptions"));
9
9
  var _functionWords = require("./config/functionWords");
10
10
  var _transitionWords = _interopRequireDefault(require("./config/transitionWords"));
@@ -1 +1 @@
1
- {"version":3,"file":"Researcher.js","names":["_index","require","_firstWordExceptions","_interopRequireDefault","_functionWords","_transitionWords","_twoPartTransitionWords","_syllables","_fleschReadingEaseScores","_sentenceLength","_getStemmer","_isPassiveSentence","_calculateFleschReadingScore","e","__esModule","default","AbstractResearcher","languageProcessing","Researcher","constructor","paper","Object","assign","config","language","passiveConstructionType","firstWordExceptions","functionWords","transitionWords","twoPartTransitionWords","syllables","fleschReadingEaseScores","sentenceLength","helpers","getStemmer","isPassiveSentence","fleschReadingScore","exports"],"sources":["../../../../src/languageProcessing/languages/ru/Researcher.js"],"sourcesContent":["import {languageProcessing} from '../../../index';\nconst {AbstractResearcher} = languageProcessing;\n\n// All config\nimport firstWordExceptions from './config/firstWordExceptions';\nimport {all as functionWords} from './config/functionWords';\nimport transitionWords from './config/transitionWords';\nimport twoPartTransitionWords from './config/twoPartTransitionWords';\nimport syllables from './config/syllables.json';\nimport fleschReadingEaseScores from './config/fleschReadingEaseScores';\nimport sentenceLength from './config/sentenceLength';\n\n// All helpers\nimport getStemmer from './helpers/getStemmer';\nimport isPassiveSentence from './helpers/isPassiveSentence';\nimport fleschReadingScore from './helpers/calculateFleschReadingScore';\n\n/**\n * The researcher contains all the researches, helpers, data, and config.\n */\nexport default class Researcher extends AbstractResearcher {\n /**\n * Constructor\n * @param {Paper} paper The Paper object that is needed within the researches.\n * @constructor\n */\n constructor(paper) {\n super(paper);\n\n Object.assign(this.config, {\n language: 'ru',\n passiveConstructionType: 'morphological',\n firstWordExceptions,\n functionWords,\n transitionWords,\n twoPartTransitionWords,\n syllables,\n fleschReadingEaseScores,\n sentenceLength\n });\n\n Object.assign(this.helpers, {\n getStemmer,\n isPassiveSentence,\n fleschReadingScore\n });\n }\n}\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAIA,IAAAC,oBAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,cAAA,GAAAH,OAAA;AACA,IAAAI,gBAAA,GAAAF,sBAAA,CAAAF,OAAA;AACA,IAAAK,uBAAA,GAAAH,sBAAA,CAAAF,OAAA;AACA,IAAAM,UAAA,GAAAJ,sBAAA,CAAAF,OAAA;AACA,IAAAO,wBAAA,GAAAL,sBAAA,CAAAF,OAAA;AACA,IAAAQ,eAAA,GAAAN,sBAAA,CAAAF,OAAA;AAGA,IAAAS,WAAA,GAAAP,sBAAA,CAAAF,OAAA;AACA,IAAAU,kBAAA,GAAAR,sBAAA,CAAAF,OAAA;AACA,IAAAW,4BAAA,GAAAT,sBAAA,CAAAF,OAAA;AAAuE,SAAAE,uBAAAU,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAdvE,MAAM;EAACG;AAAkB,CAAC,GAAGC,yBAAkB;;AAE/C;;AASA;;AAKA;AACA;AACA;AACe,MAAMC,UAAU,SAASF,kBAAkB,CAAC;EACzD;AACF;AACA;AACA;AACA;EACEG,WAAWA,CAACC,KAAK,EAAE;IACjB,KAAK,CAACA,KAAK,CAAC;IAEZC,MAAM,CAACC,MAAM,CAAC,IAAI,CAACC,MAAM,EAAE;MACzBC,QAAQ,EAAE,IAAI;MACdC,uBAAuB,EAAE,eAAe;MACxCC,mBAAmB,EAAnBA,4BAAmB;MACnBC,aAAa,EAAbA,kBAAa;MACbC,eAAe,EAAfA,wBAAe;MACfC,sBAAsB,EAAtBA,+BAAsB;MACtBC,SAAS,EAATA,kBAAS;MACTC,uBAAuB,EAAvBA,gCAAuB;MACvBC,cAAc,EAAdA;IACF,CAAC,CAAC;IAEFX,MAAM,CAACC,MAAM,CAAC,IAAI,CAACW,OAAO,EAAE;MAC1BC,UAAU,EAAVA,mBAAU;MACVC,iBAAiB,EAAjBA,0BAAiB;MACjBC,kBAAkB,EAAlBA;IACF,CAAC,CAAC;EACJ;AACF;AAACC,OAAA,CAAAtB,OAAA,GAAAG,UAAA","ignoreList":[]}
1
+ {"version":3,"file":"Researcher.js","names":["_index","require","_firstWordExceptions","_interopRequireDefault","_functionWords","_transitionWords","_twoPartTransitionWords","_syllables","_fleschReadingEaseScores","_sentenceLength","_getStemmer","_isPassiveSentence","_calculateFleschReadingScore","e","__esModule","default","AbstractResearcher","languageProcessing","Researcher","constructor","paper","Object","assign","config","language","passiveConstructionType","firstWordExceptions","functionWords","transitionWords","twoPartTransitionWords","syllables","fleschReadingEaseScores","sentenceLength","helpers","getStemmer","isPassiveSentence","fleschReadingScore","exports"],"sources":["../../../../src/languageProcessing/languages/ru/Researcher.js"],"sourcesContent":["import {languageProcessing} from '@axyseo/index';\nconst {AbstractResearcher} = languageProcessing;\n\n// All config\nimport firstWordExceptions from './config/firstWordExceptions';\nimport {all as functionWords} from './config/functionWords';\nimport transitionWords from './config/transitionWords';\nimport twoPartTransitionWords from './config/twoPartTransitionWords';\nimport syllables from './config/syllables.json';\nimport fleschReadingEaseScores from './config/fleschReadingEaseScores';\nimport sentenceLength from './config/sentenceLength';\n\n// All helpers\nimport getStemmer from './helpers/getStemmer';\nimport isPassiveSentence from './helpers/isPassiveSentence';\nimport fleschReadingScore from './helpers/calculateFleschReadingScore';\n\n/**\n * The researcher contains all the researches, helpers, data, and config.\n */\nexport default class Researcher extends AbstractResearcher {\n /**\n * Constructor\n * @param {Paper} paper The Paper object that is needed within the researches.\n * @constructor\n */\n constructor(paper) {\n super(paper);\n\n Object.assign(this.config, {\n language: 'ru',\n passiveConstructionType: 'morphological',\n firstWordExceptions,\n functionWords,\n transitionWords,\n twoPartTransitionWords,\n syllables,\n fleschReadingEaseScores,\n sentenceLength\n });\n\n Object.assign(this.helpers, {\n getStemmer,\n isPassiveSentence,\n fleschReadingScore\n });\n }\n}\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAIA,IAAAC,oBAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,cAAA,GAAAH,OAAA;AACA,IAAAI,gBAAA,GAAAF,sBAAA,CAAAF,OAAA;AACA,IAAAK,uBAAA,GAAAH,sBAAA,CAAAF,OAAA;AACA,IAAAM,UAAA,GAAAJ,sBAAA,CAAAF,OAAA;AACA,IAAAO,wBAAA,GAAAL,sBAAA,CAAAF,OAAA;AACA,IAAAQ,eAAA,GAAAN,sBAAA,CAAAF,OAAA;AAGA,IAAAS,WAAA,GAAAP,sBAAA,CAAAF,OAAA;AACA,IAAAU,kBAAA,GAAAR,sBAAA,CAAAF,OAAA;AACA,IAAAW,4BAAA,GAAAT,sBAAA,CAAAF,OAAA;AAAuE,SAAAE,uBAAAU,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAdvE,MAAM;EAACG;AAAkB,CAAC,GAAGC,yBAAkB;;AAE/C;;AASA;;AAKA;AACA;AACA;AACe,MAAMC,UAAU,SAASF,kBAAkB,CAAC;EACzD;AACF;AACA;AACA;AACA;EACEG,WAAWA,CAACC,KAAK,EAAE;IACjB,KAAK,CAACA,KAAK,CAAC;IAEZC,MAAM,CAACC,MAAM,CAAC,IAAI,CAACC,MAAM,EAAE;MACzBC,QAAQ,EAAE,IAAI;MACdC,uBAAuB,EAAE,eAAe;MACxCC,mBAAmB,EAAnBA,4BAAmB;MACnBC,aAAa,EAAbA,kBAAa;MACbC,eAAe,EAAfA,wBAAe;MACfC,sBAAsB,EAAtBA,+BAAsB;MACtBC,SAAS,EAATA,kBAAS;MACTC,uBAAuB,EAAvBA,gCAAuB;MACvBC,cAAc,EAAdA;IACF,CAAC,CAAC;IAEFX,MAAM,CAACC,MAAM,CAAC,IAAI,CAACW,OAAO,EAAE;MAC1BC,UAAU,EAAVA,mBAAU;MACVC,iBAAiB,EAAjBA,0BAAiB;MACjBC,kBAAkB,EAAlBA;IACF,CAAC,CAAC;EACJ;AACF;AAACC,OAAA,CAAAtB,OAAA,GAAAG,UAAA","ignoreList":[]}
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.default = getStemmer;
7
7
  var _lodash = require("lodash");
8
- var _index = require("../../../index");
8
+ var _index = require("@axyseo/index");
9
9
  var _stem = _interopRequireDefault(require("./internal/stem"));
10
10
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
11
11
  const {
@@ -1 +1 @@
1
- {"version":3,"file":"getStemmer.js","names":["_lodash","require","_index","_stem","_interopRequireDefault","e","__esModule","default","baseStemmer","languageProcessing","getStemmer","researcher","morphologyData","get","getData","word","stem"],"sources":["../../../../../src/languageProcessing/languages/ru/helpers/getStemmer.js"],"sourcesContent":["import {get} from 'lodash';\nimport {languageProcessing} from '../../../index';\nconst {baseStemmer} = languageProcessing;\n\nimport stem from './internal/stem';\n\n/**\n * Returns the stemmer for a researcher.\n *\n * @param {Researcher} researcher The researcher.\n *\n * @returns {Function} The stemmer.\n */\nexport default function getStemmer(researcher) {\n const morphologyData = get(researcher.getData('morphology'), 'ru', false);\n\n if (morphologyData) {\n return word => stem(word, morphologyData);\n }\n\n return baseStemmer;\n}\n"],"mappings":";;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AAGA,IAAAE,KAAA,GAAAC,sBAAA,CAAAH,OAAA;AAAmC,SAAAG,uBAAAC,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAFnC,MAAM;EAACG;AAAW,CAAC,GAAGC,yBAAkB;AAIxC;AACA;AACA;AACA;AACA;AACA;AACA;AACe,SAASC,UAAUA,CAACC,UAAU,EAAE;EAC7C,MAAMC,cAAc,GAAG,IAAAC,WAAG,EAACF,UAAU,CAACG,OAAO,CAAC,YAAY,CAAC,EAAE,IAAI,EAAE,KAAK,CAAC;EAEzE,IAAIF,cAAc,EAAE;IAClB,OAAOG,IAAI,IAAI,IAAAC,aAAI,EAACD,IAAI,EAAEH,cAAc,CAAC;EAC3C;EAEA,OAAOJ,WAAW;AACpB","ignoreList":[]}
1
+ {"version":3,"file":"getStemmer.js","names":["_lodash","require","_index","_stem","_interopRequireDefault","e","__esModule","default","baseStemmer","languageProcessing","getStemmer","researcher","morphologyData","get","getData","word","stem"],"sources":["../../../../../src/languageProcessing/languages/ru/helpers/getStemmer.js"],"sourcesContent":["import {get} from 'lodash';\nimport {languageProcessing} from '@axyseo/index';\nconst {baseStemmer} = languageProcessing;\n\nimport stem from './internal/stem';\n\n/**\n * Returns the stemmer for a researcher.\n *\n * @param {Researcher} researcher The researcher.\n *\n * @returns {Function} The stemmer.\n */\nexport default function getStemmer(researcher) {\n const morphologyData = get(researcher.getData('morphology'), 'ru', false);\n\n if (morphologyData) {\n return word => stem(word, morphologyData);\n }\n\n return baseStemmer;\n}\n"],"mappings":";;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AAGA,IAAAE,KAAA,GAAAC,sBAAA,CAAAH,OAAA;AAAmC,SAAAG,uBAAAC,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAFnC,MAAM;EAACG;AAAW,CAAC,GAAGC,yBAAkB;AAIxC;AACA;AACA;AACA;AACA;AACA;AACA;AACe,SAASC,UAAUA,CAACC,UAAU,EAAE;EAC7C,MAAMC,cAAc,GAAG,IAAAC,WAAG,EAACF,UAAU,CAACG,OAAO,CAAC,YAAY,CAAC,EAAE,IAAI,EAAE,KAAK,CAAC;EAEzE,IAAIF,cAAc,EAAE;IAClB,OAAOG,IAAI,IAAI,IAAAC,aAAI,EAACD,IAAI,EAAEH,cAAc,CAAC;EAC3C;EAEA,OAAOJ,WAAW;AACpB","ignoreList":[]}
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = isPassiveSentence;
7
- var _index = require("../../../index");
7
+ var _index = require("@axyseo/index");
8
8
  var _participlesShortenedList = _interopRequireDefault(require("../config/internal/participlesShortenedList.js"));
9
9
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
10
10
  const {
@@ -1 +1 @@
1
- {"version":3,"file":"isPassiveSentence.js","names":["_index","require","_participlesShortenedList","_interopRequireDefault","e","__esModule","default","areWordsInSentence","languageProcessing","isPassiveSentence","sentence","getPassiveVerbs"],"sources":["../../../../../src/languageProcessing/languages/ru/helpers/isPassiveSentence.js"],"sourcesContent":["import {languageProcessing} from '../../../index';\nconst {areWordsInSentence} = languageProcessing;\n\nimport getPassiveVerbs from '../config/internal/participlesShortenedList.js';\n\n/**\n * Checks the passed sentence to see if it contains passive verbs.\n *\n * @param {string} sentence The sentence to match against.\n * @returns {Boolean} Whether the sentence contains passive voice.\n */\nexport default function isPassiveSentence(sentence) {\n return areWordsInSentence(getPassiveVerbs, sentence);\n}\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAGA,IAAAC,yBAAA,GAAAC,sBAAA,CAAAF,OAAA;AAA6E,SAAAE,uBAAAC,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAF7E,MAAM;EAACG;AAAkB,CAAC,GAAGC,yBAAkB;AAI/C;AACA;AACA;AACA;AACA;AACA;AACe,SAASC,iBAAiBA,CAACC,QAAQ,EAAE;EAClD,OAAOH,kBAAkB,CAACI,iCAAe,EAAED,QAAQ,CAAC;AACtD","ignoreList":[]}
1
+ {"version":3,"file":"isPassiveSentence.js","names":["_index","require","_participlesShortenedList","_interopRequireDefault","e","__esModule","default","areWordsInSentence","languageProcessing","isPassiveSentence","sentence","getPassiveVerbs"],"sources":["../../../../../src/languageProcessing/languages/ru/helpers/isPassiveSentence.js"],"sourcesContent":["import {languageProcessing} from '@axyseo/index';\nconst {areWordsInSentence} = languageProcessing;\n\nimport getPassiveVerbs from '../config/internal/participlesShortenedList.js';\n\n/**\n * Checks the passed sentence to see if it contains passive verbs.\n *\n * @param {string} sentence The sentence to match against.\n * @returns {Boolean} Whether the sentence contains passive voice.\n */\nexport default function isPassiveSentence(sentence) {\n return areWordsInSentence(getPassiveVerbs, sentence);\n}\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAGA,IAAAC,yBAAA,GAAAC,sBAAA,CAAAF,OAAA;AAA6E,SAAAE,uBAAAC,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAF7E,MAAM;EAACG;AAAkB,CAAC,GAAGC,yBAAkB;AAI/C;AACA;AACA;AACA;AACA;AACA;AACe,SAASC,iBAAiBA,CAACC,QAAQ,EAAE;EAClD,OAAOH,kBAAkB,CAACI,iCAAe,EAAED,QAAQ,CAAC;AACtD","ignoreList":[]}
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
- var _index = require("../../../index");
7
+ var _index = require("@axyseo/index");
8
8
  var _stopWords = _interopRequireDefault(require("./config/stopWords"));
9
9
  var _functionWords = _interopRequireDefault(require("./config/functionWords"));
10
10
  var _transitionWords = require("./config/transitionWords");
@@ -1 +1 @@
1
- {"version":3,"file":"Researcher.js","names":["_index","require","_stopWords","_interopRequireDefault","_functionWords","_transitionWords","_twoPartTransitionWords","_firstWordExceptions","_getClauses","_getStemmer","e","__esModule","default","AbstractResearcher","languageProcessing","Researcher","constructor","paper","defaultResearches","getFleschReadingScore","Object","assign","config","language","passiveConstructionType","stopWords","functionWords","transitionWords","twoPartTransitionWords","firstWordExceptions","helpers","getClauses","getStemmer","exports"],"sources":["../../../../src/languageProcessing/languages/sk/Researcher.js"],"sourcesContent":["import {languageProcessing} from '../../../index';\nconst {AbstractResearcher} = languageProcessing;\n\n// All config\nimport stopWords from './config/stopWords';\nimport functionWords from './config/functionWords';\nimport {allWords as transitionWords} from './config/transitionWords';\nimport twoPartTransitionWords from './config/twoPartTransitionWords';\nimport firstWordExceptions from './config/firstWordExceptions';\n\n// All helpers\nimport getClauses from './helpers/getClauses';\nimport getStemmer from './helpers/getStemmer';\n\n/**\n * The researcher contains all the researches, helpers, data, and config.\n */\nexport default class Researcher extends AbstractResearcher {\n /**\n * Constructor\n * @param {Paper} paper The Paper object that is needed within the researches.\n * @constructor\n */\n constructor(paper) {\n super(paper);\n\n // Deletes researches that are currently not available in Slovak.\n // When the research is available, this line should be removed.\n delete this.defaultResearches.getFleschReadingScore;\n\n Object.assign(this.config, {\n language: 'sk',\n passiveConstructionType: 'periphrastic',\n stopWords,\n functionWords,\n transitionWords,\n twoPartTransitionWords,\n firstWordExceptions\n });\n\n Object.assign(this.helpers, {\n getClauses,\n getStemmer\n });\n }\n}\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAIA,IAAAC,UAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,cAAA,GAAAD,sBAAA,CAAAF,OAAA;AACA,IAAAI,gBAAA,GAAAJ,OAAA;AACA,IAAAK,uBAAA,GAAAH,sBAAA,CAAAF,OAAA;AACA,IAAAM,oBAAA,GAAAJ,sBAAA,CAAAF,OAAA;AAGA,IAAAO,WAAA,GAAAL,sBAAA,CAAAF,OAAA;AACA,IAAAQ,WAAA,GAAAN,sBAAA,CAAAF,OAAA;AAA8C,SAAAE,uBAAAO,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAX9C,MAAM;EAACG;AAAkB,CAAC,GAAGC,yBAAkB;;AAE/C;;AAOA;;AAIA;AACA;AACA;AACe,MAAMC,UAAU,SAASF,kBAAkB,CAAC;EACzD;AACF;AACA;AACA;AACA;EACEG,WAAWA,CAACC,KAAK,EAAE;IACjB,KAAK,CAACA,KAAK,CAAC;;IAEZ;IACA;IACA,OAAO,IAAI,CAACC,iBAAiB,CAACC,qBAAqB;IAEnDC,MAAM,CAACC,MAAM,CAAC,IAAI,CAACC,MAAM,EAAE;MACzBC,QAAQ,EAAE,IAAI;MACdC,uBAAuB,EAAE,cAAc;MACvCC,SAAS,EAATA,kBAAS;MACTC,aAAa,EAAbA,sBAAa;MACbC,eAAe,EAAfA,yBAAe;MACfC,sBAAsB,EAAtBA,+BAAsB;MACtBC,mBAAmB,EAAnBA;IACF,CAAC,CAAC;IAEFT,MAAM,CAACC,MAAM,CAAC,IAAI,CAACS,OAAO,EAAE;MAC1BC,UAAU,EAAVA,mBAAU;MACVC,UAAU,EAAVA;IACF,CAAC,CAAC;EACJ;AACF;AAACC,OAAA,CAAArB,OAAA,GAAAG,UAAA","ignoreList":[]}
1
+ {"version":3,"file":"Researcher.js","names":["_index","require","_stopWords","_interopRequireDefault","_functionWords","_transitionWords","_twoPartTransitionWords","_firstWordExceptions","_getClauses","_getStemmer","e","__esModule","default","AbstractResearcher","languageProcessing","Researcher","constructor","paper","defaultResearches","getFleschReadingScore","Object","assign","config","language","passiveConstructionType","stopWords","functionWords","transitionWords","twoPartTransitionWords","firstWordExceptions","helpers","getClauses","getStemmer","exports"],"sources":["../../../../src/languageProcessing/languages/sk/Researcher.js"],"sourcesContent":["import {languageProcessing} from '@axyseo/index';\nconst {AbstractResearcher} = languageProcessing;\n\n// All config\nimport stopWords from './config/stopWords';\nimport functionWords from './config/functionWords';\nimport {allWords as transitionWords} from './config/transitionWords';\nimport twoPartTransitionWords from './config/twoPartTransitionWords';\nimport firstWordExceptions from './config/firstWordExceptions';\n\n// All helpers\nimport getClauses from './helpers/getClauses';\nimport getStemmer from './helpers/getStemmer';\n\n/**\n * The researcher contains all the researches, helpers, data, and config.\n */\nexport default class Researcher extends AbstractResearcher {\n /**\n * Constructor\n * @param {Paper} paper The Paper object that is needed within the researches.\n * @constructor\n */\n constructor(paper) {\n super(paper);\n\n // Deletes researches that are currently not available in Slovak.\n // When the research is available, this line should be removed.\n delete this.defaultResearches.getFleschReadingScore;\n\n Object.assign(this.config, {\n language: 'sk',\n passiveConstructionType: 'periphrastic',\n stopWords,\n functionWords,\n transitionWords,\n twoPartTransitionWords,\n firstWordExceptions\n });\n\n Object.assign(this.helpers, {\n getClauses,\n getStemmer\n });\n }\n}\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAIA,IAAAC,UAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,cAAA,GAAAD,sBAAA,CAAAF,OAAA;AACA,IAAAI,gBAAA,GAAAJ,OAAA;AACA,IAAAK,uBAAA,GAAAH,sBAAA,CAAAF,OAAA;AACA,IAAAM,oBAAA,GAAAJ,sBAAA,CAAAF,OAAA;AAGA,IAAAO,WAAA,GAAAL,sBAAA,CAAAF,OAAA;AACA,IAAAQ,WAAA,GAAAN,sBAAA,CAAAF,OAAA;AAA8C,SAAAE,uBAAAO,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAX9C,MAAM;EAACG;AAAkB,CAAC,GAAGC,yBAAkB;;AAE/C;;AAOA;;AAIA;AACA;AACA;AACe,MAAMC,UAAU,SAASF,kBAAkB,CAAC;EACzD;AACF;AACA;AACA;AACA;EACEG,WAAWA,CAACC,KAAK,EAAE;IACjB,KAAK,CAACA,KAAK,CAAC;;IAEZ;IACA;IACA,OAAO,IAAI,CAACC,iBAAiB,CAACC,qBAAqB;IAEnDC,MAAM,CAACC,MAAM,CAAC,IAAI,CAACC,MAAM,EAAE;MACzBC,QAAQ,EAAE,IAAI;MACdC,uBAAuB,EAAE,cAAc;MACvCC,SAAS,EAATA,kBAAS;MACTC,aAAa,EAAbA,sBAAa;MACbC,eAAe,EAAfA,yBAAe;MACfC,sBAAsB,EAAtBA,+BAAsB;MACtBC,mBAAmB,EAAnBA;IACF,CAAC,CAAC;IAEFT,MAAM,CAACC,MAAM,CAAC,IAAI,CAACS,OAAO,EAAE;MAC1BC,UAAU,EAAVA,mBAAU;MACVC,UAAU,EAAVA;IACF,CAAC,CAAC;EACJ;AACF;AAACC,OAAA,CAAArB,OAAA,GAAAG,UAAA","ignoreList":[]}
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = getSlovakClauses;
7
- var _index = require("../../../index");
7
+ var _index = require("@axyseo/index");
8
8
  var _Clause = _interopRequireDefault(require("../values/Clause"));
9
9
  var _passiveVoiceAuxiliaries = _interopRequireDefault(require("../config/internal/passiveVoiceAuxiliaries.js"));
10
10
  var _stopWords = _interopRequireDefault(require("../config/stopWords.js"));
@@ -1 +1 @@
1
- {"version":3,"file":"getClauses.js","names":["_index","require","_Clause","_interopRequireDefault","_passiveVoiceAuxiliaries","_stopWords","e","__esModule","default","getClausesSplitOnStopWords","createRegexFromArray","languageProcessing","options","Clause","SlovakClause","regexes","auxiliaryRegex","auxiliaries","stopCharacterRegex","stopwordRegex","stopwords","getSlovakClauses","sentence"],"sources":["../../../../../src/languageProcessing/languages/sk/helpers/getClauses.js"],"sourcesContent":["import {languageProcessing} from '../../../index';\nconst {getClausesSplitOnStopWords, createRegexFromArray} = languageProcessing;\n\nimport SlovakClause from '../values/Clause';\nimport auxiliaries from '../config/internal/passiveVoiceAuxiliaries.js';\nimport stopwords from '../config/stopWords.js';\n\nconst options = {\n Clause: SlovakClause,\n regexes: {\n auxiliaryRegex: createRegexFromArray(auxiliaries),\n stopCharacterRegex: /([:,])(?=[ \\n\\r\\t'\"+\\-»«‹›<>])/gi,\n stopwordRegex: createRegexFromArray(stopwords)\n }\n};\n\n/**\n * Gets the clauses from a sentence by determining sentence breakers.\n *\n * @param {string} sentence The sentence to split up into clauses.\n *\n * @returns {Array} The array with all clauses that have an auxiliary.\n */\nexport default function getSlovakClauses(sentence) {\n return getClausesSplitOnStopWords(sentence, options);\n}\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAGA,IAAAC,OAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,wBAAA,GAAAD,sBAAA,CAAAF,OAAA;AACA,IAAAI,UAAA,GAAAF,sBAAA,CAAAF,OAAA;AAA+C,SAAAE,uBAAAG,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAJ/C,MAAM;EAACG,0BAA0B;EAAEC;AAAoB,CAAC,GAAGC,yBAAkB;AAM7E,MAAMC,OAAO,GAAG;EACdC,MAAM,EAAEC,eAAY;EACpBC,OAAO,EAAE;IACPC,cAAc,EAAEN,oBAAoB,CAACO,gCAAW,CAAC;IACjDC,kBAAkB,EAAE,kCAAkC;IACtDC,aAAa,EAAET,oBAAoB,CAACU,kBAAS;EAC/C;AACF,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACe,SAASC,gBAAgBA,CAACC,QAAQ,EAAE;EACjD,OAAOb,0BAA0B,CAACa,QAAQ,EAAEV,OAAO,CAAC;AACtD","ignoreList":[]}
1
+ {"version":3,"file":"getClauses.js","names":["_index","require","_Clause","_interopRequireDefault","_passiveVoiceAuxiliaries","_stopWords","e","__esModule","default","getClausesSplitOnStopWords","createRegexFromArray","languageProcessing","options","Clause","SlovakClause","regexes","auxiliaryRegex","auxiliaries","stopCharacterRegex","stopwordRegex","stopwords","getSlovakClauses","sentence"],"sources":["../../../../../src/languageProcessing/languages/sk/helpers/getClauses.js"],"sourcesContent":["import {languageProcessing} from '@axyseo/index';\nconst {getClausesSplitOnStopWords, createRegexFromArray} = languageProcessing;\n\nimport SlovakClause from '../values/Clause';\nimport auxiliaries from '../config/internal/passiveVoiceAuxiliaries.js';\nimport stopwords from '../config/stopWords.js';\n\nconst options = {\n Clause: SlovakClause,\n regexes: {\n auxiliaryRegex: createRegexFromArray(auxiliaries),\n stopCharacterRegex: /([:,])(?=[ \\n\\r\\t'\"+\\-»«‹›<>])/gi,\n stopwordRegex: createRegexFromArray(stopwords)\n }\n};\n\n/**\n * Gets the clauses from a sentence by determining sentence breakers.\n *\n * @param {string} sentence The sentence to split up into clauses.\n *\n * @returns {Array} The array with all clauses that have an auxiliary.\n */\nexport default function getSlovakClauses(sentence) {\n return getClausesSplitOnStopWords(sentence, options);\n}\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAGA,IAAAC,OAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,wBAAA,GAAAD,sBAAA,CAAAF,OAAA;AACA,IAAAI,UAAA,GAAAF,sBAAA,CAAAF,OAAA;AAA+C,SAAAE,uBAAAG,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAJ/C,MAAM;EAACG,0BAA0B;EAAEC;AAAoB,CAAC,GAAGC,yBAAkB;AAM7E,MAAMC,OAAO,GAAG;EACdC,MAAM,EAAEC,eAAY;EACpBC,OAAO,EAAE;IACPC,cAAc,EAAEN,oBAAoB,CAACO,gCAAW,CAAC;IACjDC,kBAAkB,EAAE,kCAAkC;IACtDC,aAAa,EAAET,oBAAoB,CAACU,kBAAS;EAC/C;AACF,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACe,SAASC,gBAAgBA,CAACC,QAAQ,EAAE;EACjD,OAAOb,0BAA0B,CAACa,QAAQ,EAAEV,OAAO,CAAC;AACtD","ignoreList":[]}
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.default = getStemmer;
7
7
  var _lodash = require("lodash");
8
- var _index = require("../../../index");
8
+ var _index = require("@axyseo/index");
9
9
  var _stem = _interopRequireDefault(require("./internal/stem"));
10
10
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
11
11
  const {
@@ -1 +1 @@
1
- {"version":3,"file":"getStemmer.js","names":["_lodash","require","_index","_stem","_interopRequireDefault","e","__esModule","default","baseStemmer","languageProcessing","getStemmer","researcher","morphologyData","get","getData","word","stem"],"sources":["../../../../../src/languageProcessing/languages/sk/helpers/getStemmer.js"],"sourcesContent":["import {get} from 'lodash';\nimport {languageProcessing} from '../../../index';\nconst {baseStemmer} = languageProcessing;\n\nimport stem from './internal/stem';\n\n/**\n * Returns the stemmer for a researcher.\n *\n * @param {Researcher} researcher The researcher.\n *\n * @returns {Function} The stemmer.\n */\nexport default function getStemmer(researcher) {\n const morphologyData = get(researcher.getData('morphology'), 'sk', false);\n\n if (morphologyData) {\n return word => stem(word, morphologyData);\n }\n\n return baseStemmer;\n}\n"],"mappings":";;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AAGA,IAAAE,KAAA,GAAAC,sBAAA,CAAAH,OAAA;AAAmC,SAAAG,uBAAAC,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAFnC,MAAM;EAACG;AAAW,CAAC,GAAGC,yBAAkB;AAIxC;AACA;AACA;AACA;AACA;AACA;AACA;AACe,SAASC,UAAUA,CAACC,UAAU,EAAE;EAC7C,MAAMC,cAAc,GAAG,IAAAC,WAAG,EAACF,UAAU,CAACG,OAAO,CAAC,YAAY,CAAC,EAAE,IAAI,EAAE,KAAK,CAAC;EAEzE,IAAIF,cAAc,EAAE;IAClB,OAAOG,IAAI,IAAI,IAAAC,aAAI,EAACD,IAAI,EAAEH,cAAc,CAAC;EAC3C;EAEA,OAAOJ,WAAW;AACpB","ignoreList":[]}
1
+ {"version":3,"file":"getStemmer.js","names":["_lodash","require","_index","_stem","_interopRequireDefault","e","__esModule","default","baseStemmer","languageProcessing","getStemmer","researcher","morphologyData","get","getData","word","stem"],"sources":["../../../../../src/languageProcessing/languages/sk/helpers/getStemmer.js"],"sourcesContent":["import {get} from 'lodash';\nimport {languageProcessing} from '@axyseo/index';\nconst {baseStemmer} = languageProcessing;\n\nimport stem from './internal/stem';\n\n/**\n * Returns the stemmer for a researcher.\n *\n * @param {Researcher} researcher The researcher.\n *\n * @returns {Function} The stemmer.\n */\nexport default function getStemmer(researcher) {\n const morphologyData = get(researcher.getData('morphology'), 'sk', false);\n\n if (morphologyData) {\n return word => stem(word, morphologyData);\n }\n\n return baseStemmer;\n}\n"],"mappings":";;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AAGA,IAAAE,KAAA,GAAAC,sBAAA,CAAAH,OAAA;AAAmC,SAAAG,uBAAAC,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAFnC,MAAM;EAACG;AAAW,CAAC,GAAGC,yBAAkB;AAIxC;AACA;AACA;AACA;AACA;AACA;AACA;AACe,SAASC,UAAUA,CAACC,UAAU,EAAE;EAC7C,MAAMC,cAAc,GAAG,IAAAC,WAAG,EAACF,UAAU,CAACG,OAAO,CAAC,YAAY,CAAC,EAAE,IAAI,EAAE,KAAK,CAAC;EAEzE,IAAIF,cAAc,EAAE;IAClB,OAAOG,IAAI,IAAI,IAAAC,aAAI,EAACD,IAAI,EAAEH,cAAc,CAAC;EAC3C;EAEA,OAAOJ,WAAW;AACpB","ignoreList":[]}
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = _default;
7
- var _index = require("../../../index");
7
+ var _index = require("@axyseo/index");
8
8
  const {
9
9
  getWords
10
10
  } = _index.languageProcessing;
@@ -1 +1 @@
1
- {"version":3,"file":"getParticiples.js","names":["_index","require","getWords","languageProcessing","_default","clauseText","words","participleEndingsRegex","RegExp","filter","word","test"],"sources":["../../../../../../src/languageProcessing/languages/sk/helpers/internal/getParticiples.js"],"sourcesContent":["import {languageProcessing} from '../../../index';\nconst {getWords} = languageProcessing;\n\n/**\n * Creates an array of participles found in a clause.\n *\n * @param {string} clauseText The clause to find participles in.\n *\n * @returns {Array} The list with participles found.\n */\nexport default function(clauseText) {\n const words = getWords(clauseText);\n const participleEndingsRegex = new RegExp('(ný|ní|tý|ná|tá|né|té)$');\n\n return words.filter(word => participleEndingsRegex.test(word));\n}\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,MAAM;EAACC;AAAQ,CAAC,GAAGC,yBAAkB;;AAErC;AACA;AACA;AACA;AACA;AACA;AACA;AACe,SAAAC,SAASC,UAAU,EAAE;EAClC,MAAMC,KAAK,GAAGJ,QAAQ,CAACG,UAAU,CAAC;EAClC,MAAME,sBAAsB,GAAG,IAAIC,MAAM,CAAC,yBAAyB,CAAC;EAEpE,OAAOF,KAAK,CAACG,MAAM,CAACC,IAAI,IAAIH,sBAAsB,CAACI,IAAI,CAACD,IAAI,CAAC,CAAC;AAChE","ignoreList":[]}
1
+ {"version":3,"file":"getParticiples.js","names":["_index","require","getWords","languageProcessing","_default","clauseText","words","participleEndingsRegex","RegExp","filter","word","test"],"sources":["../../../../../../src/languageProcessing/languages/sk/helpers/internal/getParticiples.js"],"sourcesContent":["import {languageProcessing} from '@axyseo/index';\nconst {getWords} = languageProcessing;\n\n/**\n * Creates an array of participles found in a clause.\n *\n * @param {string} clauseText The clause to find participles in.\n *\n * @returns {Array} The list with participles found.\n */\nexport default function(clauseText) {\n const words = getWords(clauseText);\n const participleEndingsRegex = new RegExp('(ný|ní|tý|ná|tá|né|té)$');\n\n return words.filter(word => participleEndingsRegex.test(word));\n}\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,MAAM;EAACC;AAAQ,CAAC,GAAGC,yBAAkB;;AAErC;AACA;AACA;AACA;AACA;AACA;AACA;AACe,SAAAC,SAASC,UAAU,EAAE;EAClC,MAAMC,KAAK,GAAGJ,QAAQ,CAACG,UAAU,CAAC;EAClC,MAAME,sBAAsB,GAAG,IAAIC,MAAM,CAAC,yBAAyB,CAAC;EAEpE,OAAOF,KAAK,CAACG,MAAM,CAACC,IAAI,IAAIH,sBAAsB,CAACI,IAAI,CAACD,IAAI,CAAC,CAAC;AAChE","ignoreList":[]}
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
- var _index = require("../../../index");
7
+ var _index = require("@axyseo/index");
8
8
  var _getParticiples = _interopRequireDefault(require("../helpers/internal/getParticiples"));
9
9
  var _nonPassives = _interopRequireDefault(require("../../sk/config/internal/nonPassives"));
10
10
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
@@ -1 +1 @@
1
- {"version":3,"file":"Clause.js","names":["_index","require","_getParticiples","_interopRequireDefault","_nonPassives","e","__esModule","default","values","languageProcessing","Clause","SlovakClause","constructor","clauseText","auxiliaries","_participles","getParticiples","getClauseText","checkParticiples","foundParticiples","filter","participle","nonPassives","includes","setPassive","length","_default","exports"],"sources":["../../../../../src/languageProcessing/languages/sk/values/Clause.js"],"sourcesContent":["import {languageProcessing} from '../../../index';\nconst {values} = languageProcessing;\nconst {Clause} = values;\nimport getParticiples from '../helpers/internal/getParticiples';\nimport nonPassives from '../../sk/config/internal/nonPassives';\n\n/**\n * Creates a Clause object for the Slovak language.\n */\nclass SlovakClause extends Clause {\n /**\n * Constructor.\n *\n * @param {string} clauseText The text of the clause.\n * @param {Array} auxiliaries The auxiliaries.\n *\n * @constructor\n */\n constructor(clauseText, auxiliaries) {\n super(clauseText, auxiliaries);\n this._participles = getParticiples(this.getClauseText());\n this.checkParticiples();\n }\n\n /**\n * Checks if any exceptions are applicable to this participle that would result in the clause not being passive.\n * If no exceptions are found, the clause is passive.\n *\n * @returns {void}\n */\n checkParticiples() {\n const foundParticiples = this.getParticiples().filter(\n participle => !nonPassives.includes(participle)\n );\n this.setPassive(foundParticiples.length > 0);\n }\n}\n\nexport default SlovakClause;\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAGA,IAAAC,eAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,YAAA,GAAAD,sBAAA,CAAAF,OAAA;AAA+D,SAAAE,uBAAAE,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAH/D,MAAM;EAACG;AAAM,CAAC,GAAGC,yBAAkB;AACnC,MAAM;EAACC;AAAM,CAAC,GAAGF,MAAM;AAIvB;AACA;AACA;AACA,MAAMG,YAAY,SAASD,MAAM,CAAC;EAChC;AACF;AACA;AACA;AACA;AACA;AACA;AACA;EACEE,WAAWA,CAACC,UAAU,EAAEC,WAAW,EAAE;IACnC,KAAK,CAACD,UAAU,EAAEC,WAAW,CAAC;IAC9B,IAAI,CAACC,YAAY,GAAG,IAAAC,uBAAc,EAAC,IAAI,CAACC,aAAa,CAAC,CAAC,CAAC;IACxD,IAAI,CAACC,gBAAgB,CAAC,CAAC;EACzB;;EAEA;AACF;AACA;AACA;AACA;AACA;EACEA,gBAAgBA,CAAA,EAAG;IACjB,MAAMC,gBAAgB,GAAG,IAAI,CAACH,cAAc,CAAC,CAAC,CAACI,MAAM,CACnDC,UAAU,IAAI,CAACC,oBAAW,CAACC,QAAQ,CAACF,UAAU,CAChD,CAAC;IACD,IAAI,CAACG,UAAU,CAACL,gBAAgB,CAACM,MAAM,GAAG,CAAC,CAAC;EAC9C;AACF;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAApB,OAAA,GAEcI,YAAY","ignoreList":[]}
1
+ {"version":3,"file":"Clause.js","names":["_index","require","_getParticiples","_interopRequireDefault","_nonPassives","e","__esModule","default","values","languageProcessing","Clause","SlovakClause","constructor","clauseText","auxiliaries","_participles","getParticiples","getClauseText","checkParticiples","foundParticiples","filter","participle","nonPassives","includes","setPassive","length","_default","exports"],"sources":["../../../../../src/languageProcessing/languages/sk/values/Clause.js"],"sourcesContent":["import {languageProcessing} from '@axyseo/index';\nconst {values} = languageProcessing;\nconst {Clause} = values;\nimport getParticiples from '../helpers/internal/getParticiples';\nimport nonPassives from '../../sk/config/internal/nonPassives';\n\n/**\n * Creates a Clause object for the Slovak language.\n */\nclass SlovakClause extends Clause {\n /**\n * Constructor.\n *\n * @param {string} clauseText The text of the clause.\n * @param {Array} auxiliaries The auxiliaries.\n *\n * @constructor\n */\n constructor(clauseText, auxiliaries) {\n super(clauseText, auxiliaries);\n this._participles = getParticiples(this.getClauseText());\n this.checkParticiples();\n }\n\n /**\n * Checks if any exceptions are applicable to this participle that would result in the clause not being passive.\n * If no exceptions are found, the clause is passive.\n *\n * @returns {void}\n */\n checkParticiples() {\n const foundParticiples = this.getParticiples().filter(\n participle => !nonPassives.includes(participle)\n );\n this.setPassive(foundParticiples.length > 0);\n }\n}\n\nexport default SlovakClause;\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAGA,IAAAC,eAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,YAAA,GAAAD,sBAAA,CAAAF,OAAA;AAA+D,SAAAE,uBAAAE,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAH/D,MAAM;EAACG;AAAM,CAAC,GAAGC,yBAAkB;AACnC,MAAM;EAACC;AAAM,CAAC,GAAGF,MAAM;AAIvB;AACA;AACA;AACA,MAAMG,YAAY,SAASD,MAAM,CAAC;EAChC;AACF;AACA;AACA;AACA;AACA;AACA;AACA;EACEE,WAAWA,CAACC,UAAU,EAAEC,WAAW,EAAE;IACnC,KAAK,CAACD,UAAU,EAAEC,WAAW,CAAC;IAC9B,IAAI,CAACC,YAAY,GAAG,IAAAC,uBAAc,EAAC,IAAI,CAACC,aAAa,CAAC,CAAC,CAAC;IACxD,IAAI,CAACC,gBAAgB,CAAC,CAAC;EACzB;;EAEA;AACF;AACA;AACA;AACA;AACA;EACEA,gBAAgBA,CAAA,EAAG;IACjB,MAAMC,gBAAgB,GAAG,IAAI,CAACH,cAAc,CAAC,CAAC,CAACI,MAAM,CACnDC,UAAU,IAAI,CAACC,oBAAW,CAACC,QAAQ,CAACF,UAAU,CAChD,CAAC;IACD,IAAI,CAACG,UAAU,CAACL,gBAAgB,CAACM,MAAM,GAAG,CAAC,CAAC;EAC9C;AACF;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAApB,OAAA,GAEcI,YAAY","ignoreList":[]}
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
- var _index = require("../../../index");
7
+ var _index = require("@axyseo/index");
8
8
  var _firstWordExceptions = _interopRequireDefault(require("./config/firstWordExceptions"));
9
9
  var _functionWords = require("./config/functionWords");
10
10
  var _transitionWords = _interopRequireDefault(require("./config/transitionWords"));
@@ -1 +1 @@
1
- {"version":3,"file":"Researcher.js","names":["_index","require","_firstWordExceptions","_interopRequireDefault","_functionWords","_transitionWords","_twoPartTransitionWords","_keyphraseLength","_getStemmer","_isPassiveSentence","e","__esModule","default","AbstractResearcher","languageProcessing","Researcher","constructor","paper","defaultResearches","getFleschReadingScore","Object","assign","config","language","passiveConstructionType","firstWordExceptions","functionWords","transitionWords","twoPartTransitionWords","keyphraseLength","helpers","getStemmer","isPassiveSentence","exports"],"sources":["../../../../src/languageProcessing/languages/sv/Researcher.js"],"sourcesContent":["import {languageProcessing} from '../../../index';\nconst {AbstractResearcher} = languageProcessing;\n\n// All config\nimport firstWordExceptions from './config/firstWordExceptions';\nimport {all as functionWords} from './config/functionWords';\nimport transitionWords from './config/transitionWords';\nimport twoPartTransitionWords from './config/twoPartTransitionWords';\nimport keyphraseLength from './config/keyphraseLength';\n\n// All helpers\nimport getStemmer from './helpers/getStemmer';\nimport isPassiveSentence from './helpers/isPassiveSentence';\n\n/**\n * The researcher contains all the researches, helpers, data, and config.\n */\nexport default class Researcher extends AbstractResearcher {\n /**\n * Constructor\n * @param {Paper} paper The Paper object that is needed within the researches.\n * @constructor\n */\n constructor(paper) {\n super(paper);\n\n // Delete the researches that are not available in Swedish.\n delete this.defaultResearches.getFleschReadingScore;\n\n Object.assign(this.config, {\n language: 'sv',\n passiveConstructionType: 'morphological',\n firstWordExceptions,\n functionWords,\n transitionWords,\n twoPartTransitionWords,\n keyphraseLength\n });\n\n Object.assign(this.helpers, {\n getStemmer,\n isPassiveSentence\n });\n }\n}\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAIA,IAAAC,oBAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,cAAA,GAAAH,OAAA;AACA,IAAAI,gBAAA,GAAAF,sBAAA,CAAAF,OAAA;AACA,IAAAK,uBAAA,GAAAH,sBAAA,CAAAF,OAAA;AACA,IAAAM,gBAAA,GAAAJ,sBAAA,CAAAF,OAAA;AAGA,IAAAO,WAAA,GAAAL,sBAAA,CAAAF,OAAA;AACA,IAAAQ,kBAAA,GAAAN,sBAAA,CAAAF,OAAA;AAA4D,SAAAE,uBAAAO,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAX5D,MAAM;EAACG;AAAkB,CAAC,GAAGC,yBAAkB;;AAE/C;;AAOA;;AAIA;AACA;AACA;AACe,MAAMC,UAAU,SAASF,kBAAkB,CAAC;EACzD;AACF;AACA;AACA;AACA;EACEG,WAAWA,CAACC,KAAK,EAAE;IACjB,KAAK,CAACA,KAAK,CAAC;;IAEZ;IACA,OAAO,IAAI,CAACC,iBAAiB,CAACC,qBAAqB;IAEnDC,MAAM,CAACC,MAAM,CAAC,IAAI,CAACC,MAAM,EAAE;MACzBC,QAAQ,EAAE,IAAI;MACdC,uBAAuB,EAAE,eAAe;MACxCC,mBAAmB,EAAnBA,4BAAmB;MACnBC,aAAa,EAAbA,kBAAa;MACbC,eAAe,EAAfA,wBAAe;MACfC,sBAAsB,EAAtBA,+BAAsB;MACtBC,eAAe,EAAfA;IACF,CAAC,CAAC;IAEFT,MAAM,CAACC,MAAM,CAAC,IAAI,CAACS,OAAO,EAAE;MAC1BC,UAAU,EAAVA,mBAAU;MACVC,iBAAiB,EAAjBA;IACF,CAAC,CAAC;EACJ;AACF;AAACC,OAAA,CAAArB,OAAA,GAAAG,UAAA","ignoreList":[]}
1
+ {"version":3,"file":"Researcher.js","names":["_index","require","_firstWordExceptions","_interopRequireDefault","_functionWords","_transitionWords","_twoPartTransitionWords","_keyphraseLength","_getStemmer","_isPassiveSentence","e","__esModule","default","AbstractResearcher","languageProcessing","Researcher","constructor","paper","defaultResearches","getFleschReadingScore","Object","assign","config","language","passiveConstructionType","firstWordExceptions","functionWords","transitionWords","twoPartTransitionWords","keyphraseLength","helpers","getStemmer","isPassiveSentence","exports"],"sources":["../../../../src/languageProcessing/languages/sv/Researcher.js"],"sourcesContent":["import {languageProcessing} from '@axyseo/index';\nconst {AbstractResearcher} = languageProcessing;\n\n// All config\nimport firstWordExceptions from './config/firstWordExceptions';\nimport {all as functionWords} from './config/functionWords';\nimport transitionWords from './config/transitionWords';\nimport twoPartTransitionWords from './config/twoPartTransitionWords';\nimport keyphraseLength from './config/keyphraseLength';\n\n// All helpers\nimport getStemmer from './helpers/getStemmer';\nimport isPassiveSentence from './helpers/isPassiveSentence';\n\n/**\n * The researcher contains all the researches, helpers, data, and config.\n */\nexport default class Researcher extends AbstractResearcher {\n /**\n * Constructor\n * @param {Paper} paper The Paper object that is needed within the researches.\n * @constructor\n */\n constructor(paper) {\n super(paper);\n\n // Delete the researches that are not available in Swedish.\n delete this.defaultResearches.getFleschReadingScore;\n\n Object.assign(this.config, {\n language: 'sv',\n passiveConstructionType: 'morphological',\n firstWordExceptions,\n functionWords,\n transitionWords,\n twoPartTransitionWords,\n keyphraseLength\n });\n\n Object.assign(this.helpers, {\n getStemmer,\n isPassiveSentence\n });\n }\n}\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAIA,IAAAC,oBAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,cAAA,GAAAH,OAAA;AACA,IAAAI,gBAAA,GAAAF,sBAAA,CAAAF,OAAA;AACA,IAAAK,uBAAA,GAAAH,sBAAA,CAAAF,OAAA;AACA,IAAAM,gBAAA,GAAAJ,sBAAA,CAAAF,OAAA;AAGA,IAAAO,WAAA,GAAAL,sBAAA,CAAAF,OAAA;AACA,IAAAQ,kBAAA,GAAAN,sBAAA,CAAAF,OAAA;AAA4D,SAAAE,uBAAAO,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAX5D,MAAM;EAACG;AAAkB,CAAC,GAAGC,yBAAkB;;AAE/C;;AAOA;;AAIA;AACA;AACA;AACe,MAAMC,UAAU,SAASF,kBAAkB,CAAC;EACzD;AACF;AACA;AACA;AACA;EACEG,WAAWA,CAACC,KAAK,EAAE;IACjB,KAAK,CAACA,KAAK,CAAC;;IAEZ;IACA,OAAO,IAAI,CAACC,iBAAiB,CAACC,qBAAqB;IAEnDC,MAAM,CAACC,MAAM,CAAC,IAAI,CAACC,MAAM,EAAE;MACzBC,QAAQ,EAAE,IAAI;MACdC,uBAAuB,EAAE,eAAe;MACxCC,mBAAmB,EAAnBA,4BAAmB;MACnBC,aAAa,EAAbA,kBAAa;MACbC,eAAe,EAAfA,wBAAe;MACfC,sBAAsB,EAAtBA,+BAAsB;MACtBC,eAAe,EAAfA;IACF,CAAC,CAAC;IAEFT,MAAM,CAACC,MAAM,CAAC,IAAI,CAACS,OAAO,EAAE;MAC1BC,UAAU,EAAVA,mBAAU;MACVC,iBAAiB,EAAjBA;IACF,CAAC,CAAC;EACJ;AACF;AAACC,OAAA,CAAArB,OAAA,GAAAG,UAAA","ignoreList":[]}
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.default = getStemmer;
7
7
  var _lodash = require("lodash");
8
- var _index = require("../../../index");
8
+ var _index = require("@axyseo/index");
9
9
  var _stem = _interopRequireDefault(require("./internal/stem"));
10
10
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
11
11
  const {
@@ -1 +1 @@
1
- {"version":3,"file":"getStemmer.js","names":["_lodash","require","_index","_stem","_interopRequireDefault","e","__esModule","default","baseStemmer","languageProcessing","getStemmer","researcher","morphologyData","get","getData","word","stem"],"sources":["../../../../../src/languageProcessing/languages/sv/helpers/getStemmer.js"],"sourcesContent":["import {get} from 'lodash';\nimport {languageProcessing} from '../../../index';\nconst {baseStemmer} = languageProcessing;\n\nimport stem from './internal/stem';\n\n/**\n * Returns the stemmer for a researcher.\n *\n * @param {Researcher} researcher The researcher.\n *\n * @returns {Function} The stemmer.\n */\nexport default function getStemmer(researcher) {\n const morphologyData = get(researcher.getData('morphology'), 'sv', false);\n\n if (morphologyData) {\n return word => stem(word, morphologyData);\n }\n\n return baseStemmer;\n}\n"],"mappings":";;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AAGA,IAAAE,KAAA,GAAAC,sBAAA,CAAAH,OAAA;AAAmC,SAAAG,uBAAAC,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAFnC,MAAM;EAACG;AAAW,CAAC,GAAGC,yBAAkB;AAIxC;AACA;AACA;AACA;AACA;AACA;AACA;AACe,SAASC,UAAUA,CAACC,UAAU,EAAE;EAC7C,MAAMC,cAAc,GAAG,IAAAC,WAAG,EAACF,UAAU,CAACG,OAAO,CAAC,YAAY,CAAC,EAAE,IAAI,EAAE,KAAK,CAAC;EAEzE,IAAIF,cAAc,EAAE;IAClB,OAAOG,IAAI,IAAI,IAAAC,aAAI,EAACD,IAAI,EAAEH,cAAc,CAAC;EAC3C;EAEA,OAAOJ,WAAW;AACpB","ignoreList":[]}
1
+ {"version":3,"file":"getStemmer.js","names":["_lodash","require","_index","_stem","_interopRequireDefault","e","__esModule","default","baseStemmer","languageProcessing","getStemmer","researcher","morphologyData","get","getData","word","stem"],"sources":["../../../../../src/languageProcessing/languages/sv/helpers/getStemmer.js"],"sourcesContent":["import {get} from 'lodash';\nimport {languageProcessing} from '@axyseo/index';\nconst {baseStemmer} = languageProcessing;\n\nimport stem from './internal/stem';\n\n/**\n * Returns the stemmer for a researcher.\n *\n * @param {Researcher} researcher The researcher.\n *\n * @returns {Function} The stemmer.\n */\nexport default function getStemmer(researcher) {\n const morphologyData = get(researcher.getData('morphology'), 'sv', false);\n\n if (morphologyData) {\n return word => stem(word, morphologyData);\n }\n\n return baseStemmer;\n}\n"],"mappings":";;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AAGA,IAAAE,KAAA,GAAAC,sBAAA,CAAAH,OAAA;AAAmC,SAAAG,uBAAAC,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAFnC,MAAM;EAACG;AAAW,CAAC,GAAGC,yBAAkB;AAIxC;AACA;AACA;AACA;AACA;AACA;AACA;AACe,SAASC,UAAUA,CAACC,UAAU,EAAE;EAC7C,MAAMC,cAAc,GAAG,IAAAC,WAAG,EAACF,UAAU,CAACG,OAAO,CAAC,YAAY,CAAC,EAAE,IAAI,EAAE,KAAK,CAAC;EAEzE,IAAIF,cAAc,EAAE;IAClB,OAAOG,IAAI,IAAI,IAAAC,aAAI,EAACD,IAAI,EAAEH,cAAc,CAAC;EAC3C;EAEA,OAAOJ,WAAW;AACpB","ignoreList":[]}
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = isPassiveSentence;
7
- var _index = require("../../../index");
7
+ var _index = require("@axyseo/index");
8
8
  var _passiveVerbs = _interopRequireDefault(require("../config/internal/passiveVerbs"));
9
9
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
10
10
  const {
@@ -1 +1 @@
1
- {"version":3,"file":"isPassiveSentence.js","names":["_index","require","_passiveVerbs","_interopRequireDefault","e","__esModule","default","areWordsInSentence","languageProcessing","isPassiveSentence","sentence","passiveVerbs"],"sources":["../../../../../src/languageProcessing/languages/sv/helpers/isPassiveSentence.js"],"sourcesContent":["import {languageProcessing} from '../../../index';\nconst {areWordsInSentence} = languageProcessing;\n\nimport passiveVerbs from '../config/internal/passiveVerbs';\n\n/**\n * Checks the passed sentence to see if it contains passive verbs.\n *\n * @param {string} sentence The sentence to match against.\n * @returns {Boolean} Whether the sentence contains passive voice.\n */\nexport default function isPassiveSentence(sentence) {\n return areWordsInSentence(passiveVerbs, sentence);\n}\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAGA,IAAAC,aAAA,GAAAC,sBAAA,CAAAF,OAAA;AAA2D,SAAAE,uBAAAC,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAF3D,MAAM;EAACG;AAAkB,CAAC,GAAGC,yBAAkB;AAI/C;AACA;AACA;AACA;AACA;AACA;AACe,SAASC,iBAAiBA,CAACC,QAAQ,EAAE;EAClD,OAAOH,kBAAkB,CAACI,qBAAY,EAAED,QAAQ,CAAC;AACnD","ignoreList":[]}
1
+ {"version":3,"file":"isPassiveSentence.js","names":["_index","require","_passiveVerbs","_interopRequireDefault","e","__esModule","default","areWordsInSentence","languageProcessing","isPassiveSentence","sentence","passiveVerbs"],"sources":["../../../../../src/languageProcessing/languages/sv/helpers/isPassiveSentence.js"],"sourcesContent":["import {languageProcessing} from '@axyseo/index';\nconst {areWordsInSentence} = languageProcessing;\n\nimport passiveVerbs from '../config/internal/passiveVerbs';\n\n/**\n * Checks the passed sentence to see if it contains passive verbs.\n *\n * @param {string} sentence The sentence to match against.\n * @returns {Boolean} Whether the sentence contains passive voice.\n */\nexport default function isPassiveSentence(sentence) {\n return areWordsInSentence(passiveVerbs, sentence);\n}\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAGA,IAAAC,aAAA,GAAAC,sBAAA,CAAAF,OAAA;AAA2D,SAAAE,uBAAAC,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAF3D,MAAM;EAACG;AAAkB,CAAC,GAAGC,yBAAkB;AAI/C;AACA;AACA;AACA;AACA;AACA;AACe,SAASC,iBAAiBA,CAACC,QAAQ,EAAE;EAClD,OAAOH,kBAAkB,CAACI,qBAAY,EAAED,QAAQ,CAAC;AACnD","ignoreList":[]}
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
- var _index = require("../../../index");
7
+ var _index = require("@axyseo/index");
8
8
  var _firstWordExceptions = _interopRequireDefault(require("./config/firstWordExceptions"));
9
9
  var _functionWords = _interopRequireDefault(require("./config/functionWords"));
10
10
  var _transitionWords = _interopRequireDefault(require("./config/transitionWords"));
@@ -1 +1 @@
1
- {"version":3,"file":"Researcher.js","names":["_index","require","_firstWordExceptions","_interopRequireDefault","_functionWords","_transitionWords","_twoPartTransitionWords","_sentenceLength","_getStemmer","_isPassiveSentence","e","__esModule","default","AbstractResearcher","languageProcessing","Researcher","constructor","paper","defaultResearches","getFleschReadingScore","Object","assign","config","language","passiveConstructionType","firstWordExceptions","functionWords","transitionWords","twoPartTransitionWords","sentenceLength","helpers","getStemmer","isPassiveSentence","exports"],"sources":["../../../../src/languageProcessing/languages/tr/Researcher.js"],"sourcesContent":["import {languageProcessing} from '../../../index';\nconst {AbstractResearcher} = languageProcessing;\n\n// All config\nimport firstWordExceptions from './config/firstWordExceptions';\nimport functionWords from './config/functionWords';\nimport transitionWords from './config/transitionWords';\nimport twoPartTransitionWords from './config/twoPartTransitionWords';\nimport sentenceLength from './config/sentenceLength';\n\n// All helpers\nimport getStemmer from './helpers/getStemmer';\nimport isPassiveSentence from './helpers/isPassiveSentence';\n\n/**\n * The researcher contains all the researches, helpers, data, and config.\n */\nexport default class Researcher extends AbstractResearcher {\n /**\n * Constructor\n * @param {Paper} paper The Paper object that is needed within the researches.\n * @constructor\n */\n constructor(paper) {\n super(paper);\n\n delete this.defaultResearches.getFleschReadingScore;\n\n Object.assign(this.config, {\n language: 'tr',\n passiveConstructionType: 'morphological',\n firstWordExceptions,\n functionWords,\n transitionWords,\n twoPartTransitionWords,\n sentenceLength\n });\n\n Object.assign(this.helpers, {\n getStemmer,\n isPassiveSentence\n });\n }\n}\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAIA,IAAAC,oBAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,cAAA,GAAAD,sBAAA,CAAAF,OAAA;AACA,IAAAI,gBAAA,GAAAF,sBAAA,CAAAF,OAAA;AACA,IAAAK,uBAAA,GAAAH,sBAAA,CAAAF,OAAA;AACA,IAAAM,eAAA,GAAAJ,sBAAA,CAAAF,OAAA;AAGA,IAAAO,WAAA,GAAAL,sBAAA,CAAAF,OAAA;AACA,IAAAQ,kBAAA,GAAAN,sBAAA,CAAAF,OAAA;AAA4D,SAAAE,uBAAAO,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAX5D,MAAM;EAACG;AAAkB,CAAC,GAAGC,yBAAkB;;AAE/C;;AAOA;;AAIA;AACA;AACA;AACe,MAAMC,UAAU,SAASF,kBAAkB,CAAC;EACzD;AACF;AACA;AACA;AACA;EACEG,WAAWA,CAACC,KAAK,EAAE;IACjB,KAAK,CAACA,KAAK,CAAC;IAEZ,OAAO,IAAI,CAACC,iBAAiB,CAACC,qBAAqB;IAEnDC,MAAM,CAACC,MAAM,CAAC,IAAI,CAACC,MAAM,EAAE;MACzBC,QAAQ,EAAE,IAAI;MACdC,uBAAuB,EAAE,eAAe;MACxCC,mBAAmB,EAAnBA,4BAAmB;MACnBC,aAAa,EAAbA,sBAAa;MACbC,eAAe,EAAfA,wBAAe;MACfC,sBAAsB,EAAtBA,+BAAsB;MACtBC,cAAc,EAAdA;IACF,CAAC,CAAC;IAEFT,MAAM,CAACC,MAAM,CAAC,IAAI,CAACS,OAAO,EAAE;MAC1BC,UAAU,EAAVA,mBAAU;MACVC,iBAAiB,EAAjBA;IACF,CAAC,CAAC;EACJ;AACF;AAACC,OAAA,CAAArB,OAAA,GAAAG,UAAA","ignoreList":[]}
1
+ {"version":3,"file":"Researcher.js","names":["_index","require","_firstWordExceptions","_interopRequireDefault","_functionWords","_transitionWords","_twoPartTransitionWords","_sentenceLength","_getStemmer","_isPassiveSentence","e","__esModule","default","AbstractResearcher","languageProcessing","Researcher","constructor","paper","defaultResearches","getFleschReadingScore","Object","assign","config","language","passiveConstructionType","firstWordExceptions","functionWords","transitionWords","twoPartTransitionWords","sentenceLength","helpers","getStemmer","isPassiveSentence","exports"],"sources":["../../../../src/languageProcessing/languages/tr/Researcher.js"],"sourcesContent":["import {languageProcessing} from '@axyseo/index';\nconst {AbstractResearcher} = languageProcessing;\n\n// All config\nimport firstWordExceptions from './config/firstWordExceptions';\nimport functionWords from './config/functionWords';\nimport transitionWords from './config/transitionWords';\nimport twoPartTransitionWords from './config/twoPartTransitionWords';\nimport sentenceLength from './config/sentenceLength';\n\n// All helpers\nimport getStemmer from './helpers/getStemmer';\nimport isPassiveSentence from './helpers/isPassiveSentence';\n\n/**\n * The researcher contains all the researches, helpers, data, and config.\n */\nexport default class Researcher extends AbstractResearcher {\n /**\n * Constructor\n * @param {Paper} paper The Paper object that is needed within the researches.\n * @constructor\n */\n constructor(paper) {\n super(paper);\n\n delete this.defaultResearches.getFleschReadingScore;\n\n Object.assign(this.config, {\n language: 'tr',\n passiveConstructionType: 'morphological',\n firstWordExceptions,\n functionWords,\n transitionWords,\n twoPartTransitionWords,\n sentenceLength\n });\n\n Object.assign(this.helpers, {\n getStemmer,\n isPassiveSentence\n });\n }\n}\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAIA,IAAAC,oBAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,cAAA,GAAAD,sBAAA,CAAAF,OAAA;AACA,IAAAI,gBAAA,GAAAF,sBAAA,CAAAF,OAAA;AACA,IAAAK,uBAAA,GAAAH,sBAAA,CAAAF,OAAA;AACA,IAAAM,eAAA,GAAAJ,sBAAA,CAAAF,OAAA;AAGA,IAAAO,WAAA,GAAAL,sBAAA,CAAAF,OAAA;AACA,IAAAQ,kBAAA,GAAAN,sBAAA,CAAAF,OAAA;AAA4D,SAAAE,uBAAAO,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAX5D,MAAM;EAACG;AAAkB,CAAC,GAAGC,yBAAkB;;AAE/C;;AAOA;;AAIA;AACA;AACA;AACe,MAAMC,UAAU,SAASF,kBAAkB,CAAC;EACzD;AACF;AACA;AACA;AACA;EACEG,WAAWA,CAACC,KAAK,EAAE;IACjB,KAAK,CAACA,KAAK,CAAC;IAEZ,OAAO,IAAI,CAACC,iBAAiB,CAACC,qBAAqB;IAEnDC,MAAM,CAACC,MAAM,CAAC,IAAI,CAACC,MAAM,EAAE;MACzBC,QAAQ,EAAE,IAAI;MACdC,uBAAuB,EAAE,eAAe;MACxCC,mBAAmB,EAAnBA,4BAAmB;MACnBC,aAAa,EAAbA,sBAAa;MACbC,eAAe,EAAfA,wBAAe;MACfC,sBAAsB,EAAtBA,+BAAsB;MACtBC,cAAc,EAAdA;IACF,CAAC,CAAC;IAEFT,MAAM,CAACC,MAAM,CAAC,IAAI,CAACS,OAAO,EAAE;MAC1BC,UAAU,EAAVA,mBAAU;MACVC,iBAAiB,EAAjBA;IACF,CAAC,CAAC;EACJ;AACF;AAACC,OAAA,CAAArB,OAAA,GAAAG,UAAA","ignoreList":[]}
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.default = getStemmer;
7
7
  var _lodash = require("lodash");
8
- var _index = require("../../../index");
8
+ var _index = require("@axyseo/index");
9
9
  var _stem = _interopRequireDefault(require("./internal/stem"));
10
10
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
11
11
  const {
@@ -1 +1 @@
1
- {"version":3,"file":"getStemmer.js","names":["_lodash","require","_index","_stem","_interopRequireDefault","e","__esModule","default","baseStemmer","languageProcessing","getStemmer","researcher","morphologyData","get","getData","word","determineStem"],"sources":["../../../../../src/languageProcessing/languages/tr/helpers/getStemmer.js"],"sourcesContent":["import {get} from 'lodash';\nimport {languageProcessing} from '../../../index';\nconst {baseStemmer} = languageProcessing;\n\nimport determineStem from './internal/stem';\n\n/**\n * Returns the stemmer for a researcher.\n *\n * @param {Researcher} researcher The researcher.\n *\n * @returns {Function} The stemmer.\n */\nexport default function getStemmer(researcher) {\n const morphologyData = get(researcher.getData('morphology'), 'tr', false);\n\n if (morphologyData) {\n return word => determineStem(word, morphologyData);\n }\n\n return baseStemmer;\n}\n"],"mappings":";;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AAGA,IAAAE,KAAA,GAAAC,sBAAA,CAAAH,OAAA;AAA4C,SAAAG,uBAAAC,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAF5C,MAAM;EAACG;AAAW,CAAC,GAAGC,yBAAkB;AAIxC;AACA;AACA;AACA;AACA;AACA;AACA;AACe,SAASC,UAAUA,CAACC,UAAU,EAAE;EAC7C,MAAMC,cAAc,GAAG,IAAAC,WAAG,EAACF,UAAU,CAACG,OAAO,CAAC,YAAY,CAAC,EAAE,IAAI,EAAE,KAAK,CAAC;EAEzE,IAAIF,cAAc,EAAE;IAClB,OAAOG,IAAI,IAAI,IAAAC,aAAa,EAACD,IAAI,EAAEH,cAAc,CAAC;EACpD;EAEA,OAAOJ,WAAW;AACpB","ignoreList":[]}
1
+ {"version":3,"file":"getStemmer.js","names":["_lodash","require","_index","_stem","_interopRequireDefault","e","__esModule","default","baseStemmer","languageProcessing","getStemmer","researcher","morphologyData","get","getData","word","determineStem"],"sources":["../../../../../src/languageProcessing/languages/tr/helpers/getStemmer.js"],"sourcesContent":["import {get} from 'lodash';\nimport {languageProcessing} from '@axyseo/index';\nconst {baseStemmer} = languageProcessing;\n\nimport determineStem from './internal/stem';\n\n/**\n * Returns the stemmer for a researcher.\n *\n * @param {Researcher} researcher The researcher.\n *\n * @returns {Function} The stemmer.\n */\nexport default function getStemmer(researcher) {\n const morphologyData = get(researcher.getData('morphology'), 'tr', false);\n\n if (morphologyData) {\n return word => determineStem(word, morphologyData);\n }\n\n return baseStemmer;\n}\n"],"mappings":";;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AAGA,IAAAE,KAAA,GAAAC,sBAAA,CAAAH,OAAA;AAA4C,SAAAG,uBAAAC,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAF5C,MAAM;EAACG;AAAW,CAAC,GAAGC,yBAAkB;AAIxC;AACA;AACA;AACA;AACA;AACA;AACA;AACe,SAASC,UAAUA,CAACC,UAAU,EAAE;EAC7C,MAAMC,cAAc,GAAG,IAAAC,WAAG,EAACF,UAAU,CAACG,OAAO,CAAC,YAAY,CAAC,EAAE,IAAI,EAAE,KAAK,CAAC;EAEzE,IAAIF,cAAc,EAAE;IAClB,OAAOG,IAAI,IAAI,IAAAC,aAAa,EAACD,IAAI,EAAEH,cAAc,CAAC;EACpD;EAEA,OAAOJ,WAAW;AACpB","ignoreList":[]}
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = stem;
7
- var _turkishStemmer = _interopRequireDefault(require("../../../vendor/turkishStemmer"));
7
+ var _turkishStemmer = _interopRequireDefault(require("@axyseo/vendor/turkishStemmer"));
8
8
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
9
9
  /**
10
10
  * Stems Turkish words.