Views
No views yet
[BLANK]. In that case, the word is usually a name of a person or a city, and the lexeme is probably the word after removing prefixes which can be done with the dictabert-seg tool.1from transformers import AutoModel, AutoTokenizer
2
3tokenizer = AutoTokenizer.from_pretrained('dicta-il/dictabert-lex')
4model = AutoModel.from_pretrained('dicta-il/dictabert-lex', trust_remote_code=True)
5
6model.eval()
7
8sentence = 'בשנת 1948 השלים אפרים קישון את לימודיו בפיסול מתכת ובתולדות האמנות והחל לפרסם מאמרים הומוריסטיים'
9print(model.predict([sentence], tokenizer))1[
2 [
3 [
4 "בשנת",
5 "שנה"
6 ],
7 [
8 "1948",
9 "1948"
10 ],
11 [
12 "השלים",
13 "השלים"
14 ],
15 [
16 "אפרים",
17 "אפרים"
18 ],
19 [
20 "קישון",
21 "קישון"
22 ],
23 [
24 "את",
25 "את"
26 ],
27 [
28 "לימודיו",
29 "לימוד"
30 ],
31 [
32 "בפיסול",
33 "פיסול"
34 ],
35 [
36 "מתכת",
37 "מתכת"
38 ],
39 [
40 "ובתולדות",
41 "תולדה"
42 ],
43 [
44 "האמנות",
45 "אומנות"
46 ],
47 [
48 "והחל",
49 "החל"
50 ],
51 [
52 "לפרסם",
53 "פרסם"
54 ],
55 [
56 "מאמרים",
57 "מאמר"
58 ],
59 [
60 "הומוריסטיים",
61 "הומוריסטי"
62 ]
63 ]
64]MRL Parsing without Tears: The Case of Hebrew1@misc{shmidman2024mrl,
2 title={MRL Parsing Without Tears: The Case of Hebrew},
3 author={Shaltiel Shmidman and Avi Shmidman and Moshe Koppel and Reut Tsarfaty},
4 year={2024},
5 eprint={2403.06970},
6 archivePrefix={arXiv},
7 primaryClass={cs.CL}
8}