| 1 | === UTT by Example === |
| 2 | |
| 3 | = author: Mateusz Boryga = |
| 4 | |
| 5 | |
| 6 | |
| 7 | == tok == |
| 8 | |
| 9 | Command: |
| 10 | echo 'W moim domu jest zawsze głośno. Stoi przy ruchliwej ulicy.' | tok |
| 11 | Output: |
| 12 | 0000 01 W W |
| 13 | 0001 01 S _ |
| 14 | 0002 04 W moim |
| 15 | 0006 01 S _ |
| 16 | 0007 04 W domu |
| 17 | 0011 01 S _ |
| 18 | 0012 04 W jest |
| 19 | 0016 01 S _ |
| 20 | 0017 06 W zawsze |
| 21 | 0023 01 S _ |
| 22 | 0024 06 W głośno |
| 23 | 0030 01 P . |
| 24 | 0031 01 S _ |
| 25 | 0032 04 W Stoi |
| 26 | 0036 01 S _ |
| 27 | 0037 04 W przy |
| 28 | 0041 01 S _ |
| 29 | 0042 09 W ruchliwej |
| 30 | 0051 01 S _ |
| 31 | 0052 05 W ulicy |
| 32 | 0057 01 P . |
| 33 | 0058 01 S \n |
| 34 | |
| 35 | |
| 36 | |
| 37 | == lem == |
| 38 | |
| 39 | Command: |
| 40 | echo 'Ulicą jedzie szybki i zielony samochód.' | tok | lem |
| 41 | Output: |
| 42 | 0000 05 W Ulicą lem:ulica,N/CiGfNs |
| 43 | 0005 01 S _ |
| 44 | 0006 06 W jedzie lem:jechać,V/AiMdNsP3R-TfrVp |
| 45 | 0012 01 S _ |
| 46 | 0013 06 W szybki lem:szybki,ADJ/CaDpGiNs |
| 47 | 0013 06 W szybki lem:szybki,ADJ/CnvDpGaipNs |
| 48 | 0013 06 W szybki lem:szybka,N/CaGfNp |
| 49 | 0013 06 W szybki lem:szybka,N/CgGfNs |
| 50 | 0013 06 W szybki lem:szybka,N/CnGfNp |
| 51 | 0013 06 W szybki lem:szybka,N/CvGfNp |
| 52 | 0019 01 S _ |
| 53 | 0020 01 W i lem:i,CONJ |
| 54 | 0020 01 W i lem:i,EXCL |
| 55 | 0021 01 S _ |
| 56 | 0022 07 W zielony lem:zielony,ADJ/CaDpGiNs |
| 57 | 0022 07 W zielony lem:zielony,ADJ/CnvDpGaipNs |
| 58 | 0029 01 S _ |
| 59 | 0030 08 W samochód lem:samochód,N/CaGiNs |
| 60 | 0030 08 W samochód lem:samochód,N/CnGiNs |
| 61 | 0038 01 P . |
| 62 | 0039 01 S \n |
| 63 | |
| 64 | Command: |
| 65 | echo 'Ulicą jedzie szybki i zielony samochód.' | tok | lem --one-line |
| 66 | Output: |
| 67 | 0000 05 W Ulicą lem:ulica,N/CiGfNs |
| 68 | 0005 01 S _ |
| 69 | 0006 06 W jedzie lem:jechać,V/AiMdNsP3R-TfrVp |
| 70 | 0012 01 S _ |
| 71 | 0013 06 W szybki lem:szybki,ADJ/CaDpGiNs lem:szybki,ADJ/CnvDpGaipNs lem:szybka,N/CaGfNp lem:szybka,N/CgGfNs lem:szybka,N/CnGfNp lem:szybka,N/CvGfNp |
| 72 | 0019 01 S _ |
| 73 | 0020 01 W i lem:i,CONJ lem:i,EXCL |
| 74 | 0021 01 S _ |
| 75 | 0022 07 W zielony lem:zielony,ADJ/CaDpGiNs lem:zielony,ADJ/CnvDpGaipNs |
| 76 | 0029 01 S _ |
| 77 | 0030 08 W samochód lem:samochód,N/CaGiNs lem:samochód,N/CnGiNs |
| 78 | 0038 01 P . |
| 79 | 0039 01 S \n |
| 80 | |
| 81 | Command: |
| 82 | echo 'Ulicą jedzie szybki i zielony samochód.' | tok | lem -1 |
| 83 | Output: |
| 84 | 0000 05 W Ulicą lem:ulica,N/CiGfNs |
| 85 | 0005 01 S _ |
| 86 | 0006 06 W jedzie lem:jechać,V/AiMdNsP3R-TfrVp |
| 87 | 0012 01 S _ |
| 88 | 0013 06 W szybki lem:szybki,ADJ/CaDpGiNs,ADJ/CnvDpGaipNs;szybka,N/CaGfNp,N/CgGfNs,N/CnGfNp,N/CvGfNp |
| 89 | 0019 01 S _ |
| 90 | 0020 01 W i lem:i,CONJ,EXCL |
| 91 | 0021 01 S _ |
| 92 | 0022 07 W zielony lem:zielony,ADJ/CaDpGiNs,ADJ/CnvDpGaipNs |
| 93 | 0029 01 S _ |
| 94 | 0030 08 W samochód lem:samochód,N/CaGiNs,N/CnGiNs |
| 95 | 0038 01 P . |
| 96 | 0039 01 S \n |
| 97 | |
| 98 | |
| 99 | |
| 100 | gue |
| 101 | |
| 102 | Command: |
| 103 | echo 'smerfny' | tok | gue |
| 104 | Output: |
| 105 | 0000 07 W smerfny gue:smerfny,ADJ/CaDpGiNs |
| 106 | 0000 07 W smerfny gue:smerfny,ADJ/CnvDpGaipNs |
| 107 | 0007 01 S \n |
| 108 | |
| 109 | Command: |
| 110 | echo 'smerfny' | tok | gue --one-line |
| 111 | Output: |
| 112 | 0000 07 W smerfny gue:smerfny,ADJ/CaDpGiNs gue:smerfny,ADJ/CnvDpGaipNs |
| 113 | 0007 01 S \n |
| 114 | |
| 115 | Command: |
| 116 | echo 'smerfny' | tok | gue -1 |
| 117 | Output: |
| 118 | 0000 07 W smerfny gue:smerfny,ADJ/CaDpGiNs,ADJ/CnvDpGaipNs |
| 119 | 0007 01 S \n |
| 120 | |
| 121 | |
| 122 | |
| 123 | cor |
| 124 | |
| 125 | Command: |
| 126 | echo 'kresło' | tok | cor |
| 127 | Output: |
| 128 | 0000 06 W kresło cor:kresko |
| 129 | 0000 06 W kresło cor:kreso |
| 130 | 0000 06 W kresło cor:krzesło |
| 131 | 0006 01 S \n |
| 132 | |
| 133 | Command: |
| 134 | echo 'kresło' | tok | cor --one-line |
| 135 | Output: |
| 136 | 0000 06 W kresło cor:kresko cor:kreso cor:krzesło |
| 137 | 0006 01 S \n |
| 138 | |
| 139 | Command: |
| 140 | echo 'kresło' | tok | cor -1 |
| 141 | Output: |
| 142 | 0000 06 W kresło cor:kresko;kreso;krzesło |
| 143 | 0006 01 S \n |
| 144 | |
| 145 | Command: |
| 146 | echo 'kzzeslo' | tok | cor -n 2 |
| 147 | Output: |
| 148 | 0000 07 W kzzeslo cor:krzesko |
| 149 | 0000 07 W kzzeslo cor:krzesło |
| 150 | 0007 01 S \n |
| 151 | |
| 152 | |
| 153 | |
| 154 | kor |
| 155 | |
| 156 | Command: |
| 157 | echo 'kresło' | tok | kor |
| 158 | Output: |
| 159 | 0000 06 W kresło kor:krzesło |
| 160 | 0000 06 W kresło kor:kreso |
| 161 | 0000 06 W kresło kor:kresko |
| 162 | 0006 01 S \n |
| 163 | |
| 164 | Command: |
| 165 | echo 'kresło' | tok | kor --one-line |
| 166 | Output: |
| 167 | 0000 06 W kresło kor:krzesło kor:kreso kor:kresko |
| 168 | 0006 01 S \n |
| 169 | |
| 170 | Command: |
| 171 | echo 'kresło' | tok | kor -1 |
| 172 | Output: |
| 173 | 0000 06 W kresło kor:krzesło;kreso;kresko |
| 174 | 0006 01 S \n |
| 175 | |
| 176 | Command: |
| 177 | echo 'pisemy' | tok | kor -n 3 |
| 178 | Output: |
| 179 | 0000 06 W pisemy kor:piszmy |
| 180 | 0000 06 W pisemy kor:piszemy |
| 181 | 0000 06 W pisemy kor:pisemny |
| 182 | 0006 01 S \n |
| 183 | |
| 184 | Command: |
| 185 | echo 'grzegrzułka' | tok | kor -w w.kor |
| 186 | File w.kor: |
| 187 | %stdcor 1 |
| 188 | %xchg 1 |
| 189 | ż rz 0.3 |
| 190 | u ó 0.3 |
| 191 | Output: |
| 192 | 0000 11 W grzegrzułka kor:gżegżółka |
| 193 | 0011 01 S \n |
| 194 | |
| 195 | |
| 196 | |
| 197 | sen |
| 198 | |
| 199 | Command: |
| 200 | echo 'Ala? Ala ma kota. Kot ma Alę.' | tok | sen |
| 201 | Output: |
| 202 | 0000 00 BOS * |
| 203 | 0000 03 W Ala |
| 204 | 0003 01 P ? |
| 205 | 0004 00 EOS * |
| 206 | 0004 00 BOS * |
| 207 | 0004 01 S _ |
| 208 | 0005 03 W Ala |
| 209 | 0008 01 S _ |
| 210 | 0009 02 W ma |
| 211 | 0011 01 S _ |
| 212 | 0012 04 W kota |
| 213 | 0016 01 P . |
| 214 | 0017 00 EOS * |
| 215 | 0017 00 BOS * |
| 216 | 0017 01 S _ |
| 217 | 0018 03 W Kot |
| 218 | 0021 01 S _ |
| 219 | 0022 02 W ma |
| 220 | 0024 01 S _ |
| 221 | 0025 03 W Alę |
| 222 | 0028 01 P . |
| 223 | 0029 01 S \n |
| 224 | 0030 00 EOS * |
| 225 | |
| 226 | |
| 227 | |
| 228 | ser |
| 229 | |
| 230 | Command: |
| 231 | echo 'O Białym Domu mówi się, że to duży funkcjonalny dom.' | tok | lem -1 | ser -e 'word(dom)' |
| 232 | Output: |
| 233 | 0000 01 W O lem:o,EXCL,P/Cal |
| 234 | 0001 01 S _ |
| 235 | 0002 06 W Białym lem:biały,ADJ/CdDpNp,ADJ/CilDpGainpNs |
| 236 | 0008 01 S _ |
| 237 | 0009 04 W Domu lem:dom,N/CgGiNs,N/ClGiNs,N/CvGiNs |
| 238 | 0013 01 S _ |
| 239 | 0014 04 W mówi lem:mówić,V/AiMdNsP3R-TfrVp |
| 240 | 0018 01 S _ |
| 241 | 0019 03 W się lem:się,NPRO/CaZx,NPRO/CgZx |
| 242 | 0022 01 P , |
| 243 | 0023 01 S _ |
| 244 | 0024 02 W że lem:że,CONJ,PART |
| 245 | 0026 01 S _ |
| 246 | 0027 02 W to lem:to,CONJ,NPRO/CaGnNsZd,NPRO/CnGnNsZd,PART;ten,ADJPRO/CanvGnNsZd |
| 247 | 0029 01 S _ |
| 248 | 0030 04 W duży lem:duży,ADJ/CaDpGiNs,ADJ/CnvDpGaipNs |
| 249 | 0034 01 S _ |
| 250 | 0035 12 W funkcjonalny lem:funkcjonalny,ADJ/CaDpGiNs,ADJ/CnvDpGaipNs |
| 251 | 0047 01 S _ |
| 252 | 0048 00 BOM * ser:1 |
| 253 | 0048 03 W dom lem:dom,N/CaGiNs,N/CnGiNs |
| 254 | 0051 00 EOM * ser:1 |
| 255 | 0051 01 P . |
| 256 | 0052 01 S \n |
| 257 | |
| 258 | Command: |
| 259 | echo 'O Białym Domu mówi się, że to duży funkcjonalny dom.' | tok | lem -1 | ser -m -e 'word(dom)' |
| 260 | Output: |
| 261 | 0048 00 BOM * ser:1 |
| 262 | 0048 03 W dom lem:dom,N/CaGiNs,N/CnGiNs |
| 263 | 0051 00 EOM * ser:1 |
| 264 | |
| 265 | Command: |
| 266 | echo 'O Białym Domu mówi się, że to duży funkcjonalny dom.' | tok | lem -1 | ser -e 'lexeme(dom)' |
| 267 | Output: |
| 268 | 0000 01 W O lem:o,EXCL,P/Cal |
| 269 | 0001 01 S _ |
| 270 | 0002 06 W Białym lem:biały,ADJ/CdDpNp,ADJ/CilDpGainpNs |
| 271 | 0008 01 S _ |
| 272 | 0009 00 BOM * ser:1 |
| 273 | 0009 04 W Domu lem:dom,N/CgGiNs,N/ClGiNs,N/CvGiNs |
| 274 | 0013 00 EOM * ser:1 |
| 275 | 0013 01 S _ |
| 276 | 0014 04 W mówi lem:mówić,V/AiMdNsP3R-TfrVp |
| 277 | 0018 01 S _ |
| 278 | 0019 03 W się lem:się,NPRO/CaZx,NPRO/CgZx |
| 279 | 0022 01 P , |
| 280 | 0023 01 S _ |
| 281 | 0024 02 W że lem:że,CONJ,PART |
| 282 | 0026 01 S _ |
| 283 | 0027 02 W to lem:to,CONJ,NPRO/CaGnNsZd,NPRO/CnGnNsZd,PART;ten,ADJPRO/CanvGnNsZd |
| 284 | 0029 01 S _ |
| 285 | 0030 04 W duży lem:duży,ADJ/CaDpGiNs,ADJ/CnvDpGaipNs |
| 286 | 0034 01 S _ |
| 287 | 0035 12 W funkcjonalny lem:funkcjonalny,ADJ/CaDpGiNs,ADJ/CnvDpGaipNs |
| 288 | 0047 01 S _ |
| 289 | 0048 00 BOM * ser:2 |
| 290 | 0048 03 W dom lem:dom,N/CaGiNs,N/CnGiNs |
| 291 | 0051 00 EOM * ser:2 |
| 292 | 0051 01 P . |
| 293 | 0052 01 S \n |
| 294 | |
| 295 | Command: |
| 296 | echo 'O Białym Domu mówi się, że to duży funkcjonalny dom.' | tok | lem -1 | ser -m -e 'lexeme(dom)' |
| 297 | Output: |
| 298 | 0009 00 BOM * ser:1 |
| 299 | 0009 04 W Domu lem:dom,N/CgGiNs,N/ClGiNs,N/CvGiNs |
| 300 | 0013 00 EOM * ser:1 |
| 301 | 0048 00 BOM * ser:2 |
| 302 | 0048 03 W dom lem:dom,N/CaGiNs,N/CnGiNs |
| 303 | 0051 00 EOM * ser:2 |
| 304 | |
| 305 | Command: |
| 306 | echo 'O Białym Domu mówi się, że to duży funkcjonalny dom.' | tok | lem -1 | ser -e 'cat(<ADJ>) space lexeme(dom)' |
| 307 | Output: |
| 308 | 0000 01 W O lem:o,EXCL,P/Cal |
| 309 | 0001 01 S _ |
| 310 | 0002 00 BOM * ser:1 |
| 311 | 0002 06 W Białym lem:biały,ADJ/CdDpNp,ADJ/CilDpGainpNs |
| 312 | 0008 01 S _ |
| 313 | 0009 04 W Domu lem:dom,N/CgGiNs,N/ClGiNs,N/CvGiNs |
| 314 | 0013 00 EOM * ser:1 |
| 315 | 0013 01 S _ |
| 316 | 0014 04 W mówi lem:mówić,V/AiMdNsP3R-TfrVp |
| 317 | 0018 01 S _ |
| 318 | 0019 03 W się lem:się,NPRO/CaZx,NPRO/CgZx |
| 319 | 0022 01 P , |
| 320 | 0023 01 S _ |
| 321 | 0024 02 W że lem:żeTfrVp,CONJ;że,PART |
| 322 | 0026 01 S _ |
| 323 | 0027 02 W to lem:toTfrVp,CONJ;to,NPRO/CaGnNsZd,NPRO/CnGnNsZd,PART;ten,ADJPRO/CanvGnNsZd |
| 324 | 0029 01 S _ |
| 325 | 0030 04 W duży lem:duży,ADJ/CaDpGiNs,ADJ/CnvDpGaipNs |
| 326 | 0034 01 S _ |
| 327 | 0035 00 BOM * ser:2 |
| 328 | 0035 12 W funkcjonalny lem:funkcjonalny,ADJ/CaDpGiNs,ADJ/CnvDpGaipNs |
| 329 | 0047 01 S _ |
| 330 | 0048 03 W dom lem:dom,N/CaGiNs,N/CnGiNs |
| 331 | 0051 00 EOM * ser:2 |
| 332 | 0051 01 P . |
| 333 | 0052 01 S \n |
| 334 | |
| 335 | Command: |
| 336 | echo 'O Białym Domu mówi się, że to duży funkcjonalny dom.' | tok | lem -1 | ser -m -e 'cat(<ADJ>) space lexeme(dom)' |
| 337 | Output: |
| 338 | 0002 00 BOM * ser:1 |
| 339 | 0002 06 W Białym lem:biały,ADJ/CdDpNp,ADJ/CilDpGainpNs |
| 340 | 0008 01 S _ |
| 341 | 0009 04 W Domu lem:dom,N/CgGiNs,N/ClGiNs,N/CvGiNs |
| 342 | 0013 00 EOM * ser:1 |
| 343 | 0035 00 BOM * ser:2 |
| 344 | 0035 12 W funkcjonalny lem:funkcjonalny,ADJ/CaDpGiNs,ADJ/CnvDpGaipNs |
| 345 | 0047 01 S _ |
| 346 | 0048 03 W dom lem:dom,N/CaGiNs,N/CnGiNs |
| 347 | 0051 00 EOM * ser:2 |
| 348 | |
| 349 | Command: |
| 350 | echo 'O Białym Domu mówi się, że to duży funkcjonalny dom.' | tok | lem -1 | ser -e '(cat(<ADJ>) space)+ lexeme(dom)' |
| 351 | Output: |
| 352 | 0000 01 W O lem:o,EXCL,P/Cal |
| 353 | 0001 01 S _ |
| 354 | 0002 00 BOM * ser:1 |
| 355 | 0002 06 W Białym lem:biały,ADJ/CdDpNp,ADJ/CilDpGainpNs |
| 356 | 0008 01 S _ |
| 357 | 0009 04 W Domu lem:dom,N/CgGiNs,N/ClGiNs,N/CvGiNs |
| 358 | 0013 00 EOM * ser:1 |
| 359 | 0013 01 S _ |
| 360 | 0014 04 W mówi lem:mówić,V/AiMdNsP3R-TfrVp |
| 361 | 0018 01 S _ |
| 362 | 0019 03 W się lem:się,NPRO/CaZx,NPRO/CgZx |
| 363 | 0022 01 P , |
| 364 | 0023 01 S _ |
| 365 | 0024 02 W że lem:że,CONJ,PART |
| 366 | 0026 01 S _ |
| 367 | 0027 02 W to lem:to,CONJ,NPRO/CaGnNsZd,NPRO/CnGnNsZd,PART;ten,ADJPRO/CanvGnNsZd |
| 368 | 0029 01 S _ |
| 369 | 0030 00 BOM * ser:2 |
| 370 | 0030 04 W duży lem:duży,ADJ/CaDpGiNs,ADJ/CnvDpGaipNs |
| 371 | 0034 01 S _ |
| 372 | 0035 12 W funkcjonalny lem:funkcjonalny,ADJ/CaDpGiNs,ADJ/CnvDpGaipNs |
| 373 | 0047 01 S _ |
| 374 | 0048 03 W dom lem:dom,N/CaGiNs,N/CnGiNs |
| 375 | 0051 00 EOM * ser:2 |
| 376 | 0051 01 P . |
| 377 | 0052 01 S \n |
| 378 | |
| 379 | Command: |
| 380 | echo 'O Białym Domu mówi się, że to duży funkcjonalny dom.' | tok | lem -1 | ser -m -e '(cat(<ADJ>) space)+ lexeme(dom)' |
| 381 | Output: |
| 382 | 0002 00 BOM * ser:1 |
| 383 | 0002 06 W Białym lem:biały,ADJ/CdDpNp,ADJ/CilDpGainpNs |
| 384 | 0008 01 S _ |
| 385 | 0009 04 W Domu lem:dom,N/CgGiNs,N/ClGiNs,N/CvGiNs |
| 386 | 0013 00 EOM * ser:1 |
| 387 | 0030 00 BOM * ser:2 |
| 388 | 0030 04 W duży lem:duży,ADJ/CaDpGiNs,ADJ/CnvDpGaipNs |
| 389 | 0034 01 S _ |
| 390 | 0035 12 W funkcjonalny lem:funkcjonalny,ADJ/CaDpGiNs,ADJ/CnvDpGaipNs |
| 391 | 0047 01 S _ |
| 392 | 0048 03 W dom lem:dom,N/CaGiNs,N/CnGiNs |
| 393 | 0051 00 EOM * ser:2 |
| 394 | |
| 395 | Command: |
| 396 | echo 'O Białym Domu mówi się, że to duży funkcjonalny dom.' | tok | lem -1 | ser -e 'cat(<ADJ>) space lexeme(dom)' --flex |
| 397 | Output: |
| 398 | %{ |
| 399 | #include<string.h> |
| 400 | int n=0; |
| 401 | %} |
| 402 | |
| 403 | %% |
| 404 | |
| 405 | ([ \t]*(([0-9]+[ \t]+)([0-9]+[ \t]+)?)?([^ \t\n\r\f]+)[ \t]+([^ \t\n\r\f]+)([ \t]+(([^ \t\n\r\f]+[ \t]+)*(lem:[^ \t\n\r\f]+,ADJ(\/([[:upper:]]+([[:lower:][:digit:]+?!*-]|<[^>\n[:cntrl:]]+>)+)*)?([,;][^ \t\n\r\f]+)?)([ \t]+[^ \t\n\r\f]+)*))[ \t]*\n)([ \t]*(([0-9]+[ \t]+)([0-9]+[ \t]+)?)?(S)[ \t]+([^ \t\n\r\f]+)(([ \t]+[^ \t\n\r\f]+)*)[ \t]*\n)([ \t]*(([0-9]+[ \t]+)([0-9]+[ \t]+)?)?([^ \t\n\r\f]+)[ \t]+([^ \t\n\r\f]+)([ \t]+(([^ \t\n\r\f]+[ \t]+)*(lem:([^ \t\n\r\f]+;)?dom,[^ \t\n\r\f]+)([ \t]+[^ \t\n\r\f]+)*))[ \t]*\n) { |
| 406 | int start, end, len; |
| 407 | char *lastseg, *tmp; |
| 408 | if(yytext[yyleng-1]!='\n') |
| 409 | {fprintf(stderr,"ser: pattern matches incomplete line\n"); exit(1);} |
| 410 | n++; |
| 411 | sscanf(yytext,"%d %d",&start,&len); |
| 412 | yytext[yyleng-1]='\0'; |
| 413 | if(tmp=strrchr(yytext,'\n')) |
| 414 | { |
| 415 | lastseg=tmp+1; |
| 416 | sscanf(lastseg,"%d %d", &end, &len); |
| 417 | } |
| 418 | else |
| 419 | end=start; |
| 420 | yytext[yyleng-1]='\n'; |
| 421 | printf("%04d 00 BOM * ser:%s%d\n",start,"",n); |
| 422 | ECHO; |
| 423 | printf("%04d 00 EOM * ser:%s%d\n",end+len,"",n); |
| 424 | } |
| 425 | |
| 426 | |
| 427 | .*\n ECHO; |
| 428 | |
| 429 | Command: |
| 430 | echo 'Panna młoda dostała sztuczne kwiaty i wieczne pióro. Rozpakowała wszystko na klatce schodowej.' | tok | lem -1 | ser -e '(cat(<N>) space cat(<ADJ>)) | (cat(<ADJ>) space cat(<N>))' |
| 431 | Output: |
| 432 | 0000 00 BOM * ser:1 |
| 433 | 0000 05 W Panna lem:panna,N/CnGfNs |
| 434 | 0005 01 S _ |
| 435 | 0006 05 W młoda lem:młoda,N/CnGfNs,N/CvGfNs;młody,ADJ/CanvDpGfNs |
| 436 | 0011 00 EOM * ser:1 |
| 437 | 0011 01 S _ |
| 438 | 0012 07 W dostała lem:dostać,V/ApGfMdNsP3R?TaVp |
| 439 | 0019 01 S _ |
| 440 | 0020 00 BOM * ser:2 |
| 441 | 0020 08 W sztuczne lem:sztuczny,ADJ/CanvDpGafinNp,ADJ/CanvDpGnNs |
| 442 | 0028 01 S _ |
| 443 | 0029 06 W kwiaty lem:kwiat,N/CaGiNp,N/CnGiNp,N/CvGiNp |
| 444 | 0035 00 EOM * ser:2 |
| 445 | 0035 01 S _ |
| 446 | 0036 01 W i lem:i,CONJ,EXCL |
| 447 | 0037 01 S _ |
| 448 | 0038 00 BOM * ser:3 |
| 449 | 0038 07 W wieczne lem:wieczny,ADJ/CanvDpGafinNp,ADJ/CanvDpGnNs |
| 450 | 0045 01 S _ |
| 451 | 0046 05 W pióro lem:pióro,N/CaGnNs,N/CnGnNs,N/CvGnNs |
| 452 | 0051 00 EOM * ser:3 |
| 453 | 0051 01 P . |
| 454 | 0052 01 S _ |
| 455 | 0053 11 W Rozpakowała lem:rozpakować,V/ApGfMdNsP3R-TaVp |
| 456 | 0064 01 S _ |
| 457 | 0065 08 W wszystko lem:wszystko,NPRO/CaGnNsZg,NPRO/CnGnNsZg;wszystek,ADJPRO/CanvGnNsZg |
| 458 | 0073 01 S _ |
| 459 | 0074 02 W na lem:na,P/Cal |
| 460 | 0076 01 S _ |
| 461 | 0077 00 BOM * ser:4 |
| 462 | 0077 06 W klatce lem:klatka,N/CdGfNs,N/ClGfNs |
| 463 | 0083 01 S _ |
| 464 | 0084 09 W schodowej lem:schodowy,ADJ/CdglDpGfNs |
| 465 | 0093 00 EOM * ser:4 |
| 466 | 0093 01 P . |
| 467 | 0094 01 S \n |
| 468 | |
| 469 | Command: |
| 470 | echo 'Panna młoda dostała sztuczne kwiaty i wieczne pióro. Rozpakowała wszystko na klatce schodowej.' | tok | lem -1 | ser -m -e '(cat(<N>) space cat(<ADJ>)) | (cat(<ADJ>) space cat(<N>))' |
| 471 | Output: |
| 472 | 0000 00 BOM * ser:1 |
| 473 | 0000 05 W Panna lem:panna,N/CnGfNs |
| 474 | 0005 01 S _ |
| 475 | 0006 05 W młoda lem:młoda,N/CnGfNs,N/CvGfNs;młody,ADJ/CanvDpGfNs |
| 476 | 0011 00 EOM * ser:1 |
| 477 | 0020 00 BOM * ser:2 |
| 478 | 0020 08 W sztuczne lem:sztuczny,ADJ/CanvDpGafinNp,ADJ/CanvDpGnNs |
| 479 | 0028 01 S _ |
| 480 | 0029 06 W kwiaty lem:kwiat,N/CaGiNp,N/CnGiNp,N/CvGiNp |
| 481 | 0035 00 EOM * ser:2 |
| 482 | 0038 00 BOM * ser:3 |
| 483 | 0038 07 W wieczne lem:wieczny,ADJ/CanvDpGafinNp,ADJ/CanvDpGnNs |
| 484 | 0045 01 S _ |
| 485 | 0046 05 W pióro lem:pióro,N/CaGnNs,N/CnGnNs,N/CvGnNs |
| 486 | 0051 00 EOM * ser:3 |
| 487 | 0077 00 BOM * ser:4 |
| 488 | 0077 06 W klatce lem:klatka,N/CdGfNs,N/ClGfNs |
| 489 | 0083 01 S _ |
| 490 | 0084 09 W schodowej lem:schodowy,ADJ/CdglDpGfNs |
| 491 | 0093 00 EOM * ser:4 |
| 492 | |
| 493 | Command: |
| 494 | echo 'Kot, kota, kotu, kocie, kotem' | tok | lem -1 | ser -m -e 'cat(<N>)' |
| 495 | Output: |
| 496 | 0000 00 BOM * ser:1 |
| 497 | 0000 03 W Kot lem:kota,N/CgGfNp;kot,N/CnGaNs |
| 498 | 0003 00 EOM * ser:1 |
| 499 | 0005 00 BOM * ser:2 |
| 500 | 0005 04 W kota lem:kota,N/CnGfNs;kot,N/CaGaNs,N/CgGaNs |
| 501 | 0009 00 EOM * ser:2 |
| 502 | 0011 00 BOM * ser:3 |
| 503 | 0011 04 W kotu lem:kot,N/CdGaNs |
| 504 | 0015 00 EOM * ser:3 |
| 505 | 0017 00 BOM * ser:4 |
| 506 | 0017 05 W kocie lem:kota,N/CdGfNs,N/ClGfNs;kot,N/ClGaNs,N/CvGaNs |
| 507 | 0022 00 EOM * ser:4 |
| 508 | 0024 00 BOM * ser:5 |
| 509 | 0024 05 W kotem lem:kot,N/CiGaNs |
| 510 | 0029 00 EOM * ser:5 |
| 511 | |
| 512 | Command: |
| 513 | echo 'Kot, kota, kotu, kocie, kotem' | tok | lem -1 | ser -m -e 'cat(<N/Ci>)' |
| 514 | Output: |
| 515 | 0024 00 BOM * ser:1 |
| 516 | 0024 05 W kotem lem:kot,N/CiGaNs |
| 517 | 0029 00 EOM * ser:1 |
| 518 | |
| 519 | Command: |
| 520 | echo 'Ala była tu, teraz jest tam.' | tok | lem -1 | ser -m -e 'form(była)' |
| 521 | Output: |
| 522 | 0004 00 BOM * ser:1 |
| 523 | 0004 04 W była lem:były,ADJ/CanvDpGfNs;być,BYC/GfMdNsP3TaVp |
| 524 | 0008 00 EOM * ser:1 |
| 525 | |
| 526 | Command: |
| 527 | echo 'Ala była tu, teraz jest tam.' | tok | lem -1 | ser -m -e 'seg{3} word(teraz) seg{4}' |
| 528 | Output: |
| 529 | 0009 00 BOM * ser:1 |
| 530 | 0009 02 W tu lem:tu,ADVPRO/Zd,PART |
| 531 | 0011 01 P , |
| 532 | 0012 01 S _ |
| 533 | 0013 05 W teraz lem:teraz,ADV/Dp |
| 534 | 0018 01 S _ |
| 535 | 0019 04 W jest lem:być,BYC/MdNsP3TfrVp |
| 536 | 0023 01 S _ |
| 537 | 0024 03 W tam lem:tama,N/CgGfNp;tam,ADVPRO/Zd,ONO |
| 538 | 0027 00 EOM * ser:1 |
| 539 | |
| 540 | Command: |
| 541 | echo 'Czy 2+2 to cztery?' | tok | lem -1 | ser -m -e 'word space number punct number' |
| 542 | Output: |
| 543 | 0000 00 BOM * ser:1 |
| 544 | 0000 03 W Czy lem:czy,CONJ,PART |
| 545 | 0003 01 S _ |
| 546 | 0004 01 N 2 |
| 547 | 0005 01 P + |
| 548 | 0006 01 N 2 |
| 549 | 0007 00 EOM * ser:1 |
| 550 | |
| 551 | |
| 552 | |
| 553 | grp |
| 554 | |
| 555 | Command: |
| 556 | echo 'Ala ma kota.' | tok | lem -1 | grp -e 'lexeme(kot)' |
| 557 | Output: |
| 558 | 0000 03 W Ala |
| 559 | 0003 01 S _ |
| 560 | 0004 02 W ma lem:mieć,V/AiMdNsP3R?TfrVp;mój,ADJPRO/CnvGfNsZs |
| 561 | 0006 01 S _ |
| 562 | 0007 04 W kota lem:kota,N/CnGfNs;kot,N/CaGaNs,N/CgGaNs |
| 563 | 0011 01 P . |
| 564 | 0012 01 S \n |
| 565 | |
| 566 | Command: |
| 567 | echo 'Ala ma psa.' | tok | lem -1 | grp -e 'lexeme(kot)' |
| 568 | Output: |
| 569 | |
| 570 | |
| 571 | |
| 572 | |
| 573 | mar |
| 574 | |
| 575 | Command: |
| 576 | echo 'Ala ma kota. Ola ma kota. Bartosz ma psa.' | tok | lem -1 | mar -e 'lexeme(kot)' |
| 577 | Output: |
| 578 | 0000 03 W Ala |
| 579 | 0003 01 S _ |
| 580 | 0004 02 W ma lem:mieć,V/AiMdNsP3R?TfrVp;mój,ADJPRO/CnvGfNsZs |
| 581 | 0006 01 S _ |
| 582 | 0007 00 BOM * |
| 583 | 0007 04 W kota lem:kota,N/CnGfNs;kot,N/CaGaNs,N/CgGaNs |
| 584 | 0011 00 EOM * |
| 585 | 0011 01 P . |
| 586 | 0012 01 S _ |
| 587 | 0013 03 W Ola |
| 588 | 0016 01 S _ |
| 589 | 0017 02 W ma lem:mieć,V/AiMdNsP3R?TfrVp;mój,ADJPRO/CnvGfNsZs |
| 590 | 0019 01 S _ |
| 591 | 0020 00 BOM * |
| 592 | 0020 04 W kota lem:kota,N/CnGfNs;kot,N/CaGaNs,N/CgGaNs |
| 593 | 0024 00 EOM * |
| 594 | 0024 01 P . |
| 595 | 0025 01 S _ |
| 596 | 0026 07 W Bartosz lem:Bartosz,N/CnGpNs |
| 597 | 0033 01 S _ |
| 598 | 0034 02 W ma lem:mieć,V/AiMdNsP3R?TfrVp;mój,ADJPRO/CnvGfNsZs |
| 599 | 0036 01 S _ |
| 600 | 0037 03 W psa lem:pies,N/CaGaNs,N/CgGaNs |
| 601 | 0040 01 P . |
| 602 | 0041 01 S \n |
| 603 | |
| 604 | |
| 605 | |
| 606 | kot |
| 607 | |
| 608 | Command: |
| 609 | echo 'Ala ma kota.' | tok |
| 610 | Output: |
| 611 | 0000 03 W Ala |
| 612 | 0003 01 S _ |
| 613 | 0004 02 W ma |
| 614 | 0006 01 S _ |
| 615 | 0007 04 W kota |
| 616 | 0011 01 P . |
| 617 | 0012 01 S \n |
| 618 | |
| 619 | Command: |
| 620 | echo 'Ala ma kota.' | tok | kot |
| 621 | Output: |
| 622 | Ala ma kota. |
| 623 | |
| 624 | Command: |
| 625 | echo 'Ala ma kota.' | tok | kot -r |
| 626 | Output: |
| 627 | Ala_ma_kota.\n |
| 628 | |
| 629 | Command: |
| 630 | echo 'Panna młoda dostała sztuczne kwiaty i wieczne pióro. Rozpakowała wszystko na klatce schodowej.' | tok | lem -1 | ser -m -e '(cat(<N>) space cat(<ADJ>)) | (cat(<ADJ>) space cat(<N>))' | kot |
| 631 | Output: |
| 632 | Panna młoda |
| 633 | ----- |
| 634 | sztuczne kwiaty |
| 635 | ----- |
| 636 | wieczne pióro |
| 637 | ----- |
| 638 | klatce schodowej |
| 639 | |
| 640 | |
| 641 | |
| 642 | fla |
| 643 | |
| 644 | Command: |
| 645 | echo 'Ala ma kota. Ola ma kota. Paweł też ma.' | tok | sen | lem -1 | grp -e 'lexeme(kot)' | fla |
| 646 | Output: |
| 647 | 0000 00 BOS * |
| 648 | 0000 03 W Ala |
| 649 | 0003 01 S _ |
| 650 | 0004 02 W ma lem:mieć,V/AiMdNsP3R?TfrVp;mój,ADJPRO/CnvGfNsZs |
| 651 | 0006 01 S _ |
| 652 | 0007 04 W kota lem:kota,N/CnGfNs;kot,N/CaGaNs,N/CgGaNs |
| 653 | 0011 01 P . |
| 654 | 0012 00 EOS * |
| 655 | 0012 00 BOS * |
| 656 | 0012 01 S _ |
| 657 | 0013 03 W Ola |
| 658 | 0016 01 S _ |
| 659 | 0017 02 W ma lem:mieć,V/AiMdNsP3R?TfrVp;mój,ADJPRO/CnvGfNsZs |
| 660 | 0019 01 S _ |
| 661 | 0020 04 W kota lem:kota,N/CnGfNs;kot,N/CaGaNs,N/CgGaNs |
| 662 | 0024 01 P . |
| 663 | 0025 00 EOS * |
| 664 | |
| 665 | |
| 666 | |
| 667 | unfla |
| 668 | |
| 669 | Command: |
| 670 | echo 'Ala ma kota. Ola ma kota. Paweł też ma.' | tok | sen | lem -1 | fla | unfla |
| 671 | Output: |
| 672 | 0000 00 BOS * |
| 673 | 0000 03 W Ala |
| 674 | 0003 01 S _ |
| 675 | 0004 02 W ma lem:mieć,V/AiMdNsP3R?TfrVp;mój,ADJPRO/CnvGfNsZs |
| 676 | 0006 01 S _ |
| 677 | 0007 04 W kota lem:kota,N/CnGfNs;kot,N/CaGaNs,N/CgGaNs |
| 678 | 0011 01 P . |
| 679 | 0012 00 EOS * |
| 680 | 0012 00 BOS * |
| 681 | 0012 01 S _ |
| 682 | 0013 03 W Ola |
| 683 | 0016 01 S _ |
| 684 | 0017 02 W ma lem:mieć,V/AiMdNsP3R?TfrVp;mój,ADJPRO/CnvGfNsZs |
| 685 | 0019 01 S _ |
| 686 | 0020 04 W kota lem:kota,N/CnGfNs;kot,N/CaGaNs,N/CgGaNs |
| 687 | 0024 01 P . |
| 688 | 0025 00 EOS * |
| 689 | 0025 00 BOS * |
| 690 | 0025 01 S _ |
| 691 | 0026 05 W Paweł |
| 692 | 0031 01 S _ |
| 693 | 0032 03 W też lem:też,CONJ,PART |
| 694 | 0035 01 S _ |
| 695 | 0036 02 W ma lem:mieć,V/AiMdNsP3R?TfrVp;mój,ADJPRO/CnvGfNsZs |
| 696 | 0038 01 P . |
| 697 | 0039 01 S \n |
| 698 | 0040 00 EOS * |
| 699 | |
| 700 | |
| 701 | |
| 702 | help, version |
| 703 | |
| 704 | Command: |
| 705 | tok -h |
| 706 | Output: |
| 707 | tok 0.1 |
| 708 | |
| 709 | Usage: tok [OPTIONS]... |
| 710 | |
| 711 | -h, --help Print help and exit |
| 712 | -V, --version Print version and exit |
| 713 | -i, --interactive Interactive mode. (default=off) |
| 714 | |
| 715 | Command: |
| 716 | tok -V |
| 717 | Output: |
| 718 | tok 0.1 |
| 719 | |
| 720 | Command: |
| 721 | lem -h |
| 722 | Output: |
| 723 | lem 0.1 |
| 724 | |
| 725 | Usage: lem [OPTIONS]... |
| 726 | |
| 727 | -h, --help Print help and exit |
| 728 | --full-help Print help, including hidden options, and exit |
| 729 | -V, --version Print version and exit |
| 730 | ... |
| 731 | |
| 732 | Command: |
| 733 | lem -V |
| 734 | Output: |
| 735 | lem 0.1 |