Update README.md
Browse files
README.md
CHANGED
|
@@ -1,3 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
# Spam Detection — English (Naive Bayes)
|
| 2 |
|
| 3 |
A lightweight spam/ham text classifier for English messages, built with a
|
|
@@ -17,16 +45,9 @@ multilingual spam detection system that automatically routes text to a
|
|
| 17 |
language-specific model (English or Arabic) based on detected language.
|
| 18 |
|
| 19 |
## How to Use
|
| 20 |
-
|
| 21 |
import joblib
|
| 22 |
|
| 23 |
model = joblib.load("spam_eng_nb.joblib")
|
| 24 |
prediction = model.predict(["Congratulations! You've won a free prize, click here now"])
|
| 25 |
-
print(prediction) # 1 = spam, 0 = ham
|
| 26 |
-
\```
|
| 27 |
-
|
| 28 |
-
## Limitations
|
| 29 |
-
- Trained on a specific dataset distribution; may not generalize well to
|
| 30 |
-
domains very different from training data (e.g. highly technical or
|
| 31 |
-
slang-heavy text)
|
| 32 |
-
- Naive Bayes assumes word independence — does not capture context or word order
|
|
|
|
| 1 |
+
---
|
| 2 |
+
language:
|
| 3 |
+
- en
|
| 4 |
+
license: mit
|
| 5 |
+
tags:
|
| 6 |
+
- text-classification
|
| 7 |
+
- naive-bayes
|
| 8 |
+
- tf-idf
|
| 9 |
+
- english-nlp
|
| 10 |
+
- spam-detection
|
| 11 |
+
pipeline_tag: text-classification
|
| 12 |
+
metrics:
|
| 13 |
+
- accuracy
|
| 14 |
+
model-index:
|
| 15 |
+
- name: Spam Detection — English (Naive Bayes)
|
| 16 |
+
results:
|
| 17 |
+
- task:
|
| 18 |
+
type: text-classification
|
| 19 |
+
name: Text Classification
|
| 20 |
+
dataset:
|
| 21 |
+
name: English Spam Dataset
|
| 22 |
+
type: custom
|
| 23 |
+
metrics:
|
| 24 |
+
- type: accuracy
|
| 25 |
+
value: 0.994
|
| 26 |
+
name: Accuracy
|
| 27 |
+
---
|
| 28 |
+
|
| 29 |
# Spam Detection — English (Naive Bayes)
|
| 30 |
|
| 31 |
A lightweight spam/ham text classifier for English messages, built with a
|
|
|
|
| 45 |
language-specific model (English or Arabic) based on detected language.
|
| 46 |
|
| 47 |
## How to Use
|
| 48 |
+
```python
|
| 49 |
import joblib
|
| 50 |
|
| 51 |
model = joblib.load("spam_eng_nb.joblib")
|
| 52 |
prediction = model.predict(["Congratulations! You've won a free prize, click here now"])
|
| 53 |
+
print(prediction) # 1 = spam, 0 = ham
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|