* Handling missing type & docs in cleanlab/token_classification_utils.py 🏷️
- Added typehints for the cleanlabs/token_classification_utils.py file for mypy strict mode
- Fixed corresponding docstrings refers #587
* Handling missing type & docs in cleanlab/multilabel_classification.py 🏷️
- Fixing all errors for mypy strict for the file
* docs(internal): fix "number of new classes" variable in docstring
Co-authored-by: Elías Snorrason <eliassno@gmail.com>
* docs: 📝 add usage example for get_sentence
Also remove types in docstrings.
* docs: 📝 add usage examples for filter_sentence
* docs: 📝 add page for internal.token_classification_utils
* docs: 📝 remove name of return variable
auto-tagging won't work correctly for the return value if it's not a tuple
* 📝 add pages for modules in cleanlab.token_classification
* fix indentation
* 📝 add token classification api to toctree
* 🎨 format docstrings
* 📝 add usage examples
* update example comment
* 📝 add usage examples
* 📝 add return variable name in docstring
* 📝 remove some hard-coded params types in rank module
Keep more complex parameters hard-coded for now. E.g. "enum"-like parameters.
* 🎨 remove indentation of parameters in docstrings
* 🎨 fix indentation
* colored docstring typo + formatting
* typo: occurence
* probs_merged docstring typo + formatting
Co-authored-by: Jonas Mueller <1390638+jwmueller@users.noreply.github.com>
* header for multiannotator module
* header for outlier module
* header for token_classification.filter
* header for token_classification.rank
* header for token_classification.summary
* header for util
* header for latent_algebra
* header for label_quality_utils
* header for token_classification_utils
* header for huggingfacekerasclassifier
* add experimental modules' dependencies to readme
* ✨ search tokenized sentence for coloring
Searches through the list of tokens before trying to match substrings. Thanks for this code suggestion Eric!
* 🚧 fix signature in all calls to color_sentence
* ✅ update color_sentence test after changing its api
(sentence, word) -> (word, tokens)
* ⏪ use regex for coloring tokens in sentence
Find word boundaries with regex, use builtin replace() as fallback w/o boundaries.
Closes#288
* 🚑 invert fallback condition
Use replace if NO substitutions were made with regex.
* 🏷️ restrict parameters for list types
* 🐛 only process characters in input token
Example: process_token("Cleanlab", [("C", "a"), ("a", "C")]) should return "aleCnlCb", not "CleCnlCb".
* ✅ use all sentences in test_get_sentence
* ✅ add test cases to test_filter_sentence
* ✅ extent test cases in test_mapping
* 📝 clean up docstrings
Restrict arg types based on docstrings. Fix punctuation and typos. Add examples to docstring.
* ✅ split tests for filter_sentence
* ✅ extend test_merge_probs
* ✅ test merge_probs with ignored/normalized columns in probs
* ✅ extend test cases for get_sentences
* ⚰️ remove unused pandas import
* 🏷️ pass strict mypy check
We ignore np.max as it is untyped.
No issues found in token_classification_utils.py by running
```
mypy --install-types --non-interactive --strict cleanlab/internal/token_classification_utils.py
```
* 👷 add strict type-checking in CI
* 💚 use strict type-check for single file
* ⏪ remove strict type check in CI
* refactor: 🏷️ use np.ndarray type instead of npt.NDArray
* ⏪ go back to generic np.ndarray type
* ♻️ always return tuple in filter_sentence
Remove unused argument+docstring. Simplify relevant unit tests.
* 🔥 resolve comments on typing
Remove ignore-comments. Remove duplicate tag in docstring. Remove unused imports.
* 🔥 remove duplicate tag in docstring