noamor commited on
Commit
e583965
verified
1 Parent(s): 28d8f3e

bank: niqqud-normalized + junk-removed (117,640 lemmas); v0.2.0 card

Browse files
Files changed (1) hide show
  1. README.md +7 -2
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`, ~118k lemmas) |
 
 
 
 
 
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)