axyseo 2.0.0-alpha.0.0.8 → 2.0.0-alpha.0.0.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (259) 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/readability/TransitionWordsAssessment.js +3 -3
  252. package/build/scoring/assessments/readability/TransitionWordsAssessment.js.map +1 -1
  253. package/build/scoring/assessments/seo/MetaDescriptionKeywordAssessment.js +1 -1
  254. package/build/scoring/assessments/seo/MetaDescriptionKeywordAssessment.js.map +1 -1
  255. package/build/scoring/assessments/seo/MetaTitleKeywordAssessment.js +1 -1
  256. package/build/scoring/assessments/seo/MetaTitleKeywordAssessment.js.map +1 -1
  257. package/build/scoring/helpers/assessments/recommendedKeywordCount.js +1 -1
  258. package/build/scoring/helpers/assessments/recommendedKeywordCount.js.map +1 -1
  259. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"createBasicWordForms.js","names":["_index","require","regexHelpers","searchAndReplaceWithRegex","languageProcessing","createForms","word","prefix","suffixes1","suffixes2","suffixes3","suffixes4","createdForms","push","endsWith","map","suffix","test","stemWord","suffixesAndReplacements","startsWith","slice","length","createBasicWordForms","forms","stemmedWord"],"sources":["../../../../../src/languageProcessing/languages/fa/helpers/createBasicWordForms.js"],"sourcesContent":["import {languageProcessing} from '../../../index';\nconst {\n regexHelpers: {searchAndReplaceWithRegex}\n} = languageProcessing;\n\n/**\n * Creates the basic affixed-forms of a given Farsi word\n *\n * @param {string} word The word to check\n *\n * @returns {Array} The created forms\n */\nconst createForms = function(word) {\n const prefix = 'ن';\n // Regular suffixes\n const suffixes1 = ['مان', 'شان', 'تان', 'ش', 'ت', 'م', 'ی'];\n // Suffixes for words that end in ا or و\n const suffixes2 = ['یی', 'یم', 'یت', 'یش'];\n // Suffixes for words that end in silent ه\n const suffixes3 = ['‌ای', '‌یی', '‌ام', '‌ات', '‌اش'];\n // Suffixes for words that end in ها\n const suffixes4 = ['یی', 'ی'];\n\n const createdForms = [];\n\n // Create prefixed form.\n createdForms.push(prefix + word);\n\n // Create suffixed forms using suffixes from one of the four groups, depending on the word's ending.\n if (word.endsWith('ها')) {\n createdForms.push(...suffixes4.map(suffix => word + suffix));\n } else if (/([^وای]ه)$/i.test(word)) {\n createdForms.push(...suffixes3.map(suffix => word + suffix));\n } else if (/([وا])$/i.test(word)) {\n createdForms.push(...suffixes2.map(suffix => word + suffix));\n } else {\n if (word.endsWith('ی')) {\n createdForms.push(word + '‌ای');\n }\n createdForms.push(...suffixes1.map(suffix => word + suffix));\n }\n return createdForms;\n};\n\n/**\n * Stem the basic affixes of a given Farsi word\n *\n * @param {string} word The word to check\n *\n * @returns {string} The stemmed word\n */\nconst stemWord = function(word) {\n const prefix = 'ن';\n const suffixesAndReplacements = [\n ['(و|ا)(یش|یت|یم|یی)$', '$1'],\n ['([^وای]ه)(‌یی|‌ای|‌اش|‌ات|‌ام)$', '$1'],\n ['(ی)‌ای$', '$1'],\n ['(ها)یی$', '$1'],\n ['(مان|شان|تان|ش|ت|م|ی)$', '']\n ];\n // Remove prefix.\n if (word.startsWith(prefix)) {\n return word.slice(1, word.length);\n }\n // Search for and remove suffixes.\n return searchAndReplaceWithRegex(word, suffixesAndReplacements);\n};\n\n/**\n * Creates basic word forms for a given Farsi word.\n *\n * @param {string} word The word for which to create basic word forms.\n *\n * @returns {Array} Prefixed and de-prefixed variations of a word.\n */\nexport default function createBasicWordForms(word) {\n const forms = [];\n\n /*\n * Add prefixes and suffixes to the input word. We always do this, since some words\n * beginning with an affix-like letter might be exceptions where this is the\n * actual first letter or last letter of the word.\n */\n\n forms.push(...createForms(word));\n\n /*\n * If a word starts with a prefix or if it ends with one of the suffixes, we strip it and create all possible\n * affixed forms based on this stem.\n */\n const stemmedWord = stemWord(word);\n if (stemmedWord) {\n forms.push(stemmedWord);\n forms.push(...createForms(stemmedWord));\n }\n return forms;\n}\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,MAAM;EACJC,YAAY,EAAE;IAACC;EAAyB;AAC1C,CAAC,GAAGC,yBAAkB;;AAEtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,WAAW,GAAG,SAAAA,CAASC,IAAI,EAAE;EACjC,MAAMC,MAAM,GAAG,GAAG;EAClB;EACA,MAAMC,SAAS,GAAG,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC;EAC3D;EACA,MAAMC,SAAS,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC;EAC1C;EACA,MAAMC,SAAS,GAAG,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC;EACrD;EACA,MAAMC,SAAS,GAAG,CAAC,IAAI,EAAE,GAAG,CAAC;EAE7B,MAAMC,YAAY,GAAG,EAAE;;EAEvB;EACAA,YAAY,CAACC,IAAI,CAACN,MAAM,GAAGD,IAAI,CAAC;;EAEhC;EACA,IAAIA,IAAI,CAACQ,QAAQ,CAAC,IAAI,CAAC,EAAE;IACvBF,YAAY,CAACC,IAAI,CAAC,GAAGF,SAAS,CAACI,GAAG,CAACC,MAAM,IAAIV,IAAI,GAAGU,MAAM,CAAC,CAAC;EAC9D,CAAC,MAAM,IAAI,aAAa,CAACC,IAAI,CAACX,IAAI,CAAC,EAAE;IACnCM,YAAY,CAACC,IAAI,CAAC,GAAGH,SAAS,CAACK,GAAG,CAACC,MAAM,IAAIV,IAAI,GAAGU,MAAM,CAAC,CAA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ACF;AACA;AACA;EACE,MAAMmB,WAAW,GAAGP,QAAQ,CAACZ,IAAI,CAAC;EAClC,IAAImB,WAAW,EAAE;IACfD,KAAK,CAACX,IAAI,CAACY,WAAW,CAAC;IACvBD,KAAK,CAACX,IAAI,CAAC,GAAGR,WAAW,CAACoB,WAAW,CAAC,CAAC;EACzC;EACA,OAAOD,KAAK;AACd","ignoreList":[]}
1
+ {"version":3,"file":"createBasicWordForms.js","names":["_index","require","regexHelpers","searchAndReplaceWithRegex","languageProcessing","createForms","word","prefix","suffixes1","suffixes2","suffixes3","suffixes4","createdForms","push","endsWith","map","suffix","test","stemWord","suffixesAndReplacements","startsWith","slice","length","createBasicWordForms","forms","stemmedWord"],"sources":["../../../../../src/languageProcessing/languages/fa/helpers/createBasicWordForms.js"],"sourcesContent":["import {languageProcessing} from '@axyseo/index';\nconst {\n regexHelpers: {searchAndReplaceWithRegex}\n} = languageProcessing;\n\n/**\n * Creates the basic affixed-forms of a given Farsi word\n *\n * @param {string} word The word to check\n *\n * @returns {Array} The created forms\n */\nconst createForms = function(word) {\n const prefix = 'ن';\n // Regular suffixes\n const suffixes1 = ['مان', 'شان', 'تان', 'ش', 'ت', 'م', 'ی'];\n // Suffixes for words that end in ا or و\n const suffixes2 = ['یی', 'یم', 'یت', 'یش'];\n // Suffixes for words that end in silent ه\n const suffixes3 = ['‌ای', '‌یی', '‌ام', '‌ات', '‌اش'];\n // Suffixes for words that end in ها\n const suffixes4 = ['یی', 'ی'];\n\n const createdForms = [];\n\n // Create prefixed form.\n createdForms.push(prefix + word);\n\n // Create suffixed forms using suffixes from one of the four groups, depending on the word's ending.\n if (word.endsWith('ها')) {\n createdForms.push(...suffixes4.map(suffix => word + suffix));\n } else if (/([^وای]ه)$/i.test(word)) {\n createdForms.push(...suffixes3.map(suffix => word + suffix));\n } else if (/([وا])$/i.test(word)) {\n createdForms.push(...suffixes2.map(suffix => word + suffix));\n } else {\n if (word.endsWith('ی')) {\n createdForms.push(word + '‌ای');\n }\n createdForms.push(...suffixes1.map(suffix => word + suffix));\n }\n return createdForms;\n};\n\n/**\n * Stem the basic affixes of a given Farsi word\n *\n * @param {string} word The word to check\n *\n * @returns {string} The stemmed word\n */\nconst stemWord = function(word) {\n const prefix = 'ن';\n const suffixesAndReplacements = [\n ['(و|ا)(یش|یت|یم|یی)$', '$1'],\n ['([^وای]ه)(‌یی|‌ای|‌اش|‌ات|‌ام)$', '$1'],\n ['(ی)‌ای$', '$1'],\n ['(ها)یی$', '$1'],\n ['(مان|شان|تان|ش|ت|م|ی)$', '']\n ];\n // Remove prefix.\n if (word.startsWith(prefix)) {\n return word.slice(1, word.length);\n }\n // Search for and remove suffixes.\n return searchAndReplaceWithRegex(word, suffixesAndReplacements);\n};\n\n/**\n * Creates basic word forms for a given Farsi word.\n *\n * @param {string} word The word for which to create basic word forms.\n *\n * @returns {Array} Prefixed and de-prefixed variations of a word.\n */\nexport default function createBasicWordForms(word) {\n const forms = [];\n\n /*\n * Add prefixes and suffixes to the input word. We always do this, since some words\n * beginning with an affix-like letter might be exceptions where this is the\n * actual first letter or last letter of the word.\n */\n\n forms.push(...createForms(word));\n\n /*\n * If a word starts with a prefix or if it ends with one of the suffixes, we strip it and create all possible\n * affixed forms based on this stem.\n */\n const stemmedWord = stemWord(word);\n if (stemmedWord) {\n forms.push(stemmedWord);\n forms.push(...createForms(stemmedWord));\n }\n return forms;\n}\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,MAAM;EACJC,YAAY,EAAE;IAACC;EAAyB;AAC1C,CAAC,GAAGC,yBAAkB;;AAEtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,WAAW,GAAG,SAAAA,CAASC,IAAI,EAAE;EACjC,MAAMC,MAAM,GAAG,GAAG;EAClB;EACA,MAAMC,SAAS,GAAG,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC;EAC3D;EACA,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MAAM,GAAG,GAAG;EAClB,MAAMY,uBAAuB,GAAG,CAC9B,CAAC,qBAAqB,EAAE,IAAI,CAAC,EAC7B,CAAC,iCAAiC,EAAE,IAAI,CAAC,EACzC,CAAC,SAAS,EAAE,IAAI,CAAC,EACjB,CAAC,SAAS,EAAE,IAAI,CAAC,EACjB,CAAC,wBAAwB,EAAE,EAAE,CAAC,CAC/B;EACD;EACA,IAAIb,IAAI,CAACc,UAAU,CAACb,MAAM,CAAC,EAAE;IAC3B,OAAOD,IAAI,CAACe,KAAK,CAAC,CAAC,EAAEf,IAAI,CAACgB,MAAM,CAAC;EACnC;EACA;EACA,OAAOnB,yBAAyB,CAACG,IAAI,EAAEa,uBAAuB,CAAC;AACjE,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACe,SAASI,oBAAoBA,CAACjB,IAAI,EAAE;EACjD,MAAMkB,KAAK,GAAG,EAAE;;EAEhB;AACF;AACA;AACA;AACA;;EAEEA,KAAK,CAACX,IAAI,CAAC,GAAGR,WAAW,CAACC,IAAI,CAAC,CAAC;;EAEhC;AACF;AACA;AACA;EACE,MAAMmB,WAAW,GAAGP,QAAQ,CAACZ,IAAI,CAAC;EAClC,IAAImB,WAAW,EAAE;IACfD,KAAK,CAACX,IAAI,CAACY,WAAW,CAAC;IACvBD,KAAK,CAACX,IAAI,CAAC,GAAGR,WAAW,CAACoB,WAAW,CAAC,CAAC;EACzC;EACA,OAAOD,KAAK;AACd","ignoreList":[]}
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = getStemmer;
7
- var _index = require("../../../index");
7
+ var _index = require("@axyseo/index");
8
8
  const {
9
9
  baseStemmer
10
10
  } = _index.languageProcessing;
@@ -1 +1 @@
1
- {"version":3,"file":"getStemmer.js","names":["_index","require","baseStemmer","languageProcessing","getStemmer"],"sources":["../../../../../src/languageProcessing/languages/fa/helpers/getStemmer.js"],"sourcesContent":["import {languageProcessing} from '../../../index';\nconst {baseStemmer} = languageProcessing;\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() {\n return baseStemmer;\n}\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,MAAM;EAACC;AAAW,CAAC,GAAGC,yBAAkB;;AAExC;AACA;AACA;AACA;AACA;AACA;AACA;AACe,SAASC,UAAUA,CAAA,EAAG;EACnC,OAAOF,WAAW;AACpB","ignoreList":[]}
1
+ {"version":3,"file":"getStemmer.js","names":["_index","require","baseStemmer","languageProcessing","getStemmer"],"sources":["../../../../../src/languageProcessing/languages/fa/helpers/getStemmer.js"],"sourcesContent":["import {languageProcessing} from '@axyseo/index';\nconst {baseStemmer} = languageProcessing;\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() {\n return baseStemmer;\n}\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,MAAM;EAACC;AAAW,CAAC,GAAGC,yBAAkB;;AAExC;AACA;AACA;AACA;AACA;AACA;AACA;AACe,SAASC,UAAUA,CAAA,EAAG;EACnC,OAAOF,WAAW;AACpB","ignoreList":[]}
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = isPassiveSentence;
7
- var _index = require("../../../index");
7
+ var _index = require("@axyseo/index");
8
8
  var _participles = _interopRequireDefault(require("../config/internal/participles"));
9
9
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
10
10
  const {
@@ -1 +1 @@
1
- {"version":3,"file":"isPassiveSentence.js","names":["_index","require","_participles","_interopRequireDefault","e","__esModule","default","areWordsInSentence","languageProcessing","isPassiveSentence","sentence","participles"],"sources":["../../../../../src/languageProcessing/languages/fa/helpers/isPassiveSentence.js"],"sourcesContent":["import {languageProcessing} from '../../../index';\nconst {areWordsInSentence} = languageProcessing;\n\nimport participles from '../config/internal/participles';\n\n/**\n * Checks the passed sentence to see if it contains passive verbs.\n *\n * @param {string} sentence The sentence to match against.\n * @returns {Boolean} Whether the sentence contains passive voice.\n */\nexport default function isPassiveSentence(sentence) {\n return areWordsInSentence(participles, sentence);\n}\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAGA,IAAAC,YAAA,GAAAC,sBAAA,CAAAF,OAAA;AAAyD,SAAAE,uBAAAC,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAFzD,MAAM;EAACG;AAAkB,CAAC,GAAGC,yBAAkB;AAI/C;AACA;AACA;AACA;AACA;AACA;AACe,SAASC,iBAAiBA,CAACC,QAAQ,EAAE;EAClD,OAAOH,kBAAkB,CAACI,oBAAW,EAAED,QAAQ,CAAC;AAClD","ignoreList":[]}
1
+ {"version":3,"file":"isPassiveSentence.js","names":["_index","require","_participles","_interopRequireDefault","e","__esModule","default","areWordsInSentence","languageProcessing","isPassiveSentence","sentence","participles"],"sources":["../../../../../src/languageProcessing/languages/fa/helpers/isPassiveSentence.js"],"sourcesContent":["import {languageProcessing} from '@axyseo/index';\nconst {areWordsInSentence} = languageProcessing;\n\nimport participles from '../config/internal/participles';\n\n/**\n * Checks the passed sentence to see if it contains passive verbs.\n *\n * @param {string} sentence The sentence to match against.\n * @returns {Boolean} Whether the sentence contains passive voice.\n */\nexport default function isPassiveSentence(sentence) {\n return areWordsInSentence(participles, sentence);\n}\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAGA,IAAAC,YAAA,GAAAC,sBAAA,CAAAF,OAAA;AAAyD,SAAAE,uBAAAC,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAFzD,MAAM;EAACG;AAAkB,CAAC,GAAGC,yBAAkB;AAI/C;AACA;AACA;AACA;AACA;AACA;AACe,SAASC,iBAAiBA,CAACC,QAAQ,EAAE;EAClD,OAAOH,kBAAkB,CAACI,oBAAW,EAAED,QAAQ,CAAC;AAClD","ignoreList":[]}
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
- var _index = require("../../../index");
7
+ var _index = require("@axyseo/index");
8
8
  var _firstWordExceptions = _interopRequireDefault(require("./config/firstWordExceptions"));
9
9
  var _functionWords = require("./config/functionWords");
10
10
  var _stopWords = _interopRequireDefault(require("./config/stopWords"));
@@ -1 +1 @@
1
- {"version":3,"file":"Researcher.js","names":["_index","require","_firstWordExceptions","_interopRequireDefault","_functionWords","_stopWords","_transitionWords","_twoPartTransitionWords","_syllables","_getClauses","_getStemmer","_calculateFleschReadingScore","e","__esModule","default","AbstractResearcher","languageProcessing","Researcher","constructor","paper","Object","assign","config","language","passiveConstructionType","firstWordExceptions","functionWords","stopWords","transitionWords","twoPartTransitionWords","syllables","helpers","getClauses","getStemmer","fleschReadingScore","exports"],"sources":["../../../../src/languageProcessing/languages/fr/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';\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: 'fr',\n passiveConstructionType: 'periphrastic',\n firstWordExceptions,\n functionWords,\n stopWords,\n transitionWords,\n twoPartTransitionWords,\n syllables\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;AAGA,IAAAQ,WAAA,GAAAN,sBAAA,CAAAF,OAAA;AACA,IAAAS,WAAA,GAAAP,sBAAA,CAAAF,OAAA;AACA,IAAAU,4BAAA,GAAAR,sBAAA,CAAAF,OAAA;AAAuE,SAAAE,uBAAAS,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAbvE,MAAM;EAACG;AAAkB,CAAC,GAAGC,yBAAkB;;AAE/C;;AAQA;;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;IACF,CAAC,CAAC;IAEFV,MAAM,CAACC,MAAM,CAAC,IAAI,CAACU,OAAO,EAAE;MAC1BC,UAAU,EAAVA,mBAAU;MACVC,UAAU,EAAVA,mBAAU;MACVC,kBAAkB,EAAlBA;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","_syllables","_getClauses","_getStemmer","_calculateFleschReadingScore","e","__esModule","default","AbstractResearcher","languageProcessing","Researcher","constructor","paper","Object","assign","config","language","passiveConstructionType","firstWordExceptions","functionWords","stopWords","transitionWords","twoPartTransitionWords","syllables","helpers","getClauses","getStemmer","fleschReadingScore","exports"],"sources":["../../../../src/languageProcessing/languages/fr/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';\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: 'fr',\n passiveConstructionType: 'periphrastic',\n firstWordExceptions,\n functionWords,\n stopWords,\n transitionWords,\n twoPartTransitionWords,\n syllables\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,IAA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exports.default = calculateScore;
7
- var _index = require("../../../index");
7
+ var _index = require("@axyseo/index");
8
8
  const {
9
9
  formatNumber
10
10
  } = _index.helpers;
@@ -1 +1 @@
1
- {"version":3,"file":"calculateFleschReadingScore.js","names":["_index","require","formatNumber","helpers","calculateScore","statistics","score","numberOfWords","numberOfSentences","numberOfSyllables"],"sources":["../../../../../src/languageProcessing/languages/fr/helpers/calculateFleschReadingScore.js"],"sourcesContent":["import {helpers} from '../../../index';\nconst {formatNumber} = helpers;\n\n/**\n * Returns the Flesch reading score for French.\n *\n * @param {Object} statistics The Flesch reading statistics.\n *\n * @returns {number} The Flesch reading score for French.\n */\nexport default function calculateScore(statistics) {\n const score =\n 207 -\n (1.015 * statistics.numberOfWords) / statistics.numberOfSentences -\n (73.6 * statistics.numberOfSyllables) / statistics.numberOfWords;\n\n return formatNumber(score);\n}\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,MAAM;EAACC;AAAY,CAAC,GAAGC,cAAO;;AAE9B;AACA;AACA;AACA;AACA;AACA;AACA;AACe,SAASC,cAAcA,CAACC,UAAU,EAAE;EACjD,MAAMC,KAAK,GACT,GAAG,GACF,KAAK,GAAGD,UAAU,CAACE,aAAa,GAAIF,UAAU,CAACG,iBAAiB,GAChE,IAAI,GAAGH,UAAU,CAACI,iBAAiB,GAAIJ,UAAU,CAACE,aAAa;EAElE,OAAOL,YAAY,CAACI,KAAK,CAAC;AAC5B","ignoreList":[]}
1
+ {"version":3,"file":"calculateFleschReadingScore.js","names":["_index","require","formatNumber","helpers","calculateScore","statistics","score","numberOfWords","numberOfSentences","numberOfSyllables"],"sources":["../../../../../src/languageProcessing/languages/fr/helpers/calculateFleschReadingScore.js"],"sourcesContent":["import {helpers} from '@axyseo/index';\nconst {formatNumber} = helpers;\n\n/**\n * Returns the Flesch reading score for French.\n *\n * @param {Object} statistics The Flesch reading statistics.\n *\n * @returns {number} The Flesch reading score for French.\n */\nexport default function calculateScore(statistics) {\n const score =\n 207 -\n (1.015 * statistics.numberOfWords) / statistics.numberOfSentences -\n (73.6 * statistics.numberOfSyllables) / statistics.numberOfWords;\n\n return formatNumber(score);\n}\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,MAAM;EAACC;AAAY,CAAC,GAAGC,cAAO;;AAE9B;AACA;AACA;AACA;AACA;AACA;AACA;AACe,SAASC,cAAcA,CAACC,UAAU,EAAE;EACjD,MAAMC,KAAK,GACT,GAAG,GACF,KAAK,GAAGD,UAAU,CAACE,aAAa,GAAIF,UAAU,CAACG,iBAAiB,GAChE,IAAI,GAAGH,UAAU,CAACI,iBAAiB,GAAIJ,UAAU,CAACE,aAAa;EAElE,OAAOL,YAAY,CAACI,KAAK,CAAC;AAC5B","ignoreList":[]}
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = getFrenchClauses;
7
- var _index = require("../../../index");
7
+ var _index = require("@axyseo/index");
8
8
  var _Clause = _interopRequireDefault(require("../values/Clause"));
9
9
  var _passiveVoiceAuxiliaries = _interopRequireDefault(require("../config/internal/passiveVoiceAuxiliaries.js"));
10
10
  var _stopWords = _interopRequireDefault(require("../config/stopWords.js"));
@@ -1 +1 @@
1
- {"version":3,"file":"getClauses.js","names":["_index","require","_Clause","_interopRequireDefault","_passiveVoiceAuxiliaries","_stopWords","e","__esModule","default","createRegexFromArray","getClauses","languageProcessing","followingAuxiliaryExceptionWords","reflexivePronouns","elisionAuxiliaryExceptionWords","options","Clause","stopwords","auxiliaries","regexes","auxiliaryRegex","stopCharacterRegex","followingAuxiliaryExceptionRegex","directPrecedenceExceptionRegex","elisionAuxiliaryExceptionRegex","getFrenchClauses","sentence"],"sources":["../../../../../src/languageProcessing/languages/fr/helpers/getClauses.js"],"sourcesContent":["import {languageProcessing} from '../../../index';\nconst {createRegexFromArray, getClauses} = languageProcessing;\n\nimport Clause from '../values/Clause';\nimport auxiliaries from '../config/internal/passiveVoiceAuxiliaries.js';\nimport stopwords from '../config/stopWords.js';\n\nconst followingAuxiliaryExceptionWords = ['le', 'la', 'les', 'une', \"l'un\", \"l'une\"];\nconst reflexivePronouns = ['se', 'me', 'te', \"s'y\", \"m'y\", \"t'y\", 'nous nous', 'vous vous'];\nconst elisionAuxiliaryExceptionWords = [\"c'\", \"s'\", 'peut-'];\n\nconst options = {\n Clause,\n stopwords,\n auxiliaries,\n regexes: {\n auxiliaryRegex: createRegexFromArray(auxiliaries),\n stopCharacterRegex: /(,)(?=[ \\n\\r\\t'\"+\\-»«‹›<>])/gi,\n followingAuxiliaryExceptionRegex: createRegexFromArray(followingAuxiliaryExceptionWords),\n directPrecedenceExceptionRegex: createRegexFromArray(reflexivePronouns),\n elisionAuxiliaryExceptionRegex: createRegexFromArray(elisionAuxiliaryExceptionWords, true)\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 getFrenchClauses(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,gCAAgC,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC;AACpF,MAAMC,iBAAiB,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,WAAW,EAAE,WAAW,CAAC;AAC3F,MAAMC,8BAA8B,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,CAAC;AAE5D,MAAMC,OAAO,GAAG;EACdC,MAAM,EAANA,eAAM;EACNC,SAAS,EAATA,kBAAS;EACTC,WAAW,EAAXA,gCAAW;EACXC,OAAO,EAAE;IACPC,cAAc,EAAEX,oBAAoB,CAACS,gCAAW,CAAC;IACjDG,kBAAkB,EAAE,+BAA+B;IACnDC,gCAAgC,EAAEb,oBAAoB,CAACG,gCAAgC,CAAC;IACxFW,8BAA8B,EAAEd,oBAAoB,CAACI,iBAAiB,CAAC;IACvEW,8BAA8B,EAAEf,oBAAoB,CAACK,8BAA8B,EAAE,IAAI;EAC3F;AACF,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACe,SAASW,gBAAgBA,CAACC,QAAQ,EAAE;EACjD,OAAOhB,UAAU,CAACgB,QAAQ,EAAEX,OAAO,CAAC;AACtC","ignoreList":[]}
1
+ {"version":3,"file":"getClauses.js","names":["_index","require","_Clause","_interopRequireDefault","_passiveVoiceAuxiliaries","_stopWords","e","__esModule","default","createRegexFromArray","getClauses","languageProcessing","followingAuxiliaryExceptionWords","reflexivePronouns","elisionAuxiliaryExceptionWords","options","Clause","stopwords","auxiliaries","regexes","auxiliaryRegex","stopCharacterRegex","followingAuxiliaryExceptionRegex","directPrecedenceExceptionRegex","elisionAuxiliaryExceptionRegex","getFrenchClauses","sentence"],"sources":["../../../../../src/languageProcessing/languages/fr/helpers/getClauses.js"],"sourcesContent":["import {languageProcessing} from '@axyseo/index';\nconst {createRegexFromArray, getClauses} = languageProcessing;\n\nimport Clause from '../values/Clause';\nimport auxiliaries from '../config/internal/passiveVoiceAuxiliaries.js';\nimport stopwords from '../config/stopWords.js';\n\nconst followingAuxiliaryExceptionWords = ['le', 'la', 'les', 'une', \"l'un\", \"l'une\"];\nconst reflexivePronouns = ['se', 'me', 'te', \"s'y\", \"m'y\", \"t'y\", 'nous nous', 'vous vous'];\nconst elisionAuxiliaryExceptionWords = [\"c'\", \"s'\", 'peut-'];\n\nconst options = {\n Clause,\n stopwords,\n auxiliaries,\n regexes: {\n auxiliaryRegex: createRegexFromArray(auxiliaries),\n stopCharacterRegex: /(,)(?=[ \\n\\r\\t'\"+\\-»«‹›<>])/gi,\n followingAuxiliaryExceptionRegex: createRegexFromArray(followingAuxiliaryExceptionWords),\n directPrecedenceExceptionRegex: createRegexFromArray(reflexivePronouns),\n elisionAuxiliaryExceptionRegex: createRegexFromArray(elisionAuxiliaryExceptionWords, true)\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 getFrenchClauses(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,gCAAgC,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC;AACpF,MAAMC,iBAAiB,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,WAAW,EAAE,WAAW,CAAC;AAC3F,MAAMC,8BAA8B,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,CAAC;AAE5D,MAAMC,OAAO,GAAG;EACdC,MAAM,EAANA,eAAM;EACNC,SAAS,EAATA,kBAAS;EACTC,WAAW,EAAXA,gCAAW;EACXC,OAAO,EAAE;IACPC,cAAc,EAAEX,oBAAoB,CAACS,gCAAW,CAAC;IACjDG,kBAAkB,EAAE,+BAA+B;IACnDC,gCAAgC,EAAEb,oBAAoB,CAACG,gCAAgC,CAAC;IACxFW,8BAA8B,EAAEd,oBAAoB,CAACI,iBAAiB,CAAC;IACvEW,8BAA8B,EAAEf,oBAAoB,CAACK,8BAA8B,EAAE,IAAI;EAC3F;AACF,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACe,SAASW,gBAAgBA,CAACC,QAAQ,EAAE;EACjD,OAAOhB,UAAU,CAACgB,QAAQ,EAAEX,OAAO,CAAC;AACtC","ignoreList":[]}
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.default = getStemmer;
7
7
  var _lodash = require("lodash");
8
- var _index = require("../../../index");
8
+ var _index = require("@axyseo/index");
9
9
  var _stem = _interopRequireDefault(require("./internal/stem"));
10
10
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
11
11
  const {
@@ -1 +1 @@
1
- {"version":3,"file":"getStemmer.js","names":["_lodash","require","_index","_stem","_interopRequireDefault","e","__esModule","default","baseStemmer","languageProcessing","getStemmer","researcher","morphologyData","get","getData","word","stem"],"sources":["../../../../../src/languageProcessing/languages/fr/helpers/getStemmer.js"],"sourcesContent":["import {get} from 'lodash';\nimport {languageProcessing} from '../../../index';\nconst {baseStemmer} = languageProcessing;\n\nimport stem from './internal/stem';\n\n/**\n * Returns the stemmer for a researcher.\n *\n * @param {Researcher} researcher The researcher.\n *\n * @returns {Function} The stemmer.\n */\nexport default function getStemmer(researcher) {\n const morphologyData = get(researcher.getData('morphology'), 'fr', false);\n\n if (morphologyData) {\n return word => stem(word, morphologyData);\n }\n\n return baseStemmer;\n}\n"],"mappings":";;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AAGA,IAAAE,KAAA,GAAAC,sBAAA,CAAAH,OAAA;AAAmC,SAAAG,uBAAAC,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAFnC,MAAM;EAACG;AAAW,CAAC,GAAGC,yBAAkB;AAIxC;AACA;AACA;AACA;AACA;AACA;AACA;AACe,SAASC,UAAUA,CAACC,UAAU,EAAE;EAC7C,MAAMC,cAAc,GAAG,IAAAC,WAAG,EAACF,UAAU,CAACG,OAAO,CAAC,YAAY,CAAC,EAAE,IAAI,EAAE,KAAK,CAAC;EAEzE,IAAIF,cAAc,EAAE;IAClB,OAAOG,IAAI,IAAI,IAAAC,aAAI,EAACD,IAAI,EAAEH,cAAc,CAAC;EAC3C;EAEA,OAAOJ,WAAW;AACpB","ignoreList":[]}
1
+ {"version":3,"file":"getStemmer.js","names":["_lodash","require","_index","_stem","_interopRequireDefault","e","__esModule","default","baseStemmer","languageProcessing","getStemmer","researcher","morphologyData","get","getData","word","stem"],"sources":["../../../../../src/languageProcessing/languages/fr/helpers/getStemmer.js"],"sourcesContent":["import {get} from 'lodash';\nimport {languageProcessing} from '@axyseo/index';\nconst {baseStemmer} = languageProcessing;\n\nimport stem from './internal/stem';\n\n/**\n * Returns the stemmer for a researcher.\n *\n * @param {Researcher} researcher The researcher.\n *\n * @returns {Function} The stemmer.\n */\nexport default function getStemmer(researcher) {\n const morphologyData = get(researcher.getData('morphology'), 'fr', false);\n\n if (morphologyData) {\n return word => stem(word, morphologyData);\n }\n\n return baseStemmer;\n}\n"],"mappings":";;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AAGA,IAAAE,KAAA,GAAAC,sBAAA,CAAAH,OAAA;AAAmC,SAAAG,uBAAAC,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAFnC,MAAM;EAACG;AAAW,CAAC,GAAGC,yBAAkB;AAIxC;AACA;AACA;AACA;AACA;AACA;AACA;AACe,SAASC,UAAUA,CAACC,UAAU,EAAE;EAC7C,MAAMC,cAAc,GAAG,IAAAC,WAAG,EAACF,UAAU,CAACG,OAAO,CAAC,YAAY,CAAC,EAAE,IAAI,EAAE,KAAK,CAAC;EAEzE,IAAIF,cAAc,EAAE;IAClB,OAAOG,IAAI,IAAI,IAAAC,aAAI,EAACD,IAAI,EAAEH,cAAc,CAAC;EAC3C;EAEA,OAAOJ,WAAW;AACpB","ignoreList":[]}
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.default = getParticiples;
7
7
  var _lodash = require("lodash");
8
- var _index = require("../../../index");
8
+ var _index = require("@axyseo/index");
9
9
  var _passiveVoiceIrregulars = require("../../config/internal/passiveVoiceIrregulars");
10
10
  const {
11
11
  getWords,
@@ -1 +1 @@
1
- {"version":3,"file":"getParticiples.js","names":["_lodash","require","_index","_passiveVoiceIrregulars","getWords","matchRegularParticiples","languageProcessing","matchFrenchParticipleWithSuffix","word","irregulars","suffixes","matches","forEach","irregular","irregularParticiplesRegex","RegExp","participleMatch","match","push","matchIrregularParticiples","concat","irregularsRegular","irregularsEndingInS","includes","irregularsIrregular","getParticiples","clauseText","words","foundParticiples","regularParticiplesRegex","length"],"sources":["../../../../../../src/languageProcessing/languages/fr/helpers/internal/getParticiples.js"],"sourcesContent":["import {forEach, includes} from 'lodash';\nimport {languageProcessing} from '../../../index';\nconst {getWords, matchRegularParticiples} = languageProcessing;\n\nimport {\n irregularsRegular,\n irregularsEndingInS,\n irregularsIrregular\n} from '../../config/internal/passiveVoiceIrregulars';\n\n/**\n * Returns an array of matches of irregular participles with suffixes.\n *\n * @param {string} word The word to match on.\n * @param {Array} irregulars The list of irregulars to match.\n * @param {string} suffixes The suffixes to match the word with.\n *\n * @returns {Array} A list with matched irregular participles.\n */\nconst matchFrenchParticipleWithSuffix = function(word, irregulars, suffixes) {\n const matches = [];\n forEach(irregulars, function(irregular) {\n const irregularParticiplesRegex = new RegExp('^' + irregular + suffixes + '?$', 'ig');\n const participleMatch = word.match(irregularParticiplesRegex);\n if (participleMatch) {\n matches.push(participleMatch[0]);\n }\n });\n return matches;\n};\n\n/**\n * Matches a word for a few lists of irregular participles.\n *\n * @param {string} word The word to match.\n * @returns {Array} The matches.\n */\nconst matchIrregularParticiples = function(word) {\n // Match different classes of participles with suffixes.\n let matches = [].concat(matchFrenchParticipleWithSuffix(word, irregularsRegular, '(e|s|es)'));\n matches = matches.concat(matchFrenchParticipleWithSuffix(word, irregularsEndingInS, '(e|es)'));\n\n // Match irregular participles that don't require adding a suffix.\n if (includes(irregularsIrregular, word)) {\n matches.push(word);\n }\n\n return matches;\n};\n\n/**\n * Creates an array of 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 const foundParticiples = [];\n\n forEach(words, function(word) {\n const regularParticiplesRegex = [/\\S+(é|ée|és|ées)($|[ \\n\\r\\t.,'()\"+\\-;!?:/»«‹›<>])/gi];\n if (\n matchRegularParticiples(word, regularParticiplesRegex).length !== 0 ||\n matchIrregularParticiples(word).length !== 0\n ) {\n foundParticiples.push(word);\n }\n });\n return foundParticiples;\n}\n"],"mappings":";;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AAGA,IAAAE,uBAAA,GAAAF,OAAA;AAFA,MAAM;EAACG,QAAQ;EAAEC;AAAuB,CAAC,GAAGC,yBAAkB;AAQ9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,+BAA+B,GAAG,SAAAA,CAASC,IAAI,EAAEC,UAAU,EAAEC,QAAQ,EAAE;EAC3E,MAAMC,OAAO,GAAG,EAAE;EAClB,IAAAC,eAAO,EAACH,UAA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CAACV,IAAI,CAACV,IAAI,CAAC;IAC7B;EACF,CAAC,CAAC;EACF,OAAOoB,gBAAgB;AACzB","ignoreList":[]}
1
+ {"version":3,"file":"getParticiples.js","names":["_lodash","require","_index","_passiveVoiceIrregulars","getWords","matchRegularParticiples","languageProcessing","matchFrenchParticipleWithSuffix","word","irregulars","suffixes","matches","forEach","irregular","irregularParticiplesRegex","RegExp","participleMatch","match","push","matchIrregularParticiples","concat","irregularsRegular","irregularsEndingInS","includes","irregularsIrregular","getParticiples","clauseText","words","foundParticiples","regularParticiplesRegex","length"],"sources":["../../../../../../src/languageProcessing/languages/fr/helpers/internal/getParticiples.js"],"sourcesContent":["import {forEach, includes} from 'lodash';\nimport {languageProcessing} from '@axyseo/index';\nconst {getWords, matchRegularParticiples} = languageProcessing;\n\nimport {\n irregularsRegular,\n irregularsEndingInS,\n irregularsIrregular\n} from '../../config/internal/passiveVoiceIrregulars';\n\n/**\n * Returns an array of matches of irregular participles with suffixes.\n *\n * @param {string} word The word to match on.\n * @param {Array} irregulars The list of irregulars to match.\n * @param {string} suffixes The suffixes to match the word with.\n *\n * @returns {Array} A list with matched irregular participles.\n */\nconst matchFrenchParticipleWithSuffix = function(word, irregulars, suffixes) {\n const matches = [];\n forEach(irregulars, function(irregular) {\n const irregularParticiplesRegex = new RegExp('^' + irregular + suffixes + '?$', 'ig');\n const participleMatch = word.match(irregularParticiplesRegex);\n if (participleMatch) {\n matches.push(participleMatch[0]);\n }\n });\n return matches;\n};\n\n/**\n * Matches a word for a few lists of irregular participles.\n *\n * @param {string} word The word to match.\n * @returns {Array} The matches.\n */\nconst matchIrregularParticiples = function(word) {\n // Match different classes of participles with suffixes.\n let matches = [].concat(matchFrenchParticipleWithSuffix(word, irregularsRegular, '(e|s|es)'));\n matches = matches.concat(matchFrenchParticipleWithSuffix(word, irregularsEndingInS, '(e|es)'));\n\n // Match irregular participles that don't require adding a suffix.\n if (includes(irregularsIrregular, word)) {\n matches.push(word);\n }\n\n return matches;\n};\n\n/**\n * Creates an array of 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 const foundParticiples = [];\n\n forEach(words, function(word) {\n const regularParticiplesRegex = [/\\S+(é|ée|és|ées)($|[ \\n\\r\\t.,'()\"+\\-;!?:/»«‹›<>])/gi];\n if (\n matchRegularParticiples(word, regularParticiplesRegex).length !== 0 ||\n matchIrregularParticiples(word).length !== 0\n ) {\n foundParticiples.push(word);\n }\n });\n return foundParticiples;\n}\n"],"mappings":";;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AAGA,IAAAE,uBAAA,GAAAF,OAAA;AAFA,MAAM;EAACG,QAAQ;EAAEC;AAAuB,CAAC,GAAGC,yBAAkB;AAQ9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,+BAA+B,GAAG,SAAAA,CAASC,IAAI,EAAEC,UAAU,EAAEC,QAAQ,EAAE;EAC3E,MAAMC,OAAO,GAAG,EAAE;EAClB,IAAAC,eAAO,EAACH,UAAU,EAAE,UAASI,SAAS,EAAE;IACtC,MAAMC,yBAAyB,GAAG,IAAIC,MAAM,CAAC,GAAG,GAAGF,SAAS,GAAGH,QAAQ,GAAG,IAAI,EAAE,IAAI,CAAC;IACrF,MAAMM,eAAe,GAAGR,IAAI,CAACS,KAAK,CAACH,yBAAyB,CAAC;IAC7D,IAAIE,eAAe,EAAE;MACnBL,OAAO,CAACO,IAAI,CAACF,eAAe,CAAC,CAAC,CAAC,CAAC;IAClC;EACF,CAAC,CAAC;EACF,OAAOL,OAAO;AAChB,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA,MAAMQ,yBAAyB,GAAG,SAAAA,CAASX,IAAI,EAAE;EAC/C;EACA,IAAIG,OAAO,GAAG,EAAE,CAACS,MAAM,CAACb,+BAA+B,CAACC,IAAI,EAAEa,yCAAiB,EAAE,UAAU,CAAC,CAAC;EAC7FV,OAAO,GAAGA,OAAO,CAACS,MAAM,CAACb,+BAA+B,CAACC,IAAI,EAAEc,2CAAmB,EAAE,QAAQ,CAAC,CAAC;;EAE9F;EACA,IAAI,IAAAC,gBAAQ,EAACC,2CAAmB,EAAEhB,IAAI,CAAC,EAAE;IACvCG,OAAO,CAACO,IAAI,CAACV,IAAI,CAAC;EACpB;EAEA,OAAOG,OAAO;AAChB,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACe,SAASc,cAAcA,CAACC,UAAU,EAAE;EACjD,MAAMC,KAAK,GAAGvB,QAAQ,CAACsB,UAAU,CAAC;EAClC,MAAME,gBAAgB,GAAG,EAAE;EAE3B,IAAAhB,eAAO,EAACe,KAAK,EAAE,UAASnB,IAAI,EAAE;IAC5B,MAAMqB,uBAAuB,GAAG,CAAC,qDAAqD,CAAC;IACvF,IACExB,uBAAuB,CAACG,IAAI,EAAEqB,uBAAuB,CAAC,CAACC,MAAM,KAAK,CAAC,IACnEX,yBAAyB,CAACX,IAAI,CAAC,CAACsB,MAAM,KAAK,CAAC,EAC5C;MACAF,gBAAgB,CAACV,IAAI,CAACV,IAAI,CAAC;IAC7B;EACF,CAAC,CAAC;EACF,OAAOoB,gBAAgB;AACzB","ignoreList":[]}
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = stem;
7
- var _index = require("../../../index");
7
+ var _index = require("@axyseo/index");
8
8
  /* eslint-disable max-statements, complexity */
9
9
 
10
10
  const {
@@ -1 +1 @@
1
- {"version":3,"file":"stem.js","names":["_index","require","exceptionListHelpers","checkIfWordEndingIsOnExceptionList","regexHelpers","applyAllReplacements","languageProcessing","determineRs","word","rIntervalsData","rvIndex","search","RegExp","rvRegex1","rvRegex2","substring","rvRegex3","length","r1Regex","r1Index","r1","r2Index","processStandardSuffixes","standardSuffixData","a1Index","standardSuffixes1","a2Index","standardSuffixes2","a3Index","standardSuffixes3","a4Index","standardSuffixes4","a5Index","standardSuffixes5","a6Index","standardSuffixes6","a7Index","standardSuffixes7","a8Index","standardSuffixes8","a9Index","standardSuffixes9","a10Index","standardSuffixes10","a11Index","standardSuffixes11","a12Index","standardSuffixes12","a13Index","standardSuffixes13","a14Index","standardSuffixes14","a15Index","standardSuffixes15","a2Index2","suffixesPrecedingChar1","replace","slice","precedingCharacter2","suffixesPrecedingChar2","a6Index2","suffixesPrecedingChar4","precedingCharacter5","suffixesPrecedingChar5","precedingCharacter6","suffixesPrecedingChar6","precedingCharacter3","suffixesPrecedingChar3","a7Index2","suffixesPrecedingChar7","a7Index3","a11Index2","removeVerbSuffixesStartingWithI","originalWord","verbSuffixesWithIBeginning","step2aDone","toLowerCase","exceptions","b1Regex","suffixes","removeOtherVerbSuffixes","wordAfterStep1","morphologyData","otherVerbSuffixes","regularStemmer","suffixIons","i","regex","endsWith","verbSuffixOns","removeResidualSuffixes","morphologyDataRegularStemmer","residualSuffixes","residualSuffixes1","e1Index","residualSuffix2","residualSuffix3","e2Index","residualSuffixes4","residualSuffix5","residualSuffix6","checkWordInFullFormExceptions","paradigm","includes","canonicalizeStem","stemmedWord","stemsThatBelongToOneWord","adjectives","verbs","checkShortWordsExceptionList","shortWordsAndStems","wordStemPair","cannotTakeExtraSuffixS","canTakeExtraSuffixS","stem","wordAfterShortWordsCheck","ifException","exceptionStemsWithFullForms","pluralsWithXSuffix","sShouldNotBeStemmed","nonVerbsOnEnt","nonVerbsOnOns","preProcessingStepsRegexes","rIntervals","standardSuffixes","verbSuffixesStartingWithIRemoved","yEnding","yAndSoftCEndingAndReplacement","yEndingAndReplacement","softCEnding","softCEndingAndReplacement","finalConsonantUndoubling","unaccentE","unaccentERegex","canonicalStem"],"sources":["../../../../../../src/languageProcessing/languages/fr/helpers/internal/stem.js"],"sourcesContent":["/* eslint-disable max-statements, complexity */\nimport {languageProcessing} from '../../../index';\nconst {\n exceptionListHelpers: {checkIfWordEndingIsOnExceptionList},\n regexHelpers: {applyAllReplacements}\n} = languageProcessing;\n\n/*\n * MIT License\n *\n * Copyright (c) 2017 Bastien Botella\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\n/*\n * Author: Kasun Gajasinghe, University of Moratuwa\n * E-Mail: kasunbg AT gmail DOT com\n * Date: 09.08.2010\n *\n * LICENSE:\n *\n * Copyright (c) 2010, Kasun Gajasinghe. All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n *\n * 1. Redistributions of source code must retain the above copyright notice,\n * this list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation\n * and/or other materials provided with the distribution.\n *\n *\n * THIS SOFTWARE IS PROVIDED BY KASUN GAJASINGHE \"\"AS IS\"\" AND ANY EXPRESS OR IMPLIED WARRANTIES,\n * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A\n * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL KASUN GAJASINGHE BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR\n * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,\n * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE\n * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *\n */\n\n/**\n * Determines R1, R2 and RV.\n *\n * @param {string} word The word for which to determine the R regions.\n * @param {Object} rIntervalsData The regexes that cover French RV and R1 intervals.\n *\n * @returns {[number]} The R1, R2 and RV.\n */\nconst determineRs = function(word, rIntervalsData) {\n let rvIndex;\n\n if (\n word.search(new RegExp(rIntervalsData.rvRegex1)) !== -1 ||\n word.search(new RegExp(rIntervalsData.rvRegex2)) !== -1\n ) {\n rvIndex = 3;\n } else {\n rvIndex = word.substring(1).search(new RegExp(rIntervalsData.rvRegex3));\n if (rvIndex === -1) {\n rvIndex = word.length;\n } else {\n // +2 is to supplement the substring(1) used to find rvIndex\n rvIndex += 2;\n }\n }\n /*\n * R1 is the region after the first non-vowel following a vowel, or the end of the word if there is no such non-vowel.\n * R2 is the region after the first non-vowel following a vowel in R1, or the end of the word if there is no such non-vowel.\n */\n const r1Regex = new RegExp(rIntervalsData.r1Regex);\n let r1Index = word.search(r1Regex);\n let r1 = '';\n if (r1Index === -1) {\n r1Index = word.length;\n } else {\n r1Index += 2;\n r1 = word.substring(r1Index);\n }\n\n let r2Index = r1.search(r1Regex);\n if (r2Index === -1) {\n r2Index = word.length;\n } else {\n r2Index += 2;\n r2Index += r1Index;\n }\n\n if (r1Index !== -1 && r1Index < 3) {\n r1Index = 3;\n }\n\n return [r1Index, r2Index, rvIndex];\n};\n\n/**\n * Removes or normalizes standard suffixes.\n *\n * @param {string} word The word for which to remove suffixes.\n * @param {Object} standardSuffixData The French morphology data covering standard suffixes.\n * @param {number} r1Index The start index of R1.\n * @param {number} r2Index The start index of R2.\n * @param {number} rvIndex The start index of RV.\n *\n * @returns {string} The word with standard suffixes removed or normalized.\n */\nconst processStandardSuffixes = function(word, standardSuffixData, r1Index, r2Index, rvIndex) {\n const a1Index = word.search(new RegExp(standardSuffixData.standardSuffixes1));\n const a2Index = word.search(new RegExp(standardSuffixData.standardSuffixes2));\n const a3Index = word.search(new RegExp(standardSuffixData.standardSuffixes3[0]));\n const a4Index = word.search(new RegExp(standardSuffixData.standardSuffixes4[0]));\n const a5Index = word.search(new RegExp(standardSuffixData.standardSuffixes5[0]));\n const a6Index = word.search(new RegExp(standardSuffixData.standardSuffixes6));\n const a7Index = word.search(new RegExp(standardSuffixData.standardSuffixes7));\n const a8Index = word.search(new RegExp(standardSuffixData.standardSuffixes8));\n const a9Index = word.search(new RegExp(standardSuffixData.standardSuffixes9[0]));\n const a10Index = word.search(new RegExp(standardSuffixData.standardSuffixes10[0]));\n const a11Index = word.search(new RegExp(standardSuffixData.standardSuffixes11[0]));\n const a12Index = word.search(new RegExp(standardSuffixData.standardSuffixes12));\n const a13Index = word.search(new RegExp(standardSuffixData.standardSuffixes13[0]));\n const a14Index = word.search(new RegExp(standardSuffixData.standardSuffixes14[0]));\n const a15Index = word.search(new RegExp(standardSuffixData.standardSuffixes15));\n\n if (a1Index !== -1 && a1Index >= r2Index) {\n word = word.substring(0, a1Index);\n } else if (a2Index !== -1 && a2Index >= r2Index) {\n word = word.substring(0, a2Index);\n const a2Index2 = word.search(new RegExp(standardSuffixData.suffixesPrecedingChar1[0]));\n\n if (a2Index2 !== -1 && a2Index2 >= r2Index) {\n // If preceded by ic, delete if in R2\n word = word.substring(0, a2Index2);\n } else {\n // Else replace by iqU\n word = word.replace(\n new RegExp(standardSuffixData.suffixesPrecedingChar1[0]),\n standardSuffixData.suffixesPrecedingChar1[1]\n );\n }\n } else if (a3Index !== -1 && a3Index >= r2Index) {\n // Replace with log if in R2\n word = word.slice(0, a3Index) + standardSuffixData.standardSuffixes3[1];\n } else if (a4Index !== -1 && a4Index >= r2Index) {\n // Replace with u if in R2\n word = word.slice(0, a4Index) + standardSuffixData.standardSuffixes4[1];\n } else if (a5Index !== -1 && a5Index >= r2Index) {\n // Replace with ent if in R2\n word = word.slice(0, a5Index) + standardSuffixData.standardSuffixes5[1];\n } else if (a12Index !== -1 && a12Index >= r1Index) {\n // +1- amendment to non-vowel\n word = word.substring(0, a12Index + 1);\n } else if (a6Index !== -1 && a6Index >= rvIndex) {\n word = word.substring(0, a6Index);\n\n const precedingCharacter2 = word.search(\n new RegExp(standardSuffixData.suffixesPrecedingChar2[0])\n );\n const a6Index2 = word.search(new RegExp(standardSuffixData.suffixesPrecedingChar4[0]));\n const precedingCharacter5 = word.search(\n new RegExp(standardSuffixData.suffixesPrecedingChar5[0])\n );\n const precedingCharacter6 = word.search(\n new RegExp(standardSuffixData.suffixesPrecedingChar6[0])\n );\n if (precedingCharacter2 >= r2Index) {\n word = word.slice(0, precedingCharacter2) + standardSuffixData.suffixesPrecedingChar2[1];\n\n const precedingCharacter3 = word.search(\n new RegExp(standardSuffixData.suffixesPrecedingChar3[0])\n );\n if (precedingCharacter3 >= r2Index) {\n word = word.slice(0, precedingCharacter3) + standardSuffixData.suffixesPrecedingChar3[1];\n }\n } else if (word.search(new RegExp(standardSuffixData.suffixesPrecedingChar4[0])) !== -1) {\n if (a6Index2 >= r2Index) {\n word = word.substring(0, a6Index2);\n } else if (a6Index2 >= r1Index) {\n word = word.substring(0, a6Index2) + standardSuffixData.suffixesPrecedingChar4[1];\n }\n } else if (precedingCharacter5 >= r2Index) {\n // If preceded by abl or iqU, delete if in R2\n word = word.slice(0, precedingCharacter5) + standardSuffixData.suffixesPrecedingChar5[1];\n } else if (precedingCharacter6 >= rvIndex) {\n // If preceded by ièr, replace with i if in RV\n word = word.slice(0, precedingCharacter6) + standardSuffixData.suffixesPrecedingChar6[1];\n }\n } else if (a7Index !== -1 && a7Index >= r2Index) {\n // Delete if in R2\n word = word.substring(0, a7Index);\n\n const a7Index2 = word.search(new RegExp(standardSuffixData.suffixesPrecedingChar7[0]));\n const a7Index3 = word.search(new RegExp(standardSuffixData.suffixesPrecedingChar1[0]));\n if (a7Index2 !== -1) {\n // If preceded by abil, delete if in R2, else replace by abl, otherwise\n if (a7Index2 >= r2Index) {\n word = word.substring(0, a7Index2);\n } else {\n word = word.substring(0, a7Index2) + standardSuffixData.suffixesPrecedingChar7[1];\n }\n } else if (a7Index3 !== -1) {\n if (a7Index3 !== -1 && a7Index3 >= r2Index) {\n // If preceded by ic, delete if in R2\n word = word.substring(0, a7Index3);\n } else {\n // Else replace by iqU\n word = word.substring(0, a7Index3) + standardSuffixData.suffixesPrecedingChar1[1];\n }\n } else if (word.search(new RegExp(standardSuffixData.suffixesPrecedingChar2[0])) >= r2Index) {\n word = word.replace(\n new RegExp(standardSuffixData.suffixesPrecedingChar2[0]),\n standardSuffixData.suffixesPrecedingChar2[1]\n );\n }\n } else if (a8Index !== -1 && a8Index >= r2Index) {\n word = word.substring(0, a8Index);\n\n if (word.search(new RegExp(standardSuffixData.suffixesPrecedingChar3[0])) >= r2Index) {\n word = word.replace(\n new RegExp(standardSuffixData.suffixesPrecedingChar3[0]),\n standardSuffixData.suffixesPrecedingChar3[1]\n );\n\n if (word.search(new RegExp(standardSuffixData.suffixesPrecedingChar1[0])) >= r2Index) {\n word = word.replace(new RegExp(standardSuffixData.suffixesPrecedingChar1[0]), '');\n } else {\n word = word.replace(\n new RegExp(standardSuffixData.suffixesPrecedingChar1[0]),\n standardSuffixData.suffixesPrecedingChar1[1]\n );\n }\n }\n } else if (a9Index !== -1) {\n word = word.replace(\n new RegExp(standardSuffixData.standardSuffixes9[0]),\n standardSuffixData.standardSuffixes9[1]\n );\n } else if (a10Index >= r1Index) {\n word = word.replace(\n new RegExp(standardSuffixData.standardSuffixes10[0]),\n standardSuffixData.standardSuffixes10[1]\n );\n } else if (a11Index !== -1) {\n const a11Index2 = word.search(new RegExp(standardSuffixData.standardSuffixes11[0]));\n\n if (a11Index2 >= r2Index) {\n word = word.substring(0, a11Index2);\n } else if (a11Index2 >= r1Index) {\n word = word.substring(0, a11Index2) + standardSuffixData.standardSuffixes11[1];\n }\n } else if (a13Index !== -1 && a13Index >= rvIndex) {\n word = word.replace(\n new RegExp(standardSuffixData.standardSuffixes13[0]),\n standardSuffixData.standardSuffixes13[1]\n );\n } else if (a14Index !== -1 && a14Index >= rvIndex) {\n word = word.replace(\n new RegExp(standardSuffixData.standardSuffixes14[0]),\n standardSuffixData.standardSuffixes14[1]\n );\n } else if (a15Index !== -1 && a15Index >= rvIndex) {\n word = word.substring(0, a15Index + 1);\n }\n\n return word;\n};\n\n/**\n * Removes verb suffixes starting with i.\n *\n * @param {string} word The word for which to remove suffixes.\n * @param {string} originalWord The unprocessed word.\n * @param {number} rvIndex The start index of RV.\n * @param {string} verbSuffixesWithIBeginning Data for checking French suffixes starting with I.\n *\n * @returns {{step2aDone: boolean, word: string}} The word and information about whether the conditions for step 2a were met.\n */\nconst removeVerbSuffixesStartingWithI = function(\n word,\n originalWord,\n rvIndex,\n verbSuffixesWithIBeginning\n) {\n let step2aDone = false;\n if (\n originalWord === word.toLowerCase() ||\n checkIfWordEndingIsOnExceptionList(originalWord, verbSuffixesWithIBeginning.exceptions)\n ) {\n step2aDone = true;\n\n const b1Regex = new RegExp(verbSuffixesWithIBeginning.suffixes[0]);\n if (word.search(b1Regex) >= rvIndex) {\n word = word.replace(b1Regex, verbSuffixesWithIBeginning.suffixes[1]);\n }\n }\n\n return {word, step2aDone};\n};\n\n/**\n * Removes other verb suffixes.\n *\n * @param {string} word The word for which to remove suffixes.\n * @param {boolean} step2aDone Whether step 2a was done.\n * @param {string} wordAfterStep1 The word after step 1 was done.\n * @param {number} r2Index The start index of R2.\n * @param {number} rvIndex The start index of RV.\n * @param {Object} morphologyData The French morphology data.\n *\n * @returns {string} The word after other verb suffixes were removed.\n */\nconst removeOtherVerbSuffixes = function(\n word,\n step2aDone,\n wordAfterStep1,\n r2Index,\n rvIndex,\n morphologyData\n) {\n const otherVerbSuffixes = morphologyData.regularStemmer.otherVerbSuffixes;\n\n if (step2aDone && wordAfterStep1 === word) {\n const suffixIons = new RegExp(otherVerbSuffixes[0]);\n if (word.search(suffixIons) >= r2Index) {\n return word.replace(suffixIons, '');\n }\n\n for (let i = 1; i < otherVerbSuffixes.length; i++) {\n const regex = new RegExp(otherVerbSuffixes[i]);\n if (word.search(regex) >= rvIndex) {\n return word.replace(regex, '');\n }\n }\n // Check if a word ends in \"ons\" preceded by \"i\", if it is \"ons\" is not stemmed.\n if (word.endsWith('ions')) {\n return word;\n }\n\n // Check if a word ends in \"ons\" preceded by other than \"i\" and stem it if it is in RV.\n const verbSuffixOns = new RegExp(morphologyData.regularStemmer.verbSuffixOns);\n if (word.search(verbSuffixOns) >= rvIndex) {\n word = word.replace(verbSuffixOns, '');\n }\n }\n\n return word;\n};\n\n/**\n * Removes residual suffixes.\n *\n * @param {string} word The word for which to remove residual suffixes.\n * @param {number} rvIndex The start index of RV.\n * @param {number} r2Index The start index of R2.\n * @param {Object} morphologyDataRegularStemmer The French morphology data.\n *\n * @returns {string} The word after residual suffixes were removed.\n */\nconst removeResidualSuffixes = function(word, rvIndex, r2Index, morphologyDataRegularStemmer) {\n const residualSuffixes = morphologyDataRegularStemmer.residualSuffixes;\n if (word.search(new RegExp(residualSuffixes.residualSuffixes1[0])) >= rvIndex) {\n word = word.replace(\n new RegExp(residualSuffixes.residualSuffixes1[0]),\n residualSuffixes.residualSuffixes1[1]\n );\n }\n\n const e1Index = word.search(new RegExp(residualSuffixes.residualSuffix2));\n\n if (e1Index >= r2Index && word.search(new RegExp(residualSuffixes.residualSuffix3)) >= rvIndex) {\n word = word.substring(0, e1Index);\n } else {\n let e2Index = word.search(new RegExp(residualSuffixes.residualSuffixes4[0]));\n\n if (e2Index >= rvIndex) {\n word = word.substring(0, e2Index) + residualSuffixes.residualSuffixes4[1];\n } else {\n e2Index = word.search(new RegExp(residualSuffixes.residualSuffix5));\n if (e2Index >= rvIndex) {\n // Delete last e.\n word = word.substring(0, e2Index);\n } else {\n e2Index = word.search(new RegExp(residualSuffixes.residualSuffix6[0]));\n if (e2Index >= rvIndex) {\n word = word.substring(0, e2Index) + residualSuffixes.residualSuffix6[1];\n }\n }\n }\n }\n\n return word;\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 * Check whether the stem is on the exception list of stems that belong to one word. If it is, returns the canonical stem.\n *\n * @param {string}\tstemmedWord\t\t\t\t\tThe stemmed word.\n * @param {Object}\tstemsThatBelongToOneWord\tThe list of stems that belong to one word.\n *\n * @returns {null|string}\tThe canonical stem if word was found on the list.\n */\nconst canonicalizeStem = function(stemmedWord, stemsThatBelongToOneWord) {\n // Check the adjectives list.\n for (const paradigm of stemsThatBelongToOneWord.adjectives) {\n if (paradigm.includes(stemmedWord)) {\n return paradigm[0];\n }\n }\n // Check the verbs list. The infinitive stem is always the canonical stem for verbs.\n for (const paradigm of stemsThatBelongToOneWord.verbs) {\n if (paradigm.includes(stemmedWord)) {\n return paradigm[0];\n }\n }\n};\n\n/**\n * Checks whether the word is on the list of words which should be stemmed, even though the suffix would not be found in the\n * required region. If the word is found on the list, the stem specified in that list is returned.\n *\n * @param {string}\tword\t\t\t\tThe word to check.\n * @param {Object}\tshortWordsAndStems\tThe list to check.\n *\n * @returns {null|string} The stem or null if the word was not found on the list.\n */\nconst checkShortWordsExceptionList = function(word, shortWordsAndStems) {\n // First check whether the word is on the sub-list of words that cannot take an extra -s suffix.\n for (const wordStemPair of shortWordsAndStems.cannotTakeExtraSuffixS) {\n if (wordStemPair[0] === word) {\n return wordStemPair[1];\n }\n }\n // If the word was not found on the first sub-list, check the second sub-list of words that can take an extra -s suffix.\n if (word.endsWith('s')) {\n word = word.slice(0, -1);\n }\n for (const wordStemPair of shortWordsAndStems.canTakeExtraSuffixS) {\n if (wordStemPair[0] === word) {\n return wordStemPair[1];\n }\n }\n};\n\n/**\n * Stems French words.\n *\n * @param {string} word The word to stem.\n * @param {Object} morphologyData The French morphology data.\n *\n * @returns {string} The stemmed word.\n */\nexport default function stem(word, morphologyData) {\n word = word.toLowerCase();\n const originalWord = word;\n\n // Check if the word is on an exception list of words that should be stemmed even though the suffix is not in the required region.\n const wordAfterShortWordsCheck = checkShortWordsExceptionList(\n word,\n morphologyData.shortWordsAndStems\n );\n if (wordAfterShortWordsCheck) {\n return wordAfterShortWordsCheck;\n }\n\n // Check if the word is on an exception list for which all forms of a word and its stem are listed.\n const ifException = checkWordInFullFormExceptions(\n word,\n morphologyData.exceptionStemsWithFullForms\n );\n if (ifException) {\n return ifException;\n }\n\n // Check the exception list of words with plural suffix -x.\n if (word.endsWith('x')) {\n const pluralsWithXSuffix = morphologyData.pluralsWithXSuffix;\n if (pluralsWithXSuffix.includes(word)) {\n return word.slice(0, -1);\n }\n }\n\n // Check if the word is on the exception list of words for which -s should not be stemmed.\n if (word.endsWith('s')) {\n const sShouldNotBeStemmed = morphologyData.sShouldNotBeStemmed;\n if (sShouldNotBeStemmed.includes(word)) {\n return word;\n }\n }\n\n // Check if the word is on the exception list of words for which -ent should not be stemmed.\n const nonVerbsOnEnt = morphologyData.nonVerbsOnEnt;\n if (word.endsWith('ent')) {\n if (nonVerbsOnEnt.includes(word)) {\n return word;\n }\n }\n if (word.endsWith('ents')) {\n if (nonVerbsOnEnt.includes(word.slice(0, -1))) {\n return word.slice(0, -1);\n }\n }\n\n // Check if word is on the exception list of nouns and adjectives for which the verb suffix -ons should not be stemmed.\n const nonVerbsOnOns = morphologyData.nonVerbsOnOns;\n if (word.endsWith('ons')) {\n if (nonVerbsOnOns.includes(word)) {\n return word.slice(0, -1);\n }\n }\n\n // Pre-processing steps\n word = applyAllReplacements(word, morphologyData.regularStemmer.preProcessingStepsRegexes);\n\n // Determine R1, R2 & RV regions.\n const [r1Index, r2Index, rvIndex] = determineRs(word, morphologyData.regularStemmer.rIntervals);\n\n /*\n * Step 1:\n * Remove standard suffixes\n */\n word = processStandardSuffixes(\n word,\n morphologyData.regularStemmer.standardSuffixes,\n r1Index,\n r2Index,\n rvIndex\n );\n const wordAfterStep1 = word;\n\n /*\n * Step 2a:\n * Stem verb suffixes beginning with \"i\"\n */\n const verbSuffixesStartingWithIRemoved = removeVerbSuffixesStartingWithI(\n word,\n originalWord,\n rvIndex,\n morphologyData.regularStemmer.verbSuffixesWithIBeginning\n );\n word = verbSuffixesStartingWithIRemoved.word;\n const step2aDone = verbSuffixesStartingWithIRemoved.step2aDone;\n\n /*\n * Step 2b:\n * Stem other verb suffixes\n */\n if (!nonVerbsOnEnt.includes(word)) {\n word = removeOtherVerbSuffixes(\n word,\n step2aDone,\n wordAfterStep1,\n r2Index,\n rvIndex,\n morphologyData\n );\n }\n\n if (originalWord === word.toLowerCase()) {\n /* Step 4:\n * Stem residual suffixes.\n */\n word = removeResidualSuffixes(word, rvIndex, r2Index, morphologyData.regularStemmer);\n } else {\n /*\n * Step 3 (only needs to be executed if step 4 isn't executed)\n * Replace final Y with i or final ç with c.\n */\n const yEnding =\n morphologyData.regularStemmer.yAndSoftCEndingAndReplacement.yEndingAndReplacement;\n const softCEnding =\n morphologyData.regularStemmer.yAndSoftCEndingAndReplacement.softCEndingAndReplacement;\n if (word.endsWith(yEnding[0])) {\n word = word.slice(0, -1) + yEnding[1];\n } else if (word.endsWith(softCEnding[0])) {\n word = word.slice(0, -1) + softCEnding[1];\n }\n }\n\n /* Step 5:\n * Undouble final consonants\n */\n word = applyAllReplacements(word, morphologyData.regularStemmer.finalConsonantUndoubling);\n\n /* Step 6:\n * Un-accent\n */\n const unaccentE = morphologyData.regularStemmer.unaccentERegex;\n word = word.replace(new RegExp(unaccentE[0]), unaccentE[1]);\n word = word.toLowerCase();\n\n const canonicalStem = canonicalizeStem(word, morphologyData.stemsThatBelongToOneWord);\n if (canonicalStem) {\n return canonicalStem;\n }\n\n return word;\n}\n"],"mappings":";;;;;;AACA,IAAAA,MAAA,GAAAC,OAAA;AADA;;AAEA,MAAM;EACJC,oBAAoB,EAAE;IAACC;EAAkC,CAAC;EAC1DC,YAAY,EAAE;IAACC;EAAoB;AACrC,CAAC,GAAGC,yBAAkB;;AAEtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,WAAW,GAAG,SAAAA,CAASC,IAAI,EAAEC,cAAc,EAAE;EACjD,IAAIC,OAAO;EAEX,IACEF,IAAI,CAACG,MAAM,CAAC,IAAIC,MAAM,CAACH,cAAc,CAACI,QAAQ,CAAC,CAAC,KAAK,CAAC,CAAC,IACvDL,IAAI,CAACG,MAAM,CAAC,IAAIC,MAAM,CAACH,cAAc,CAACK,QAAQ,CAAC,CAAC,KAAK,CAAC,CAAC,EACvD;IACAJ,OAAO,GAAG,CAAC;EACb,CAAC,MAAM;IACLA,OAAO,GAAGF,IAAI,CAACO,SAAS,CAAC,CAAC,CAAC,CAACJ,MAAM,CAAC,IAAIC,MAAM,CAACH,cAAc,CAACO,QAAQ,CAAC,CAAC;IACvE,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A,IAAI,CAACiD,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAGwE,WAAW,CAAC,CAAC,CAAC;IAC3C;EACF;;EAEA;AACF;AACA;EACEzH,IAAI,GAAGH,oBAAoB,CAACG,IAAI,EAAE0E,cAAc,CAACE,cAAc,CAAC+C,wBAAwB,CAAC;;EAEzF;AACF;AACA;EACE,MAAMC,SAAS,GAAGlD,cAAc,CAACE,cAAc,CAACiD,cAAc;EAC9D7H,IAAI,GAAGA,IAAI,CAACgD,OAAO,CAAC,IAAI5C,MAAM,CAACwH,SAAS,CAAC,CAAC,CAAC,CAAC,EAAEA,SAAS,CAAC,CAAC,CAAC,CAAC;EAC3D5H,IAAI,GAAGA,IAAI,CAACoE,WAAW,CAAC,CAAC;EAEzB,MAAM0D,aAAa,GAAG9B,gBAAgB,CAAChG,IAAI,EAAE0E,cAAc,CAACwB,wBAAwB,CAAC;EACrF,IAAI4B,aAAa,EAAE;IACjB,OAAOA,aAAa;EACtB;EAEA,OAAO9H,IAAI;AACb","ignoreList":[]}
1
+ {"version":3,"file":"stem.js","names":["_index","require","exceptionListHelpers","checkIfWordEndingIsOnExceptionList","regexHelpers","applyAllReplacements","languageProcessing","determineRs","word","rIntervalsData","rvIndex","search","RegExp","rvRegex1","rvRegex2","substring","rvRegex3","length","r1Regex","r1Index","r1","r2Index","processStandardSuffixes","standardSuffixData","a1Index","standardSuffixes1","a2Index","standardSuffixes2","a3Index","standardSuffixes3","a4Index","standardSuffixes4","a5Index","standardSuffixes5","a6Index","standardSuffixes6","a7Index","standardSuffixes7","a8Index","standardSuffixes8","a9Index","standardSuffixes9","a10Index","standardSuffixes10","a11Index","standardSuffixes11","a12Index","standardSuffixes12","a13Index","standardSuffixes13","a14Index","standardSuffixes14","a15Index","standardSuffixes15","a2Index2","suffixesPrecedingChar1","replace","slice","precedingCharacter2","suffixesPrecedingChar2","a6Index2","suffixesPrecedingChar4","precedingCharacter5","suffixesPrecedingChar5","precedingCharacter6","suffixesPrecedingChar6","precedingCharacter3","suffixesPrecedingChar3","a7Index2","suffixesPrecedingChar7","a7Index3","a11Index2","removeVerbSuffixesStartingWithI","originalWord","verbSuffixesWithIBeginning","step2aDone","toLowerCase","exceptions","b1Regex","suffixes","removeOtherVerbSuffixes","wordAfterStep1","morphologyData","otherVerbSuffixes","regularStemmer","suffixIons","i","regex","endsWith","verbSuffixOns","removeResidualSuffixes","morphologyDataRegularStemmer","residualSuffixes","residualSuffixes1","e1Index","residualSuffix2","residualSuffix3","e2Index","residualSuffixes4","residualSuffix5","residualSuffix6","checkWordInFullFormExceptions","paradigm","includes","canonicalizeStem","stemmedWord","stemsThatBelongToOneWord","adjectives","verbs","checkShortWordsExceptionList","shortWordsAndStems","wordStemPair","cannotTakeExtraSuffixS","canTakeExtraSuffixS","stem","wordAfterShortWordsCheck","ifException","exceptionStemsWithFullForms","pluralsWithXSuffix","sShouldNotBeStemmed","nonVerbsOnEnt","nonVerbsOnOns","preProcessingStepsRegexes","rIntervals","standardSuffixes","verbSuffixesStartingWithIRemoved","yEnding","yAndSoftCEndingAndReplacement","yEndingAndReplacement","softCEnding","softCEndingAndReplacement","finalConsonantUndoubling","unaccentE","unaccentERegex","canonicalStem"],"sources":["../../../../../../src/languageProcessing/languages/fr/helpers/internal/stem.js"],"sourcesContent":["/* eslint-disable max-statements, complexity */\nimport {languageProcessing} from '@axyseo/index';\nconst {\n exceptionListHelpers: {checkIfWordEndingIsOnExceptionList},\n regexHelpers: {applyAllReplacements}\n} = languageProcessing;\n\n/*\n * MIT License\n *\n * Copyright (c) 2017 Bastien Botella\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\n/*\n * Author: Kasun Gajasinghe, University of Moratuwa\n * E-Mail: kasunbg AT gmail DOT com\n * Date: 09.08.2010\n *\n * LICENSE:\n *\n * Copyright (c) 2010, Kasun Gajasinghe. All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n *\n * 1. Redistributions of source code must retain the above copyright notice,\n * this list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation\n * and/or other materials provided with the distribution.\n *\n *\n * THIS SOFTWARE IS PROVIDED BY KASUN GAJASINGHE \"\"AS IS\"\" AND ANY EXPRESS OR IMPLIED WARRANTIES,\n * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A\n * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL KASUN GAJASINGHE BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR\n * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,\n * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE\n * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *\n */\n\n/**\n * Determines R1, R2 and RV.\n *\n * @param {string} word The word for which to determine the R regions.\n * @param {Object} rIntervalsData The regexes that cover French RV and R1 intervals.\n *\n * @returns {[number]} The R1, R2 and RV.\n */\nconst determineRs = function(word, rIntervalsData) {\n let rvIndex;\n\n if (\n word.search(new RegExp(rIntervalsData.rvRegex1)) !== -1 ||\n word.search(new RegExp(rIntervalsData.rvRegex2)) !== -1\n ) {\n rvIndex = 3;\n } else {\n rvIndex = word.substring(1).search(new RegExp(rIntervalsData.rvRegex3));\n if (rvIndex === -1) {\n rvIndex = word.length;\n } else {\n // +2 is to supplement the substring(1) used to find rvIndex\n rvIndex += 2;\n }\n }\n /*\n * R1 is the region after the first non-vowel following a vowel, or the end of the word if there is no such non-vowel.\n * R2 is the region after the first non-vowel following a vowel in R1, or the end of the word if there is no such non-vowel.\n */\n const r1Regex = new RegExp(rIntervalsData.r1Regex);\n let r1Index = word.search(r1Regex);\n let r1 = '';\n if (r1Index === -1) {\n r1Index = word.length;\n } else {\n r1Index += 2;\n r1 = word.substring(r1Index);\n }\n\n let r2Index = r1.search(r1Regex);\n if (r2Index === -1) {\n r2Index = word.length;\n } else {\n r2Index += 2;\n r2Index += r1Index;\n }\n\n if (r1Index !== -1 && r1Index < 3) {\n r1Index = 3;\n }\n\n return [r1Index, r2Index, rvIndex];\n};\n\n/**\n * Removes or normalizes standard suffixes.\n *\n * @param {string} word The word for which to remove suffixes.\n * @param {Object} standardSuffixData The French morphology data covering standard suffixes.\n * @param {number} r1Index The start index of R1.\n * @param {number} r2Index The start index of R2.\n * @param {number} rvIndex The start index of RV.\n *\n * @returns {string} The word with standard suffixes removed or normalized.\n */\nconst processStandardSuffixes = function(word, standardSuffixData, r1Index, r2Index, rvIndex) {\n const a1Index = word.search(new RegExp(standardSuffixData.standardSuffixes1));\n const a2Index = word.search(new RegExp(standardSuffixData.standardSuffixes2));\n const a3Index = word.search(new RegExp(standardSuffixData.standardSuffixes3[0]));\n const a4Index = word.search(new RegExp(standardSuffixData.standardSuffixes4[0]));\n const a5Index = word.search(new RegExp(standardSuffixData.standardSuffixes5[0]));\n const a6Index = word.search(new RegExp(standardSuffixData.standardSuffixes6));\n const a7Index = word.search(new RegExp(standardSuffixData.standardSuffixes7));\n const a8Index = word.search(new RegExp(standardSuffixData.standardSuffixes8));\n const a9Index = word.search(new RegExp(standardSuffixData.standardSuffixes9[0]));\n const a10Index = word.search(new RegExp(standardSuffixData.standardSuffixes10[0]));\n const a11Index = word.search(new RegExp(standardSuffixData.standardSuffixes11[0]));\n const a12Index = word.search(new RegExp(standardSuffixData.standardSuffixes12));\n const a13Index = word.search(new RegExp(standardSuffixData.standardSuffixes13[0]));\n const a14Index = word.search(new RegExp(standardSuffixData.standardSuffixes14[0]));\n const a15Index = word.search(new RegExp(standardSuffixData.standardSuffixes15));\n\n if (a1Index !== -1 && a1Index >= r2Index) {\n word = word.substring(0, a1Index);\n } else if (a2Index !== -1 && a2Index >= r2Index) {\n word = word.substring(0, a2Index);\n const a2Index2 = word.search(new RegExp(standardSuffixData.suffixesPrecedingChar1[0]));\n\n if (a2Index2 !== -1 && a2Index2 >= r2Index) {\n // If preceded by ic, delete if in R2\n word = word.substring(0, a2Index2);\n } else {\n // Else replace by iqU\n word = word.replace(\n new RegExp(standardSuffixData.suffixesPrecedingChar1[0]),\n standardSuffixData.suffixesPrecedingChar1[1]\n );\n }\n } else if (a3Index !== -1 && a3Index >= r2Index) {\n // Replace with log if in R2\n word = word.slice(0, a3Index) + standardSuffixData.standardSuffixes3[1];\n } else if (a4Index !== -1 && a4Index >= r2Index) {\n // Replace with u if in R2\n word = word.slice(0, a4Index) + standardSuffixData.standardSuffixes4[1];\n } else if (a5Index !== -1 && a5Index >= r2Index) {\n // Replace with ent if in R2\n word = word.slice(0, a5Index) + standardSuffixData.standardSuffixes5[1];\n } else if (a12Index !== -1 && a12Index >= r1Index) {\n // +1- amendment to non-vowel\n word = word.substring(0, a12Index + 1);\n } else if (a6Index !== -1 && a6Index >= rvIndex) {\n word = word.substring(0, a6Index);\n\n const precedingCharacter2 = word.search(\n new RegExp(standardSuffixData.suffixesPrecedingChar2[0])\n );\n const a6Index2 = word.search(new RegExp(standardSuffixData.suffixesPrecedingChar4[0]));\n const precedingCharacter5 = word.search(\n new RegExp(standardSuffixData.suffixesPrecedingChar5[0])\n );\n const precedingCharacter6 = word.search(\n new RegExp(standardSuffixData.suffixesPrecedingChar6[0])\n );\n if (precedingCharacter2 >= r2Index) {\n word = word.slice(0, precedingCharacter2) + standardSuffixData.suffixesPrecedingChar2[1];\n\n const precedingCharacter3 = word.search(\n new RegExp(standardSuffixData.suffixesPrecedingChar3[0])\n );\n if (precedingCharacter3 >= r2Index) {\n word = word.slice(0, precedingCharacter3) + standardSuffixData.suffixesPrecedingChar3[1];\n }\n } else if (word.search(new RegExp(standardSuffixData.suffixesPrecedingChar4[0])) !== -1) {\n if (a6Index2 >= r2Index) {\n word = word.substring(0, a6Index2);\n } else if (a6Index2 >= r1Index) {\n word = word.substring(0, a6Index2) + standardSuffixData.suffixesPrecedingChar4[1];\n }\n } else if (precedingCharacter5 >= r2Index) {\n // If preceded by abl or iqU, delete if in R2\n word = word.slice(0, precedingCharacter5) + standardSuffixData.suffixesPrecedingChar5[1];\n } else if (precedingCharacter6 >= rvIndex) {\n // If preceded by ièr, replace with i if in RV\n word = word.slice(0, precedingCharacter6) + standardSuffixData.suffixesPrecedingChar6[1];\n }\n } else if (a7Index !== -1 && a7Index >= r2Index) {\n // Delete if in R2\n word = word.substring(0, a7Index);\n\n const a7Index2 = word.search(new RegExp(standardSuffixData.suffixesPrecedingChar7[0]));\n const a7Index3 = word.search(new RegExp(standardSuffixData.suffixesPrecedingChar1[0]));\n if (a7Index2 !== -1) {\n // If preceded by abil, delete if in R2, else replace by abl, otherwise\n if (a7Index2 >= r2Index) {\n word = word.substring(0, a7Index2);\n } else {\n word = word.substring(0, a7Index2) + standardSuffixData.suffixesPrecedingChar7[1];\n }\n } else if (a7Index3 !== -1) {\n if (a7Index3 !== -1 && a7Index3 >= r2Index) {\n // If preceded by ic, delete if in R2\n word = word.substring(0, a7Index3);\n } else {\n // Else replace by iqU\n word = word.substring(0, a7Index3) + standardSuffixData.suffixesPrecedingChar1[1];\n }\n } else if (word.search(new RegExp(standardSuffixData.suffixesPrecedingChar2[0])) >= r2Index) {\n word = word.replace(\n new RegExp(standardSuffixData.suffixesPrecedingChar2[0]),\n standardSuffixData.suffixesPrecedingChar2[1]\n );\n }\n } else if (a8Index !== -1 && a8Index >= r2Index) {\n word = word.substring(0, a8Index);\n\n if (word.search(new RegExp(standardSuffixData.suffixesPrecedingChar3[0])) >= r2Index) {\n word = word.replace(\n new RegExp(standardSuffixData.suffixesPrecedingChar3[0]),\n standardSuffixData.suffixesPrecedingChar3[1]\n );\n\n if (word.search(new RegExp(standardSuffixData.suffixesPrecedingChar1[0])) >= r2Index) {\n word = word.replace(new RegExp(standardSuffixData.suffixesPrecedingChar1[0]), '');\n } else {\n word = word.replace(\n new RegExp(standardSuffixData.suffixesPrecedingChar1[0]),\n standardSuffixData.suffixesPrecedingChar1[1]\n );\n }\n }\n } else if (a9Index !== -1) {\n word = word.replace(\n new RegExp(standardSuffixData.standardSuffixes9[0]),\n standardSuffixData.standardSuffixes9[1]\n );\n } else if (a10Index >= r1Index) {\n word = word.replace(\n new RegExp(standardSuffixData.standardSuffixes10[0]),\n standardSuffixData.standardSuffixes10[1]\n );\n } else if (a11Index !== -1) {\n const a11Index2 = word.search(new RegExp(standardSuffixData.standardSuffixes11[0]));\n\n if (a11Index2 >= r2Index) {\n word = word.substring(0, a11Index2);\n } else if (a11Index2 >= r1Index) {\n word = word.substring(0, a11Index2) + standardSuffixData.standardSuffixes11[1];\n }\n } else if (a13Index !== -1 && a13Index >= rvIndex) {\n word = word.replace(\n new RegExp(standardSuffixData.standardSuffixes13[0]),\n standardSuffixData.standardSuffixes13[1]\n );\n } else if (a14Index !== -1 && a14Index >= rvIndex) {\n word = word.replace(\n new RegExp(standardSuffixData.standardSuffixes14[0]),\n standardSuffixData.standardSuffixes14[1]\n );\n } else if (a15Index !== -1 && a15Index >= rvIndex) {\n word = word.substring(0, a15Index + 1);\n }\n\n return word;\n};\n\n/**\n * Removes verb suffixes starting with i.\n *\n * @param {string} word The word for which to remove suffixes.\n * @param {string} originalWord The unprocessed word.\n * @param {number} rvIndex The start index of RV.\n * @param {string} verbSuffixesWithIBeginning Data for checking French suffixes starting with I.\n *\n * @returns {{step2aDone: boolean, word: string}} The word and information about whether the conditions for step 2a were met.\n */\nconst removeVerbSuffixesStartingWithI = function(\n word,\n originalWord,\n rvIndex,\n verbSuffixesWithIBeginning\n) {\n let step2aDone = false;\n if (\n originalWord === word.toLowerCase() ||\n checkIfWordEndingIsOnExceptionList(originalWord, verbSuffixesWithIBeginning.exceptions)\n ) {\n step2aDone = true;\n\n const b1Regex = new RegExp(verbSuffixesWithIBeginning.suffixes[0]);\n if (word.search(b1Regex) >= rvIndex) {\n word = word.replace(b1Regex, verbSuffixesWithIBeginning.suffixes[1]);\n }\n }\n\n return {word, step2aDone};\n};\n\n/**\n * Removes other verb suffixes.\n *\n * @param {string} word The word for which to remove suffixes.\n * @param {boolean} step2aDone Whether step 2a was done.\n * @param {string} wordAfterStep1 The word after step 1 was done.\n * @param {number} r2Index The start index of R2.\n * @param {number} rvIndex The start index of RV.\n * @param {Object} morphologyData The French morphology data.\n *\n * @returns {string} The word after other verb suffixes were removed.\n */\nconst removeOtherVerbSuffixes = function(\n word,\n step2aDone,\n wordAfterStep1,\n r2Index,\n rvIndex,\n morphologyData\n) {\n const otherVerbSuffixes = morphologyData.regularStemmer.otherVerbSuffixes;\n\n if (step2aDone && wordAfterStep1 === word) {\n const suffixIons = new RegExp(otherVerbSuffixes[0]);\n if (word.search(suffixIons) >= r2Index) {\n return word.replace(suffixIons, '');\n }\n\n for (let i = 1; i < otherVerbSuffixes.length; i++) {\n const regex = new RegExp(otherVerbSuffixes[i]);\n if (word.search(regex) >= rvIndex) {\n return word.replace(regex, '');\n }\n }\n // Check if a word ends in \"ons\" preceded by \"i\", if it is \"ons\" is not stemmed.\n if (word.endsWith('ions')) {\n return word;\n }\n\n // Check if a word ends in \"ons\" preceded by other than \"i\" and stem it if it is in RV.\n const verbSuffixOns = new RegExp(morphologyData.regularStemmer.verbSuffixOns);\n if (word.search(verbSuffixOns) >= rvIndex) {\n word = word.replace(verbSuffixOns, '');\n }\n }\n\n return word;\n};\n\n/**\n * Removes residual suffixes.\n *\n * @param {string} word The word for which to remove residual suffixes.\n * @param {number} rvIndex The start index of RV.\n * @param {number} r2Index The start index of R2.\n * @param {Object} morphologyDataRegularStemmer The French morphology data.\n *\n * @returns {string} The word after residual suffixes were removed.\n */\nconst removeResidualSuffixes = function(word, rvIndex, r2Index, morphologyDataRegularStemmer) {\n const residualSuffixes = morphologyDataRegularStemmer.residualSuffixes;\n if (word.search(new RegExp(residualSuffixes.residualSuffixes1[0])) >= rvIndex) {\n word = word.replace(\n new RegExp(residualSuffixes.residualSuffixes1[0]),\n residualSuffixes.residualSuffixes1[1]\n );\n }\n\n const e1Index = word.search(new RegExp(residualSuffixes.residualSuffix2));\n\n if (e1Index >= r2Index && word.search(new RegExp(residualSuffixes.residualSuffix3)) >= rvIndex) {\n word = word.substring(0, e1Index);\n } else {\n let e2Index = word.search(new RegExp(residualSuffixes.residualSuffixes4[0]));\n\n if (e2Index >= rvIndex) {\n word = word.substring(0, e2Index) + residualSuffixes.residualSuffixes4[1];\n } else {\n e2Index = word.search(new RegExp(residualSuffixes.residualSuffix5));\n if (e2Index >= rvIndex) {\n // Delete last e.\n word = word.substring(0, e2Index);\n } else {\n e2Index = word.search(new RegExp(residualSuffixes.residualSuffix6[0]));\n if (e2Index >= rvIndex) {\n word = word.substring(0, e2Index) + residualSuffixes.residualSuffix6[1];\n }\n }\n }\n }\n\n return word;\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 * Check whether the stem is on the exception list of stems that belong to one word. If it is, returns the canonical stem.\n *\n * @param {string}\tstemmedWord\t\t\t\t\tThe stemmed word.\n * @param {Object}\tstemsThatBelongToOneWord\tThe list of stems that belong to one word.\n *\n * @returns {null|string}\tThe canonical stem if word was found on the list.\n */\nconst canonicalizeStem = function(stemmedWord, stemsThatBelongToOneWord) {\n // Check the adjectives list.\n for (const paradigm of stemsThatBelongToOneWord.adjectives) {\n if (paradigm.includes(stemmedWord)) {\n return paradigm[0];\n }\n }\n // Check the verbs list. The infinitive stem is always the canonical stem for verbs.\n for (const paradigm of stemsThatBelongToOneWord.verbs) {\n if (paradigm.includes(stemmedWord)) {\n return paradigm[0];\n }\n }\n};\n\n/**\n * Checks whether the word is on the list of words which should be stemmed, even though the suffix would not be found in the\n * required region. If the word is found on the list, the stem specified in that list is returned.\n *\n * @param {string}\tword\t\t\t\tThe word to check.\n * @param {Object}\tshortWordsAndStems\tThe list to check.\n *\n * @returns {null|string} The stem or null if the word was not found on the list.\n */\nconst checkShortWordsExceptionList = function(word, shortWordsAndStems) {\n // First check whether the word is on the sub-list of words that cannot take an extra -s suffix.\n for (const wordStemPair of shortWordsAndStems.cannotTakeExtraSuffixS) {\n if (wordStemPair[0] === word) {\n return wordStemPair[1];\n }\n }\n // If the word was not found on the first sub-list, check the second sub-list of words that can take an extra -s suffix.\n if (word.endsWith('s')) {\n word = word.slice(0, -1);\n }\n for (const wordStemPair of shortWordsAndStems.canTakeExtraSuffixS) {\n if (wordStemPair[0] === word) {\n return wordStemPair[1];\n }\n }\n};\n\n/**\n * Stems French words.\n *\n * @param {string} word The word to stem.\n * @param {Object} morphologyData The French morphology data.\n *\n * @returns {string} The stemmed word.\n */\nexport default function stem(word, morphologyData) {\n word = word.toLowerCase();\n const originalWord = word;\n\n // Check if the word is on an exception list of words that should be stemmed even though the suffix is not in the required region.\n const wordAfterShortWordsCheck = checkShortWordsExceptionList(\n word,\n morphologyData.shortWordsAndStems\n );\n if (wordAfterShortWordsCheck) {\n return wordAfterShortWordsCheck;\n }\n\n // Check if the word is on an exception list for which all forms of a word and its stem are listed.\n const ifException = checkWordInFullFormExceptions(\n word,\n morphologyData.exceptionStemsWithFullForms\n );\n if (ifException) {\n return ifException;\n }\n\n // Check the exception list of words with plural suffix -x.\n if (word.endsWith('x')) {\n const pluralsWithXSuffix = morphologyData.pluralsWithXSuffix;\n if (pluralsWithXSuffix.includes(word)) {\n return word.slice(0, -1);\n }\n }\n\n // Check if the word is on the exception list of words for which -s should not be stemmed.\n if (word.endsWith('s')) {\n const sShouldNotBeStemmed = morphologyData.sShouldNotBeStemmed;\n if (sShouldNotBeStemmed.includes(word)) {\n return word;\n }\n }\n\n // Check if the word is on the exception list of words for which -ent should not be stemmed.\n const nonVerbsOnEnt = morphologyData.nonVerbsOnEnt;\n if (word.endsWith('ent')) {\n if (nonVerbsOnEnt.includes(word)) {\n return word;\n }\n }\n if (word.endsWith('ents')) {\n if (nonVerbsOnEnt.includes(word.slice(0, -1))) {\n return word.slice(0, -1);\n }\n }\n\n // Check if word is on the exception list of nouns and adjectives for which the verb suffix -ons should not be stemmed.\n const nonVerbsOnOns = morphologyData.nonVerbsOnOns;\n if (word.endsWith('ons')) {\n if (nonVerbsOnOns.includes(word)) {\n return word.slice(0, -1);\n }\n }\n\n // Pre-processing steps\n word = applyAllReplacements(word, morphologyData.regularStemmer.preProcessingStepsRegexes);\n\n // Determine R1, R2 & RV regions.\n const [r1Index, r2Index, rvIndex] = determineRs(word, morphologyData.regularStemmer.rIntervals);\n\n /*\n * Step 1:\n * Remove standard suffixes\n */\n word = processStandardSuffixes(\n word,\n morphologyData.regularStemmer.standardSuffixes,\n r1Index,\n r2Index,\n rvIndex\n );\n const wordAfterStep1 = word;\n\n /*\n * Step 2a:\n * Stem verb suffixes beginning with \"i\"\n */\n const verbSuffixesStartingWithIRemoved = removeVerbSuffixesStartingWithI(\n word,\n originalWord,\n rvIndex,\n morphologyData.regularStemmer.verbSuffixesWithIBeginning\n );\n word = verbSuffixesStartingWithIRemoved.word;\n const step2aDone = verbSuffixesStartingWithIRemoved.step2aDone;\n\n /*\n * Step 2b:\n * Stem other verb suffixes\n */\n if (!nonVerbsOnEnt.includes(word)) {\n word = removeOtherVerbSuffixes(\n word,\n step2aDone,\n wordAfterStep1,\n r2Index,\n rvIndex,\n morphologyData\n );\n }\n\n if (originalWord === word.toLowerCase()) {\n /* Step 4:\n * Stem residual suffixes.\n */\n word = removeResidualSuffixes(word, rvIndex, r2Index, morphologyData.regularStemmer);\n } else {\n /*\n * Step 3 (only needs to be executed if step 4 isn't executed)\n * Replace final Y with i or final ç with c.\n */\n const yEnding =\n morphologyData.regularStemmer.yAndSoftCEndingAndReplacement.yEndingAndReplacement;\n const softCEnding =\n morphologyData.regularStemmer.yAndSoftCEndingAndReplacement.softCEndingAndReplacement;\n if (word.endsWith(yEnding[0])) {\n word = word.slice(0, -1) + yEnding[1];\n } else if (word.endsWith(softCEnding[0])) {\n word = word.slice(0, -1) + softCEnding[1];\n }\n }\n\n /* Step 5:\n * Undouble final consonants\n */\n word = applyAllReplacements(word, morphologyData.regularStemmer.finalConsonantUndoubling);\n\n /* Step 6:\n * Un-accent\n */\n const unaccentE = morphologyData.regularStemmer.unaccentERegex;\n word = word.replace(new RegExp(unaccentE[0]), unaccentE[1]);\n word = word.toLowerCase();\n\n const canonicalStem = canonicalizeStem(word, morphologyData.stemsThatBelongToOneWord);\n if (canonicalStem) {\n return canonicalStem;\n }\n\n return word;\n}\n"],"mappings":";;;;;;AACA,IAAAA,MA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C,IAAI5C,MAAM,CAACwH,SAAS,CAAC,CAAC,CAAC,CAAC,EAAEA,SAAS,CAAC,CAAC,CAAC,CAAC;EAC3D5H,IAAI,GAAGA,IAAI,CAACoE,WAAW,CAAC,CAAC;EAEzB,MAAM0D,aAAa,GAAG9B,gBAAgB,CAAChG,IAAI,EAAE0E,cAAc,CAACwB,wBAAwB,CAAC;EACrF,IAAI4B,aAAa,EAAE;IACjB,OAAOA,aAAa;EACtB;EAEA,OAAO9H,IAAI;AACb","ignoreList":[]}
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.default = void 0;
7
7
  var _lodash = require("lodash");
8
8
  var _getParticiples = _interopRequireDefault(require("../helpers/internal/getParticiples.js"));
9
- var _index = require("../../../index");
9
+ var _index = require("@axyseo/index");
10
10
  var _functionWords = require("../config/functionWords");
11
11
  var _exceptionsParticiplesActive = require("../config/internal/exceptionsParticiplesActive");
12
12
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
@@ -1 +1 @@
1
- {"version":3,"file":"Clause.js","names":["_lodash","require","_getParticiples","_interopRequireDefault","_index","_functionWords","_exceptionsParticiplesActive","e","__esModule","default","precedenceException","directPrecedenceException","values","languageProcessing","Clause","FrenchClause","constructor","clauseText","auxiliaries","_participles","getParticiples","getClauseText","checkParticiples","clause","passiveParticiples","filter","participle","startsWith","includes","exceptionsParticiplesOthers","isOnAdjectiveVerbExceptionList","isOnNounExceptionList","cannotDirectlyPrecedePassiveParticiple","cannotBeBetweenPassiveAuxiliaryAndParticiple","setPassive","length","exceptionsParticiplesAdjectivesVerbs","endsWith","slice","exceptionsParticiplesNouns","_default","exports"],"sources":["../../../../../src/languageProcessing/languages/fr/values/Clause.js"],"sourcesContent":["import {includes} from 'lodash';\nimport getParticiples from '../helpers/internal/getParticiples.js';\nimport {languageProcessing} from '../../../index';\nconst {precedenceException, directPrecedenceException, values} = languageProcessing;\nconst {Clause} = values;\nimport {\n cannotBeBetweenPassiveAuxiliaryAndParticiple,\n cannotDirectlyPrecedePassiveParticiple\n} from '../config/functionWords';\nimport {\n adjectivesVerbs as exceptionsParticiplesAdjectivesVerbs,\n nouns as exceptionsParticiplesNouns,\n others as exceptionsParticiplesOthers\n} from '../config/internal/exceptionsParticiplesActive';\n\n/**\n * Creates a Clause object for the French language.\n */\nclass FrenchClause 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 {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 !participle.startsWith(\"l'\") &&\n !participle.startsWith(\"d'\") &&\n !includes(exceptionsParticiplesOthers, participle) &&\n !this.isOnAdjectiveVerbExceptionList(participle) &&\n !this.isOnNounExceptionList(participle) &&\n !directPrecedenceException(clause, participle, cannotDirectlyPrecedePassiveParticiple) &&\n !precedenceException(clause, participle, cannotBeBetweenPassiveAuxiliaryAndParticiple)\n );\n\n this.setPassive(passiveParticiples.length > 0);\n }\n\n /**\n * Checks whether the participle is on an exception list of words that look like participles but are adjectives or verbs.\n *\n * @param {string}\tparticiple\tThe participle to check.\n *\n * @returns {boolean}\tWhether or not the participle is on the adjective and verb exception list.\n */\n isOnAdjectiveVerbExceptionList(participle) {\n if (exceptionsParticiplesAdjectivesVerbs.includes(participle)) {\n return true;\n }\n // Checks for and removes a suffix and checks the exception list again.\n if (participle.endsWith('es')) {\n participle = participle.slice(0, -2);\n } else if (participle.endsWith('e') || participle.endsWith('s')) {\n participle = participle.slice(0, -1);\n }\n return exceptionsParticiplesAdjectivesVerbs.includes(participle);\n }\n\n /**\n * Checks whether the participle is on an exception list of words that look like participles but are nouns.\n *\n * @param {string}\tparticiple\tThe participle to check.\n *\n * @returns {boolean}\tWhether or not the participle is on the noun exception list.\n */\n isOnNounExceptionList(participle) {\n if (exceptionsParticiplesNouns.includes(participle)) {\n return true;\n }\n // Checks for and removes a suffix and checks the exception list again.\n if (participle.endsWith('s')) {\n participle = participle.slice(0, -1);\n }\n return exceptionsParticiplesNouns.includes(participle);\n }\n}\n\nexport default FrenchClause;\n"],"mappings":";;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,eAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,MAAA,GAAAH,OAAA;AAGA,IAAAI,cAAA,GAAAJ,OAAA;AAIA,IAAAK,4BAAA,GAAAL,OAAA;AAIwD,SAAAE,uBAAAI,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAVxD,MAAM;EAACG,mBAAmB;EAAEC,yBAAyB;EAAEC;AAAM,CAAC,GAAGC,yBAAkB;AACnF,MAAM;EAACC;AAAM,CAAC,GAAGF,MAAM;AAWvB;AACA;AACA;AACA,MAAMG,YAAY,SAASD,MAAM,CAAC;EAChC;AACF;AACA;AACA;AACA;AACA;AACA;AACA;EACEE,WAAWA,CAACC,UAAU,EAAEC,WAAW,EAAE;IACnC,KAAK,CAACD,UAAU,EAAEC,WAAW,CAAC;IAC9B,IAAI,CAACC,YAAY,GAAG,IAAAC,uBAAc,EAAC,IAAI,CAACC,aAAa,CAAC,CAAC,CAAC;IACxD,IAAI,CAACC,gBAAgB,CAAC,CAAC;EACzB;;EAEA;AACF;AACA;AACA;AACA;AACA;EACEA,gBAAgBA,CAAA,EAAG;IACjB,MAAMC,MAAM,GAAG,IAAI,CAACF,aAAa,CAAC,CAAC;IAEnC,MAAMG,kBAAkB,GAAG,IAAI,CAACJ,cAAc,CAAC,CAAC,CAACK,MAAM,CACrDC,UAAU,IACR,CAACA,UAAU,CAACC,UAAU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CAACY,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IACtC;IACA,OAAOC,kCAA0B,CAACX,QAAQ,CAACF,UAAU,CAAC;EACxD;AACF;AAAC,IAAAc,QAAA,GAAAC,OAAA,CAAAhC,OAAA,GAEcM,YAAY","ignoreList":[]}
1
+ {"version":3,"file":"Clause.js","names":["_lodash","require","_getParticiples","_interopRequireDefault","_index","_functionWords","_exceptionsParticiplesActive","e","__esModule","default","precedenceException","directPrecedenceException","values","languageProcessing","Clause","FrenchClause","constructor","clauseText","auxiliaries","_participles","getParticiples","getClauseText","checkParticiples","clause","passiveParticiples","filter","participle","startsWith","includes","exceptionsParticiplesOthers","isOnAdjectiveVerbExceptionList","isOnNounExceptionList","cannotDirectlyPrecedePassiveParticiple","cannotBeBetweenPassiveAuxiliaryAndParticiple","setPassive","length","exceptionsParticiplesAdjectivesVerbs","endsWith","slice","exceptionsParticiplesNouns","_default","exports"],"sources":["../../../../../src/languageProcessing/languages/fr/values/Clause.js"],"sourcesContent":["import {includes} from 'lodash';\nimport getParticiples from '../helpers/internal/getParticiples.js';\nimport {languageProcessing} from '@axyseo/index';\nconst {precedenceException, directPrecedenceException, values} = languageProcessing;\nconst {Clause} = values;\nimport {\n cannotBeBetweenPassiveAuxiliaryAndParticiple,\n cannotDirectlyPrecedePassiveParticiple\n} from '../config/functionWords';\nimport {\n adjectivesVerbs as exceptionsParticiplesAdjectivesVerbs,\n nouns as exceptionsParticiplesNouns,\n others as exceptionsParticiplesOthers\n} from '../config/internal/exceptionsParticiplesActive';\n\n/**\n * Creates a Clause object for the French language.\n */\nclass FrenchClause 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 {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 !participle.startsWith(\"l'\") &&\n !participle.startsWith(\"d'\") &&\n !includes(exceptionsParticiplesOthers, participle) &&\n !this.isOnAdjectiveVerbExceptionList(participle) &&\n !this.isOnNounExceptionList(participle) &&\n !directPrecedenceException(clause, participle, cannotDirectlyPrecedePassiveParticiple) &&\n !precedenceException(clause, participle, cannotBeBetweenPassiveAuxiliaryAndParticiple)\n );\n\n this.setPassive(passiveParticiples.length > 0);\n }\n\n /**\n * Checks whether the participle is on an exception list of words that look like participles but are adjectives or verbs.\n *\n * @param {string}\tparticiple\tThe participle to check.\n *\n * @returns {boolean}\tWhether or not the participle is on the adjective and verb exception list.\n */\n isOnAdjectiveVerbExceptionList(participle) {\n if (exceptionsParticiplesAdjectivesVerbs.includes(participle)) {\n return true;\n }\n // Checks for and removes a suffix and checks the exception list again.\n if (participle.endsWith('es')) {\n participle = participle.slice(0, -2);\n } else if (participle.endsWith('e') || participle.endsWith('s')) {\n participle = participle.slice(0, -1);\n }\n return exceptionsParticiplesAdjectivesVerbs.includes(participle);\n }\n\n /**\n * Checks whether the participle is on an exception list of words that look like participles but are nouns.\n *\n * @param {string}\tparticiple\tThe participle to check.\n *\n * @returns {boolean}\tWhether or not the participle is on the noun exception list.\n */\n isOnNounExceptionList(participle) {\n if (exceptionsParticiplesNouns.includes(participle)) {\n return true;\n }\n // Checks for and removes a suffix and checks the exception list again.\n if (participle.endsWith('s')) {\n participle = participle.slice(0, -1);\n }\n return exceptionsParticiplesNouns.includes(participle);\n }\n}\n\nexport default FrenchClause;\n"],"mappings":";;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,eAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,MAAA,GAAAH,OAAA;AAGA,IAAAI,cAAA,GAAAJ,OAAA;AAIA,IAAAK,4BA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ChD;;EAEA;AACF;AACA;AACA;AACA;AACA;AACA;EACEL,8BAA8BA,CAACJ,UAAU,EAAE;IACzC,IAAIU,4CAAoC,CAACR,QAAQ,CAACF,UAAU,CAAC,EAAE;MAC7D,OAAO,IAAI;IACb;IACA;IACA,IAAIA,UAAU,CAACW,QAAQ,CAAC,IAAI,CAAC,EAAE;MAC7BX,UAAU,GAAGA,UAAU,CAACY,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IACtC,CAAC,MAAM,IAAIZ,UAAU,CAACW,QAAQ,CAAC,GAAG,CAAC,IAAIX,UAAU,CAACW,QAAQ,CAAC,GAAG,CAAC,EAAE;MAC/DX,UAAU,GAAGA,UAAU,CAACY,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IACtC;IACA,OAAOF,4CAAoC,CAACR,QAAQ,CAACF,UAAU,CAAC;EAClE;;EAEA;AACF;AACA;AACA;AACA;AACA;AACA;EACEK,qBAAqBA,CAACL,UAAU,EAAE;IAChC,IAAIa,kCAA0B,CAACX,QAAQ,CAACF,UAAU,CAAC,EAAE;MACnD,OAAO,IAAI;IACb;IACA;IACA,IAAIA,UAAU,CAACW,QAAQ,CAAC,GAAG,CAAC,EAAE;MAC5BX,UAAU,GAAGA,UAAU,CAACY,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IACtC;IACA,OAAOC,kCAA0B,CAACX,QAAQ,CAACF,UAAU,CAAC;EACxD;AACF;AAAC,IAAAc,QAAA,GAAAC,OAAA,CAAAhC,OAAA,GAEcM,YAAY","ignoreList":[]}
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
- var _index = require("../../../index");
7
+ var _index = require("@axyseo/index");
8
8
  var _functionWords = _interopRequireDefault(require("./config/functionWords"));
9
9
  var _transitionWords = _interopRequireDefault(require("./config/transitionWords"));
10
10
  var _twoPartTransitionWords = _interopRequireDefault(require("./config/twoPartTransitionWords"));
@@ -1 +1 @@
1
- {"version":3,"file":"Researcher.js","names":["_index","require","_functionWords","_interopRequireDefault","_transitionWords","_twoPartTransitionWords","_firstWordExceptions","_sentenceLength","_createBasicWordForms","_getStemmer","_isPassiveSentence","_prefixedFunctionWords","e","__esModule","default","AbstractResearcher","languageProcessing","Researcher","constructor","paper","defaultResearches","getFleschReadingScore","Object","assign","config","language","passiveConstructionType","firstWordExceptions","functionWords","transitionWords","twoPartTransitionWords","sentenceLength","prefixedFunctionWordsRegex","PREFIXED_FUNCTION_WORDS_REGEX","helpers","createBasicWordForms","getStemmer","isPassiveSentence","exports"],"sources":["../../../../src/languageProcessing/languages/he/Researcher.js"],"sourcesContent":["import {languageProcessing} from '../../../index';\nconst {AbstractResearcher} = languageProcessing;\n\n// All config\nimport functionWords from './config/functionWords';\nimport transitionWords from './config/transitionWords';\nimport twoPartTransitionWords from './config/twoPartTransitionWords';\nimport firstWordExceptions from './config/firstWordExceptions';\nimport sentenceLength from './config/sentenceLength';\n\n// All helpers\nimport {createBasicWordForms} from './helpers/createBasicWordForms';\nimport getStemmer from './helpers/getStemmer';\nimport isPassiveSentence from './helpers/isPassiveSentence';\nimport {PREFIXED_FUNCTION_WORDS_REGEX} from './config/prefixedFunctionWords';\n\n/**\n * The researcher contains all the researches, helpers, data, and config.\n */\nexport default class Researcher extends AbstractResearcher {\n /**\n * Constructor\n * @param {Paper} paper The Paper object that is needed within the researches.\n * @constructor\n */\n constructor(paper) {\n super(paper);\n\n // Deletes researches that are currently not available in Hebrew.\n // When the research is available, this line should be removed.\n delete this.defaultResearches.getFleschReadingScore;\n\n Object.assign(this.config, {\n language: 'he',\n passiveConstructionType: 'morphological',\n firstWordExceptions,\n functionWords,\n transitionWords,\n twoPartTransitionWords,\n sentenceLength,\n prefixedFunctionWordsRegex: PREFIXED_FUNCTION_WORDS_REGEX\n });\n\n Object.assign(this.helpers, {\n createBasicWordForms,\n getStemmer,\n isPassiveSentence\n });\n }\n}\n"],"mappings":";;;;;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BA;IACF,CAAC,CAAC;EACJ;AACF;AAACC,OAAA,CAAAxB,OAAA,GAAAG,UAAA","ignoreList":[]}
1
+ {"version":3,"file":"Researcher.js","names":["_index","require","_functionWords","_interopRequireDefault","_transitionWords","_twoPartTransitionWords","_firstWordExceptions","_sentenceLength","_createBasicWordForms","_getStemmer","_isPassiveSentence","_prefixedFunctionWords","e","__esModule","default","AbstractResearcher","languageProcessing","Researcher","constructor","paper","defaultResearches","getFleschReadingScore","Object","assign","config","language","passiveConstructionType","firstWordExceptions","functionWords","transitionWords","twoPartTransitionWords","sentenceLength","prefixedFunctionWordsRegex","PREFIXED_FUNCTION_WORDS_REGEX","helpers","createBasicWordForms","getStemmer","isPassiveSentence","exports"],"sources":["../../../../src/languageProcessing/languages/he/Researcher.js"],"sourcesContent":["import {languageProcessing} from '@axyseo/index';\nconst {AbstractResearcher} = languageProcessing;\n\n// All config\nimport functionWords from './config/functionWords';\nimport transitionWords from './config/transitionWords';\nimport twoPartTransitionWords from './config/twoPartTransitionWords';\nimport firstWordExceptions from './config/firstWordExceptions';\nimport sentenceLength from './config/sentenceLength';\n\n// All helpers\nimport {createBasicWordForms} from './helpers/createBasicWordForms';\nimport getStemmer from './helpers/getStemmer';\nimport isPassiveSentence from './helpers/isPassiveSentence';\nimport {PREFIXED_FUNCTION_WORDS_REGEX} from './config/prefixedFunctionWords';\n\n/**\n * The researcher contains all the researches, helpers, data, and config.\n */\nexport default class Researcher extends AbstractResearcher {\n /**\n * Constructor\n * @param {Paper} paper The Paper object that is needed within the researches.\n * @constructor\n */\n constructor(paper) {\n super(paper);\n\n // Deletes researches that are currently not available in Hebrew.\n // When the research is available, this line should be removed.\n delete this.defaultResearches.getFleschReadingScore;\n\n Object.assign(this.config, {\n language: 'he',\n passiveConstructionType: 'morphological',\n firstWordExceptions,\n functionWords,\n transitionWords,\n twoPartTransitionWords,\n sentenceLength,\n prefixedFunctionWordsRegex: PREFIXED_FUNCTION_WORDS_REGEX\n });\n\n Object.assign(this.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AAoB,EAApBA,0CAAoB;MACpBC,UAAU,EAAVA,mBAAU;MACVC,iBAAiB,EAAjBA;IACF,CAAC,CAAC;EACJ;AACF;AAACC,OAAA,CAAAxB,OAAA,GAAAG,UAAA","ignoreList":[]}
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.default = getStemmer;
7
7
  var _lodash = require("lodash");
8
- var _index = require("../../../index");
8
+ var _index = require("@axyseo/index");
9
9
  var _stem = _interopRequireDefault(require("./internal/stem"));
10
10
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
11
11
  const {
@@ -1 +1 @@
1
- {"version":3,"file":"getStemmer.js","names":["_lodash","require","_index","_stem","_interopRequireDefault","e","__esModule","default","baseStemmer","languageProcessing","getStemmer","researcher","morphologyData","get","getData","word","stem"],"sources":["../../../../../src/languageProcessing/languages/he/helpers/getStemmer.js"],"sourcesContent":["import {get} from 'lodash';\nimport {languageProcessing} from '../../../index';\nconst {baseStemmer} = languageProcessing;\n\nimport stem from './internal/stem';\n\n/**\n * Returns the stemmer for a researcher.\n *\n * @param {Researcher} researcher The researcher.\n *\n * @returns {Function} The stemmer.\n */\nexport default function getStemmer(researcher) {\n const morphologyData = get(researcher.getData('morphology'), 'he', false);\n\n if (morphologyData) {\n return word => stem(word, morphologyData);\n }\n\n return baseStemmer;\n}\n"],"mappings":";;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AAGA,IAAAE,KAAA,GAAAC,sBAAA,CAAAH,OAAA;AAAmC,SAAAG,uBAAAC,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAFnC,MAAM;EAACG;AAAW,CAAC,GAAGC,yBAAkB;AAIxC;AACA;AACA;AACA;AACA;AACA;AACA;AACe,SAASC,UAAUA,CAACC,UAAU,EAAE;EAC7C,MAAMC,cAAc,GAAG,IAAAC,WAAG,EAACF,UAAU,CAACG,OAAO,CAAC,YAAY,CAAC,EAAE,IAAI,EAAE,KAAK,CAAC;EAEzE,IAAIF,cAAc,EAAE;IAClB,OAAOG,IAAI,IAAI,IAAAC,aAAI,EAACD,IAAI,EAAEH,cAAc,CAAC;EAC3C;EAEA,OAAOJ,WAAW;AACpB","ignoreList":[]}
1
+ {"version":3,"file":"getStemmer.js","names":["_lodash","require","_index","_stem","_interopRequireDefault","e","__esModule","default","baseStemmer","languageProcessing","getStemmer","researcher","morphologyData","get","getData","word","stem"],"sources":["../../../../../src/languageProcessing/languages/he/helpers/getStemmer.js"],"sourcesContent":["import {get} from 'lodash';\nimport {languageProcessing} from '@axyseo/index';\nconst {baseStemmer} = languageProcessing;\n\nimport stem from './internal/stem';\n\n/**\n * Returns the stemmer for a researcher.\n *\n * @param {Researcher} researcher The researcher.\n *\n * @returns {Function} The stemmer.\n */\nexport default function getStemmer(researcher) {\n const morphologyData = get(researcher.getData('morphology'), 'he', false);\n\n if (morphologyData) {\n return word => stem(word, morphologyData);\n }\n\n return baseStemmer;\n}\n"],"mappings":";;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AAGA,IAAAE,KAAA,GAAAC,sBAAA,CAAAH,OAAA;AAAmC,SAAAG,uBAAAC,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAFnC,MAAM;EAACG;AAAW,CAAC,GAAGC,yBAAkB;AAIxC;AACA;AACA;AACA;AACA;AACA;AACA;AACe,SAASC,UAAUA,CAACC,UAAU,EAAE;EAC7C,MAAMC,cAAc,GAAG,IAAAC,WAAG,EAACF,UAAU,CAACG,OAAO,CAAC,YAAY,CAAC,EAAE,IAAI,EAAE,KAAK,CAAC;EAEzE,IAAIF,cAAc,EAAE;IAClB,OAAOG,IAAI,IAAI,IAAAC,aAAI,EAACD,IAAI,EAAEH,cAAc,CAAC;EAC3C;EAEA,OAAOJ,WAAW;AACpB","ignoreList":[]}
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = isPassiveSentence;
7
- var _index = require("../../../index");
7
+ var _index = require("@axyseo/index");
8
8
  var _regularRootsHufal = _interopRequireDefault(require("../config/internal/regularRootsHufal"));
9
9
  var _regularRootsNifal = _interopRequireDefault(require("../config/internal/regularRootsNifal"));
10
10
  var _regularRootsPual = _interopRequireDefault(require("../config/internal/regularRootsPual"));