-
Notifications
You must be signed in to change notification settings - Fork 3
/
main.rkt
27 lines (21 loc) · 727 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
#lang racket
; Racket interface for apertium-tat
;
; REQUIRES: apertiumpp package.
; https://taruen.github.io/apertiumpp/apertiumpp/ gives info on how to install
; it.
(provide tat-morph tat-disam)
(require pkg/lib
rackunit
rash
apertiumpp/streamparser)
(define (symbol-append s1 s2)
(string->symbol (string-append (symbol->string s1) (symbol->string s2))))
(define (tat-morph s)
(parameterize ([current-directory (pkg-directory "apertium-tat")])
(rash
"echo (values s) | apertium -n -d . tat-morph")))
(define (tat-disam s)
(parameterize ([current-directory (pkg-directory "apertium-tat")])
(rash
"echo (values s) | apertium -n -d . tat-morph | cg-proc tat.rlx.bin")))