baukearends commited on
Commit
f577207
1 Parent(s): d020e01

Update spaCy pipeline

Browse files
.gitattributes CHANGED
@@ -33,3 +33,5 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
 
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ nl_Echocardiogram_SpanCategorizer_mitral_regurgitation-any-py3-none-any.whl filter=lfs diff=lfs merge=lfs -text
37
+ tok2vec/model filter=lfs diff=lfs merge=lfs -text
README.md ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ tags:
3
+ - spacy
4
+ language:
5
+ - nl
6
+ license: cc-by-sa-4.0
7
+ model-index:
8
+ - name: nl_Echocardiogram_SpanCategorizer_mitral_regurgitation
9
+ results: []
10
+ ---
11
+ Package to classify spans for the presence and severity of mitral regurgitation in Dutch echocardiogram reports.
12
+
13
+ | Feature | Description |
14
+ | --- | --- |
15
+ | **Name** | `nl_Echocardiogram_SpanCategorizer_mitral_regurgitation` |
16
+ | **Version** | `1.0.0` |
17
+ | **spaCy** | `>=3.7.4,<3.8.0` |
18
+ | **Default Pipeline** | `tok2vec`, `spancat` |
19
+ | **Components** | `tok2vec`, `spancat` |
20
+ | **Vectors** | 0 keys, 0 unique vectors (0 dimensions) |
21
+ | **Sources** | n/a |
22
+ | **License** | `cc-ny-sa-4.0` |
23
+ | **Author** | [Bauke Arends]() |
24
+
25
+ ### Label Scheme
26
+
27
+ <details>
28
+
29
+ <summary>View label scheme (4 labels for 1 components)</summary>
30
+
31
+ | Component | Labels |
32
+ | --- | --- |
33
+ | **`spancat`** | `mitral_valve_native_regurgitation_not_present`, `mitral_valve_native_regurgitation_mild`, `mitral_valve_native_regurgitation_moderate`, `mitral_valve_native_regurgitation_severe` |
34
+
35
+ </details>
36
+
37
+ ### Accuracy
38
+
39
+ | Type | Score |
40
+ | --- | --- |
41
+ | `SPANS_SC_F` | 93.48 |
42
+ | `SPANS_SC_P` | 96.88 |
43
+ | `SPANS_SC_R` | 90.31 |
44
+ | `TOK2VEC_LOSS` | 33.12 |
45
+ | `SPANCAT_LOSS` | 17581.59 |
config.cfg ADDED
@@ -0,0 +1,159 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [paths]
2
+ train = "./spacy_data/mitral_regurgitation//train.spacy"
3
+ dev = "./spacy_data/mitral_regurgitation//test.spacy"
4
+ vectors = null
5
+ init_tok2vec = null
6
+
7
+ [system]
8
+ gpu_allocator = null
9
+ seed = 0
10
+
11
+ [nlp]
12
+ lang = "nl"
13
+ pipeline = ["tok2vec","spancat"]
14
+ batch_size = 1000
15
+ disabled = []
16
+ before_creation = null
17
+ after_creation = null
18
+ after_pipeline_creation = null
19
+ tokenizer = {"@tokenizers":"spacy.Tokenizer.v1"}
20
+ vectors = {"@vectors":"spacy.Vectors.v1"}
21
+
22
+ [components]
23
+
24
+ [components.spancat]
25
+ factory = "spancat_singlelabel"
26
+ allow_overlap = true
27
+ negative_weight = 0.6
28
+ scorer = {"@scorers":"spacy.spancat_scorer.v1"}
29
+ spans_key = "sc"
30
+
31
+ [components.spancat.model]
32
+ @architectures = "spacy.SpanCategorizer.v1"
33
+
34
+ [components.spancat.model.reducer]
35
+ @layers = "spacy.mean_max_reducer.v1"
36
+ hidden_size = 128
37
+
38
+ [components.spancat.model.scorer]
39
+ @layers = "spacy.LinearLogistic.v1"
40
+ nO = null
41
+ nI = null
42
+
43
+ [components.spancat.model.tok2vec]
44
+ @architectures = "spacy.Tok2VecListener.v1"
45
+ width = ${components.tok2vec.model.encode.width}
46
+ upstream = "*"
47
+
48
+ [components.spancat.suggester]
49
+ @misc = "spacy.ngram_range_suggester.v1"
50
+ min_size = 1
51
+ max_size = 25
52
+
53
+ [components.tok2vec]
54
+ factory = "tok2vec"
55
+
56
+ [components.tok2vec.model]
57
+ @architectures = "spacy.Tok2Vec.v2"
58
+
59
+ [components.tok2vec.model.embed]
60
+ @architectures = "spacy.MultiHashEmbed.v2"
61
+ width = ${components.tok2vec.model.encode.width}
62
+ attrs = ["NORM","PREFIX","SUFFIX","SHAPE"]
63
+ rows = [5000,1000,2500,2500]
64
+ include_static_vectors = false
65
+
66
+ [components.tok2vec.model.encode]
67
+ @architectures = "spacy.MaxoutWindowEncoder.v2"
68
+ width = 96
69
+ depth = 4
70
+ window_size = 1
71
+ maxout_pieces = 3
72
+
73
+ [corpora]
74
+
75
+ [corpora.dev]
76
+ @readers = "spacy.Corpus.v1"
77
+ path = ${paths.dev}
78
+ max_length = 0
79
+ gold_preproc = false
80
+ limit = 0
81
+ augmenter = null
82
+
83
+ [corpora.train]
84
+ @readers = "spacy.Corpus.v1"
85
+ path = ${paths.train}
86
+ max_length = 0
87
+ gold_preproc = false
88
+ limit = 0
89
+ augmenter = null
90
+
91
+ [training]
92
+ dev_corpus = "corpora.dev"
93
+ train_corpus = "corpora.train"
94
+ seed = ${system.seed}
95
+ gpu_allocator = ${system.gpu_allocator}
96
+ dropout = 0.1
97
+ accumulate_gradient = 1
98
+ patience = 1600
99
+ max_epochs = 0
100
+ max_steps = 20000
101
+ eval_frequency = 200
102
+ frozen_components = []
103
+ annotating_components = []
104
+ before_to_disk = null
105
+ before_update = null
106
+
107
+ [training.batcher]
108
+ @batchers = "spacy.batch_by_words.v1"
109
+ discard_oversize = false
110
+ tolerance = 0.2
111
+ get_length = null
112
+
113
+ [training.batcher.size]
114
+ @schedules = "compounding.v1"
115
+ start = 100
116
+ stop = 1000
117
+ compound = 1.001
118
+ t = 0.0
119
+
120
+ [training.logger]
121
+ @loggers = "spacy.ConsoleLogger.v1"
122
+ progress_bar = false
123
+
124
+ [training.optimizer]
125
+ @optimizers = "Adam.v1"
126
+ beta1 = 0.9
127
+ beta2 = 0.999
128
+ L2_is_weight_decay = true
129
+ L2 = 0.01
130
+ grad_clip = 1.0
131
+ use_averages = false
132
+ eps = 0.00000001
133
+ learn_rate = 0.001
134
+
135
+ [training.score_weights]
136
+ spans_sc_f = 1.0
137
+ spans_sc_p = 0.0
138
+ spans_sc_r = 0.0
139
+
140
+ [pretraining]
141
+
142
+ [initialize]
143
+ vectors = ${paths.vectors}
144
+ init_tok2vec = ${paths.init_tok2vec}
145
+ vocab_data = null
146
+ lookups = null
147
+ before_init = null
148
+ after_init = null
149
+
150
+ [initialize.components]
151
+
152
+ [initialize.components.spancat]
153
+
154
+ [initialize.components.spancat.labels]
155
+ @readers = "spacy.read_labels.v1"
156
+ path = "corpus/labels/spancat.json"
157
+ require = false
158
+
159
+ [initialize.tokenizer]
meta.json ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "lang":"nl",
3
+ "name":"Echocardiogram_SpanCategorizer_mitral_regurgitation",
4
+ "version":"1.0.0",
5
+ "description":"Package to classify spans for the presence and severity of mitral regurgitation in Dutch echocardiogram reports.",
6
+ "author":"Bauke Arends",
7
+ "email":"[email protected]",
8
+ "url":"",
9
+ "license":"cc-by-sa-4.0",
10
+ "spacy_version":">=3.7.4,<3.8.0",
11
+ "spacy_git_version":"bff8725f4",
12
+ "vectors":{
13
+ "width":0,
14
+ "vectors":0,
15
+ "keys":0,
16
+ "name":null
17
+ },
18
+ "labels":{
19
+ "tok2vec":[
20
+
21
+ ],
22
+ "spancat":[
23
+ "mitral_valve_native_regurgitation_not_present",
24
+ "mitral_valve_native_regurgitation_mild",
25
+ "mitral_valve_native_regurgitation_moderate",
26
+ "mitral_valve_native_regurgitation_severe"
27
+ ]
28
+ },
29
+ "pipeline":[
30
+ "tok2vec",
31
+ "spancat"
32
+ ],
33
+ "components":[
34
+ "tok2vec",
35
+ "spancat"
36
+ ],
37
+ "disabled":[
38
+
39
+ ],
40
+ "performance":{
41
+ "spans_sc_f":0.9348044132,
42
+ "spans_sc_p":0.9688149688,
43
+ "spans_sc_r":0.9031007752,
44
+ "tok2vec_loss":0.331246445,
45
+ "spancat_loss":175.8159074672
46
+ },
47
+ "requirements":[
48
+
49
+ ]
50
+ }
meta_hf.json ADDED
@@ -0,0 +1,44 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "lang": "nl",
3
+ "name": "Echocardiogram_SpanCategorizer_mitral_regurgitation",
4
+ "version": "1.0.0",
5
+ "spacy_version": ">=3.7.4,<3.8.0",
6
+ "description": "Package to classify spans for the presence and severity of mitral regurgitation in Dutch echocardiogram reports.",
7
+ "author": "Bauke Arends",
8
+ "email": "[email protected]",
9
+ "url": "",
10
+ "license": "cc-by-sa-4.0",
11
+ "spacy_git_version": "bff8725f4",
12
+ "vectors": {
13
+ "width": 0,
14
+ "vectors": 0,
15
+ "keys": 0,
16
+ "name": null,
17
+ "mode": "default"
18
+ },
19
+ "labels": {
20
+ "tok2vec": [],
21
+ "spancat": [
22
+ "mitral_valve_native_regurgitation_not_present",
23
+ "mitral_valve_native_regurgitation_mild",
24
+ "mitral_valve_native_regurgitation_moderate",
25
+ "mitral_valve_native_regurgitation_severe"
26
+ ]
27
+ },
28
+ "pipeline": [
29
+ "tok2vec",
30
+ "spancat"
31
+ ],
32
+ "components": [
33
+ "tok2vec",
34
+ "spancat"
35
+ ],
36
+ "disabled": [],
37
+ "performance": {
38
+ "spans_sc_f": 0.9348044132,
39
+ "spans_sc_p": 0.9688149688,
40
+ "spans_sc_r": 0.9031007752,
41
+ "tok2vec_loss": 0.331246445,
42
+ "spancat_loss": 175.8159074672
43
+ }
44
+ }
nl_Echocardiogram_SpanCategorizer_mitral_regurgitation-any-py3-none-any.whl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ea3b3053432a43c8c1f4517169a5576061c3c1e6684224c76ed397be07b35d0e
3
+ size 6231886
spancat/cfg ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "labels":[
3
+ "mitral_valve_native_regurgitation_not_present",
4
+ "mitral_valve_native_regurgitation_mild",
5
+ "mitral_valve_native_regurgitation_moderate",
6
+ "mitral_valve_native_regurgitation_severe"
7
+ ],
8
+ "spans_key":"sc",
9
+ "threshold":null,
10
+ "max_positive":1,
11
+ "negative_weight":0.6,
12
+ "allow_overlap":true
13
+ }
spancat/model ADDED
Binary file (597 kB). View file
 
tok2vec/cfg ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ {
2
+
3
+ }
tok2vec/model ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1a3470f46c63379e7ba685ba2d3fc8b4169e9c3969125de7101c57871659d44c
3
+ size 6009091
tokenizer ADDED
The diff for this file is too large to render. See raw diff
 
vocab/key2row ADDED
@@ -0,0 +1 @@
 
 
1
+
vocab/lookups.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:76be8b528d0075f7aae98d6fa57a6d3c83ae480a8469e668d7b0af968995ac71
3
+ size 1
vocab/strings.json ADDED
The diff for this file is too large to render. See raw diff
 
vocab/vectors ADDED
Binary file (128 Bytes). View file
 
vocab/vectors.cfg ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ {
2
+ "mode":"default"
3
+ }