taidng commited on
Commit
74e2387
·
1 Parent(s): 9465bfd

initial commit for wikiser-bert-large

Browse files
README.md CHANGED
@@ -1,3 +1,65 @@
1
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
  license: apache-2.0
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+ tags:
3
+ - software engineering
4
+ - ner
5
+ - named-entity recognition
6
+ - token-classification
7
+ widget:
8
+ - text: >-
9
+ In 2005, Nokia developed a Linux-based operating system called Maemo, which shipped that year on the Nokia 770 Internet Tablet.
10
+ example_title: example 1
11
+ - text: >-
12
+ The Linux kernel is a widely ported operating system kernela and runs on a highly diverse range of computer architectures, including ARM-based Android smartphones and the IBM Z mainframes.
13
+ example_title: example 2
14
+ - text: >-
15
+ Windows XP was originally bundled with Internet Explorer 6.
16
+ example_title: example 3
17
+ language:
18
+ - en
19
+ datasets:
20
+ - wikiser
21
  license: apache-2.0
22
  ---
23
+ # Software Entity Recognition with Noise-robust Learning
24
+
25
+ We train a BERT model for the task software entity recognition (SER).
26
+ The training data leverages WikiSER, a corpus of 1.7M sentences extracted from Wikipedia.
27
+ The model uses _self-regularization_ during the finetuning process, allowing it to be robust to texts in the software domain, including misannotations, different naming conventions, and others.
28
+
29
+ The model recognizes 12 fine-grained named entities: `Algorithm`, `Application`, `Architecture`, `Data_Structure`, `Device`, `Error_Name`, `General_Concept`, `Language`,
30
+ `Library`, `License`, `Operating_System`, and `Protocol`.
31
+
32
+ ## Model details
33
+
34
+ Paper: Coming...
35
+
36
+ Code: https://github.com/taidnguyen/software_entity_recognition
37
+
38
+ Finetuned from model: `bert-large-cased`
39
+
40
+ ## How to use
41
+
42
+ ```python
43
+ from transformers import AutoTokenizer, AutoModelForTokenClassification
44
+
45
+ tokenizer = AutoTokenizer.from_pretrained("taidng/wikiser-bert-large")
46
+ model = AutoModelForTokenClassification.from_pretrained("taidng/wikiser-bert-large")
47
+
48
+ nlp = pipeline("ner", model=model, tokenizer=tokenizer)
49
+ example = "Windows XP was originally bundled with Internet Explorer 6."
50
+
51
+ ner_results = nlp(example)
52
+ print(ner_results)
53
+ ```
54
+
55
+ ## Citation
56
+
57
+ ```bibtex
58
+ @inproceedings{nguyen2023software,
59
+ title={Software Entity Recognition with Noise-Robust Learning},
60
+ author={Nguyen, Tai and Di, Yifeng and Lee, Joohan and Chen, Muhao and Zhang, Tianyi},
61
+ booktitle={Proceedings of the 38th IEEE/ACM International Conference on Automated Software Engineering (ASE'23)},
62
+ year={2023},
63
+ organization={IEEE/ACM}
64
+ }
65
+ ```
config.json ADDED
@@ -0,0 +1,86 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "bert-large-cased",
3
+ "architectures": [
4
+ "BertForTokenClassification"
5
+ ],
6
+ "attention_probs_dropout_prob": 0.1,
7
+ "classifier_dropout": null,
8
+ "directionality": "bidi",
9
+ "gradient_checkpointing": false,
10
+ "hidden_act": "gelu",
11
+ "hidden_dropout_prob": 0.1,
12
+ "hidden_size": 1024,
13
+ "id2label": {
14
+ "0": "B-Algorithm",
15
+ "1": "I-Algorithm",
16
+ "2": "B-Application",
17
+ "3": "I-Application",
18
+ "4": "B-Architecture",
19
+ "5": "I-Architecture",
20
+ "6": "B-Data_Structure",
21
+ "7": "I-Data_Structure",
22
+ "8": "B-Device",
23
+ "9": "I-Device",
24
+ "10": "B-Error_Name",
25
+ "11": "I-Error_Name",
26
+ "12": "B-General_Concept",
27
+ "13": "I-General_Concept",
28
+ "14": "B-Language",
29
+ "15": "I-Language",
30
+ "16": "B-Library",
31
+ "17": "I-Library",
32
+ "18": "B-License",
33
+ "19": "I-License",
34
+ "20": "B-Operating_System",
35
+ "21": "I-Operating_System",
36
+ "22": "B-Protocol",
37
+ "23": "I-Protocol",
38
+ "24": "O"
39
+ },
40
+ "initializer_range": 0.02,
41
+ "intermediate_size": 4096,
42
+ "label2id": {
43
+ "B-Algorithm": 0,
44
+ "B-Application": 2,
45
+ "B-Architecture": 4,
46
+ "B-Data_Structure": 6,
47
+ "B-Device": 8,
48
+ "B-Error_Name": 10,
49
+ "B-General_Concept": 12,
50
+ "B-Language": 14,
51
+ "B-Library": 16,
52
+ "B-License": 18,
53
+ "B-Operating_System": 20,
54
+ "B-Protocol": 22,
55
+ "I-Algorithm": 1,
56
+ "I-Application": 3,
57
+ "I-Architecture": 5,
58
+ "I-Data_Structure": 7,
59
+ "I-Device": 9,
60
+ "I-Error_Name": 11,
61
+ "I-General_Concept": 13,
62
+ "I-Language": 15,
63
+ "I-Library": 17,
64
+ "I-License": 19,
65
+ "I-Operating_System": 21,
66
+ "I-Protocol": 23,
67
+ "O": 24
68
+ },
69
+ "layer_norm_eps": 1e-12,
70
+ "max_position_embeddings": 512,
71
+ "model_type": "bert",
72
+ "num_attention_heads": 16,
73
+ "num_hidden_layers": 24,
74
+ "pad_token_id": 0,
75
+ "pooler_fc_size": 768,
76
+ "pooler_num_attention_heads": 12,
77
+ "pooler_num_fc_layers": 3,
78
+ "pooler_size_per_head": 128,
79
+ "pooler_type": "first_token_transform",
80
+ "position_embedding_type": "absolute",
81
+ "torch_dtype": "float32",
82
+ "transformers_version": "4.28.0",
83
+ "type_vocab_size": 2,
84
+ "use_cache": true,
85
+ "vocab_size": 28996
86
+ }
pytorch_model.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2e3a8827bee2737c3c308deb9f112d3db802522d1aab81ce7b932a08115a6fc7
3
+ size 1330359341
special_tokens_map.json ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ {
2
+ "cls_token": "[CLS]",
3
+ "mask_token": "[MASK]",
4
+ "pad_token": "[PAD]",
5
+ "sep_token": "[SEP]",
6
+ "unk_token": "[UNK]"
7
+ }
tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer_config.json ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "clean_up_tokenization_spaces": true,
3
+ "cls_token": "[CLS]",
4
+ "do_lower_case": false,
5
+ "mask_token": "[MASK]",
6
+ "model_max_length": 512,
7
+ "pad_token": "[PAD]",
8
+ "padding": "max_length",
9
+ "sep_token": "[SEP]",
10
+ "strip_accents": null,
11
+ "tokenize_chinese_chars": true,
12
+ "tokenizer_class": "BertTokenizer",
13
+ "truncation": true,
14
+ "unk_token": "[UNK]"
15
+ }
vocab.txt ADDED
The diff for this file is too large to render. See raw diff