Alexis Palmer commited on
Commit
ba43e42
1 Parent(s): 97bf531

Mapudungun hangman test

Browse files
Files changed (2) hide show
  1. map_avenue/map-test.txt +268 -0
  2. util.py +69 -0
map_avenue/map-test.txt ADDED
@@ -0,0 +1,268 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ fillantü witrakeymi fillantü
2
+ epu, epu antü küla antü ka ta yagel kay ka falikalu tüfanay ngewelay kuyfi ngelafuy yagel anay
3
+ welu eymi rumel puliwen witrakeymi
4
+ puliwen witraken <*SPA>la <*SPA>hora <*SPA>que <*SPA>quiere <*SPA>levantar witrakey fey iñche tüfa petu mongelen nay ünikerkey ta wenu mapu ta ünikerkey ta mongelealu che nay iñche epu rupa meli rupachi ünin
5
+ ¡Aa!
6
+ ünin mongen, tüfa petu mongelen nay meli rupachi ünin taiñ peuma
7
+ ¡Aa!
8
+ taiñ peuma tati ünikey che nay ngünechen femkunuel kay nay üniy üni ta che mongelealu ta ünikerkellinay
9
+ ¡Aa!
10
+ mongelealu ünikey <!1üniki> anay refalte mongelekelay che tüfa iñche may petu mongelellen may nay müte fütalan anay newe pelowelan ke llemay
11
+ chumngelu chi pelowelaymi
12
+ feyta ñi kintun nem ka na nay llampaykoketuy chi nay femkey chi nay
13
+ amukeymi pitalmu kay
14
+ amukelan müte konkelan rume pitalmuanay kiñeke rupamu apuranen kutran fey ngemeken pitalmu
15
+ chempikeymu wingka
16
+ <*SPA>serio <*SPA>que <*SPA>tiene <*SPA>tanto <*SPA>años <*SPA>éste Camargo <*SPA>hombre pingeken ka
17
+ <Laugh> chumalanta küpaymi pingekeymi
18
+ feypingeken ka fey <*SPA>tanto, <*SPA>tanto <*SPA>este <*SPA>no <*SPA>quiere <*SPA>entrar niel <*SPA>el <*SPA>kuchillo <*SPA>éste wewon pikeneu ta pu wingka ayekalkeneu ka
19
+ eymi müley tami feypiafel iñche ta petu weche wentrulen piafimi
20
+ feypikellefiñ may <%> <*SPA>quiero <*SPA>casar <*SPA>hombre pikefiñ engün ayekaukingün
21
+ ¡Aa! kurengean pikefimi
22
+ may iñche ta petu mongelen llemay
23
+ elumulayafun küdau may pikelafimi
24
+ feypikelafiñ puwelan küdaumu anay pelotuwelan
25
+ welu re feypikantuafiel
26
+ may pelowelan tüfa <Noise>
27
+ eymi tami chau chunten tripantu mongey
28
+ uta <*SPA>más doy <*SPA>cien
29
+ doy pataka
30
+ may
31
+ tami ñuke
32
+ tañi ñuke ta inangechi laynga ka epe, ka epe pataka niefuynga
33
+ epe pataka niefuy
34
+ may
35
+ <Cough> ¡Aa! cheu tripapay tami ñuke faupüle müten tuwi
36
+ <*SPA>no <*SPA>afuera, <*SPA>afuera
37
+ chuchipüle
38
+ <*SPA>selva <*SPA>oscura <!1selvacura>
39
+ üyüu tuwüy
40
+ may <*SPA>perquenco pingey tati mapu ta feypüle wingka mapefiñ pilay ta mapu nay
41
+ ¡Aa!
42
+ ka eymingelu tukulelfi üy kakelu femngechi kampiayka <!1cambiayca>
43
+ ¡Aa!
44
+ niekekelafuy ta wingka ta tüfa nay eymiam chuchi mapuche ta ka tüfa nay femyawiymi ka nay weniy
45
+ iñche ta Alfarinu pingey tañi mapu
46
+ Alfarinu
47
+ may
48
+ Alfarinu
49
+ may
50
+ iñche kayta kimlafiñ kayta Alfarino, Alfarinu pikay ta che ka lle
51
+ Temuko kay
52
+ may, may Temuko ta feyta miauken
53
+ kuyfi deuma amuwelaymi ka?
54
+ tüfa ngemewekelan anay plataam ka fütra <*SPA>escaso nay
55
+ pensionauküleymi?
56
+ pensionaukülefun <*SPA>pero pichiken nüken
57
+ pichiken llemay
58
+ pichiken
59
+ ¡Aa! welu <uh> fülküleymi wariamu tati
60
+ fülkülefun wariamu pekanka wül-lay wingka rume kam paysanumu anay pekanka wül-lay kuyfitu doy pekankakefeyu fütrake aweluyem
61
+ ¡Aa!
62
+ <*SPA>y pu wingka dpy pekanka tripayal tati pofüre <*SPA>hombre pifuy tüfa pu wingka femwelay anay tenga pülata kontau pipiey
63
+ kuyfi doy elungekefuymün
64
+ doy pichi elungekeyiñ chemu rume tati nielan pülata pingipiy regalangekay iyagel fey tüfa femwelay anay re pülatamu müten amuley
65
+ nienole pülata fey amulay?
66
+ ya amulay, amulay
67
+ ¡Aa!
68
+ femkey che tüfa anay
69
+ tami <uh> chemchi ta kümey ta kutran furinmu
70
+ kuyfi
71
+ may kutran furinmu chem kümey, kutraniem furi
72
+ <%> tati chem fütake awelungati l'awen' ta kimüy ka anay iñchiñ ta kimlayiñ ta anay <%> tüfa kay ta tañi domo nay palusantu piy
73
+ palusantu yengu ta nalka
74
+ rume kümey pingey <!1pingi> fey feyngey
75
+ feyngey, feyngey
76
+ eymi putulafimi fey
77
+ <*SPA>no putukelafiñ tati
78
+ ¡Aa!<%>
79
+ tati <*SPA>limpiaplata ka müley
80
+ <uh> pewen anta l'awen' ngekey kay chachay
81
+ fey tati trantupatuy allfeñngelu ta +/wor/+ workükakeychi nay fey notukey ta che tati allfeñngelulle fey
82
+ pewenmu
83
+ may pewenmu fayümngey
84
+ fey kümey
85
+ fey kümey
86
+ ¿alüley pewen tapüle?
87
+ pütrakamaley chi nay repül nentukatuy mawidamu re pewen nentulley chi nay
88
+ feymuanta pewenche pingekey?
89
+ feymulle ta pewenche pingey tati nay
90
+ ¡Aa! fentrekeley pewen
91
+ pütrakamagel tüfa kay ta wingka ta apümüy anay apümüy
92
+ chumngelu chi
93
+ <hm> seriakefiyngün kay nay
94
+ traflafingün
95
+ traflafingün fey ta tau newentulelu müten ta paysanu kay feyta küpaymangelay tañi feranamullenay
96
+ newentulelu
97
+ may feypingey wentrüu mekey kay nay
98
+ ¡Aa!
99
+ femüymamukelchi pipingey feymu ta kapalekellinanay ngülliumu pütrümna küñeke tripantumu müna fünkey ngülliu anay, kiñeke tripantu müten kiñeke tripantu weda pukemiyem tati wül-lay ta ngünechen müna nongikelley tati ngilliu anay
100
+ ngilliu anta ingekey ka
101
+ chemuam müna kümey mudayünmu ngülliu anay
102
+ ¡Aa!
103
+ pütrümna kümey ta ngülliu ta müdayünmu lle ka tati füntu pingey tati y deumangey korünmu ellangey tati angküchi medküngeyanay rumeñma kümey
104
+ ka kümey
105
+ kümey
106
+ ¡Aa!
107
+ fey felekelleychi
108
+ ilo korümu ta püstuy
109
+ alü niekeymün anta kapüra faupüle
110
+ nielayiñ kapüra
111
+ kuyfi ta mülekefuy ka tüfa ta ngewelay kiñekenekakefuyiñ kuyfi tüfa ta niewelayiñ anay
112
+ niewelay
113
+ eskasiay anta chem rume ta wülngerkelaynay keya mongeltual tañi <*SPA>familia ta che
114
+ may, may
115
+ eskasiafun kompüle ta faltakey ka che nay
116
+ fey femngechi kuyfi niekefuymi
117
+ kuyfi niekellefuyiñ pero tüfa ta femwelayiñ anay tüfa rumeñma eskaseakelu itrokom nay
118
+ ¡Aa!
119
+ rumeñma eskaseakeyiñ <Noise> pewelayin ta tüfa anay pekan pengewelay tati
120
+ pekan pengewelay
121
+ <*SPA>no
122
+ ¡Aa! eymi pilukelaymi?
123
+ <*SPA>no pilukelan chemkülekan müten
124
+ kümelkaley tami pilun
125
+ may
126
+ allküleymi küme
127
+ allkülen
128
+ ¡Aa!
129
+ <*SPA>eso <*SPA>si <*SPA>que pelowelanke anay, pelowenke
130
+ welu chafokeymi kay
131
+ ¡Aa!
132
+ ¿chafokeymi?
133
+ <*SPA>no
134
+ chafokelaymi
135
+ <*SPA>no
136
+ ya, ya, ya, ya feyti kiñe kutran müley kimlafimi wauyuyem che?
137
+ <*SPA>no kimlafiñ anay
138
+ ¡Aa!
139
+ kimlafiñ
140
+ wauyukelaymi?
141
+ <*SPA>no iñche tüfa petu mongelen nay
142
+ welu eymi kutranchengelaymi <*SPA>pues <!1pu'>
143
+ kutranchengekelay kiñekemu rumeñma kutranken rüfanay chuman kay
144
+ chem doy kutrankey?
145
+ tañi piukeyem, tañi pu ngeyem kutrankey kiñekemu tulliuken anay, femkey che anay
146
+ piuke kutraniyem chem l'awen' putukeymi
147
+ feyti foye workükefiñ
148
+ foye
149
+ may
150
+ ¡Aa!
151
+ feytamu ngellelay foye nay
152
+ kañpüle müley <*SPA>pues <!1pu'>
153
+ kañpüle <*SPA>afuera müten müley ka
154
+ feyta müley ta re ngülliu faupüle
155
+ femay re ngilliu ta mülelli nay
156
+ welu ngelay foye
157
+ ngelay, ngelay
158
+ ¡Aa!
159
+ ngellelay foye tamu
160
+ <uh> pafmu chem kümey pafmuyem?
161
+ +/pafmuye/+ +/pa/+ pafmuyem
162
+ may
163
+ fey tati chem ka tukungekey ama
164
+ feyta kümey
165
+ pafmulu
166
+ pafmunmu
167
+ palki
168
+ may
169
+ müley palki faupüle kay
170
+ ngelaychi nay
171
+ ngelay palki
172
+ may
173
+ welu mawidamu fentrelepelafuy l'awen' peñi
174
+ tüfamu
175
+ may
176
+ mülellefuy may
177
+ <uhm> tüfamu keta müley l'awen' <%>
178
+ welu kuyfi kimfuymi l'awen'
179
+ kimkallefun mayta tati kutran *pütrawe pingey feyta tungefuy kay nay feyta tüfa ta pelotuwelan ka nay
180
+ welu üy kimneymafimi l'awen'
181
+ llipañmawe pingey kangelu tati chempingekey chi pe fey engün ta mülefuyanay
182
+ ya <Noise> welu <uh> alün l'awen' putupelaymi kuyfi mapu l'awen' eymi
183
+ worküngey fayümngey tati l'awen' tati, tati *matragelu ta fey tutekey tati anay tutekey
184
+ tutekey
185
+ may
186
+ ¡Aa! feyta <uh> nielu mongen tutey ka
187
+ tutellimay, tutey iñche ta petu mongelellen may pütra kuyfiche
188
+ welu kümey tami alütun mongen tati peñi
189
+ kürasia may nay kürasia
190
+ kümey tami alünmongen tun
191
+ fey kürasia pipiepan tati
192
+ müley tami
193
+ taiñ choyeteu ka ta ngünechen kayta witrañpüramnieneu feyta mongelen ka nay <*SPA>mucha gürasia tami pipiepafiel
194
+ ngillatuleymukeymi welu
195
+ ¡Aa!
196
+ ngillatulekeymi
197
+ ngüllatuken nay, workam chem l'awen' nay ngillatu pichiken püntefnentukaken kay ka
198
+ ¡Aa!
199
+ femkey che anay
200
+ welu ngillatuley che mongelekey pingey
201
+ femkey
202
+ eymi rumel ngillatukeymi
203
+ ngillatumeken worküayem fey ngillatuken tüfa kay ta felen müte chumlekalafun anay <*SPA>eso <*SPA>si <*SPA>que pelowellelan
204
+ peumakeymi kay
205
+ peumaken ünin melike rupachi ünin.
206
+ ¡Aa! feyta akukelay pütrümna *wetanki iñamnga akuay pipeyu
207
+ ¡Aa!
208
+ tüfa aku akungepey tañi witan chemuam femekey tüfa fey tüfi llemay pipingepatun ta, ta
209
+ witaymi
210
+ may
211
+ ¿küme witaymiam?
212
+ müna küme witan tayi pipiepefiñ ta tüfa
213
+ fey mayta iñche tañi akual
214
+ femüy fey tami akukellal may tati femekepen
215
+ pemean ñi peñi doy alütunielu mongen pipenga?
216
+ tüfey may
217
+ doy alünielu mongen fey pemeafiñ pipen fey
218
+ fey fütra kuyfi che iñche tüfa kay
219
+ feymu mayta witapeymi?
220
+ feymu
221
+ welu küme witapeymi?
222
+ küme witapen <*SPA>porque müna kimyey tañi witan ta che anay
223
+ ¡Aa!
224
+ tüfa man lipang tayiye chemmu amuy fente mekepen pipen
225
+ inichi akuay pipeymi
226
+ may ta tüfa llemay ngütramkamekepatuymi tüfa tati nay
227
+ iñche duamtukeyu pu fey
228
+ may, may
229
+ doy alü nielu mongen feyta ngütramkameafiñ piken
230
+ may kümeyka fey kürasia may nay kürasia
231
+ kimkelafun müten cheu tami mülen
232
+ may nay
233
+ wingkulmu mülerkeymi <!1mülerkimi>
234
+ wingkulüukülen, wingkülüukülen
235
+ winkülmu müleymi may
236
+ may fey
237
+ küme dungu tati tami mülen wingkulmeu
238
+ fey chumngechianta kimüymi ta tüfa femngechi püfkükonpaymi tapüle peñi
239
+ ngütramkapefiñ tami fotüm
240
+ may, may
241
+ Domingo
242
+ Domingo Cayul
243
+ Domingu Camargo
244
+ feylle fey
245
+ Cayul
246
+ Cayul feyti ñi chau pütrüney mongen pipey
247
+ may, may
248
+ <uh> petu allküley piy ngütramkameafimi kichu alü kimney dungu pipey
249
+ feyta iney <!1iñi> Domingo feyta ñi fotüm nay
250
+ fey pelelmeam ñi chau pipeneu
251
+ may, may
252
+ pemeafimi piy petu nieyta mongeley tañi fücha chau piy
253
+ petu mongelellen may tüfa
254
+ fentepuay ngütram peñi feyta pepapeyu feymu fey peumangelmi doy alüniaymi mongen <*SPA>pues
255
+ kürasia may nay kürasia
256
+ iñche ta rupaletuan tati amuleanta kañpüle
257
+ may, may kañpüle ka wariamu amukayaymi ka ka paysanumu ka, ka
258
+ may
259
+ kam pewenko chi tüfachi pewenko ka pewenko, <*SPA>selva <*SPA>oscura <!1selvecura> pingey tati rupauyimi <*SPA>selva <*SPA>oscura <!1selvecura> eymi ta tüfaka
260
+ feypüle amuan feula
261
+ may, may <*SPA>selva <*SPA>oscura <!1selvecura>
262
+ may
263
+ wiñoltuayminge mapu ka
264
+ may
265
+ may, may
266
+ feyta kümeleaymi pu peñi pepapeyu tati
267
+ kürasia may nay kürasia, fey tañi ngütramkapafiel ka nay
268
+ feley.
util.py ADDED
@@ -0,0 +1,69 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import os
2
+ import re
3
+ import unicodedata
4
+
5
+ def strip_accents(text: str) -> str:
6
+ """Removes accents from text."""
7
+ return ''.join(c for c in unicodedata.normalize('NFD', text)
8
+ if unicodedata.category(c) != 'Mn')
9
+
10
+
11
+ def load_raw_text(corpus_directory: str, file_names=None) -> str:
12
+ """Loads all the text files in a directory into one large string"""
13
+ corpus = ""
14
+
15
+ for file_name in os.listdir(corpus_directory):
16
+ # Read the file as a string
17
+ file_path = os.path.join(corpus_directory, file_name)
18
+ if os.path.isdir(file_path):
19
+ continue
20
+
21
+ # Make sure we only read text files
22
+ if ".txt" not in file_name:
23
+ continue
24
+
25
+ with open(file_path, 'r') as file:
26
+ file_contents = file.read()
27
+ corpus += (file_contents + "\n")
28
+ return corpus
29
+
30
+
31
+ word_regex = r"[\w|\']+"
32
+ def tokenize(text):
33
+ return re.findall(word_regex, text)
34
+
35
+
36
+ def preprocess(text):
37
+ """Tokenizes and processes text which is already separated by spaces into words. Designed for English punctuation."""
38
+ text = strip_accents(text)
39
+ text = text.lower()
40
+
41
+ tokens = text.split(" ")
42
+
43
+ tokens_filtered = []
44
+ for token in tokens:
45
+ # Skip any tokens with special characters
46
+ if re.match(r"[\w|\']+|[\.|\,|\?|\!]", token):
47
+ tokens_filtered.append(token)
48
+ return tokens_filtered
49
+
50
+
51
+ def pad(text: list, num_padding: int):
52
+ """Pads the given text, as a list of strings, with <s> characters between sentences."""
53
+ padded_text = []
54
+
55
+ # Add initial padding to the first sentence
56
+ for _ in range(num_padding):
57
+ padded_text.append("<s>")
58
+
59
+ for word in text:
60
+ padded_text.append(word)
61
+
62
+ # Every time we see an end punctuation mark, add <s> tokens before it
63
+ # REPLACE IF YOUR LANGUAGE USES DIFFERENT END PUNCTUATION
64
+ if word in [".", "?", "!"]:
65
+ for _ in range(num_padding):
66
+ padded_text.append("<s>")
67
+
68
+
69
+ return padded_text