Fix license to CC BY-SA 4.0, add usage example
Browse files
README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
| 1 |
---
|
| 2 |
language:
|
| 3 |
- en
|
| 4 |
-
license:
|
| 5 |
task_categories:
|
| 6 |
- token-classification
|
| 7 |
task_ids:
|
|
@@ -61,6 +61,24 @@ Each token has:
|
|
| 61 |
- `DEPREL` — dependency relation
|
| 62 |
- `MISC` — NER tags in BIO format (e.g., `NER=B-ORG`)
|
| 63 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 64 |
## Source
|
| 65 |
|
| 66 |
- **Training code:** [rustic-ai/kniv-nlp-models](https://github.com/rustic-ai/kniv-nlp-models)
|
|
@@ -68,4 +86,4 @@ Each token has:
|
|
| 68 |
|
| 69 |
## License
|
| 70 |
|
| 71 |
-
|
|
|
|
| 1 |
---
|
| 2 |
language:
|
| 3 |
- en
|
| 4 |
+
license: cc-by-sa-4.0
|
| 5 |
task_categories:
|
| 6 |
- token-classification
|
| 7 |
task_ids:
|
|
|
|
| 61 |
- `DEPREL` — dependency relation
|
| 62 |
- `MISC` — NER tags in BIO format (e.g., `NER=B-ORG`)
|
| 63 |
|
| 64 |
+
## Usage
|
| 65 |
+
|
| 66 |
+
```python
|
| 67 |
+
import conllu
|
| 68 |
+
from huggingface_hub import hf_hub_download
|
| 69 |
+
|
| 70 |
+
# Download a split
|
| 71 |
+
path = hf_hub_download("dragonscale-ai/kniv-corpus-en", "train.conllu", repo_type="dataset")
|
| 72 |
+
|
| 73 |
+
with open(path) as f:
|
| 74 |
+
sentences = conllu.parse(f.read())
|
| 75 |
+
|
| 76 |
+
for sent in sentences[:3]:
|
| 77 |
+
print(sent.metadata["text"])
|
| 78 |
+
for token in sent:
|
| 79 |
+
print(f" {token['form']:20s} POS={token['upos']:6s} DEP={token['deprel']}")
|
| 80 |
+
```
|
| 81 |
+
|
| 82 |
## Source
|
| 83 |
|
| 84 |
- **Training code:** [rustic-ai/kniv-nlp-models](https://github.com/rustic-ai/kniv-nlp-models)
|
|
|
|
| 86 |
|
| 87 |
## License
|
| 88 |
|
| 89 |
+
CC BY-SA 4.0. See individual domain READMEs in the source repo for per-source licenses.
|