Views
No views yet
1from transformers import pipeline
2import pandas as pd
3
4text = "Bu toplam sıfır ise, Newton'ın birinci yasası cismin hareket durumunun değişmeyeceğini söyler."
5model_id = "saribasmetehan/bert-base-turkish-uncased-ner"
6ner = pipeline("ner",model = model_id)
7preds= ner(text, aggregation_strategy = "simple")
8
9pd.DataFrame(preds)
101from transformers import AutoModelForTokenClassification, AutoTokenizer
2
3model_name = "saribasmetehan/bert-base-turkish-uncased-ner"
4tokenizer = AutoTokenizer.from_pretrained(model_name)
5model = AutoModelForTokenClassification.from_pretrained(model_name)
6| Training Loss | Epoch | Step | Validation Loss | F1 |
|---|---|---|---|---|
| 0.4 | 1.0 | 1186 | 0.2502 | 0.7703 |
| 0.2227 | 2.0 | 2372 | 0.2439 | 0.7740 |
| 0.1738 | 3.0 | 3558 | 0.2511 | 0.7783 |
| 0.1474 | 4.0 | 4744 | 0.2603 | 0.7821 |