Instructions to use Gorengoz/bert-based-Turkish-NER with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Gorengoz/bert-based-Turkish-NER with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("token-classification", model="Gorengoz/bert-based-Turkish-NER")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForTokenClassification tokenizer = AutoTokenizer.from_pretrained("Gorengoz/bert-based-Turkish-NER") model = AutoModelForTokenClassification.from_pretrained("Gorengoz/bert-based-Turkish-NER", device_map="auto") - Notebooks
- Google Colab
- Kaggle
|
Download README.md from Gorengoz/bert-based-Turkish-NER: direct link, hf CLI and curl.
- Browser
- Download file 1.34 kB
-
https://huggingface.co/Gorengoz/bert-based-Turkish-NER/resolve/main/README.md
- Command line
-
hf download hf://Gorengoz/bert-based-Turkish-NER/README.md
-
curl -L -o README.md https://huggingface.co/Gorengoz/bert-based-Turkish-NER/resolve/main/README.md
1.34 kB
| license: mit | |
| language: | |
| - tr | |
| metrics: | |
| - accuracy | |
| - f1 | |
| pipeline_tag: token-classification | |
| tags: | |
| - ner | |
| - turkish-ner | |
| - turkish | |
| - nlp | |
| Bu model "https://github.com/stefan-it/turkish-bert" base alınarak geliştirilmiş bir NER(Varlık ismi tanıma) modelidir. | |
| ## Eğitim ve validasyon verisi | |
| Fine-tune işlemi için TDD-NER-202112-CC-001 veri seti kullanılmıştır. | |
| @article{tur-etal-2003-milliyet, | |
| title={A statistical information extraction system for Turkish}, | |
| volume={9}, | |
| DOI={10.1017/S135132490200284X}, | |
| number={2}, | |
| journal={Natural Language Engineering}, | |
| publisher={Cambridge University Press}, | |
| author={Tür, Gökhan and Hakkani-Tür, Dilek and Oflazer, Kemal}, | |
| year={2003}, | |
| pages={181–210} | |
| } | |
| ### Hiperparametreler | |
| custom_labels = ["O","B-LOC","I-LOC","B-ORG","I-ORG","B-PER","I-PER"] | |
| model_args = { | |
| "train_batch_size": 32, | |
| "eval_batch_size": 32, | |
| "num_train_epochs": 3, | |
| "seed":1, | |
| "save_steps": 625, | |
| "overwrite_output_dir": True, | |
| "output_dir": "/content/Model" | |
| } | |
| ### Nasıl Kullanılacağı | |
| ``` | |
| from transformers import pipeline | |
| pipe = pipeline("token-classification", model="Gorengoz/bert-based-Turkish-NER") | |
| pipe("Entity X'in müşteri hizmetleri hızlı ve etkili, Entity Y'nin ürün kalitesi çok kötü.",aggregation_strategy = "simple"") | |
| ``` |