Text Classification
Transformers
Joblib
ONNX
Safetensors
English
bert
masterformat
masterformat-classifier
csi-masterformat
construction
construction-technology
sequence-classification
tfidf
ensemble
specs
spec-writing
specifications
takeoff
estimating
cost-code
ufgs
public-domain
Eval Results (legacy)
text-embeddings-inference
Instructions to use constructelligence/masterformat-classifier with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use constructelligence/masterformat-classifier with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="constructelligence/masterformat-classifier")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("constructelligence/masterformat-classifier") model = AutoModelForSequenceClassification.from_pretrained("constructelligence/masterformat-classifier", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Upload mf-0.1
Browse files- README.md +132 -0
- config.json +371 -0
- model.safetensors +3 -0
- onnx/model.onnx +3 -0
- onnx/model_quantized.onnx +3 -0
- predict.py +25 -0
- special_tokens_map.json +37 -0
- tokenizer.json +0 -0
- tokenizer_config.json +58 -0
- train_state.json +1 -0
- vocab.txt +0 -0
README.md
ADDED
|
@@ -0,0 +1,132 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: mit
|
| 3 |
+
base_model: BAAI/bge-small-en-v1.5
|
| 4 |
+
library_name: transformers
|
| 5 |
+
pipeline_tag: text-classification
|
| 6 |
+
language: en
|
| 7 |
+
tags:
|
| 8 |
+
- construction
|
| 9 |
+
- masterformat
|
| 10 |
+
- text-classification
|
| 11 |
+
- spec-writing
|
| 12 |
+
- takeoff
|
| 13 |
+
- bert
|
| 14 |
+
- onnx
|
| 15 |
+
metrics:
|
| 16 |
+
- accuracy
|
| 17 |
+
model-index:
|
| 18 |
+
- name: masterformat-classifier
|
| 19 |
+
results:
|
| 20 |
+
- task:
|
| 21 |
+
type: text-classification
|
| 22 |
+
name: MasterFormat level-2 classification
|
| 23 |
+
dataset:
|
| 24 |
+
type: ufgs-val
|
| 25 |
+
name: UFGS held-out text units (13,518)
|
| 26 |
+
split: validation
|
| 27 |
+
metrics:
|
| 28 |
+
- type: accuracy
|
| 29 |
+
value: 0.184
|
| 30 |
+
name: Top-1 accuracy (step-700 checkpoint)
|
| 31 |
+
---
|
| 32 |
+
|
| 33 |
+
# MasterFormat level-2 classifier (mf-0.1)
|
| 34 |
+
|
| 35 |
+
> **Early checkpoint, published as-is.** This is step 700 of a planned 4,150-step fine-tune; training was
|
| 36 |
+
> paused on an 8 GB CPU-only Mac. Top-1 accuracy on the full UFGS validation split is **18.4%** — well below the
|
| 37 |
+
> TF-IDF baseline (53.1%) on the same split. Treat this release as a reproducible starting point and a
|
| 38 |
+
> working deployment format, not as a finished classifier. A resume script and the full recipe are in the
|
| 39 |
+
> source project.
|
| 40 |
+
|
| 41 |
+
Classifies a construction line item, specification paragraph, submittal or section title into one of **171
|
| 42 |
+
MasterFormat level-2 groups** (e.g. `03 30 00 Cast-in-Place Concrete`, `23 30 00 HVAC Air Distribution`)
|
| 43 |
+
across 32 divisions. English text, one label per input.
|
| 44 |
+
|
| 45 |
+
MasterFormat is a registered trademark of CSI / CSC. This project is not affiliated with or endorsed by them.
|
| 46 |
+
|
| 47 |
+
## Model
|
| 48 |
+
|
| 49 |
+
- Base: [`BAAI/bge-small-en-v1.5`](https://huggingface.co/BAAI/bge-small-en-v1.5) (BERT, 33M parameters, 384-d), MIT.
|
| 50 |
+
- Fine-tuned with a 171-way sequence-classification head; `id2label` / `label2id` are in [`config.json`](config.json).
|
| 51 |
+
- Training: 2 epochs planned over 66,396 rows (per-class balance capped at 450 / floored at 300, estimate-style
|
| 52 |
+
augmentation), batch 32, max length 96, AdamW, 6% linear warmup; body LR 6e-5, head LR 2e-3; embeddings and
|
| 53 |
+
the first 4 encoder layers frozen.
|
| 54 |
+
- Checkpoint stopped at step 700; `train_state.json` records `{"step": 700, "val_acc": 0.18725}`.
|
| 55 |
+
|
| 56 |
+
## Results
|
| 57 |
+
|
| 58 |
+
All numbers are measured on held-out data from the same project. `val` = UFGS text units,
|
| 59 |
+
`line_items` = 194 hand-labelled estimate line items, `manuals` = 6,890 chunks from 153 sections of two real
|
| 60 |
+
commercial project manuals (out-of-taxonomy gold labels count only toward the division score).
|
| 61 |
+
|
| 62 |
+
| Scorer | val top-1 | val top-3 | val division | line-item top-1 | manual-chunk top-1 | manual-section top-1 |
|
| 63 |
+
|---|---:|---:|---:|---:|---:|---:|
|
| 64 |
+
| **mf-0.1 (step 700)** | 0.184 | 0.345 | 0.321 | 0.283 | 0.175 | 0.287 |
|
| 65 |
+
| TF-IDF + linear SGD (full run) | 0.531 | 0.690 | 0.634 | 0.665 | 0.290 | 0.607 |
|
| 66 |
+
| bge-small embeddings + logistic regression | 0.349 | 0.517 | 0.458 | 0.576 | 0.256 | 0.593 |
|
| 67 |
+
| Ensemble (0.25 embedding + 0.75 TF-IDF) | 0.532 | 0.700 | 0.637 | 0.702 | 0.318 | 0.640 |
|
| 68 |
+
|
| 69 |
+
## Quick start
|
| 70 |
+
|
| 71 |
+
```python
|
| 72 |
+
from transformers import pipeline
|
| 73 |
+
|
| 74 |
+
clf = pipeline("text-classification", model="constructelligence/masterformat-classifier", top_k=3)
|
| 75 |
+
for p in clf("4000 psi concrete slab on grade"):
|
| 76 |
+
print(p["label"], round(p["score"], 3))
|
| 77 |
+
```
|
| 78 |
+
|
| 79 |
+
Or with the included example:
|
| 80 |
+
|
| 81 |
+
```bash
|
| 82 |
+
pip install transformers torch
|
| 83 |
+
python predict.py "TPO roofing, 60 mil, fully adhered"
|
| 84 |
+
```
|
| 85 |
+
|
| 86 |
+
The encoder is English-only; inputs should be English.
|
| 87 |
+
|
| 88 |
+
### ONNX
|
| 89 |
+
|
| 90 |
+
`onnx/model.onnx` (fp32, 134 MB) and `onnx/model_quantized.onnx` (dynamic int8, 34 MB) are exported with
|
| 91 |
+
dynamic batch and sequence axes, in the layout `transformers.js` / Optimum expect, inputs `input_ids`,
|
| 92 |
+
`attention_mask`, `token_type_ids`, output `logits`. The fp32 export matches PyTorch on a 4-text smoke set
|
| 93 |
+
(max |delta logit| 5e-6, argmax agreement 4/4). Dynamic int8 quantization shifts low-confidence logits
|
| 94 |
+
(max |delta| ~1.4 on the same smoke set, argmax agreement 3/4), so verify the quantized model on your own
|
| 95 |
+
inputs before using it; see the project's `scripts/export_onnx.py` for the exact command.
|
| 96 |
+
|
| 97 |
+
## Files
|
| 98 |
+
|
| 99 |
+
- `model.safetensors`, `config.json`, `tokenizer.json`, `tokenizer_config.json`, `vocab.txt`,
|
| 100 |
+
`special_tokens_map.json` — standard `transformers` checkpoint.
|
| 101 |
+
- `train_state.json` — step and validation accuracy of the saved checkpoint (text logs and optimizer state
|
| 102 |
+
are not published).
|
| 103 |
+
- `predict.py` — minimal pipeline example.
|
| 104 |
+
- `onnx/` — ONNX fp32 and int8 exports.
|
| 105 |
+
|
| 106 |
+
## Training data and taxonomy
|
| 107 |
+
|
| 108 |
+
- **UFGS** (Unified Facilities Guide Specifications) `.SEC` files, US federal works in the **public domain**.
|
| 109 |
+
Paragraphs and titles are parsed into labelled text units; boilerplate shared by 3+ sections is dropped,
|
| 110 |
+
cross-references are stripped so section numbers cannot leak labels, and long paragraphs are windowed into
|
| 111 |
+
20–60-word units.
|
| 112 |
+
- **Split:** held out by a hash of the normalised source text (10%), so a paragraph and its augmentations stay
|
| 113 |
+
on the same side. 66,396 train / 13,518 val rows.
|
| 114 |
+
- **Taxonomy:** 171 level-2 groups over 32 MasterFormat divisions; group numbers follow the MasterFormat
|
| 115 |
+
numbering convention and the short names are the project's own (see `config.json`).
|
| 116 |
+
|
| 117 |
+
## Limitations
|
| 118 |
+
|
| 119 |
+
- **Early checkpoint.** The 18.4% top-1 is a snapshot of an interrupted run; it is not competitive with the
|
| 120 |
+
TF-IDF baseline yet. Do not use it for production takeoff without further training and re-evaluation.
|
| 121 |
+
- **Domain skew.** UFGS over-represents heavy-civil, water/wastewater and process work relative to commercial
|
| 122 |
+
building estimates; the training set is class-balanced, so raw predictions do not reflect building-project
|
| 123 |
+
priors.
|
| 124 |
+
- **Out-of-taxonomy inputs** (sections whose level-2 group is not in the 171) can only be scored at division
|
| 125 |
+
level.
|
| 126 |
+
- Short, terse line items are the hardest inputs; division (2-digit) accuracy is higher than group accuracy.
|
| 127 |
+
|
| 128 |
+
## Licence and attribution
|
| 129 |
+
|
| 130 |
+
Released under the **MIT licence**, matching the base model. UFGS source text is public domain. MasterFormat
|
| 131 |
+
is a registered trademark of CSI / CSC; this project is not affiliated with or endorsed by them. Constructelligence's
|
| 132 |
+
production models are available at [constructelligence.co](https://constructelligence.co).
|
config.json
ADDED
|
@@ -0,0 +1,371 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"architectures": [
|
| 3 |
+
"BertForSequenceClassification"
|
| 4 |
+
],
|
| 5 |
+
"attention_probs_dropout_prob": 0.1,
|
| 6 |
+
"classifier_dropout": null,
|
| 7 |
+
"dtype": "float32",
|
| 8 |
+
"hidden_act": "gelu",
|
| 9 |
+
"hidden_dropout_prob": 0.1,
|
| 10 |
+
"hidden_size": 384,
|
| 11 |
+
"id2label": {
|
| 12 |
+
"0": "01 10 00 Summary of Work",
|
| 13 |
+
"1": "01 20 00 Price and Payment Procedures",
|
| 14 |
+
"2": "01 30 00 Administrative Requirements",
|
| 15 |
+
"3": "01 40 00 Quality Requirements",
|
| 16 |
+
"4": "01 50 00 Temporary Facilities and Controls",
|
| 17 |
+
"5": "01 70 00 Execution and Closeout Requirements",
|
| 18 |
+
"6": "01 90 00 Commissioning and Life Cycle Activities",
|
| 19 |
+
"7": "02 30 00 Subsurface Investigation",
|
| 20 |
+
"8": "02 40 00 Demolition and Structure Moving",
|
| 21 |
+
"9": "02 50 00 Site Remediation",
|
| 22 |
+
"10": "02 60 00 Contaminated Site Material Removal",
|
| 23 |
+
"11": "02 70 00 Water Remediation",
|
| 24 |
+
"12": "02 80 00 Facility Remediation (Asbestos, Lead, Mold)",
|
| 25 |
+
"13": "03 00 00 Concrete Rehabilitation and Common Work",
|
| 26 |
+
"14": "03 10 00 Concrete Forming and Accessories",
|
| 27 |
+
"15": "03 20 00 Concrete Reinforcing",
|
| 28 |
+
"16": "03 30 00 Cast-in-Place Concrete",
|
| 29 |
+
"17": "03 40 00 Precast Concrete",
|
| 30 |
+
"18": "03 50 00 Cast Decks and Underlayment",
|
| 31 |
+
"19": "03 60 00 Grouting",
|
| 32 |
+
"20": "03 70 00 Mass Concrete",
|
| 33 |
+
"21": "04 00 00 Masonry Restoration and Common Work",
|
| 34 |
+
"22": "04 20 00 Unit Masonry",
|
| 35 |
+
"23": "05 00 00 Metals Common Work (Anchors, Welding)",
|
| 36 |
+
"24": "05 10 00 Structural Metal Framing",
|
| 37 |
+
"25": "05 20 00 Metal Joists",
|
| 38 |
+
"26": "05 30 00 Metal Decking",
|
| 39 |
+
"27": "05 40 00 Cold-Formed Metal Framing",
|
| 40 |
+
"28": "05 50 00 Metal Fabrications",
|
| 41 |
+
"29": "05 70 00 Decorative Metal",
|
| 42 |
+
"30": "06 10 00 Rough Carpentry",
|
| 43 |
+
"31": "06 20 00 Finish Carpentry",
|
| 44 |
+
"32": "06 40 00 Architectural Woodwork",
|
| 45 |
+
"33": "06 60 00 Plastic Fabrications",
|
| 46 |
+
"34": "06 70 00 Structural Composites (FRP)",
|
| 47 |
+
"35": "06 80 00 Composite Fabrications",
|
| 48 |
+
"36": "07 10 00 Dampproofing and Waterproofing",
|
| 49 |
+
"37": "07 20 00 Thermal Protection (Insulation, Air Barriers)",
|
| 50 |
+
"38": "07 30 00 Steep Slope Roofing",
|
| 51 |
+
"39": "07 40 00 Roofing and Siding Panels",
|
| 52 |
+
"40": "07 50 00 Membrane Roofing",
|
| 53 |
+
"41": "07 60 00 Flashing and Sheet Metal",
|
| 54 |
+
"42": "07 70 00 Roof and Wall Specialties and Accessories",
|
| 55 |
+
"43": "07 80 00 Fire and Smoke Protection",
|
| 56 |
+
"44": "07 90 00 Joint Protection (Sealants)",
|
| 57 |
+
"45": "08 00 00 Openings Maintenance and Common Work",
|
| 58 |
+
"46": "08 10 00 Doors and Frames",
|
| 59 |
+
"47": "08 20 00 Composite and Plastic Doors",
|
| 60 |
+
"48": "08 30 00 Specialty Doors and Frames",
|
| 61 |
+
"49": "08 40 00 Entrances, Storefronts, and Curtain Walls",
|
| 62 |
+
"50": "08 50 00 Windows",
|
| 63 |
+
"51": "08 60 00 Roof Windows and Skylights",
|
| 64 |
+
"52": "08 70 00 Door Hardware",
|
| 65 |
+
"53": "08 80 00 Glazing",
|
| 66 |
+
"54": "08 90 00 Louvers and Vents",
|
| 67 |
+
"55": "09 00 00 Finishes Preparation and Schedules",
|
| 68 |
+
"56": "09 20 00 Plaster and Gypsum Board",
|
| 69 |
+
"57": "09 30 00 Tiling",
|
| 70 |
+
"58": "09 50 00 Ceilings",
|
| 71 |
+
"59": "09 60 00 Flooring",
|
| 72 |
+
"60": "09 70 00 Wall Finishes",
|
| 73 |
+
"61": "09 80 00 Acoustic Treatment",
|
| 74 |
+
"62": "09 90 00 Painting and Coating",
|
| 75 |
+
"63": "10 10 00 Information Specialties (Signage, Boards)",
|
| 76 |
+
"64": "10 20 00 Interior Specialties (Partitions, Accessories)",
|
| 77 |
+
"65": "10 40 00 Safety Specialties",
|
| 78 |
+
"66": "10 50 00 Storage Specialties (Lockers, Shelving)",
|
| 79 |
+
"67": "11 00 00 Equipment Common Work",
|
| 80 |
+
"68": "11 10 00 Vehicle and Loading Dock Equipment",
|
| 81 |
+
"69": "11 30 00 Residential Equipment",
|
| 82 |
+
"70": "11 40 00 Foodservice Equipment",
|
| 83 |
+
"71": "11 50 00 Educational and Scientific Equipment",
|
| 84 |
+
"72": "11 60 00 Entertainment and Recreation Equipment",
|
| 85 |
+
"73": "11 70 00 Healthcare Equipment",
|
| 86 |
+
"74": "11 80 00 Collection and Disposal Equipment",
|
| 87 |
+
"75": "12 00 00 Furnishings General (FF&E)",
|
| 88 |
+
"76": "12 20 00 Window Treatments",
|
| 89 |
+
"77": "12 30 00 Casework",
|
| 90 |
+
"78": "12 40 00 Furnishings and Accessories",
|
| 91 |
+
"79": "12 50 00 Furniture",
|
| 92 |
+
"80": "12 60 00 Multiple Seating",
|
| 93 |
+
"81": "12 90 00 Other Furnishings (Site Furnishings)",
|
| 94 |
+
"82": "13 10 00 Special Facility Components",
|
| 95 |
+
"83": "13 20 00 Special Purpose Rooms",
|
| 96 |
+
"84": "13 30 00 Special Structures (Pre-Engineered Buildings)",
|
| 97 |
+
"85": "13 40 00 Integrated Construction (Shielding, Seismic)",
|
| 98 |
+
"86": "13 50 00 Special Instrumentation",
|
| 99 |
+
"87": "14 20 00 Elevators",
|
| 100 |
+
"88": "14 90 00 Other Conveying Equipment",
|
| 101 |
+
"89": "21 10 00 Water-Based Fire Suppression (Sprinklers, Standpipes)",
|
| 102 |
+
"90": "21 20 00 Fire-Extinguishing Systems",
|
| 103 |
+
"91": "21 30 00 Fire Pumps",
|
| 104 |
+
"92": "22 00 00 Plumbing General (incl. Fixtures)",
|
| 105 |
+
"93": "22 10 00 Plumbing Piping and Pumps",
|
| 106 |
+
"94": "22 30 00 Plumbing Equipment (Water Heaters, Softeners)",
|
| 107 |
+
"95": "22 60 00 Gas and Vacuum Systems for Healthcare and Labs",
|
| 108 |
+
"96": "23 00 00 HVAC Common Work (Piping, Insulation, TAB, Controls)",
|
| 109 |
+
"97": "23 10 00 Facility Fuel Systems",
|
| 110 |
+
"98": "23 20 00 HVAC Piping and Pumps",
|
| 111 |
+
"99": "23 30 00 HVAC Air Distribution",
|
| 112 |
+
"100": "23 40 00 HVAC Air Cleaning Devices",
|
| 113 |
+
"101": "23 50 00 Central Heating Equipment",
|
| 114 |
+
"102": "23 60 00 Central Cooling Equipment",
|
| 115 |
+
"103": "23 70 00 Central HVAC Equipment",
|
| 116 |
+
"104": "23 80 00 Decentralized HVAC Equipment",
|
| 117 |
+
"105": "25 00 00 Integrated Automation Common Work",
|
| 118 |
+
"106": "25 10 00 Integrated Automation Network Equipment",
|
| 119 |
+
"107": "26 00 00 Electrical Common Work (Wire, Cable, Grounding)",
|
| 120 |
+
"108": "26 10 00 Medium-Voltage Electrical Distribution",
|
| 121 |
+
"109": "26 20 00 Low-Voltage Electrical Distribution",
|
| 122 |
+
"110": "26 30 00 Power Generating and Storing Equipment",
|
| 123 |
+
"111": "26 40 00 Electrical and Cathodic Protection",
|
| 124 |
+
"112": "26 50 00 Lighting",
|
| 125 |
+
"113": "27 00 00 Communications Common Work",
|
| 126 |
+
"114": "27 10 00 Structured Cabling",
|
| 127 |
+
"115": "27 40 00 Audio-Video Communications",
|
| 128 |
+
"116": "27 50 00 Distributed Communications and Monitoring",
|
| 129 |
+
"117": "28 00 00 Electronic Safety and Security Common Work",
|
| 130 |
+
"118": "28 10 00 Electronic Security and Access Control",
|
| 131 |
+
"119": "28 20 00 Electronic Surveillance and Monitoring",
|
| 132 |
+
"120": "28 30 00 Detection and Alarm (incl. Fire Alarm)",
|
| 133 |
+
"121": "31 00 00 Earthwork General",
|
| 134 |
+
"122": "31 10 00 Site Clearing",
|
| 135 |
+
"123": "31 20 00 Earth Moving",
|
| 136 |
+
"124": "31 30 00 Earthwork Methods (Soil Treatment, Stabilization)",
|
| 137 |
+
"125": "31 40 00 Shoring and Underpinning",
|
| 138 |
+
"126": "31 50 00 Excavation Support and Protection",
|
| 139 |
+
"127": "31 60 00 Special Foundations (Piles, Caissons)",
|
| 140 |
+
"128": "31 70 00 Tunneling and Mining",
|
| 141 |
+
"129": "32 00 00 Exterior Improvements Maintenance",
|
| 142 |
+
"130": "32 10 00 Bases, Ballasts, and Paving",
|
| 143 |
+
"131": "32 30 00 Site Improvements (Fences, Gates)",
|
| 144 |
+
"132": "32 80 00 Irrigation",
|
| 145 |
+
"133": "32 90 00 Planting",
|
| 146 |
+
"134": "33 00 00 Utilities Maintenance and Common Work",
|
| 147 |
+
"135": "33 10 00 Water Utilities",
|
| 148 |
+
"136": "33 20 00 Wells",
|
| 149 |
+
"137": "33 30 00 Sanitary Sewerage Utilities",
|
| 150 |
+
"138": "33 40 00 Storm Drainage Utilities",
|
| 151 |
+
"139": "33 50 00 Fuel Distribution Utilities",
|
| 152 |
+
"140": "33 60 00 Hydronic and Steam Energy Utilities",
|
| 153 |
+
"141": "33 70 00 Electrical Utilities",
|
| 154 |
+
"142": "33 80 00 Communications Utilities",
|
| 155 |
+
"143": "34 10 00 Guideways and Railways",
|
| 156 |
+
"144": "34 60 00 Vehicle Charging Facilities",
|
| 157 |
+
"145": "34 70 00 Transportation Construction and Equipment",
|
| 158 |
+
"146": "35 00 00 Waterway and Marine Common Work",
|
| 159 |
+
"147": "35 20 00 Waterway and Marine Construction Equipment (Gates)",
|
| 160 |
+
"148": "35 30 00 Coastal Construction",
|
| 161 |
+
"149": "35 40 00 Waterway Construction (Levees, Pumps)",
|
| 162 |
+
"150": "35 50 00 Marine Construction (Piers, Fenders)",
|
| 163 |
+
"151": "35 70 00 Dam Construction",
|
| 164 |
+
"152": "40 00 00 Process Piping and Common Work",
|
| 165 |
+
"153": "40 10 00 Gas and Vapor Process Piping",
|
| 166 |
+
"154": "40 60 00 Process Control",
|
| 167 |
+
"155": "41 20 00 Piece Material Handling Equipment (Cranes, Hoists)",
|
| 168 |
+
"156": "41 30 00 Manufacturing Equipment",
|
| 169 |
+
"157": "41 60 00 Mobile Plant Equipment",
|
| 170 |
+
"158": "43 20 00 Liquid Handling Equipment",
|
| 171 |
+
"159": "43 30 00 Gas and Liquid Purification Equipment",
|
| 172 |
+
"160": "44 10 00 Air Pollution Control",
|
| 173 |
+
"161": "44 40 00 Water Pollution Control",
|
| 174 |
+
"162": "46 00 00 Water and Wastewater Equipment Common Work",
|
| 175 |
+
"163": "46 20 00 Preliminary Treatment Equipment",
|
| 176 |
+
"164": "46 30 00 Chemical Feed Equipment",
|
| 177 |
+
"165": "46 40 00 Clarification and Mixing Equipment",
|
| 178 |
+
"166": "46 50 00 Secondary Treatment Equipment",
|
| 179 |
+
"167": "46 60 00 Advanced Treatment and Disinfection Equipment",
|
| 180 |
+
"168": "46 70 00 Residuals Handling and Treatment",
|
| 181 |
+
"169": "48 00 00 Power Generation Common Work",
|
| 182 |
+
"170": "48 10 00 Power Generation Equipment (Solar, Wind)"
|
| 183 |
+
},
|
| 184 |
+
"initializer_range": 0.02,
|
| 185 |
+
"intermediate_size": 1536,
|
| 186 |
+
"label2id": {
|
| 187 |
+
"01 10 00 Summary of Work": 0,
|
| 188 |
+
"01 20 00 Price and Payment Procedures": 1,
|
| 189 |
+
"01 30 00 Administrative Requirements": 2,
|
| 190 |
+
"01 40 00 Quality Requirements": 3,
|
| 191 |
+
"01 50 00 Temporary Facilities and Controls": 4,
|
| 192 |
+
"01 70 00 Execution and Closeout Requirements": 5,
|
| 193 |
+
"01 90 00 Commissioning and Life Cycle Activities": 6,
|
| 194 |
+
"02 30 00 Subsurface Investigation": 7,
|
| 195 |
+
"02 40 00 Demolition and Structure Moving": 8,
|
| 196 |
+
"02 50 00 Site Remediation": 9,
|
| 197 |
+
"02 60 00 Contaminated Site Material Removal": 10,
|
| 198 |
+
"02 70 00 Water Remediation": 11,
|
| 199 |
+
"02 80 00 Facility Remediation (Asbestos, Lead, Mold)": 12,
|
| 200 |
+
"03 00 00 Concrete Rehabilitation and Common Work": 13,
|
| 201 |
+
"03 10 00 Concrete Forming and Accessories": 14,
|
| 202 |
+
"03 20 00 Concrete Reinforcing": 15,
|
| 203 |
+
"03 30 00 Cast-in-Place Concrete": 16,
|
| 204 |
+
"03 40 00 Precast Concrete": 17,
|
| 205 |
+
"03 50 00 Cast Decks and Underlayment": 18,
|
| 206 |
+
"03 60 00 Grouting": 19,
|
| 207 |
+
"03 70 00 Mass Concrete": 20,
|
| 208 |
+
"04 00 00 Masonry Restoration and Common Work": 21,
|
| 209 |
+
"04 20 00 Unit Masonry": 22,
|
| 210 |
+
"05 00 00 Metals Common Work (Anchors, Welding)": 23,
|
| 211 |
+
"05 10 00 Structural Metal Framing": 24,
|
| 212 |
+
"05 20 00 Metal Joists": 25,
|
| 213 |
+
"05 30 00 Metal Decking": 26,
|
| 214 |
+
"05 40 00 Cold-Formed Metal Framing": 27,
|
| 215 |
+
"05 50 00 Metal Fabrications": 28,
|
| 216 |
+
"05 70 00 Decorative Metal": 29,
|
| 217 |
+
"06 10 00 Rough Carpentry": 30,
|
| 218 |
+
"06 20 00 Finish Carpentry": 31,
|
| 219 |
+
"06 40 00 Architectural Woodwork": 32,
|
| 220 |
+
"06 60 00 Plastic Fabrications": 33,
|
| 221 |
+
"06 70 00 Structural Composites (FRP)": 34,
|
| 222 |
+
"06 80 00 Composite Fabrications": 35,
|
| 223 |
+
"07 10 00 Dampproofing and Waterproofing": 36,
|
| 224 |
+
"07 20 00 Thermal Protection (Insulation, Air Barriers)": 37,
|
| 225 |
+
"07 30 00 Steep Slope Roofing": 38,
|
| 226 |
+
"07 40 00 Roofing and Siding Panels": 39,
|
| 227 |
+
"07 50 00 Membrane Roofing": 40,
|
| 228 |
+
"07 60 00 Flashing and Sheet Metal": 41,
|
| 229 |
+
"07 70 00 Roof and Wall Specialties and Accessories": 42,
|
| 230 |
+
"07 80 00 Fire and Smoke Protection": 43,
|
| 231 |
+
"07 90 00 Joint Protection (Sealants)": 44,
|
| 232 |
+
"08 00 00 Openings Maintenance and Common Work": 45,
|
| 233 |
+
"08 10 00 Doors and Frames": 46,
|
| 234 |
+
"08 20 00 Composite and Plastic Doors": 47,
|
| 235 |
+
"08 30 00 Specialty Doors and Frames": 48,
|
| 236 |
+
"08 40 00 Entrances, Storefronts, and Curtain Walls": 49,
|
| 237 |
+
"08 50 00 Windows": 50,
|
| 238 |
+
"08 60 00 Roof Windows and Skylights": 51,
|
| 239 |
+
"08 70 00 Door Hardware": 52,
|
| 240 |
+
"08 80 00 Glazing": 53,
|
| 241 |
+
"08 90 00 Louvers and Vents": 54,
|
| 242 |
+
"09 00 00 Finishes Preparation and Schedules": 55,
|
| 243 |
+
"09 20 00 Plaster and Gypsum Board": 56,
|
| 244 |
+
"09 30 00 Tiling": 57,
|
| 245 |
+
"09 50 00 Ceilings": 58,
|
| 246 |
+
"09 60 00 Flooring": 59,
|
| 247 |
+
"09 70 00 Wall Finishes": 60,
|
| 248 |
+
"09 80 00 Acoustic Treatment": 61,
|
| 249 |
+
"09 90 00 Painting and Coating": 62,
|
| 250 |
+
"10 10 00 Information Specialties (Signage, Boards)": 63,
|
| 251 |
+
"10 20 00 Interior Specialties (Partitions, Accessories)": 64,
|
| 252 |
+
"10 40 00 Safety Specialties": 65,
|
| 253 |
+
"10 50 00 Storage Specialties (Lockers, Shelving)": 66,
|
| 254 |
+
"11 00 00 Equipment Common Work": 67,
|
| 255 |
+
"11 10 00 Vehicle and Loading Dock Equipment": 68,
|
| 256 |
+
"11 30 00 Residential Equipment": 69,
|
| 257 |
+
"11 40 00 Foodservice Equipment": 70,
|
| 258 |
+
"11 50 00 Educational and Scientific Equipment": 71,
|
| 259 |
+
"11 60 00 Entertainment and Recreation Equipment": 72,
|
| 260 |
+
"11 70 00 Healthcare Equipment": 73,
|
| 261 |
+
"11 80 00 Collection and Disposal Equipment": 74,
|
| 262 |
+
"12 00 00 Furnishings General (FF&E)": 75,
|
| 263 |
+
"12 20 00 Window Treatments": 76,
|
| 264 |
+
"12 30 00 Casework": 77,
|
| 265 |
+
"12 40 00 Furnishings and Accessories": 78,
|
| 266 |
+
"12 50 00 Furniture": 79,
|
| 267 |
+
"12 60 00 Multiple Seating": 80,
|
| 268 |
+
"12 90 00 Other Furnishings (Site Furnishings)": 81,
|
| 269 |
+
"13 10 00 Special Facility Components": 82,
|
| 270 |
+
"13 20 00 Special Purpose Rooms": 83,
|
| 271 |
+
"13 30 00 Special Structures (Pre-Engineered Buildings)": 84,
|
| 272 |
+
"13 40 00 Integrated Construction (Shielding, Seismic)": 85,
|
| 273 |
+
"13 50 00 Special Instrumentation": 86,
|
| 274 |
+
"14 20 00 Elevators": 87,
|
| 275 |
+
"14 90 00 Other Conveying Equipment": 88,
|
| 276 |
+
"21 10 00 Water-Based Fire Suppression (Sprinklers, Standpipes)": 89,
|
| 277 |
+
"21 20 00 Fire-Extinguishing Systems": 90,
|
| 278 |
+
"21 30 00 Fire Pumps": 91,
|
| 279 |
+
"22 00 00 Plumbing General (incl. Fixtures)": 92,
|
| 280 |
+
"22 10 00 Plumbing Piping and Pumps": 93,
|
| 281 |
+
"22 30 00 Plumbing Equipment (Water Heaters, Softeners)": 94,
|
| 282 |
+
"22 60 00 Gas and Vacuum Systems for Healthcare and Labs": 95,
|
| 283 |
+
"23 00 00 HVAC Common Work (Piping, Insulation, TAB, Controls)": 96,
|
| 284 |
+
"23 10 00 Facility Fuel Systems": 97,
|
| 285 |
+
"23 20 00 HVAC Piping and Pumps": 98,
|
| 286 |
+
"23 30 00 HVAC Air Distribution": 99,
|
| 287 |
+
"23 40 00 HVAC Air Cleaning Devices": 100,
|
| 288 |
+
"23 50 00 Central Heating Equipment": 101,
|
| 289 |
+
"23 60 00 Central Cooling Equipment": 102,
|
| 290 |
+
"23 70 00 Central HVAC Equipment": 103,
|
| 291 |
+
"23 80 00 Decentralized HVAC Equipment": 104,
|
| 292 |
+
"25 00 00 Integrated Automation Common Work": 105,
|
| 293 |
+
"25 10 00 Integrated Automation Network Equipment": 106,
|
| 294 |
+
"26 00 00 Electrical Common Work (Wire, Cable, Grounding)": 107,
|
| 295 |
+
"26 10 00 Medium-Voltage Electrical Distribution": 108,
|
| 296 |
+
"26 20 00 Low-Voltage Electrical Distribution": 109,
|
| 297 |
+
"26 30 00 Power Generating and Storing Equipment": 110,
|
| 298 |
+
"26 40 00 Electrical and Cathodic Protection": 111,
|
| 299 |
+
"26 50 00 Lighting": 112,
|
| 300 |
+
"27 00 00 Communications Common Work": 113,
|
| 301 |
+
"27 10 00 Structured Cabling": 114,
|
| 302 |
+
"27 40 00 Audio-Video Communications": 115,
|
| 303 |
+
"27 50 00 Distributed Communications and Monitoring": 116,
|
| 304 |
+
"28 00 00 Electronic Safety and Security Common Work": 117,
|
| 305 |
+
"28 10 00 Electronic Security and Access Control": 118,
|
| 306 |
+
"28 20 00 Electronic Surveillance and Monitoring": 119,
|
| 307 |
+
"28 30 00 Detection and Alarm (incl. Fire Alarm)": 120,
|
| 308 |
+
"31 00 00 Earthwork General": 121,
|
| 309 |
+
"31 10 00 Site Clearing": 122,
|
| 310 |
+
"31 20 00 Earth Moving": 123,
|
| 311 |
+
"31 30 00 Earthwork Methods (Soil Treatment, Stabilization)": 124,
|
| 312 |
+
"31 40 00 Shoring and Underpinning": 125,
|
| 313 |
+
"31 50 00 Excavation Support and Protection": 126,
|
| 314 |
+
"31 60 00 Special Foundations (Piles, Caissons)": 127,
|
| 315 |
+
"31 70 00 Tunneling and Mining": 128,
|
| 316 |
+
"32 00 00 Exterior Improvements Maintenance": 129,
|
| 317 |
+
"32 10 00 Bases, Ballasts, and Paving": 130,
|
| 318 |
+
"32 30 00 Site Improvements (Fences, Gates)": 131,
|
| 319 |
+
"32 80 00 Irrigation": 132,
|
| 320 |
+
"32 90 00 Planting": 133,
|
| 321 |
+
"33 00 00 Utilities Maintenance and Common Work": 134,
|
| 322 |
+
"33 10 00 Water Utilities": 135,
|
| 323 |
+
"33 20 00 Wells": 136,
|
| 324 |
+
"33 30 00 Sanitary Sewerage Utilities": 137,
|
| 325 |
+
"33 40 00 Storm Drainage Utilities": 138,
|
| 326 |
+
"33 50 00 Fuel Distribution Utilities": 139,
|
| 327 |
+
"33 60 00 Hydronic and Steam Energy Utilities": 140,
|
| 328 |
+
"33 70 00 Electrical Utilities": 141,
|
| 329 |
+
"33 80 00 Communications Utilities": 142,
|
| 330 |
+
"34 10 00 Guideways and Railways": 143,
|
| 331 |
+
"34 60 00 Vehicle Charging Facilities": 144,
|
| 332 |
+
"34 70 00 Transportation Construction and Equipment": 145,
|
| 333 |
+
"35 00 00 Waterway and Marine Common Work": 146,
|
| 334 |
+
"35 20 00 Waterway and Marine Construction Equipment (Gates)": 147,
|
| 335 |
+
"35 30 00 Coastal Construction": 148,
|
| 336 |
+
"35 40 00 Waterway Construction (Levees, Pumps)": 149,
|
| 337 |
+
"35 50 00 Marine Construction (Piers, Fenders)": 150,
|
| 338 |
+
"35 70 00 Dam Construction": 151,
|
| 339 |
+
"40 00 00 Process Piping and Common Work": 152,
|
| 340 |
+
"40 10 00 Gas and Vapor Process Piping": 153,
|
| 341 |
+
"40 60 00 Process Control": 154,
|
| 342 |
+
"41 20 00 Piece Material Handling Equipment (Cranes, Hoists)": 155,
|
| 343 |
+
"41 30 00 Manufacturing Equipment": 156,
|
| 344 |
+
"41 60 00 Mobile Plant Equipment": 157,
|
| 345 |
+
"43 20 00 Liquid Handling Equipment": 158,
|
| 346 |
+
"43 30 00 Gas and Liquid Purification Equipment": 159,
|
| 347 |
+
"44 10 00 Air Pollution Control": 160,
|
| 348 |
+
"44 40 00 Water Pollution Control": 161,
|
| 349 |
+
"46 00 00 Water and Wastewater Equipment Common Work": 162,
|
| 350 |
+
"46 20 00 Preliminary Treatment Equipment": 163,
|
| 351 |
+
"46 30 00 Chemical Feed Equipment": 164,
|
| 352 |
+
"46 40 00 Clarification and Mixing Equipment": 165,
|
| 353 |
+
"46 50 00 Secondary Treatment Equipment": 166,
|
| 354 |
+
"46 60 00 Advanced Treatment and Disinfection Equipment": 167,
|
| 355 |
+
"46 70 00 Residuals Handling and Treatment": 168,
|
| 356 |
+
"48 00 00 Power Generation Common Work": 169,
|
| 357 |
+
"48 10 00 Power Generation Equipment (Solar, Wind)": 170
|
| 358 |
+
},
|
| 359 |
+
"layer_norm_eps": 1e-12,
|
| 360 |
+
"max_position_embeddings": 512,
|
| 361 |
+
"model_type": "bert",
|
| 362 |
+
"num_attention_heads": 12,
|
| 363 |
+
"num_hidden_layers": 12,
|
| 364 |
+
"pad_token_id": 0,
|
| 365 |
+
"position_embedding_type": "absolute",
|
| 366 |
+
"problem_type": "single_label_classification",
|
| 367 |
+
"transformers_version": "4.57.6",
|
| 368 |
+
"type_vocab_size": 2,
|
| 369 |
+
"use_cache": true,
|
| 370 |
+
"vocab_size": 30522
|
| 371 |
+
}
|
model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:0770e36bd9b8e8f054ac5750ab0da3078c1e9b4d00ce907a90e9b9f59fa048ca
|
| 3 |
+
size 133726636
|
onnx/model.onnx
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:c359f7e6387049e671c1c2039c9e65003f80205183a5702134ebf0b4a39e3fe8
|
| 3 |
+
size 133960852
|
onnx/model_quantized.onnx
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:3096cf891670cf74be258a21c860825dd3e4bd3aa3f4b48bb5e6d716ff4fca5a
|
| 3 |
+
size 34067631
|
predict.py
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""Classify construction text into MasterFormat level-2 groups.
|
| 2 |
+
|
| 3 |
+
pip install transformers torch
|
| 4 |
+
python predict.py "4000 psi concrete slab on grade" "TPO roofing, 60 mil, fully adhered"
|
| 5 |
+
|
| 6 |
+
Without arguments it classifies one example line item.
|
| 7 |
+
"""
|
| 8 |
+
import sys
|
| 9 |
+
|
| 10 |
+
from transformers import pipeline
|
| 11 |
+
|
| 12 |
+
MODEL = "constructelligence/masterformat-classifier"
|
| 13 |
+
|
| 14 |
+
|
| 15 |
+
def main():
|
| 16 |
+
texts = sys.argv[1:] or ["4000 psi concrete slab on grade"]
|
| 17 |
+
clf = pipeline("text-classification", model=MODEL, top_k=3)
|
| 18 |
+
for text, preds in zip(texts, clf(texts)):
|
| 19 |
+
print(f"\n{text}")
|
| 20 |
+
for p in preds:
|
| 21 |
+
print(f" {p['label']:64s} {p['score']:.3f}")
|
| 22 |
+
|
| 23 |
+
|
| 24 |
+
if __name__ == "__main__":
|
| 25 |
+
main()
|
special_tokens_map.json
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"cls_token": {
|
| 3 |
+
"content": "[CLS]",
|
| 4 |
+
"lstrip": false,
|
| 5 |
+
"normalized": false,
|
| 6 |
+
"rstrip": false,
|
| 7 |
+
"single_word": false
|
| 8 |
+
},
|
| 9 |
+
"mask_token": {
|
| 10 |
+
"content": "[MASK]",
|
| 11 |
+
"lstrip": false,
|
| 12 |
+
"normalized": false,
|
| 13 |
+
"rstrip": false,
|
| 14 |
+
"single_word": false
|
| 15 |
+
},
|
| 16 |
+
"pad_token": {
|
| 17 |
+
"content": "[PAD]",
|
| 18 |
+
"lstrip": false,
|
| 19 |
+
"normalized": false,
|
| 20 |
+
"rstrip": false,
|
| 21 |
+
"single_word": false
|
| 22 |
+
},
|
| 23 |
+
"sep_token": {
|
| 24 |
+
"content": "[SEP]",
|
| 25 |
+
"lstrip": false,
|
| 26 |
+
"normalized": false,
|
| 27 |
+
"rstrip": false,
|
| 28 |
+
"single_word": false
|
| 29 |
+
},
|
| 30 |
+
"unk_token": {
|
| 31 |
+
"content": "[UNK]",
|
| 32 |
+
"lstrip": false,
|
| 33 |
+
"normalized": false,
|
| 34 |
+
"rstrip": false,
|
| 35 |
+
"single_word": false
|
| 36 |
+
}
|
| 37 |
+
}
|
tokenizer.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
tokenizer_config.json
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"added_tokens_decoder": {
|
| 3 |
+
"0": {
|
| 4 |
+
"content": "[PAD]",
|
| 5 |
+
"lstrip": false,
|
| 6 |
+
"normalized": false,
|
| 7 |
+
"rstrip": false,
|
| 8 |
+
"single_word": false,
|
| 9 |
+
"special": true
|
| 10 |
+
},
|
| 11 |
+
"100": {
|
| 12 |
+
"content": "[UNK]",
|
| 13 |
+
"lstrip": false,
|
| 14 |
+
"normalized": false,
|
| 15 |
+
"rstrip": false,
|
| 16 |
+
"single_word": false,
|
| 17 |
+
"special": true
|
| 18 |
+
},
|
| 19 |
+
"101": {
|
| 20 |
+
"content": "[CLS]",
|
| 21 |
+
"lstrip": false,
|
| 22 |
+
"normalized": false,
|
| 23 |
+
"rstrip": false,
|
| 24 |
+
"single_word": false,
|
| 25 |
+
"special": true
|
| 26 |
+
},
|
| 27 |
+
"102": {
|
| 28 |
+
"content": "[SEP]",
|
| 29 |
+
"lstrip": false,
|
| 30 |
+
"normalized": false,
|
| 31 |
+
"rstrip": false,
|
| 32 |
+
"single_word": false,
|
| 33 |
+
"special": true
|
| 34 |
+
},
|
| 35 |
+
"103": {
|
| 36 |
+
"content": "[MASK]",
|
| 37 |
+
"lstrip": false,
|
| 38 |
+
"normalized": false,
|
| 39 |
+
"rstrip": false,
|
| 40 |
+
"single_word": false,
|
| 41 |
+
"special": true
|
| 42 |
+
}
|
| 43 |
+
},
|
| 44 |
+
"clean_up_tokenization_spaces": true,
|
| 45 |
+
"cls_token": "[CLS]",
|
| 46 |
+
"do_basic_tokenize": true,
|
| 47 |
+
"do_lower_case": true,
|
| 48 |
+
"extra_special_tokens": {},
|
| 49 |
+
"mask_token": "[MASK]",
|
| 50 |
+
"model_max_length": 512,
|
| 51 |
+
"never_split": null,
|
| 52 |
+
"pad_token": "[PAD]",
|
| 53 |
+
"sep_token": "[SEP]",
|
| 54 |
+
"strip_accents": null,
|
| 55 |
+
"tokenize_chinese_chars": true,
|
| 56 |
+
"tokenizer_class": "BertTokenizer",
|
| 57 |
+
"unk_token": "[UNK]"
|
| 58 |
+
}
|
train_state.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"step": 700, "val_acc": 0.18725}
|
vocab.txt
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|