forked from kamush901/apertium-kaz
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.rkt
29 lines (22 loc) · 747 Bytes
/
main.rkt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#lang racket
; Racket interface for apertium-kaz
;
; REQUIRES: apertiumpp package.
; https://taruen.github.io/apertiumpp/apertiumpp/ gives info on how to install
; it.
(provide kaz-morph kaz-disam)
(require pkg/lib
rackunit
rash
apertiumpp/streamparser)
(define (symbol-append s1 s2)
(string->symbol (string-append (symbol->string s1) (symbol->string s2))))
(define A-KAZ './)
(define (kaz-morph s)
(parameterize ([current-directory (pkg-directory "apertium-kaz")])
(rash
"echo (values s) | apertium -n -d . kaz-morph")))
(define (kaz-disam s)
(parameterize ([current-directory (pkg-directory "apertium-kaz")])
(rash
"echo (values s) | apertium -n -d . kaz-morph | cg-proc kaz.rlx.bin")))