Update README.md
Browse files
README.md
CHANGED
@@ -19,7 +19,7 @@ Load the pretrained AITSecNER model directly from Hugging Face:
|
|
19 |
```python
|
20 |
from gliner import GLiNER
|
21 |
|
22 |
-
model = GLiNER.from_pretrained("selfconstruct3d/AITSecNER", load_tokenizer=True)
|
23 |
```
|
24 |
|
25 |
### Predict Entities
|
@@ -28,14 +28,14 @@ Define the input text and entity labels you wish to extract:
|
|
28 |
|
29 |
```python
|
30 |
# Example input text
|
31 |
-
text = """
|
32 |
-
Upon opening Emotet maldocs, victims are greeted with fake Microsoft 365 prompt that states
|
33 |
“THIS DOCUMENT IS PROTECTED,” and instructs victims on how to enable macros.
|
34 |
-
"""
|
35 |
|
36 |
# Entity labels
|
37 |
labels = [
|
38 |
-
'CLICommand/CodeSnippet', 'CON', 'DATE', 'GROUP', 'LOC',
|
39 |
'MALWARE', 'ORG', 'SECTOR', 'TACTIC', 'TECHNIQUE', 'TOOL'
|
40 |
]
|
41 |
|
@@ -44,7 +44,7 @@ entities = model.predict_entities(text, labels, threshold=0.5)
|
|
44 |
|
45 |
# Display results
|
46 |
for entity in entities:
|
47 |
-
print(f"{entity['text']} => {entity['label']}")
|
48 |
```
|
49 |
|
50 |
### Sample Output
|
@@ -54,6 +54,10 @@ Emotet => MALWARE
|
|
54 |
Microsoft => ORG
|
55 |
```
|
56 |
|
|
|
|
|
|
|
|
|
57 |
## About
|
58 |
|
59 |
**AITSecNER** leverages GLiNER to quickly and accurately extract cybersecurity-specific entities, making it highly suitable for tasks such as:
|
|
|
19 |
```python
|
20 |
from gliner import GLiNER
|
21 |
|
22 |
+
model = GLiNER.from_pretrained(\"selfconstruct3d/AITSecNER\", load_tokenizer=True)
|
23 |
```
|
24 |
|
25 |
### Predict Entities
|
|
|
28 |
|
29 |
```python
|
30 |
# Example input text
|
31 |
+
text = \"\"\"
|
32 |
+
Upon opening Emotet maldocs, victims are greeted with fake Microsoft 365 prompt that states
|
33 |
“THIS DOCUMENT IS PROTECTED,” and instructs victims on how to enable macros.
|
34 |
+
\"\"\"
|
35 |
|
36 |
# Entity labels
|
37 |
labels = [
|
38 |
+
'CLICommand/CodeSnippet', 'CON', 'DATE', 'GROUP', 'LOC',
|
39 |
'MALWARE', 'ORG', 'SECTOR', 'TACTIC', 'TECHNIQUE', 'TOOL'
|
40 |
]
|
41 |
|
|
|
44 |
|
45 |
# Display results
|
46 |
for entity in entities:
|
47 |
+
print(f\"{entity['text']} => {entity['label']}\")
|
48 |
```
|
49 |
|
50 |
### Sample Output
|
|
|
54 |
Microsoft => ORG
|
55 |
```
|
56 |
|
57 |
+
## Model Details
|
58 |
+
|
59 |
+
The **AITSecNER** model was fine-tuned using the [urchade/gliner_small](https://huggingface.co/urchade/gliner_small) model from Hugging Face on the [priamai/AnnoCTR dataset](https://huggingface.co/datasets/priamai/AnnoCTR). For more details about the dataset, see the paper ["AnnoCTR: A Dataset for Detecting and Linking Entities, Tactics, and Techniques in Cyber Threat Reports"](https://arxiv.org/abs/2305.10472).
|
60 |
+
|
61 |
## About
|
62 |
|
63 |
**AITSecNER** leverages GLiNER to quickly and accurately extract cybersecurity-specific entities, making it highly suitable for tasks such as:
|