bank: niqqud-normalized + junk-removed (117,640 lemmas); v0.2.0 card
Browse files
README.md
CHANGED
|
@@ -29,7 +29,12 @@ IAHLT Hebrew UD treebank, plus public Hebrew lexicons.
|
|
| 29 |
| folder | what |
|
| 30 |
|---|---|
|
| 31 |
| `model/` | the fine-tuned encoder (DictaBERT backbone) + POS head + edit-script head and inventory |
|
| 32 |
-
| `bank/` | the pre-encoded lemma bank (`lemmas.csv` + `lemmas.npy`, ~
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 33 |
|
| 34 |
## Usage
|
| 35 |
|
|
@@ -41,7 +46,7 @@ pip install git+https://github.com/ivrit/shoshan.git
|
|
| 41 |
from shoshan import Lemmatizer
|
| 42 |
|
| 43 |
lz = Lemmatizer.from_pretrained() # pulls these weights, then caches
|
| 44 |
-
lz.lemma("讛诪
|
| 45 |
```
|
| 46 |
|
| 47 |
## Results (out-of-domain, held-out registers)
|
|
|
|
| 29 |
| folder | what |
|
| 30 |
|---|---|
|
| 31 |
| `model/` | the fine-tuned encoder (DictaBERT backbone) + POS head + edit-script head and inventory |
|
| 32 |
+
| `bank/` | the pre-encoded lemma bank (`lemmas.csv` + `lemmas.npy`, ~117.6k lemmas) |
|
| 33 |
+
|
| 34 |
+
The bank is normalized to a single undotted, quote-folded form per lemma (so vowel-only
|
| 35 |
+
variants can't produce arbitrary retrieval ties) and filtered to valid Hebrew lemmas.
|
| 36 |
+
Inference encodes each sentence once and pools every token from it, so document lemmatization
|
| 37 |
+
scales with the number of sentences, not tokens.
|
| 38 |
|
| 39 |
## Usage
|
| 40 |
|
|
|
|
| 46 |
from shoshan import Lemmatizer
|
| 47 |
|
| 48 |
lz = Lemmatizer.from_pretrained() # pulls these weights, then caches
|
| 49 |
+
lz.lemma("讛诪讞讘专讜转", "讛诪讜专讛 讞讬诇拽讛 讗转 讛诪讞讘专讜转 诇转诇诪讬讚讬诐 讘讻讬转讛.") # -> 诪讞讘专转
|
| 50 |
```
|
| 51 |
|
| 52 |
## Results (out-of-domain, held-out registers)
|