simstack 2.0.1__py3-none-any.whl

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 (354) hide show
  1. simstack/__init__.py +0 -0
  2. simstack/_version.py +24 -0
  3. simstack/core/__init__.py +0 -0
  4. simstack/core/artifacts.py +406 -0
  5. simstack/core/asnyc_helper.py +14 -0
  6. simstack/core/config_file.py +60 -0
  7. simstack/core/context.py +283 -0
  8. simstack/core/definitions.py +22 -0
  9. simstack/core/engine.py +115 -0
  10. simstack/core/find_simstack_modules.py +41 -0
  11. simstack/core/hash.py +179 -0
  12. simstack/core/node.py +1137 -0
  13. simstack/core/node_claim.py +31 -0
  14. simstack/core/node_runner.py +362 -0
  15. simstack/core/process_results.py +102 -0
  16. simstack/core/recompute_artifacts.py +117 -0
  17. simstack/core/reset_db.py +12 -0
  18. simstack/core/resource_assignment.py +222 -0
  19. simstack/core/resources.py +90 -0
  20. simstack/core/route_table.py +24 -0
  21. simstack/core/run_docker.py +109 -0
  22. simstack/core/run_node.py +71 -0
  23. simstack/core/runner.py +169 -0
  24. simstack/core/services/__init__.py +11 -0
  25. simstack/core/services/base_service.py +191 -0
  26. simstack/core/services/file_transfer_service.py +117 -0
  27. simstack/core/services/git_restart_service.py +12 -0
  28. simstack/core/services/git_uv_update_service.py +105 -0
  29. simstack/core/services/node_execution_service.py +182 -0
  30. simstack/core/services/resource_branch_monitor_service.py +71 -0
  31. simstack/core/services/runner_cleanup_service.py +149 -0
  32. simstack/core/services/runner_manager.py +163 -0
  33. simstack/core/services/runner_status_service.py +10 -0
  34. simstack/core/services/slurm_status_service.py +67 -0
  35. simstack/core/services/stop_check_service.py +27 -0
  36. simstack/core/services/timeout_restart_service.py +26 -0
  37. simstack/core/simstack_result.py +39 -0
  38. simstack/core/submit_node.py +217 -0
  39. simstack/core/task_id.py +22 -0
  40. simstack/methods/__init__.py +0 -0
  41. simstack/methods/archive_files.py +292 -0
  42. simstack/methods/fire_and_forget_runner.py +113 -0
  43. simstack/methods/generate_test.py +125 -0
  44. simstack/methods/get_file.py +26 -0
  45. simstack/methods/mass_runner.py +154 -0
  46. simstack/methods/multiple_executor.py +307 -0
  47. simstack/methods/switch_git.py +16 -0
  48. simstack/methods/upload_helpers.py +81 -0
  49. simstack/models/__init__.py +74 -0
  50. simstack/models/array_list.py +21 -0
  51. simstack/models/array_storage.py +83 -0
  52. simstack/models/artifact_models.py +127 -0
  53. simstack/models/base_lists.py +51 -0
  54. simstack/models/base_types.py +209 -0
  55. simstack/models/charts_artifact.py +690 -0
  56. simstack/models/dataset.py +451 -0
  57. simstack/models/dataset_metadata.py +390 -0
  58. simstack/models/datasettuple.py +587 -0
  59. simstack/models/file_instance.py +150 -0
  60. simstack/models/file_list.py +45 -0
  61. simstack/models/files.py +424 -0
  62. simstack/models/fire_and_forget_result.py +19 -0
  63. simstack/models/images2d.py +113 -0
  64. simstack/models/log_entry_model.py +37 -0
  65. simstack/models/models.py +52 -0
  66. simstack/models/named_data_reference.py +36 -0
  67. simstack/models/node_registry.py +96 -0
  68. simstack/models/pandas_model.py +239 -0
  69. simstack/models/parameters.py +402 -0
  70. simstack/models/pickle_models.py +300 -0
  71. simstack/models/project.py +13 -0
  72. simstack/models/resource_assignment.py +170 -0
  73. simstack/models/resource_definition.py +125 -0
  74. simstack/models/runner_model.py +39 -0
  75. simstack/models/simple_table.py +79 -0
  76. simstack/models/simstack_model.py +97 -0
  77. simstack/models/slurm_info.py +17 -0
  78. simstack/models/table_artifact.py +87 -0
  79. simstack/models/tag.py +12 -0
  80. simstack/models/unused_test_file.py +5 -0
  81. simstack/simstack_marker.com +1 -0
  82. simstack/static/docs/.buildinfo +4 -0
  83. simstack/static/docs/_images/GUI Concept.webp +0 -0
  84. simstack/static/docs/_modules/index.html +434 -0
  85. simstack/static/docs/_modules/simstack/core/artifacts.html +743 -0
  86. simstack/static/docs/_modules/simstack/core/asnyc_helper.html +330 -0
  87. simstack/static/docs/_modules/simstack/core/config_file.html +379 -0
  88. simstack/static/docs/_modules/simstack/core/definitions.html +341 -0
  89. simstack/static/docs/_modules/simstack/core/engine.html +437 -0
  90. simstack/static/docs/_modules/simstack/core/find_simstack_modules.html +360 -0
  91. simstack/static/docs/_modules/simstack/core/hash.html +528 -0
  92. simstack/static/docs/_modules/simstack/core/node.html +1392 -0
  93. simstack/static/docs/_modules/simstack/core/node_claim.html +347 -0
  94. simstack/static/docs/_modules/simstack/core/node_runner.html +711 -0
  95. simstack/static/docs/_modules/simstack/core/process_results.html +418 -0
  96. simstack/static/docs/_modules/simstack/core/recompute_artifacts.html +433 -0
  97. simstack/static/docs/_modules/simstack/core/reset_db.html +328 -0
  98. simstack/static/docs/_modules/simstack/core/resource_assignment.html +553 -0
  99. simstack/static/docs/_modules/simstack/core/resources.html +424 -0
  100. simstack/static/docs/_modules/simstack/core/route_table.html +349 -0
  101. simstack/static/docs/_modules/simstack/core/run_docker.html +425 -0
  102. simstack/static/docs/_modules/simstack/core/run_node.html +390 -0
  103. simstack/static/docs/_modules/simstack/core/runner.html +491 -0
  104. simstack/static/docs/_modules/simstack/core/services/base_service.html +522 -0
  105. simstack/static/docs/_modules/simstack/core/services/file_transfer_service.html +436 -0
  106. simstack/static/docs/_modules/simstack/core/services/git_restart_service.html +331 -0
  107. simstack/static/docs/_modules/simstack/core/services/git_uv_update_service.html +427 -0
  108. simstack/static/docs/_modules/simstack/core/services/node_execution_service.html +507 -0
  109. simstack/static/docs/_modules/simstack/core/services/resource_branch_monitor_service.html +390 -0
  110. simstack/static/docs/_modules/simstack/core/services/runner_cleanup_service.html +468 -0
  111. simstack/static/docs/_modules/simstack/core/services/runner_manager.html +485 -0
  112. simstack/static/docs/_modules/simstack/core/services/runner_status_service.html +329 -0
  113. simstack/static/docs/_modules/simstack/core/services/slurm_status_service.html +386 -0
  114. simstack/static/docs/_modules/simstack/core/services/stop_check_service.html +346 -0
  115. simstack/static/docs/_modules/simstack/core/services/timeout_restart_service.html +345 -0
  116. simstack/static/docs/_modules/simstack/core/simstack_result.html +355 -0
  117. simstack/static/docs/_modules/simstack/core/submit_node.html +536 -0
  118. simstack/static/docs/_modules/simstack/core/task_id.html +344 -0
  119. simstack/static/docs/_modules/simstack/methods/archive_files.html +598 -0
  120. simstack/static/docs/_modules/simstack/methods/fire_and_forget_runner.html +432 -0
  121. simstack/static/docs/_modules/simstack/methods/generate_test.html +443 -0
  122. simstack/static/docs/_modules/simstack/methods/get_file.html +342 -0
  123. simstack/static/docs/_modules/simstack/methods/mass_runner.html +476 -0
  124. simstack/static/docs/_modules/simstack/methods/multiple_executor.html +674 -0
  125. simstack/static/docs/_modules/simstack/methods/switch_git.html +332 -0
  126. simstack/static/docs/_modules/simstack/methods/upload_helpers.html +403 -0
  127. simstack/static/docs/_modules/simstack/models/array_list.html +337 -0
  128. simstack/static/docs/_modules/simstack/models/array_storage.html +417 -0
  129. simstack/static/docs/_modules/simstack/models/base_lists.html +374 -0
  130. simstack/static/docs/_modules/simstack/models/base_types.html +588 -0
  131. simstack/static/docs/_modules/simstack/models/charts_artifact.html +1035 -0
  132. simstack/static/docs/_modules/simstack/models/dataset.html +866 -0
  133. simstack/static/docs/_modules/simstack/models/dataset_metadata.html +711 -0
  134. simstack/static/docs/_modules/simstack/models/datasettuple.html +1005 -0
  135. simstack/static/docs/_modules/simstack/models/file_instance.html +472 -0
  136. simstack/static/docs/_modules/simstack/models/file_list.html +367 -0
  137. simstack/static/docs/_modules/simstack/models/files.html +773 -0
  138. simstack/static/docs/_modules/simstack/models/fire_and_forget_result.html +335 -0
  139. simstack/static/docs/_modules/simstack/models/images2d.html +447 -0
  140. simstack/static/docs/_modules/simstack/models/log_entry_model.html +356 -0
  141. simstack/static/docs/_modules/simstack/models/models.html +374 -0
  142. simstack/static/docs/_modules/simstack/models/named_data_reference.html +355 -0
  143. simstack/static/docs/_modules/simstack/models/node_registry.html +415 -0
  144. simstack/static/docs/_modules/simstack/models/pandas_model.html +570 -0
  145. simstack/static/docs/_modules/simstack/models/parameters.html +739 -0
  146. simstack/static/docs/_modules/simstack/models/pickle_models.html +631 -0
  147. simstack/static/docs/_modules/simstack/models/project.html +329 -0
  148. simstack/static/docs/_modules/simstack/models/resource_assignment.html +501 -0
  149. simstack/static/docs/_modules/simstack/models/resource_definition.html +477 -0
  150. simstack/static/docs/_modules/simstack/models/runner_model.html +361 -0
  151. simstack/static/docs/_modules/simstack/models/simple_table.html +413 -0
  152. simstack/static/docs/_modules/simstack/models/simstack_model.html +416 -0
  153. simstack/static/docs/_modules/simstack/models/slurm_info.html +333 -0
  154. simstack/static/docs/_modules/simstack/models/table_artifact.html +406 -0
  155. simstack/static/docs/_modules/simstack/models/tag.html +328 -0
  156. simstack/static/docs/_modules/simstack/tables/model_table.html +519 -0
  157. simstack/static/docs/_modules/simstack/tables/node_children.html +538 -0
  158. simstack/static/docs/_modules/simstack/tables/node_table.html +854 -0
  159. simstack/static/docs/_modules/simstack/tables/table_builder.html +642 -0
  160. simstack/static/docs/_modules/simstack/util/async_zip_utils.html +337 -0
  161. simstack/static/docs/_modules/simstack/util/b64mixin.html +339 -0
  162. simstack/static/docs/_modules/simstack/util/cleaned_json_schema.html +336 -0
  163. simstack/static/docs/_modules/simstack/util/config_reader.html +498 -0
  164. simstack/static/docs/_modules/simstack/util/custom_model_dump.html +391 -0
  165. simstack/static/docs/_modules/simstack/util/database_information.html +488 -0
  166. simstack/static/docs/_modules/simstack/util/db.html +1392 -0
  167. simstack/static/docs/_modules/simstack/util/db_logger.html +448 -0
  168. simstack/static/docs/_modules/simstack/util/default_from_dict.html +376 -0
  169. simstack/static/docs/_modules/simstack/util/directory_iterator.html +553 -0
  170. simstack/static/docs/_modules/simstack/util/docstring_parser.html +526 -0
  171. simstack/static/docs/_modules/simstack/util/file_hashing.html +394 -0
  172. simstack/static/docs/_modules/simstack/util/file_transfer_client.html +791 -0
  173. simstack/static/docs/_modules/simstack/util/files.html +733 -0
  174. simstack/static/docs/_modules/simstack/util/find_python_files.html +349 -0
  175. simstack/static/docs/_modules/simstack/util/generate_ui_schema.html +396 -0
  176. simstack/static/docs/_modules/simstack/util/generic_list_mixin.html +487 -0
  177. simstack/static/docs/_modules/simstack/util/get_module_path.html +336 -0
  178. simstack/static/docs/_modules/simstack/util/git_pull.html +381 -0
  179. simstack/static/docs/_modules/simstack/util/git_repository_status.html +411 -0
  180. simstack/static/docs/_modules/simstack/util/import_module.html +377 -0
  181. simstack/static/docs/_modules/simstack/util/importer.html +637 -0
  182. simstack/static/docs/_modules/simstack/util/init_data_source.html +357 -0
  183. simstack/static/docs/_modules/simstack/util/make_graph.html +423 -0
  184. simstack/static/docs/_modules/simstack/util/make_table.html +1171 -0
  185. simstack/static/docs/_modules/simstack/util/mappings.html +378 -0
  186. simstack/static/docs/_modules/simstack/util/minimal_route_finder.html +388 -0
  187. simstack/static/docs/_modules/simstack/util/mock_db.html +472 -0
  188. simstack/static/docs/_modules/simstack/util/module_path_checker.html +354 -0
  189. simstack/static/docs/_modules/simstack/util/object_list_mixin.html +649 -0
  190. simstack/static/docs/_modules/simstack/util/path_manager.html +566 -0
  191. simstack/static/docs/_modules/simstack/util/project_root_finder.html +357 -0
  192. simstack/static/docs/_modules/simstack/util/queue_watcher.html +593 -0
  193. simstack/static/docs/_modules/simstack/util/resource_config.html +532 -0
  194. simstack/static/docs/_modules/simstack/util/route_finder.html +390 -0
  195. simstack/static/docs/_modules/simstack/util/runner_util.html +487 -0
  196. simstack/static/docs/_modules/simstack/util/runner_utils.html +468 -0
  197. simstack/static/docs/_modules/simstack/util/safe_code_executor.html +510 -0
  198. simstack/static/docs/_modules/simstack/util/sample_config.html +414 -0
  199. simstack/static/docs/_modules/simstack/util/sensitive_content_filter.html +364 -0
  200. simstack/static/docs/_modules/simstack/util/setup_logging.html +365 -0
  201. simstack/static/docs/_modules/simstack/util/submit_to_watchdog.html +425 -0
  202. simstack/static/docs/_modules/simstack/util/toml_reader.html +482 -0
  203. simstack/static/docs/_modules/simstack/util/transform_file_name.html +357 -0
  204. simstack/static/docs/_modules/simstack/util/ui_tools.html +541 -0
  205. simstack/static/docs/_sources/architecture.rst.txt +25 -0
  206. simstack/static/docs/_sources/array_lists.rst.txt +60 -0
  207. simstack/static/docs/_sources/ci_pipeline.rst.txt +34 -0
  208. simstack/static/docs/_sources/data.rst.txt +175 -0
  209. simstack/static/docs/_sources/database_migrations.rst.txt +310 -0
  210. simstack/static/docs/_sources/datasets.rst.txt +93 -0
  211. simstack/static/docs/_sources/developer_guide.rst.txt +25 -0
  212. simstack/static/docs/_sources/docker_nodes.rst.txt +149 -0
  213. simstack/static/docs/_sources/files.rst.txt +159 -0
  214. simstack/static/docs/_sources/fire_and_forget_runner.rst.txt +67 -0
  215. simstack/static/docs/_sources/index.rst.txt +25 -0
  216. simstack/static/docs/_sources/installation.rst.txt +213 -0
  217. simstack/static/docs/_sources/lists.rst.txt +111 -0
  218. simstack/static/docs/_sources/mass_runner.rst.txt +91 -0
  219. simstack/static/docs/_sources/misc.rst.txt +106 -0
  220. simstack/static/docs/_sources/overview.rst.txt +91 -0
  221. simstack/static/docs/_sources/recovery.rst.txt +38 -0
  222. simstack/static/docs/_sources/resource_config.rst.txt +141 -0
  223. simstack/static/docs/_sources/simstack/modules/modules.rst.txt +7 -0
  224. simstack/static/docs/_sources/simstack/modules/simstack.core.rst.txt +205 -0
  225. simstack/static/docs/_sources/simstack/modules/simstack.core.services.rst.txt +109 -0
  226. simstack/static/docs/_sources/simstack/modules/simstack.methods.rst.txt +77 -0
  227. simstack/static/docs/_sources/simstack/modules/simstack.models.rst.txt +261 -0
  228. simstack/static/docs/_sources/simstack/modules/simstack.rst.txt +22 -0
  229. simstack/static/docs/_sources/simstack/modules/simstack.tables.rst.txt +45 -0
  230. simstack/static/docs/_sources/simstack/modules/simstack.util.rst.txt +381 -0
  231. simstack/static/docs/_sources/submit.rst.txt +141 -0
  232. simstack/static/docs/_sources/tables.rst.txt +50 -0
  233. simstack/static/docs/_sources/testing_complex_nodes.rst.txt +92 -0
  234. simstack/static/docs/_sources/ui_documentation.rst.txt +272 -0
  235. simstack/static/docs/_sources/workflows.rst.txt +446 -0
  236. simstack/static/docs/_static/base-stemmer.js +476 -0
  237. simstack/static/docs/_static/basic.css +906 -0
  238. simstack/static/docs/_static/cobalt2-theme.css +1 -0
  239. simstack/static/docs/_static/debug.css +69 -0
  240. simstack/static/docs/_static/docs-build-badge.css +51 -0
  241. simstack/static/docs/_static/docs-build-badge.js +51 -0
  242. simstack/static/docs/_static/doctools.js +150 -0
  243. simstack/static/docs/_static/documentation_options.js +13 -0
  244. simstack/static/docs/_static/english-stemmer.js +1066 -0
  245. simstack/static/docs/_static/file.png +0 -0
  246. simstack/static/docs/_static/language_data.js +13 -0
  247. simstack/static/docs/_static/minus.png +0 -0
  248. simstack/static/docs/_static/plus.png +0 -0
  249. simstack/static/docs/_static/pygments.css +250 -0
  250. simstack/static/docs/_static/scripts/furo-extensions.js +0 -0
  251. simstack/static/docs/_static/scripts/furo.js +3 -0
  252. simstack/static/docs/_static/scripts/furo.js.LICENSE.txt +7 -0
  253. simstack/static/docs/_static/scripts/furo.js.map +1 -0
  254. simstack/static/docs/_static/searchtools.js +693 -0
  255. simstack/static/docs/_static/skeleton.css +296 -0
  256. simstack/static/docs/_static/sphinx_highlight.js +159 -0
  257. simstack/static/docs/_static/styles/furo-extensions.css +2 -0
  258. simstack/static/docs/_static/styles/furo-extensions.css.map +1 -0
  259. simstack/static/docs/_static/styles/furo.css +2 -0
  260. simstack/static/docs/_static/styles/furo.css.map +1 -0
  261. simstack/static/docs/architecture.html +340 -0
  262. simstack/static/docs/array_lists.html +678 -0
  263. simstack/static/docs/ci_pipeline.html +385 -0
  264. simstack/static/docs/data.html +545 -0
  265. simstack/static/docs/database_migrations.html +652 -0
  266. simstack/static/docs/datasets.html +1268 -0
  267. simstack/static/docs/developer_guide.html +359 -0
  268. simstack/static/docs/docker_nodes.html +503 -0
  269. simstack/static/docs/files.html +718 -0
  270. simstack/static/docs/fire_and_forget_runner.html +641 -0
  271. simstack/static/docs/genindex.html +6390 -0
  272. simstack/static/docs/index.html +516 -0
  273. simstack/static/docs/installation.html +553 -0
  274. simstack/static/docs/lists.html +478 -0
  275. simstack/static/docs/mass_runner.html +481 -0
  276. simstack/static/docs/misc.html +454 -0
  277. simstack/static/docs/objects.inv +0 -0
  278. simstack/static/docs/overview.html +469 -0
  279. simstack/static/docs/py-modindex.html +1111 -0
  280. simstack/static/docs/recovery.html +371 -0
  281. simstack/static/docs/resource_config.html +590 -0
  282. simstack/static/docs/search.html +327 -0
  283. simstack/static/docs/searchindex.js +1 -0
  284. simstack/static/docs/simstack/modules/modules.html +489 -0
  285. simstack/static/docs/simstack/modules/simstack.core.html +1883 -0
  286. simstack/static/docs/simstack/modules/simstack.core.services.html +698 -0
  287. simstack/static/docs/simstack/modules/simstack.html +3060 -0
  288. simstack/static/docs/simstack/modules/simstack.methods.html +1150 -0
  289. simstack/static/docs/simstack/modules/simstack.models.html +13113 -0
  290. simstack/static/docs/simstack/modules/simstack.tables.html +635 -0
  291. simstack/static/docs/simstack/modules/simstack.util.html +3320 -0
  292. simstack/static/docs/submit.html +487 -0
  293. simstack/static/docs/tables.html +539 -0
  294. simstack/static/docs/testing_complex_nodes.html +458 -0
  295. simstack/static/docs/ui_documentation.html +788 -0
  296. simstack/static/docs/workflows.html +766 -0
  297. simstack/tables/__init__.py +0 -0
  298. simstack/tables/model_table.py +191 -0
  299. simstack/tables/node_children.py +219 -0
  300. simstack/tables/node_table.py +517 -0
  301. simstack/tables/table_builder.py +314 -0
  302. simstack/util/__init__.py +0 -0
  303. simstack/util/async_zip_utils.py +18 -0
  304. simstack/util/b64mixin.py +23 -0
  305. simstack/util/cleaned_json_schema.py +20 -0
  306. simstack/util/config_reader.py +179 -0
  307. simstack/util/custom_model_dump.py +75 -0
  308. simstack/util/database_information.py +160 -0
  309. simstack/util/db.py +1013 -0
  310. simstack/util/db_logger.py +117 -0
  311. simstack/util/default_from_dict.py +57 -0
  312. simstack/util/directory_iterator.py +216 -0
  313. simstack/util/docstring_parser.py +186 -0
  314. simstack/util/file_hashing.py +72 -0
  315. simstack/util/file_transfer_client.py +427 -0
  316. simstack/util/files.py +396 -0
  317. simstack/util/find_python_files.py +33 -0
  318. simstack/util/generate_ui_schema.py +80 -0
  319. simstack/util/generic_list_mixin.py +120 -0
  320. simstack/util/geometry_utils.py +118 -0
  321. simstack/util/get_module_path.py +20 -0
  322. simstack/util/git_pull.py +65 -0
  323. simstack/util/git_repository_status.py +95 -0
  324. simstack/util/import_module.py +63 -0
  325. simstack/util/importer.py +312 -0
  326. simstack/util/init_data_source.py +41 -0
  327. simstack/util/make_graph.py +107 -0
  328. simstack/util/make_table.py +837 -0
  329. simstack/util/mappings.py +41 -0
  330. simstack/util/minimal_route_finder.py +72 -0
  331. simstack/util/mock_db.py +144 -0
  332. simstack/util/module_path_checker.py +38 -0
  333. simstack/util/object_list_mixin.py +282 -0
  334. simstack/util/path_manager.py +223 -0
  335. simstack/util/project_root_finder.py +41 -0
  336. simstack/util/queue_watcher.py +262 -0
  337. simstack/util/resource_config.py +198 -0
  338. simstack/util/route_finder.py +74 -0
  339. simstack/util/runner_util.py +166 -0
  340. simstack/util/runner_utils.py +143 -0
  341. simstack/util/safe_code_executor.py +194 -0
  342. simstack/util/sample_config.py +98 -0
  343. simstack/util/sensitive_content_filter.py +48 -0
  344. simstack/util/setup_logging.py +49 -0
  345. simstack/util/submit_to_watchdog.py +106 -0
  346. simstack/util/toml_reader.py +142 -0
  347. simstack/util/transform_file_name.py +41 -0
  348. simstack/util/ui_tools.py +213 -0
  349. simstack-2.0.1.dist-info/METADATA +454 -0
  350. simstack-2.0.1.dist-info/RECORD +354 -0
  351. simstack-2.0.1.dist-info/WHEEL +5 -0
  352. simstack-2.0.1.dist-info/entry_points.txt +12 -0
  353. simstack-2.0.1.dist-info/licenses/LICENSE +21 -0
  354. simstack-2.0.1.dist-info/top_level.txt +1 -0
@@ -0,0 +1,1066 @@
1
+ // Generated from english.sbl by Snowball 3.0.1 - https://snowballstem.org/
2
+
3
+ /**@constructor*/
4
+ var EnglishStemmer = function() {
5
+ var base = new BaseStemmer();
6
+
7
+ /** @const */ var a_0 = [
8
+ ["arsen", -1, -1],
9
+ ["commun", -1, -1],
10
+ ["emerg", -1, -1],
11
+ ["gener", -1, -1],
12
+ ["later", -1, -1],
13
+ ["organ", -1, -1],
14
+ ["past", -1, -1],
15
+ ["univers", -1, -1]
16
+ ];
17
+
18
+ /** @const */ var a_1 = [
19
+ ["'", -1, 1],
20
+ ["'s'", 0, 1],
21
+ ["'s", -1, 1]
22
+ ];
23
+
24
+ /** @const */ var a_2 = [
25
+ ["ied", -1, 2],
26
+ ["s", -1, 3],
27
+ ["ies", 1, 2],
28
+ ["sses", 1, 1],
29
+ ["ss", 1, -1],
30
+ ["us", 1, -1]
31
+ ];
32
+
33
+ /** @const */ var a_3 = [
34
+ ["succ", -1, 1],
35
+ ["proc", -1, 1],
36
+ ["exc", -1, 1]
37
+ ];
38
+
39
+ /** @const */ var a_4 = [
40
+ ["even", -1, 2],
41
+ ["cann", -1, 2],
42
+ ["inn", -1, 2],
43
+ ["earr", -1, 2],
44
+ ["herr", -1, 2],
45
+ ["out", -1, 2],
46
+ ["y", -1, 1]
47
+ ];
48
+
49
+ /** @const */ var a_5 = [
50
+ ["", -1, -1],
51
+ ["ed", 0, 2],
52
+ ["eed", 1, 1],
53
+ ["ing", 0, 3],
54
+ ["edly", 0, 2],
55
+ ["eedly", 4, 1],
56
+ ["ingly", 0, 2]
57
+ ];
58
+
59
+ /** @const */ var a_6 = [
60
+ ["", -1, 3],
61
+ ["bb", 0, 2],
62
+ ["dd", 0, 2],
63
+ ["ff", 0, 2],
64
+ ["gg", 0, 2],
65
+ ["bl", 0, 1],
66
+ ["mm", 0, 2],
67
+ ["nn", 0, 2],
68
+ ["pp", 0, 2],
69
+ ["rr", 0, 2],
70
+ ["at", 0, 1],
71
+ ["tt", 0, 2],
72
+ ["iz", 0, 1]
73
+ ];
74
+
75
+ /** @const */ var a_7 = [
76
+ ["anci", -1, 3],
77
+ ["enci", -1, 2],
78
+ ["ogi", -1, 14],
79
+ ["li", -1, 16],
80
+ ["bli", 3, 12],
81
+ ["abli", 4, 4],
82
+ ["alli", 3, 8],
83
+ ["fulli", 3, 9],
84
+ ["lessli", 3, 15],
85
+ ["ousli", 3, 10],
86
+ ["entli", 3, 5],
87
+ ["aliti", -1, 8],
88
+ ["biliti", -1, 12],
89
+ ["iviti", -1, 11],
90
+ ["tional", -1, 1],
91
+ ["ational", 14, 7],
92
+ ["alism", -1, 8],
93
+ ["ation", -1, 7],
94
+ ["ization", 17, 6],
95
+ ["izer", -1, 6],
96
+ ["ator", -1, 7],
97
+ ["iveness", -1, 11],
98
+ ["fulness", -1, 9],
99
+ ["ousness", -1, 10],
100
+ ["ogist", -1, 13]
101
+ ];
102
+
103
+ /** @const */ var a_8 = [
104
+ ["icate", -1, 4],
105
+ ["ative", -1, 6],
106
+ ["alize", -1, 3],
107
+ ["iciti", -1, 4],
108
+ ["ical", -1, 4],
109
+ ["tional", -1, 1],
110
+ ["ational", 5, 2],
111
+ ["ful", -1, 5],
112
+ ["ness", -1, 5]
113
+ ];
114
+
115
+ /** @const */ var a_9 = [
116
+ ["ic", -1, 1],
117
+ ["ance", -1, 1],
118
+ ["ence", -1, 1],
119
+ ["able", -1, 1],
120
+ ["ible", -1, 1],
121
+ ["ate", -1, 1],
122
+ ["ive", -1, 1],
123
+ ["ize", -1, 1],
124
+ ["iti", -1, 1],
125
+ ["al", -1, 1],
126
+ ["ism", -1, 1],
127
+ ["ion", -1, 2],
128
+ ["er", -1, 1],
129
+ ["ous", -1, 1],
130
+ ["ant", -1, 1],
131
+ ["ent", -1, 1],
132
+ ["ment", 15, 1],
133
+ ["ement", 16, 1]
134
+ ];
135
+
136
+ /** @const */ var a_10 = [
137
+ ["e", -1, 1],
138
+ ["l", -1, 2]
139
+ ];
140
+
141
+ /** @const */ var a_11 = [
142
+ ["andes", -1, -1],
143
+ ["atlas", -1, -1],
144
+ ["bias", -1, -1],
145
+ ["cosmos", -1, -1],
146
+ ["early", -1, 5],
147
+ ["gently", -1, 3],
148
+ ["howe", -1, -1],
149
+ ["idly", -1, 2],
150
+ ["news", -1, -1],
151
+ ["only", -1, 6],
152
+ ["singly", -1, 7],
153
+ ["skies", -1, 1],
154
+ ["sky", -1, -1],
155
+ ["ugly", -1, 4]
156
+ ];
157
+
158
+ /** @const */ var /** Array<int> */ g_aeo = [17, 64];
159
+
160
+ /** @const */ var /** Array<int> */ g_v = [17, 65, 16, 1];
161
+
162
+ /** @const */ var /** Array<int> */ g_v_WXY = [1, 17, 65, 208, 1];
163
+
164
+ /** @const */ var /** Array<int> */ g_valid_LI = [55, 141, 2];
165
+
166
+ var /** boolean */ B_Y_found = false;
167
+ var /** number */ I_p2 = 0;
168
+ var /** number */ I_p1 = 0;
169
+
170
+
171
+ /** @return {boolean} */
172
+ function r_prelude() {
173
+ B_Y_found = false;
174
+ /** @const */ var /** number */ v_1 = base.cursor;
175
+ lab0: {
176
+ base.bra = base.cursor;
177
+ if (!(base.eq_s("'")))
178
+ {
179
+ break lab0;
180
+ }
181
+ base.ket = base.cursor;
182
+ if (!base.slice_del())
183
+ {
184
+ return false;
185
+ }
186
+ }
187
+ base.cursor = v_1;
188
+ /** @const */ var /** number */ v_2 = base.cursor;
189
+ lab1: {
190
+ base.bra = base.cursor;
191
+ if (!(base.eq_s("y")))
192
+ {
193
+ break lab1;
194
+ }
195
+ base.ket = base.cursor;
196
+ if (!base.slice_from("Y"))
197
+ {
198
+ return false;
199
+ }
200
+ B_Y_found = true;
201
+ }
202
+ base.cursor = v_2;
203
+ /** @const */ var /** number */ v_3 = base.cursor;
204
+ lab2: {
205
+ while(true)
206
+ {
207
+ /** @const */ var /** number */ v_4 = base.cursor;
208
+ lab3: {
209
+ golab4: while(true)
210
+ {
211
+ /** @const */ var /** number */ v_5 = base.cursor;
212
+ lab5: {
213
+ if (!(base.in_grouping(g_v, 97, 121)))
214
+ {
215
+ break lab5;
216
+ }
217
+ base.bra = base.cursor;
218
+ if (!(base.eq_s("y")))
219
+ {
220
+ break lab5;
221
+ }
222
+ base.ket = base.cursor;
223
+ base.cursor = v_5;
224
+ break golab4;
225
+ }
226
+ base.cursor = v_5;
227
+ if (base.cursor >= base.limit)
228
+ {
229
+ break lab3;
230
+ }
231
+ base.cursor++;
232
+ }
233
+ if (!base.slice_from("Y"))
234
+ {
235
+ return false;
236
+ }
237
+ B_Y_found = true;
238
+ continue;
239
+ }
240
+ base.cursor = v_4;
241
+ break;
242
+ }
243
+ }
244
+ base.cursor = v_3;
245
+ return true;
246
+ };
247
+
248
+ /** @return {boolean} */
249
+ function r_mark_regions() {
250
+ I_p1 = base.limit;
251
+ I_p2 = base.limit;
252
+ /** @const */ var /** number */ v_1 = base.cursor;
253
+ lab0: {
254
+ lab1: {
255
+ /** @const */ var /** number */ v_2 = base.cursor;
256
+ lab2: {
257
+ if (base.find_among(a_0) == 0)
258
+ {
259
+ break lab2;
260
+ }
261
+ break lab1;
262
+ }
263
+ base.cursor = v_2;
264
+ if (!base.go_out_grouping(g_v, 97, 121))
265
+ {
266
+ break lab0;
267
+ }
268
+ base.cursor++;
269
+ if (!base.go_in_grouping(g_v, 97, 121))
270
+ {
271
+ break lab0;
272
+ }
273
+ base.cursor++;
274
+ }
275
+ I_p1 = base.cursor;
276
+ if (!base.go_out_grouping(g_v, 97, 121))
277
+ {
278
+ break lab0;
279
+ }
280
+ base.cursor++;
281
+ if (!base.go_in_grouping(g_v, 97, 121))
282
+ {
283
+ break lab0;
284
+ }
285
+ base.cursor++;
286
+ I_p2 = base.cursor;
287
+ }
288
+ base.cursor = v_1;
289
+ return true;
290
+ };
291
+
292
+ /** @return {boolean} */
293
+ function r_shortv() {
294
+ lab0: {
295
+ /** @const */ var /** number */ v_1 = base.limit - base.cursor;
296
+ lab1: {
297
+ if (!(base.out_grouping_b(g_v_WXY, 89, 121)))
298
+ {
299
+ break lab1;
300
+ }
301
+ if (!(base.in_grouping_b(g_v, 97, 121)))
302
+ {
303
+ break lab1;
304
+ }
305
+ if (!(base.out_grouping_b(g_v, 97, 121)))
306
+ {
307
+ break lab1;
308
+ }
309
+ break lab0;
310
+ }
311
+ base.cursor = base.limit - v_1;
312
+ lab2: {
313
+ if (!(base.out_grouping_b(g_v, 97, 121)))
314
+ {
315
+ break lab2;
316
+ }
317
+ if (!(base.in_grouping_b(g_v, 97, 121)))
318
+ {
319
+ break lab2;
320
+ }
321
+ if (base.cursor > base.limit_backward)
322
+ {
323
+ break lab2;
324
+ }
325
+ break lab0;
326
+ }
327
+ base.cursor = base.limit - v_1;
328
+ if (!(base.eq_s_b("past")))
329
+ {
330
+ return false;
331
+ }
332
+ }
333
+ return true;
334
+ };
335
+
336
+ /** @return {boolean} */
337
+ function r_R1() {
338
+ return I_p1 <= base.cursor;
339
+ };
340
+
341
+ /** @return {boolean} */
342
+ function r_R2() {
343
+ return I_p2 <= base.cursor;
344
+ };
345
+
346
+ /** @return {boolean} */
347
+ function r_Step_1a() {
348
+ var /** number */ among_var;
349
+ /** @const */ var /** number */ v_1 = base.limit - base.cursor;
350
+ lab0: {
351
+ base.ket = base.cursor;
352
+ if (base.find_among_b(a_1) == 0)
353
+ {
354
+ base.cursor = base.limit - v_1;
355
+ break lab0;
356
+ }
357
+ base.bra = base.cursor;
358
+ if (!base.slice_del())
359
+ {
360
+ return false;
361
+ }
362
+ }
363
+ base.ket = base.cursor;
364
+ among_var = base.find_among_b(a_2);
365
+ if (among_var == 0)
366
+ {
367
+ return false;
368
+ }
369
+ base.bra = base.cursor;
370
+ switch (among_var) {
371
+ case 1:
372
+ if (!base.slice_from("ss"))
373
+ {
374
+ return false;
375
+ }
376
+ break;
377
+ case 2:
378
+ lab1: {
379
+ /** @const */ var /** number */ v_2 = base.limit - base.cursor;
380
+ lab2: {
381
+ {
382
+ /** @const */ var /** number */ c1 = base.cursor - 2;
383
+ if (c1 < base.limit_backward)
384
+ {
385
+ break lab2;
386
+ }
387
+ base.cursor = c1;
388
+ }
389
+ if (!base.slice_from("i"))
390
+ {
391
+ return false;
392
+ }
393
+ break lab1;
394
+ }
395
+ base.cursor = base.limit - v_2;
396
+ if (!base.slice_from("ie"))
397
+ {
398
+ return false;
399
+ }
400
+ }
401
+ break;
402
+ case 3:
403
+ if (base.cursor <= base.limit_backward)
404
+ {
405
+ return false;
406
+ }
407
+ base.cursor--;
408
+ if (!base.go_out_grouping_b(g_v, 97, 121))
409
+ {
410
+ return false;
411
+ }
412
+ base.cursor--;
413
+ if (!base.slice_del())
414
+ {
415
+ return false;
416
+ }
417
+ break;
418
+ }
419
+ return true;
420
+ };
421
+
422
+ /** @return {boolean} */
423
+ function r_Step_1b() {
424
+ var /** number */ among_var;
425
+ base.ket = base.cursor;
426
+ among_var = base.find_among_b(a_5);
427
+ base.bra = base.cursor;
428
+ lab0: {
429
+ /** @const */ var /** number */ v_1 = base.limit - base.cursor;
430
+ lab1: {
431
+ switch (among_var) {
432
+ case 1:
433
+ /** @const */ var /** number */ v_2 = base.limit - base.cursor;
434
+ lab2: {
435
+ lab3: {
436
+ /** @const */ var /** number */ v_3 = base.limit - base.cursor;
437
+ lab4: {
438
+ if (base.find_among_b(a_3) == 0)
439
+ {
440
+ break lab4;
441
+ }
442
+ if (base.cursor > base.limit_backward)
443
+ {
444
+ break lab4;
445
+ }
446
+ break lab3;
447
+ }
448
+ base.cursor = base.limit - v_3;
449
+ if (!r_R1())
450
+ {
451
+ break lab2;
452
+ }
453
+ if (!base.slice_from("ee"))
454
+ {
455
+ return false;
456
+ }
457
+ }
458
+ }
459
+ base.cursor = base.limit - v_2;
460
+ break;
461
+ case 2:
462
+ break lab1;
463
+ case 3:
464
+ among_var = base.find_among_b(a_4);
465
+ if (among_var == 0)
466
+ {
467
+ break lab1;
468
+ }
469
+ switch (among_var) {
470
+ case 1:
471
+ /** @const */ var /** number */ v_4 = base.limit - base.cursor;
472
+ if (!(base.out_grouping_b(g_v, 97, 121)))
473
+ {
474
+ break lab1;
475
+ }
476
+ if (base.cursor > base.limit_backward)
477
+ {
478
+ break lab1;
479
+ }
480
+ base.cursor = base.limit - v_4;
481
+ base.bra = base.cursor;
482
+ if (!base.slice_from("ie"))
483
+ {
484
+ return false;
485
+ }
486
+ break;
487
+ case 2:
488
+ if (base.cursor > base.limit_backward)
489
+ {
490
+ break lab1;
491
+ }
492
+ break;
493
+ }
494
+ break;
495
+ }
496
+ break lab0;
497
+ }
498
+ base.cursor = base.limit - v_1;
499
+ /** @const */ var /** number */ v_5 = base.limit - base.cursor;
500
+ if (!base.go_out_grouping_b(g_v, 97, 121))
501
+ {
502
+ return false;
503
+ }
504
+ base.cursor--;
505
+ base.cursor = base.limit - v_5;
506
+ if (!base.slice_del())
507
+ {
508
+ return false;
509
+ }
510
+ base.ket = base.cursor;
511
+ base.bra = base.cursor;
512
+ /** @const */ var /** number */ v_6 = base.limit - base.cursor;
513
+ among_var = base.find_among_b(a_6);
514
+ switch (among_var) {
515
+ case 1:
516
+ if (!base.slice_from("e"))
517
+ {
518
+ return false;
519
+ }
520
+ return false;
521
+ case 2:
522
+ {
523
+ /** @const */ var /** number */ v_7 = base.limit - base.cursor;
524
+ lab5: {
525
+ if (!(base.in_grouping_b(g_aeo, 97, 111)))
526
+ {
527
+ break lab5;
528
+ }
529
+ if (base.cursor > base.limit_backward)
530
+ {
531
+ break lab5;
532
+ }
533
+ return false;
534
+ }
535
+ base.cursor = base.limit - v_7;
536
+ }
537
+ break;
538
+ case 3:
539
+ if (base.cursor != I_p1)
540
+ {
541
+ return false;
542
+ }
543
+ /** @const */ var /** number */ v_8 = base.limit - base.cursor;
544
+ if (!r_shortv())
545
+ {
546
+ return false;
547
+ }
548
+ base.cursor = base.limit - v_8;
549
+ if (!base.slice_from("e"))
550
+ {
551
+ return false;
552
+ }
553
+ return false;
554
+ }
555
+ base.cursor = base.limit - v_6;
556
+ base.ket = base.cursor;
557
+ if (base.cursor <= base.limit_backward)
558
+ {
559
+ return false;
560
+ }
561
+ base.cursor--;
562
+ base.bra = base.cursor;
563
+ if (!base.slice_del())
564
+ {
565
+ return false;
566
+ }
567
+ }
568
+ return true;
569
+ };
570
+
571
+ /** @return {boolean} */
572
+ function r_Step_1c() {
573
+ base.ket = base.cursor;
574
+ lab0: {
575
+ /** @const */ var /** number */ v_1 = base.limit - base.cursor;
576
+ lab1: {
577
+ if (!(base.eq_s_b("y")))
578
+ {
579
+ break lab1;
580
+ }
581
+ break lab0;
582
+ }
583
+ base.cursor = base.limit - v_1;
584
+ if (!(base.eq_s_b("Y")))
585
+ {
586
+ return false;
587
+ }
588
+ }
589
+ base.bra = base.cursor;
590
+ if (!(base.out_grouping_b(g_v, 97, 121)))
591
+ {
592
+ return false;
593
+ }
594
+ lab2: {
595
+ if (base.cursor > base.limit_backward)
596
+ {
597
+ break lab2;
598
+ }
599
+ return false;
600
+ }
601
+ if (!base.slice_from("i"))
602
+ {
603
+ return false;
604
+ }
605
+ return true;
606
+ };
607
+
608
+ /** @return {boolean} */
609
+ function r_Step_2() {
610
+ var /** number */ among_var;
611
+ base.ket = base.cursor;
612
+ among_var = base.find_among_b(a_7);
613
+ if (among_var == 0)
614
+ {
615
+ return false;
616
+ }
617
+ base.bra = base.cursor;
618
+ if (!r_R1())
619
+ {
620
+ return false;
621
+ }
622
+ switch (among_var) {
623
+ case 1:
624
+ if (!base.slice_from("tion"))
625
+ {
626
+ return false;
627
+ }
628
+ break;
629
+ case 2:
630
+ if (!base.slice_from("ence"))
631
+ {
632
+ return false;
633
+ }
634
+ break;
635
+ case 3:
636
+ if (!base.slice_from("ance"))
637
+ {
638
+ return false;
639
+ }
640
+ break;
641
+ case 4:
642
+ if (!base.slice_from("able"))
643
+ {
644
+ return false;
645
+ }
646
+ break;
647
+ case 5:
648
+ if (!base.slice_from("ent"))
649
+ {
650
+ return false;
651
+ }
652
+ break;
653
+ case 6:
654
+ if (!base.slice_from("ize"))
655
+ {
656
+ return false;
657
+ }
658
+ break;
659
+ case 7:
660
+ if (!base.slice_from("ate"))
661
+ {
662
+ return false;
663
+ }
664
+ break;
665
+ case 8:
666
+ if (!base.slice_from("al"))
667
+ {
668
+ return false;
669
+ }
670
+ break;
671
+ case 9:
672
+ if (!base.slice_from("ful"))
673
+ {
674
+ return false;
675
+ }
676
+ break;
677
+ case 10:
678
+ if (!base.slice_from("ous"))
679
+ {
680
+ return false;
681
+ }
682
+ break;
683
+ case 11:
684
+ if (!base.slice_from("ive"))
685
+ {
686
+ return false;
687
+ }
688
+ break;
689
+ case 12:
690
+ if (!base.slice_from("ble"))
691
+ {
692
+ return false;
693
+ }
694
+ break;
695
+ case 13:
696
+ if (!base.slice_from("og"))
697
+ {
698
+ return false;
699
+ }
700
+ break;
701
+ case 14:
702
+ if (!(base.eq_s_b("l")))
703
+ {
704
+ return false;
705
+ }
706
+ if (!base.slice_from("og"))
707
+ {
708
+ return false;
709
+ }
710
+ break;
711
+ case 15:
712
+ if (!base.slice_from("less"))
713
+ {
714
+ return false;
715
+ }
716
+ break;
717
+ case 16:
718
+ if (!(base.in_grouping_b(g_valid_LI, 99, 116)))
719
+ {
720
+ return false;
721
+ }
722
+ if (!base.slice_del())
723
+ {
724
+ return false;
725
+ }
726
+ break;
727
+ }
728
+ return true;
729
+ };
730
+
731
+ /** @return {boolean} */
732
+ function r_Step_3() {
733
+ var /** number */ among_var;
734
+ base.ket = base.cursor;
735
+ among_var = base.find_among_b(a_8);
736
+ if (among_var == 0)
737
+ {
738
+ return false;
739
+ }
740
+ base.bra = base.cursor;
741
+ if (!r_R1())
742
+ {
743
+ return false;
744
+ }
745
+ switch (among_var) {
746
+ case 1:
747
+ if (!base.slice_from("tion"))
748
+ {
749
+ return false;
750
+ }
751
+ break;
752
+ case 2:
753
+ if (!base.slice_from("ate"))
754
+ {
755
+ return false;
756
+ }
757
+ break;
758
+ case 3:
759
+ if (!base.slice_from("al"))
760
+ {
761
+ return false;
762
+ }
763
+ break;
764
+ case 4:
765
+ if (!base.slice_from("ic"))
766
+ {
767
+ return false;
768
+ }
769
+ break;
770
+ case 5:
771
+ if (!base.slice_del())
772
+ {
773
+ return false;
774
+ }
775
+ break;
776
+ case 6:
777
+ if (!r_R2())
778
+ {
779
+ return false;
780
+ }
781
+ if (!base.slice_del())
782
+ {
783
+ return false;
784
+ }
785
+ break;
786
+ }
787
+ return true;
788
+ };
789
+
790
+ /** @return {boolean} */
791
+ function r_Step_4() {
792
+ var /** number */ among_var;
793
+ base.ket = base.cursor;
794
+ among_var = base.find_among_b(a_9);
795
+ if (among_var == 0)
796
+ {
797
+ return false;
798
+ }
799
+ base.bra = base.cursor;
800
+ if (!r_R2())
801
+ {
802
+ return false;
803
+ }
804
+ switch (among_var) {
805
+ case 1:
806
+ if (!base.slice_del())
807
+ {
808
+ return false;
809
+ }
810
+ break;
811
+ case 2:
812
+ lab0: {
813
+ /** @const */ var /** number */ v_1 = base.limit - base.cursor;
814
+ lab1: {
815
+ if (!(base.eq_s_b("s")))
816
+ {
817
+ break lab1;
818
+ }
819
+ break lab0;
820
+ }
821
+ base.cursor = base.limit - v_1;
822
+ if (!(base.eq_s_b("t")))
823
+ {
824
+ return false;
825
+ }
826
+ }
827
+ if (!base.slice_del())
828
+ {
829
+ return false;
830
+ }
831
+ break;
832
+ }
833
+ return true;
834
+ };
835
+
836
+ /** @return {boolean} */
837
+ function r_Step_5() {
838
+ var /** number */ among_var;
839
+ base.ket = base.cursor;
840
+ among_var = base.find_among_b(a_10);
841
+ if (among_var == 0)
842
+ {
843
+ return false;
844
+ }
845
+ base.bra = base.cursor;
846
+ switch (among_var) {
847
+ case 1:
848
+ lab0: {
849
+ lab1: {
850
+ if (!r_R2())
851
+ {
852
+ break lab1;
853
+ }
854
+ break lab0;
855
+ }
856
+ if (!r_R1())
857
+ {
858
+ return false;
859
+ }
860
+ {
861
+ /** @const */ var /** number */ v_1 = base.limit - base.cursor;
862
+ lab2: {
863
+ if (!r_shortv())
864
+ {
865
+ break lab2;
866
+ }
867
+ return false;
868
+ }
869
+ base.cursor = base.limit - v_1;
870
+ }
871
+ }
872
+ if (!base.slice_del())
873
+ {
874
+ return false;
875
+ }
876
+ break;
877
+ case 2:
878
+ if (!r_R2())
879
+ {
880
+ return false;
881
+ }
882
+ if (!(base.eq_s_b("l")))
883
+ {
884
+ return false;
885
+ }
886
+ if (!base.slice_del())
887
+ {
888
+ return false;
889
+ }
890
+ break;
891
+ }
892
+ return true;
893
+ };
894
+
895
+ /** @return {boolean} */
896
+ function r_exception1() {
897
+ var /** number */ among_var;
898
+ base.bra = base.cursor;
899
+ among_var = base.find_among(a_11);
900
+ if (among_var == 0)
901
+ {
902
+ return false;
903
+ }
904
+ base.ket = base.cursor;
905
+ if (base.cursor < base.limit)
906
+ {
907
+ return false;
908
+ }
909
+ switch (among_var) {
910
+ case 1:
911
+ if (!base.slice_from("sky"))
912
+ {
913
+ return false;
914
+ }
915
+ break;
916
+ case 2:
917
+ if (!base.slice_from("idl"))
918
+ {
919
+ return false;
920
+ }
921
+ break;
922
+ case 3:
923
+ if (!base.slice_from("gentl"))
924
+ {
925
+ return false;
926
+ }
927
+ break;
928
+ case 4:
929
+ if (!base.slice_from("ugli"))
930
+ {
931
+ return false;
932
+ }
933
+ break;
934
+ case 5:
935
+ if (!base.slice_from("earli"))
936
+ {
937
+ return false;
938
+ }
939
+ break;
940
+ case 6:
941
+ if (!base.slice_from("onli"))
942
+ {
943
+ return false;
944
+ }
945
+ break;
946
+ case 7:
947
+ if (!base.slice_from("singl"))
948
+ {
949
+ return false;
950
+ }
951
+ break;
952
+ }
953
+ return true;
954
+ };
955
+
956
+ /** @return {boolean} */
957
+ function r_postlude() {
958
+ if (!B_Y_found)
959
+ {
960
+ return false;
961
+ }
962
+ while(true)
963
+ {
964
+ /** @const */ var /** number */ v_1 = base.cursor;
965
+ lab0: {
966
+ golab1: while(true)
967
+ {
968
+ /** @const */ var /** number */ v_2 = base.cursor;
969
+ lab2: {
970
+ base.bra = base.cursor;
971
+ if (!(base.eq_s("Y")))
972
+ {
973
+ break lab2;
974
+ }
975
+ base.ket = base.cursor;
976
+ base.cursor = v_2;
977
+ break golab1;
978
+ }
979
+ base.cursor = v_2;
980
+ if (base.cursor >= base.limit)
981
+ {
982
+ break lab0;
983
+ }
984
+ base.cursor++;
985
+ }
986
+ if (!base.slice_from("y"))
987
+ {
988
+ return false;
989
+ }
990
+ continue;
991
+ }
992
+ base.cursor = v_1;
993
+ break;
994
+ }
995
+ return true;
996
+ };
997
+
998
+ this.stem = /** @return {boolean} */ function() {
999
+ lab0: {
1000
+ /** @const */ var /** number */ v_1 = base.cursor;
1001
+ lab1: {
1002
+ if (!r_exception1())
1003
+ {
1004
+ break lab1;
1005
+ }
1006
+ break lab0;
1007
+ }
1008
+ base.cursor = v_1;
1009
+ lab2: {
1010
+ {
1011
+ /** @const */ var /** number */ v_2 = base.cursor;
1012
+ lab3: {
1013
+ {
1014
+ /** @const */ var /** number */ c1 = base.cursor + 3;
1015
+ if (c1 > base.limit)
1016
+ {
1017
+ break lab3;
1018
+ }
1019
+ base.cursor = c1;
1020
+ }
1021
+ break lab2;
1022
+ }
1023
+ base.cursor = v_2;
1024
+ }
1025
+ break lab0;
1026
+ }
1027
+ base.cursor = v_1;
1028
+ r_prelude();
1029
+ r_mark_regions();
1030
+ base.limit_backward = base.cursor; base.cursor = base.limit;
1031
+ /** @const */ var /** number */ v_3 = base.limit - base.cursor;
1032
+ r_Step_1a();
1033
+ base.cursor = base.limit - v_3;
1034
+ /** @const */ var /** number */ v_4 = base.limit - base.cursor;
1035
+ r_Step_1b();
1036
+ base.cursor = base.limit - v_4;
1037
+ /** @const */ var /** number */ v_5 = base.limit - base.cursor;
1038
+ r_Step_1c();
1039
+ base.cursor = base.limit - v_5;
1040
+ /** @const */ var /** number */ v_6 = base.limit - base.cursor;
1041
+ r_Step_2();
1042
+ base.cursor = base.limit - v_6;
1043
+ /** @const */ var /** number */ v_7 = base.limit - base.cursor;
1044
+ r_Step_3();
1045
+ base.cursor = base.limit - v_7;
1046
+ /** @const */ var /** number */ v_8 = base.limit - base.cursor;
1047
+ r_Step_4();
1048
+ base.cursor = base.limit - v_8;
1049
+ /** @const */ var /** number */ v_9 = base.limit - base.cursor;
1050
+ r_Step_5();
1051
+ base.cursor = base.limit - v_9;
1052
+ base.cursor = base.limit_backward;
1053
+ /** @const */ var /** number */ v_10 = base.cursor;
1054
+ r_postlude();
1055
+ base.cursor = v_10;
1056
+ }
1057
+ return true;
1058
+ };
1059
+
1060
+ /**@return{string}*/
1061
+ this['stemWord'] = function(/**string*/word) {
1062
+ base.setCurrent(word);
1063
+ this.stem();
1064
+ return base.getCurrent();
1065
+ };
1066
+ };