Views
No views yet
| Uygun İlan | Is Ilani Degil | Mustehcen | Cift Pozisyon | |
|---|---|---|---|---|
| Precision | 0.986 | 0.996 | 0.966 | 0.970 |
| Recall | 0.992 | 0.986 | 0.966 | 0.959 |
| F1 Score | 0.989 | 0.991 | 0.966 | 0.965 |
| Accuracy : 0.975 |
1from transformers import AutoTokenizer, TextClassificationPipeline, AutoModelForSequenceClassification
2
3tokenizer = AutoTokenizer.from_pretrained("nanelimon/bert-base-turkish-job-advertisement")
4model = AutoModelForSequenceClassification.from_pretrained("nanelimon/bert-base-turkish-job-advertisement")
5pipe = TextClassificationPipeline(model=model, tokenizer=tokenizer)
6
7
8def set_sentence(sentence: str):
9 result = sentence.lower().replace('ö', 'o').replace('ı', 'i').replace('ü', 'u').replace('ç', 'c').replace('ğ', 'g').replace('ş', 's')
10 return result
11
12
13print(pipe(set_sentence('Fiziği düzgün 17 yaş kızlar aranıyor')))
14output: [{'label': 'Mustehcen', 'score': 0.9992677569389343}]