Upload 9 files
Browse files- .gitattributes +0 -4
- README.md +3 -4
- config.json +43 -0
- pytorch_model.bin +3 -0
- special_tokens_map.json +1 -0
- tokenizer.json +0 -0
- tokenizer_config.json +1 -0
- training_args.bin +3 -0
- vocab.txt +0 -0
.gitattributes
CHANGED
@@ -2,13 +2,11 @@
|
|
2 |
*.arrow filter=lfs diff=lfs merge=lfs -text
|
3 |
*.bin filter=lfs diff=lfs merge=lfs -text
|
4 |
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
5 |
-
*.ckpt filter=lfs diff=lfs merge=lfs -text
|
6 |
*.ftz filter=lfs diff=lfs merge=lfs -text
|
7 |
*.gz filter=lfs diff=lfs merge=lfs -text
|
8 |
*.h5 filter=lfs diff=lfs merge=lfs -text
|
9 |
*.joblib filter=lfs diff=lfs merge=lfs -text
|
10 |
*.lfs.* filter=lfs diff=lfs merge=lfs -text
|
11 |
-
*.mlmodel filter=lfs diff=lfs merge=lfs -text
|
12 |
*.model filter=lfs diff=lfs merge=lfs -text
|
13 |
*.msgpack filter=lfs diff=lfs merge=lfs -text
|
14 |
*.npy filter=lfs diff=lfs merge=lfs -text
|
@@ -22,10 +20,8 @@
|
|
22 |
*.pt filter=lfs diff=lfs merge=lfs -text
|
23 |
*.pth filter=lfs diff=lfs merge=lfs -text
|
24 |
*.rar filter=lfs diff=lfs merge=lfs -text
|
25 |
-
*.safetensors filter=lfs diff=lfs merge=lfs -text
|
26 |
saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
27 |
*.tar.* filter=lfs diff=lfs merge=lfs -text
|
28 |
-
*.tar filter=lfs diff=lfs merge=lfs -text
|
29 |
*.tflite filter=lfs diff=lfs merge=lfs -text
|
30 |
*.tgz filter=lfs diff=lfs merge=lfs -text
|
31 |
*.wasm filter=lfs diff=lfs merge=lfs -text
|
|
|
2 |
*.arrow filter=lfs diff=lfs merge=lfs -text
|
3 |
*.bin filter=lfs diff=lfs merge=lfs -text
|
4 |
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
|
|
5 |
*.ftz filter=lfs diff=lfs merge=lfs -text
|
6 |
*.gz filter=lfs diff=lfs merge=lfs -text
|
7 |
*.h5 filter=lfs diff=lfs merge=lfs -text
|
8 |
*.joblib filter=lfs diff=lfs merge=lfs -text
|
9 |
*.lfs.* filter=lfs diff=lfs merge=lfs -text
|
|
|
10 |
*.model filter=lfs diff=lfs merge=lfs -text
|
11 |
*.msgpack filter=lfs diff=lfs merge=lfs -text
|
12 |
*.npy filter=lfs diff=lfs merge=lfs -text
|
|
|
20 |
*.pt filter=lfs diff=lfs merge=lfs -text
|
21 |
*.pth filter=lfs diff=lfs merge=lfs -text
|
22 |
*.rar filter=lfs diff=lfs merge=lfs -text
|
|
|
23 |
saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
24 |
*.tar.* filter=lfs diff=lfs merge=lfs -text
|
|
|
25 |
*.tflite filter=lfs diff=lfs merge=lfs -text
|
26 |
*.tgz filter=lfs diff=lfs merge=lfs -text
|
27 |
*.wasm filter=lfs diff=lfs merge=lfs -text
|
README.md
CHANGED
@@ -19,8 +19,8 @@ For more information: [tdd.ai - MilliyetNER](https://data.tdd.ai/#/effafb5f-ebfc
|
|
19 |
# USAGE
|
20 |
```python
|
21 |
from transformers import pipeline, AutoModelForTokenClassification, AutoTokenizer
|
22 |
-
model = AutoModelForTokenClassification.from_pretrained("
|
23 |
-
tokenizer = AutoTokenizer.from_pretrained("
|
24 |
ner_pipeline = pipeline('ner', model=model, tokenizer=tokenizer)
|
25 |
ner_pipeline("Türkiye'nin başkenti Ankara, ilk cumhurbaşkanı Mustafa Kemal Atatürk'tür.")
|
26 |
```
|
@@ -70,5 +70,4 @@ ORGANIZATION 0.95 0.92 0.94 863
|
|
70 |
micro avg 0.97 0.95 0.96 3233
|
71 |
macro avg 0.96 0.95 0.96 3233
|
72 |
weighted avg 0.97 0.95 0.96 3233
|
73 |
-
```
|
74 |
-
|
|
|
19 |
# USAGE
|
20 |
```python
|
21 |
from transformers import pipeline, AutoModelForTokenClassification, AutoTokenizer
|
22 |
+
model = AutoModelForTokenClassification.from_pretrained("alierenak/berturk-cased-ner")
|
23 |
+
tokenizer = AutoTokenizer.from_pretrained("alierenak/berturk-cased-ner")
|
24 |
ner_pipeline = pipeline('ner', model=model, tokenizer=tokenizer)
|
25 |
ner_pipeline("Türkiye'nin başkenti Ankara, ilk cumhurbaşkanı Mustafa Kemal Atatürk'tür.")
|
26 |
```
|
|
|
70 |
micro avg 0.97 0.95 0.96 3233
|
71 |
macro avg 0.96 0.95 0.96 3233
|
72 |
weighted avg 0.97 0.95 0.96 3233
|
73 |
+
```
|
|
config.json
ADDED
@@ -0,0 +1,43 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_name_or_path": "dbmdz/bert-base-turkish-cased",
|
3 |
+
"architectures": [
|
4 |
+
"BertForTokenClassification"
|
5 |
+
],
|
6 |
+
"attention_probs_dropout_prob": 0.1,
|
7 |
+
"gradient_checkpointing": false,
|
8 |
+
"hidden_act": "gelu",
|
9 |
+
"hidden_dropout_prob": 0.1,
|
10 |
+
"hidden_size": 768,
|
11 |
+
"id2label": {
|
12 |
+
"0": "B-LOCATION",
|
13 |
+
"1": "B-ORGANIZATION",
|
14 |
+
"2": "B-PERSON",
|
15 |
+
"3": "I-LOCATION",
|
16 |
+
"4": "I-ORGANIZATION",
|
17 |
+
"5": "I-PERSON",
|
18 |
+
"6": "O"
|
19 |
+
},
|
20 |
+
"initializer_range": 0.02,
|
21 |
+
"intermediate_size": 3072,
|
22 |
+
"label2id": {
|
23 |
+
"B-LOCATION": 0,
|
24 |
+
"B-ORGANIZATION": 1,
|
25 |
+
"B-PERSON": 2,
|
26 |
+
"I-LOCATION": 3,
|
27 |
+
"I-ORGANIZATION": 4,
|
28 |
+
"I-PERSON": 5,
|
29 |
+
"O": 6
|
30 |
+
},
|
31 |
+
"layer_norm_eps": 1e-12,
|
32 |
+
"max_position_embeddings": 512,
|
33 |
+
"model_type": "bert",
|
34 |
+
"num_attention_heads": 12,
|
35 |
+
"num_hidden_layers": 12,
|
36 |
+
"pad_token_id": 0,
|
37 |
+
"position_embedding_type": "absolute",
|
38 |
+
"torch_dtype": "float32",
|
39 |
+
"transformers_version": "4.9.2",
|
40 |
+
"type_vocab_size": 2,
|
41 |
+
"use_cache": true,
|
42 |
+
"vocab_size": 32000
|
43 |
+
}
|
pytorch_model.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:0d8ebf8e442ab3111024ca2fae2f92c8061b6fa7f4c094112b43ff40b8e49234
|
3 |
+
size 440215056
|
special_tokens_map.json
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
{"unk_token": "[UNK]", "sep_token": "[SEP]", "pad_token": "[PAD]", "cls_token": "[CLS]", "mask_token": "[MASK]"}
|
tokenizer.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|
tokenizer_config.json
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
{"do_lower_case": false, "unk_token": "[UNK]", "sep_token": "[SEP]", "pad_token": "[PAD]", "cls_token": "[CLS]", "mask_token": "[MASK]", "tokenize_chinese_chars": true, "strip_accents": null, "max_len": 512, "special_tokens_map_file": null, "name_or_path": "dbmdz/bert-base-turkish-cased", "do_basic_tokenize": true, "never_split": null, "tokenizer_class": "BertTokenizer"}
|
training_args.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:e5f708e2458bf41fff0ba3f13a4b7fa875d90004240b8db6644c0b8831d21264
|
3 |
+
size 2607
|
vocab.txt
ADDED
The diff for this file is too large to render.
See raw diff
|
|