axyseo 2.0.0-alpha.0.0.9 → 2.0.0-alpha.2

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 (269) 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/assessors/avadaAssessor.js +2 -2
  262. package/build/scoring/assessors/avadaAssessor.js.map +1 -1
  263. package/build/scoring/assessors/seoAssessor.js +6 -6
  264. package/build/scoring/assessors/seoAssessor.js.map +1 -1
  265. package/build/scoring/helpers/assessments/recommendedKeywordCount.js +1 -1
  266. package/build/scoring/helpers/assessments/recommendedKeywordCount.js.map +1 -1
  267. package/build/scoring/helpers/index.js +1 -1
  268. package/build/scoring/helpers/index.js.map +1 -1
  269. package/package.json +2 -3
@@ -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/it/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 an Italian word is a participle.\n * @param {string} word An Italian word.\n * @returns {boolean} Returns true if word is an Italian participle, and false otherwise.\n */\nfunction isParticiple(word) {\n const participleSuffixes = ['a', 'o', 'e', 'i'];\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, -1);\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 * Creates a participle list 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,GAAG,EAAE,GAAG,CAAC;EAC/C;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,CAAC,CAAC,CAAC;MAC9B;MACA,OAAOC,gCAAe,CAACC,QAAQ,CAACH,IAAI,CAAC;IACvC;EACF,CAAC,CAAC;AACJ;AACA;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/it/helpers/internal/getParticiples.js"],"sourcesContent":["import {languageProcessing} from '../../../index';\nconst {getWords} = languageProcessing;\n\nimport participleStems from '../../config/internal/passiveVoiceParticiples';\n\n/**\n * Checks if an Italian word is a participle.\n * @param {string} word An Italian word.\n * @returns {boolean} Returns true if word is an Italian participle, and false otherwise.\n */\nfunction isParticiple(word) {\n const participleSuffixes = ['a', 'o', 'e', 'i'];\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, -1);\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 * Creates a participle list 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,GAAG,EAAE,GAAG,CAAC;EAC/C;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,CAAC,CAAC,CAAC;MAC9B;MACA,OAAOC,gCAAe,CAACC,QAAQ,CAACH,IAAI,CAAC;IACvC;EACF,CAAC,CAAC;AACJ;AACA;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("@axyseo/index");
7
+ var _index = require("../../../index");
8
8
  /* eslint-disable complexity */
9
9
  /* eslint-disable max-statements */
10
10
  /*
@@ -1 +1 @@
1
- {"version":3,"file":"stem.js","names":["_index","require","createSingleRuleFromArray","createRulesFromArrays","languageProcessing","isVowel","letter","morphologyData","externalStemmer","vowels","includes","getNextVowelPos","word","start","length","i","getNextConsonantPos","endsinArr","suffixes","endsWith","replaceAcute","acuteReplacements","preProcessing","acuteReplacement","replace","reg","repl","vowelMarking","RegExp","match","p1","p2","p3","toUpperCase","preProcess","toLowerCase","quReplacement","determineRs","r1","r2","rv","removePronounSuffixes","rvText","foundSuffix","pronounSuffixes","foundSuffixPre1","slice","preSuffixesGerund","foundSuffixPre2","preSuffixesInfinitive","infinitiveCompletion","removeStandardSuffixes","r2Text","r1Text","regions","suffixGroup","standardSuffixes","region","replacement","removeVerbSuffixes","verbSuffixes","normalizeDigraphs","digraphCh","digraphNormalization","digraphGh","canonicalizeStem","stemsThatBelongToOneWord","paradigm","verbsWithMultipleStems","irregularDiminutives","checkWordInFullFormExceptions","exceptions","stem","irregularPluralNounsAndAdjectives","irregularVerbs","substring","originalWord","wordAfter0","wordAfter1","generalSuffixes","canonicalStem"],"sources":["../../../../../../src/languageProcessing/languages/it/helpers/internal/stem.js"],"sourcesContent":["/* eslint-disable complexity */\n/* eslint-disable max-statements */\n/*\nCopyright (c) 2012, Leonardo Fenu, Chris Umbel\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:\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\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 {createSingleRuleFromArray, createRulesFromArrays} = languageProcessing;\n\n/**\n * Determines whether a letter is a vowel.\n *\n * @param {string} letter The letter that has to be checked.\n * @param {Object} morphologyData The Italian morphology data file.\n *\n * @returns {boolean} True if the letter is a vowel.\n */\nfunction isVowel(letter, morphologyData) {\n return morphologyData.externalStemmer.vowels.includes(letter);\n}\n\n/**\n * Determines the next position in a word that is a vowel.\n *\n * @param {string} word The word to be checked.\n * @param {Object} morphologyData The Italian morphology data file.\n * @param {number} start The position of the word where you start checking.\n *\n * @returns {number} The next position in a word that is a vowel, or the final position if no vowel is found.\n */\nfunction getNextVowelPos(word, morphologyData, start) {\n start = start + 1;\n const length = word.length;\n\n for (let i = start; i < length; i++) {\n if (isVowel(word[i], morphologyData)) {\n return i;\n }\n }\n\n return length;\n}\n\n/**\n * Determines the next position in a word that is a consonant.\n *\n * @param {string} word The word that has to be checked.\n * @param {Object} morphologyData The Italian morphology data file.\n * @param {number} start The position of the word where you start checking.\n *\n * @returns {number} The next position in a word that is a consonant, or the final position if no consonant is found.\n */\nfunction getNextConsonantPos(word, morphologyData, start) {\n const length = word.length;\n\n for (let i = start; i < length; i++) {\n if (!isVowel(word[i], morphologyData)) {\n return i;\n }\n }\n\n return length;\n}\n\n/**\n * Checks whether a word ends in a suffix and if so it returns the suffix.\n *\n * @param {string} word The word that has to be checked.\n * @param {string[]} suffixes The suffixes that have to be checked.\n *\n * @returns {string} The suffix that the word ends in or an empty string if the word does not end in any of the suffixes.\n */\nfunction endsinArr(word, suffixes) {\n for (let i = 0; i < suffixes.length; i++) {\n if (word.endsWith(suffixes[i])) {\n return suffixes[i];\n }\n }\n\n return '';\n}\n\n/**\n * Turns acute accents into grave ones.\n *\n * @param {string} word The word that has to be checked.\n * @param {Object} morphologyData The Italian morphology data file.\n *\n * @returns {string} The word with acute accents (e.g. é) replaced by grave ones (e.g. è).\n */\nfunction replaceAcute(word, morphologyData) {\n const acuteReplacements = createRulesFromArrays(\n morphologyData.externalStemmer.preProcessing.acuteReplacements,\n 'gi'\n );\n\n for (const acuteReplacement of acuteReplacements) {\n word = word.replace(acuteReplacement.reg, acuteReplacement.repl);\n }\n\n return word;\n}\n\n/**\n * Turns an i or u in between vowels into upper case.\n *\n * @param {string} word The word that has to be checked.\n * @param {Object} morphologyData The Italian morphology data file.\n *\n * @returns {string} The word with either i or u turned into upper case.\n */\nfunction vowelMarking(word, morphologyData) {\n return word.replace(\n new RegExp(morphologyData.externalStemmer.preProcessing.vowelMarking, 'g'),\n (match, p1, p2, p3) => p1 + p2.toUpperCase() + p3\n );\n}\n\n/**\n * Pre-process the word for stemming by setting it to lower case and replacing some letters.\n *\n * @param {string} word The word to pre-process.\n * @param {Object} morphologyData The Italian morphology data file.\n *\n * @returns {string} The pre-processed word.\n */\nfunction preProcess(word, morphologyData) {\n word = word.toLowerCase();\n word = replaceAcute(word, morphologyData);\n const quReplacement = createSingleRuleFromArray(\n morphologyData.externalStemmer.preProcessing.quReplacement,\n 'g'\n );\n word = word.replace(quReplacement.reg, quReplacement.repl);\n word = vowelMarking(word, morphologyData);\n\n return word;\n}\n\n/**\n * Determines R1, R2 and RV in the word.\n *\n * @param {string} word The word for which Rs have to be determined.\n * @param {Object} morphologyData The Italian morphology data file.\n *\n * @returns {{r2: number, rv: number, r1: number}} R1, R2 and RV in the word.\n */\nconst determineRs = function(word, morphologyData) {\n let r1 = word.length;\n let r2 = word.length;\n let rv = word.length;\n\n // R1 is the region after the first non-vowel following a vowel,\n for (let i = 0; i < word.length - 1 && r1 === word.length; i++) {\n if (isVowel(word[i], morphologyData) && !isVowel(word[i + 1], morphologyData)) {\n r1 = i + 2;\n }\n }\n\n // R2 is the region after the first non-vowel following a vowel in R1\n for (let i = r1; i < word.length - 1 && r2 === word.length; i++) {\n if (isVowel(word[i], morphologyData) && !isVowel(word[i + 1], morphologyData)) {\n r2 = i + 2;\n }\n }\n\n if (word.length > 3) {\n if (!isVowel(word[1], morphologyData)) {\n // If the second letter is a consonant, RV is the region after the next following vowel.\n rv = getNextVowelPos(word, morphologyData, 1) + 1;\n } else if (isVowel(word[0], morphologyData) && isVowel(word[1], morphologyData)) {\n // Or if the first two letters are vowels, RV is the region after the next consonant.\n rv = getNextConsonantPos(word, morphologyData, 2) + 1;\n } else {\n /*\n * Otherwise (consonant-vowel case) RV is the region after the third letter.\n * But RV is the end of the word if these positions cannot be found.\n */\n rv = 3;\n }\n }\n\n return {r1, r2, rv};\n};\n\n/**\n * Removes pronoun suffixes.\n *\n * @param {string} word The word from which suffixes have to be removed.\n * @param {Object} morphologyData The Italian morphology data file.\n * @param {string} rvText The content of the RV.\n *\n * @returns {string} The word without pronoun suffixes.\n */\nconst removePronounSuffixes = function(word, morphologyData, rvText) {\n const foundSuffix = endsinArr(word, morphologyData.externalStemmer.pronounSuffixes.suffixes);\n\n if (foundSuffix !== '') {\n const foundSuffixPre1 = endsinArr(\n rvText.slice(0, -foundSuffix.length),\n morphologyData.externalStemmer.pronounSuffixes.preSuffixesGerund\n );\n const foundSuffixPre2 = endsinArr(\n rvText.slice(0, -foundSuffix.length),\n morphologyData.externalStemmer.pronounSuffixes.preSuffixesInfinitive\n );\n\n if (foundSuffixPre1 !== '') {\n word = word.slice(0, -foundSuffix.length);\n }\n if (foundSuffixPre2 !== '') {\n word =\n word.slice(0, -foundSuffix.length) +\n morphologyData.externalStemmer.pronounSuffixes.infinitiveCompletion;\n }\n }\n return word;\n};\n\n/**\n * Removes standard suffixes.\n *\n * @param {string} word The word from which standard suffixes have to be removed.\n * @param {Object} morphologyData The Italian morphology data file.\n * @param {string} r2Text The content of the R2.\n * @param {string} r1Text The content of the R1.\n * @param {string} rvText The content of the RV.\n *\n * @returns {string} The word without standard suffixes.\n */\nconst removeStandardSuffixes = function(word, morphologyData, r2Text, r1Text, rvText) {\n const regions = {\n r1: r1Text,\n r2: r2Text,\n rv: rvText\n };\n\n for (const suffixGroup of morphologyData.externalStemmer.standardSuffixes) {\n const foundSuffix = endsinArr(regions[suffixGroup.region], suffixGroup.suffixes);\n\n if (foundSuffix) {\n return word.slice(0, -foundSuffix.length) + suffixGroup.replacement;\n }\n }\n\n return word;\n};\n\n/**\n * Removes verb suffixes.\n *\n * @param {string} word The word from which verb suffixes have to be removed.\n * @param {Object} morphologyData The Italian morphology data file.\n * @param {string} rvText The content of the RV.\n *\n * @returns {string} The word without verb suffixes.\n */\nconst removeVerbSuffixes = function(word, morphologyData, rvText) {\n const foundSuffix = endsinArr(rvText, morphologyData.externalStemmer.verbSuffixes);\n\n if (foundSuffix) {\n word = word.slice(0, -foundSuffix.length);\n }\n\n return word;\n};\n\n/**\n * Normalizes digraphs ch/gh to c/g.\n *\n * @param {string} word The word to normalize.\n * @param {Object} morphologyData The Italian morphology data file.\n * @param {string} rvText The content of the RV.\n *\n * @returns {string} The normalized word.\n */\nconst normalizeDigraphs = function(word, morphologyData, rvText) {\n const digraphCh = morphologyData.externalStemmer.digraphNormalization.digraphCh;\n const digraphGh = morphologyData.externalStemmer.digraphNormalization.digraphGh;\n\n if (rvText.endsWith(digraphCh[0])) {\n word = word.slice(0, -digraphGh[0].length) + digraphCh[1];\n } else if (rvText.endsWith(digraphGh[0])) {\n word = word.slice(0, -digraphGh[0].length) + digraphGh[1];\n }\n\n return word;\n};\n\n/**\n * Returns a canonical stem for words with multiple stems.\n *\n * @param {string} word The word to canonicalize.\n * @param {Object} stemsThatBelongToOneWord An object of arrays of stems belonging to one word.\n *\n * @returns {string} A canonicalized stem or the original word.\n */\nconst canonicalizeStem = function(word, stemsThatBelongToOneWord) {\n // Check the verbs list. The infinitive stem is always the canonical stem for verbs.\n for (const paradigm of stemsThatBelongToOneWord.verbsWithMultipleStems) {\n if (paradigm.includes(word)) {\n return paradigm[0];\n }\n }\n // Check the diminutives list.\n for (const paradigm of stemsThatBelongToOneWord.irregularDiminutives) {\n if (paradigm.includes(word)) {\n return paradigm[0];\n }\n }\n};\n\n/**\n * Checks whether a word is in the full-form exception list and if so returns the canonical stem.\n *\n * @param {string} word\t The word to be checked.\n * @param {Object} exceptions The list of full-form exceptions to be checked in.\n *\n * @returns {null|string} The canonical stem or null if nothing was found.\n */\nconst checkWordInFullFormExceptions = function(word, exceptions) {\n for (const paradigm of exceptions) {\n if (paradigm[1].includes(word)) {\n return paradigm[0];\n }\n }\n return null;\n};\n\n/**\n * Stems Italian words.\n *\n * @param {string} word The word to stem.\n * @param {Object} morphologyData The Italian morphology data file.\n *\n * @returns {string} The stemmed word.\n */\nexport default function stem(word, morphologyData) {\n // Check the exception list for irregular plural nouns and adjectives.\n const irregularPluralNounsAndAdjectives = checkWordInFullFormExceptions(\n word,\n morphologyData.irregularPluralNounsAndAdjectives\n );\n if (irregularPluralNounsAndAdjectives) {\n return irregularPluralNounsAndAdjectives;\n }\n\n // Check the exception list for irregular verbs listed in full forms.\n const irregularVerbs = checkWordInFullFormExceptions(word, morphologyData.irregularVerbs);\n if (irregularVerbs) {\n return irregularVerbs;\n }\n\n // Start word pre-processing.\n word = preProcess(word, morphologyData);\n\n // Don't stem words that consist of less than 3 letters.\n if (word.length < 3) {\n return word;\n }\n\n // Determines r1 ,r2, rv.\n const {r1, r2, rv} = determineRs(word, morphologyData);\n\n // Determiners the content of r1, r2, and rv.\n let r1Text = word.substring(r1);\n let r2Text = word.substring(r2);\n let rvText = word.substring(rv);\n\n const originalWord = word;\n\n // Step 0: Attached pronoun removal.\n word = removePronounSuffixes(word, morphologyData, rvText);\n\n if (word !== originalWord) {\n r1Text = word.substring(r1);\n r2Text = word.substring(r2);\n rvText = word.substring(rv);\n }\n\n const wordAfter0 = word;\n\n // Step 1: Standard suffix removal.\n word = removeStandardSuffixes(word, morphologyData, r2Text, r1Text, rvText);\n\n if (word !== wordAfter0) {\n rvText = word.substring(rv);\n }\n\n const wordAfter1 = word;\n\n // Step 2: Verb suffix removal.\n if (wordAfter0 === wordAfter1) {\n word = removeVerbSuffixes(word, morphologyData, rvText);\n }\n\n rvText = word.substring(rv);\n\n // Always do step 3.\n let foundSuffix = '';\n\n // Remove general suffixes.\n if ((foundSuffix = endsinArr(rvText, morphologyData.externalStemmer.generalSuffixes)) !== '') {\n word = word.slice(0, -foundSuffix.length);\n }\n\n rvText = word.substring(rv);\n\n // Normalize digraphs ch/gh.\n word = normalizeDigraphs(word, morphologyData, rvText);\n\n // Lowercase the word before canonicalizing stem\n word = word.toLowerCase();\n\n // Returns a canonical stem for words with multiple stems (e.g., verbs: chiudere–chiuso; diminutives: ovetto-uovo).\n const canonicalStem = canonicalizeStem(word, morphologyData.stemsThatBelongToOneWord);\n if (canonicalStem) {\n return canonicalStem;\n }\n return word.toLowerCase();\n}\n"],"mappings":";;;;;;AAqBA,IAAAA,MAAA,GAAAC,OAAA;AArBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA,MAAM;EAACC,yBAAyB;EAAEC;AAAqB,CAAC,GAAGC,yBAAkB;;AAE7E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASC,OAAOA,CAACC,MAAM,EAAEC,cAAc,EAAE;EACvC,OAAOA,cAAc,CAACC,eAAe,CAACC,MAAM,CAACC,QAAQ,CAACJ,MAAM,CAAC;AAC/D;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASK,eAAeA,CAACC,IAAI,EAAEL,cAAc,EAAEM,KAAK,EAAE;EACpDA,KAAK,GAAGA,KAAK,GAAG,CAAC;EACjB,MAAMC,MAAM,GAAGF,IAAI,CAACE,MAAM;EAE1B,KAAK,IAAIC,CAAC,GAAGF,KAAK,EAAEE,CAAC,GAAGD,MAAM,EAAEC,CAAC,EAAE,EAAE;IACnC,IAAIV,OAAO,CAACO,IAAI,CAACG,CAAC,CAAC,EAAER,cAAc,CAAC,EAAE;MACpC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AKC,UAAU,EAAE;IAC7BlE,IAAI,GAAG+C,kBAAkB,CAAC/C,IAAI,EAAEL,cAAc,EAAEmC,MAAM,CAAC;EACzD;EAEAA,MAAM,GAAG9B,IAAI,CAAC+D,SAAS,CAACnC,EAAE,CAAC;;EAE3B;EACA,IAAIG,WAAW,GAAG,EAAE;;EAEpB;EACA,IAAI,CAACA,WAAW,GAAG1B,SAAS,CAACyB,MAAM,EAAEnC,cAAc,CAACC,eAAe,CAACuE,eAAe,CAAC,MAAM,EAAE,EAAE;IAC5FnE,IAAI,GAAGA,IAAI,CAACkC,KAAK,CAAC,CAAC,EAAE,CAACH,WAAW,CAAC7B,MAAM,CAAC;EAC3C;EAEA4B,MAAM,GAAG9B,IAAI,CAAC+D,SAAS,CAACnC,EAAE,CAAC;;EAE3B;EACA5B,IAAI,GAAGiD,iBAAiB,CAACjD,IAAI,EAAEL,cAAc,EAAEmC,MAAM,CAAC;;EAEtD;EACA9B,IAAI,GAAGA,IAAI,CAACuB,WAAW,CAAC,CAAC;;EAEzB;EACA,MAAM6C,aAAa,GAAGf,gBAAgB,CAACrD,IAAI,EAAEL,cAAc,CAAC2D,wBAAwB,CAAC;EACrF,IAAIc,aAAa,EAAE;IACjB,OAAOA,aAAa;EACtB;EACA,OAAOpE,IAAI,CAACuB,WAAW,CAAC,CAAC;AAC3B","ignoreList":[]}
1
+ {"version":3,"file":"stem.js","names":["_index","require","createSingleRuleFromArray","createRulesFromArrays","languageProcessing","isVowel","letter","morphologyData","externalStemmer","vowels","includes","getNextVowelPos","word","start","length","i","getNextConsonantPos","endsinArr","suffixes","endsWith","replaceAcute","acuteReplacements","preProcessing","acuteReplacement","replace","reg","repl","vowelMarking","RegExp","match","p1","p2","p3","toUpperCase","preProcess","toLowerCase","quReplacement","determineRs","r1","r2","rv","removePronounSuffixes","rvText","foundSuffix","pronounSuffixes","foundSuffixPre1","slice","preSuffixesGerund","foundSuffixPre2","preSuffixesInfinitive","infinitiveCompletion","removeStandardSuffixes","r2Text","r1Text","regions","suffixGroup","standardSuffixes","region","replacement","removeVerbSuffixes","verbSuffixes","normalizeDigraphs","digraphCh","digraphNormalization","digraphGh","canonicalizeStem","stemsThatBelongToOneWord","paradigm","verbsWithMultipleStems","irregularDiminutives","checkWordInFullFormExceptions","exceptions","stem","irregularPluralNounsAndAdjectives","irregularVerbs","substring","originalWord","wordAfter0","wordAfter1","generalSuffixes","canonicalStem"],"sources":["../../../../../../src/languageProcessing/languages/it/helpers/internal/stem.js"],"sourcesContent":["/* eslint-disable complexity */\n/* eslint-disable max-statements */\n/*\nCopyright (c) 2012, Leonardo Fenu, Chris Umbel\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:\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\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 {createSingleRuleFromArray, createRulesFromArrays} = languageProcessing;\n\n/**\n * Determines whether a letter is a vowel.\n *\n * @param {string} letter The letter that has to be checked.\n * @param {Object} morphologyData The Italian morphology data file.\n *\n * @returns {boolean} True if the letter is a vowel.\n */\nfunction isVowel(letter, morphologyData) {\n return morphologyData.externalStemmer.vowels.includes(letter);\n}\n\n/**\n * Determines the next position in a word that is a vowel.\n *\n * @param {string} word The word to be checked.\n * @param {Object} morphologyData The Italian morphology data file.\n * @param {number} start The position of the word where you start checking.\n *\n * @returns {number} The next position in a word that is a vowel, or the final position if no vowel is found.\n */\nfunction getNextVowelPos(word, morphologyData, start) {\n start = start + 1;\n const length = word.length;\n\n for (let i = start; i < length; i++) {\n if (isVowel(word[i], morphologyData)) {\n return i;\n }\n }\n\n return length;\n}\n\n/**\n * Determines the next position in a word that is a consonant.\n *\n * @param {string} word The word that has to be checked.\n * @param {Object} morphologyData The Italian morphology data file.\n * @param {number} start The position of the word where you start checking.\n *\n * @returns {number} The next position in a word that is a consonant, or the final position if no consonant is found.\n */\nfunction getNextConsonantPos(word, morphologyData, start) {\n const length = word.length;\n\n for (let i = start; i < length; i++) {\n if (!isVowel(word[i], morphologyData)) {\n return i;\n }\n }\n\n return length;\n}\n\n/**\n * Checks whether a word ends in a suffix and if so it returns the suffix.\n *\n * @param {string} word The word that has to be checked.\n * @param {string[]} suffixes The suffixes that have to be checked.\n *\n * @returns {string} The suffix that the word ends in or an empty string if the word does not end in any of the suffixes.\n */\nfunction endsinArr(word, suffixes) {\n for (let i = 0; i < suffixes.length; i++) {\n if (word.endsWith(suffixes[i])) {\n return suffixes[i];\n }\n }\n\n return '';\n}\n\n/**\n * Turns acute accents into grave ones.\n *\n * @param {string} word The word that has to be checked.\n * @param {Object} morphologyData The Italian morphology data file.\n *\n * @returns {string} The word with acute accents (e.g. é) replaced by grave ones (e.g. è).\n */\nfunction replaceAcute(word, morphologyData) {\n const acuteReplacements = createRulesFromArrays(\n morphologyData.externalStemmer.preProcessing.acuteReplacements,\n 'gi'\n );\n\n for (const acuteReplacement of acuteReplacements) {\n word = word.replace(acuteReplacement.reg, acuteReplacement.repl);\n }\n\n return word;\n}\n\n/**\n * Turns an i or u in between vowels into upper case.\n *\n * @param {string} word The word that has to be checked.\n * @param {Object} morphologyData The Italian morphology data file.\n *\n * @returns {string} The word with either i or u turned into upper case.\n */\nfunction vowelMarking(word, morphologyData) {\n return word.replace(\n new RegExp(morphologyData.externalStemmer.preProcessing.vowelMarking, 'g'),\n (match, p1, p2, p3) => p1 + p2.toUpperCase() + p3\n );\n}\n\n/**\n * Pre-process the word for stemming by setting it to lower case and replacing some letters.\n *\n * @param {string} word The word to pre-process.\n * @param {Object} morphologyData The Italian morphology data file.\n *\n * @returns {string} The pre-processed word.\n */\nfunction preProcess(word, morphologyData) {\n word = word.toLowerCase();\n word = replaceAcute(word, morphologyData);\n const quReplacement = createSingleRuleFromArray(\n morphologyData.externalStemmer.preProcessing.quReplacement,\n 'g'\n );\n word = word.replace(quReplacement.reg, quReplacement.repl);\n word = vowelMarking(word, morphologyData);\n\n return word;\n}\n\n/**\n * Determines R1, R2 and RV in the word.\n *\n * @param {string} word The word for which Rs have to be determined.\n * @param {Object} morphologyData The Italian morphology data file.\n *\n * @returns {{r2: number, rv: number, r1: number}} R1, R2 and RV in the word.\n */\nconst determineRs = function(word, morphologyData) {\n let r1 = word.length;\n let r2 = word.length;\n let rv = word.length;\n\n // R1 is the region after the first non-vowel following a vowel,\n for (let i = 0; i < word.length - 1 && r1 === word.length; i++) {\n if (isVowel(word[i], morphologyData) && !isVowel(word[i + 1], morphologyData)) {\n r1 = i + 2;\n }\n }\n\n // R2 is the region after the first non-vowel following a vowel in R1\n for (let i = r1; i < word.length - 1 && r2 === word.length; i++) {\n if (isVowel(word[i], morphologyData) && !isVowel(word[i + 1], morphologyData)) {\n r2 = i + 2;\n }\n }\n\n if (word.length > 3) {\n if (!isVowel(word[1], morphologyData)) {\n // If the second letter is a consonant, RV is the region after the next following vowel.\n rv = getNextVowelPos(word, morphologyData, 1) + 1;\n } else if (isVowel(word[0], morphologyData) && isVowel(word[1], morphologyData)) {\n // Or if the first two letters are vowels, RV is the region after the next consonant.\n rv = getNextConsonantPos(word, morphologyData, 2) + 1;\n } else {\n /*\n * Otherwise (consonant-vowel case) RV is the region after the third letter.\n * But RV is the end of the word if these positions cannot be found.\n */\n rv = 3;\n }\n }\n\n return {r1, r2, rv};\n};\n\n/**\n * Removes pronoun suffixes.\n *\n * @param {string} word The word from which suffixes have to be removed.\n * @param {Object} morphologyData The Italian morphology data file.\n * @param {string} rvText The content of the RV.\n *\n * @returns {string} The word without pronoun suffixes.\n */\nconst removePronounSuffixes = function(word, morphologyData, rvText) {\n const foundSuffix = endsinArr(word, morphologyData.externalStemmer.pronounSuffixes.suffixes);\n\n if (foundSuffix !== '') {\n const foundSuffixPre1 = endsinArr(\n rvText.slice(0, -foundSuffix.length),\n morphologyData.externalStemmer.pronounSuffixes.preSuffixesGerund\n );\n const foundSuffixPre2 = endsinArr(\n rvText.slice(0, -foundSuffix.length),\n morphologyData.externalStemmer.pronounSuffixes.preSuffixesInfinitive\n );\n\n if (foundSuffixPre1 !== '') {\n word = word.slice(0, -foundSuffix.length);\n }\n if (foundSuffixPre2 !== '') {\n word =\n word.slice(0, -foundSuffix.length) +\n morphologyData.externalStemmer.pronounSuffixes.infinitiveCompletion;\n }\n }\n return word;\n};\n\n/**\n * Removes standard suffixes.\n *\n * @param {string} word The word from which standard suffixes have to be removed.\n * @param {Object} morphologyData The Italian morphology data file.\n * @param {string} r2Text The content of the R2.\n * @param {string} r1Text The content of the R1.\n * @param {string} rvText The content of the RV.\n *\n * @returns {string} The word without standard suffixes.\n */\nconst removeStandardSuffixes = function(word, morphologyData, r2Text, r1Text, rvText) {\n const regions = {\n r1: r1Text,\n r2: r2Text,\n rv: rvText\n };\n\n for (const suffixGroup of morphologyData.externalStemmer.standardSuffixes) {\n const foundSuffix = endsinArr(regions[suffixGroup.region], suffixGroup.suffixes);\n\n if (foundSuffix) {\n return word.slice(0, -foundSuffix.length) + suffixGroup.replacement;\n }\n }\n\n return word;\n};\n\n/**\n * Removes verb suffixes.\n *\n * @param {string} word The word from which verb suffixes have to be removed.\n * @param {Object} morphologyData The Italian morphology data file.\n * @param {string} rvText The content of the RV.\n *\n * @returns {string} The word without verb suffixes.\n */\nconst removeVerbSuffixes = function(word, morphologyData, rvText) {\n const foundSuffix = endsinArr(rvText, morphologyData.externalStemmer.verbSuffixes);\n\n if (foundSuffix) {\n word = word.slice(0, -foundSuffix.length);\n }\n\n return word;\n};\n\n/**\n * Normalizes digraphs ch/gh to c/g.\n *\n * @param {string} word The word to normalize.\n * @param {Object} morphologyData The Italian morphology data file.\n * @param {string} rvText The content of the RV.\n *\n * @returns {string} The normalized word.\n */\nconst normalizeDigraphs = function(word, morphologyData, rvText) {\n const digraphCh = morphologyData.externalStemmer.digraphNormalization.digraphCh;\n const digraphGh = morphologyData.externalStemmer.digraphNormalization.digraphGh;\n\n if (rvText.endsWith(digraphCh[0])) {\n word = word.slice(0, -digraphGh[0].length) + digraphCh[1];\n } else if (rvText.endsWith(digraphGh[0])) {\n word = word.slice(0, -digraphGh[0].length) + digraphGh[1];\n }\n\n return word;\n};\n\n/**\n * Returns a canonical stem for words with multiple stems.\n *\n * @param {string} word The word to canonicalize.\n * @param {Object} stemsThatBelongToOneWord An object of arrays of stems belonging to one word.\n *\n * @returns {string} A canonicalized stem or the original word.\n */\nconst canonicalizeStem = function(word, stemsThatBelongToOneWord) {\n // Check the verbs list. The infinitive stem is always the canonical stem for verbs.\n for (const paradigm of stemsThatBelongToOneWord.verbsWithMultipleStems) {\n if (paradigm.includes(word)) {\n return paradigm[0];\n }\n }\n // Check the diminutives list.\n for (const paradigm of stemsThatBelongToOneWord.irregularDiminutives) {\n if (paradigm.includes(word)) {\n return paradigm[0];\n }\n }\n};\n\n/**\n * Checks whether a word is in the full-form exception list and if so returns the canonical stem.\n *\n * @param {string} word\t The word to be checked.\n * @param {Object} exceptions The list of full-form exceptions to be checked in.\n *\n * @returns {null|string} The canonical stem or null if nothing was found.\n */\nconst checkWordInFullFormExceptions = function(word, exceptions) {\n for (const paradigm of exceptions) {\n if (paradigm[1].includes(word)) {\n return paradigm[0];\n }\n }\n return null;\n};\n\n/**\n * Stems Italian words.\n *\n * @param {string} word The word to stem.\n * @param {Object} morphologyData The Italian morphology data file.\n *\n * @returns {string} The stemmed word.\n */\nexport default function stem(word, morphologyData) {\n // Check the exception list for irregular plural nouns and adjectives.\n const irregularPluralNounsAndAdjectives = checkWordInFullFormExceptions(\n word,\n morphologyData.irregularPluralNounsAndAdjectives\n );\n if (irregularPluralNounsAndAdjectives) {\n return irregularPluralNounsAndAdjectives;\n }\n\n // Check the exception list for irregular verbs listed in full forms.\n const irregularVerbs = checkWordInFullFormExceptions(word, morphologyData.irregularVerbs);\n if (irregularVerbs) {\n return irregularVerbs;\n }\n\n // Start word pre-processing.\n word = preProcess(word, morphologyData);\n\n // Don't stem words that consist of less than 3 letters.\n if (word.length < 3) {\n return word;\n }\n\n // Determines r1 ,r2, rv.\n const {r1, r2, rv} = determineRs(word, morphologyData);\n\n // Determiners the content of r1, r2, and rv.\n let r1Text = word.substring(r1);\n let r2Text = word.substring(r2);\n let rvText = word.substring(rv);\n\n const originalWord = word;\n\n // Step 0: Attached pronoun removal.\n word = removePronounSuffixes(word, morphologyData, rvText);\n\n if (word !== originalWord) {\n r1Text = word.substring(r1);\n r2Text = word.substring(r2);\n rvText = word.substring(rv);\n }\n\n const wordAfter0 = word;\n\n // Step 1: Standard suffix removal.\n word = removeStandardSuffixes(word, morphologyData, r2Text, r1Text, rvText);\n\n if (word !== wordAfter0) {\n rvText = word.substring(rv);\n }\n\n const wordAfter1 = word;\n\n // Step 2: Verb suffix removal.\n if (wordAfter0 === wordAfter1) {\n word = removeVerbSuffixes(word, morphologyData, rvText);\n }\n\n rvText = word.substring(rv);\n\n // Always do step 3.\n let foundSuffix = '';\n\n // Remove general suffixes.\n if ((foundSuffix = endsinArr(rvText, morphologyData.externalStemmer.generalSuffixes)) !== '') {\n word = word.slice(0, -foundSuffix.length);\n }\n\n rvText = word.substring(rv);\n\n // Normalize digraphs ch/gh.\n word = normalizeDigraphs(word, morphologyData, rvText);\n\n // Lowercase the word before canonicalizing stem\n word = word.toLowerCase();\n\n // Returns a canonical stem for words with multiple stems (e.g., verbs: chiudere–chiuso; diminutives: ovetto-uovo).\n const canonicalStem = canonicalizeStem(word, morphologyData.stemsThatBelongToOneWord);\n if (canonicalStem) {\n return canonicalStem;\n }\n return word.toLowerCase();\n}\n"],"mappings":";;;;;;AAqBA,IAAAA,MAAA,GAAAC,OAAA;AArBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA,MAAM;EAACC,yBAAyB;EAAEC;AAAqB,CAAC,GAAGC,yBAAkB;;AAE7E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASC,OAAOA,CAACC,MAAM,EAAEC,cAAc,EAAE;EACvC,OAAOA,cAAc,CAACC,eAAe,CAACC,MAAM,CAACC,QAAQ,CAACJ,MAAM,CAAC;AAC/D;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASK,eAAeA,CAACC,IAAI,EAAEL,cAAc,EAAEM,KAAK,EAAE;EACpDA,KAAK,GAAGA,KAAK,GAAG,CAAC;EACjB,MAAMC,MAAM,GAAGF,IAAI,CAACE,MAAM;EAE1B,KAAK,IAAIC,CAAC,GAAGF,KAAK,EAAEE,CAAC,GAAGD,MAAM,EAAEC,CAAC,EAAE,EAAE;IACnC,IAAIV,OAAO,CAACO,IAAI,CAACG,CAAC,CAAC,EAAER,cAAc,CAAC,EAAE;MACpC,OAAOQ,CAAC;IACV;EACF;EAEA,OAAOD,MAAM;AACf;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASE,mBAAmBA,CAACJ,IAAI,EAAEL,cAAc,EAAEM,KAAK,EAAE;EACxD,MAAMC,MAAM,GAAGF,IAAI,CAACE,MAAM;EAE1B,KAAK,IAAIC,CAAC,GAAGF,KAAK,EAAEE,CAAC,GAAGD,MAAM,EAAEC,CAAC,EAAE,EAAE;IACnC,IAAI,CAACV,OAAO,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AAE;IAC5FnE,IAAI,GAAGA,IAAI,CAACkC,KAAK,CAAC,CAAC,EAAE,CAACH,WAAW,CAAC7B,MAAM,CAAC;EAC3C;EAEA4B,MAAM,GAAG9B,IAAI,CAAC+D,SAAS,CAACnC,EAAE,CAAC;;EAE3B;EACA5B,IAAI,GAAGiD,iBAAiB,CAACjD,IAAI,EAAEL,cAAc,EAAEmC,MAAM,CAAC;;EAEtD;EACA9B,IAAI,GAAGA,IAAI,CAACuB,WAAW,CAAC,CAAC;;EAEzB;EACA,MAAM6C,aAAa,GAAGf,gBAAgB,CAACrD,IAAI,EAAEL,cAAc,CAAC2D,wBAAwB,CAAC;EACrF,IAAIc,aAAa,EAAE;IACjB,OAAOA,aAAa;EACtB;EACA,OAAOpE,IAAI,CAACuB,WAAW,CAAC,CAAC;AAC3B","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("@axyseo/index");
7
+ var _index = require("../../../index");
8
8
  var _functionWords = require("../config/functionWords.js");
9
9
  var _getParticiples = _interopRequireDefault(require("../helpers/internal/getParticiples.js"));
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","precedenceException","values","languageProcessing","Clause","ItalianClause","constructor","clauseText","auxiliaries","_participles","getParticiples","getClauseText","checkParticiples","clause","passiveParticiples","filter","participle","cannotDirectlyPrecedePassiveParticiple","cannotBeBetweenPassiveAuxiliaryAndParticiple","setPassive","length","_default","exports"],"sources":["../../../../../src/languageProcessing/languages/it/values/Clause.js"],"sourcesContent":["import {languageProcessing} from '@axyseo/index';\nimport {\n cannotDirectlyPrecedePassiveParticiple,\n cannotBeBetweenPassiveAuxiliaryAndParticiple\n} from '../config/functionWords.js';\nimport getParticiples from '../helpers/internal/getParticiples.js';\nconst {directPrecedenceException, precedenceException, values} = languageProcessing;\nconst {Clause} = values;\n\n/**\n * Creates a Clause object for the Italian language.\n */\nclass ItalianClause 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 sentence part not being passive.\n * If no exceptions are found, the sentence part is passive.\n *\n * @returns {boolean} Returns true if no exception is found.\n */\n checkParticiples() {\n const clause = this.getClauseText();\n\n const passiveParticiples = this.getParticiples().filter(\n participle =>\n !directPrecedenceException(clause, participle, cannotDirectlyPrecedePassiveParticiple) &&\n !precedenceException(clause, participle, cannotBeBetweenPassiveAuxiliaryAndParticiple)\n );\n\n this.setPassive(passiveParticiples.length > 0);\n }\n}\n\nexport default ItalianClause;\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,cAAA,GAAAD,OAAA;AAIA,IAAAE,eAAA,GAAAC,sBAAA,CAAAH,OAAA;AAAmE,SAAAG,uBAAAC,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AACnE,MAAM;EAACG,yBAAyB;EAAEC,mBAAmB;EAAEC;AAAM,CAAC,GAAGC,yBAAkB;AACnF,MAAM;EAACC;AAAM,CAAC,GAAGF,MAAM;;AAEvB;AACA;AACA;AACA,MAAMG,aAAa,SAASD,MAAM,CAAC;EACjC;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,kBAAkB,GAAG,IAAI,CAACJ,cAAc,CAAC,CAAC,CAACK,MAAM,CACrDC,UAAU,IACR,CAAChB,yBAAyB,CAACa,MAAM,EAAEG,UAAU,EAAEC,qDAAsC,CAAC,IACtF,CAAChB,mBAAmB,CAACY,MAAM,EAAEG,UAAU,EAAEE,2DAA4C,CACzF,CAAC;IAED,IAAI,CAACC,UAAU,CAACL,kBAAkB,CAACM,MAAM,GAAG,CAAC,CAAC;EAChD;AACF;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAAvB,OAAA,GAEcM,aAAa","ignoreList":[]}
1
+ {"version":3,"file":"Clause.js","names":["_index","require","_functionWords","_getParticiples","_interopRequireDefault","e","__esModule","default","directPrecedenceException","precedenceException","values","languageProcessing","Clause","ItalianClause","constructor","clauseText","auxiliaries","_participles","getParticiples","getClauseText","checkParticiples","clause","passiveParticiples","filter","participle","cannotDirectlyPrecedePassiveParticiple","cannotBeBetweenPassiveAuxiliaryAndParticiple","setPassive","length","_default","exports"],"sources":["../../../../../src/languageProcessing/languages/it/values/Clause.js"],"sourcesContent":["import {languageProcessing} from '../../../index';\nimport {\n cannotDirectlyPrecedePassiveParticiple,\n cannotBeBetweenPassiveAuxiliaryAndParticiple\n} from '../config/functionWords.js';\nimport getParticiples from '../helpers/internal/getParticiples.js';\nconst {directPrecedenceException, precedenceException, values} = languageProcessing;\nconst {Clause} = values;\n\n/**\n * Creates a Clause object for the Italian language.\n */\nclass ItalianClause 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 sentence part not being passive.\n * If no exceptions are found, the sentence part is passive.\n *\n * @returns {boolean} Returns true if no exception is found.\n */\n checkParticiples() {\n const clause = this.getClauseText();\n\n const passiveParticiples = this.getParticiples().filter(\n participle =>\n !directPrecedenceException(clause, participle, cannotDirectlyPrecedePassiveParticiple) &&\n !precedenceException(clause, participle, cannotBeBetweenPassiveAuxiliaryAndParticiple)\n );\n\n this.setPassive(passiveParticiples.length > 0);\n }\n}\n\nexport default ItalianClause;\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,cAAA,GAAAD,OAAA;AAIA,IAAAE,eAAA,GAAAC,sBAAA,CAAAH,OAAA;AAAmE,SAAAG,uBAAAC,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AACnE,MAAM;EAACG,yBAAyB;EAAEC,mBAAmB;EAAEC;AAAM,CAAC,GAAGC,yBAAkB;AACnF,MAAM;EAACC;AAAM,CAAC,GAAGF,MAAM;;AAEvB;AACA;AACA;AACA,MAAMG,aAAa,SAASD,MAAM,CAAC;EACjC;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,kBAAkB,GAAG,IAAI,CAACJ,cAAc,CAAC,CAAC,CAACK,MAAM,CACrDC,UAAU,IACR,CAAChB,yBAAyB,CAACa,MAAM,EAAEG,UAAU,EAAEC,qDAAsC,CAAC,IACtF,CAAChB,mBAAmB,CAACY,MAAM,EAAEG,UAAU,EAAEE,2DAA4C,CACzF,CAAC;IAED,IAAI,CAACC,UAAU,CAACL,kBAAkB,CAACM,MAAM,GAAG,CAAC,CAAC;EAChD;AACF;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAAvB,OAAA,GAEcM,aAAa","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("@axyseo/index");
7
+ var _index = require("../../../index");
8
8
  var _matchTextWithWord = _interopRequireDefault(require("./helpers/matchTextWithWord"));
9
9
  var _getWords = _interopRequireDefault(require("./helpers/getWords"));
10
10
  var _customGetStemmer = _interopRequireDefault(require("./helpers/customGetStemmer"));
@@ -1 +1 @@
1
- {"version":3,"file":"Researcher.js","names":["_index","require","_matchTextWithWord","_interopRequireDefault","_getWords","_customGetStemmer","_wordsCharacterCount","_countCharacters","_matchTransitionWords","_getContentWords","_memoizedSentenceTokenizer","_splitIntoTokensCustom","_firstWordExceptions","_functionWords","_transitionWords","_topicLength","_textLength","_paragraphLength","_assessmentApplicabilityCharacterCount","_sentenceLength","_subheadingsTooLong","_keyphraseLength","_metaDescriptionLength","_getWordForms","_getKeyphraseLength","_textLength2","_findKeyphraseInSEOTitle","e","__esModule","default","AbstractResearcher","languageProcessing","Researcher","constructor","paper","defaultResearches","getFleschReadingScore","getPassiveVoiceResult","keywordCountInSlug","Object","assign","config","language","firstWordExceptions","functionWords","transitionWords","topicLength","textLength","paragraphLength","assessmentApplicability","sentenceLength","keyphraseLength","subheadingsTooLong","countCharacters","metaDescriptionLength","helpers","matchWordCustomHelper","getWordsCustomHelper","getContentWords","customGetStemmer","wordsCharacterCount","customCountLength","matchTransitionWordsHelper","memoizedTokenizer","splitIntoTokensCustom","morphology","getKeyphraseLength","wordCountInText","textLengthResearch","findKeyphraseInSEOTitle","exports"],"sources":["../../../../src/languageProcessing/languages/ja/Researcher.js"],"sourcesContent":["import {languageProcessing} from '@axyseo/index';\nconst {AbstractResearcher} = languageProcessing;\n\n// All helpers\nimport matchWordCustomHelper from './helpers/matchTextWithWord';\nimport getWordsCustomHelper from './helpers/getWords';\nimport customGetStemmer from './helpers/customGetStemmer';\nimport wordsCharacterCount from './helpers/wordsCharacterCount';\nimport customCountLength from './helpers/countCharacters';\nimport matchTransitionWordsHelper from './helpers/matchTransitionWords';\nimport getContentWords from './helpers/getContentWords';\nimport memoizedTokenizer from './helpers/memoizedSentenceTokenizer';\nimport splitIntoTokensCustom from './helpers/splitIntoTokensCustom';\n\n// All config\nimport firstWordExceptions from './config/firstWordExceptions';\nimport functionWords from './config/functionWords';\nimport transitionWords from './config/transitionWords';\nimport topicLength from './config/topicLength';\nimport textLength from './config/textLength';\nimport paragraphLength from './config/paragraphLength';\nimport assessmentApplicability from './config/assessmentApplicabilityCharacterCount';\nimport sentenceLength from './config/sentenceLength';\nimport subheadingsTooLong from './config/subheadingsTooLong';\nimport keyphraseLength from './config/keyphraseLength';\nimport metaDescriptionLength from './config/metaDescriptionLength';\n\n// All custom researches\nimport morphology from './customResearches/getWordForms';\nimport getKeyphraseLength from './customResearches/getKeyphraseLength';\nimport textLengthResearch from './customResearches/textLength';\nimport findKeyphraseInSEOTitle from './customResearches/findKeyphraseInSEOTitle';\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 not available for languages that we haven't supported yet.\n delete this.defaultResearches.getFleschReadingScore;\n delete this.defaultResearches.getPassiveVoiceResult;\n delete this.defaultResearches.keywordCountInSlug;\n\n Object.assign(this.config, {\n language: 'ja',\n firstWordExceptions,\n functionWords,\n transitionWords,\n topicLength,\n textLength,\n paragraphLength,\n assessmentApplicability,\n sentenceLength,\n keyphraseLength,\n subheadingsTooLong,\n countCharacters: true,\n metaDescriptionLength\n });\n\n Object.assign(this.helpers, {\n matchWordCustomHelper,\n getWordsCustomHelper,\n getContentWords,\n customGetStemmer,\n wordsCharacterCount,\n customCountLength,\n matchTransitionWordsHelper,\n memoizedTokenizer,\n splitIntoTokensCustom\n });\n\n Object.assign(this.defaultResearches, {\n morphology,\n keyphraseLength: getKeyphraseLength,\n wordCountInText: textLengthResearch,\n findKeyphraseInSEOTitle\n });\n }\n}\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAIA,IAAAC,kBAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,SAAA,GAAAD,sBAAA,CAAAF,OAAA;AACA,IAAAI,iBAAA,GAAAF,sBAAA,CAAAF,OAAA;AACA,IAAAK,oBAAA,GAAAH,sBAAA,CAAAF,OAAA;AACA,IAAAM,gBAAA,GAAAJ,sBAAA,CAAAF,OAAA;AACA,IAAAO,qBAAA,GAAAL,sBAAA,CAAAF,OAAA;AACA,IAAAQ,gBAAA,GAAAN,sBAAA,CAAAF,OAAA;AACA,IAAAS,0BAAA,GAAAP,sBAAA,CAAAF,OAAA;AACA,IAAAU,sBAAA,GAAAR,sBAAA,CAAAF,OAAA;AAGA,IAAAW,oBAAA,GAAAT,sBAAA,CAAAF,OAAA;AACA,IAAAY,cAAA,GAAAV,sBAAA,CAAAF,OAAA;AACA,IAAAa,gBAAA,GAAAX,sBAAA,CAAAF,OAAA;AACA,IAAAc,YAAA,GAAAZ,sBAAA,CAAAF,OAAA;AACA,IAAAe,WAAA,GAAAb,sBAAA,CAAAF,OAAA;AACA,IAAAgB,gBAAA,GAAAd,sBAAA,CAAAF,OAAA;AACA,IAAAiB,sCAAA,GAAAf,sBAAA,CAAAF,OAAA;AACA,IAAAkB,eAAA,GAAAhB,sBAAA,CAAAF,OAAA;AACA,IAAAmB,mBAAA,GAAAjB,sBAAA,CAAAF,OAAA;AACA,IAAAoB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AAE;MAC1BC,qBAAqB,EAArBA,0BAAqB;MACrBC,oBAAoB,EAApBA,iBAAoB;MACpBC,eAAe,EAAfA,wBAAe;MACfC,gBAAgB,EAAhBA,yBAAgB;MAChBC,mBAAmB,EAAnBA,4BAAmB;MACnBC,iBAAiB,EAAjBA,wBAAiB;MACjBC,0BAA0B,EAA1BA,6BAA0B;MAC1BC,iBAAiB,EAAjBA,kCAAiB;MACjBC,qBAAqB,EAArBA;IACF,CAAC,CAAC;IAEFzB,MAAM,CAACC,MAAM,CAAC,IAAI,CAACL,iBAAiB,EAAE;MACpC8B,UAAU,EAAVA,qBAAU;MACVd,eAAe,EAAEe,2BAAkB;MACnCC,eAAe,EAAEC,oBAAkB;MACnCC,uBAAuB,EAAvBA;IACF,CAAC,CAAC;EACJ;AACF;AAACC,OAAA,CAAAzC,OAAA,GAAAG,UAAA","ignoreList":[]}
1
+ {"version":3,"file":"Researcher.js","names":["_index","require","_matchTextWithWord","_interopRequireDefault","_getWords","_customGetStemmer","_wordsCharacterCount","_countCharacters","_matchTransitionWords","_getContentWords","_memoizedSentenceTokenizer","_splitIntoTokensCustom","_firstWordExceptions","_functionWords","_transitionWords","_topicLength","_textLength","_paragraphLength","_assessmentApplicabilityCharacterCount","_sentenceLength","_subheadingsTooLong","_keyphraseLength","_metaDescriptionLength","_getWordForms","_getKeyphraseLength","_textLength2","_findKeyphraseInSEOTitle","e","__esModule","default","AbstractResearcher","languageProcessing","Researcher","constructor","paper","defaultResearches","getFleschReadingScore","getPassiveVoiceResult","keywordCountInSlug","Object","assign","config","language","firstWordExceptions","functionWords","transitionWords","topicLength","textLength","paragraphLength","assessmentApplicability","sentenceLength","keyphraseLength","subheadingsTooLong","countCharacters","metaDescriptionLength","helpers","matchWordCustomHelper","getWordsCustomHelper","getContentWords","customGetStemmer","wordsCharacterCount","customCountLength","matchTransitionWordsHelper","memoizedTokenizer","splitIntoTokensCustom","morphology","getKeyphraseLength","wordCountInText","textLengthResearch","findKeyphraseInSEOTitle","exports"],"sources":["../../../../src/languageProcessing/languages/ja/Researcher.js"],"sourcesContent":["import {languageProcessing} from '../../../index';\nconst {AbstractResearcher} = languageProcessing;\n\n// All helpers\nimport matchWordCustomHelper from './helpers/matchTextWithWord';\nimport getWordsCustomHelper from './helpers/getWords';\nimport customGetStemmer from './helpers/customGetStemmer';\nimport wordsCharacterCount from './helpers/wordsCharacterCount';\nimport customCountLength from './helpers/countCharacters';\nimport matchTransitionWordsHelper from './helpers/matchTransitionWords';\nimport getContentWords from './helpers/getContentWords';\nimport memoizedTokenizer from './helpers/memoizedSentenceTokenizer';\nimport splitIntoTokensCustom from './helpers/splitIntoTokensCustom';\n\n// All config\nimport firstWordExceptions from './config/firstWordExceptions';\nimport functionWords from './config/functionWords';\nimport transitionWords from './config/transitionWords';\nimport topicLength from './config/topicLength';\nimport textLength from './config/textLength';\nimport paragraphLength from './config/paragraphLength';\nimport assessmentApplicability from './config/assessmentApplicabilityCharacterCount';\nimport sentenceLength from './config/sentenceLength';\nimport subheadingsTooLong from './config/subheadingsTooLong';\nimport keyphraseLength from './config/keyphraseLength';\nimport metaDescriptionLength from './config/metaDescriptionLength';\n\n// All custom researches\nimport morphology from './customResearches/getWordForms';\nimport getKeyphraseLength from './customResearches/getKeyphraseLength';\nimport textLengthResearch from './customResearches/textLength';\nimport findKeyphraseInSEOTitle from './customResearches/findKeyphraseInSEOTitle';\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 not available for languages that we haven't supported yet.\n delete this.defaultResearches.getFleschReadingScore;\n delete this.defaultResearches.getPassiveVoiceResult;\n delete this.defaultResearches.keywordCountInSlug;\n\n Object.assign(this.config, {\n language: 'ja',\n firstWordExceptions,\n functionWords,\n transitionWords,\n topicLength,\n textLength,\n paragraphLength,\n assessmentApplicability,\n sentenceLength,\n keyphraseLength,\n subheadingsTooLong,\n countCharacters: true,\n metaDescriptionLength\n });\n\n Object.assign(this.helpers, {\n matchWordCustomHelper,\n getWordsCustomHelper,\n getContentWords,\n customGetStemmer,\n wordsCharacterCount,\n customCountLength,\n matchTransitionWordsHelper,\n memoizedTokenizer,\n splitIntoTokensCustom\n });\n\n Object.assign(this.defaultResearches, {\n morphology,\n keyphraseLength: getKeyphraseLength,\n wordCountInText: textLengthResearch,\n findKeyphraseInSEOTitle\n });\n }\n}\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAIA,IAAAC,kBAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,SAAA,GAAAD,sBAAA,CAAAF,OAAA;AACA,IAAAI,iBAAA,GAAAF,sBAAA,CAAAF,OAAA;AACA,IAAAK,oBAAA,GAAAH,sBAAA,CAAAF,OAAA;AACA,IAAAM,gBAAA,GAAAJ,sBAAA,CAAAF,OAAA;AACA,IAAAO,qBAAA,GAAAL,sBAAA,CAAAF,OAAA;AACA,IAAAQ,gBAAA,GAAAN,sBAAA,CAAAF,OAAA;AACA,IAAAS,0BAAA,GAAAP,sBAAA,CAAAF,OAAA;AACA,IAAAU,sBAAA,GAAAR,sBAAA,CAAAF,OAAA;AAGA,IAAAW,oBAAA,GAAAT,sBAAA,CAAAF,OAAA;AACA,IAAAY,cAAA,GAAAV,sBAAA,CAAAF,OAAA;AACA,IAAAa,gBAAA,GAAAX,sBAAA,CAAAF,OAAA;AACA,IAAAc,YAAA,GAAAZ,sBAAA,CAAAF,OAAA;AACA,IAAAe,WAAA,GAAAb,sBAAA,CAAAF,OAAA;AACA,IAAAgB,gBAAA,GAAAd,sBAAA,CAAAF,OAAA;AACA,IAAAiB,sCAAA,GAAAf,sBAAA,CAAAF,OAAA;AACA,IAAAkB,eAAA,GAAAhB,sBAAA,CAAAF,OAAA;AACA,IAAAmB,mBAAA,GAAAjB,sBAAA,CAAAF,OAAA;AACA,IAAAoB,gBAAA,G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BC,qBAAqB,EAArBA,0BAAqB;MACrBC,oBAAoB,EAApBA,iBAAoB;MACpBC,eAAe,EAAfA,wBAAe;MACfC,gBAAgB,EAAhBA,yBAAgB;MAChBC,mBAAmB,EAAnBA,4BAAmB;MACnBC,iBAAiB,EAAjBA,wBAAiB;MACjBC,0BAA0B,EAA1BA,6BAA0B;MAC1BC,iBAAiB,EAAjBA,kCAAiB;MACjBC,qBAAqB,EAArBA;IACF,CAAC,CAAC;IAEFzB,MAAM,CAACC,MAAM,CAAC,IAAI,CAACL,iBAAiB,EAAE;MACpC8B,UAAU,EAAVA,qBAAU;MACVd,eAAe,EAAEe,2BAAkB;MACnCC,eAAe,EAAEC,oBAAkB;MACnCC,uBAAuB,EAAvBA;IACF,CAAC,CAAC;EACJ;AACF;AAACC,OAAA,CAAAzC,OAAA,GAAAG,UAAA","ignoreList":[]}
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = _default;
7
- var _index = require("@axyseo/index");
7
+ var _index = require("../../../index");
8
8
  var _removeURLs = _interopRequireDefault(require("../../../helpers/sanitize/removeURLs.js"));
9
9
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
10
10
  const {
@@ -1 +1 @@
1
- {"version":3,"file":"countCharacters.js","names":["_index","require","_removeURLs","_interopRequireDefault","e","__esModule","default","sanitizeString","languageProcessing","_default","text","removeURLs","replace","length"],"sources":["../../../../../src/languageProcessing/languages/ja/helpers/countCharacters.js"],"sourcesContent":["import {languageProcessing} from '@axyseo/index';\nconst {sanitizeString} = languageProcessing;\nimport removeURLs from '../../../helpers/sanitize/removeURLs.js';\n\n/**\n * Calculates the character count which serves as a measure of text length.\n * The character count includes letters, punctuation, and numbers. It doesn't include URLs, HTML tags, and spaces.\n *\n * @param {string} text The text to be counted.\n *\n * @returns {number} The character count of the given text.\n */\nexport default function(text) {\n text = removeURLs(text);\n text = sanitizeString(text);\n text = text.replace(/\\s/g, '');\n\n return text.length;\n}\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAEA,IAAAC,WAAA,GAAAC,sBAAA,CAAAF,OAAA;AAAiE,SAAAE,uBAAAC,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AADjE,MAAM;EAACG;AAAc,CAAC,GAAGC,yBAAkB;AAG3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACe,SAAAC,SAASC,IAAI,EAAE;EAC5BA,IAAI,GAAG,IAAAC,mBAAU,EAACD,IAAI,CAAC;EACvBA,IAAI,GAAGH,cAAc,CAACG,IAAI,CAAC;EAC3BA,IAAI,GAAGA,IAAI,CAACE,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC;EAE9B,OAAOF,IAAI,CAACG,MAAM;AACpB","ignoreList":[]}
1
+ {"version":3,"file":"countCharacters.js","names":["_index","require","_removeURLs","_interopRequireDefault","e","__esModule","default","sanitizeString","languageProcessing","_default","text","removeURLs","replace","length"],"sources":["../../../../../src/languageProcessing/languages/ja/helpers/countCharacters.js"],"sourcesContent":["import {languageProcessing} from '../../../index';\nconst {sanitizeString} = languageProcessing;\nimport removeURLs from '../../../helpers/sanitize/removeURLs.js';\n\n/**\n * Calculates the character count which serves as a measure of text length.\n * The character count includes letters, punctuation, and numbers. It doesn't include URLs, HTML tags, and spaces.\n *\n * @param {string} text The text to be counted.\n *\n * @returns {number} The character count of the given text.\n */\nexport default function(text) {\n text = removeURLs(text);\n text = sanitizeString(text);\n text = text.replace(/\\s/g, '');\n\n return text.length;\n}\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAEA,IAAAC,WAAA,GAAAC,sBAAA,CAAAF,OAAA;AAAiE,SAAAE,uBAAAC,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AADjE,MAAM;EAACG;AAAc,CAAC,GAAGC,yBAAkB;AAG3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACe,SAAAC,SAASC,IAAI,EAAE;EAC5BA,IAAI,GAAG,IAAAC,mBAAU,EAACD,IAAI,CAAC;EACvBA,IAAI,GAAGH,cAAc,CAACG,IAAI,CAAC;EAC3BA,IAAI,GAAGA,IAAI,CAACE,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC;EAE9B,OAAOF,IAAI,CAACG,MAAM;AACpB","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("@axyseo/index");
8
+ var _index = require("../../../index");
9
9
  var _determineStem = _interopRequireDefault(require("./internal/determineStem"));
10
10
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
11
11
  const {
@@ -1 +1 @@
1
- {"version":3,"file":"customGetStemmer.js","names":["_lodash","require","_index","_determineStem","_interopRequireDefault","e","__esModule","default","baseStemmer","languageProcessing","getStemmer","researcher","morphologyData","get","getData","word","determineStem"],"sources":["../../../../../src/languageProcessing/languages/ja/helpers/customGetStemmer.js"],"sourcesContent":["import {get} from 'lodash';\nimport {languageProcessing} from '@axyseo/index';\nconst {baseStemmer} = languageProcessing;\nimport determineStem from './internal/determineStem';\n\n/**\n * Returns the stemmer for a researcher. This helper is currently only used for Prominent Words functionality.\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'), 'ja', 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;AAEA,IAAAE,cAAA,GAAAC,sBAAA,CAAAH,OAAA;AAAqD,SAAAG,uBAAAC,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AADrD,MAAM;EAACG;AAAW,CAAC,GAAGC,yBAAkB;AAGxC;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,sBAAa,EAACD,IAAI,EAAEH,cAAc,CAAC;EACpD;EAEA,OAAOJ,WAAW;AACpB","ignoreList":[]}
1
+ {"version":3,"file":"customGetStemmer.js","names":["_lodash","require","_index","_determineStem","_interopRequireDefault","e","__esModule","default","baseStemmer","languageProcessing","getStemmer","researcher","morphologyData","get","getData","word","determineStem"],"sources":["../../../../../src/languageProcessing/languages/ja/helpers/customGetStemmer.js"],"sourcesContent":["import {get} from 'lodash';\nimport {languageProcessing} from '../../../index';\nconst {baseStemmer} = languageProcessing;\nimport determineStem from './internal/determineStem';\n\n/**\n * Returns the stemmer for a researcher. This helper is currently only used for Prominent Words functionality.\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'), 'ja', 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;AAEA,IAAAE,cAAA,GAAAC,sBAAA,CAAAH,OAAA;AAAqD,SAAAG,uBAAAC,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AADrD,MAAM;EAACG;AAAW,CAAC,GAAGC,yBAAkB;AAGxC;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,sBAAa,EAACD,IAAI,EAAEH,cAAc,CAAC;EACpD;EAEA,OAAOJ,WAAW;AACpB","ignoreList":[]}
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.default = _default;
7
7
  var _lodash = require("lodash");
8
- var _index = require("@axyseo/index");
8
+ var _index = require("../../../index");
9
9
  var _tinySegmenter = _interopRequireDefault(require("tiny-segmenter"));
10
10
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
11
11
  const {
@@ -1 +1 @@
1
- {"version":3,"file":"getWords.js","names":["_lodash","require","_index","_tinySegmenter","_interopRequireDefault","e","__esModule","default","sanitizeString","removePunctuation","languageProcessing","segmenter","TinySegmenter","_default","text","words","segment","map","word","filter","trim"],"sources":["../../../../../src/languageProcessing/languages/ja/helpers/getWords.js"],"sourcesContent":["import {filter, map} from 'lodash';\nimport {languageProcessing} from '@axyseo/index';\nconst {sanitizeString, removePunctuation} = languageProcessing;\nimport TinySegmenter from 'tiny-segmenter';\n\nconst segmenter = new TinySegmenter();\n\n/**\n * Returns an array with words used in the text.\n *\n * @param {string} text The text to be counted.\n *\n * @returns {Array} The array with all words.\n */\nexport default function(text) {\n // Strips HTML tags.\n text = sanitizeString(text);\n if (text === '') {\n return [];\n }\n\n let words = segmenter.segment(text);\n\n words = map(words, function(word) {\n return removePunctuation(word);\n });\n\n return filter(words, function(word) {\n return word.trim() !== '';\n });\n}\n"],"mappings":";;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AAEA,IAAAE,cAAA,GAAAC,sBAAA,CAAAH,OAAA;AAA2C,SAAAG,uBAAAC,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAD3C,MAAM;EAACG,cAAc;EAAEC;AAAiB,CAAC,GAAGC,yBAAkB;AAG9D,MAAMC,SAAS,GAAG,IAAIC,sBAAa,CAAC,CAAC;;AAErC;AACA;AACA;AACA;AACA;AACA;AACA;AACe,SAAAC,SAASC,IAAI,EAAE;EAC5B;EACAA,IAAI,GAAGN,cAAc,CAACM,IAAI,CAAC;EAC3B,IAAIA,IAAI,KAAK,EAAE,EAAE;IACf,OAAO,EAAE;EACX;EAEA,IAAIC,KAAK,GAAGJ,SAAS,CAACK,OAAO,CAACF,IAAI,CAAC;EAEnCC,KAAK,GAAG,IAAAE,WAAG,EAACF,KAAK,EAAE,UAASG,IAAI,EAAE;IAChC,OAAOT,iBAAiB,CAACS,IAAI,CAAC;EAChC,CAAC,CAAC;EAEF,OAAO,IAAAC,cAAM,EAACJ,KAAK,EAAE,UAASG,IAAI,EAAE;IAClC,OAAOA,IAAI,CAACE,IAAI,CAAC,CAAC,KAAK,EAAE;EAC3B,CAAC,CAAC;AACJ","ignoreList":[]}
1
+ {"version":3,"file":"getWords.js","names":["_lodash","require","_index","_tinySegmenter","_interopRequireDefault","e","__esModule","default","sanitizeString","removePunctuation","languageProcessing","segmenter","TinySegmenter","_default","text","words","segment","map","word","filter","trim"],"sources":["../../../../../src/languageProcessing/languages/ja/helpers/getWords.js"],"sourcesContent":["import {filter, map} from 'lodash';\nimport {languageProcessing} from '../../../index';\nconst {sanitizeString, removePunctuation} = languageProcessing;\nimport TinySegmenter from 'tiny-segmenter';\n\nconst segmenter = new TinySegmenter();\n\n/**\n * Returns an array with words used in the text.\n *\n * @param {string} text The text to be counted.\n *\n * @returns {Array} The array with all words.\n */\nexport default function(text) {\n // Strips HTML tags.\n text = sanitizeString(text);\n if (text === '') {\n return [];\n }\n\n let words = segmenter.segment(text);\n\n words = map(words, function(word) {\n return removePunctuation(word);\n });\n\n return filter(words, function(word) {\n return word.trim() !== '';\n });\n}\n"],"mappings":";;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AAEA,IAAAE,cAAA,GAAAC,sBAAA,CAAAH,OAAA;AAA2C,SAAAG,uBAAAC,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAD3C,MAAM;EAACG,cAAc;EAAEC;AAAiB,CAAC,GAAGC,yBAAkB;AAG9D,MAAMC,SAAS,GAAG,IAAIC,sBAAa,CAAC,CAAC;;AAErC;AACA;AACA;AACA;AACA;AACA;AACA;AACe,SAAAC,SAASC,IAAI,EAAE;EAC5B;EACAA,IAAI,GAAGN,cAAc,CAACM,IAAI,CAAC;EAC3B,IAAIA,IAAI,KAAK,EAAE,EAAE;IACf,OAAO,EAAE;EACX;EAEA,IAAIC,KAAK,GAAGJ,SAAS,CAACK,OAAO,CAACF,IAAI,CAAC;EAEnCC,KAAK,GAAG,IAAAE,WAAG,EAACF,KAAK,EAAE,UAASG,IAAI,EAAE;IAChC,OAAOT,iBAAiB,CAACS,IAAI,CAAC;EAChC,CAAC,CAAC;EAEF,OAAO,IAAAC,cAAM,EAACJ,KAAK,EAAE,UAASG,IAAI,EAAE;IAClC,OAAOA,IAAI,CAACE,IAAI,CAAC,CAAC,KAAK,EAAE;EAC3B,CAAC,CAAC;AACJ","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("@axyseo/index");
7
+ var _index = require("../../../index");
8
8
  var _firstWordExceptions = _interopRequireDefault(require("./config/firstWordExceptions"));
9
9
  var _functionWords = _interopRequireDefault(require("./config/functionWords"));
10
10
  var _stopWords = _interopRequireDefault(require("./config/stopWords"));
@@ -1 +1 @@
1
- {"version":3,"file":"Researcher.js","names":["_index","require","_firstWordExceptions","_interopRequireDefault","_functionWords","_stopWords","_transitionWords","_twoPartTransitionWords","_getStemmer","_getClauses","e","__esModule","default","AbstractResearcher","languageProcessing","Researcher","constructor","paper","defaultResearches","getFleschReadingScore","Object","assign","config","language","passiveConstructionType","functionWords","firstWordExceptions","transitionWords","twoPartTransitionWords","stopWords","helpers","getStemmer","getClauses","exports"],"sources":["../../../../src/languageProcessing/languages/nb/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 stopWords from './config/stopWords';\nimport transitionWords from './config/transitionWords';\nimport twoPartTransitionWords from './config/twoPartTransitionWords';\n\n// All helpers\nimport getStemmer from './helpers/getStemmer';\nimport getClauses from './helpers/getClauses';\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 Flesch Reading Ease research since Norwegian doesn't have the support for it\n delete this.defaultResearches.getFleschReadingScore;\n\n Object.assign(this.config, {\n language: 'nb',\n passiveConstructionType: 'periphrastic',\n functionWords,\n firstWordExceptions,\n transitionWords,\n twoPartTransitionWords,\n stopWords\n });\n\n Object.assign(this.helpers, {\n getStemmer,\n getClauses\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,UAAA,GAAAF,sBAAA,CAAAF,OAAA;AACA,IAAAK,gBAAA,GAAAH,sBAAA,CAAAF,OAAA;AACA,IAAAM,uBAAA,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,OAAO,IAAI,CAACC,iBAAiB,CAACC,qBAAqB;IAEnDC,MAAM,CAACC,MAAM,CAAC,IAAI,CAACC,MAAM,EAAE;MACzBC,QAAQ,EAAE,IAAI;MACdC,uBAAuB,EAAE,cAAc;MACvCC,aAAa,EAAbA,sBAAa;MACbC,mBAAmB,EAAnBA,4BAAmB;MACnBC,eAAe,EAAfA,wBAAe;MACfC,sBAAsB,EAAtBA,+BAAsB;MACtBC,SAAS,EAATA;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","_firstWordExceptions","_interopRequireDefault","_functionWords","_stopWords","_transitionWords","_twoPartTransitionWords","_getStemmer","_getClauses","e","__esModule","default","AbstractResearcher","languageProcessing","Researcher","constructor","paper","defaultResearches","getFleschReadingScore","Object","assign","config","language","passiveConstructionType","functionWords","firstWordExceptions","transitionWords","twoPartTransitionWords","stopWords","helpers","getStemmer","getClauses","exports"],"sources":["../../../../src/languageProcessing/languages/nb/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 stopWords from './config/stopWords';\nimport transitionWords from './config/transitionWords';\nimport twoPartTransitionWords from './config/twoPartTransitionWords';\n\n// All helpers\nimport getStemmer from './helpers/getStemmer';\nimport getClauses from './helpers/getClauses';\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 Flesch Reading Ease research since Norwegian doesn't have the support for it\n delete this.defaultResearches.getFleschReadingScore;\n\n Object.assign(this.config, {\n language: 'nb',\n passiveConstructionType: 'periphrastic',\n functionWords,\n firstWordExceptions,\n transitionWords,\n twoPartTransitionWords,\n stopWords\n });\n\n Object.assign(this.helpers, {\n getStemmer,\n getClauses\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,UAAA,GAAAF,sBAAA,CAAAF,OAAA;AACA,IAAAK,gBAAA,GAAAH,sBAAA,CAAAF,OAAA;AACA,IAAAM,uBAAA,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,OAAO,IAAI,CAACC,iBAAiB,CAACC,qBAAqB;IAEnDC,MAAM,CAACC,MAAM,CAAC,IAAI,CAACC,MAAM,EAAE;MACzBC,QAAQ,EAAE,IAAI;MACdC,uBAAuB,EAAE,cAAc;MACvCC,aAAa,EAAbA,sBAAa;MACbC,mBAAmB,EAAnBA,4BAAmB;MACnBC,eAAe,EAAfA,wBAAe;MACfC,sBAAsB,EAAtBA,+BAAsB;MACtBC,SAAS,EAATA;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 = getNorwegianClauses;
7
- var _index = require("@axyseo/index");
7
+ var _index = require("../../../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","options","Clause","NorwegianClause","stopwords","auxiliaries","regexes","auxiliaryRegex","stopwordRegex","stopCharacterRegex","getNorwegianClauses","sentence"],"sources":["../../../../../src/languageProcessing/languages/nb/helpers/getClauses.js"],"sourcesContent":["import {languageProcessing} from '@axyseo/index';\nconst {createRegexFromArray, getClauses} = languageProcessing;\n\nimport NorwegianClause from '../values/Clause';\nimport auxiliaries from '../config/internal/passiveVoiceAuxiliaries.js';\nimport stopwords from '../config/stopWords.js';\n\nconst options = {\n Clause: NorwegianClause,\n stopwords,\n auxiliaries,\n regexes: {\n auxiliaryRegex: createRegexFromArray(auxiliaries),\n stopwordRegex: createRegexFromArray(stopwords),\n stopCharacterRegex: /([:,])(?=[ \\n\\r\\t'\"+\\-»«‹›<>])/gi\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 in clauses.\n *\n * @returns {Array} The array with all clauses that have an auxiliary.\n */\nexport default function getNorwegianClauses(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;AAM7D,MAAMC,OAAO,GAAG;EACdC,MAAM,EAAEC,eAAe;EACvBC,SAAS,EAATA,kBAAS;EACTC,WAAW,EAAXA,gCAAW;EACXC,OAAO,EAAE;IACPC,cAAc,EAAET,oBAAoB,CAACO,gCAAW,CAAC;IACjDG,aAAa,EAAEV,oBAAoB,CAACM,kBAAS,CAAC;IAC9CK,kBAAkB,EAAE;EACtB;AACF,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACe,SAASC,mBAAmBA,CAACC,QAAQ,EAAE;EACpD,OAAOZ,UAAU,CAACY,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","options","Clause","NorwegianClause","stopwords","auxiliaries","regexes","auxiliaryRegex","stopwordRegex","stopCharacterRegex","getNorwegianClauses","sentence"],"sources":["../../../../../src/languageProcessing/languages/nb/helpers/getClauses.js"],"sourcesContent":["import {languageProcessing} from '../../../index';\nconst {createRegexFromArray, getClauses} = languageProcessing;\n\nimport NorwegianClause from '../values/Clause';\nimport auxiliaries from '../config/internal/passiveVoiceAuxiliaries.js';\nimport stopwords from '../config/stopWords.js';\n\nconst options = {\n Clause: NorwegianClause,\n stopwords,\n auxiliaries,\n regexes: {\n auxiliaryRegex: createRegexFromArray(auxiliaries),\n stopwordRegex: createRegexFromArray(stopwords),\n stopCharacterRegex: /([:,])(?=[ \\n\\r\\t'\"+\\-»«‹›<>])/gi\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 in clauses.\n *\n * @returns {Array} The array with all clauses that have an auxiliary.\n */\nexport default function getNorwegianClauses(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;AAM7D,MAAMC,OAAO,GAAG;EACdC,MAAM,EAAEC,eAAe;EACvBC,SAAS,EAATA,kBAAS;EACTC,WAAW,EAAXA,gCAAW;EACXC,OAAO,EAAE;IACPC,cAAc,EAAET,oBAAoB,CAACO,gCAAW,CAAC;IACjDG,aAAa,EAAEV,oBAAoB,CAACM,kBAAS,CAAC;IAC9CK,kBAAkB,EAAE;EACtB;AACF,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACe,SAASC,mBAAmBA,CAACC,QAAQ,EAAE;EACpD,OAAOZ,UAAU,CAACY,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("@axyseo/index");
8
+ var _index = require("../../../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/nb/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'), 'nb', 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/nb/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'), 'nb', 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 = _default;
7
- var _index = require("@axyseo/index");
7
+ var _index = require("../../../index");
8
8
  var _participles = _interopRequireDefault(require("../../config/internal/participles.js"));
9
9
  var _lodash = require("lodash");
10
10
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
@@ -1 +1 @@
1
- {"version":3,"file":"getParticiples.js","names":["_index","require","_participles","_interopRequireDefault","_lodash","e","__esModule","default","getWords","languageProcessing","_default","clauseText","words","foundParticiples","forEach","word","includes","participles","push"],"sources":["../../../../../../src/languageProcessing/languages/nb/helpers/internal/getParticiples.js"],"sourcesContent":["import {languageProcessing} from '@axyseo/index';\nconst {getWords} = languageProcessing;\n\nimport participles from '../../config/internal/participles.js';\nimport {forEach, includes} from 'lodash';\n\n/**\n * Creates an array of participles found in a clause.\n *\n * @param {string} clauseText The clause to finds participles in.\n *\n * @returns {Array} The array with the participles.\n */\nexport default function(clauseText) {\n const words = getWords(clauseText);\n const foundParticiples = [];\n\n forEach(words, function(word) {\n if (includes(participles, word)) {\n foundParticiples.push(word);\n }\n });\n return foundParticiples;\n}\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAGA,IAAAC,YAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AAAyC,SAAAE,uBAAAE,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAHzC,MAAM;EAACG;AAAQ,CAAC,GAAGC,yBAAkB;AAKrC;AACA;AACA;AACA;AACA;AACA;AACA;AACe,SAAAC,SAASC,UAAU,EAAE;EAClC,MAAMC,KAAK,GAAGJ,QAAQ,CAACG,UAAU,CAAC;EAClC,MAAME,gBAAgB,GAAG,EAAE;EAE3B,IAAAC,eAAO,EAACF,KAAK,EAAE,UAASG,IAAI,EAAE;IAC5B,IAAI,IAAAC,gBAAQ,EAACC,oBAAW,EAAEF,IAAI,CAAC,EAAE;MAC/BF,gBAAgB,CAACK,IAAI,CAACH,IAAI,CAAC;IAC7B;EACF,CAAC,CAAC;EACF,OAAOF,gBAAgB;AACzB","ignoreList":[]}
1
+ {"version":3,"file":"getParticiples.js","names":["_index","require","_participles","_interopRequireDefault","_lodash","e","__esModule","default","getWords","languageProcessing","_default","clauseText","words","foundParticiples","forEach","word","includes","participles","push"],"sources":["../../../../../../src/languageProcessing/languages/nb/helpers/internal/getParticiples.js"],"sourcesContent":["import {languageProcessing} from '../../../index';\nconst {getWords} = languageProcessing;\n\nimport participles from '../../config/internal/participles.js';\nimport {forEach, includes} from 'lodash';\n\n/**\n * Creates an array of participles found in a clause.\n *\n * @param {string} clauseText The clause to finds participles in.\n *\n * @returns {Array} The array with the participles.\n */\nexport default function(clauseText) {\n const words = getWords(clauseText);\n const foundParticiples = [];\n\n forEach(words, function(word) {\n if (includes(participles, word)) {\n foundParticiples.push(word);\n }\n });\n return foundParticiples;\n}\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAGA,IAAAC,YAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AAAyC,SAAAE,uBAAAE,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAHzC,MAAM;EAACG;AAAQ,CAAC,GAAGC,yBAAkB;AAKrC;AACA;AACA;AACA;AACA;AACA;AACA;AACe,SAAAC,SAASC,UAAU,EAAE;EAClC,MAAMC,KAAK,GAAGJ,QAAQ,CAACG,UAAU,CAAC;EAClC,MAAME,gBAAgB,GAAG,EAAE;EAE3B,IAAAC,eAAO,EAACF,KAAK,EAAE,UAASG,IAAI,EAAE;IAC5B,IAAI,IAAAC,gBAAQ,EAACC,oBAAW,EAAEF,IAAI,CAAC,EAAE;MAC/BF,gBAAgB,CAACK,IAAI,CAACH,IAAI,CAAC;IAC7B;EACF,CAAC,CAAC;EACF,OAAOF,gBAAgB;AACzB","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("@axyseo/index");
7
+ var _index = require("../../../index");
8
8
  var _getParticiples = _interopRequireDefault(require("../helpers/internal/getParticiples"));
9
9
  var _functionWords = require("../../nb/config/functionWords");
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","_functionWords","e","__esModule","default","precedenceException","values","languageProcessing","Clause","NorwegianClause","constructor","clauseText","auxiliaries","_participles","getParticiples","getClauseText","checkParticiples","clause","passiveParticiples","filter","participle","cannotBeBetweenPassiveAuxiliaryAndParticiple","setPassive","length","_default","exports"],"sources":["../../../../../src/languageProcessing/languages/nb/values/Clause.js"],"sourcesContent":["import {languageProcessing} from '@axyseo/index';\nconst {precedenceException, values} = languageProcessing;\nconst {Clause} = values;\n\nimport getParticiples from '../helpers/internal/getParticiples';\nimport {cannotBeBetweenPassiveAuxiliaryAndParticiple} from '../../nb/config/functionWords';\n\n/**\n * Creates a Clause object for the Norwegian language.\n */\nclass NorwegianClause 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 const passiveParticiples = this.getParticiples().filter(\n participle =>\n !precedenceException(clause, participle, cannotBeBetweenPassiveAuxiliaryAndParticiple)\n );\n\n this.setPassive(passiveParticiples.length > 0);\n }\n}\n\nexport default NorwegianClause;\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAIA,IAAAC,eAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,cAAA,GAAAH,OAAA;AAA2F,SAAAE,uBAAAE,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAJ3F,MAAM;EAACG,mBAAmB;EAAEC;AAAM,CAAC,GAAGC,yBAAkB;AACxD,MAAM;EAACC;AAAM,CAAC,GAAGF,MAAM;AAKvB;AACA;AACA;AACA,MAAMG,eAAe,SAASD,MAAM,CAAC;EACnC;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;IACnC,MAAMG,kBAAkB,GAAG,IAAI,CAACJ,cAAc,CAAC,CAAC,CAACK,MAAM,CACrDC,UAAU,IACR,CAACf,mBAAmB,CAACY,MAAM,EAAEG,UAAU,EAAEC,2DAA4C,CACzF,CAAC;IAED,IAAI,CAACC,UAAU,CAACJ,kBAAkB,CAACK,MAAM,GAAG,CAAC,CAAC;EAChD;AACF;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAArB,OAAA,GAEcK,eAAe","ignoreList":[]}
1
+ {"version":3,"file":"Clause.js","names":["_index","require","_getParticiples","_interopRequireDefault","_functionWords","e","__esModule","default","precedenceException","values","languageProcessing","Clause","NorwegianClause","constructor","clauseText","auxiliaries","_participles","getParticiples","getClauseText","checkParticiples","clause","passiveParticiples","filter","participle","cannotBeBetweenPassiveAuxiliaryAndParticiple","setPassive","length","_default","exports"],"sources":["../../../../../src/languageProcessing/languages/nb/values/Clause.js"],"sourcesContent":["import {languageProcessing} from '../../../index';\nconst {precedenceException, values} = languageProcessing;\nconst {Clause} = values;\n\nimport getParticiples from '../helpers/internal/getParticiples';\nimport {cannotBeBetweenPassiveAuxiliaryAndParticiple} from '../../nb/config/functionWords';\n\n/**\n * Creates a Clause object for the Norwegian language.\n */\nclass NorwegianClause 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 const passiveParticiples = this.getParticiples().filter(\n participle =>\n !precedenceException(clause, participle, cannotBeBetweenPassiveAuxiliaryAndParticiple)\n );\n\n this.setPassive(passiveParticiples.length > 0);\n }\n}\n\nexport default NorwegianClause;\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAIA,IAAAC,eAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,cAAA,GAAAH,OAAA;AAA2F,SAAAE,uBAAAE,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAJ3F,MAAM;EAACG,mBAAmB;EAAEC;AAAM,CAAC,GAAGC,yBAAkB;AACxD,MAAM;EAACC;AAAM,CAAC,GAAGF,MAAM;AAKvB;AACA;AACA;AACA,MAAMG,eAAe,SAASD,MAAM,CAAC;EACnC;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;IACnC,MAAMG,kBAAkB,GAAG,IAAI,CAACJ,cAAc,CAAC,CAAC,CAACK,MAAM,CACrDC,UAAU,IACR,CAACf,mBAAmB,CAACY,MAAM,EAAEG,UAAU,EAAEC,2DAA4C,CACzF,CAAC;IAED,IAAI,CAACC,UAAU,CAACJ,kBAAkB,CAACK,MAAM,GAAG,CAAC,CAAC;EAChD;AACF;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAArB,OAAA,GAEcK,eAAe","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("@axyseo/index");
7
+ var _index = require("../../../index");
8
8
  var _firstWordExceptions = _interopRequireDefault(require("./config/firstWordExceptions"));
9
9
  var _functionWords = require("./config/functionWords");
10
10
  var _stopWords = _interopRequireDefault(require("./config/stopWords"));
@@ -1 +1 @@
1
- {"version":3,"file":"Researcher.js","names":["_index","require","_firstWordExceptions","_interopRequireDefault","_functionWords","_stopWords","_transitionWords","_twoPartTransitionWords","_syllables","_keyphraseLength","_getClauses","_getStemmer","_calculateFleschReadingScore","e","__esModule","default","AbstractResearcher","languageProcessing","Researcher","constructor","paper","Object","assign","config","language","passiveConstructionType","firstWordExceptions","functionWords","stopWords","transitionWords","twoPartTransitionWords","syllables","keyphraseLength","helpers","getClauses","getStemmer","fleschReadingScore","exports"],"sources":["../../../../src/languageProcessing/languages/nl/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 keyphraseLength from './config/keyphraseLength';\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: 'nl',\n passiveConstructionType: 'periphrastic',\n firstWordExceptions,\n functionWords,\n stopWords,\n transitionWords,\n twoPartTransitionWords,\n syllables,\n keyphraseLength\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,gBAAA,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,eAAe,EAAfA;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","_keyphraseLength","_getClauses","_getStemmer","_calculateFleschReadingScore","e","__esModule","default","AbstractResearcher","languageProcessing","Researcher","constructor","paper","Object","assign","config","language","passiveConstructionType","firstWordExceptions","functionWords","stopWords","transitionWords","twoPartTransitionWords","syllables","keyphraseLength","helpers","getClauses","getStemmer","fleschReadingScore","exports"],"sources":["../../../../src/languageProcessing/languages/nl/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 keyphraseLength from './config/keyphraseLength';\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: 'nl',\n passiveConstructionType: 'periphrastic',\n firstWordExceptions,\n functionWords,\n stopWords,\n transitionWords,\n twoPartTransitionWords,\n syllables,\n keyphraseLength\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,gBAAA,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,eAAe,EAAfA;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 = getClauses;
7
- var _index = require("@axyseo/index");
7
+ var _index = require("../../../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","DutchClause","regexes","auxiliaryRegex","auxiliaries","stopwordRegex","stopwords","getClauses","sentence"],"sources":["../../../../../src/languageProcessing/languages/nl/helpers/getClauses.js"],"sourcesContent":["import {languageProcessing} from '@axyseo/index';\nconst {getClausesSplitOnStopWords, createRegexFromArray} = languageProcessing;\n\nimport DutchClause from '../values/Clause';\nimport auxiliaries from '../config/internal/passiveVoiceAuxiliaries.js';\nimport stopwords from '../config/stopWords.js';\n\nconst options = {\n Clause: DutchClause,\n regexes: {\n auxiliaryRegex: createRegexFromArray(auxiliaries),\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 getClauses(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,eAAW;EACnBC,OAAO,EAAE;IACPC,cAAc,EAAEN,oBAAoB,CAACO,gCAAW,CAAC;IACjDC,aAAa,EAAER,oBAAoB,CAACS,kBAAS;EAC/C;AACF,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACe,SAASC,UAAUA,CAACC,QAAQ,EAAE;EAC3C,OAAOZ,0BAA0B,CAACY,QAAQ,EAAET,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","DutchClause","regexes","auxiliaryRegex","auxiliaries","stopwordRegex","stopwords","getClauses","sentence"],"sources":["../../../../../src/languageProcessing/languages/nl/helpers/getClauses.js"],"sourcesContent":["import {languageProcessing} from '../../../index';\nconst {getClausesSplitOnStopWords, createRegexFromArray} = languageProcessing;\n\nimport DutchClause from '../values/Clause';\nimport auxiliaries from '../config/internal/passiveVoiceAuxiliaries.js';\nimport stopwords from '../config/stopWords.js';\n\nconst options = {\n Clause: DutchClause,\n regexes: {\n auxiliaryRegex: createRegexFromArray(auxiliaries),\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 getClauses(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,eAAW;EACnBC,OAAO,EAAE;IACPC,cAAc,EAAEN,oBAAoB,CAACO,gCAAW,CAAC;IACjDC,aAAa,EAAER,oBAAoB,CAACS,kBAAS;EAC/C;AACF,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACe,SAASC,UAAUA,CAACC,QAAQ,EAAE;EAC3C,OAAOZ,0BAA0B,CAACY,QAAQ,EAAET,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("@axyseo/index");
8
+ var _index = require("../../../index");
9
9
  var _determineStem = _interopRequireDefault(require("./internal/determineStem"));
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","_determineStem","_interopRequireDefault","e","__esModule","default","baseStemmer","languageProcessing","getStemmer","researcher","morphologyData","get","getData","word","determineStem"],"sources":["../../../../../src/languageProcessing/languages/nl/helpers/getStemmer.js"],"sourcesContent":["import {get} from 'lodash';\nimport {languageProcessing} from '@axyseo/index';\nconst {baseStemmer} = languageProcessing;\n\nimport determineStem from './internal/determineStem';\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'), 'nl', 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,cAAA,GAAAC,sBAAA,CAAAH,OAAA;AAAqD,SAAAG,uBAAAC,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAFrD,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,sBAAa,EAACD,IAAI,EAAEH,cAAc,CAAC;EACpD;EAEA,OAAOJ,WAAW;AACpB","ignoreList":[]}
1
+ {"version":3,"file":"getStemmer.js","names":["_lodash","require","_index","_determineStem","_interopRequireDefault","e","__esModule","default","baseStemmer","languageProcessing","getStemmer","researcher","morphologyData","get","getData","word","determineStem"],"sources":["../../../../../src/languageProcessing/languages/nl/helpers/getStemmer.js"],"sourcesContent":["import {get} from 'lodash';\nimport {languageProcessing} from '../../../index';\nconst {baseStemmer} = languageProcessing;\n\nimport determineStem from './internal/determineStem';\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'), 'nl', 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,cAAA,GAAAC,sBAAA,CAAAH,OAAA;AAAqD,SAAAG,uBAAAC,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAFrD,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,sBAAa,EAACD,IAAI,EAAEH,cAAc,CAAC;EACpD;EAEA,OAAOJ,WAAW;AACpB","ignoreList":[]}
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.default = checkExceptionsWithFullForms;
7
7
  var _lodash = require("lodash");
8
- var _index = require("@axyseo/index");
8
+ var _index = require("../../../index");
9
9
  const {
10
10
  flattenSortLength
11
11
  } = _index.languageProcessing;
@@ -1 +1 @@
1
- {"version":3,"file":"checkExceptionsWithFullForms.js","names":["_lodash","require","_index","flattenSortLength","languageProcessing","checkVerbFullFormsList","word","verbFullFormsList","compoundVerbPrefixes","prefixes","foundPrefix","find","prefix","startsWith","slice","length","i","stemAndForms","flatten","j","includes","checkEndingMatchFullFormsList","endingMatchFullFormsList","endsWith","precedingLexicalMaterial","checkExactMatchFullFormsList","exactMatchFullFormsList","checkExceptionsWithFullForms","morphologyDataNL","exceptionListWithFullForms","stemExceptions","stemmingExceptionStemsWithFullForms","stem","verbs","pastParticipleStemmer","compoundVerbsPrefixes","endingMatch","exactMatch"],"sources":["../../../../../../src/languageProcessing/languages/nl/helpers/internal/checkExceptionsWithFullForms.js"],"sourcesContent":["import {flatten} from 'lodash';\nimport {languageProcessing} from '@axyseo/index';\nconst {flattenSortLength} = languageProcessing;\n\n/**\n * Checks whether the word is on the verbs sub-list of the full forms list. Before checking the list, checks whether the word\n * begins with one of the compound verb prefixes, and the prefix is removed if one is found. If a match is found after checking\n * the full forms list, the canonical stem is returned, with the prefix attached back if there was one in the input word.\n * e.g. aanbevelen -> aanbeveel\n *\n * @param {string}\t\t\tword\t\t\t\t\t\t\tThe word to check.\n * @param {string[]}\t\tverbFullFormsList\t\t\t\tThe list of verb forms we search for match in.\n * @param {Object}\t\t\tcompoundVerbPrefixes\t\t\tThe list of separable and inseparable compound verb prefixes.\n *\n * @returns {string|null}\tThe canonical stem or null if no match found.\n */\nconst checkVerbFullFormsList = function(word, verbFullFormsList, compoundVerbPrefixes) {\n const prefixes = flattenSortLength(compoundVerbPrefixes);\n\n // Check whether the inputted word starts with one of the compound prefixes\n const foundPrefix = prefixes.find(prefix => word.startsWith(prefix));\n\n if (typeof foundPrefix === 'string') {\n word = word.slice(foundPrefix.length);\n }\n\n for (let i = 0; i < verbFullFormsList.length; i++) {\n const stemAndForms = flatten(verbFullFormsList[i]);\n for (let j = 0; j < stemAndForms.length; j++) {\n if (stemAndForms.includes(word)) {\n if (typeof foundPrefix === 'string') {\n return foundPrefix + stemAndForms[0];\n }\n return stemAndForms[0];\n }\n }\n }\n return null;\n};\n\n/**\n * Checks whether the word is on the sub-list of the full forms list for which we search for an ending match between one of\n * the forms and the word (i.e., whether the word ends with a form from the list). If a match is found, the canonical\n * stem is returned. e.g. fitnesscentra -> fitnesscentrum\n *\n * @param {string}\t\t\tword\t\t\t\t\t\t\tThe word to check.\n * @param {string[]}\t\tendingMatchFullFormsList\t\tThe list we search for an ending match in.\n * @returns {string|null}\tThe canonical stem or null if no match found.\n */\nconst checkEndingMatchFullFormsList = function(word, endingMatchFullFormsList) {\n for (let i = 0; i < endingMatchFullFormsList.length; i++) {\n const stemAndForms = flatten(endingMatchFullFormsList[i]);\n for (let j = 0; j < stemAndForms.length; j++) {\n if (word.endsWith(stemAndForms[j])) {\n /*\n * Check if the word checked is actually a compound word. e.g. familielid\n * The character/s preceding the words in the exception should be at least 2 characters in order to be a valid compound element.\n */\n const precedingLexicalMaterial = word.slice(0, -stemAndForms[j].length);\n\n if (precedingLexicalMaterial.length === 1) {\n return null;\n }\n\n if (precedingLexicalMaterial.length > 1) {\n return precedingLexicalMaterial + stemAndForms[0];\n }\n return stemAndForms[0];\n }\n }\n }\n return null;\n};\n\n/**\n * Checks whether the word is on the sub-list of the full forms list for which we search for the exact match between one of\n * the forms and the word. If a match is found, the canonical stem is returned. e.g. curricula -> curriculum\n *\n * @param {string}\t\t\tword\t\t\t\t\t\tThe word to check.\n * @param {string[]}\t\texactMatchFullFormsList\t\tThe list we search for an exact match in.\n * @returns {string|null}\tThe canonical stem or null if no match found.\n */\nconst checkExactMatchFullFormsList = function(word, exactMatchFullFormsList) {\n for (let i = 0; i < exactMatchFullFormsList.length; i++) {\n const stemAndForms = flatten(exactMatchFullFormsList[i]);\n for (let j = 0; j < stemAndForms.length; j++) {\n if (stemAndForms.includes(word)) {\n return stemAndForms[0];\n }\n }\n }\n return null;\n};\n\n/**\n *\n * Checks whether a word is on the exception list for which we have full forms. If it is, returns the indicated stem of the word.\n *\n * @param {Array} morphologyDataNL The Dutch morphology data file.\n * @param {string} word The word to check.\n *\n * @returns {string/null} The created word forms.\n */\nexport default function checkExceptionsWithFullForms(morphologyDataNL, word) {\n const exceptionListWithFullForms =\n morphologyDataNL.stemExceptions.stemmingExceptionStemsWithFullForms;\n\n let stem = checkVerbFullFormsList(\n word,\n exceptionListWithFullForms.verbs,\n morphologyDataNL.pastParticipleStemmer.compoundVerbsPrefixes\n );\n if (stem) {\n return stem;\n }\n\n stem = checkEndingMatchFullFormsList(word, exceptionListWithFullForms.endingMatch);\n if (stem) {\n return stem;\n }\n\n stem = checkExactMatchFullFormsList(word, exceptionListWithFullForms.exactMatch);\n if (stem) {\n return stem;\n }\n\n return null;\n}\n"],"mappings":";;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AACA,MAAM;EAACE;AAAiB,CAAC,GAAGC,yBAAkB;;AAE9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,sBAAsB,GAAG,SAAAA,CAASC,IAAI,EAAEC,iBAAiB,EAAEC,oBAAoB,EAAE;EACrF,MAAMC,QAAQ,GAAGN,iBAAiB,CAACK,oBAAoB,CAAC;;EAExD;EACA,MAAME,WAAW,GAAGD,QAAQ,CAACE,IAAI,CAACC,MAAM,IAAIN,IAAI,CAACO,UAAU,CAACD,MAAM,CAAC,CAAC;EAEpE,IAAI,OAAOF,WAAW,KAAK,QAAQ,EAAE;IACnCJ,IAAI,GAAGA,IAAI,CAACQ,KAAK,CAACJ,WAAW,CAACK,MAAM,CAAC;EACvC;EAEA,KAAK,IAAIC,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAGT,iBAAiB,CAACQ,MAAM,EAAEC,CAAC,EAAE,EAAE;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":3,"file":"checkExceptionsWithFullForms.js","names":["_lodash","require","_index","flattenSortLength","languageProcessing","checkVerbFullFormsList","word","verbFullFormsList","compoundVerbPrefixes","prefixes","foundPrefix","find","prefix","startsWith","slice","length","i","stemAndForms","flatten","j","includes","checkEndingMatchFullFormsList","endingMatchFullFormsList","endsWith","precedingLexicalMaterial","checkExactMatchFullFormsList","exactMatchFullFormsList","checkExceptionsWithFullForms","morphologyDataNL","exceptionListWithFullForms","stemExceptions","stemmingExceptionStemsWithFullForms","stem","verbs","pastParticipleStemmer","compoundVerbsPrefixes","endingMatch","exactMatch"],"sources":["../../../../../../src/languageProcessing/languages/nl/helpers/internal/checkExceptionsWithFullForms.js"],"sourcesContent":["import {flatten} from 'lodash';\nimport {languageProcessing} from '../../../index';\nconst {flattenSortLength} = languageProcessing;\n\n/**\n * Checks whether the word is on the verbs sub-list of the full forms list. Before checking the list, checks whether the word\n * begins with one of the compound verb prefixes, and the prefix is removed if one is found. If a match is found after checking\n * the full forms list, the canonical stem is returned, with the prefix attached back if there was one in the input word.\n * e.g. aanbevelen -> aanbeveel\n *\n * @param {string}\t\t\tword\t\t\t\t\t\t\tThe word to check.\n * @param {string[]}\t\tverbFullFormsList\t\t\t\tThe list of verb forms we search for match in.\n * @param {Object}\t\t\tcompoundVerbPrefixes\t\t\tThe list of separable and inseparable compound verb prefixes.\n *\n * @returns {string|null}\tThe canonical stem or null if no match found.\n */\nconst checkVerbFullFormsList = function(word, verbFullFormsList, compoundVerbPrefixes) {\n const prefixes = flattenSortLength(compoundVerbPrefixes);\n\n // Check whether the inputted word starts with one of the compound prefixes\n const foundPrefix = prefixes.find(prefix => word.startsWith(prefix));\n\n if (typeof foundPrefix === 'string') {\n word = word.slice(foundPrefix.length);\n }\n\n for (let i = 0; i < verbFullFormsList.length; i++) {\n const stemAndForms = flatten(verbFullFormsList[i]);\n for (let j = 0; j < stemAndForms.length; j++) {\n if (stemAndForms.includes(word)) {\n if (typeof foundPrefix === 'string') {\n return foundPrefix + stemAndForms[0];\n }\n return stemAndForms[0];\n }\n }\n }\n return null;\n};\n\n/**\n * Checks whether the word is on the sub-list of the full forms list for which we search for an ending match between one of\n * the forms and the word (i.e., whether the word ends with a form from the list). If a match is found, the canonical\n * stem is returned. e.g. fitnesscentra -> fitnesscentrum\n *\n * @param {string}\t\t\tword\t\t\t\t\t\t\tThe word to check.\n * @param {string[]}\t\tendingMatchFullFormsList\t\tThe list we search for an ending match in.\n * @returns {string|null}\tThe canonical stem or null if no match found.\n */\nconst checkEndingMatchFullFormsList = function(word, endingMatchFullFormsList) {\n for (let i = 0; i < endingMatchFullFormsList.length; i++) {\n const stemAndForms = flatten(endingMatchFullFormsList[i]);\n for (let j = 0; j < stemAndForms.length; j++) {\n if (word.endsWith(stemAndForms[j])) {\n /*\n * Check if the word checked is actually a compound word. e.g. familielid\n * The character/s preceding the words in the exception should be at least 2 characters in order to be a valid compound element.\n */\n const precedingLexicalMaterial = word.slice(0, -stemAndForms[j].length);\n\n if (precedingLexicalMaterial.length === 1) {\n return null;\n }\n\n if (precedingLexicalMaterial.length > 1) {\n return precedingLexicalMaterial + stemAndForms[0];\n }\n return stemAndForms[0];\n }\n }\n }\n return null;\n};\n\n/**\n * Checks whether the word is on the sub-list of the full forms list for which we search for the exact match between one of\n * the forms and the word. If a match is found, the canonical stem is returned. e.g. curricula -> curriculum\n *\n * @param {string}\t\t\tword\t\t\t\t\t\tThe word to check.\n * @param {string[]}\t\texactMatchFullFormsList\t\tThe list we search for an exact match in.\n * @returns {string|null}\tThe canonical stem or null if no match found.\n */\nconst checkExactMatchFullFormsList = function(word, exactMatchFullFormsList) {\n for (let i = 0; i < exactMatchFullFormsList.length; i++) {\n const stemAndForms = flatten(exactMatchFullFormsList[i]);\n for (let j = 0; j < stemAndForms.length; j++) {\n if (stemAndForms.includes(word)) {\n return stemAndForms[0];\n }\n }\n }\n return null;\n};\n\n/**\n *\n * Checks whether a word is on the exception list for which we have full forms. If it is, returns the indicated stem of the word.\n *\n * @param {Array} morphologyDataNL The Dutch morphology data file.\n * @param {string} word The word to check.\n *\n * @returns {string/null} The created word forms.\n */\nexport default function checkExceptionsWithFullForms(morphologyDataNL, word) {\n const exceptionListWithFullForms =\n morphologyDataNL.stemExceptions.stemmingExceptionStemsWithFullForms;\n\n let stem = checkVerbFullFormsList(\n word,\n exceptionListWithFullForms.verbs,\n morphologyDataNL.pastParticipleStemmer.compoundVerbsPrefixes\n );\n if (stem) {\n return stem;\n }\n\n stem = checkEndingMatchFullFormsList(word, exceptionListWithFullForms.endingMatch);\n if (stem) {\n return stem;\n }\n\n stem = checkExactMatchFullFormsList(word, exceptionListWithFullForms.exactMatch);\n if (stem) {\n return stem;\n }\n\n return null;\n}\n"],"mappings":";;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AACA,MAAM;EAACE;AAAiB,CAAC,GAAGC,yBAAkB;;AAE9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,sBAAsB,GAAG,SAAAA,CAASC,IAAI,EAAEC,iBAAiB,EAAEC,oBAAoB,EAAE;EACrF,MAAMC,QAAQ,GAAGN,iBAAiB,CAACK,oBAAoB,CAAC;;EAExD;EACA,MAAME,WAAW,GAAGD,QAAQ,CAACE,IAAI,CAACC,MAAM,IAAIN,IAAI,CAACO,UAAU,CAACD,MAAM,CAAC,CAAC;EAEpE,IAAI,OAAOF,WAAW,KAAK,QAAQ,EAAE;IACnCJ,IAAI,GAAGA,IAAI,CAACQ,KAAK,CAACJ,WAAW,CAACK,MAAM,CAAC;EACvC;EAEA,KAAK,IAAIC,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAGT,iBAAiB,CAACQ,MAAM,EAAEC,CAAC,EAAE,EAAE;IACjD,MAAMC,YAAY,GAAG,IAAAC,eAAO,EAACX,iBAAiB,CAACS,CAAC,CAAC,CAAC;IAClD,KAAK,IAAIG,CAAC,GAAG,CAAC,EAAEA,C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GAAG,SAAAA,CAASnB,IAAI,EAAEoB,uBAAuB,EAAE;EAC3E,KAAK,IAAIV,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAGU,uBAAuB,CAACX,MAAM,EAAEC,CAAC,EAAE,EAAE;IACvD,MAAMC,YAAY,GAAG,IAAAC,eAAO,EAACQ,uBAAuB,CAACV,CAAC,CAAC,CAAC;IACxD,KAAK,IAAIG,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAGF,YAAY,CAACF,MAAM,EAAEI,CAAC,EAAE,EAAE;MAC5C,IAAIF,YAAY,CAACG,QAAQ,CAACd,IAAI,CAAC,EAAE;QAC/B,OAAOW,YAAY,CAAC,CAAC,CAAC;MACxB;IACF;EACF;EACA,OAAO,IAAI;AACb,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACe,SAASU,4BAA4BA,CAACC,gBAAgB,EAAEtB,IAAI,EAAE;EAC3E,MAAMuB,0BAA0B,GAC9BD,gBAAgB,CAACE,cAAc,CAACC,mCAAmC;EAErE,IAAIC,IAAI,GAAG3B,sBAAsB,CAC/BC,IAAI,EACJuB,0BAA0B,CAACI,KAAK,EAChCL,gBAAgB,CAACM,qBAAqB,CAACC,qBACzC,CAAC;EACD,IAAIH,IAAI,EAAE;IACR,OAAOA,IAAI;EACb;EAEAA,IAAI,GAAGX,6BAA6B,CAACf,IAAI,EAAEuB,0BAA0B,CAACO,WAAW,CAAC;EAClF,IAAIJ,IAAI,EAAE;IACR,OAAOA,IAAI;EACb;EAEAA,IAAI,GAAGP,4BAA4B,CAACnB,IAAI,EAAEuB,0BAA0B,CAACQ,UAAU,CAAC;EAChF,IAAIL,IAAI,EAAE;IACR,OAAOA,IAAI;EACb;EAEA,OAAO,IAAI;AACb","ignoreList":[]}
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.detectAndStemRegularParticiple = detectAndStemRegularParticiple;
7
- var _index = require("@axyseo/index");
7
+ var _index = require("../../../index");
8
8
  var _nonParticiples = _interopRequireDefault(require("../../config/internal/nonParticiples.js"));
9
9
  var _stemModificationHelpers = require("./stemModificationHelpers");
10
10
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }