strable 0.1.0__tar.gz → 0.2.0__tar.gz

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 (127) hide show
  1. {strable-0.1.0/strable.egg-info → strable-0.2.0}/PKG-INFO +7 -4
  2. {strable-0.1.0 → strable-0.2.0}/README.md +3 -2
  3. {strable-0.1.0 → strable-0.2.0}/pyproject.toml +6 -2
  4. {strable-0.1.0 → strable-0.2.0}/strable/__init__.py +1 -1
  5. {strable-0.1.0 → strable-0.2.0}/strable/taxonomy.py +8 -3
  6. {strable-0.1.0 → strable-0.2.0/strable.egg-info}/PKG-INFO +7 -4
  7. {strable-0.1.0 → strable-0.2.0}/strable.egg-info/requires.txt +4 -1
  8. {strable-0.1.0 → strable-0.2.0}/tests/test_encoders_taxonomy.py +7 -0
  9. {strable-0.1.0 → strable-0.2.0}/LICENSE +0 -0
  10. {strable-0.1.0 → strable-0.2.0}/setup.cfg +0 -0
  11. {strable-0.1.0 → strable-0.2.0}/strable/data/folds/aca-federal-upper-limits-wide.parquet +0 -0
  12. {strable-0.1.0 → strable-0.2.0}/strable/data/folds/aijob_ai-ml-ds-salaries.parquet +0 -0
  13. {strable-0.1.0 → strable-0.2.0}/strable/data/folds/animalandveterinary-event.parquet +0 -0
  14. {strable-0.1.0 → strable-0.2.0}/strable/data/folds/antenna-structure-registration.parquet +0 -0
  15. {strable-0.1.0 → strable-0.2.0}/strable/data/folds/awarded-grants.parquet +0 -0
  16. {strable-0.1.0 → strable-0.2.0}/strable/data/folds/beer-ratings.parquet +0 -0
  17. {strable-0.1.0 → strable-0.2.0}/strable/data/folds/broadband-availability.parquet +0 -0
  18. {strable-0.1.0 → strable-0.2.0}/strable/data/folds/california-houses.parquet +0 -0
  19. {strable-0.1.0 → strable-0.2.0}/strable/data/folds/child-adult-healthcare-quality.parquet +0 -0
  20. {strable-0.1.0 → strable-0.2.0}/strable/data/folds/china-overseas-finance-inventory.parquet +0 -0
  21. {strable-0.1.0 → strable-0.2.0}/strable/data/folds/chocolate-bar-ratings.parquet +0 -0
  22. {strable-0.1.0 → strable-0.2.0}/strable/data/folds/clear-corpus.parquet +0 -0
  23. {strable-0.1.0 → strable-0.2.0}/strable/data/folds/cohort-default-rate.parquet +0 -0
  24. {strable-0.1.0 → strable-0.2.0}/strable/data/folds/college-creditcard-marketing.parquet +0 -0
  25. {strable-0.1.0 → strable-0.2.0}/strable/data/folds/college-deposit-product-marketing.parquet +0 -0
  26. {strable-0.1.0 → strable-0.2.0}/strable/data/folds/colleges-and-universities.parquet +0 -0
  27. {strable-0.1.0 → strable-0.2.0}/strable/data/folds/commitments-in-trust-funds.parquet +0 -0
  28. {strable-0.1.0 → strable-0.2.0}/strable/data/folds/community-banking_wide.parquet +0 -0
  29. {strable-0.1.0 → strable-0.2.0}/strable/data/folds/conflict-events_wide.parquet +0 -0
  30. {strable-0.1.0 → strable-0.2.0}/strable/data/folds/contract-awards-investment-project-financing.parquet +0 -0
  31. {strable-0.1.0 → strable-0.2.0}/strable/data/folds/contributions-to-financial-intermediary-funds.parquet +0 -0
  32. {strable-0.1.0 → strable-0.2.0}/strable/data/folds/corporate-procurement-contract-awards.parquet +0 -0
  33. {strable-0.1.0 → strable-0.2.0}/strable/data/folds/cosmetic-event.parquet +0 -0
  34. {strable-0.1.0 → strable-0.2.0}/strable/data/folds/covid-clinical-trials.parquet +0 -0
  35. {strable-0.1.0 → strable-0.2.0}/strable/data/folds/device-classification.parquet +0 -0
  36. {strable-0.1.0 → strable-0.2.0}/strable/data/folds/device-covid19serology.parquet +0 -0
  37. {strable-0.1.0 → strable-0.2.0}/strable/data/folds/device-pma.parquet +0 -0
  38. {strable-0.1.0 → strable-0.2.0}/strable/data/folds/disbursements-in-trust-funds.parquet +0 -0
  39. {strable-0.1.0 → strable-0.2.0}/strable/data/folds/discretionary-grant.parquet +0 -0
  40. {strable-0.1.0 → strable-0.2.0}/strable/data/folds/drug-drugsfda.parquet +0 -0
  41. {strable-0.1.0 → strable-0.2.0}/strable/data/folds/drug-enforcement.parquet +0 -0
  42. {strable-0.1.0 → strable-0.2.0}/strable/data/folds/drug-ndc.parquet +0 -0
  43. {strable-0.1.0 → strable-0.2.0}/strable/data/folds/drug-shortages.parquet +0 -0
  44. {strable-0.1.0 → strable-0.2.0}/strable/data/folds/electric-generating-plants.parquet +0 -0
  45. {strable-0.1.0 → strable-0.2.0}/strable/data/folds/electric-retail-service-territories.parquet +0 -0
  46. {strable-0.1.0 → strable-0.2.0}/strable/data/folds/external-clinician-dashboard.parquet +0 -0
  47. {strable-0.1.0 → strable-0.2.0}/strable/data/folds/financial-intermediary-funds-cash-transfers.parquet +0 -0
  48. {strable-0.1.0 → strable-0.2.0}/strable/data/folds/financial-intermediary-funds-commitments.parquet +0 -0
  49. {strable-0.1.0 → strable-0.2.0}/strable/data/folds/financial-intermediary-funds-funding-decisions.parquet +0 -0
  50. {strable-0.1.0 → strable-0.2.0}/strable/data/folds/financial-management.parquet +0 -0
  51. {strable-0.1.0 → strable-0.2.0}/strable/data/folds/financial-product-complaint.parquet +0 -0
  52. {strable-0.1.0 → strable-0.2.0}/strable/data/folds/first-time-nadac-rates.parquet +0 -0
  53. {strable-0.1.0 → strable-0.2.0}/strable/data/folds/food-enforcement.parquet +0 -0
  54. {strable-0.1.0 → strable-0.2.0}/strable/data/folds/food-event.parquet +0 -0
  55. {strable-0.1.0 → strable-0.2.0}/strable/data/folds/food-prices_wide.parquet +0 -0
  56. {strable-0.1.0 → strable-0.2.0}/strable/data/folds/foreign-gift-and-contract.parquet +0 -0
  57. {strable-0.1.0 → strable-0.2.0}/strable/data/folds/fts-funding.parquet +0 -0
  58. {strable-0.1.0 → strable-0.2.0}/strable/data/folds/fts-requirement-and-funding.parquet +0 -0
  59. {strable-0.1.0 → strable-0.2.0}/strable/data/folds/gainful-employment.parquet +0 -0
  60. {strable-0.1.0 → strable-0.2.0}/strable/data/folds/global-dams-database.parquet +0 -0
  61. {strable-0.1.0 → strable-0.2.0}/strable/data/folds/global-power-plant.parquet +0 -0
  62. {strable-0.1.0 → strable-0.2.0}/strable/data/folds/grant.parquet +0 -0
  63. {strable-0.1.0 → strable-0.2.0}/strable/data/folds/health-professional-shortage-areas.parquet +0 -0
  64. {strable-0.1.0 → strable-0.2.0}/strable/data/folds/historic-perimeters-wildfires.parquet +0 -0
  65. {strable-0.1.0 → strable-0.2.0}/strable/data/folds/historical-earthquake-locations.parquet +0 -0
  66. {strable-0.1.0 → strable-0.2.0}/strable/data/folds/historical-volcanic-locations.parquet +0 -0
  67. {strable-0.1.0 → strable-0.2.0}/strable/data/folds/hospitals.parquet +0 -0
  68. {strable-0.1.0 → strable-0.2.0}/strable/data/folds/hypertension-control-wide.parquet +0 -0
  69. {strable-0.1.0 → strable-0.2.0}/strable/data/folds/ibrd-statement-loans-guarantees.parquet +0 -0
  70. {strable-0.1.0 → strable-0.2.0}/strable/data/folds/ida-statement-credits-grants-guarantees.parquet +0 -0
  71. {strable-0.1.0 → strable-0.2.0}/strable/data/folds/ifc-advisory-services-projects.parquet +0 -0
  72. {strable-0.1.0 → strable-0.2.0}/strable/data/folds/ifc-investment-service-projects.parquet +0 -0
  73. {strable-0.1.0 → strable-0.2.0}/strable/data/folds/industry-payments-entity.parquet +0 -0
  74. {strable-0.1.0 → strable-0.2.0}/strable/data/folds/industry-payments-project.parquet +0 -0
  75. {strable-0.1.0 → strable-0.2.0}/strable/data/folds/insurance-company-complaints.parquet +0 -0
  76. {strable-0.1.0 → strable-0.2.0}/strable/data/folds/journal-ranking_wide.parquet +0 -0
  77. {strable-0.1.0 → strable-0.2.0}/strable/data/folds/kickstarter-projects.parquet +0 -0
  78. {strable-0.1.0 → strable-0.2.0}/strable/data/folds/lending-club-loan.parquet +0 -0
  79. {strable-0.1.0 → strable-0.2.0}/strable/data/folds/local-government-renewable-action.parquet +0 -0
  80. {strable-0.1.0 → strable-0.2.0}/strable/data/folds/local-law-enforcements.parquet +0 -0
  81. {strable-0.1.0 → strable-0.2.0}/strable/data/folds/managed-care-enrollment.parquet +0 -0
  82. {strable-0.1.0 → strable-0.2.0}/strable/data/folds/manifest.json +0 -0
  83. {strable-0.1.0 → strable-0.2.0}/strable/data/folds/media-ranking_wide.parquet +0 -0
  84. {strable-0.1.0 → strable-0.2.0}/strable/data/folds/medically-underserved-areas-populations.parquet +0 -0
  85. {strable-0.1.0 → strable-0.2.0}/strable/data/folds/medicines.parquet +0 -0
  86. {strable-0.1.0 → strable-0.2.0}/strable/data/folds/mercari.parquet +0 -0
  87. {strable-0.1.0 → strable-0.2.0}/strable/data/folds/meta-critic_whisky.parquet +0 -0
  88. {strable-0.1.0 → strable-0.2.0}/strable/data/folds/michelin-ratings.parquet +0 -0
  89. {strable-0.1.0 → strable-0.2.0}/strable/data/folds/miga-issued-projects.parquet +0 -0
  90. {strable-0.1.0 → strable-0.2.0}/strable/data/folds/mlr-summary-reports.parquet +0 -0
  91. {strable-0.1.0 → strable-0.2.0}/strable/data/folds/mobile-home-parks.parquet +0 -0
  92. {strable-0.1.0 → strable-0.2.0}/strable/data/folds/museums.parquet +0 -0
  93. {strable-0.1.0 → strable-0.2.0}/strable/data/folds/national-average-drug-acquisition-cost.parquet +0 -0
  94. {strable-0.1.0 → strable-0.2.0}/strable/data/folds/oil-natural-gas-platform.parquet +0 -0
  95. {strable-0.1.0 → strable-0.2.0}/strable/data/folds/orphan-designations.parquet +0 -0
  96. {strable-0.1.0 → strable-0.2.0}/strable/data/folds/osha-accidents.parquet +0 -0
  97. {strable-0.1.0 → strable-0.2.0}/strable/data/folds/paediatric-investigation-plan.parquet +0 -0
  98. {strable-0.1.0 → strable-0.2.0}/strable/data/folds/pol-terminal.parquet +0 -0
  99. {strable-0.1.0 → strable-0.2.0}/strable/data/folds/power-plants.parquet +0 -0
  100. {strable-0.1.0 → strable-0.2.0}/strable/data/folds/prepaid-financial-product.parquet +0 -0
  101. {strable-0.1.0 → strable-0.2.0}/strable/data/folds/prison-boundaries.parquet +0 -0
  102. {strable-0.1.0 → strable-0.2.0}/strable/data/folds/ramen-ratings.parquet +0 -0
  103. {strable-0.1.0 → strable-0.2.0}/strable/data/folds/rasff_window.parquet +0 -0
  104. {strable-0.1.0 → strable-0.2.0}/strable/data/folds/rasnf_notification_list.parquet +0 -0
  105. {strable-0.1.0 → strable-0.2.0}/strable/data/folds/recipient-executed-grants-commitments-disbursements.parquet +0 -0
  106. {strable-0.1.0 → strable-0.2.0}/strable/data/folds/schools.parquet +0 -0
  107. {strable-0.1.0 → strable-0.2.0}/strable/data/folds/sf-building-permits.parquet +0 -0
  108. {strable-0.1.0 → strable-0.2.0}/strable/data/folds/summary-of-deposit_wide.parquet +0 -0
  109. {strable-0.1.0 → strable-0.2.0}/strable/data/folds/tax-incentives.parquet +0 -0
  110. {strable-0.1.0 → strable-0.2.0}/strable/data/folds/terms-cc-plans.parquet +0 -0
  111. {strable-0.1.0 → strable-0.2.0}/strable/data/folds/tobacco-problem.parquet +0 -0
  112. {strable-0.1.0 → strable-0.2.0}/strable/data/folds/total-contributions-ibrd-ida-ifc.parquet +0 -0
  113. {strable-0.1.0 → strable-0.2.0}/strable/data/folds/transmission-lines.parquet +0 -0
  114. {strable-0.1.0 → strable-0.2.0}/strable/data/folds/transmission-towers.parquet +0 -0
  115. {strable-0.1.0 → strable-0.2.0}/strable/data/folds/us-school-bus-fleet.parquet +0 -0
  116. {strable-0.1.0 → strable-0.2.0}/strable/data/folds/vehicles.parquet +0 -0
  117. {strable-0.1.0 → strable-0.2.0}/strable/data/folds/wine-dataset.parquet +0 -0
  118. {strable-0.1.0 → strable-0.2.0}/strable/data/folds/workforce-demographics-wide.parquet +0 -0
  119. {strable-0.1.0 → strable-0.2.0}/strable/data/folds/yelp_business.parquet +0 -0
  120. {strable-0.1.0 → strable-0.2.0}/strable/datasets.py +0 -0
  121. {strable-0.1.0 → strable-0.2.0}/strable/encoders.py +0 -0
  122. {strable-0.1.0 → strable-0.2.0}/strable/evaluation.py +0 -0
  123. {strable-0.1.0 → strable-0.2.0}/strable.egg-info/SOURCES.txt +0 -0
  124. {strable-0.1.0 → strable-0.2.0}/strable.egg-info/dependency_links.txt +0 -0
  125. {strable-0.1.0 → strable-0.2.0}/strable.egg-info/top_level.txt +0 -0
  126. {strable-0.1.0 → strable-0.2.0}/tests/test_datasets.py +0 -0
  127. {strable-0.1.0 → strable-0.2.0}/tests/test_evaluation.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: strable
3
- Version: 0.1.0
3
+ Version: 0.2.0
4
4
  Summary: STRABLE: Benchmarking Tabular Machine Learning with Strings
5
5
  Author: Myung Jun Kim, Félix Lefebvre, Lennart Purucker, Alan Arazi, Eilam Shapira, Roi Reichart, Frank Hutter, Marine Le Morvan, David Holzmüller, Gaël Varoquaux
6
6
  Author-email: Gioia Blayer <gioia.blayer@inria.fr>
@@ -32,7 +32,8 @@ Requires-Dist: pyarrow
32
32
  Requires-Dist: scikit-learn>=1.6
33
33
  Requires-Dist: skrub>=0.6
34
34
  Requires-Dist: huggingface_hub
35
- Requires-Dist: nltk>=3.8
35
+ Provides-Extra: taxonomy
36
+ Requires-Dist: nltk>=3.8; extra == "taxonomy"
36
37
  Provides-Extra: test
37
38
  Requires-Dist: pytest; extra == "test"
38
39
  Requires-Dist: coverage; extra == "test"
@@ -61,6 +62,7 @@ Requires-Dist: huggingface_hub==0.36.0; extra == "paper"
61
62
  Requires-Dist: openml>=0.14; extra == "paper"
62
63
  Requires-Dist: xmltodict>=0.13; extra == "paper"
63
64
  Requires-Dist: gdown>=5.0; extra == "paper"
65
+ Requires-Dist: nltk>=3.8; extra == "paper"
64
66
  Provides-Extra: extra
65
67
  Requires-Dist: openml; extra == "extra"
66
68
  Requires-Dist: xmltodict; extra == "extra"
@@ -96,7 +98,8 @@ Dynamic: license-file
96
98
  ## 📦 Install and use
97
99
 
98
100
  ```bash
99
- pip install strable
101
+ pip install strable # tables, folds, evaluate, Tf-Idf
102
+ pip install "strable[taxonomy]" # also strable.profile, the string taxonomy (adds NLTK)
100
103
  ```
101
104
 
102
105
  ```python
@@ -114,7 +117,7 @@ print(scores[["table", "fold", "score"]])
114
117
  columns, mix = strable.profile(X) # type of each string column, and the table's mix
115
118
  ```
116
119
 
117
- `strable.list_tables()` names the 108 tables (`list_tables("regression")`, `"classification"`, …). `evaluate` uses the [leaderboard](https://gblayer.github.io/strable-leaderboard/)'s folds, metrics and checks; with no `tables`, it runs every regression table for a regressor and every classification table for a classifier. Scores can move slightly with other library versions: SciPy 1.17 and later shift the Tf-Idf features by about 1e-7, and learners change across scikit-learn versions. The leaderboard's environment has scikit-learn 1.7.2, SciPy 1.16.3 and skrub 0.7.0. The tables are public, so no Hugging Face token is needed. On its first call, `profile` downloads NLTK's `words` and `stopwords` corpora (about 800 KB) if they are missing. The package does not include the paper's experiments: for those, set up the full environment of Step 1 below.
120
+ `strable.list_tables()` names the 108 tables (`list_tables("regression")`, `"classification"`, …). `evaluate` uses the [leaderboard](https://gblayer.github.io/strable-leaderboard/)'s folds, metrics and checks; with no `tables`, it runs every regression table for a regressor and every classification table for a classifier. Scores can move slightly with other library versions: SciPy 1.17 and later shift the Tf-Idf features by about 1e-7, and learners change across scikit-learn versions. The leaderboard's environment has scikit-learn 1.7.2, SciPy 1.16.3 and skrub 0.7.0. The tables are public, so no Hugging Face token is needed. `profile` needs the `taxonomy` extra; on its first call, it downloads NLTK's `words` and `stopwords` corpora (about 800 KB) if they are missing. The package does not include the paper's experiments: for those, set up the full environment of Step 1 below.
118
121
 
119
122
  ---
120
123
 
@@ -28,7 +28,8 @@
28
28
  ## 📦 Install and use
29
29
 
30
30
  ```bash
31
- pip install strable
31
+ pip install strable # tables, folds, evaluate, Tf-Idf
32
+ pip install "strable[taxonomy]" # also strable.profile, the string taxonomy (adds NLTK)
32
33
  ```
33
34
 
34
35
  ```python
@@ -46,7 +47,7 @@ print(scores[["table", "fold", "score"]])
46
47
  columns, mix = strable.profile(X) # type of each string column, and the table's mix
47
48
  ```
48
49
 
49
- `strable.list_tables()` names the 108 tables (`list_tables("regression")`, `"classification"`, …). `evaluate` uses the [leaderboard](https://gblayer.github.io/strable-leaderboard/)'s folds, metrics and checks; with no `tables`, it runs every regression table for a regressor and every classification table for a classifier. Scores can move slightly with other library versions: SciPy 1.17 and later shift the Tf-Idf features by about 1e-7, and learners change across scikit-learn versions. The leaderboard's environment has scikit-learn 1.7.2, SciPy 1.16.3 and skrub 0.7.0. The tables are public, so no Hugging Face token is needed. On its first call, `profile` downloads NLTK's `words` and `stopwords` corpora (about 800 KB) if they are missing. The package does not include the paper's experiments: for those, set up the full environment of Step 1 below.
50
+ `strable.list_tables()` names the 108 tables (`list_tables("regression")`, `"classification"`, …). `evaluate` uses the [leaderboard](https://gblayer.github.io/strable-leaderboard/)'s folds, metrics and checks; with no `tables`, it runs every regression table for a regressor and every classification table for a classifier. Scores can move slightly with other library versions: SciPy 1.17 and later shift the Tf-Idf features by about 1e-7, and learners change across scikit-learn versions. The leaderboard's environment has scikit-learn 1.7.2, SciPy 1.16.3 and skrub 0.7.0. The tables are public, so no Hugging Face token is needed. `profile` needs the `taxonomy` extra; on its first call, it downloads NLTK's `words` and `stopwords` corpora (about 800 KB) if they are missing. The package does not include the paper's experiments: for those, set up the full environment of Step 1 below.
50
51
 
51
52
  ---
52
53
 
@@ -39,7 +39,8 @@ classifiers = [
39
39
  "Programming Language :: Python :: 3.11",
40
40
  "Programming Language :: Python :: 3.12",
41
41
  ]
42
- # The package `strable`: tables, folds, evaluation, Tf-Idf encoder and string taxonomy.
42
+ # The package `strable`: tables, folds, evaluation and Tf-Idf encoder. The string taxonomy, `strable.profile`,
43
+ # also needs NLTK: `pip install "strable[taxonomy]"`.
43
44
  dependencies = [
44
45
  "numpy<2.4", # numpy 2.5 makes pandas 2.3 crash on dates past 2262 (see requirements.txt)
45
46
  "pandas",
@@ -47,7 +48,6 @@ dependencies = [
47
48
  "scikit-learn>=1.6",
48
49
  "skrub>=0.6",
49
50
  "huggingface_hub",
50
- "nltk>=3.8",
51
51
  ]
52
52
 
53
53
  [project.urls]
@@ -57,6 +57,9 @@ Dataset = "https://huggingface.co/datasets/inria-soda/STRABLE-benchmark"
57
57
  Paper = "https://arxiv.org/abs/2605.12292"
58
58
 
59
59
  [project.optional-dependencies]
60
+ taxonomy = [
61
+ "nltk>=3.8",
62
+ ]
60
63
  test = [
61
64
  "pytest",
62
65
  "coverage",
@@ -90,6 +93,7 @@ paper = [
90
93
  "openml>=0.14",
91
94
  "xmltodict>=0.13",
92
95
  "gdown>=5.0",
96
+ "nltk>=3.8",
93
97
  ]
94
98
  extra = [
95
99
  "openml",
@@ -9,5 +9,5 @@ from .datasets import get_folds, list_tables, load_table
9
9
  from .evaluation import evaluate
10
10
  from .taxonomy import profile
11
11
 
12
- __version__ = "0.1.0"
12
+ __version__ = "0.2.0"
13
13
  __all__ = ["encoders", "evaluate", "get_folds", "list_tables", "load_table", "profile"]
@@ -7,8 +7,9 @@ are those of ``classify_column_heuristic`` in
7
7
  scripts/natural_language_test_VSE_vs_STRABLE_vs_CARTE_vs_TTB.py of the STRABLE repository.
8
8
 
9
9
  The word lists are NLTK's corpora, as in the paper: ``words`` (its English file ``en``, the Unix
10
- "words" file) for the dictionary hit rate, and ``stopwords`` (English). The first call downloads
11
- them with ``nltk.download`` when they are missing.
10
+ "words" file) for the dictionary hit rate, and ``stopwords`` (English). NLTK is not a dependency of
11
+ the core package: ``pip install "strable[taxonomy]"`` installs it. The first call downloads the
12
+ corpora with ``nltk.download`` when they are missing.
12
13
  """
13
14
 
14
15
  from __future__ import annotations
@@ -52,7 +53,11 @@ class Profile(NamedTuple):
52
53
 
53
54
  def _nltk_corpus(name: str):
54
55
  """NLTK's corpus ``name``, downloaded quietly the first time it is missing."""
55
- import nltk # imported here: only profile() needs it
56
+ try:
57
+ import nltk # imported here: only profile() needs it
58
+ except ImportError:
59
+ raise ImportError('strable.profile needs NLTK, which the core package does not install: '
60
+ 'pip install "strable[taxonomy]"') from None
56
61
 
57
62
  try:
58
63
  nltk.data.find(f"corpora/{name}")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: strable
3
- Version: 0.1.0
3
+ Version: 0.2.0
4
4
  Summary: STRABLE: Benchmarking Tabular Machine Learning with Strings
5
5
  Author: Myung Jun Kim, Félix Lefebvre, Lennart Purucker, Alan Arazi, Eilam Shapira, Roi Reichart, Frank Hutter, Marine Le Morvan, David Holzmüller, Gaël Varoquaux
6
6
  Author-email: Gioia Blayer <gioia.blayer@inria.fr>
@@ -32,7 +32,8 @@ Requires-Dist: pyarrow
32
32
  Requires-Dist: scikit-learn>=1.6
33
33
  Requires-Dist: skrub>=0.6
34
34
  Requires-Dist: huggingface_hub
35
- Requires-Dist: nltk>=3.8
35
+ Provides-Extra: taxonomy
36
+ Requires-Dist: nltk>=3.8; extra == "taxonomy"
36
37
  Provides-Extra: test
37
38
  Requires-Dist: pytest; extra == "test"
38
39
  Requires-Dist: coverage; extra == "test"
@@ -61,6 +62,7 @@ Requires-Dist: huggingface_hub==0.36.0; extra == "paper"
61
62
  Requires-Dist: openml>=0.14; extra == "paper"
62
63
  Requires-Dist: xmltodict>=0.13; extra == "paper"
63
64
  Requires-Dist: gdown>=5.0; extra == "paper"
65
+ Requires-Dist: nltk>=3.8; extra == "paper"
64
66
  Provides-Extra: extra
65
67
  Requires-Dist: openml; extra == "extra"
66
68
  Requires-Dist: xmltodict; extra == "extra"
@@ -96,7 +98,8 @@ Dynamic: license-file
96
98
  ## 📦 Install and use
97
99
 
98
100
  ```bash
99
- pip install strable
101
+ pip install strable # tables, folds, evaluate, Tf-Idf
102
+ pip install "strable[taxonomy]" # also strable.profile, the string taxonomy (adds NLTK)
100
103
  ```
101
104
 
102
105
  ```python
@@ -114,7 +117,7 @@ print(scores[["table", "fold", "score"]])
114
117
  columns, mix = strable.profile(X) # type of each string column, and the table's mix
115
118
  ```
116
119
 
117
- `strable.list_tables()` names the 108 tables (`list_tables("regression")`, `"classification"`, …). `evaluate` uses the [leaderboard](https://gblayer.github.io/strable-leaderboard/)'s folds, metrics and checks; with no `tables`, it runs every regression table for a regressor and every classification table for a classifier. Scores can move slightly with other library versions: SciPy 1.17 and later shift the Tf-Idf features by about 1e-7, and learners change across scikit-learn versions. The leaderboard's environment has scikit-learn 1.7.2, SciPy 1.16.3 and skrub 0.7.0. The tables are public, so no Hugging Face token is needed. On its first call, `profile` downloads NLTK's `words` and `stopwords` corpora (about 800 KB) if they are missing. The package does not include the paper's experiments: for those, set up the full environment of Step 1 below.
120
+ `strable.list_tables()` names the 108 tables (`list_tables("regression")`, `"classification"`, …). `evaluate` uses the [leaderboard](https://gblayer.github.io/strable-leaderboard/)'s folds, metrics and checks; with no `tables`, it runs every regression table for a regressor and every classification table for a classifier. Scores can move slightly with other library versions: SciPy 1.17 and later shift the Tf-Idf features by about 1e-7, and learners change across scikit-learn versions. The leaderboard's environment has scikit-learn 1.7.2, SciPy 1.16.3 and skrub 0.7.0. The tables are public, so no Hugging Face token is needed. `profile` needs the `taxonomy` extra; on its first call, it downloads NLTK's `words` and `stopwords` corpora (about 800 KB) if they are missing. The package does not include the paper's experiments: for those, set up the full environment of Step 1 below.
118
121
 
119
122
  ---
120
123
 
@@ -4,7 +4,6 @@ pyarrow
4
4
  scikit-learn>=1.6
5
5
  skrub>=0.6
6
6
  huggingface_hub
7
- nltk>=3.8
8
7
 
9
8
  [extra]
10
9
  openml
@@ -35,6 +34,10 @@ huggingface_hub==0.36.0
35
34
  openml>=0.14
36
35
  xmltodict>=0.13
37
36
  gdown>=5.0
37
+ nltk>=3.8
38
+
39
+ [taxonomy]
40
+ nltk>=3.8
38
41
 
39
42
  [test]
40
43
  pytest
@@ -85,6 +85,13 @@ def test_profile_offline_without_corpora_says_how_to_get_them(monkeypatch, fresh
85
85
  strable.profile(_table())
86
86
 
87
87
 
88
+ def test_profile_without_nltk_says_which_extra_installs_it(monkeypatch, fresh_word_lists):
89
+ """NLTK is optional: without it, profile() names the extra to install."""
90
+ monkeypatch.setitem(sys.modules, "nltk", None) # import nltk now raises ImportError
91
+ with pytest.raises(ImportError, match=r'pip install "strable\[taxonomy\]"'):
92
+ strable.profile(_table())
93
+
94
+
88
95
  @pytest.mark.network
89
96
  def test_profile_downloads_the_nltk_corpora(tmp_path):
90
97
  """A fresh process whose NLTK folder and home are empty downloads the two corpora there."""
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes