semvec/pypi-packages huggingface dataset:
intent-detection 0.1.2
Local, CPU-friendly pre-filter for text: linguistic sanity (pseudo-perplexity), nonsense score, toxicity, and language — no hard-coded intents.
License: MIT
Requires Python: >=3.9
Keywords: chatbot, filtering, nlp, perplexity, safety, toxicity

# intent-detection

Local, CPU-friendly pre-filter for user text:
- **pseudo-perplexity (DistilRoBERTa)** → fluency / “is it human-like?”
- **nonsense score** → composite of pPPL + word statistics
- **toxicity** → compact English toxicity classifier
- **language detection** → `langid`

## Install

```
pip install intent-prefilter
```

## Quick start
```
from intent_prefilter import run_prefilter

v = run_prefilter("Use of dornes in nowray")
print(v.action, v.nonsense_score, v.pppl, v.toxicity)
```

## Notes
- Runs fully local, no hand-crafted intent labels. 
- Adjust thresholds in config.py if needed.
autonfs 0.3.2
An end-to-end feature selection distribution with linear runtime(number of features) complexity.
License: MIT
Requires Python: <4.0,>=3.9

# AutoNFS

AutoNFS is a deep learning model that can be used to select the most important features from a given dataset. The model is based on the Gumbel-Sigmoid distribution.

## Installation
To install the package, you can use pip:
```bash
pip install autonfs
```

## Usage examples
### Basic usage
```python
from autonfs import AutoNFS
from sklearn.datasets import load_breast_cancer

breast = load_breast_cancer()
X = breast.data
y = breast.target

gfs = AutoNFS()
X = gfs.fit_transform(X, y)

print(gfs.support_)
print(gfs.scores_)
```

### Performance verification
```python
from autonfs import AutoNFS
from sklearn.datasets import load_breast_cancer
from sklearn.model_selection import train_test_split
from sklearn.ensemble import RandomForestClassifier
from sklearn.metrics import balanced_accuracy_score

DEVICE = "cpu"

breast = load_breast_cancer()
X = breast.data
y = breast.target

X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=42)
clf = RandomForestClassifier(random_state=42)
clf.train(X_train, y_train)
orig_score = balanced_accuracy_score(y_test, clf.predict(X_test))

print(f"Original score: {orig_score:.3f}. Original features: {X.shape[1]}")
# Original score: 0.958. Original features: 30

gfs = AutoNFS(verbose=True, device=DEVICE)
gfs.fit(X_train, y_train)

X_transformed = gfs.transform(X_train)
X_test_transformed = gfs.transform(X_test)

clf.fit(X_transformed, y_train)
y_pred = clf.predict(X_test_transformed)
score = balanced_accuracy_score(y_test, y_pred)
logger.info(f"Score after feature selection: {score}. Selected features: {sum(gfs.support_)}")
# Score after feature selection: 0.958. Selected features: 3
```
weighted-cardinality-estimation 0.0.2
Fast weighted cardinality sketches in C++ with Python bindings.
License: MIT
Requires Python: >=3.9

# weighted-cardinality-estimation

# Przykład użycia

    from weighted_cardinality_estimation import ExpSketch

    sketch = ExpSketch(400, list(range(400)))
    sketch.add("elem1", 5)
    print(sketch.estimate())

# To install in repo use

```bash
python -m pip install -e . --no-deps --no-build-isolation -vvv
pytest
```